Posts

Showing posts from July, 2015

delphi - value setting for TGridpanel working not as expected -

Image
i extend question given here @ so i dropped 1 tgridpanel form , set ratio between first , second row. target should 15 % row #1 , 85 % row #2. open value editor , entering eg. 15 in oi values close target value (15,2%) not correct ones. going wrong ? other ratio values error in range 5 %

ios - UICollectionView inside a container view -

Image
desc: i have view controller holds collection view 7 cells inside of it. when display controller, works fine , displays (controller a). on controller (controller b) have container view embeds controller a, collection view. the problem: when running app , going controller b (that embeds controller a), controller a's sub views except of collection view. in case, instead of seeing 7 cells see 6 , after tapping on 1 of cells, last cell appears in cells row , looks (?!). collection view being redrawn , cant find reason or how fix it. any appreciated. edit that flow layout, call viewdidload: -(void) setflowlayout { bool isiphone = (ui_user_interface_idiom() != uiuserinterfaceidiompad); float basewidth = [[uiscreen mainscreen] bounds].size.width; int width; width = floor(basewidth / 7.0); float space = basewidth - (width * 7.0f); space /= 7.0; uicollectionviewflowlayout * flow = [[uicollectionviewflowlayout alloc] init]; if(isiphone) {...

spring - configuring log4j for loggin-channel-adaptor -

i using spring-integration process message message queue using jms-message-driven-channel-adaptor puts message processmessage channel. have configured wire-tap intercept message , log message log file. i want log payload log file when start application, application level logs getting logged log file along payload. below spring configuration , log4j configuration more details. spring configuration: <int-jms:message-driven-channel-adapter channel="processmessage" destination-name="mytest.queue"/> <int:channel id="processmessage"> <int:interceptors> <int:wire-tap channel="logger"></int:wire-tap> </int:interceptors> </int:channel> <int:logging-channel-adapter channel="logger" logger-name="mylogger" level="info" log-full-message="true"> </int:logging-channel-adapter> log4j configuration: log4j.rootlogger = info, ...

how to create auto increment column with characters and number like alphanumeric in sql server? -

i have table primary key column auto-increment id of numerals starting 1000.. now have been asked make unique key each records starts c20161, c20162, c20163 , on series goes on..... so alphanumeric key auto-increments.... i know how implement same in sql , can update same existing records? is 'sequence' looking or else? you need computed column purpose, create table tablename( id int identity(1,1) not null, newcolumnname 'c' + cast(id varchar(30)), .... other columns list here )

c# - Database connection by connection string returns null -

i try connection between database using connection string , in app.config. problem variable adapter returns null , desired data not read. find no error in code . datatable ds; string con = system.configuration.configurationmanager.connectionstrings["dbconnect"].connectionstring; using (sqlconnection conn = new sqlconnection(con)) { sqldataadapter adapter; adapter = new sqldataadapter("select a.aaa, m.bbb, m.ccc m.ddd lst_mdmel_lis_tab m (nolock) inner join lst_absae_tab (nolock) on a.id = m.id m.bbb >= 30 , m.fff= 35 order a.aaa", conn); ds = new datatable(" "); adapter.fill(ds); datagridview1.datasource = ds; } where m.bbb>= '30' , m.fff= '35' >= comparison operator numerical values. therefore, if m.bbb numerical value along m.fff correct syntax be where m.bbb >= 30 , m.fff= 35

javascript - How to append div for each div -

this question has answer here: how find parent known class in jquery? 3 answers i have list want append each div when click in "add". works every time click on "add" works of divs. want attend new div each div click. here code: $(".add").click(function() { $(".content").append('<ul class="pricepart"><li><input type="text" /></li></ul>'); }); <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <div class="content"> <ul class="pricepart"> <li> <input type="text" /> <span class="add">add+</span> </li> </ul> </div> <div class="content"> <ul class="pricep...

javascript - Why do all components with Component selectors have to be used in an Angular 2 application? -

please aware working tutorial code here, not strictly correct, works. of time. i have component class decorated follows: @component({ selector: "click-here", template: ` <button (click) = "onclickthere($event)">click here!</button> {{clickmessage}} ` }) and used this: <body> <click-here>loading...</click-here> </body> then added new component class, decorator has: selector: "type-here" when run application npm start , legion of errors in browser, starting with: the selector "click-here" did not match elements why every selector have match element? working not feasible; there must way able have multiple component decorators, different selector values, , use of them. how achieve that? doing wrong tutorial hasn't included correct version of? must each component have name or something? this relevant element instantiate bootstrap(mycomponent) . ...

wcf - Configuring HTTP POST request from Nifi -

Image
i trying access wcf service rest client. sending post request rest client wcf service. reference, detail follows. the service contract definition follows: [servicecontract] public interface ibztsoftsensor_wcfservice { [operationcontract] [webinvoke(method = "post", requestformat = webmessageformat.json, responseformat = webmessageformat.json, bodystyle = webmessagebodystyle.wrapped, uritemplate = "/data")] string executemodeljson(string inputmodel); } and implementation of interface follows: public string executemodeljson(string inputmodel){ try { bztsoftsensor_modelinput input = jsonconvert.deserializeobject<bztsoftsensor_modelinput>(inputmodel); var results = this.executemodel(input); return jsonconvert.serializeobject(results); } catch (exception ex) { return ex.message; } } from rest client, requesting wcf service follows: extension, have access wcf service nifi processor. could please advise me how can c...

javascript - Angularjs, create customer directive with $http.post -

i new angularjs, have input form email. <div ng-app="emailapp" ng-controller="emailcontroller"> <form name="emailsubmitform"> <div> <input name="emailinput" type="email" ng-model="email" ng-watchchange="checkduplicate(email)" ng-pattern="emailformat" required /> </div> <div ng-show="isrepeated">repeated</div> <div ng-show="!isrepeated">not repeated</div> <button ng-disabled="emailsubmitform.$invalid" ng-click="createrecord()" >submit</button> </form> </div> originally use ng-change not fire if invalid, therefore want change ng-change function directive, have no idea how it. i want change function below $scope.checkduplicate = function (email) { var model= { email: email }; $http({ method: 'post', ur...

arduino - ESP8266 CIPSEND GET HTTP Host Request Time-out -

at+cipsend=65 ok > recv 65 bytes send ok +ipd,394:http/1.1 408 request time-out date: wed, 24 aug 2016 05:24:40 gmt server: apache content-length: 223 connection: close content-type: text/html; charset=iso-8859-1 <!doctype html public "-//ietf//dtd html 2.0//en"> <html><head> <title>408 request time-out</title> </head><body> <h1>request time-out</h1> <p>server timeout waiting http request client.</p> </body></html> closed i 408 request timeout link working length okay tx rx rx tx i have search google many times. still haven't have solution tried different link. i using arduino mega 2560 , esp8266 or esp-01 i have solution https://arduino.stackexchange.com/questions/23319/esp8266-sending-get-request-and-getting-408-timeout-error/23342#23342 i assume you're doing serial monitor. can't use escape sequences \r in serial monitor entry box. enter evaluated str...

java - If double a=0.0, can I compare a*b==0 directly? -

i know double should not compared == operator directly, how if define initial value 0.0?eg: double a=0.0; double b= . . . if not modified, a*b==0 true? i know double should not compared == operator direct that true if don't know how representation or rounding error have. classic example of not is 0.1 + 0.2 == 0.3 // false :( however, if use rounding if (round4(0.1 + 0.2) == 0.3) // true from chronicle core's maths public static double round4(double d) { final double factor = 1e4; return d > whole_number / factor || d < -whole_number / factor ? d : (long) (d < 0 ? d * factor - 0.5 : d * factor + 0.5) / factor; } if not modified, a*b==0 true? it finite numbers. infinity , nan nan , not equal anything.

javascript - Android webview go back not working while rendering html -

hi developing android application in trying load web view. webview.loaddatawithbaseurl(targeturl, object.tostring(), "text/html", "utf-8", null); inside webview have link inside page. once user click on link renders next page. problem here if user click device button renders blank page. not rendering web page. if (webview != null && webview.cangoback()) { webview.goback(); } else { intent = new intent(this, another.class); startactivity(i); finishactivity(); } how handle thing. need help. thank you. try code : @override public boolean onkeydown(int keycode, keyevent event) { if (event.getaction() == keyevent.action_down) { switch (keycode) { case keyevent.keycode_back: if (mwebview.cangoback()) { mwebview.goback(); } else { //do thing else. } return true; } ...

c# - !ClrStack shows the Unmanaged Call stack -

Image
i have created console application have called win32 project throws access violation exception. have attached custom filter in setunhandledexceptionfilter . when use !clrstack command, shows unmanaged call stack msdn says clrstack provide stack trace of managed code only. https://msdn.microsoft.com/en-us/library/bb190764(v=vs.110).aspx please . program.cs public void exceptionmethod() { exceptioncreator.createaccessviolationexception(); } win32 project: errorreportwritter.h #pragma once #include "stdafx.h" #include "dbghelp.h" using namespace system; using namespace system::runtime::interopservices; using namespace system::text; public ref class errorreportwritter { public: static void installhandler(); }; errorreportwritter.cpp long winapi myexceptionfilter(__in struct _exception_pointers *exceptioninfo) { //for test purpose, dump location solution location handle hfile = createfilea("test.dmp", gen...

python - Dictionary comprehension to calculate statistics across dict of dicts for each key in inner dicts -

i have dictionary this: property2region2value = { 'countrya':{ 'a': 24, 'b': 56, 'c': 78 }, 'countryb':{ 'a': 3, 'b': 98 }, 'countryc':{ 'a': 121, 'b': 12121, 'c': 12989121, 'd':16171 }, 'countryd':{ 'a': 123, 'b': 1312, 'c': 1231 }, 'countrye':{ 'a': 1011, 'b': 1911 }, 'countryf'{ 'a': 1433, 'b': 19829, 'c': 1132, 'd':1791 } } and trying create multiple dictionaries each contains statistics master dictionary (min, max, std etc) values property ( a','b','c etc) across countries (e.g. countrya, countryb ) etc. so example: {'a': min of 'a' across countries, 'b'...

c++ - What do the different shape units mean in kinect? -

each shape unit or face deformation meant indicate feature of face being tracked. in total kinect 2 gives 94 shape units or deformations using hd face api, unclear individual shape units indicate , weights signify, documentation on subject seem either absent or extremely obsecure. here full list of shape units or face deformations kinect 2 what not explained things faceshapedeformations_pca01 or faceshapedeformations_eyes02 mean? as can see description table empty! how shameful , pathetic. for example: what information enumeration faceshapedeformations_eyes02 indicate? does indicates width between eyes or height of eyes ? what range covered weight -2 2? what cryptic enumerations faceshapedeformations_pca01 faceshapedeformations_pca10 ? does know this?

sql - How to update based on previous record -

i have have data below: coursekey userkey userspk1 msgmain date cummcount recent count 32332 33 33 2016-08-22 2 0 32332 33 33 2016-08-24 6 0 i wanting say: update table set recent count = (cummcount latest date - cummcount previous date); in case 4. i confused on how capture previous row using date in case use lag : with cte ( select [msgmain date], cummcount - lag(cummcount, 1, 0) on (order [msgmain date]) newcount ff ) update ff set [recent count] = cte.newcount ff inner join cte on ff.[msgmain date] = cte.[msgmain date]

osx - Error installing .net core on mac -

i unable execute command (while following part of tutorial ln -s /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib /usr/local/lib/ the error ln: /usr/local/lib/: no such file or directory how can fix this? i've tried referring this post, unable follow it. the instructions out of date, sadly. steps worked me (from this answer ): brew update brew install openssl sudo install_name_tool -add_rpath /usr/local/opt/openssl/lib /usr/local/share/dotnet/shared/microsoft.netcore.app/1.0.0/system.security.cryptography.native.dylib according issue on github , there update in future resolves problem.

Creating a generic linked list in c++ without stl -

can creating generic linkedlist without stl . how declare head in main. struct node<>* head ? or struct node* head ? got error using both , template declaration cannot appear @ block scope #include <iostream> using namespace std; template<class t> struct node { t data; struct node<t>* next; }; template<class t> void push(struct node<t>** h,t dat) { struct node<t> * newnode=(struct node<t> * )malloc(sizeof(struct node<t>)) ; newnode->data=dat; newnode->next=*h; *h=newnode; } int main() { struct node<>* head=null; struct node<>* current; int a=10; float f=10.1; push<int>(&head,a); push<float>(&head,f); current=head; while(current) { cout<<current->data; current=current->next; } //code return 0; } first of all, weird mix of c , c++ style programming. let's ignore , foc...

javascript - Issue with pushing data to array in KnockoutJS -

in html page there 3 inputs. using user inputs, wish update elements of page using knockoutjs. script have written: $(document).ready(function(){ function task(data){ this.goal=ko.observable(data.goal); this.type=ko.observable(data.type); this.date=ko.observable(data.date); console.log("data"+ " " + data.goal); } var myviewmodel=function(tasks){ var self=this; self.tasks=ko.observablearray([{goal:"abc", type:"intermediate", date:"12/13/1122"}]); self.newgoaltext=ko.observable(""); self.newtypetext=ko.observable(""); self.newdatetext=ko.observable(""); self.addtask=function(){ self.tasks.push(new task({goal:this.newgoaltext(),type:this.newtypetext(), date:this.newdatetext()})); console.log(tasks); self.newgoaltext(""); self.newtypetext(""); ...

php - Form table wide space between label and input text box -

Image
there wrong design of form shown below. <div class="myreginfoform"> <form method="post" action="action_reg.php"> <table> <tr> <td> <label>name: </label> </td> <td> <input type="text" name="regname" value="" id="regname" required pattern="[a-za-z_ ]{1,}" title="only letters allowed."/> </td> </tr> <tr> <td> <label>course applied for: </label> <label><?php echo $coursename ?></label> </table> </form> </div> a wide...

javascript - How to prevent the keyboard from popping up on mobile devices? -

http://api.jqueryui.com/spinner/ i trying use jquery spinner above in website (a demo of available @ bottom of api). it works work on computers, on mobile devices, keyboard annoyingly pops every time 1 clicks up/down buttons. possible prevent happening? spinner not respond native functions .on('click'), instead has own functions. how modify code keybooard shows when textbox clicked, not up-down buttons? this attempt, not work: $( function() { $('.ui-spinner a').on('click', function() { $(':focus').blur(); }); }) // updated code, can see focus being lost on desktops, still not mobile devices note: got class name inspecting code generated when spinner created.also, super new web development not sure whether missing easy approach. when step button clicked, input focus, mobile device display keyboard, solution add readonly attribute, when user click input box, remove it, on blur, add readonly attribute again. see code...

sql - Why is BigQuery converting some dates to timestamps but not others? -

Image
our sql query shown below converting strings timestamp fields failing on dates , not on others. causing conversion fail? select birthdate, timestamp(regexp_replace(birthdate, r'(..)/(..)/(....)', r'\3-\2-\1')) ts [our_project:our_table] limit 1000 here results. notice bigquery giving "null" many of dates. why regex failing? there add make more robust? here second conversion query tried. select birthdate, timestamp(year + '-' + month + '-' + day) output_timestamp ( select birthdate, regexp_extract(birthdate, '.*/([0-9]{4})$') year, regexp_extract(birthdate, '^([0-9]{2}).*') day, regexp_extract(birthdate, '.*/([0-9]{2})/.*') month [our_project:our_table] ) limit 1000 notice nulls appeared in these results well. how might fix going wrong? it turns out month , day swapped (international versus u.s.) result ranges invalid timestamp. once swapped day , month - conversi...

wso2 api management 2.0 production cluster deployment architecture -

we designing wso2 apim 2.0 cluster deployment architecture, 2.0 clustering , found distribution deployment description, so is wso2 apim gateway 2.0 cluster same 1.10? any recommendation system cpu/memory requirement? wso2 apim 2.0 has traffic manager, how cluster it? for store/publisher, how cluster them? when integration apim analytics, need config gateway workers? 1) there configuration changes, , new configs, in gateways. gateway clustering has not been changed. 2) see installation prerequisites , tuning performance 3) there no public document yet. it'll there soon. until now, can cluster in same way gateways clustered. 4) store , publisher should in same cluster. 5) gateway workers, store , publisher update : about dep-sync: in gateway worker-manager setup, publish api synapse files manager node, , use dep-sync copy apis gateway workers. can use can sync artifacts between nodes instead of svn based dep-sync. (eg. rsync)

vba - Excel Macro - How to merge 2 Different Function of Macros -

i new here , excel macro beginner. need how to..join below macros 1. - function of 1st macro move cell next row once specific cell entered - function of second sub-macro enter timestamp when last specific cell of row entered. thank you...yanto the macros: 1st macro(main) option explicit private sub worksheet_change(byval target range) on error goto whoa application.enableevents = false if not target.cells.countlarge > 1 if not intersect(target, columns(1)) nothing target.offset(, 1).select elseif not intersect(target, columns(2)) nothing target.offset(, 1).select elseif not intersect(target, columns(3)) nothing target.offset(, 1).select elseif not intersect(target, columns(4)) nothing target.offset(1, -3).select end if end if letscontinue: application.enableevents = true exit sub whoa: msgbox err.description resume letscontinue end sub 2nd macro(sub) private sub worksheet_change1(byval target range) if intersect(target, range("d2:d3000")) nothing exit s...

javascript - how to enter a random value in a textarea without an id? -

i have enter random value in textarea of web site using grease monkey script text area didn't have id document.getelementbyid doesn't work. can use method that? my current html showing textarea : <tr> <td class="tdv pd5"><span class="tbg"> message</span>&nbsp;</span> </td> <td class="pd5"> <textarea name="inpx_msg" class="msgbox"></textarea> <br /> <div class="tsm">140 characters max.</div> </td> </tr> you use element.queryselector if want able target element using css selector, similar this: var textarea = document.queryselector('table tr td.pd5 textarea.msgbox'); textarea.value = "my random text"; the above working on following html example: <table> <tbody> <tr> <td class="tdv pd5"...

angular - Webpack 2 not loading imports for Angular2 Typescript application -

i'm trying implement webpack on medium size angular2 project uses typescript. when run webpack bundles 2 files specify in config file. never traverses through import tree , loads rest of modules. i've got simple configuration set up. i'd bundling typescript start with. i'll move onto bundling more files. when change import {} "x" syntax var {} = require("x") . webpack works, however, throws hundreds of errors cannot resolve imported @angular2 directory. how webpack traverse through 'import' statements , bundle more 1 file result? my configuration follows. webpack.config.js var webpack = require('webpack'); var path = require('path'); module.exports = { context: path.join(__dirname, 'wwwroot/app'), entry: { 'vendor': './vendor', 'app': './main' }, resolve: { extensions: ['', '.ts', '.js'] }, output: ...

Java ssl certificate issue -

i'm trying access local host access https site.s url: ​public static void main(string a[]) { resttemplate resttemplate = new resttemplate(); string desc = "test comments updates" string url_1="https://site.s:port/gdhsbsbe"; resttemplate.put(url_1, desc); system.out.println("finished"); } i got exception: java.security.cert.certificateexception: no name matching site.s found. any suggestions how avoid it? there way of getting certificate within program.

android - How to extract just the list of hosts a device is connecting to with tcpdump -

does know how might go filtering tcpdump, can list of hosts (not ip's) time stamps? i need try identify websites our test devices going , @ time. exact url not required, domain. the goal able create arraylist or similar: string domain = "www.google.com"; string timestamp = "<some time , date>"; arraylist<string, string> sites = new arraylist<>(); sites.put(domain, timestamp); so huge array 2 pieces of information care about. how can filter tcpdump ignore else? want know requests going out, not replies. alternatively if there tool can fine too. target platform android. devices rooted. if knows way without rooting better far can tell not possible. thanks.

mysql - Converting SQL Table ID into another field in PHP -

so i'm trying following work; //search userpets table user owns $query = "select * userpets owner = '$username'"; $result = mysqli_query($conn, $query); $row = mysqli_fetch_assoc($result); $userspets = $row['petid']; //search pets table list of pet names , details $query = "select * pets"; $result = mysqli_query($conn, $query); $row = mysqli_fetch_assoc($result); $petid = $row['id'] $petname = $row['petname']; $petimg = $row['petimg'] //turn pet id pet name , image echo "pets: ".$userspets; essentially i'm trying this; 'userpets' table contains 'owned' pets , players username displayed. want grab pets owned user , compare petid 'pets' table. want take pet's name , image table , 'echo' onto page. getting ids fine, don't know how make convert id's names. table structure you can use join of mysql or foreach of php this example using php f...

ruby on rails - What to use instead of respond_with -

from rails 4.2 , respond_with , non-instance level respond_to have been moved responders gem. if want write json response not need responders gem, so question gives alternatives. however, there rails 4.2 or rails 5 guide deals topic of responding non-html in depth? you can handle binding route format in routes.rb file. ex. get 'my-json-route', to: 'controller#action', defaults: { format: :json } here docs

html - how to hide the border of a recaptcha v2.0 widget? -

i want hide border of recaptcha v2.0 widget can better visually integrate site's , feel. note: i'm posting question, , providing solution, because of stackoverflow questions i've found on topic center around removing frameborder attribute of recaptcha's iframe, isn't technically i'm after. i'm after result of -- edgeless recaptcha widget can position within larger visual context. i hope helpful! i wanted hide borders of v2.0 recaptcha (the 1 "i'm not robot" checkbox), , solved follows: wrap recaptcha div (the 1 marked class "g-recaptcha") div, , size bit smaller iframe comes in at, , shift iframe using position: relative , left: -10px, hide borders. if you're using "compact" version, you'll need adjust sizing... css provide works "normal" version. note: tested on safari 9.1.2 (osx) only, i'd guess technique translate other browsers too. hope helps! html: <div class=...

r - Using aesthetics with multiple layers in ggplot -

i new ggplot. trying understand how use ggplot. reading wickham's book , still trying wrap head around how use aes() function. what's difference between these 2 implementations of aes() : library(ggplot2) ggplot(mpg, aes(displ, hwy, colour = class)) + geom_point() + geom_smooth(method = "lm", se = false) + theme(legend.position = "none") and ggplot(mpg, aes(displ, hwy)) + geom_point(aes(colour = class)) + geom_smooth(method = "lm", se = false) + theme(legend.position = "none") both of them print different graphs. help? stuck. in first 1 mapping aesthetics globally , ggplot try map these aesthetics other geom_xyz() layers. while in latter case, mapping aesethics specific ggplot layer (in case geom_point() )

javascript - Why does Promise.reject() require a return? -

in following code promise.reject doesn't work unless use return promise.reject(...) . why this? promise.resolve('promise 1 done') .then(function(result) { console.log(result); return 'promise 2 done' }).then(function(result) { let j; try { j = json.parse("invalid throw"); console.log(j); } catch(err) { promise.reject('could not parse json'); } console.log(result); }).catch(function(err) { console.log(err); }); promise.reject creates value, not throw exception breaks function throw does. if don't return value, ignored , control flow continues. given inside promise callback, (and possibly should) instead use throw new error('could not parse json');

angular - Angular2 Email Validator not working -

email: [ this.myservice.getuser().info.email, validators.compose([ validators.pattern("[a-za-z @]*"), validators.required ]) ] above email validator , somehow not recognizing when type at-sign in text-field.

c# - Enable/Disable Wifi on Android in Unity -

i trying enable or disable wifi unity on android device. tried different things found on forum without success. if do: using(var unityplayer = new androidjavaclass("com.unity3d.player.unityplayer")) { string wifiservicename = unityplayer.get<string>("wifi_service"); using(var wifimanager = unityplayer.call<androidjavaobject>("getsystemservice", wifiservicename)) { wifimanager.call("setwifienabled", false); } } i have error saying wifi_service doesn't exist. if do: using (androidjavaobject activity = new androidjavaclass("com.unity3d.player.unityplayer").getstatic<androidjavaobject>("currentactivity")) { using (var wifimanager = activity.call<androidjavaobject>("getsystemservice","wifi")) { wifimanager.call<androidjavaobject>("setwifienabled", false); } } i have error saying setwifienabled not fu...

android - Swiping through unlimited fragments - Confused over ViewPager process -

i trying create app pulls these ron swanson quotes api , displays them in fragment. when fragment swiped, app go fragment , display new quote. process supposed repeat indefinitely. instead, app loads blank screen. have placed button , textview on fragment, each initial texts determine if has loads, nothing ever appears. p.s.: may notice comical variable names , comments. didn't consider may need when writing (it's personal app learning). p.p.s.: i'm not site still up, shouldn't affect @ point. thanks can help. below 1) single java file of app 2) activity_main.xml file. @targetapi(build.version_codes.honeycomb) public class mainactivity extends fragmentactivity { @suppresswarnings("deprecation") @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_main); // viewpager pagingron = (viewpage...

javascript - Polyfills not applied to webpack externals -

i'm working on project react , jquery being webpacked in 'externals. inserting using tag method in head works of project, i'm still getting errors when firing ie8 es5 functions. they're available in console window, debug breakpoints show they're not available within react code. these docs hint @ problem toward bottom - looks externals independent of webpack chain of dependencies. thoughts on how deal this?

Liquibase Not Updating Spring Boot Web Application -

i deployed spring boot 1.4.0 web application , noticed liquibase did not perform update. have no problem spring boot 1.3.2 web application. was introduced spring boot 1.4.0 cause liquibase not execute? tracked down issue liquibase-core package not included in order spring boot autoconfigurations execute. it's not entirely clear why liquibase-gradle-plugin did not include required package.

spring - apache CXF WebService annotation is not present on class -

i using maven, apache cxf spring on weblogic 10.3.6 expose soap web service web service depended on web services client loaded maven dependency while trying call exposed web services faced below exception on client jar a webservice annotation not present on class: com.client.customerporttype

python - Using itertools for arbitrary number of nested loops of different ranges with dependencies? -

given list of upperbounds: b1, b2, .. bn; dependency functions: f1, ..., fn-1, i'm wondering if there's recipe using itertools or other classes in python for: for i1 in range(0, b1): i2 in range(f1(i1), b2): ... in in range(fn-1(in-1), bn) dostuff(i1, i2, ... in) where there n levels of nesting? want use helper function this: dependentproducts(bs, fs, dostuff) , returns list or iterable ideally, implementation iterative instead of recursive. an iterative solution using @laurentlaporte's setup. put code right under , should work. args stack of arguments fed dostuff whenever it's full. actual solution middle part, top , bottom parts testing. stefan = [] def dostuff(*args): stefan.append(list(args)) args = [-1] while args: n = len(args) args[-1] += 1 if args[-1] >= b[n-1]: args.pop() elif n == len(b): dostuff(*args) else: args.append(f[n](args[-1]) - 1) assert exp...

authentication - trying to get response from CAS secure rest api,but getting login page as response from java client -

i trying correct response cas secure rest api,but every time getting login page response , have converted groovy rest client site https://wiki.jasig.org/display/casum/restful+api java rest client not giving correct result, below java rest client cas . httpclient client = new httpclient(); public string getticketgrantingticket(string server, string username, string password) { postmethod post = new postmethod(server); post.setparameter("username", username); post.setparameter("password", password); // namevaluepair[] namevaluepairs = new namevaluepair[2]; // namevaluepairs[0] = new namevaluepair("username", username); // namevaluepairs[1] = new namevaluepair("password", password); // post.setrequestbody(namevaluepairs); try { client.executemethod(post); string response = post.getresponsebodyasstring(); log.info("response : " + r...

python - Making the name of shape node to be the same as the parent -

how can make name of shape node have similar name parent node? (assuming there 1 shape node per geometry/object) for eg. parent_geo called test_geo1 , shape node testing_geo2shape instead of test_geo1shape i tried doing following: all = cmds.ls(sl=true, dag=true, shapes=true) shape in all: prt = cmds.listrelatives(shape, parent=true) in prt: child = cmds.listrelatives(i, c = true) c in child: cmds.rename(c, str(prt) + "shape") and funky names such u_test_geo1__shape etc all = cmds.ls(sl=true, dag=true, shapes=true) shape in all: ''' shape contain dag path exm.: grp_a grp_ashape grp_b grp_bshape print cmds.ls('grp_a', dag=1, shapes=1) >>('grp_a|grp_ashape', 'grp_b|grp_bshape') rename object, have dag path input of rename command unique, can split dag path '|'[0] parent ...

How do I make View's asList() sortable in Google Dataflow SDK? -

we have problem making aslist() method sortable. we thought extending view class , override aslist method realized view class has private constructor not this. our other attempt fork google dataflow code on github , modify pcollectionviews class return sorted list using collections.sort method shown in code snippet below @override protected list<t> fromelements(iterable<windowedvalue<t>> contents) { iterable<t> itr = iterables.transform( contents, new function<windowedvalue<t>, t>() { @suppresswarnings("unchecked") @override public t apply(windowedvalue<t> input){ return input.getvalue(); } }); log.info("#### start sorting list !"); list<t> templist = new arraylist<t>(); (t element : itr) { templist.add(element); }; collections.sort((list<? extends comparable>) templist); log.info(...

php - Can firstOrCreate be treated atomically in Laravel? -

i have api application hooks upload user data. each peice of data belongs user , user's email address included in each api request. if email doesn't exist in users table new user created, otherwise new data added under existing user. i need if firstorcreate guaranteed return user object if 2 api request made back. in current code, querying database , if user doesn't exist create one. having issue if 2 api calls made back, 2 inserts database (two users same email). have since added unique constraint on email column want sure if use firstorcreate able proceed after knowing either have existing user or have created on. laravel firstorcreate not have atomic guards. but, since have unique constraint on column, database enforce atomicity you. thus: $params = [ 'email' => 'foo@example.com', /* ... */ ]; try { $user = user::firstorcreate($params); } catch (\illuminate\database\queryexception $ex) { $user = user::firstorcreate($params...

java - Turn MoreObjects.toStringHelper(this)...toString() into list of strings -

i have class implemented tostring() method this: // returns "classname{x=1, y=foo}" public string tostring() moreobjects.tostringhelper(this) .add("x", 1) .add("y", "foo") .add("z", "bar") .tostring(); } now in class convert tostring() result string list, this: ["1", "foo", "bar"] is there way use regex expression this?

javascript - Listen change feed of complex queries in RethinkDB -

when have query this: r.db('universe') .table('star') .getall( r.db('universe').table('ship').get(idship)('idcurrentgalaxy'), {index: 'idgalaxy'} ) .changes({includeinitial: true}) i expect update changefeed when a selected star gets updated the selected ship.idcurrentgalaxy changes with query, 1. true. if possible, how can change query make 2. true? the data behind query this: //stars {id: 1, idgalaxy: 1, name: 'aldhafera'} {id: 2, idgalaxy: 1, name: 'duhr'} {id: 3, idgalaxy: 2, name: 'menchib'} //galaxies {id: 1, name: 'milky way'} {id: 2, name: 'andromeda'} //ships {id: 1, idcurrentgalaxy: 1} and query above result this: {id: 1, idgalaxy: 1, name: 'aldhafera'} {id: 2, idgalaxy: 1, name: 'duhr'} there's no way in rethinkdb; have open 2 changefeeds , stitch them yourself. support added; can track progress @ https://git...

javascript - How to perform sql "LIKE" operation on firebase? -

i using firebase data storage. data structure this: products:{ product1:{ name:"chocolate", } product2:{ name:"chochocho", } } i want perform auto complete operation data, , write query this: "select name products productname '%" + keyword + "%'"; so, situation, example, if user types "cho", need bring both "chocolate" , "chochocho" result. thought bringing data under "products" block, , query @ client, may need lot of memory big database. so, how can perform sql operation? thanks update: release of cloud functions firebase, there's elegant way linking firebase algolia via functions . tradeoff here functions/algolia pretty 0 maintenance, @ increased cost on roll-your-own in node. there no content searches in firebase @ present. many of more common search scenarios, such searching attribute baked firebase api continues expand. in mean time, it...

java - Fragments getting added on top of each other? -

this may duplicate, quite frankly, none of other questions helping me. so have problem. making contacts android application. when press contact view it's number, 1 number shows. fine, because people don't have multiple numbers 1 contact. when do, want see of numbers. , problem. want have multiple numbers displayed, not work. only 1 number shows, debugging, know fact actual number variables there, not being displayed correctly. has led me believe 2 fragments getting added on top of each other. , yes, layout being added linearlayout. so, why heck fragments being added on top of each other? using support fragments , support fragment manager btw. have been trying figure out couple days. hate straight ask, have no idea i'm doing wrong time. if me out here, sweet. here code: contactactivity.java //create intent intent intent = getintent(); bundle extras = intent.getextras(); //get extras string contact_title = extras.getstring("contact_title"); string[]...