Posts

knockout.js - Knockout binding works in text attribute but throws undefined error when used in href -

i have following binding within foreach binding: <h5>id: <span data-bind="text: ($root.link + id)"/></h5> and displays fine. if change out <a data-bind="attr: { href: $root.link}"/> the anchor navigates fine (except id isn't appended end). if add in id <a data-bind="attr: { href: $root.link +id}"/> i 'unable parse binding ... id undefined'. why exact same binding syntax work text not attr binding? thanks help. update: using breezejs uses metadata create observablearray . i've have done more testing , discovered binding fails when field of type integer . passed in name field , binding works fine. tried id.tostring() still id undefined error. suggested below, considering using computed solve problem. if solution, think better extend breeze entity flows through downstream view model. you need computed observable called linkurl. self.linkurl = ko.computed(function(){ ...

c++ - Does a tlb file have an associated architecture? -

i have 32bit dll designed accessed through com model , associated tlb file. the dll appears x86. is there way access kind of dll x64 program? tlb files x86/x64 agnostic? i asking because functions appear work, others crash, , o̶t̶h̶e̶r̶s̶ ̶a̶r̶e̶ ̶m̶i̶s̶s̶i̶n̶g̶ ̶c̶o̶m̶p̶a̶r̶e̶d̶ ̶t̶o̶ ̶t̶h̶e̶ ̶.̶n̶e̶t̶ ̶a̶s̶s̶e̶m̶b̶l̶i̶e̶s̶ . --edit-- missing assemblies appear due error on part of oem. type libraries intended platform agnostic in cases. 1 you'd encounter in windows programming shipped microsoft are. visible in .net makes simple write code can run in either 32-bit or 64-bit mode, exposed anycpu platform target. nothing special needed either use interop classes in microsoft.office.interop or write extensions run inside office program, use exact same type libraries. but doesn't work out when use type library created programmer never considered work on 64-bit code. typical trouble caused method arguments pointers under hood flattened integral type, lon...

security - Data Encryption With breeze -

make quick: going publish our web site soon, our task provide live scores, , paying money live result fast possible. we not force user log-in see latest result, don't calling url , result our web site currently using breeze , happy , it's functionality ((hello ward)) want encrypt data on server , decrypt on client. know it's not efficient it's enough (just makes hard) , know can use hand made js handle situation, lost breeze + knockout functionality if encrypt server response (json) , other thing can encrypt data (column column) not killing me encrypt on server , decrypt on client (i hope not in bio-direction) i'm looking cleaner hide complication , allow me not think it. (in nutshell: not bank, when hit url: xxxxx/breeze/api/soccer not human readable result (and 1 step head of base64, don't call encryption or security)) if understand correctly, want hits raw api believe data encrypted. client app know better , "decrypt" readable ...

asp.net - compare 2 string to get result different -

i doing method able return me different between data before , data after dim databefore string = "name:alice,age:30,sex:male" dim dataafter string = "name:alice,age:20,sex:female" mtdcompare2string(databefore,dataafter) public shared function mtdcompare2string(byval sbefore string, byval safter string) string //what try before, supposing loop should start on here failed, //so removed loop, need correct me =( dim intbefore integer = sbefore.indexof(",") dim intafter integer = safter.indexof(",") dim sbefore string = sbefore.substring(0,intbefore) dim safter string = safter.substring(safter.indexof(":"),intafter) dim sb stringbuilder sb.append(sbefore,safter) return sb.tostring end function expected result age:30>20,sex:male>female something should work: public shared function mtdcompare2string(byval sbefore string, byval safter string) string 'what try before, supposing loop should sta...

ruby on rails - Archiving Data in Different Application -

how can make archive system of app separate app , database? app1 app 2 (archive system, same app different database) passing database give more space app1. app2 viewing. this answer has suggestions: rails, how migrate data development sqlite3 database production mysql database? rake db:schema:dump / db:schema:load allow re-use current schema, , yamldb gem discussed in above link should migrate data.

php - node.js sending POST requests not working -

i'm trying send post request not sending. dont output in console log of browser. my node server.js running in x.x.x.x:8000 connect client.html. x.x.x.x:8000/client.html here node.js server. function handler (req, res) { var filepath = '.' + req.url; if (filepath == './') filepath = './client.html'; var extname = path.extname(filepath); var contenttype = 'text/html'; switch(extname){ case '.js': contenttype = 'text/javascript'; break; case '.css': contenttype = 'text/css'; break; } path.exists(filepath, function (exists){ if (exists){ fs.readfile(filepath, function(error, content){ if(error){ res.writehead(500); res.end(); } else{ res.writehead(200, { 'content-type': contenttype }); ...

ios - Why won't MFMailComposeViewController dismiss during in-app email? -

i working on ipad app creates pdf user emails in app. have been able setup email attach pdf, cannot mfmailcomposeviewcontroller dismiss. have read through several other questions on issue , attempted mimic doing, mail composer still not dismiss. need change in code dismiss? - (ibaction)submitdailyreportbutton:(id)sender { mfmailcomposeviewcontroller *mail = [[mfmailcomposeviewcontroller alloc]init]; [mail setmailcomposedelegate:self]; if ([mfmailcomposeviewcontroller cansendmail]) { nsstring *email =@"admin@domain.com"; nsarray *emailarray = [[nsarray alloc]initwithobjects:email,nil]; [mail settorecipients:emailarray]; [mail setsubject:@"daily report"]; nsarray *paths = nssearchpathfordirectoriesindomains(nsdocumentdirectory, nsuserdomainmask, yes); nsstring *newfilepath = [[paths objectatindex:0]stringbyappendingpathcomponent:@"report.pdf"]; nsdata *pdfdata = [nsdata datawithcontentsoffile:newfilepath]; [ma...