Posts

Showing posts from September, 2014

version control - How to search an entire repository which contains folder named "trunk" in SVN -

how can list of paths of repositories( each repo has branches,tags,trunk) in file. we have huge repository , trying list of paths of repositories has "trunk" folder name specifically. i tried using svn list grep how root level , search folder name , path of every repository has folder name. i saw in couple of blogs use svn tree well. if me example great. new svn apologies if verbiage not understandable. if have wc of any node of super-repo, can repo-root (in rather fresh svn): wc\trunk\sub>svn ls -r "^/" branches/ branches/sprint01/ branches/sprint01/sub/ branches/sprint01/sub/c.txt branches/sprint01/a.txt branches/sprint01/b.txt tags/ trunk/ trunk/sub/ trunk/sub/c.txt trunk/a.txt trunk/b.txt regexp grep, collect trunk/ ( somename/trunk/ in use-case, afaicr), nor trunk/sub/ nor trunk/a.txt easy work after man grep

javascript - Using ngPluralize within select -

is possible use ngpluralize inside of select tag configured ngooptions pluralize options of dropdown list? i have following controller function ctrl ($scope) { $scope.ranges = [1, 2, 3, 4, 5]; $scope.range = $scope.ranges[4]; $scope.$watch('range', function(val) { console.log('change' + val); }); }; and following markup <div ng-controller="liveviewerctrl"> <select ng-model="range" ng-options="range range in ranges" ng-pluralize count="range" when="{'1': '1 minute', 'other': '{} minutes'}"> </select> </div> i tried create options myself using ng-repeat , worked fine. unfortunatly dropdown list had empty default value , not preselected although specified default value in controller. if use ngoptions approach preselection works, values not pluralized. as dmitry explained, ngpluralize...

javascript - Why the interceptor factory is failing when is request in the config file? -

i have next configuration (index.js) call interceptor factory. angular.module('pasapp') .factory('interceptorfactory',['$q','$location',require('./factory-interceptor.js')]) .config(['$stateprovider','$urlrouterprovider', '$httpprovider','interceptorfactory',require('./config-app.js')]) .run(['$ionicplatform','$rootscope','$window','storagefactory','$state','$timeout','$http',require('./run-app.js')]); my folder , files order: >config >config-app.js >factory-interceptor.js >index.js >run-app.js when call "interceptorfactory" function './factory-inteceptor.js', console presents next error: uncaught error: [$injector:modulerr] failed instantiate module pasapp due to: error: [$injector:unpr] unknown provider: interceptorfactory http://errors.angularjs.org/1.4.3/$injector/unpr?p0=interceptor...

php - How can I autosave data's from other table -

Image
i have problem please need help, there way if click lock button student doesn't exist on table vote_logs automatic put other table unvoted_logs(table) ,. example in student table there idno c120-115 , saved in table vote_logs problem if vote time's click button of lock.php, want automatic put student records did not exist in table vote_logs unvoted_logs . need guys here lock.php: <?php include '../connection/connect.php'; include '../dbcon.php'; $stat='lock'; $sqla = "update student set status=?"; $qa = $db->prepare($sqla); $qa->execute(array($stat)); //here part want store student didn't exist in vote_logs $stud = mysql_query(" select st.* student st left join studentvotes sv on st.idno = sv.idno , st.syearid = sv.syearid sv.idno null , st.syearid = '$no' , user_type='3'") or die(mysql_error()); //should put insert? don't what's next header ('location:lock_unlock.php...

css - HTML table expands past 100% height on window re-size -

so have table twitch.tv widgets in it. want table stay fixed @ 100% width & height in viewport elements inside resize fit whatever window size user has. want there no scrolling. the problem when user adjusts window size height ends pushing past 100% , not scaling down fit (forcing them f5 or scroll). going on? how fix this? <!doctype html> <html> <html style="height: 99%;"> <meta charset="utf-8"> <title>untitled document</title> </head> <body style="height: 99%;"> <table width="100%" style="height: 99%;" border="1"> <tbody> <tr> <td rowspan="2" width="350"><iframe frameborder="0" scrolling="no" id="chat_embed" src="http://twitch.tv/chat/embed?channel=twitchraidstwitch&amp;popout_chat=true" height="99%" width="350"></iframe></td> ...

c++ - DirectX - Drawing with GDI on a IDirect3DTexture9 -

i trying draw text using gdi textouta on idirect3dtexture9 dont see on screen. here code: hfont pfont = createfonta(-10 * nlogpixelsy / 72, 0, 0, 0, 700, 0, 0, 0, 0, 0, 0, 0, 0, "arial"); idirect3dtexture9* pfonttex = null; pdxdevice->createtexture(100, 100, 1, 0, d3dfmt_x8r8g8b8, d3dpool_managed, &pfonttex, null); //////////////////////////// idirect3dsurface9* ppsurface = null; hdc mdc = null; if (pfonttex->getsurfacelevel(0, &ppsurface) == d3d_ok) { if (ppsurface->getdc(&mdc) == d3d_ok) { selectobject(mdc, pfont); settextcolor(mdc, 0x00ff00ff); setbkmode(mdc, transparent); textouta(mdc, 0, 0, "test", 4); //messageboxa(0, "work", 0, 0); ppsurface->releasedc(mdc); } ppsurface->release(); } pdxdevice->settexture(0, pfonttex); pdxdevice->setrenderstate(d3drs_alphatestenable, true); pdxdevice->setrenderstate(d3drs_alphafunc, d3dcmp_greaterequal...

c - Strcmp not returning 0 -

i have textfile looks this: temp:88 tt:33 3d;3d:5 i'm trying parse first line only, , check indeed "temp:88" this tried: file * file = fopen("test.txt","r"); if(file == null) exit(0); char buff[128]; while(fgets(buff,sizeof(buff),file) != null) { if(strcmp(buff,"temp:88") == 0) printf("true"); else printf("false"); //prints false, regardless of newline character, use of memcopy or else break; } then tried add new line character "\n" inside strcmp yielded same results, , mem copy yielded same result, ideas? from below source code file * file = fopen("test.txt","r"); if(file == null) exit(0); char buff[128]; while(fgets(buff,sizeof(buff),file) != null) { printf("%s,%d\n",buff,strlen(buff)); int i= 0; while(i<strlen(buff)) { printf("%d\n",buff[i]); i++; } if(strcmp(...

javascript - Access / process (nested) objects, arrays or JSON -

i have (nested) data structure containing objects , arrays. how can extract information, i.e. access specific or multiple values (or keys)? for example: var data = { code: 42, items: [{ id: 1, name: 'foo' }, { id: 2, name: 'bar' }] }; how access name of second item in items ? preliminaries javascript has 1 data type can contain multiple values: object . array special form of object. (plain) objects have form {key: value, key: value, ...} arrays have form [value, value, ...] both arrays , objects expose key -> value structure. keys in array must numeric, whereas string can used key in objects. key-value pairs called "properties" . properties can accessed either using dot notation const value = obj.someproperty; or bracket notation , if property name not valid javascript identifier name [spec] , or name value of variable: // space not valid character in identifier names ...

xcode - App requests new keychain access to Parse SDK after name change -

Image
we changed our bundle name (*note not bundle identifier ). ever since then, users have been reporting getting requests access keychain. i understand keychain linked bundle identifier, linked bundle name? or have change credentials on parse after bundle name change? it sounds item in keychain needs access control list updating. locate relevant item in keychain , bring context menu (right-click). select get info , you'll see dialog 2 tabs. select second labelled access control as can see in above image, google chrome application has access item. assuming newly named bundle isn't in list, can add test. if there, remove reproduce problem customers seeing. using keychain services reference , can programmatically retrieve item's acl , add / remove application. may want read keychain services guide first. note, experience, apple's keychain application doesn't correctly show what's in each list, api does.

ios - How to return Collection of Self type? -

how return objects of type self subclass of object calling function returns subclass type instead of object type? this doesn't work, if replace self object , works don't result i'm looking for. public extension object { class func objects() -> results<self> { return try! realm().objects(self) } }

c++ - Qt QUrlQuery param split -

i use qt v5.5. need http request this qurlquery urlquery; urlquery.setquery("https://lalala.com/login"); urlquery.addqueryitem("submit", ""); urlquery.addqueryitem("email", "email@email.com"); urlquery.addqueryitem("pass", "unbelievable_password"); when call urlquery.query(); url "https://lalala.com/login&submit=&email=email@email.com&pass=unbelievable_password" the param "submit" first param, need use '?' split param name, param split '&'. you want url qurl , add query items on -- , not have url query item itself! qurl url("https://www.foo.com"); qurlquery query; query.addqueryitem("email", "foo@bar.com"); query.addqueryitem("pass", "secret"); url.setquery(query); qdebug() << url; correctly prints qurl("https://www.foo.com?email=foo@bar.com&pass=secret")

command prompt - Why cant we give array of values to a String in main function in Java? -

class helloworld{ public static void main(string args[4]){ system.out.println("hello world!"); } } is wrong give string args[4] ? why cant mention value inside string args[4] ?but should output hell ,but there wrong.the code not executing properly. you getting args parameter. array created when program runs. content of args array not known @ compile time (not size), therefore not make sense make assertions @ compile time size. reason array never contains length in type signature. if need check size, correct way writing condition, such as: if (args.length != 4) { //do error handling stuff }

ios - enterprise app distribution using OTA give error message in safari? -

Image
we distributed our enterprise app using ota. when open "app download url" first time in iphone browser show "would install app" alert. if user tap on cancel button , re-open "app download url" again in same tab.it shows "open page in "app store"?" alert, , when user tap on open button display "would install app". can 1 me on this? in advance. you need have landing page link plist file: itms-services://?action=download-manifest&url=your_link_to_plist

javascript - Uncaught Invariant Violation: traverseParentPath(...): Cannot traverse from and to the same ID, `` -

Image
the setup in project use lot of libraries, case think these relevant: redux-form , material-ui , parse . in app have form component looks this: class objectform { render() { const { fields: { field }, handlesubmit, submitting } = this.props; return ( <form onsubmit={handlesubmit}> <textfield hinttext="hint text" {...field} /> <raisedbutton label="send" type="submit" disabled={submitting} /> </form> ); } } wrapped container, like: function mapstatetoprops(state) { const { object } = state; return { object, initialvalues: { field: object.get('field'), }, onsubmit: data => { return object.save({ field: data.field, }); }, }; } export default reduxform({ form: 'objectform', fields: [ 'field', ], }, mapstatetoprops)(objectform); the problem the problem that, when form dirty (i changed ...

java - How can I add an object to an arraylist of objects -

the purpose add teams arraylist. each team object string name, string division, int wins, , int losses. import java.util.arraylist; import java.util.arrays; public class default { arraylist<team> teams = new arraylist<team>(); team mavericks = new team("mavericks","southwest",50,32); team rockets = new team("rockets","southwest",56,26); team grizzlies = new team("memphis","southwest",55,27); teams.add(team mavericks); teams.add(team rockets); teams.add(team grizzlies); } class team { string name, division; int win,loss; public team(string n,string d, int w, int l) { this.name = n; this.division = d; this.win = w; this.loss = l; } } it teams.add(team mavericks); teams.add(team rockets); teams.add(team grizzlies); should be teams.add(mavericks);//here mavericks object teams.add(rockets); teams.add(grizz...

Polymorphic empty relation in Alloy? -

i run alloy command involves finding witnesses existentials, one: pred foo { x, y : e -> e | baz[x,y] || qux[x,y] } alloy comes model foo true. @ model in visualizer, , find y happens empty relation. want dig deeper model , see whether baz or qux true. fire evaluator window , type baz[$foo_x, ???] . can type ??? ? since y empty, there no variable name $foo_y . , typing none or {} gives type-checking error. does alloy provide empty relation can used @ type? or there way @ y witness though it's empty? i belive baz[$foo_x, none->none] should work. relation none has arity 1, , using cross product can empty relations of desired arity. explanation can found in paper "a type system object models" jonathan edwards, daniel jackson , emina torlak.

php - i can't get multiple rows into array from mysql database? -

i can't multiple rows array mysql database? have code not working or not showing rows when echo textbox? <?php if(is_array($_session['pid'])) { $pid = join(',',$_session['pid']); $result=mysql_query("select id wid mywishlist pid='$pid'") or die("id problem"."<br/><br/>".mysql_error()); $results= array(); $i=0; // add new line while($row=mysql_fetch_array($result)){ $results[$i] = $row['wid']; $i++; } $results; } $max=count($results); for($j=0; $j<$max; $j++) { ?> <input type="text" name="wid[]" value="<?php echo $results[$j]; ?>" /> <?php } ?> the line join(',',$_session['pid']) makes me think want select multiple rows pid . try make use of in operator: select id wid mywishlist pid in ($pid)

jquery - Best method to create dynamic Html Controls In MVC -

i have requirement create dynamic html controls , display in view using mvc in .net , need basic validation i.e - if textbox should not empty , if checkbox , validate checkbox checked or not. same time after successfull validation need save in db. would please tell me approach best achieve this? should not affect preformance.i have list of options in mind 1. using htmlhelperclass,string builder,tag builder. 2. jquery i dont know option easy , best achieved. htmlhelper classes of great help. if need implement basic validations required field or regex can rely on validation attributes mvc provides , use model e.g [required] public string firstname {get; set;} you can write own custom attributes , use on model classes this of great help a rough sketch dynamic ui write model class bound db (this contain details of ui controls type,name,attributes etc.). when default controller action hit first time, initialize model , pass on corresponding view , bound m...

c# - UWP ObservableCollection sorting and grouping -

in uwp apps, how can group , sort observablecollection , keep live notification goodness? in simple uwp examples i've seen, there viewmodel exposes observablecollection bound listview in view. when items added or removed observablecollection, listview automatically reflects changes reacting inotifycollectionchanged notifications. works fine in case of unsorted or ungrouped observablecollection, if collection needs sorted or grouped, there seems no readily apparent way preserve update notifications. what's more, changing sort or group order on fly seems throw significant implementation issues. ++ take scenario have existing datacache backend exposes observablecollection of simple class contact. public class contact { public string firstname { get; set; } public string lastname { get; set; } public string state { get; set; } } this observablecollection changes on time, , want present realtime grouped , sorted list in view updates in response changes i...

javascript - Ember link-to opens link in the same page -

i trying learn ember routes , created simple example app. application template has code- {{#link-to "testpage"}}go test page.{{/link-to}} {{outlet}} the testpage created via ember-cli ember g resource testpage the testpage template contains simple text "this testpage". when run app, main page correctly shows hyperlink testpage , upon clicking, browser url changes localhost:4200/testpage testpage text shown alongwith "go test page" hyperlink. shouldn't go new page? also, might note using pod structure in app. your application template render, regardless of resource/route you've navigated to. top-level resources render in {{outlet}} have right there. if want 'go test page.' link replaced, you'll need create separate template it. call index.hbs , rendered automatically root path.

ruby on rails - Edit action with nested form always adds new form fields under form records -

i cant figure out happening nested form. when create new invoice form works fine, when go invoice edit action see saved records , new empty nested form underneath. how stop happening? my form <div class="col-xs-12"> <%= simple_form_for(@invoice) |f| %> <%= f.error_notification %> <div class="row"> <div class="row invoice-info"> <div class="col-xs-4 invoice-col"> <%= f.input_field :company, class: "form-control", id: "1" %> <%= f.input_field :contragent, class: "form-control", id: "5" %> <%= (invoice.last.present? ? (invoice.last.id + 1) : 1) %> <%= f.label :date, required: false %> <%= f.input_field :date, class: "form-control datepicker", as: :string, id: "invoice_date" %> <%= f.label :currency, required: false %> <%= f.input_field :currency, id:"invoice...

php - Doctrine/DQL returning form values as DQL result during validation -

in system, can specify 2 week period bookings in high seasons, if 2 people lower in family hierarchy of 2 brothers want book same period in high season precedence rules apply. i need period booking of contact chosen in form, added following code validate function in validator(1 used testing): public function validate($value, constraint $constraint) { $pb = $this->doctrine->getrepository('appbundle:period')->getpbforcontact(1); var_dump($pb); die(); here repository code corresponding function: public function getpbforcontact($id){ $em = $this->getentitymanager(); $query = $em->createquery('select pb appbundle:period pb join pb.contact c c.id = :id , pb.draft = false')->setparameter('id', $id); $pb = $query->getsingleresult(); return $pb; } the trouble when dump period booking output given dates on edit form , not ones recorded in database. when specify columns in dql given start , end dates database...

javascript - Jquery Ajax Call, doesnt call Success or Error -

$.ajax({ url: url, type: 'post', context: context, data: data, success: function (result) { callback(); }, error: function (xhr, textstatus, error) { alert("error") }, complete: function (jqxhr, status) { alert("completion callback."); }, }); it call service method & returned controller. calls compete callback.

Adding CSS file in ADF JSF page -

i have created jsf page <f:view> <af:document id="d1"> <f:facet name="metacontainer"> <af:resource type="css"> af|inputtext :: content { color:red; } </af:resource> </f:facet> <af:form id="f1"> <af:panelheader text="customer" id="ph1"> <af:selectoneradio label="gender" requiredmessagedetail="must provide gender" id="sor1" layout="horizontal" value="#{customerbean.gender}" autosubmit="true"> <af:selectitem label="female" value="f" id="si1"/> <af:selectitem label="male" value="m" id="si2"/> </af:selectoneradio> </af:panelheader> <af:inputtext label="firstname" id="it1" value=...

Google javascript Oauth related 404 in Cordova/Intel Xdk -

i have strange error seem error 404 while executing google's javascript client. error happens on device; not in emulation. i using intel's xdk v2807 html5+cordova app cordova cli v.5.1.1 inappbrowser v1.1.0 geolocation, statusbar, device, splashscreen plugins loaded using nexus 6p; marshmallow dut i'm using google's template oauth: sample authorization i have whitelisted app's networking, "turning off" security: content security policy restrictions removed: <meta http-equiv="content-security-policy" content="default-src *; style-src * 'self' 'unsafe-inline' 'unsafe-eval'; script-src * 'self' 'unsafe-inline' 'unsafe-eval';"> access origins anywhere (added in config.xml) <allow-navigation href="*" /> <allow-intent href="*" /> <access origin="*" /> setting above c...

ios - How do I add swipe-to-delete to a stackview -

i'm trying decide between tableview , stackview part of new project , couldn't find how add swipe-to-delete functionality view elements aren't tableviews. is possible? if so, how? i'd rather not use table view each cell have varying heights , i've read don't dynamically increase in height accommodate content. this done in swift if makes difference. https://github.com/cewendel/swtableviewcell library functionalities in tableview swipe. hope may you.

c# - Coroutine doesn't complete its execution every time -

i have following code using make user fly while , down. void booster() { startcoroutine (booster (airtime)); } ienumerator booster(float airtime) { isjumping = true; var e = sphere.localeulerangles; e.x = 0; e.y = 0; sphere.localeulerangles = e; float startposy = -0.24f; float finalposy = -0.24f + 2.5f; float xstartangle = 0; float xendangle = 90f; float timer = 0f; float timejump = animtime*2.5f; while (timer <= timejump) { timer += time.deltatime; float ypostemp = 0; float xangletemp = 0; ypostemp = mathf.lerp(startposy,finalposy,timer/timejump); xangletemp = mathf.lerp(xstartangle,xendangle,timer/timejump); var s = sphere.localposition; s.y = ypostemp; sphere.localposition = s; var = sphere.localeulerangles; a.x = xangletemp; sphere.localeulerangles = a; //debug.log("player angles: " + sphere.localeulerangles); yield return null; } timer = 0f; while (timer <= airtime) { ti...

Show "word" singular if there is only one entry in PHP? -

i have span this: <p> <span>{{ queue_count }} </span> </p> queue_count may contain 0 or 1 entry , greater. if queue_count less or equals 1 want show {{ queue_count }} entry otherwise {{ queue_count }} entries , how can that? its simple. use if else condition. if(queue_count <= 1) { <p> <span>{{ queue_count }} entry </span> </p> } else { <p> <span>{{ queue_count }} entries </span> </p> }

wpf - Including resource dictionary in UserControl.Resources fails to compile -

i have custom control want apply styles resource dictionary in project. reason, adding resources in usercontrol.resources fails, placing in grid.resources succeeds; <usercontrol x:class="my.name.space.myusercontrol" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" mc:ignorable="d" d:designheight="200" d:designwidth="300"> <usercontrol.resources> <resourcedictionary x:key="usercontrolresources"> <!--putting here fails--> </resourcedictionary> </usercontrol.resources> <grid> <grid.resources> <resourcedictionary x:ke...

windows - Task scheduler: Works only when I right-click on the task and start it manually -

i've python flask server file run.py want start vm reboots. i've tried using task scheduler on windows (by creating powershell file calls run.py , feeding powershell file task scheduler) never runs on own. strangest thing is, when right-click on task , manually start - runs expected. when task scheduler - fails. what can fix this? alternatives task scheduler running python server on startup?

How the string is add to integer in PHP -

today wondered, if string contain first letter has integer can add value integer variable. $a = 20; $b = "5doller"; $a+=$b; echo $a; will 1 can explain how happen , if have string "dollar5" wont add. php has type conversion philosofy, auto convert type of data on runtime depending on context. may have it's advantages , disadvantages, , there people against , people think it's ok (like in in life). for more info behaviour please have on php documentation: http://www.php.net/manual/en/language.types.type-juggling.php it try see string integer ease life if use arithmetic operator "+"(detecting first character "5"), leading strange behaviours if not done properly. that doesn't mean doesn't have type, $b string , tries convert on runtime, $b still remain string . to check and/or prevent strange behaviours use php native functions check types: $a = 20; $b = "5doller"; if(is_integer($b)){ $a+=$...

html - CSS form with effect -

Image
these codes: css: body { font-family: 'source sans pro', sans-serif; color: white; font-weight: 300; } body ::-webkit-input-placeholder { font-family: 'source sans pro', sans-serif; color: white; font-weight: 300; } body :-moz-placeholder { font-family: 'source sans pro', sans-serif; color: white; opacity: 1; font-weight: 300; } body ::-moz-placeholder { font-family: 'source sans pro', sans-serif; color: white; opacity: 1; font-weight: 300; } body :-ms-input-placeholder { font-family: 'source sans pro', sans-serif; color: white; font-weight: 300; } .wrapper { background: dimgrey; position: absolute; top: 25%; left: 0; width: 100%; height: 1000px; margin-top: -200px; } .wrapper.form-success .container h1 { -webkit-transform: translatey(85px); transform: translatey(85px); } .container { max-width: 600px; margin: 0 auto; padding: 80px 0; height: 400px; text-align: cent...

java - Are there any good alternatives to PowerMock? -

i'm testing legacy code , tried powermock mocking static method calls. found out messes classloaders , not kind of problem feel qualified dig into. fyi problem similar this solution posted there doesn't work in case. are there alternatives powermock can try capable of mocking statics, compatible testng , used in live projects? i know best alternative testable code it's not possible refactor current project.

c# - Disable "Attach to debugger" Debugger.Launch -

i got problem, have accidentally left "debugger.launch();" code in project, needed debugging application windows service. now, i'am done projects, it´s working intended (mostly) but, every time start service, asks if want attach debugger. the service has been packed msi-package, , more or less ready delivery. , guy handles packaging , such not @ office , none else know how or has authority it. enough backstory.. can in way disable debugger code without repackaging service? - or have repackage? is there startup command or prevent ask debugger? i have been searching alot this, of existing questions/posts regards "prebuild" solutions, i'am looking "postbuild" solution. [edit] solution (some kind of..) i have still no idea if possible prevent attaching, research i've done, seems impossible. therefore had recompile service. as many of commented suggested implemented key in app.config, , simple "if-case" around ...

android - Fb app invite with referral code -

i interested in using fb app invites , app links functionality users can invite friends. want able pass referral code well. i don't have web server nor know if should purpose. confused process i followed docs , able generate app link using fb hosting tool in form of https://fb.me/123456789 i can use in app invite dialog integrate in android app. now question is, how can add referral code when new user download app, newly installed android app receive referral code? facebook's policy not allow awarding (all)invites/sharing/commenting/liking more. you anyway implement airbnb award user downloading app something, when being referred. if want track conversions should utilize facebook's insights dashboar update if want track google play reffs utilize this: https://developers.google.com/analytics/devguides/collection/android/v4/campaigns#general-campaigns

javascript - font awesome: retrieve css of pseudo element displays a small rectangle -

i trying retrieve css value of font awesome pseudo element. css: .pe-icon--check:before { content: '\f00c'; } i use query var symb = window.getcomputedstyle($('.pe-icon--check').get(0), ':before').getpropertyvalue('content'); but result small rectangle  . value need \f00c . please me fix this? the below solution worked!! var content = window.getcomputedstyle(document.queryselector('.pe-icon--check'),':before').getpropertyvalue('content'); function entityforsymbolincontainer(character) { var code = character.replace(/"/g, '').charcodeat(0); var codehex = code.tostring(16).touppercase(); while (codehex.length < 4) { codehex = "0" + codehex; } return "\\" + codehex + ";"; }

Angular 2 @Output parameters -

im trying pass parameters through @output fired function receive 'undefined'. can please show me way pass parameters through eventemitter of @output? example: var childcmp = ng.core.component({ selector:'child-cmp', outputs: ['myevent'] }).class({ constructor: function(){ this.myevent = new ng.core.eventemitter(); this.myevent.emit(false); } }); var parentcmp = ng.core.component({ selector:'parent-cmp', template:'<child-cmp (myevent)="invoke()"'></child-cmp>', directives: [childcmp] }).class({ constructor:function(){}, invoke: function(flag){ // here flag undefined!! } }); you shoud use following value provided event: <ch...

c# - Deserialize a JSON to Class -

i trying desrialize string: storage = "{\"1\":{\"1\":\"aaa\"},\"2\":{\"1\":\"bbb\"}}"; it works: var localstorageobj1 = jsonconvert.deserializeobject<dictionary<datamodels.storageprimarykeys, dictionary<datamodels.storagesecondarykeys, string>>>(storage); but want class, like: var localstorageobj = jsonconvert.deserializeobject<myclass>(storage); myclass is: public class datamodels { public enum storageprimarykeys { login = 1, account = 2 }; public enum storagesecondarykeys { jobtitle = 1, jobid = 2, joblocation = 3, renewdate = 4, expirationdate = 5 }; } public class myclass { public dictionary<datamodels.storageprimarykeys, foriegndata> primarydictionary { get; set; } } public class foriegndata { public dictionary<datamodel...

interface builder - tvOS - UITextField shows white on white when focused -

Image
i've created uitextfield on screen using custom font (skia 100 point) , sitting on top of uiimageview, otherwise quite unremarkable. when it's not focused, text shows normally, if bit faint: when focused, however, entire area renders solid white rectangle: i'd willing compromise on , feel of screen if render when focused, nothing i've tried has changed it--i white-on-white. read similar issue said due custom background colors have not set background color. in fact, if set custom text color, not seem take effect--it looks same.

wordpress - Direct upload of Video to Vimeo -

i'm trying upload directly vimeo computer in wordpress site using $lib->upload($_files["filetoupload"]["tmp_name"], false); keeps failing. plus can't upload large files above 1mb,target allow users upload upto 100mb in single upload most of conversation happened in comments above, i'm adding answer here anyway. the video being uploaded successfully, problem video returning "untitled". to edit video need perform api call $lib->request($video_uri, ['name' => $title], 'patch'); , , ensure token has edit scope.

mysql - Best way to replicate a table from a database that lives on another server -

i want to copy table sql database local. question that, there easy way achive so. since table big have operation in few steps selecting 1 database , inserting it. not use file operation since operation part of web application , remote database database of user.

javascript - Angular 2: importing router bundle -

i'm stuck why can't router import dependency. in console error: system.js:4 http://127.0.0.1:8000/angular2/src/platform/dom/dom_adapter.js 404 (not found) looking @ google examples they're using practically same setup i'm not sure i've gone wrong. if comment out import router works expected. index.html: <body> <main>loading...</main> <script src="lib/traceur-runtime.js"></script> <script src="lib/system.js"></script> <script src="lib/reflect.js"></script> <script> system.config({defaultjsextensions: true}); </script> <script src="lib/angular2.js"></script> <script src="lib/router.js"></script> <script> system.import('index').catch(console.log.bind(console)); </script> </body> index.js: import {component, view, bootstrap} 'an...

iso - Do NodaTime constructors accept 24 in the Hours parameter -

i hoping quick answer 1 question nodatime before downloading it. far, reading nodatime , api , seems thought out. i hope might eliminate of chaos i've been encountering in application has database back-end, desktop client database provider, , web client must run on major browsers. support iso 8601 on datetime , time varies on various database, database provider, , web platforms. internet explorer, example, follows iso 8601 sql server not; web ui timepickers not because chrome not. question: in nodatime, 24:00 valid time value? 24 valid argument hours parameter of time constructors? background: iso 8601 allows 2 representations of midnight: 00:00 "midnight morning" , 24:00 "midnight tonight". when datetime object on time-line, date time element has 24:00 coincides next day @ 00:00. same time-line instant 2 different representations, both representations valid per iso. a time-only value detached time-line. time of 00:00 occurs @ beginning of detached...

sql - Display the minimum value from 3 columns -

i have table follows **date col1 col2 col3** 1-jan-2016 -98 25 15 19-jan-2016 25 -79 20 25-dec-2015 -12 24 89 i have find minimum value col1, col2, col3, , display date of record. in case result should 1-jan-2016 -98 you can in plsql way using least function declare cursor c1 select date_column,least(col1, col2, col3) least_value yourtable; begin in c1 loop dbms_output.put_line(a.date_column || ' ' || a.least_value); end loop; end; you can in simple sql well: select x.date_column, x.least_value (select date_column, least(col1, col2, col3) least_value yourtable) x x.least_value = (select min(least_value) (select least(col1, col2, col3) least_value yourtable))

node.js - G-WAN, NodeJS, and Streaming -

does g-wan spin new nodejs instance every user request? (i.e. if you're using javascript servlet) instance, if 100 users request action @ same time that's handled specific script. my primary question goes scripting g-wan non-c/c++ languages... can sendfile used javascript servlet? want stream large files clients won't in www folder, rather specified file path on server. possible? if not, can nodejs's streaming used in g-wan? does g-wan spin new nodejs instance every user request? unlike other languages ( c/c++, objective-c/c++, c#, ph7, java, , scala ), javascript not loaded module , rather executed cgi process, zend php , or perl . so, yes, node.js scale poorly unless use caching (either g-wan's or yours). can sendfile used javascript servlet? yes g-wan having own asynchronous machinery it's more efficient "the g-wan way" (as suggested ken). if insist using sendfile() javascript keep in mind have use in non-blocki...

javascript - Fetch "href" Information On Clicking a Button -

i have extract "href" information of button if being clicked. html tag corresponding button is: <a class="donate" target="_self" rel="" href="/donate/donate-monthly"> how can fetch same using javascript? first should select element var el = document.getelementbyid("yourid") if have id attribute attached or var els = document.getelementsbyclassname("yourclass") . note getelementbyid return single element if found getelementsbyclassname return of elements class if have more 1 array. after have selected element lets var el = document.getelementbyid("yourid") can extract href getattribute() method. code if select id like var el = document.getelementbyid("someid"); var href = el.getattribute("href"); console.log(href); // or whatever want or if select class , sure have 1 element class can do var els = document.getelementsbyclassname("donate"); ...

how can android play video by inputstream -

i got input stream socket cctv,but not know how display video,is there apis?in words,how can android display cctv??? my question:i have used video framework display video,which display string path. want displaying stream...how can figure out??? help me.... `void playfunction(){ string path = ""; videoview mvideoview; edittext medittext; medittext = (edittext) findviewbyid(r.id.url); mvideoview = (videoview) findviewbyid(r.id.surface_view); // path="http://dlqncdn.miaopai.com/stream/mvaux41a4lkuwlobbgugaq__.mp4"; path = environment.getexternalstoragedirectory().getabsolutepath() + "/cctvwatch.mp4"; if (path == "") { // tell user provide media file url/path. toast.maketext(videoviewdemo.this, "please edit videoviewdemo activity, , set path" + " variable media file url/path", toast.length_long).show(); return; } else { /* * alternatively,for...

docker push to Bluemix problems -

i trying push docker containers bluemix , encountering problems. 1) yesterday able push 3 containers. however, of them still showing vulnerability assessment incomplete . 2) today, when tried push new container, getting internal server error: 503 trying push tag looking through previous posts suggest there problem @ bluemix end. ideas? since yesterday able push 3 images registry , getting 503 error doing same, suggest open support request directly bluemix console using support/help widget: in way you'll involve ibm containers support team in checking , fix issue. able perform in-depth investigation of error. please provide org , space guids , details on image used (for example dockerfile, if have it). you can retrieve org , space guids using cf cli (when logged in): cf org <orgname> --guid cf space <spacename> --guid

how to use URL to post data with HttpClient in android -

i have send/post data .svc web service connect remote database. i'm using jsonstringer send data every time response status false. data not sent. how use httppost in android . can me how solve . here webservice code string namespace = "http://103.24.4.60/xxxxx/mobileservice.svc"; public void activityupload( final string strcurrentdatetime, final string strtitle, final string replacedescchar, final string editedhashtag) { new asynctask<string, void, string>() { @override protected string doinbackground(string... arg0) { string line = ""; try { log.e("actiondate "," = "+ strcurrentdatetime); log.e("activityid"," = "+stractivityid); log.e("userid"," = "+str_userid); log.e("objectid"," = ...