Posts

Uppercase "a"'s inside a Meteor template -

how can uppercase small a's inside meteor template after rendering? what tried: meteor's liverange object has visit() method. can access rendered dom nodes of template. each dom text node modify data in visitor. however! how liverange object template?? in callback rendered() template this template instance. has liverange object in member called _spark_keezuqtoktbuqw3xw or such. looks meteor disliking access member. how can liverange object of template in way pleases meteor gods? and before ask why such stupid thing uppercasing "a"'s: it's complicated. execute search-and-replace on dom text nodes in template, because trying apply cross-cutting concern several templates in meteor application. do have constraints on a's within template? for example, how you'd uppercase a's within spans in template: template.complicated.rendered = function() { this.findall('span').each(function(idx, element) { $...

kendo ui - LoadContentFrom with dynamic route value -

is possible specify dynamic route value in kendo ui tabstrip loadcontentfrom(string actionname, string controllername, object routevalues) method? want embed tabstrip page show different customers , change customer data (including id) via ajax. mean tabstrip works first customer. @code html.kendo().tabstrip() _ .name("tabstrip") _ .items(sub(tabstrip) tabstrip.add().text("tasks") _ .selected(true) _ .loadcontentfrom("list", "task", new {.customerid = model.customerid}) tabstrip.add().text("contacts") _ .loadcontentfrom("list", "contact", new {.contactid = model.customerid}) _ .render() end code

Quartz.net with MVC -

i initializing quartz inside application_start() in globals.asax.cs followed: // construct scheduler factory ischedulerfactory schedfact = new stdschedulerfactory(); ischeduler sched = schedfact.getscheduler(); sched.start(); ijobdetail dailyusermailjob = new jobdetailimpl("dailyusermailjob", null, typeof(dailyusermail)); // fire every daye itrigger dailyusermailtrigger = new simpletriggerimpl("dailyusermailtrigger", 1, new timespan(1, 0, 0, 0)); sched.schedulejob(dailyusermailjob, dailyusermailtrigger); the job should run once day, problem is, runs everytime hit website. any ideas ? the job should run once day then shouldn't launched web application. should console application that's run on scheduler, or perhaps windows service. a web application is, design, request/response system. it's not suited ongoing background tas...

sql server - SQL IN clause causes scan on too many parameters -

i'm having trouble understanding result of query here: http://pastebin.com/sgvnq1ju . it works intended, whenever t2.cityid in (...) clause of clusters cte expression reaches more 6 values match, execution plan changes including expensive table scan, , query gets slow. any ideas on why might be? try avoiding in clause in favor of join on cte table constructed parameter values in clause (below) additionally, make sure have index on map.clusterdist.cityid column. declare @cityids0 int, @cityids1 int, @cityids2 int, @cityids3 int, @cityids4 int, @cityids5 int, @cityids6 int, @cityids7 int select @cityids0 = 0, @cityids1 = 1, @cityids2 = 2, @cityids3 = 3, @cityids4 = 4, @cityids5 = 5, @cityids6 = 6, @cityids7 = 7 ;with cities ( select @cityids0 [cityid] union select @cityids1 union select @cityids2 union select @cityids3 union select @cityids4 union select @cityids5 union select @cityids6 union select @cityids7 ), clust...

iOS - Curved Rounded UITextfield -

i need have textfield in app curved, able pre-define path. i have textfield in storyboard, , when button tapped, text field needs appear in, curved. how achieve curved part, making textfield round , text curve entered? thanks, ari you need write hefty chunk of core text code + code calculate curve geometry navigates writing along path. here on/offline resources: eva diaz-santana, core text tutorial http://weblog.invasivecode.com/core-text rob napier, ios6 pushing limits (chapter 26, fancy text layout) http://iosptl.com/ apple, coretextarccocoa (sample code) http://developer.apple.com/library/mac/#samplecode/coretextarccocoa/introduction/intro.html erica sadun, advanced ios6 developer's cookbook (chapter 3, core text , chapter 4, geometry - see recipe 4.8, laying out text along bezier path) https://github.com/erica/ios-6-advanced-cookbook

javascript - How to split a string with letters and numbers into different variables using js? -

given following string: var mystring = "s1a174o10"; i have following result: var s = 1; var = 174; var o = 10; each letter on string matches following number. keep in mind string not static, here example: var mystring = "s1p5a100"; you can regex: var vars = {}; mystring.replace(/(\d+)(\d+)/g, function(_,k,v){ vars[k] = +v }); console.log(vars); //=> {s: 1, a: 174, o: 10}

ios - Exchange ActiveSync Objective-C Provision Command Bad Request -

i have spent days of trial , error, looked through exchange logs, , searched on internet , far unable resolve issue. i implementing activesync capabilities within ios app , far have coded autodiscover process , http options request server's capabilities. trying run provision command keep getting 400 bad request. here sending server: url: https://mobile.[myexchangeserver].com/microsoft-server-activesync?cmd=provision&user=jack&deviceid=123412341234&devicetype=ios authorization = "basic wekrju283j"; //base 64 encoded auth, garbage posting "content-length" = 104; "content-type" = "application/vnd.ms-sync.wbxml"; "ms-asprotocolversion" = "12.1"; "user-agent" = myapp; "x-ms-policykey" = 0; body (converted wbxml before sending): <?xml version="1.0" encoding="utf-8"?> <provision xmlns="provision:"> <policies> <policy> ...