Posts

Showing posts from July, 2014

ios - Getting issue in CGPath Scale -

i drawing polygon using cgpath , adding cashapelayer .i want scale cgpath when user click on it. know how scale cgpath . when click cgpath , cgpath drawing far centre while drawing polygon in centre. cgaffinetransform scaletransform = cgaffinetransformmakescale(scalefactor, scalefactor); cgpathref oldpath = polygonlayer.path; cgpathref scaledpath = cgpathcreatecopybytransformingpath(oldpath, &scaletransform); polygonlayer.path = scaledpath; the problem you're used uiview transformation, done center of view. cgpath transformation done on points (imagine cgpointzero center of path). solution: translate cgpointzero , scale , , original coordinates. cgpathref cgpath_ngcreatecopybyscalingpatharoundcentre(cgpathref path, const float scale) { cgrect bounding = cgpathgetpathboundingbox(path); cgpoint pathcenterpoint = cgpointmake(cgrectgetmidx(bounding), cgrectgetmidy(bounding)); cgaffinetransform translatea...

javascript - canvas:how to complete translate,skew,rotate...in just one transform statement? -

i studying 'transform' in recent days,and know how translate,rotate,skew,scale transform's matirx. if want actions above in 1 transform statement, how can do? ctx.transform(a,b,c,d,e,f); when want rotate transform, must post 4 arguments each 1 (a,b,c,d), ,if want rotate , scale, example, rotate 30 deg , scale (1.5,2), can transform done them @ same time? values of (a,b,c,d)? , how calculate them? and question: there order in transform? mean if use transform rotate , scale , translate, what's order between them? after all, order important, 'translate first,scale next' 'scale first,translate next', different results. this math done context.transform(a,b,c,d,e,f) when use single context.transform multiple operations (translate+scale+rotate) the translate done first. the scale , rotate done next (order of these not matter). this matrix math in javascript form: // a=0, b=1, c=2, d=3, e=4, f=5 // declare array hold our t...

php - Magento folder change -

i tried rename magento installed folder not load properly. before store in "demo" folder. @ time loaded nicely. renamed folder name time shows text while browsing website. have changed permission of "var" , "media" folder. how can make website visible templates. change base url backend or database in core_config_data table rename renamed folder. if change root folder name must updated manually things work correctly.

how to export kendo chart to JPG, PNG, BMP, GIF -

is there way export kendo chart jpg, png, bmp, gif.with format type selection using drop downlist. function createchart() { $("#chart").kendochart({ theme: $(document).data("kendoskin") || "default", title: { text: "internet users" }, legend: { position: "bottom" }, chartarea: { //it's important background not transparent proper exporting //of file types - noticeably jpeg background: "white" }, seriesdefaults: { type: "bar" }, series: [{ name: "world", data: [15.7, 16.7, 20, 23.5, 26.6] ...

linux - creating bash script that runs for every subsequent command -

suppose created own bash script command called customcmd i want if type in customcmd terminal, every subsequent commands following execute customcmd so suppose >customcmd >param1 >param2 >param3 i want equivalent of >customcmd >customcmd param1 >customcmd param2 >customcmd param3 ie. want executing customcmd once, won't have type in customcmd again , want have command line parse every single command type afterwards automatically parameters customcmd... how go achieving when writing bash script? if understand question correctly, i'd following: create script, eg mycommand.sh: #!/bin/bash while [[ 1 ]]; read _input echo $_input done initialize infinite loop for each iteration, user input ( whatever ) , run through command specify in while loop ( if script needs parse multiple arguments, can swap our echo function can handle ) hope helps!

jquery - How to insert variable into jqm pageshow function -

i'm not sure if possible i'm wondering how can pass page id pageshow function below. suspect wrong way go answer has alluded me. example passing page , appending page id in pageshow - #qanda_entry_1 or #qanda_entry_2 etc correspond series of pages in 1 document. updated: code per below dgs the page transition taking place there no update or rendering of page. data comes global variable 'articles_data'. can't see how value of 'article' in click function can passed new page? alert 'alert(article);' not being fired on pageshow. additionally - multipage document. $(document).on("click",".articlelink",function () { $(this).addclass('clicked_button'); var page = $(this).attr('data-page'); var article = $(this).attr('data-id'); //alert(article); $.mobile.changepage(page, { transition: 'slide', }); }); $('div[data-role="page"]').on('pageshow',function(){ var p...

windows installer - Wix v3.7 - Error Writing Registry Values -

i'm creating installer using wix , i'm having problems writing registry. here registryvalue element: <component id="cmp_odbcreg" guid="{115b002e-f4c9-48cd-8e1c-e8803b16ae69}"> <registryvalue id="rg_psql" root="hklm" key="software\odbc\odbcinst.ini\odbc drivers" name="postgresql" value="installed" type="string" keypath="yes" action="write"/> </component> nothing being written registry. component in main install feature, should write registry. looked @ log file , found this: msi (s) (60:1c) [00:00:07:080]: doing action: writeregistryvalues msi (s) (60:1c) [00:00:07:080]: note: 1: 2205 2: 3: actiontext action 0:00:07: writeregistryvalues. writing system registry values action star...

digital signature - Signing PDF with rsa_sha1 -

i'm trying sign pdf rsa_sha1(adobe.ppklite > adbe.x509.rsa_sha1), , have 2 problems/questions: don't know if actual pdf content specified byterange should signed, or digest value of content? is there difference if certificate placed before signature field, or after? i'm trying sign pdf rsa_sha1(adobe.ppklite > adbe.x509.rsa_sha1) are sure want use subfilter? further development concerning integrated pdf signatures makes use of integrated cms containers, not naked pkcs#1 signatures... don't know if actual pdf content specified byterange should signed, or digest value of content? in contrast adobe.pkcs7.sha1 style signatures , adobe.pkcs7.detached style signatures, whole byte range signed in adobe.x509.rsa_sha1 style signatures, not merely digest value of content. in respect adobe.x509.rsa_sha1 preferable adobe.pkcs7.sha1 because (despite appearance of sha1 in name) not force use sha1 can use better digest algorithms. (this b...

flicker - Image Flickering only in Firefox -

i have popop on page cross button image. when open popup first time fine. when close popup , open again, cross button image flickers. how can fix this. facing problem in firefox. there configuration settings need make? got issue. button click function written twice because of popup loading twice , image flickering happened.

perl - Writing (A && C) || (B && C) conditional shorter -

(e.g. in perl) when either condition or condition b have same consequence if (a){ # consequence x }elsif (b){ # consequence x } we can write if ( || b ) { # consequence x } how have following condition: either when , c true, or b , c true, consequence c follows. this can written long: if ( && c){ # consequence x } elsif (b && c ){ # consequence x } my question is, there way write shorter? this: if ( (a && c) || (b && c) ) is syntactically ok ??? yes. if ( && c){ # consequence x } elsif (b && c ){ # consequence x } is same as: if ( (a && c) || (b && c) ){ #consequence x } and avoids evaluating c twice: if ( (a || b) && c){ #consequence x } btw, more logical question, logic here isn't limited perl.

Create View view_Name in sqlite database using c#.net -

i using sqlite database c#. created 1 database having 1 table 26 columns. want create view while reading read view instead of query. i want create view because while reading database using sqliteadapter.fill() takes 5-6 sec gel entries fields. so if there other way reduce time or else how create view in c# sqlite.

ruby on rails 3 - Redmine: extend controller action in plugin -

need in plugin development. i've created hook in user/edit form view, added ballance_amount form , have "ballance_amount"=>"1" . how can extend default update action in user controller? in base.class_eval do i've added alias_method_chain :update, :ballance in instancemethods : def update_with_ballance ballance.amount = params[:user][:ballance_amount].to_f #i have ballance association end and this: nameerror (undefined local variable or method `params' #<user:0x007f972e9379d0>): app/controllers/users_controller.rb:144:in `update' how can fetch params? you should able make use of mass-assignment code in redmine itself. line 135 in userscontroller should handle provide simple entry point extension, if balance_amount considered safe_attribute . achieve that, add patch following user model: module redminebalanceplugin::userpatch def self.included(base) base.class_eval safe_attributes 'balance_am...

ruby on rails - Devise: Foreign key columns for roles in user_id -

i used rails composer create starter app rails project. using devise create , manage roles i have following roles user: recruiter, applicant user can 1 or both of [recruiter, applicant] i looked @ user model , doesnt have foreign key role_id column. added column myself,and i facing following issues 1] app assigns role_id=1 every user sign up 2] user both recruiter , applicant, there 2 roles in user column different ids [1 , 2] , how would/should model handled. this user model: class user < activerecord::base rolify # include default devise modules. others available are: # :token_authenticatable, :confirmable, # :lockable, :timeoutable , :omniauthable devise :database_authenticatable, :registerable, :recoverable, :rememberable, :trackable, :validatable # setup accessible (or protected) attributes model attr_accessible :role_ids, :as => :admin attr_accessible :name, :email, :password, :password_confirmation, :remember_me, :user_id, :role_i...

ios6 - iOS app submission: The App is using a private API: _tableView -

we have submitted app app store , apple send review note the app using private api: _tableview i have tested in code. not sure apple asking change. i used https://github.com/shiki/stableviewcontroller pull refresh. me please possible. the process of determining whether app uses private apis not simple might expect. it possible apple falsely identify app containing private api usage, when doesn't . this can happen if write code has naming conflicts code in apple frameworks. i'm wondering if apple process isn't getting stuck on in stableviewcontroller.h : @property (nonatomic, retain) uitableview *tableview; that's not best name (even though makes sense table view controller have tableview property), because uitableviewcontroller has property same name . you might try editing stableviewcontroller source code yourself, , renaming property ( e.g. stableview , or more unique): @property (nonatomic, retain) uitableview *stableview; ...

c# - Jquery Ajax call in asp.net Progress Bar update -

i doing jquery ajax call in asp.net, getting value database in textbox , on base of making jquery progressbar. getting value in textbox, not taking value of progress bar first time, have reload page value of progress bar. below code $(function () { getvalue(); var l_count= parseint($("#txtcount").val()); $("#sliderlicense").progressbar({ max: 100, value: l_count }); }); function getvalue() { $.ajax({ type: "post", url: "mypage.aspx/getcount", //url point webmethod contenttype: "application/json; charset=utf-8", datatype: "json", success: function (result) { $("#txtcount").val(result.d); }, error: function () { alert('error'); } }); } [system.web.services.webmethod()] public static string getc...

php - Facebook api post picture with message as a link on page wall -

is there way post on page wall picture message link works link post similar link published entering "@page_name" inside status box (with popup story info on mouse over)? mean: possible post photo (or video) link message? using "picture" or "thumbnail" parameters on link post shows small picture.

android - Parcelable no such file or directory -

hello have strange error when application write parcelable. with code : package com.android.edl; import java.io.ioexception; import org.xmlpull.v1.xmlserializer; import com.tools.edl.tools; import android.content.contentvalues; import android.database.cursor; import android.database.sqlite.sqlitedatabase; import android.os.parcel; import android.os.parcelable; public class elementdescription implements parcelable { private int id; private string naturetext = ""; private string usuretext = ""; private string fonctionnementtext = ""; private string etattext = ""; private tools tools = new tools(); private static string table = "edl_elementdescription"; public elementdescription (parcel in) { id = in.readint(); naturetext = in.readstring(); usuretext = in.readstring(); fonctionnementtext = in.readstring(); etattext = in.readstring(); } public elementdescription () { } public int update(sqlitedatabase db) ...

sql - recursive cte - mark all leafs -

i have recursive cte that's working fine, need 1 more thing: add [isleaf] flag each result, tell if record has more children ([leafs] field children counter better). working example pasted below. counts level of every category , joins names category path, sql server doesn't allow left join, top, select distinct, aggregates , subqueries used in recursive part of cte, obvious methods of doing need. drop table cats go create table cats( catid int primary key clustered, parent int, --parent's catid. 0 top-level entries name varchar(255) ) go insert cats (catid, parent, name) select 1 catid, 0 parent, 'computers' name union select 2, 1, 'laptops' union select 4, 2, 'ibm' union select 5, 2, 'others' union select 3, 1, 'desktops' union select 6, 3, 'amd' union select 7, 3, 'others' union select 8, 0 , 'cars' union select 9, 8, 'others...

iphone - Programmatically Request Access to Contacts -

Image
since updating ios 6 i've noticed code add contact iphone's address book no longer works. believe permission related problem, since apple requires user permission before accessing contacts (fixing this issue). i expected app automatically ask permission access contacts, in screenshot below, doesn't. trying add contact fails abaddressbookerrordomain error 1 . do need programmatically launch access contacts request dialog? how done? as per this documentation on apple's site (scroll down privacy in middle of page), access address book must granted before can access programmatically. here ended doing. #import <addressbookui/addressbookui.h> // request authorization address book abaddressbookref addressbookref = abaddressbookcreatewithoptions(null, null); if (abaddressbookgetauthorizationstatus() == kabauthorizationstatusnotdetermined) { abaddressbookrequestaccesswithcompletion(addressbookref, ^(bool granted, cferrorref error) { ...

c# - Save XML data to SQL Server table -

i have xml file, , want save value number (for example) sql server table. <order> <order_header> <number>10945</number> <time>7.8.2013 12:45:20</time> <note>this note</note> </order_header> </order> this code: xdocument doc = xdocument.load("c:\\users\\l\\desktop\\data.xml"); var number = doc.descendants("number"); var time = doc.descendants("time"); var note = doc.descendants("note"); foreach (var cislo in number) { sqlconnection conn = new sqlconnection("data source=***"); conn.open(); using (sqlcommand cmd = conn.createcommand()) { cmd.commandtext = "update cislo set cislo = @cislo1;"; cmd.parameters.addwithvalue("@cislo1", doc); cmd.executenonquery(); } } messagebox.show("ok"); i error: there no mapping object type system.xml.linq.xdocument known managed provid...

compare - NLP/Machine Learning text comparison -

i'm in process of developing program capability of comparing small text (say 250 characters) collection of similar texts (around 1000-2000 texts). the purpose evalute if text similar 1 or more texts in collection , if so, text in collection has retrievable id. each texts have unique id. there 2 ways i'd output be: option 1: text matched text b 90% similarity, text c 70% similarity, , on. option 2: text matched text d highest similarity i have read machine learning in school i'm not sure algorithm suits problem best or if should consider using nlp (not familiar subject). does have suggestion of algorithm use or can find nessecary literature solve problem? thanks contribution! it not seem machine learning problem, looking text similarity measure . once select one, sort data according achieved "scores". depending on texts, can use 1 of following metrics ( list wiki ) or define own: hamming distance levenshtein distance , damerau–lev...

xml - How to load source data in GroupDataModel for ListView in Blackberry 10 cascade? -

here line of code want load source: data xml file located in device shared folder. the path of xml file qfile textfile("/accounts/1000/shared/documents/mydata.xml"); my code is: import bb.cascades 1.0 import bb.data 1.0 page { content: listview { id: listview datamodel: datamodel ... } attachedobjects: [ groupdatamodel { id: datamodel }, datasource { id: datasource //--------------------------------------- //here want load xml file //--------------------------------------- source: "/accounts/1000/shared/documents/mydata.xml" //--------------------------------------- query: "/contacts/contact" ondataloaded: { datamodel.insertlist(data); } } ] oncreationcompleted: { datasource.load(); } } anyone please me, how load xml file in groupdatamodel located in above device directory location. thanks in advance. we have 2 parts : first 1 allowing ap...

c# - WCF Json Service giving 404 error message -

background i have wcf xml web service , need convert use json instead. hosted inside windows service (if matters @ all). problem i keep getting 404 status response. interface: [operationcontract] [webinvoke(bodystyle = webmessagebodystyle.wrapped, method = "post", requestformat = webmessageformat.json, responseformat = webmessageformat.json, uritemplate = "/search")] searchresponse search(requestinfo requestinfo); console app: using (var client = new webclient()) { client.headers["content-type"] = "application/json"; var request = new requestinfo { //etc }; using (var upstream = new memorystream()) { var serializer = new datacontractjsonserializer(typeof(requestinfo)); serializer.writeobject(upstream, request); byte[] responsebytes = client.uploaddata("http://localhost:8000/theservice.svc/search", "post", upstream.toarray()); using (var downs...

adding and removing trayicon in java? -

i want add icon system tray when window minimized , remove when maximized exception , can't solve it. exception in thread "awt-eventqueue-0" java.lang.illegalargumentexception: adding trayicon added. else if (e.getsource() == minimizebutton) setstate(islamicproject.iconified); { // test see if supports tray if (systemtray.issupported()) { //create tray tray = systemtray.getsystemtray(); image image = toolkit.getdefaulttoolkit().getimage("d:/art gallary 2008/islamic/forsan_03.gif"); //create menu items popupmenu popup = new popupmenu(); menuitem exitmenu = new menuitem("exit"); menuitem openmenu = new menuitem("open"); trayicon = new trayicon(image, "the tip text", popup); //add listeners of menu items listenforexitmenu exmu = new listenforexitmenu(); listenfo...

scala - Why java complains about jar files with lots of entries? -

i stumbled upon following problem - when create .jar file more 65k entries, java complains "invalid or corrupt jarfile". example: $ # in fresh dir $ in {1..70000}; touch $i; done $ jar cf app.jar {1..70000} $ java -jar app.jar error: invalid or corrupt jarfile app.jar but if use bit less files, works: $ jar cf app.jar {1..60000} $ java -jar app.jar no main manifest attribute, in app.jar i heard there 65k files limit in old .zip file format, java 7 should use zip64 default already. why happening? there way fix it? why happening? it's bug in java 1.7.0 (aka java 7) http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7191282 . fixed in java 1.7.0 p40 or later, apparently. is there way fix it? according bug report, workaround (for java 1.7.0) launch application without using -jar option. fwiw, there bug in javac s handling of zip64 format jar files: http://openjdk.5641.n7.nabble.com/javac-doesn-t-work-with-jar-files-with-64k-e...

backbone.js - How to deal with hide and show in backbone -

i have following html template. <script type="text/template" id="friend-request-list"> <div class="row-fluid"> <ul class="nav nav-stacked nav-pills"> <@ friendrequestcollection.each(function(user) { @> <li id="user-list-<@= user.get('username') @>"><a href="#"><@= user.get('firstname') @></a></li> <@ }); @> </ul> </div> this template shown in following pendingfriendrequest div, <ul class="nav pull-left"> <li> <div id="pendingfriendrequest" class="notired">${nbfriendrequest}</div><a href="#" class="notifriend"><i class="icon-eye-open icon-white"></i></a> </li> </ul> the backbone code follows ...

Stop Animation Jquery -

i have side menu appears , disappears when hover on each item. when click on item, want animation stop. this animation on mouseover $('#navigation > li').hover( function() { $('a',$(this)).stop().animate({'marginleft':'-7px'},200); }, function () { $('a',$(this)).stop().animate({'marginleft':'-150px'},200); } ); this animation @ click of single item $("#navigation > li").click(function(){ $('a',$(this)).stop(); }); try it $("#navigation > li").click(function(){ $(this).children('a').stop(); });

Document root element "hibernate-configuration", must match DOCTYPE root "hibernate-mapping" -

in code im trying map person_details database. configuration file follows hibernate.cfg.xml <?xml version="1.0"?> <!doctype hibernate-mapping public "-//hibernate/hibernate mapping dtd 3.0//en" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> <hibernate-configuration> <session-factory> <property name="connection.url"> jdbc:mysql://localhost/test </property> <property name="connection.driver_class"> com.mysql.jdbc.driver </property> <property name="hibernate.connection.username"> root </property> <property name="connection.password"> gopal </property> <property name="connection.pool_size"> 1 </property> <property name="hibernate.dialect"> ...

php - How to build a multilevel menu from associative array. -

Image
please, need on one. want build multilevel menu, want iterate through associative array foreach loop inside smarty template. first, have mysql output: now try associative array it, tried fetchall(pdo::fetch_assoc) , because column names same, gives me values right column: array ( [0] => array ( [id] => 7 [name] => beta 1-3 glucan ) [1] => array ( [id] => 8 [name] => okinawa fucoidan ) please if have ideas how process table multidimentional menu, let me know. thank you. either use fetch_num or create aliases in query.

c# - Performance lag in scrollTo function for LongListSelector in WP8? -

to demonstrate problem here code behind code public partial class mainpage : phoneapplicationpage { observablecollection<abc> listtest = new observablecollection<abc>(); // constructor public mainpage() { initializecomponent(); (int = 0; < 50; i++) { abc conv = new abc(string.format("test:{0}", i)); listtest.add(conv); } testlls.itemssource = listtest; } private void button_tap_1(object sender, system.windows.input.gestureeventargs e) { testlls.scrollto(listtest[listtest.count - 1]); } private void titlepanel_tap_1(object sender, system.windows.input.gestureeventargs e) { stopwatch st = stopwatch.startnew(); testlls.scrollto(listtest[listtest.count - 1]); st.stop(); debug.writeline("tttt:", st.elapsedmilliseconds); } class abc { private string _name; public abc(string aa...

MDX Sum all values from one dimension hierarchy -

i´m new mdx. work team system cube team foundation server in visual studio business intelligence environment. questions sounds easy don´t know solution. 1) have field has datetime datatype. 1 dimension of field (hierarchy week) use show calendar weeks in report. have second field has integer datatype (it´s measure). created datasets , looks @ moment: week 1: 50 week 2: 34 week 3: 46 ... week n: nn i understand allocation of values in second field , depending of values on dimension. requirement, sounds quite simple: need sum of field values following table: week1: 200 (54+34+46+...) week2: 190 week3: 186 if try sum there no changes. iif(isempty([measures].[remainingworkproductbacklogitem]) or not mid([work item]. [plannedweek__hierarchybyweek].currentmember.uniquename,58,10) <= format(now(), "yyyy-mm-dd"), sum( [measures].[remainingworkproductbacklogitem]),null) (the mid function shows actual values, shouldn´t play role here.) i tried ytd func...

javascript - Unable to set focus to text box after custom popup -

i'm showing fancy box message , after message i'm trying set focus textbox.but not working here html code <a class="fancytrigger" href="#thefancybox"></a> <hr> <div id="thefancybox"></div> powered <a href="http://fancybox.net/" target="_blank">fancybox</a> <input id="ipt" type="textbox" /> javascript code $("#thefancybox").html("<p>just adding paragraph demonstrate can dynamically create html content within div using .html()</p>"); $(".fancytrigger").fancybox(); $(".fancytrigger").trigger('click'); $('#ipt').focus(); and here demo jsfiddle this work fancybox 2.0. $(".fancytrigger").fancybox({ aftershow : function() { $('#ipt').focus() }, afterclose : function() { $('#ipt').focus() } });

javascript - How to check state onKeypress -

i have simpy question.. how can take state key (keydown, keyup) in onkeypress in javascript? document.onkeypress = function() { console.log(/* state (down or sometihn this*/) } and if have 2 functions? (up , down) document.getelementbyid('my').onkeydown = function() { alert('down'); } document.getelementbyid('my').onkeyup = function() { alert('up'); }

validation - Where the list of all toolbar button names and group names available in CKEditor 4? -

this question similar what toolbar buttons available in ckeditor 4? , reinforce of old other one . add here perceptions , personal difficulties faced. the ckeditor documentation good, pulverized , "incomplete" javascript programmers (first-time ckeditor deployer), because "stops in middle"... examples: if need removebuttons , need list of valid names . if need customize — source-code, changing array elements —, need not clues , examples here , full list of valid names, syntax rules, context exceptions, , perhaps list of "official plugin names". question: there command (a simple alert(debug) ) or documented list of possible names? (or controled , registered plugin-names, group-names, etc.) ... ckeditor4 promoted (the best of best!) "plug , play" editor, but, programmers, false, without proper "managing controlled-names" support. note: config.js need reference valid names , , no documentation show list of valid nam...

MAMP Mysql Error - Failed to open log -

i've been working mamp installation several weeks now, , when started today not start. no mysql process running checked error log shows following when start server: 130826 14:19:55 mysqld_safe starting mysqld daemon databases /applications/mamp/db/mysql 130826 14:19:55 [warning] have forced lower_case_table_names 0 through command-line option, though file system '/applications/mamp/db/mysql/' case insensitive. means can corrupt myisam table accessing different cases. should consider changing lower_case_table_names 1 or 2 130826 14:19:55 [warning] 1 can use --user switch if running root 130826 14:19:55 [note] plugin 'federated' disabled. 130826 14:19:55 innodb: innodb memory heap disabled 130826 14:19:55 innodb: mutexes , rw_locks use gcc atomic builtins 130826 14:19:55 innodb: compressed tables use zlib 1.2.3 130826 14:19:55 innodb: initializing buffer pool, size = 128.0m 130826 14:19:55 innodb: completed initialization of buffer pool 130826 14:19:55 innodb:...

wpf - WP8: can't bind string -

i'm new wp development. i'm trying use strings saved in appresources.resx default comments generated visual studio says, have replace hard-coded text between quotes in value text of textblock text="{binding path=localizedresources.applicationtitle, source={staticresource localizedstrings}}" this don't show error, if try change value of string in file, don't change in preview of page. also i've tried create new string if try display value, nothing happens. i don't declared supported languages, created new project , tried do this. any ideas? missing? just build , run app, , strings appear in app , designer afterwards

ember.js - Emberjs conditional output in a template with handlebars -

i got following models: community name, members , moderators(both users). users, have id , name. in communitymembers template want show users, , if user moderator, want add saying he's moderator <script type="text/x-handlebars" data-template-name="communitymembers"> //model contains array of users in community {{#each user in model}} <li>{{user.name}}</li> {{#each moderator in controllers.community.moderators}} //here problem--> {{#if moderator.id == user.id}} <b>this moderator</b> {{/if}} {{/each}} {{/each}} </script> i know in handlebars can't use moderator.id==user.id it's easy way want do. i tried write handlebars helper when checked in helper argument got string saying: "moderator.id" or "user.id" didn't work. i tried method in community-object: app.community = ember.object.extend({ ismoderator: function(community, user_id){ ...

mfc - How to disallow tab key to switch focus between edit control and button within dialog box? -

i have dialog box having buttons , edit box. when edit control have focus if press tab key moves , focus button. wanted tab key work in such way not switch focus instead should work tab input inside edit control i.e. input edit box keys. the solution simple, , consists of handling wm_getdlgcode message. allows control implementation fine-tune keyboard handling (among other things). in mfc means: derive custom control class cedit . add on_wm_getdlgcode message handler macro message map. implement ongetdlgcode member function, adds dlgc_wanttab flag return value. subclass dialog's control, e.g. using ddx_control function. header file: class myedit : public cedit { protected: declare_message_map() public: afx_msg uint ongetdlgcode(); }; implementation file: begin_message_map(myedit, cedit) on_wm_getdlgcode() end_message_map uint myedit::ongetdlgcode() { uint value{ cedit::ongetdlgcore() }; value |= dlgc_wanttab; return valu...

Defining a global filter/transformer in Polymer.dart -

is there way define global transformer available in custom elements? i'm not aware of global way define transformer, use following workaround: have class containing global transformers, included custom elements using mixin. put library include every element. global transformer mixin: abstract class globaltransformersmixin extends object implements observable { @observable final transformer asinteger = new _stringtoint(); //... } using in custom element: @customtag('my-elment') class myelement extends polymerelement globaltransformersmixin { //... }

socket.io issue using sails.js -

i trying use socket.io sails js. understood pretty straighforward , sails provided available socket.io structure out of box. howeve when try connect sails server distant client using io.connect(http://localhost:1337) it makes server crash message: /node_modules/express/node_modules/connect/lib/utils.js:216 return 0 == str.indexof('s:') ^ typeerror: cannot call method 'indexof' of undefined i missing don't understand what.... clue this? thanks ! looks you're missing quotes in io.connect() call, can't imagine client app wouldn't throw syntax error if code written that. verify you've got: io.connect('http://localhost:1337');

jQuery mobile - get response of latest pageload -

i have website jquery mobile , following problem: in website link data-redirecturi attribute outside of data-role="content" area. value of data-dash never changed because of this. want update value on each pageload jquery mobile framework. there way retrieve latest ajax response pageload/change event?

c# - An unhandled exception occured in TabView in Xamarin Android in VS2012 -

**an unhandled exception occurred in tab view in xamarin android in vs2012** **this layout main.axml** i have no knowledge tab view implement in xamarin using c# , use vs2012 please me error occurred when run application in android emulator in visual studio alert box unhandled exception <?xml version="1.0" encoding="utf-8"?> <tabhost xmlns:android="http://schemas.android.com/apk/res/android" android:id="@android:id/tabhost" android:layout_width="fill_parent" android:layout_height="fill_parent"> <linearlayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" android:padding="5dp"> <tabwidget android:id="@android:id/tabs" android:layout_width="fill_parent...