Posts

Showing posts from March, 2012

swift - How to create a UnsafeMutablePointer<UnsafeMutablePointer<UnsafeMutablePointer<Int8>>> -

i'm working c api swift , 1 of methods need call need give a unsafemutablepointer<unsafemutablepointer<unsafemutablepointer<int8>>> more info: swift interface: public func presage_predict(prsg: presage_t, _ result: unsafemutablepointer<unsafemutablepointer<unsafemutablepointer<int8>>>) -> presage_error_code_t original c: presage_error_code_t presage_predict(presage_t prsg, char*** result); generally, if function takes unsafepointer<t> parameter can pass variable of type t in "inout" parameter & . in case, t is unsafemutablepointer<unsafemutablepointer<int8>> which swift mapping of char ** . can call c function as var prediction : unsafemutablepointer<unsafemutablepointer<int8>> = nil if presage_predict(prsg, &prediction) == presage_ok { ... } from documentation , sample code of presage library understand allocates array of strings , assigns address of array va...

radgrid - RadComboBox DropDownList is dittached from its place -

Image
there radgrid contains radcombobox along button next it. when user key-in , click on button, data bind in radcombobox related key-in text , display in dropdownlist . but dropdownlist appear far below radcombobox , disturbs & feel of page. please refer attached issue snapshot. i tried set expanddirection="down" property did not worked. tried set enablescreenboundarydetection="false" , sticks dropdownlist @ bottom of page, when scroll page , dropdown stick @ bottom & scrolls page. also, set highlighttemplateditems="true" not working @ all. edit: html code: <telerik:radmultipage id="radmultipage6" runat="server" selectedindex="0" width="100%"> <telerik:radpageview id="radpageview5" runat="server" width="100%"> <%--<telerik:radajaxpanel id="radajaxpane...

javascript - NodeJS connect two user among many of loggedin? -

i'm experimenting node.js , made cool chat application followed article using socet.io! then have added authentication system using passport.js test site. how this: among many users, user x want send kinds of notification user y not other users!! i using emit() function custom event called notifybuzz when user send notification goes accounts!! this article mentions need use form socket.broadcast.emit('hi'); send limited recipients. challenge keep track of socket connections, , relate user information them. once that's done, you'll know socket send message over. best of luck!

tcl - How to find a procedure by using the code inside the proc? -

is possible find procedure name using content of procedure? for example, proc test {args} { set vara "exam" puts "test program" } using statement set vara , possible find procedure name test? because, need find procedure know output [it's printing something, need find procedure using that]. i tried many ways info frame , command . but, nothing helps. with info proc , can content of procedure may helps in expect. the following procedure search given word in namespaces. can change search in particular namespace well. also, search word can case insensitive if altered in terms of regexp - nocase . return list of procedure names contains search word. proc getprocnamebycontent {searchword} { set resultproclist {} set nslist [namespace children ::]; # getting namespaces list lappend nslist ::; # adding 'global scope namespace foreach ns $nslist { if {$ns eq "::"} { set currentscope...

Pip install fontforge, says Couldnot find a version -

i have done, apt-get install fontforge on ubuntu system. when import fontforge in python code, throws error as, no module named fontforge . when do, pip install fontforge , throws error as,, not find version satisfies requirement fontforge (from versions: ) no matching distribution found fontforge how can install fontforge's python libs? you may want install python-fontforge . sudo apt-get install python-fontforge after should able import fontforge in ubuntu's default python version. you can verify doing /usr/bin/python -c "import fontforge;print(fontforge)" . should print path fontforge python module.

visual studio 2012 - SSIS: How can one initiate the whole process again if a task fails -

Image
well, newbie ssis. there way go task "delete zip files", when second task "download zip files" fails?

iphone - re request Facebook permissions with Facebook sdk 3.x in iOS -

i using facebook sdk 3.14 , requesting user for public profile, email, user_photos permissions . using email login purpose. if user denies email during login , there no way ask back. have seen apps airbnb , zomato returning user permissions page unless reuired permissions given user. is there way in can re-request user permissions not granted during login process. i using below code requesting permissions [fbsession openactivesessionwithreadpermissions:@[@"public_profile",@"email",@"user_friends",@"user_photos"] allowloginui:yes completionhandler: ^(fbsession *session, fbsessionstate state, nserror *error) { // retrieve app delegate if(error.code ==2 && [errorreason isequaltostring:@"com.facebook.sdk:userlogincancelled"]){ [facebookwebobj performselector:@selector(hideanimatedloader) withobject:nil...

rabbitmqctl - RabbitMQ policy synchronising of queues across cluster -

we have setup rabbitmq cluster 3 nodes. if effort have form of load balancing, setup policy sync across 2 of nodes: rabbitmqctl set_policy ha-2 . '{"ha-mode":"exactly","ha-params":2,"ha-sync-mode":"automatic"}' this works expected when 3 nodes online. when shutdown 1 of nodes (to simulate failure) queues mastered on failed node still available (on slave) not synchronized node. if manually re-apply policy, queues synchronize expected. should expect queues mirrored in scenario 1 node fails policy? works expected in rabbitmq 3.5.4

ios - In table view I want to add a view its height should be dynamic according to cell height -

in uitableview adding uiview , it's height should dynamic according cell height, problem facing is not accurate. height of uiview not varying correctly cell , calculated again , again on table reloading. when load data, can calculate each cell's height, , store them in array, can use frame array setup uiview's frame

android - Use CreativeSDK below API level 14? -

for reason original aviary framework has stopped working , has forced me migrate our code use new creativesdk instead. unfortunately new sdk has minsdkversion of 14 = android 4.0, lot of our customers still use older versions (a little on 20 % according googles statistics our app). we cannot release app update cuts away many users, there way compile app lower api level , disable image editing "old api" users? is there way compile app lower api level , disable image editing "old api" users? tricky question. can try build app api lv < 14 creativesdk not able compile, resulting in build error, no. android 4.0 ~4 years old. happens more , more libraries drop support older android versions (for reason think. update already!), case creativesdk. minsdk requirement went 2.3 in aviary framework 4.0 in creativesdk. adobe has have done reason. of hassle provide compatibility 'old' versions of android, complex functionality. it mentioned h...

elisp - Emacs map <compile "python current-buffer-name"> to a hotkey -

Image
if m-x <ret> compile <ret> , prompted compile. want compile current buffer in python, type python test.py <ret> . asked if want create separate process, , want y (that yes). (define-key python-mode-map "\c-b" 'compile) gives following error: (define-key global-map "\c-b" 'compile) works, that's far need. so, how can map compile python current-buffer-name "\c-b" ? emacs have concept of modes. guess not want have compilation of python global key. have checked: http://www.emacswiki.org/emacs?action=browse;oldid=pythonmode;id=pythonprogramminginemacs what calling external program. i'm sure there better suited way in python-mode. if want pack more 1 command key, have write kind of wrapper function contains things going call.

php - Parse error: syntax error, unexpected end of file in on line 122 -

***> 1 hlpe me pleaz problems in php end of file error make me crazy here code* <?php if ($_post["submit"]) { if (!$_post['name']) { $error="<br />please enter name"; } if (!$_post['email']) { $error.="<br />please enter email address"; } if (!$_post['comment']) { $error.="<br />please enter comment"; } if ($error) { $result='<div class="alert alert-danger"><strong>there error(s) in form:</strong>'.$error.'</div>'; } ?> <!doctype html> <html> <head> <title>my first webpage</title> ! <meta charset="utf-8" /> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1" /> ! <!-- latest compiled , minified css --> <link rel="stylesheet" href=...

php - add a default value to an array -

i have following code in opencart product.php control file. $product_option_value_data = array(); foreach ($product_option['product_option_value'] $product_option_value) { $product_option_value_data[] = array( 'product_option_value_id' => $product_option_value['product_option_value_id'], 'option_value_id' => $product_option_value['option_value_id'], 'quantity' => isset ($product_option_value['quantity']) ? $product_option_value['quantity'] : '1', 'subtract' => $product_option_value['subtract'], 'price' => isset ($product_option_value['price'])? $product_option_value['price'] : '27.99', 'price_prefix' => $product_option_value['price_prefix'], ...

Fatal error: Call to undefined function menu_execute_active_handler() in drupal 7.9 -

i in problem, site down. fatal error: call undefined function menu_execute_active_handler() in drupal. please me. as function part of essential codebase, inside includes/menu.inc, please check integrity of source code of drupal. apart that, drupal 7.9 old, insecure release. if security updates not applied, site hacked. check page: https://www.drupal.org/drupalsa05faq if these not help, install xdebug php extension ( http://xdebug.org/ ) , check execution profile, xdebug can stacktrace-included errors, can lot.

facebook - How to retrieve page id from application tab -

i have application tab installed on many pages manage. i want retrieve id of page signedrequest not contain page_id. why? this code: if (response.status === 'connected') { var uid = response.authresponse.userid; var accesstoken = response.authresponse.accesstoken; var signedrequest = response.authresponse.signedrequest; var data = signedrequest.split('.')[1]; data = json.parse(window.atob(data)); } the output of data is: object { algorithm="hmac-sha256", code="aqbqcct1sokkitut_pnwl-gx...na-izqqk6trrsfqiikp8kae", issued_at=1445942158, user_id=my_id } how can page id? thanks! the page id in signed_request parameter, , 1 sent server post: https://developers.facebook.com/docs/games/canvas/login#parsingsr just parse , use var_dump check out fields. you can use php sdk parameter: https://developers.facebook.com/docs/php/howto/example_access_token_from_page_tab/5.0.0

ios - Facebook sdk is not a dylib error after update update Xcode 7? -

Image
i got errors facebook sdk after update xcode 7 when tried build project code below. ld: warning: auto-linking supplied '/users/manjarb/desktop/hubbalabs/lib/facebooksdk/fbsdksharekit.framework/fbsdksharekit', framework linker option @ /users/manjarb/desktop/hubbalabs/lib/facebooksdk/fbsdksharekit.framework/fbsdksharekit not dylib ld: warning: auto-linking supplied '/users/manjarb/desktop/hubbalabs/lib/facebooksdk/fbsdkcorekit.framework/fbsdkcorekit', framework linker option @ /users/manjarb/desktop/hubbalabs/lib/facebooksdk/fbsdkcorekit.framework/fbsdkcorekit not dylib ld: warning: auto-linking supplied '/users/manjarb/desktop/hubbalabs/lib/facebooksdk/fbsdkloginkit.framework/fbsdkloginkit', framework linker option @ /users/manjarb/desktop/hubbalabs/lib/facebooksdk/fbsdkloginkit.framework/fbsdkloginkit not dylib how fix this? thanks! when install facebook sdk ios frameworks way facebook advices it, 2 things: create "frameworks" g...

ios - Completion Block AFNetworking in Swift -

i'm working on ios app basis objective-c afnetworking communicate api. i'm writing new viewcontrollers in swift , have problems completionblock in swift files. the original objective-c code: - (void)downloadjson { [[oddwebservice sharedinstance] getparkingspaceswithcompletionblock:^(nsarray *result, bool succes) { if(succes) { [self.parkings removeallobjects]; for(nsdictionary *dict in result) { parking *parking = [[parking alloc] init]; parking.name = [dict objectforkey:@"name"]; parking.freespace = [[dict objectforkey:@"freespace"] integervalue]; [self.parkings addobject:parking]; } [self updateparkings]; } else { nslog(@"error retrieving parking spaces"); } }]; } this thought should in swift: func downloadjson() { oddwebservice.sharedinstance().getparkingspaceswithcompletionb...

Get and Set value in javascript -

i have function show popup. when user clicks link popup gets opened. problem have set value in popup input type not able in javascript. doing : var email_id = document.getelementbyid("username_login").value; from here getting value: <tr> <td bgcolor="#ffffff" style="padding-left:10px;"> <input type="text" name="username" id="username_login"> </td> </tr> popup html <form method="post" name="forgotpsswd"> <table cellspacing="0" cellpadding="7" width="100%" border="0"> <tbody> <tr> <td width="26%" align="right">email address:</td> <td width="1%" style="padding:7px 5px;">:</td> <td width="74%"><input type="text" value="" size="33...

java - assign a enum variable -

i have problem code want assign simple enum variable , eclipse give me error "empty cannot resolved or not field" here code have enum class seed below : public enum seed { // save "seed.java" empty, cross, nought } and have cell class inside want use seed class : public class cell { // package access seed content; // content of cell (seed.empty, seed.cross, or seed.nought) int row, col; // row , column of cell /** constructor initialize cell specified row , col */ public cell(int row, int col) { this.row = row; this.col = col; clear(); // clear content } /** clear cell's content empty */ public void clear() { content = seed.empty;//**error** empty cannot resolved or not field } } what's wrong ? save project , build , error disappear

mysql - Distinct and joins in SQL query? -

i tryint fetch distinct esigndevicecode same device every esigndevicecode new row. select count(distinct(esigndevicecode)) units, (f.devicename) devicename, (case when u.status=1 count(u.status) else 0 end) intit, (case when u.status=2 count(u.status) else 0 end) ekyc, (case when u.status=4 count(u.status) else 0 end) esign applicationdetails u left join esignlogs e on e.applicationslno=u.slno left join fingerprintdevice f on f.slno=e.deviceid group e.esigndevicecode; your group clause wrong. try this:- select count(distinct(esigndevicecode)) units, (f.devicename) devicename, (case when u.status=1 count(u.status) else 0 end) intit, (case when u.status=2 count(u.status) else 0 end) ekyc, (case when u.status=4 count(u.status) else 0 end) esign applicationdetails u left join esignlogs e on e.applicationslno=u.slno left join fingerprintdevice f on f.slno=e.deviceid group devicename, u.status;

angularjs - When send individual parameter, action result cannot be hit. when send object, it gets hit -

i have 1 application consist of asp.net webapi 2 , web project angularjs used. problem when call api parameters, not hit. , when send object, gets hit. anjularjs code: with parameters $http({ cache: false , method: 'post' , url: 'http://localhost:51341/api/user/updateuser' , data: { userid: $scope.usersid, fullname: $scope.name } }).success(function (data, status, headers, config) { }) .error(function (data, status, headers, config) { }); webapi code [httppost] public apiresponse updateuser(int userid, string fullname) { return this.response(true, messagetypes.success, "user has been saved successfully."); } with object var model = { userid: $scope.usersid, fullname: $scope.name }; $http({ cache: false , method: 'post' , url: 'http://localhost:51341/api/user/updateuser' , data: model }).success(function (data, status, headers, config) { }) .error(function (data, statu...

How to implement this mysql query? -

insert table if duplicate exits select row primary key else insert table , return last insert id ? select if (exists(select * users username='adminchat')) begin select userid users username='adminchat'; end; else begin insert `users`( `userrole`, `username`, `createdon`, `emailid`, `is_active`, `password`) values (1,'user1_chat',now(),'sdmd1@sdmd1.com',1,'123456') select last_insert_id(); end; if table contains auto_increment column , insert ... update inserts row, last_insert_id() function returns auto_increment value. if statement updates row instead, last_insert_id() not meaningful. however, can work around using last_insert_id(expr). suppose id auto_increment column. make last_insert_id() meaningful updates, insert rows follows: insert table (a,b,c) values (1,2,3) on duplicate key update id=last_insert_id(id), c=3; a way make things work use dummy column, if have table auto_increment column id , unique key...

Python module 'os' has no attribute 'mknod' -

i want create new file in python using mknod command, getting error as: os.mknod(); attributeerror: module 'os' has no attribute 'mknod' i using windows , attributes other 'mknod' working. os offers functionality closely related os you're using. if other attributes can accessed os (meaning haven't got os.py file in current dir masking standard module) attributeerror 99% signal unsupported function on operating system. this case os.mknod on windows. creating named pipes in windows has, far can understand, very different semantics . either way, if trying use mknod create named pipes you'd better using mkfifo() (again, unix supported) . if you're using create ordinary files, don't, use open() portable.

asp.net mvc - Nuget give this error "ps1 cannot be loaded because running scripts is disabled" -

i have new empty mvc 5 project, , try install nuget packages. when insert in nuget console command :update-package got following asnwer: file e:\webapp\packages\microsoft.codedom.providers.dotnetcompilerplatform.1.0.0\tools\uninstall.ps1 cannot loaded because running scripts disabled on system. more information, see about_execution_policies @ http://go.microsoft.com/fwlink/?linkid=135170.at line:1 char:3 + & 'e:\webapp\packages\microsoft.codedom.providers.dot ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + categoryinfo : securityerror: (:) [], pssecurityexception + fullyqualifiederrorid : unauthorizedaccess then start install new packages , got again message: webapp\packages\modernizr.2.8.3\tools\install.ps1 cannot loaded because running scripts disabled on system i saw posts related message, not related mvc projects. my question is: why messages? what can fix issue? this issue, can appear on server...

php - how can define table record is exiest or not in table in database using db-table in zend -

i using zend framework. want define product name exist or not if not insert product name. i using code in controller $this->product_tbl = new application_model_dbtable_producttbl(); $product_name = 'mobile'; $productresult = $this->product_tbl->fetchrow($this->product_tbl->select()->where('product_name ='.$product_name)); if(!$productresult){ // when productresult null } message: sqlstate[42s22]: column not found: 1054 unknown column 'mobile' in 'where clause' my question if product_name not found display simple message "row not found" $this->product_tbl = new application_model_dbtable_producttbl(); // project db table $product_name = 'mobile'; // project_name variable declare , store value 'mobile' $productresult = $this->product_tbl->fetchall($this->product_tbl->select()->where('product_name = ?', $product_name)); // fetch result ...

javascript - Display unknown hidden field values on page -

i'm using script data visitor google analytics , pass hidden input fields on form. i'm using script article: http://bit.ly/1pipxrp if @ working example here ( http://codepen.io/saltmktg/pen/meerex - function starts on line 91), can click "show ga info" button , see alerts each piece of data. (you won't see real info because analytics script linked different account, i.e not jsfiddle.) nevertheless, my problem want display data on actual page - without visitor having click "show ga info" button. want them see data right when hit page. right populatehiddenfields function populates hidden fields when click "show ga info" button. tried things <body onload="populatehiddenfields(this); , window.onload = populatehiddenfields - can't function work elsewhere on page (apart being tied actual form). please let me know if can provide more info or examples. once again, i'd visibly display visitor's google analytics trackin...

c# - Reference conflict with System.Net.FtpClient -

i have old c# .net 2.0 application, , need add ftp client (cannot make due simple ftpwebrequest alas) , have tried include system.net.ftpclient https://netftp.codeplex.com/ code autocompletes fine when type it: system.net.ftpclient.ftpclient client = new system.net.ftpclient.ftpclient(); but following error: the type or namespace name ftpclient not exist in namespace system.net i have tried fixing setting alias project reference system.net.ftpclient (ftp instead of global) , typing @ top: extern alias ftp; and the extern alias ftp not specified in /reference option if change .net framework 4.5 seems can around issue, application old addon sap business one, , changing 2.0 4.5 gives me tens of other errors sap-classes not have constructor etc, unfortunately cannot this. there other way can make work? looks binaries distributed library don't support v2.0 have @ batch files used build project: https://netftp.codeplex.com/sourcecontrol/latest#create_cod...

xslt - XSL recursive traverse based on variable -

i'm trying head around xsl recursion. need build html table based on xml using xslt cell tags position mapped string attribute called name formatted "row.column". i'm trying recursively start last cell , count first cell ( 0.0 ) , start building table. reason cells may span several cell positions. use in html cannot process cells in for-each loop. last cell identified table attributes; bodyrowcount , columncount. the xml looks this <table headerrowcount="0" footerrowcount="0" bodyrowcount="4" columncount="2" > <cell self="ucd8iceei0" name="0:0" rowspan="1" columnspan="1"> <content>1</content> </cell> <cell self="ucd8iceei1" name="1:0" rowspan="1" columnspan="1"> <content>2</content> </cell> <cell self="ucd8iceei2" name="2:0" rowspan="1...

Features of Mandrill API -

i new mandrill , integration. can me figure out advantages of using mandrill? can done using mandrill other sending messages , tracking them? mandrill has many uses. might have seen on website itself. mail transaporter php mailer, uses own server sending mails. as said on website, mandrill runs on globally distributed infrastructure can deliver emails in milliseconds. this because when send mail through smtp or send.json (api) method, send mail possibly see fastest path algorithm deliver mail. that's why take milliseconds deliver. have ~7 different mail servers worldwide this. major features, sending mails fastly our own server using php mailer. sending mails via pre-designed templates can reusable merge vars we're using. support multiple language platforms like, curl, json, python, php, ruby, nodejs, dart , depending frameworks. it tracks clicks mail sent. ex: each , every url link in our sent mails redirected after tracking mandrillapp sit...

javascript - Rivets.js: When button is clicked, call a function with an argument from a data binding -

this infuriating. seems should simple, can't find magic incantation. here's gist of need do: <div rv-each-thing="data.things"> <input type=button value="click" onclick="abc( {thing} )"> </div> that should illustrate need do. i've tried many different things, nothing seems work. below default configuration of event handler rivets website: // augment event handler of on-* binder handler: function(target, event, binding) { this.call(target, event, binding.view.models) } so apart event object, can reference models related particular binding second argument. using can access particular object for example <div rv-each-thing="data.things"> <input type=button value="click" onclick="abc"> </div> function abc(event,rivetsbinding){ rivetsbinding.thing //heres thing :) }

google maps - check if geo coordinates are in dynamically drawn polygon -

i'm trying point(s) in polygon implementation multiple points , dynamic shapes drawn on google maps. user may draw shape on map , tries find stored places(available in database lat , long) in drawn shape. i've browsed enough articles , posts on how store borders of polygon table , doing spatial query doesn't suit problem. in case dynamic input. i'm looking optimal way instead of storing shapes. appreciated. you try browser based spatial analytics libraries point-in-polygon algorithms e.g http://turfjs.org/ or http://geoscript.org/ .

html - Get checkbox value with php -

i try determine if checkbox checked or not, error. test.php <html> <body> <form method="post" action="<?php echo $_server['php_self'];?>"> use proxy : <input type="checkbox" name="use_proxy"><br><br> <input type="submit"> </form> <?php $use_proxy = $_post['use_proxy']; if ($use_proxy != "on") { $use_proxy = "off"; } echo "<p> use_proxy = " . $use_proxy . "</p><br>"; ?> </body> </html> i error: notice: undefined index: use_proxy in c:\xampp\htdocs\mbcl\checkbox_test.php on line 11 how can solve it? this behaviour of checkbox until checked , can not fetched @ backend(php) . can try below- <html> <body> ...

c# - Bind Window Icon to Image Control -

currently have problems bindings in wpf. project divided 2 projects: 1. library 2. demo project including library. my demo project has main window icon. in viewmodel of window open window located in library. set icon of window in library icon of main window demo project. the window of library has image control , bound icon of window: <image width="32" height="32" source="{binding elementname=windowpackageinformation, path=icon}" /> window's icon defined follows: name="windowpackageinformation" icon="/ypus_lib;component/icon_32x32.ico" in designer view image showing when starting application fails exception saying icon unable locate. does have idea? your icon (.ico) file should added project planning use it. build action should set resource . try accessing pack://application:,,,/referencedassembly;component/possiblesubfolder/yo‌​urresourcefile.ico

c# - How to use Identity with Entity Framework database first in ASP.NET MVC -

when try use identity ef database first , following error missing partial modifier on declration of type 'myproject.models.userprofile' partial declration of type exist. basically error because there partial class called userprofile exist in accountmodel class , class same name represent table generated using identity . so should do? make sure both classes defined used "partial" modifier.

android - Picasso image load is showing blank -

i want load image server imageview . i'm unable load when i'm trying load other images of tutorial work fine. here image url (failed load) image url (which can load). i cant understand why problem arise either it's size or dimension. please guide me.

sql - How to generate a load report in postgresql when data is logged as sessions? -

i have database contains sessions: like: user, date_first, date_last john, 2015-01-01, 2015-08-23 john, 2015-07-02, 2016-09-01 mary, 2015-01-01, 2015-01-03 i want generate report tells me how many users logged-in per day/week/month. is possible via sql in postgresql? expected output monthly report: month, users 2015-01, 25 2015-02, 50 2015-03, 12 it's possible using series generating function generate_series(start, stop, step interval) . example months report: select to_char(g.d, 'yyyy-mm') month, count(*) users generate_series( (select date_trunc('month', min(date_first)) sessions), (select max(date_last) sessions), '1 month') g(d) inner join sessions s on (g.d, g.d + interval '1 month' - interval '1 day') overlaps (s.date_first, s.date_last) group 1 having count(*) > 0 order 1 this sample on sql fiddle . similarly, can write queries days , weeks reports.

c# - Compile time error when styling BaseView like LoadingDecorator -

for instance have next code baseview: using system.windows; using devexpress.xpf.core; namespace infrastructure.baseview { public class baseview : loadingdecorator { public baseview() { style = findresource("baseviewstyle") style; } } } style: <style targettype="{x:type baseview:baseview}" x:key="baseviewstyle" > <setter property="ownerlock" value="inputonly"/> <style.triggers> <datatrigger binding="{binding state}" d:datacontext="{d:designinstance type=baseviewmodel:baseviewmodel}"> <datatrigger.value> <enums:viewstate>busy</enums:viewstate> </datatrigger.value> <setter property="issplashscreenshown" value="true" /> </datatrigger> <datatrigger binding="{binding state}" d:datacontext=...

java - How to JPA join from child element -

i want select elements via jpa query/criteriaquery can't quite figure out how it. i'm using h2 db. query i've tested in h2 console is: select element.* element left join group_element on element.id = group_element.elements_id group_id null in other words want select groupless elements. classes are: @entity class element{ @id @generatedvalue private integer id; } @entity class group{ @id @generatedvalue private integer id; @manytomany private list<element> elements; } i've had no problem doing in similar cases "elements" mapped field in element, in specific case can't add field. can't quite figure out how join entities in case. jql joins owner owned. groupless elements do select e element e e not in (select e2 group g inner join g.elements e2)

android - Empty listview displayed after doing filter operation -

i have dropdown in layout filter listviewes, used onoptionsitemselected method filter listviewes,now filter eventlistviewes using displayeventlist() method.but unfortunately filtered listview not displayed in layout(after filter operation eventlistview filtered may not displayed in layout),please me solve problem. public boolean onoptionsitemselected(menuitem item) { log.d("onoptionsitemselected", "yes"); switch (item.getitemid()) { case r.id.all: displayeventinvitationlist(inflater, container,savedinstancestate); return true; case r.id.event: displayeventlist(inflater, container,savedinstancestate); return true; case r.id.invitation: displayinvitationlist(inflater, container,savedinstancestate); return true; default: return super.onoptionsitemselected(item); } } ...

impersonation - Is X-LConn-RunAs exposed through the Social Business Toolkit? -

in ibm connections, need post topics , reply java (not web) application. noticed in api documentation can provide http header value post topic or reply on behalf of user (impersonation). we use social business toolkit purpose, question is, how ? i not find reference x-lconn-runas . , need configure security similar security activitystreams ? or enough administrator of forum ? not supported through sbt @ moment in time

Is there any slack API to update profile information? -

hi update profile information of slack account using api. don't find api on documentation. have api update profile information? see screenshot http://screencast.com/t/f7eoakt0yy yes, do. but it's undocumented api method. it's called users.profile.set . far used change first- , last name, other attributes should work too. the basic syntax is: users.profile.set?token=xxx&user=u12345678&profile=newprofile newprofile placeholder new profile user in json format, need specify attributes want change, e.g. profile={"first_name":"john"} change first name john. check out documentation on github details , other undocumented methods in slack api.

javascript - How to use Arrow function for returning anonymous function -

i have following code in ecma5 , i'm trying replace anonymous function arrow function. how can achieve this? can replace both or 1 or none function arrow function? var countersetup = function () { var counter = 0; return function () { counter += 1; console.log('increment counter value : ' + counter); return counter; }; }; var counter = countersetup(); counter(); you can try this: var counter = () => { var counter = 0; return () => { counter += 1; console.log('increment counter value : ' + counter); return counter; } }(); alert(counter()); alert(counter()); alert(counter());

sed regex not working -

i using following command eliminate bold text. sed 's/\-?[0-9]{1,4}\.[0-9]{1,4}//g' countries.txt countries.txt contains data in following format: canillo 42.5833 1.6667 6 encamp 42.5333 1.6333 6 ordino -42.6 -1.55 6 when run find/replace in sublime above regex, geographical coordinates eliminated. when use sed execute same regex, doesn't work. please refer the -r extended regular expression argument section @ sed - introduction , tutorial bruce barnett : because meaning of characters different between regular , extended expressions, need command line argument enable sed use extension. ... mac os x , freebsd uses -e instead of -r . so, on macos or freebsd may use sed -e 's/\-?[0-9]{1,4}\.[0-9]{1,4}//g' countries.txt and in other environments: sed -r 's/\-?[0-9]{1,4}\.[0-9]{1,4}//g' countries.txt

django - Nginx server edit to allow iframe from any site -

i've done curl -i www.site.com , result http/1.1 200 ok server: nginx date: mon, 21 sep 2015 13:16:11 gmt content-type: text/html; charset=utf-8 content-length: 103555 connection: keep-alive vary: accept-encoding vary: cookie x-frame-options: sameorigin set-cookie: csrftoken=hkixbllqggxlt1fgrbfbm3af3g1cpxxp; expires=mon, 19-sep-2016 13:16:11 gmt; max-age=31449600; path=/ i need edit server x-frame-options: allow all. delicate , such did not go around testing without being sure. appreciate guidance on this. there clickjacking prevention in middleware once removed worked perfectly. middleware_classes = ( #'django.middleware.cache.updatecachemiddleware', #'django.middleware.gzip.gzipmiddleware', 'django.middleware.common.commonmiddleware', 'django.contrib.sessions.middleware.sessionmiddleware', 'django.middleware.csrf.c...

subquery - SAS: standard deviation on unfixed rolling window -

i think posted similar question before. time struggling data id. my data looks like date stock value standard_deviation 01/01/2015 vod 18 ... 01/01/2015 vod 15 ... 01/01/2015 vod 5 ... 03/01/2015 vod 66 ... 03/01/2015 vod 7 ... 04/01/2015 vod 19 ... 04/01/2015 vod 7 ... 05/01/2015 vod 3 ... 06/01/2015 vod 7 ... ..... ... ... ... 01/01/2015 rbs 58 ... 01/01/2015 rbs 445 ... 01/01/2015 rbs 44 ... 03/01/2015 rbs 57 ... i need work out moving average/std deviation for each stock based on (-3,+3) trading days. since trading days (not calendar days), , there different number of trades in each day, created sub-query , applied following code. data want; set input; date; retain gdate; if first.date gdate+1; run; proc sort data=want; stock gdate ; run; proc sql;...

javascript - Chart.js - IndexSizeError: Index or size is negative or greater than the allowed amount -

i'm drawing doughnut chart using chart.js arc function. worked fine sometime. started throwing above exception. the exception thrown @ following line in chart.js arc function : ctx.arc(this.x, this.y, this.outerradius, this.startangle, this.endangle); here values follows : x = 0, y = 0, outerradius = -0.5, startangle = 4.71xxx, endangle = 4.71xxx i guess 0 values x , y or negative value outerradius causing problem. strange thing is working when clear browser cache , try same dataset. though dataset returned server same, above values different. x = 50, y = 25, outerradius = 24.5, startangle = 4.71xxx, endangle = 4.71xxx might x , y calculations done before canvas getting rendered in former case. anyone else having similar issues? :-) this because chart doesn't have finite size when it's being created (i.e. when chart(ctx).doughnut being called). chart width , height 0 , outerradius becomes -segmentstrokewidth / 4 (this 2 default -...

android - Simple Sqlite Helper -

here today learning sqlite insert , view inserted records. when click save button got error "unfortunately appname stopped". can help? sqlitedatabase helper public class sqlitedatabasehelper extends sqliteopenhelper { public static final string database_name="reg"; public static final string table_name="user_details"; public static final string column_id="id"; public static final string column_name="name"; public static final string column_email="email"; public static final string column_uname="uname"; public static final string column_password="pass"; public static final int database_version=1; public sqlitedatabasehelper(context context){ super(context,database_name,null,database_version); } @override public void oncreate(sqlitedatabase db) { string sql="create table"+table_name+"("+column_id+"integer primary key auto increment"+column_name+"varchar...