Posts

Showing posts from February, 2014

Rails SQL in controller -

i'm using xeditable , rabl in rails app. i have workorder belongs workgroup . want assign workorder employee in workgroup . i'm using source in xeditable : data-source="/employees.json?workgroup=<%= workorder.workgroup.id%>" and code i'm trying in employee controller: def index @employees = employee.order(:first_name) @employees = employee.joins(:empgroups).where(:workgroup_id => params[:workgroup]) if params[:workgroup].present? end this sql gets generated: select "employees".* "employees" inner join "empgroups" on "empgroups"."employee_id" = "employees"."id" "employees"."workgroup_id" = 2 the issue should `where "empgroups"."workgroup_id" = 2 how change line of code? @employees = employee.joins(:empgroups).where(:workgroup_id => params[:workgroup]) if params[:workgroup].present? thanks help! ...

Facebook sharing button(include video in post) -

i have website want share via facebook sharing button. post needs have websites url link, want show video in post well(as thumbnail). i've made several tags, cant seem find way add link youtube video. it possible? current code: <meta property="og:title" content="this title" /> <meta property="og:description" content="this description" /> <meta property="og:image" content="/content/images/mobile.jpg" /> <meta property="og:url" content="http://randomsite.yy"/> <a class="resgreen" id="facebooksharer" style="display: none"> <input type="button" class="whiteboxes" id="tipfriend" value="post friend" /> </a> after search done user, need change href sharebutton: $('#facebooksharer').attr('href', 'http://www.facebook.com/sharer.php?mode=friend&p[url]=http://ran...

emacs - Elisp - Avoid prompt in interactive function -

i'm trying call following org-mode function insert current timestamp in buffer. function called script. (org-time-stamp-inactive) this, expected, brings prompt asking date use timestamp. want skip prompt , insert timestamp directly. possible @ all? haven't found me. this should insert current inactive time stamp: (org-insert-time-stamp nil nil t)

How to Control appendChild behaviour in javascript/jquery? -

we know whenever appendchild child keep on appending. question how can control append child append once, twice, 3 times or number of specified times. i'll give example below, i'm sure you'll know i'm talking about. jquery or javascript answer appreciated. thanks. jquery, pure javascript $( document ).ready(function() { $('#mybtn').click(function(){ $('p:eq(1)').css('background-color', 'yellow'); var newdiv = document.createelement('div'); newdiv.id = "newdiv"; $('#mydiv').append(newdiv); newdiv.style.height = "25px"; newdiv.style.width = "25px"; newdiv.style.border = "2px solid blue"; }); }); html <div id="container"> <div id="mydiv"></div> <p>first paragraph</p> <p>second paragraph</p> <p>third paragraph</p> ...

ios - deselecting UITableViewCell -

i'm calling view controller table view. when return caller view table cell pressed before stays selected couldn't select again before selecting cell. i've added deselectrowatindexpath method below didn't worked. - (void) tableview:(uitableview *)tableview diddeselectrowatindexpath:(nsindexpath *)indexpath { [tableview deselectrowatindexpath:indexpath animated:yes]; uistoryboard *storyboard = [uistoryboard storyboardwithname:@"main" bundle:nil]; uiviewcontroller *ctrl = [storyboard instantiateviewcontrollerwithidentifier:@"node"]; self.navigationcontroller.navigationbarhidden = no; self.navigationcontroller.navigationitem.hidesbackbutton = no; [self.navigationcontroller pushviewcontroller:ctrl animated:yes]; } diddeselectrowatindexpath called after row has been deselected, call deselectrowatindexpath useless. place in didselectrowatindexpath deselect after tapping on it: [tableview deselectrowatindexpath...

javascript - Browser crashes when I save changes in UnitOfWork after delete -

i have mvc application. created api inside controller, , passed 2 parameters: int , int[] (array of int). public void deleteroom(int id, int[] ids) { ... //deleting room database , every entity that's associated houseunitofwork.commit(); } knowing houseunitofwork contains every repository of house (rooms, devices, floors...) in view, i'm using api inside ajax call : function delete(roomid, floorid, userdevicesid) //roomid, floorid integers, userdevicesid array {... ajax call url : "/api/room/deleteroom?roomid=" + roomid + "&userdevicesid="+ userdevicesid, ... } i'm not sure if right call of variable of type array. maybe that's source of error. later, it's called in view inside script tags, i'm using javascript html5 library drawing , manipulating graphics events, etc : var arrayofids = []; (var = 0; < devid.length; i++) { arrayofids.push(devid[i].attrs.id); } popupdelete(this.attrs.id...

sql - Using pivot on multiple columns of an Oracle row -

i have following sample data in oracle table ( tab1 ) , trying convert rows columns. know how use oracle pivot on 1 column. possible apply multiple columns? sample data: type weight height 50 10 60 12 b 40 8 c 30 15 my intended output: a-count b-count c-count a-weight b-weight c-weight a-height b-height c-height 2 1 1 110 40 30 22 8 15 what can do: with t (select type, weight tab1 ) select * t pivot ( count(type) type in (a, b, c, d,e,f) ) the above query gives me below result a b c 2 1 1 i can replace count(*) sum(weight) or sum(height) pivot height or weight. looking do, can't do, pivot on 3 (count, weight , height) in 1 query. can done using pivot? as the documentation shows , can have multiple aggregate function clauses. can this: select * ( select * tab1 ) pivot ( count(type) ct, sum(weight) wt, sum(height) ht type in (...

jquery - Hide and Show one Record at Time -

i fetch of records , display each article 1 after other. off start last section#rest_of_profile hidden when user selects a#view_full_profile in first section want show 1 section in article not of them in each article. haven't been able find solution yet. closest have gotten showing them hiding 1 want show. appreciate help/advice can give. var allrecords = $('section#rest_of_profile').hide(); $('a#view_full_profile').click(function(){ allrecords.slideup(); $(this).parent().next().slidedown(); return false; }); <article class="searched-record"> <section> <figure> <img src="http://digitalhumanlibrary.com/wp-content/themes/thematicchild/images/profile/anonymous-search-profile.png" alt="member profile avatar"> </figure> <nav class="member-social"> <ul> <li><a href=""><span>&#102 ...

ios - Printing photo from URL using UIPrintInteractionController clips parts of my photo -

i'm trying photo printed through uiprintinteractioncontroller. should print 4x6, , does, clips parts of photo (not of it, half inch on both directions). i'm printing directly url, , final pixel size of image 600 x 900 px. does apple have specific pixel size expects images print 4x6 perfectly? know it? doing wrong? code: nsurl *imageurl = [nsurl urlwithstring:urlofimage]; nsdata *data = [nsdata datawithcontentsofurl:imageurl]; uiimage *imagetoprint = [[uiimage alloc] initwithdata:data]; uiprintinteractioncontroller *controller = [uiprintinteractioncontroller sharedprintcontroller]; if(!controller){ nslog(@"couldn't shared uiprintinteractioncontroller!"); return; } controller.delegate = self; // need completion handler block printing. uiprintinteractioncompletionhandler completionhandler = ^(uiprintinteractioncontroller *printcontroller, bool completed, nserror *error) { if(completed && error) nslog(@"failed! due er...

c# - Comparing values of rows...row by row? -

i have small query joins temp tables such select u.batch_uid, u.user_id, u.firstname, u.middlename, u.lastname, u.email, u.student_id, u.row_status, uff.batch_uid, uff.user_id, uff.firstname,uff.middlename,uff.lastname,uff.email, uff.student_id,uff.row_status users u full outer join users_feed_file uff on u.user_id = uff.user_id u.data_src_pk1 = 83 the results example this: (users u) batch_uid user_name row_status (users_feed_file uff) batch_uid user_name row_status johndoe johndoe 2 johndoe johndoe 0 because, first 3 columns come source table being replicated live table. last 3 columns come feed file gets processed , inserted temp table , dropped after run time completed(and re-loaded later new data). what i'm trying accomplish looking @ rows perform various operations. i'm going checking 25,000 rows. in case, i'd check like if u.batch_uid, u.user_name, u.row_status not null , uff.uid, uff.user...

javascript - failed to use data-name to match array although it should match -

i have list, data-name attached matches value of list example <li data-name="hello">hello</li> i push several parameters array example var array =[]; array[0] = a:hello b:goodbye c:seeyou so right want 1) click on li retrieve data-name value "hello" 2) check "hello" against array element "hello" 3) if match, index position , delete index array (as value "hello" in called out element in array, why want detect exact index in array contain element "hello" when clicked on , remove when press delete) this code used match found = $.inarray($(this).attr("data-name"), array); which placed in $(".li").click(function(){ alert("data name " + $(this).attr("data-name")); found = $.inarray($(this).attr("data-name"), array); alert(found); alert("name of element " + array.a); ...

javascript - Strange undefined jquery error -

i trying itterate trough jquery array, , having error script causing error is: $.each(amount, function (key, value) { console.info('>>> selected line: '+value.value + " " + value.currency); if ((value.currency == currency) && (value.value == val)) { amount.splice(key,1); console.info('deleted: [' + value.value + " " + value.currency+ "] line "+ key); } }); the error firebug throws is: typeerror: value undefined could point me error or how fix error? the issue .splice() . when remove item 0, moves spot, no longer have item 1. generally speaking, can't remove items list you're enumerating (unless taking steps adjust current index when adding or removing items, but.. yuck). i recommend using filter function grep instead: http://jsfiddle.net/dnn4a/ var newarr = $.grep(amount, function(item, idx) { return item.currency == currency || item.value == val; }, true)...

InstallShield Reponse File missing a response -

i trying automate install of few setup files (.exe). managed 1 working without issue having difficulty second. i created response files using following in command prompt: myprogram.exe -r this generated "setup.exe" file in c:\windows expect to. here example of file looks in notepad: [{product_guid}-dlgorder] dlg0={product_guid}-sdwelcome-0 count=5 dlg1={product_guid}-sdlicense-0 dlg2={product_guid}-sdaskdestpath-0 dlg3={product_guid}-sdselectfolder-0 dlg4={product_guid}-sdstartcopy-0 [{product_guid}-sdwelcome-0] result=1 [{product_guid}-sdlicense-0] result=1 [{product_guid}-sdaskdestpath-0] szdir=c:\example\ result=1 [{product_guid}-sdselectfolder-0] szfolder=example\folder result=1 [{product_guid}-sdstartcopy-0] result=1 i run install setup.iss (response file) using command: program.exe /s /f1.\setup.iss the responses seem work except one. program opens dialog asking me select pair of radio buttons select language manual want install. want default hit ...

jquery - How do I dynamically load tinymce editors in a wordpress plugin? -

i have searched lot , found many answers question, none of them seem work me. i making wordpress plugin. when go add/edit page/post there new metabox 2 buttons. 1 deleting editors have been created, works fine. other allows create new editors through bit of jquery , php. issue here html created wp_editor being created , added page fine, tinymce never takes effect. understand because scripts need re-initiated , such, no solution have come across has fixed issue. here php used generate editor html. $blocks = get_post_meta( $post_id, '_mbp-blocks', true ); $id = sanitize_title( $name ); $box_html = ""; if( ! is_array( $blocks ) ) $blocks = array(); $blocks[ $id ] = array( 'name' => $name, 'type' => 'editor' ); update_post_meta( $post_id, '_mbp-blocks', $blocks ); $box_html .= '<div id="block_'.$id.'">'; $box_html .= '<p...

javascript - Send Form fields to jquery -

i'm trying pass form fields, ajax function insert user database. but reason, alert (in js file) isn't showing anything. any ideas i'm doing wrong? my html: <form id="signupform"> <input id="signupformemail" type="text" name="email" placeholder=" e-mail"><br /> <input id="signupformpassword" type="text" name="password" placeholder=" password"><br /> <input id="signupformusername" type="text" name="username" placeholder=" user name"><br /> <input id="submitsignup" type="button" value="sign up" onclick="signup(this);"> </form> my javascript file: function signup(elem) { var postdata = $(this).serializearray(); //$('#myresults').html(postdata); alert($.param($(elem).s...

javascript - Want to have browser viewport resize when iOS keyboard is activated -

in ios web browsers (safari, chrome, etc.), when click input field , keyboard displays, keeps viewport same size slides partially out of view. makes creating app-like websites difficult, i'm coding chatting app , when keyboard shows want keep conversation in view, resize conversation area fit in new "resized" viewable area. i've tried everything, such having conversation area absolutely positioned left: 0; right: 0; top: 0; bottom: 0 , still ios keeps viewport same size , pushes , partially out of view. is possible? or system-level functionality beyond control of css or javascript?

android - Links not working inside a WebView due to 'X-Frame-Options' set to 'SAMEORIGIN' -

i've got twitter timeline in webview displays well. followed this post guide. don't want entertain other options such twitter4j, although appreciate alternative. my problem can't click links, pictures, or otherwise interact timeline other scrolling , down. following error. way around this? 05-29 19:09:10.887: i/chromium(13226): [info:console(0)] "refused display 'https://mobile.twitter.com/xxxxxxxx/status/yyyyyyyyyy/photo/1' in frame because set 'x-frame-options' 'sameorigin'.", source: https://twitter.com/xxxxxxxx/status/yyyyyyyyyy/photo/1 (0) here's code: // locate webview in fragment_twitter.xml webview tweetwebview = (webview) v.findviewbyid(r.id.tweetwebview); // settings webview tweetwebview.setbackgroundcolor(0); tweetwebview.getsettings().setjavascriptenabled(true); tweetwebview.getsettings().setdomstorageenabled(true); // load webview imageurl string timelinewidget = "<a class=...

php - Docusign live account authentication using REST API not working -

Image
i new on docusign. have developed application using rest api on php language. in demo account working fine. in live account not working. error calling webservice , status 0. tried many way can't solve. please me. code authentication given below. $integratorkey = 'xxxxxx'; $email = 'xxxx'; $password = 'xxxx'; // construct authentication header: $header = "<docusigncredentials><username>" . $email . "</username><password>" . $password . "</password><integratorkey>" . $integratorkey . "</integratorkey></docusigncredentials>"; $url = "https://www.docusign.net/restapi/v2/login_information"; $curl = curl_init($url); curl_setopt($curl, curlopt_header, false); curl_setopt($curl, curlopt_returntransfer, true); curl_setopt($curl, curlopt_httpheader, array("x-docusign-authentication: $header")); $json_response = c...

c++ - Overloading operator<< for endl using templates -

i have class inherits ofstream . want overload insertion operator can drop in repalcement ofstream. the first overload is template<class t> myclass& myclass::operator<<(const t& in); and try , handle manipulators std::endl template< template<class, class> class outer, class inner1, class inner2 > myclass& myclass::operator<<(outer<inner1, inner2>& (*foo)(outer<inner1, inner2>&)); if try compile with: myclass output; output << 3 << "hi"; then works fine, when try add std::endl myclass output; output << 3 << "hi" << std::endl; temp.cpp: in function 'int main()': temp.cpp:10: error: no match 'operator<<' in '((stream*)ss. stream::operator<< [with t = int](((const int&)((const int*)(&3)))))->stream::operator<< [with t = char [3]](((const char (&)[3])"hi")) << std::endl' /usr...

html - IE 11 not displaying CSS padding correctly -

i'm no expert in css use here. entry page designed works fine in browsers except ie 11 (and possibly earlier ie versions). http://src.wpl.ca/ ie seems ignoring padding i've used shift "container" class down header , menu. i've done search on google , here can't seem find solution. css : html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video { margin: 0; padding: 0; border: 0; font-size: 100%; font: inherit; vertical-align: baseline; } /* html5 display-role reset older browsers */ article, aside, de...

url - Django permissions checks at urlconf level? -

i've got django app has it's own urlconf included main one. every page in app protected separate set of perms not granted normal users. think employees work view opposed users' profiles etc. i'm using classed based views, right i've got landing view's dispatch() checking perms, method i'm going have every view. isn't dry. so options see them are: create mixin checks permission manually check using dispatch() in each view somehow check @ url level is there way set permission requirement on entire url inclusion? have login_required() on. easy! from django.contrib.auth.decorators import login_required urlpatterns = patterns('', url(r'^foo/', login_required(include('foo.urls'))), ) update you want check user permissions, not user authentication. easy too: from django.contrib.auth.decorators import user_passes_test urlpatterns = patterns('', url(r'^foo/', user_passes_test(la...

mysql - How to pass variable from a database query to a PHP function -

get_population($row['id']) causing error variable undefined: foreach($filterlist $row) { echo '<tr>'; echo '<td>' . $row['county_id'] . '</td>'; echo '<td>' . get_population($row['id']) . '</td>'; echo '<td>' . $row['id'] . '</td>'; echo '</tr>'; } when use database value in function parameter error :undefined variable: must out of scope don't know how around it. if print $row['id'] shows value of 1 example. if hard code 1 parameter value works. when try pass $row['id'] function error. i sure simple answer chasing tail. thanks in code there's mismatch in ''.['id'].''; the correct $row['id']: foreach($filterlist $row) { echo '<tr>'; echo '<td>' . $row['county_id'] . '</td>'; echo '...

plot - Plotting intersection of multiple sets :MATLAB -

Image
this question has answer here: how visualize correlation matrix schemaball in matlab 5 answers i plot/visualize intersections of multiple sets in matlab. i found this : is there way in matlab or other way visualize intersection of multiple set? you have couple of options start from. can use oleg komarov's schemaball tool fex, or gunther struyf's code available on github taken using oleg komarov's schemaball code...

Is there a Variable Explorer for PyCharm -

Image
i changed spyder pycharm python ide. in spyder have used variable explorer feature (see picture). feature available in pycharm ? i found here , " variable explorer in python console (traff) " should included in pycharm 3 , cannot find that. maybe tell me how use tool. the variable list available in python console tools --> run python console... shown in screen shot below. similar functionality showing variables , watched variables available in debugger console.

javascript - Jquery Ajax working on localhost (xammp) but not working on Server (cpanel)? -

jquery ajax working fine on localhost (xammp) not working on server (cpanel) ! ajax javascript working fine , throught jquery has problem ! (on server) changed send method post problem same. this website : concert20.ir an js code: var arr=[]; function func1(id,status){ var str; var a=id.split('-'); // a[0] = chair number // a[1] = singer id // a[2] = place length=arr.length; if(status=='رزور شده') { // check resereved it? var index=jquery.inarray(parseint(a[0]), arr); if(index>=0) { // unreserved ... //arr[index]=-1; arr.splice(index, 1); length=arr.length; $.ajax({ url: 'serverreply.php', type: "get", data: ({reservefunc:0,chairnum:a[0],singerid:a[1],place:a[2]}), succe...

aggregation framework - MongoDB $match inside $cond -

consider following: db.stores.aggregate( { $project: { _id: 0, in_radius: { $cond: { if: <geowithinexpression>, then: 1, else: 0 } } } }) geowithinexpression actually: $match: { location: { $geowithin: { $center: [[lat, lon], radius] } } } i'm doing can use $group on result set counting number of stores in radius. (i'm using $project since want more custom columns 1 , return them in 1 time). is possible? this not possible number of reasons quite reasonable really. while see trying achieve, basic premise $match identifier pipeline stage in , therefore can used way. the second case here seem looking sort of "operator" return $geowithin type of result in logical (true/false) way used in $project or $group stage. falls on concept "geo-spatial" queries require index used, , reason place in aggregati...

sql - Find dates that are not on the first or last day of the month -

i have table named locations has column named effective_date many dates many years, , want retrieve not on first day of month or last day of month. if effective_date columns of type date , sql query return rows non-null effective_date value other 1st or last day of month: select t.effective_date , count(*) dbo.foo t 1 = 1 -- clarity -- after 1st day of month , t.effective_date > dateadd(day , 1-day( t.effective_date ) , t.effective_date ) -- , prior last day of month , t.effective_date < dateadd( day , -day( dateadd(month,1,t.effective_date) ) , dateadd(month,1,t.effective_date) ) if column carries time component it, is, of: datetime smalldatetime datetime2 datetimeoffset you'll want cover bases , modify query, like ...

c++ - RegOpenKeyEx access denied reading HKEY_LOCAL_MACHINE -

in windows 7 (32 bit), consistently error 5 (access denied) when call ::regopenkeyex on hkey_local_machine if not running in administrator mode. this code: result = ::regopenkeyex(hkey_local_machine, _t("software\\mycompany\\myapp"), 0, key_query_value, &keysoftware) i trying build app can installed entire machine opposed specific user. therefore installer (which run in administrator mode) writes hkey_local_machine, , installer works fine. i'd app able read data installer has put registry. don't want change of registry data. have tried using key_read , key_execute instead of key_query_value. seems no matter do, cannot read hkey_local_machine without using elevated status. missing here? your installer needs adjust security permissions on registry key non-admin users allowed access it. have @ regsetkeysecurity() , or installer's equivalent, or number of command-line tools available. can create dacl enables read-only access everyone user g...

ios - Retrieve content from PubNub messages -

i can send , receive messages pubnub, problem comes when try display content message , load uitableviewcell 's uitextview . the second test log writes out whole message, send iphone (i've tried dev console), after app crashes. [__nscfdictionary length]: unrecognized selector sent instance i know there wrong dictionary, can't figure out. i'm using 1 nsdictionary message send via pubnub , "arrives" console, therefore think works properly. can see in code i've tried variations, without success. update it's working if send nsstring instead of nsdictionary. @interface viewcontroller () @property (nonatomic, strong) nsstring *myincomemessage; @property (nonatomic, strong) nsstring *messagefromdict; @property (nonatomic, strong) nsarray *twochannels; @property (nonatomic, strong) nsdictionary *messagepbnb; //@property (nonatomic, strong) pnmessage *messagenew; @end @implementation viewcontroller - (void)viewdidload { [super viewdidload...

Call blockchain.info API with javascript or jQuery -

is possible call blockchain.info api javascript or jquery? i'm trying address info in json format with: https://blockchain.info/address/1nkmns4pan2hknkqffrclnokdr5vep324j?format=json or: https://blockchain.info/address/1nkmns4pan2hknkqffrclnokdr5vep324j?format=json&cors=true from i've read, should possible, i'm starting doubt now. know can use php script, proxy, or kind of yql hack, won't want. basically, i've been trying various different versions of this: <!doctype html> <html> <head> <title>blockchain.info api</title> <script src="http://code.jquery.com/jquery-1.10.1.min.js"></script> <script> $.getjson( "https://blockchain.info/address/1nkmns4pan2hknkqffrclnokdr5vep324j?format=json&cors=true", function( data ) { $.each(txs.hash, function(key, value){ $('#test').append(key+': '+value+'...

fork - PHP process forking with Pheanstalk -

i'm trying create php script runs in background , forks child processes. (i'm aware explode server; there safeguards in place outside scope of question) in nutshell, code works this: $pids = array(); $ok = true; while ($ok) { $job = $pheanstalk->watch('jobs')->ignore('default')->reserve(); echo 'reserved job #' . $job->getid(); $pids[$job->getid()] = pcntl_fork(); if(!$pids[$job->getid()]) { dostuff(); $pheanstalk->delete($job); exit(); } } the problem once fork process, error: reserved job #0 php fatal error: uncaught exception 'pheanstalk_exception_serverexception' message 'cannot delete job 0: not_found' my question is, how pheanstalk returned job no id , no payload? feels $pheanstalk damaged once fork it. if remove forking, works fine. (though has wait on each process) put if condition before delete pheanstalk job: if ($job) $pheanstalk->del...

Adding custom properties using the new Google Play Services drive api -

i add custom properties files , folders within android application. cannot find way using new google play services drive api. missing api? using "old" drive sdk in following way: private static property insertproperty( drive service, string fileid, string key, string value, string visibility) { property newproperty = new property(); newproperty.setkey(key); newproperty.setvalue(value); newproperty.setvisibility(visibility); try { return service.properties().insert(fileid, newproperty).execute(); } catch (ioexception e) { system.out.println("an error occurred: " + e); } return null; } i avoid mixing drive sdk , google play services drive api in app... at point android google drive api not support custom properties. currently these metadata options available through android google drive api: https://developer.android.com/reference/com/google/android/gms/drive/metadatachangeset.builder.html

android - Can't access In-App Products in Play Store -

i'm working on android app developed on titanium sdk 3.2.0.ga , i'm using in-app billing module appcelerator . my implementation of module it's follows (omitting functions purpose display log info): var identifierproduct = ''; var inappbilling = require('ti.inappbilling'); var publickey = alloy.globals.android.publickey_1 + alloy.globals.android.publickey_2 + alloy.globals.android.publickey_3 + alloy.globals.android.publickey_4; inappbilling.setpublickey(publickey); function initializebilling() { var synchronousresponse = inappbilling.checkbillingsupported(); displaysynchronousresponsecodes(synchronousresponse); } function requestpurchase(identifier, item_type) { // check if billing current product type supported before sending purchase request var checkbillingresponse = inappbilling.checkbillingsupported(item_type); if (checkbillingresponse.responsecode == inappbilling.result_ok) { ti.api.info('curre...

xmpp - xmppsream connection issue in iOS - Unable to authenticate with password -

i developing chat system in both ios. chat server using ejabbered server. using robbiehanson xmppframework ios chat client. the issue facing not able establish proper xmppstream between chat client , server. xmppstream state in state_xmpp_registering . holds value of 8. due this,when try authenticate created registered user, encountering exception "error authenticating: error domain=xmppstreamerrordomain code=1 "please wait until stream connected." userinfo=0x166c1e30 {nslocalizeddescription=please wait until stream connected.} but surprisingly, able register user using password. when try authenticate user, encountering exception due registered user not able appear online. i using connectwithtimeout connect xmppstream server nsstring *mypassword = @"password"; if (myjid == nil || mypassword == nil) { return no; } [xmppstream setmyjid:[xmppjid jidwithstring:myjid]]; password = mypassword; nserror *error = nil; if (![xmppstream connectwit...