Posts

javascript - whta is use of .Class method in ng.core.component in es5 -

var app = ng.core.component({ selector:'myapp', template:'<h1>helloworld</h1>' }). class( { constructor:function() } ); according angular2 quickstart guide: the class method implement component itself, giving properties , methods bind view , whatever behavior appropriate part of ui. ref: https://angular.io/docs/js/latest/quickstart.html#!#add-the-component-file

java - Android Studio can't open (port.lock access denied) -

when open android studio gives following error: java.io.filenotfoundexception: c:\users\hp\.androidstudio2.2\config\port.lock (access denied) the javac path correct , file has can access (port.lock) this full error message getting: java.io.filenotfoundexception: c:\users\hp\.androidstudio2.2\config\port.lock (access denied) @ java.io.fileoutputstream.open0(native method) @ java.io.fileoutputstream.open(fileoutputstream.java:270) @ java.io.fileoutputstream.<init>(fileoutputstream.java:213) @ com.intellij.idea.socketlock.underlocks(socketlock.java:186) @ com.intellij.idea.socketlock.lock(socketlock.java:128) @ com.intellij.idea.startuputil.locksystemfolders(startuputil.java:318) @ com.intellij.idea.startuputil.prepareandstart(startuputil.java:140) @ com.intellij.idea.mainimpl.start(mainimpl.java:34) @ sun.reflect.nativemethodaccessorimpl.invoke0(native method) @ sun.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl...

mysql - Conditionally add another column in query base on other query result -

i found solution add query column case when then same table depending on column value can't solve problem. i have 2 tables. table: pools id date title description ------ ---------- -------------- --------------------- 1 2016-11-10 pool 1 description table: votes id date time pool_id option_id uid ------ ---------- -------- ------- --------- ------------------------------ 1 2016-11-10 21:22:23 1 1 xodxfbferdzsofrnbj0aecmgpyo2 2 2016-11-10 21:22:23 1 2 phbz675xdzel59qfklqq8u1uqyg2 i want query output passing uid in query. id date title voted ------ ---------- -------------- --------------------- 1 2016-11-10 pool 1 yes you can left join 2 tables pools , votes . check if corresponding entry exists in votes, show yes else no. for better explanation, created 1 more ent...

bundling and minification - How can you bundle Angular 2 using System JS Builder? -

i'm using system js system js builder bundle application, assets, , libraries references. problem can bundle libraries referenced explicitly in index.html, e.g: <script src="node_modules/es6-shim/es6-shim.min.js"></script> <script src="node_modules/zone.js/dist/zone.js"></script> <script src="node_modules/reflect-metadata/reflect.js"></script> <script src="node_modules/systemjs/dist/system.src.js"></script> however, can't figure out how can bundle angular 2 itself, or @ least modules required angular 2, aren't referenced in html. how can done? using systemjs-builder can bundle angular 2 app code , bundle other libraries separately. i bundled library reference directly in html vendors.min.js, , library referenced through system.config.js plus app code app.min.js. in example can see dependencies in tour of heroes loaded page in <10 network requests ( source code ). ...

Android Studio gradle keeps on repeating already fixed error when building -

i'm frustrated now. created string resource in values.xml file <string name="details">the yadayadayada going great suspension , when comes, it's good. after long time</string> and after running app, had error error:(348) apostrophe not preceded \ (in yadada going great suspension , when comes, it's good. after long time) so preceded apostrophe '\' error still showing. i've deleted string resource when ever gradle builds, recreates resource again , gives me same error again. i've tried "invalidate cache/restart", i've tried deleting .gradle folder, used command gradlew --stop clean build but error still showing. don't know now. in advance i think modifying in generated file(has same name) instead of own res file. when click error opens generated file not right file.so go res folder , change same.

Boolean Formula Satisfiability - Solving with Minimum Amount of Variables Set to True -

i having trouble coming pseudocode solve boolean satisfiability problem using minimum amount of variables set true. i have method satisfiable number(h) can call obtain minimum number of variables needed set true in order boolean formula satisfiable. find-sat-min(f) { if (not sat(f)) return 0 l = {x | x variable in f}; s = {}; int truecount = 0; (x in l) { if (sat(f ^ x) && truecount < satisfiable number(f)) { s = s u {x}; f = f ^ x; truecount++; } else { s = s u {not x}; f = f ^ not x; } } return s; } here's current logic. please let me know if i'm on right track.

Access own Azure internal load balancer from backend server pool -

i have set internal load balancer (lb1) 1 server (srv1) vm in backend pool. when try access loadbalancer lb1 server (srv1), timeout. have second load balancer setup in same subnet (lb2 , srv2). traffic on port 443. inbound , outbound rules allow traffic on ports to/from subnet. srv1 can access lb2 not lb1 srv2 can access lb1 not lb2 is design, or have missed configuration option? is design, or have missed configuration option? this design behavior. load balancer used redistributing request vms in backend pool. vm in pool can not access load balancer in same pool.