Posts

objective c - NSURLConnection not return data -

i have nsurlconnection has been working while , of sudden not working. for reason, delegate method gets called is: -(void)connection:(nsurlconnection *)connection didreceiveresponse: none of other delegate methods called. have other classes uses pretty same code, different request , url , seem work fine. have read alot of post talk making sure connection on same thread delegate etc nothing seems work me. know server returning response because if pass same information through simple html form response in browser, , can see evidence server side script running because can see changes making in sql data. , app getting sort of resonse, not getting data or calling connectiondidfinishloading delegate method. any ideas of problem might be? here simplified version on code: #import "registrationviewcontroller.h" @interface registrationviewcontroller () @end nsmutabledata *responsedata; nsurlconnection *theconnection; @implementation registrationviewcontroller /* *...

Play base64 audio string from Azure Blob service REST api with Javascript/Phonegap -

im having trouble playing audio file (.aac) stored bae64 encoded string in azure blob storage javascript. i have following scenario: a mobile app (phonegap) records audio .aac file , stores in localstorage. file same small (<250kb) the file get's converted base64 encoded string , uploaded blob storage account through jquery ajax call (see upload_code) below using blob service rest api. see this page details on blob service rest api. when download file manually through browser can see base64 encoded string starts witch "data:application/octet-stream;base64,aaaa....." upload_code snippet: $.ajax({ url: url, type: "put", data: requestdata, processdata: false, beforesend: function (xhr) { xhr.setrequestheader('x-ms-blob-type', 'blockblob'); }, trycount: 0, retrylimit: number_of_retries, success: successcallback, error...

QuickBooks PHP DevKit connection errors -

i've been trying sync qb-web connector keep receiving errors: the first was: 'fatal error: class 'quickbooks_loader' not found', fixed adding including file location @ top of page: include_once("$_server[document_root]/qb/quickbooks/loader.php"); now getting following error web-connector: qbwc1012: authentication failed due following error message. client found response content type of 'text/html', expected 'text/xml'. request failed empty response. see qwclog more details. remember turn logging on. i checked files sure content type text/xml, still no dice. please help. <?php /** * example of generating quickbooks *.qwc files * * @author keith palmer <keith@consolibyte.com> * * @package quickbooks * @subpackage documentation */ // error reporting... error_reporting(e_all | e_strict); ini_set('display_errors', 1); /** * require utilities class */ require_once '../quickbooks.php...

c# - How to solve issue "Could not translate expression ...into SQL and could not treat it as a local expression." -

this question has answer here: linq “could not translate expression… sql , not treat local expression.” 3 answers i have code below: void main() { var q = in applicants where(a.claims.any()) select a.claims.sum(c => c.totalclaimamount()); q.dump(); } public static class myext { public static decimal totalclaimamount(this claim c) { var t = c.accommodations.sum(a => a.amountclaimed) + c.mealallowances.sum(ma => ma.amountclaimed) + c.meals.sum(m => m.amountclaimed) + c.mileages.sum(mi => mi.amountclaimed) + c.others.sum(o => o.amountclaimed) + c.parkingtransits.sum(pt => pt.amountclaimed) + c.travels.sum(tr => tr.amountclaimed); return (decimal)t; } } when run in l...

Graphite Network interface monitoring -

i'm trying monitor network usage graphite can't figure out how this, me please? in addition this, monitor other services, nginx, mysql, etc,.. thanks help! best. ofcourse there multiple solutions possible. solution i'm using collectd . collectd can collect statistic data plugins in rrd files. has lot of plugins network, nginx , mysql. not generate graphs itself, there multiple ways generate graphs. 1 of them send collected data graphite graphite plugin .

javascript - Can't .push() sub-document into Mongoose array -

i have mongoosejs schema parent document references set of sub-documents: var parentschema = mongoose.schema({ items : [{ type: mongoose.schema.types.objectid, ref: 'item', required: true }], ... }); for testing i'd populate item array on parent document dummy values, without saving them mongodb: var itemmodel = mongoose.model('item', itemschema); var item = new itemmodel(); item.blah = "test data"; however when try push object array, _id stored: parent.items.push(item); console.log("...parent.items[0]: " + parent.items[0]); console.log("...parent.items[0].blah: " + parent.items[0].blah); outputs: ...parent.items[0]: 52f2bb7fb03dc60000000005 ...parent.items[0].blah: undefined can equivalent of `.populate('items') somehow? (ie: way populate array when reading document out of mongodb) within question details own investigation shows pushing document can find it's _id value. not actual problem...

asp.net - Add multiple dynamic classes to LinkButton in a ListView -

i trying add multiple classes linkbutton in listview. this works: <asp:linkbutton id="lbattendee" runat="server" cssclass='checkedintrue attendee'> and works: <asp:linkbutton id="lbattendee" runat="server" cssclass='<%#eval("checkedin") %>'> but does not <asp:linkbutton id="lbattendee" runat="server" cssclass='checkedin<%#eval("checkedin") %> attendee'> when 3rd way, class rendered literally, this: <a id="lvattendees_ctrl1_lbattendee" class="checkedin<%#eval("checkedin") %> attendee" href="javascript:__dopostback('lvattendees$ctrl1$lbattendee','')"> <span style="display:none;">2</span> <p class="studentname">joseph conrad</p> <p class="studentid">13526861</p> ...