Posts

Showing posts from June, 2011

javascript - Using $watch, table div dissapear -

i'm using isteven-multi-select directive multi-select dropdown. i'm giving thingslist , creates checkedlist while choose things. so @ first used button confirm selection , ng-click triggered postfunction checkedlist . , worked fine. but decided add watcher wouldn't need press button. can see @ debug mode it's working (list updates correctly), there problem. i'm showing updated list @ page datatables . somehow, after choosing @ dropdown ($watch event) <div> table dissapearing. , it'not ng-show or dissapears dom itself. i have no idea why. this.postthings = function (checkedlist) { $http.post("/list/" json.stringify(checkedlist)).then( function success(response) { $scope.thingslist.splice(0); array.prototype.push.apply($scope.thingslist, response.data); }, function error(data) { console.log(data); $.notify({message: data....

oracle - How pivot row data as columns and fill data dynamically in SQL -

Image
i have table column names exdescription,code,week00,qtysold . column week00 contains values such week1,week2,week3,week4 etc ... week53 . now, need write query print week00 values column names , values sum(qtysold). tried below, not getting result. select * week_report1 pivot (sum (qtysold) week_00 in ([week1], [week2], [week3], [week4], [week5], [week6], [week7], [week8], [week9], ......... [week52], [week53])) maxin code in ('99'); i'm attaching excel pivot display of desired output better picture of want do. oracle setup : create table table_name ( exdescription varchar2(20), code int, week00 varchar2(6), qtysold int ); -- random data: insert table_name ( exdescription, code, week00, qtysold ) select dbms_random.string('x',10)...

Returning an Excel expression from a SQL query used in Excel -

i have excel spreadsheet data loaded sql server database using query. query complicated simplicifation: select collections.id collectionid, '=some_excel_function(a' + cast(row_number() over(order pagingid desc) varchar) + ')' computedresult collections the query return rows this: guid_1, =some_excel_function(a1) guid_2, =some_excel_function(a2) guid_3, =some_excel_function(a3) guid_4, =some_excel_function(a4) ... which does. then want values displayed excel result of running function some_excel_function on specified column, e.g. forth row second column in excel spreadsheet should show value resulting some_excel_function(guid_4) but doesn't. instead shows text =some_excel_function(a4) . how nudge excel treating strings returned sql start = expressions , not values , calculating them? (n.b. have deliberately chosen fictitious excel function some_excel_function highlight different question this one , i.e. cannot replicate ...

c++ - Default template argument when using std::enable_if as templ. param.: why OK with two template functions that differ only in the enable_if parameter? -

in language reference of std::enable_if @ cppreference following note included notes a common mistake declare 2 function templates that differ in default template arguments. illegal because default template arguments not part of function template's signature, , declaring 2 different function templates same signature illegal. in template functions in example below, seems me situation occurs. i.e., 2 template functions onlyforderivedobjects(...) seem (to me) differ default template arguments. realize missing here, , can explain me, or point me in direction might find epiphany myself. question: w.r.t. quote above, why example below compile , run fine: misclassify typename std::enable_if ... part in template functions below when consider yield situation 2 template functions differ in default template argument? example live demo base , derived classes: class basea { public: int getint() const { return 21; }; }; class deriveda : public bas...

javascript - Get Netflix video duration on safari -

i using videos.duration duration of html5 video. code gives actual duration of netflix , youtube videos on chrome. on safari works fine youtube netflix videos gives wrong duration. on inspecting dom of netflix video on safari observe duration property of videos keeps on changing. there way exact duration of netflix video on safari.

javascript - how to get the count of boolean value(if it is true) in array of objects -

i have count of boolean value(if true) in array of objects. json structure given below: [ { "id": 5, "name": "a", "select": true }, { "id": 3, "name": "b", "select": false }, { "id": 2, "name": "x", "select": true }, { "id": 1, "name": "y", "select": false } ] you can using array.prototype.filter() try this console.log(data.filter((x,i) => { return x.select; }).length) demo

Nativescript-dev-webpack setup -

i'm working on nativescript angular, want use webpack on project separate js , maps files generated nativescript ts files. have sample of webpack.config.js? i want after building app: app assets pages js - js files supposed here components - ts files yess can directory setup , running example - https://github.com/nativescript/sample-groceries make sure use release branch.

Writing nested dictionaries in python for json.dump -

i have set of python lists want serially write in json file in structure given below [ { "_id": { "$oid": "5707b5f4e4b0c4265caf3c87" }, "timestamp": 1, "tracedata": [ { "data": { "y": 443.732, "angle": 1.11416, "speed": 1.42906, "objecttype": "pedestrians", "x": 217.991, "d2d": "due_1_2" }, "id": "due_1_1" }, { "data": { "y": 571.965, "angle": 1.22555, "speed": 1.18132, "objecttype": "pedestrians", "x": 205.708, "d2d": "due_20_1" }, ...

javascript - Escaping generated HTML that onclick has a jQuery function with CSS attribute selector -

i have mechanism generates html in javascript, , need extend mechanism add remove row button. the row-generating mechanism looks following: debug.createoverriderow = function (override) { var rowstr = ""; if (override.autodisplay) { rowstr += "<tr session-key=\"" + override.sessionkey + "\" "; } else { rowstr += "<tr class=\"hide\" session-key=\"" + override.sessionkey + "\" "; } rowstr += "session-key-data-type=\"" + override.datatype + "\">"; rowstr += "<td id=\"tddisplayname" + + 1 + "\">" + override.displayname + "</td>"; rowstr += "<td id=\"tdvalue" + + 1 + "\">"; switch (override.datatype) { case "nullableinteger": case "integer": case "rowstring": rowstr...

reporting services - SSRS on a Domain Controller / DNS Server -

i have installed ssrs on server both domain controller , dns server , having difficulty setting permissions. the symptom "user not have required permissions" message, solution documented online (e.g. reporting services permissions on sql server r2 ssrs ). however solution not working me. have opened ie administrator , added domain user full privileges under both site settings , folder settings, yet still can open report manager when open ie admin, , furthermore when can open via localhost , not via machine name. i suspect issue may related fact server domain controller , dns server don't know. edit: should expand on happening when enter machine name: being prompted credentials 3 times , getting blank screen. what using service account ssrs? built-in windows service accounts (local service or network service) not supported report server service accounts on computer domain controller. more information here on msdn.

Overlaying text on video with required angle using FFMPEG -

Image
i trying overlay text on video using ffmpeg. able overlay text bellow command. ffmpeg -i input1.mp4 -filter_complex "[0:v]transpose=2[anticlockwiserotated];[anticlockwiserotated]drawtext=fontfile=../../public/fonts/roboto-regular-webfont.ttf: text='test text':x=100: y=50: fontsize=36: fontcolor=white:[textapplied];[textapplied]transpose=1" output_video.mp4 it allowing me overlay horizontally or vertically only. but want append angle 45 degrees. for if modify command as ffmpeg -i input1.mp4 -filter_complex "[0:v]rotate=45*pi/180[anticlockwiserotated];[anticlockwiserotated]drawtext=fontfile=../../public/fonts/roboto-regular-webfont.ttf: text='test text':x=100: y=50: fontsize=36: fontcolor=white:[textapplied];[textapplied]rotate=315*pi/180" output_video.mp4 by getting overlay video as: because in first rotating video 45 degrees, appending text , bringing original position. loosing borders. please suggest me best way overlay text re...

T-SQL Sum IIf query -

select t1.detail_date clmdate ,t1.detail_agentid clmpid ,t3.hodcode clmhod ,t1.detail_callshandled clmibconnects ,t1.detail_talktime clmibtalk ,t1.detail_wraptime clmibwrap ,t1.detail_holdtime clmibhold ,t1.detail_handletime clmibtotal ,sum(iif([fldcallroute.value] = [inbound],0)) clmibconnects -- ,sum(iif([fldcallroute] = "inbound", [clmtalk], 0)) ibtalk -- ,sum(iif([fldcallroute] = "inbound", [clmwrap], 0)) ibwrap -- ,sum(iif([fldcallroute] = "inbound", [clmtalk] + [clmwrap] + [clmhold], 0)) ibtotal ,sum(0) clmobsignedon ,sum(0) preview ,sum(0) obtalk ,sum(0) obupdate ,sum(0) obwork ,sum(0) obconnects -- ,sum(iif([fldcallroute] = "inbound", [clmhold], 0)) ibhold -- ,sum(iif([fldcallroute] = "outbound", [clmhold], 0)) obhold} i not getting sum(iif.. part of queries more specifically: ,sum(iif([fldcallroute] = "inbound", [clmibconnects], 0)) clmibconnects ...

java - What would possibly be wrong with the following decision table? -

Image
public class testdecisiontable { public static void main(string[] args) { try{ kieservices ks = kieservices.factory.get(); kiecontainer kcontainer = ks.getkieclasspathcontainer(); kiesession ksession = kcontainer.newkiesession("ksession-dtables"); screens s1 = new screens(); s1.setdeliverychannel("y"); s1.setusepointsappl("y"); s1.setcontactdetails("y"); s1.setriskscore("y"); s1.setreasoncode(100); s1.setcurrentscreen(303); ksession.insert(s1); screens s2 = new screens(); s2.setdeliverychannel("y"); s2.setusepointsappl("y"); s2.setcontactdetails("y"); s2.setriskscore("y"); s2.setreasoncode(101); s2.setcurrentscreen(303); ksession.insert(s2); screens s3 = new screens(); s3.setdeliverych...

How to highlight points of multi series in same X value when mouse moves using highcharts? -

considering official demo . when mouse moves somewhere on x axis, point in 1 of 4 series becomes highlight. how highlight points in same x value series when mouse move? if understand correctly, need "shared" option in tooltip, i.e., tooltip: { shared: true } example http://jsfiddle.net/bv05y6lg/

hadoop - Delete table from hive not working -

i want delete rows table column c greater max of column c of table b i tried delete * a.p >= (select max(t.c) b t) but not working . how can achieve this? the insert ... values, update, , delete statements require following property values in hive-site.xml configuration file: hive.enforce.bucketing true hive.exec.dynamic.partition.mode nonstrict after updating configuration in corresponding hive-site.xml, restart services – hiveserver2 , hive metastore. then, use hql delete a.p >= (select max(t.c) b t)

javascript - Show information from Firebase at the specific position -

i made sample html page bootstrap column. in column it's necessary insert text (from firebase) @ specific position. for example: want insert "test" @ column 3. for that, create firebase "currentmessage" field , "location" field. until now, use javascript save , show information firebase. also, used in code angularjs show 2 messages (just learn...). here index.html code: <!doctype html> <html ng-app="root"> <head> <meta charset="utf-8" /> <meta http-equiv="x-ua-compatible" content="ie=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>bootstrap grid</title> <!-- bootstrap --> <link href="bootstrap.css" rel="stylesheet"> <link href="style.css" rel="stylesheet" type="text/css" media="all" /> ...

android - Heterogenous Layouts inside RecyclerView -

i developing weather app in wanted use 2 views inside recyclerview having cursoradapter member. want use 1 view display todays weather , other view display other days weathers. recyclerview working if use 1 view display weather. have overwritten getitemviewtype()? know which view` type should inflate. code getitemviewtype() : private static int view_type_today = 0; private static int view_type_future_day = 1; @override public int getitemviewtype(int position) { if(position == view_type_today) return view_type_today; else return view_type_future_day; } code newview() of cursoradapter have overwritten: @override public view newview(context context, cursor cursor, viewgroup parent) { int viewtype = getitemviewtype(cursor.getposition()); int layoutid = -1; if(viewtype==view_type_today) layoutid = r.layout.list_item_forecast_today; else if(viewtype==view_type_future_day) layoutid = r.layout.lis...

javascript - Auto Login Chrome Extension -

i working on chrome extension popup. popup contains login screen. i add screen autologin checkbox, user doesn't have type password every time closes browser. read storing password in localstorage not practice. do know best way so? for example, thinking of identifying browser uniquely (something browser id), , storing on server. such id exist? otherwise, have idea of how can properly? thank you!

docker - Why does GCR's container registry ignore the _catalog pagination parameters -

while trying query gcr container registry using _catalog api pagination parameter observed there no pagination mechanism descriped in docker's documentation. $ token=$(gcloud auth print-access-token) $ curl -v -u _token:${token} -x "https://gcr.io/v2/_catalog?n=1" i see repositories @ once. expect single repository instead. here response's body: {"repositories":["image1","image2","image3", ... , "image2016"]} the response's headers has no information regards way gcr processed request, namely following query returns same result above: curl -v -u _token:${token} -x "https://gcr.io/v2/_catalog" google says supports v2 docker registry api.

postgresql - Filter data in Postgre using ILIKE with an Apostrophe sign -

hello have error in sql statement when comes filtering data apostrophe sign within data. how fix kind of error sample? select * table_1 name ilike '%sam'le%'. select * table_1 name ilike '%sam''le%'; or select * table_1 name ilike $$%sam'le%$$; see the documentation .

java - Spring Data MongoDB Overriding text index language in a compound index for inner fields -

here's document class: @document(language = "russian") @compoundindexes({ @compoundindex(def = "{'tempid' : 1, 'persons.title' : 'text', 'otherpersons.title' : 'text'}", background = true)}) public class companyhistory implements persistable<string> { @id private string id; private string tempid; private list<person> persons; private list<otherperson> otherpersons; ... } person , otherperson contains 2 strings, getteres, setters. question: how override language on text index (defaults english) inner fields when building compound index? looks setting language works @textindexed annotation. had similar problem (text index subentities) , tried find way set language_override , default_language via @compoundindex , nothing worked me. finally ended following solution: textindexdefinition textindex = new textindexdefinition.textindexdefinitionbuilder() .withdefaul...

c - Both sides have side effects? -

Image
i ran static code analysis misra 2004 , misra 2012 on following c code: bool_type strings_are_equal(const char *s1, const char *s2) { bool_type result = true; const char *str1 = s1; const char *str2 = s2; if (null == s1 || null == s2) { result = false; } else if (strlen(s1) != strlen(s2)) { result = false; } else { while (*str1 != 0) { if(tolower(*str1++) != tolower(*str2++)) { result = false; break; } } } return result; } and got following findings pc-lint reports: can please explain how code @ line 58 , 66 suffering side effects , how should correct it? calling function invoke side effect , when using formal definition of c standard. in specific case of strlen(s1) != strlen(s2) , there nothing inside functions cause harm. wouldn't make sense implement them example internal static variables. if there such internal variables present, order of evaluation give different results dep...

angularjs - Storing data in cache in an Ionic App -

i using external wordpress rest api content ionic app. this provides 500 pages feeding wordpress site. if user doesn't have internet access when accessing app. there way can populate content in apps cache before app build there content view every page. then perhaps later when internet access page can updated? if goal store client-side , persistent data, can't use $cachefactory , caches data current session. you can save data in localstorage . make this: factory .factory('content', ['$http', content]) function content($http) { function getcontent(callback, url) { var articles = []; var article = {}; $http.get(url).success(function(response) { if (response.content[0].length > 0) { (var = 0; < response.content[0].length; i++) { article = { title:response.content[0][i].title, subtitle:response.content[0][i].s...

android java url read -

i use 4.4.2 android version. want read url's html code. url has code: echo"1"; i'm trying lot of codes isn't work. pls don't lock topic. error: application stopped. httpclient don't work. android: 4.4.2 program: android studio my androidmanifest.xml: <uses-permission android:name="android.permission.internet" /> <uses-permission android:name="android.permission.access_network_state" /> <uses-permission android:name="android.permission.access_wifi_state" /> <uses-permission android:name="android.permission.change_network_state"/> my java code: try { url u = new url("http://www.google.com"); bufferedreader br = null; br = new bufferedreader(new inputstreamreader(u.openstream())); br.close(); } catch (ioexception e) { e.printstacktrace(); }

ios - Can I add a delay between consequent generations of cell in collection view and animate each -

i have collection view , wish animate each cell in in way each cell appears on screen 2 seconds after previous 1 did. can achieved in simple way adding delay? you can try way - (uicollectionviewcell *)collectionview:(uicollectionview *)collectionview cellforitematindexpath:(nsindexpath *)indexpath { gallerycell *cell = (gallerycell *)[collectionview dequeuereusablecellwithreuseidentifier:@"identifier" forindexpath:indexpath]; cell.alpha = 0; [uiview animatewithduration:2.0f animations:^{ cell.alpha = 1; }]; return cell; }

Azure Service Fabric deployments consume a lot disk space -

i operate on-premise azure service fabric cluster testing purposes. consists of 3 nodes, running on single virtual machine (windows server 2012) 50 gb disk attached it. further set continuous deployment tfs release pipeline cluster. after approx. 80 deployments, service fabric consumed available disk space , further deployments fail. most of space taken c:\programdata\sf\data, took around 28gb, while each code package has size of ~130 mb. after have unprovisioned many of old deployments (manually via sf portal), around 5gb released. many of old files still around in c:\programdata\sf\data. what best approach improve this? why files old deployments still on disk after unprovisioning? is possible delete these files manually? is possible automate deprovisioning? on production environment situation should relaxed anyhow (since there 1 node per machine , bigger disks). nevertheless put off evil day. feel safer avoid situation @ all. edit it seems sf deleting deployment...

gwt - Issue while Upgrading the SmartGWT version from 5.0 to 6.0 -

i have application developed on smartgwt. while upgrading smartgwt 5.0 6.0 , might easy no luck .i getting below exception , using gwt 2.6.1 , can 1 me out solve issue. [error] failed execute goal org.codehaus.mojo:gwt-maven-plugin:2.6.1:compile (default) on project px-smartgwt-client: failed read module xml file sun .net.www.protocol.jar.jarurlconnection$jarurlinputstream@541afb85: invalid loc header (bad signature) -> [help 1] org.apache.maven.lifecycle.lifecycleexecutionexception: failed execute goal org.codehaus.mojo:gwt-maven-plugin:2.6.1:compile (default) on project px-smartgwt-client: failed read module xml file sun.net.www.protocol.jar.jarurlconnection$jarurlinputstream@541afb85 @ org.apache.maven.lifecycle.internal.mojoexecutor.execute(mojoexecutor.java:217) @ org.apache.maven.lifecycle.internal.mojoexecutor.execute(mojoexecutor.java:153) @ org.apache.maven.lifecycle.internal.mojoexecutor.execute(mojoexecutor.java:145) @ org.apache.maven.lifecycle.internal.lifecyclemo...

dialog - Android Studio: dynamically created button layout is cropped -

Image
i have problem app , cannot find rational explanation why happening. create dynamically dialog box: final dialog dialog = new dialog(content); dialog.requestwindowfeature(window.feature_no_title); dialog.setcancelable(false); dialog.setcanceledontouchoutside(false); dialog.getwindow().setlayout(linearlayout.layoutparams.match_parent, linearlayout.layoutparams.match_parent); linearlayout popup = getproperlayout(s1,content); popup = generatefinallayout(s,popup,content); // button linearlayout btnlayout = new linearlayout(content); btnlayout.setorientation(linearlayout.horizontal); btnlayout.setgravity(gravity.right); btnlayout.setpadding(8,0,8,12); button cancel = new button(content); cancel.settext("ok"); cancel.setbackgroundcolor(color.transparent); cancel.settextcolor(color.parsecolor("#0078ff")); cancel.setonclicklistener(new view.onclicklistener() { @override public void onclick(view view) { dialog.cancel(); } }); btnlay...

ruby on rails - Show Results Based on experiment_type -

i have table experiments in database populated filling out form. 1 of fields in form experiment_type, drop down option select between either aov or conversion. in show.html.erb i'd display aov experiments , conversion experiments seperately. i'm kinda stuck on begin this. thought in show action like @aov_experiment = experiment.where(:experiment_type => "aov").order("created_at desc") @conversion_experiment = experiment.where(:experiment_type => "conversion").order("created_at desc") then loop through , show results in show.html.erb i think way off here. hoping can point me in right direction. source code displaying tabs <!-- start aov experiments --> <table class="data table table-striped no-margin"> <thead> <tr> <th>id<...

angularjs - How to use angular 1.5 components with ui-router states -

right now, angular ui-router project didn't have explicit angular 1.5 components. project requirement use nested states , want use angular 1.5 components migrate angular 2. i'm looking best boilerplate of both. options 1,2 & 4 below link supported. want know optimal option nested states , migration angular 2. angular 1.5 components nested states i shared solution buddy. not sure if fits exact requirements ui-router 1.0.0 can route directly component. take step further, nested states, can specify specific component on named view. link our child state in markup using ui-sref . when state becomes active, view's component. if want make these views dynamic, based on user role, use templateprovider function. however, templateprovider can't use component define view may have return component's tag. e.g. <editadminprofileform></editadminprofileform> for more on conditional views templateprovider see other answer here: angularjs ui-rout...

.net - Using `__await` to await a TPL task in C++/Cli -

i found out can use keywords __resumable , __await in visual studio 2015 similar c#'s async / await in c++. now i'm wondering if there way use __await tpl tasks in c++/cli?

javascript - Getting error trying to submit data using JQuery ajax -

when try run following jquery ajax, error saying parameter missing , not send data. can't find syntax errors. doing wrong? here javascript jquery ajax code: function submitaction(actionname) { if (actionname == "illustrationgenerate.htm") { var thisform = document.getelementbyid("illustrationtypeform"); var fd = new formdata(thisform); $.ajax({ url: "illustrationgenerate.htm", type: "post", data: fd, datatype: "xml", cache: false, success: function (result, status, xhr) { document.getelementbyid('errormessage0').value="success"; }, error: function (xhr, status, error) { alert(xhr.status); alert(request.responsetext); } }); } else { document.forms[0].action = actionname; ...

Why can't tuples in Scala be traversed? -

suppose create tuple6 : val tup = (true, 1 , "hello" , 0.4 , "world" , 0 ) tup: (boolean, int, string, float, string, int) and can access elements of tuple using ._<position> tup._1 , tup._2 , on. why for (i <- 1 6) println(tup._i) give me error saying value _i not member of (string, int, boolean, string, double, int) i understand stated tuples not iterable , if ._1 works , shouldn't ._i work same way ? it boils down type . what type dynamic accessor such _<position> have? in general case, valid 1 any . in strongly-typed language such scala useless purposes. the news problem can handled in type-safe manner - see e.g. the hlist -style tuple handling in shapeless . however, there no such mechanism available in standard scala library (barring heavy metaprogramming such macros).

Localization FieldCollection Pimcore -

can use field collection in localized fields or vice versa. while going through pimcore 4 document https://www.pimcore.org/wiki/display/pimcore4/structured+data+fields+-+fieldcollections i found below statement if want use localized fields inside field collections have set object before calling localized field - related methods. but when tried not able either add field collection in localized field nor vice versa. thanks you can't use field collections inside localized fields. can use localized fields inside field collections. the following example explains better. so not work: object -> localized fields -> product name -> product description -> technical data (field collection) -> value -> unit but will: object -> localized fields -> product name -> product description -> technical data (field collection) -> localized fields -...

python - printing variable inside a def, inside a class -

i new object oriented programming, want basicaly print variable inside def wich on turn inside class, think theres probaly simple answer cant figure out, assistance, heres code: class test(): def test2(): x = 12 print(test.test2.x) this gives me following error: traceback (most recent call last): file "/home/vandeventer/x.py", line 4, in <module> print(test.test2.x) attributeerror: 'function' object has no attribute 'x' when try: class test(): def test2(): x = 12 print(test.x) i get: traceback (most recent call last): file "/home/vandeventer/x.py", line 4, in <module> print(test.x) attributeerror: type object 'test' has no attribute 'x' any welcome you can't want; local variables exist during lifetime of function call . not attributes of function nor available outside of call in other way. created when call function, destroyed again when function exits. ...

css - How to make a horizontal navigation bar that have different background colour blocks -

i want make nav bar have different colour blocks. developing website please me! want make more attractive. tell me best website learn css , php ,html , more....thank 😀😀😀😀 there many places on web can out. quick basics w3schools website handy: http://www.w3schools.com/css/css_navbar.asp for step step tuition, can use sites such codeschool , codeacedemy . both offer free lessons start off , put together. http://www.codeschool.com https://www.codecademy.com/ my advice learn html, css , php. good luck! :)

How to use Liberty 8.5.5.9 Docker -

we believe new websphere liberty 16.0.0.2 has important bug related jax-rs 2.0 client, prevents standard rest calls apps deployed work. last version know bug free 8.5.5.9, dockerfile of official docker ibm has been updated 16.0.0.2 even though use dockers, no docker geek. possible specify in dockerfile in first line: from websphere-liberty:webprofile7 that want version of docker includes 8.5.5.9 , not last one? 1 be? (other docker, solr, explain different versions in doc) if @ 'tags' tab on docker hub see there other historical tags still available including websphere-liberty:8.5.5.9-webprofile7. note these images represent snapshot in time e.g. not rebuilt when new versions of base ubuntu image created. intention liberty provides 0 migration , therefore should able use latest. have found counter-example...

javascript - I want to call parent function into function which is wraped in object -

below code - contactnumbermask: function(value) { return value }, componentdidmount: function() { this.params = { cellnumber: '' }; var masklist = $.maskssort($.masksload("http://cdn.rawgit.com/andr-04/inputmask-multi/master/data/phone-codes.json"), ['#'], /[0-9]|#/, "mask"); this.maskopts = { inputmask: { onmaskchange: function(maskobj, determined) { if (determined) { var number = this.contactnumbermask(maskobj.mask); this.params.cellnumber = number+'-'+this.params.cellnumber; } } }; }, in want call this.contactnumbermask() function inside onmaskchange() function. not getting reference of this. use bind() set context onmaskchange: function(maskobj, determined) { if (determined) { var number = this.contactnumbermask(maskobj.mask); ...

Integrate Firebase cloud Messaging in Android using Eclipse -

i have project in android developed eclipse. want add push notification project. new solution firebase cloud messaging , want use it. documents , samples coded android studio, not move android studio because of dependencies. i not solve problem in eclipse. there way integrate firebase cloud messaging eclipse project? i don't think that's possible. in docs , stated that: to write firebase cloud messaging android client app, use firebasemessaging api , android studio 1.4 or higher gradle .

osx - How to weed out case-sensitivity issues in git on OS X? -

when trying git mv dir1/file.py dir2 i get fatal: not under version control, source=dir1/file.py, destination=dir2/file.py to debug run git ls-files | grep file.py luckily had alias grep="grep -i" , problem clear. file.py under version control. file.py isn't. i'm guessing have once renamed file.py file.py shell (on os x requires going through third name). git continued treat 2 files same, because os x treats them one. git refuses move file unless case matches. how systematically determine whether there similar case sensitivity problems lurking within git repo? i'm using default formatting of os x extended (journaled) , not case-sensitive, , i'd keep way. update i noticed relevant post. this bit hacky, should work, in bash: git ls-files | xargs -i{} sh -c 'ls "{}"* &>/dev/null || echo {}' the goal run command reveals actual case of file. consider this: $ ls a.md we have single file nam...

c++ - Qt: Resize QScrollArea to show 4 widgets at most -

i dynamically adding , removing widgets in qscrollarea, , show @ 4 widgets @ same time before scroll bar appears. basically, if have 0-3 widgets , add one, scroll area resized fit new height, after that, height stays @ 4 widgets size , have scroll see 5th, 6th, ... currently, call following method when widget inserted/removed. void widgetlist::resizescrollarea() { // height of first 4 widgets int widgetsheight = 0; (int = 0; < _widgets.size() && < 4; ++i) { // height of widget widgetsheight += _widgets.at(i)->sizehint().height(); } // leeway make sure have gap between widgets _ui->scrollarea->setfixedheight(widgetsheight + 5); } the problem sizehint() isn't correct height (sometimes big), neither size() (often small). scroll area bit big content, works. not widgets have same height, , sizehint seems correct one, , size. understand sizehint size widget have, not 1 layout gives it, don't why size incor...

rest - How to consume a ASP.NET Core WebAPI in a C# UWP application? -

i trying understand how possible consume asp.net core webapi within uwp/uap application. thought possible consume webapi similar consuming wcf service haven't found yet. furthermore tried install microsoft.aspnet.webapi.core had no success not compatible uap (version=v10.0). i bit lost now. maybe give me hint how use webapi within uwp application. this same consuming api call. use httpclient class invoke endpoint , handle response, there no difference in expected behaviour. imagine have asp.net core web api endpoint defined this: public class stackoverflowcontroller : controller { // wanted exemplify async capabilities. // you'd use async/await getting database values, etc. [ httpget, allowanonymous, route("api/greeting") ] public task<greetingresult> greeting() => task.fromresult(new greetingresult { message = "hello world!" }); } public class greetingresult { publi...

matlab - Adding a quantity to elements of a matrix that are higher than a quantity -

how can add 8 elements of matrix a=[1 7 5 7 2 3 8 2 9 5] that greater 3 without using for -loop? desired result matrix b=[1 15 13 15 2 3 16 2 17 13] you can create logical vector, each of elements of a larger 3 1, , not larger 3 0. vector can multiplied 8, , added original a vector: b = + 8 * (a>3); breakdown create logical vector: a>3 ans = 0 1 1 1 0 0 1 0 1 1 multiply vector 8: 8 * (a>3) ans = 0 8 8 8 0 0 8 0 8 8 and add a : b = + 8*(a>3) b = 1 15 13 15 2 3 16 2 17 13

Return C++ integer array in Python ctypes / numpy ctypeslib incorrect output -

i attempting create c++ function return pointer array, can use in numpy. seem stuck @ basics. when print out values of array back, (which in case should numbers 0 99), after 83 don't expected results. when ask c++ function print out contents of array seems fine. know going on here? edit: so cannot return variable has gone out of scope. understand that. how can return array python, without passing in pointer 1 in arguments? my python file: python_file.py import ctypes import itertools import numpy np h_list=np.array(range(100), dtype=int) length = len(h_list) data = h_list.astype(np.int32) lib = ctypes.cdll('/path/to/file/ctypes_test/hello.so') mynum = lib.mynum mynum.restype = np.ctypeslib.ndpointer(dtype=ctypes.c_int, shape=(length,), flags='c_contiguous') mynum.argtypes = [np.ctypeslib.ndpointer(ctypes.c_int, flags="c_contiguous"), ctypes.c_int] h = mynum(data, length) in h: print the truncated output, can see afte...

c++ - Filter fluctuating lighting with OpenCV -

Image
i need sensitive color (brightness) measurements in webcam footage, using opencv. problem experiencing ambient light fluctuates, makes hard accurate results. i'm looking way continuously update sequential frames of video smooth out global lighting differences. light changes i'm trying filter out occur globally in or of image. have tried calculate difference , subtract that, little luck. have advice on how approach problem? edit: 2 images below same video, color changes magnified. if alternate between them, you'll see there's slight changes in lighting, due clouds shifting outside. problem these changes obscure other color changes might want detect. so filter out these particular changes. given need part of frames capture, figured should possible filter out lighting changes occur in rest of footage well. outside of area of interest. i have tried capture dominant frequencies in changes using dft, ignore changes in lighting. not familiar enough use of function. h...

Override environment variable created locally in Jenkins -

Image
i have 2 properties files wish send content via mail. so: read files envinject use varibles send via mail: those config files containing different link , date see in email same output: android mobile client release notes ch link: ftp://testlink_ch date: 28/06/2016 android mobile client release notes pl link: ftp://testlink_ch date: 28/06/2016 whitch meanns when ${link} set not oveeriden if try "unset" command. [envinject] - injecting environment variables build step. [envinject] - injecting environment variables properties file path 'androiddev/ch/config.properties' [envinject] - variables injected successfully. [envinject] - injecting environment variables properties content link_ch=${link} date_ch=${date} [envinject] - variables injected successfully. [mvandroid] $ /bin/sh -xe /tmp/hudson108948632979693109.sh + unset link + unset date [envinject] - injecting environment variables build step. [envinject] - injecting environment variables p...

android - Onreceiver in broadcast not working in while receive the sms -

after incoming message in mobile number onreceive() not working.please me finding solution problem. code please check , correct me if wrong. public class incomingsms extends broadcastreceiver { context con; @override public void onreceive(context context, intent intent) { this.con = context; if(intent.getaction().equals("android.provider.telephony.sms_received")) { log.e("incomingsms", "onreceive.."); final bundle bundle = intent.getextras(); try { if (bundle != null) { (string key : bundle.keyset()) log.e("okkk", key + "// " + bundle.getstring(key)); final object[] pdusobj = (object[]) bundle.get("pdus"); (int = 0; < pdusobj.length; i++) { smsmessage cur...