Posts

Showing posts from July, 2012

networking - how to set internal network between virtual machines -

i have create several virtual machines in redhat using kvm,how can set private network between vms,which vms have public network address. , want create private network between them. what looking, called " private virtual bridge " @ machine.

sql - Error :ORA-02270 -

the error got . foreign key (bid) references allocation (bid), * error @ line 8: ora-02270: no matching unique or primary key column-list not sure how fix it. allocation , worksession week entities. helps appreciated. create table book( bid number(4), title varchar2(30) constraint nn_title not null, sellingprice number(6,2) constraint chk_selling_price check(sellingprice>0), primary key (bid) ); create table author( authorid number(4), sname varchar2(30), fname varchar(30), primary key (authorid), constraint uc_author_name unique(sname,fname) ); create table allocation( bid number(4), authorid number(4), payrate number(6,2) constraint chk_pay_rate check(payrate>1 , payrate<79.99), primary key (bid,authorid), foreign key (bid) references book (bid), foreign key (authorid) references author (authorid) );

show structure of all levels of json with jq and bash -

how can list unique keys of json file levels , array attributes, path? i found jq -s 'map(keys) | add | unique | sort' input.json, lists first level, , no paths. if stream input in, give pairs of paths , values contained in input. $ jq --stream 'select(length>1)[0]' input.json so input this: { "foo": { "bar": 1 }, "biz": { "baz": 2 } } you'd get: [ "foo", "bar" ] [ "biz", "baz" ]

javascript - how to make interactive & animated SVG polyline chart -

so, i'm trying make chart using svg , polyline assign points to. part no trouble new @ web development struggling making interactive. want show y-value @ mouseover @ x-value in tooltip. managed create tooltip don't know how acquire y-value there way this? another thing i'm trying animate polyline drawn instead of appearing on screen once coordinates read. found similar path in svg here: https://jakearchibald.com/2013/animated-line-drawing-svg/ var path = document.queryselector('.squiggle-animated path'); var length = path.gettotallength(); // clear previous transition path.style.transition = path.style.webkittransition = 'none'; // set starting positions path.style.strokedasharray = length + ' ' + length; path.style.strokedashoffset = length; // trigger layout styles calculated & browser // picks starting position before animating path.getboundingclientrect(); // define our transition path.style.transition = path.style.webkittransition

expandablelistview - Keep values of editText boxes into an expandable list view on Android -

i created expandable view contains edittext box under each group. public class expandableactivity extends appcompatactivity { expandablelistadapter listadapter; expandablelistview explistview; list<string> listdataheader; hashmap<string, list<string>> listdatachild; @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_expandable); explistview = (expandablelistview) findviewbyid(r.id.expandablelistview); explistview.setdescendantfocusability(viewgroup.focus_after_descendants); // preparing list data //custom function populates listdataheader , listdatachild preparelistdata(); listadapter = new expandablelistadapter(this, listdataheader, listdatachild); explistview.setadapter(listadapter); adapter code: public class expandablel

PHP: Post 70 Variables --> Array --> MySQL -

i have php page around 70 fields gets posted. 31 have following patern: hours_1, hours_2, hours_3 etc.. 31 have following patern: description_1, description_2, description_3 etc.. there few other variables/fields clientid, month, year can see, yes looks timesheet. gets posted , therefore hours in 1 array , descriptions in , after insert in table. how these hour , description fields neatly array (or 2 arrays) can, after validation, use them insert them mysql table? in php or html, can use [] convention name or receive variables arrays on server side i.e. instead of generating variables _number seem doing, can: <?php foreach(range(0, 30) $i): ?> <input name="hours[]"> <?php endforeach; ?> this allow neatly receive array on server side can $_post['hours'];//will give array of hour inputs if submit post

android - app:layout_scrollFlags="scroll|enterAlways" doesn't works with LinearLayout -

Image
i have start working on android material design support library, , newbie have confusions. and, need help. :) 1) possible use layout_scrollflags="scroll|enteralways" linearlayout? 2) want linearlayout below toolbar. achieved using appbarlayout, want scroll linearlayout not toolbar on scrolling content below linearlayout. using layout_scrollflags="scroll|enteralways" on linearlayout doesn't works. 3) can use more 1 appbarlayout in coordinatorlayout , toolbar in appbarlayout? <android.support.design.widget.coordinatorlayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:fitssystemwindows="true"> <android.support.design.widget.appbarlayout android:layout_width="match_parent" a

c# - Tcp windows service not creating any log file -

i have created windows service open port , log data in text file.it asynchronous data communication allow connect multiple clients.but problem is not creating log file not logging data.kindly guide me doing wrong??? here code... using system; using system.collections.generic; using system.componentmodel; using system.data; using system.diagnostics; using system.linq; using system.net; using system.net.sockets; using system.serviceprocess; using system.text; using system.threading.tasks; using system.configuration; using system.io; namespace tcpservice { public partial class service1 : servicebase { public service1() { initializecomponent(); } protected override void onstart(string[] args) { setupserver(); } public void ondebug() { onstart(null); } protected override void onstop() { service1._serversocket = null; } pri

java - Weird thing during installing a widget on Android -

i have totally weird problem on android. i have app, have widget (declared in manifest, etc). problem is, when debug application (run android studio in debug mode) instead of widget (with icon, name , logic) weird installed - widget without title, standard stock icon, , 1 button inside "sync cards". i don't need add doesn't work widget... more weirdly, don't have "sync cards" string in whole project, don't have layout have such thing. when uninstall application , debug again, help. what's going on? can't upload such thing android market.

mysql auto increment field error 1336 Incorrect integer value -

recently upgraded mysql 5.6.30, throwing out mysql auto incrment error 1366 - incorrect integer value: '' column 's probably new mysql installation runs on strict mode while previous 1 did not.and have empty value in column defined integer error. go @ my.cnf/my.ini file , line sql-mode = "strict_trans_tables,no_auto_create_user,no_engine_substitution" change blank: sql-mode="" this disable strict mode , error converted warning but the best aprroach to change empty field value valid integer value.

html - different layout&font-size in different browser -

.header{ z-index:3; position:fixed; width:100%; height:10%; top:0px; background-color: white; } .header .header-bg { background-color: rgba(248,221,225,0.7); display:table; margin:auto; height:30px; width:30%; } .header .title-center{ text-decoration: underline; position:absolute; margin:0; left:50%; top:60%; -ms-transform: translate(-50%, 0); transform: translate(-50%, 0); } <!doctype html> <html> <head lang="en"> <meta charset="utf-8"> </head> <body> <link rel="stylesheet" href="css/index.css"> <div class="header"> <div class="header-bg"> </div> <div class="title-center">header</div> </div> </body> </html> when developed web page, tested using chrome. after finishing, tested firefox/ie/edge, , found font-size smaller used in chrome. whe

svn - TortoiseSVN with proxy no auth -

i got problem trotoisesvn. need use proxy connect repository. set proxy inside tortoisesvn , proxy working fine. problem should asked repo credentials i'm not , therefore i'm not able checkout or commit. me more exact setup. i have connect in vpn. have go through proxy inside vpn repo. when try use firefox browse repo (repo https://) have set proxy connection in firefox. i'm asked firefox credentials proxy. put them in. i'm asked credentials svn. put them in , can browse repo using firefox , https://. now tortoisesvn insert credentials proxy in setting, try checkout i'm not asked credentials svn , authentication error. there nothing stored in stored data tortoisesvn clean install , never used connection. have idea how force tortoisesvn send credentials svn? btw: i'm limited use port 8080 on proxy , 443 svn. thanks suggestions! :)

node.js - Mongoose Connection issue -

not able connect mongodb using mongoose getting error /users/kunal/documents/node/project/taskaccomplisher/node_modules/mongodb/lib/server.js:242 process.nexttick(function() { throw err; }) ^ mongoerror: server 127.0.0.1:27017 received error {"name":"mongoerror","message":"write epipe"} @ null.<anonymous> (/users/kunal/documents/node/project/taskaccomplisher/node_modules/mongodb-core/lib/topologies/server.js:213:40) @ g (events.js:260:16) @ emittwo (events.js:87:13) @ emit (events.js:172:7) @ null.<anonymous> (/users/kunal/documents/node/project/taskaccomplisher/node_modules/mongodb-core/lib/connection/pool.js:119:12) @ g (events.js:260:16) @ emittwo (events.js:87:13) @ emit (events.js:172:7) @ socket.<anonymous> (/users/kunal/documents/node/project/taskaccomplisher/node_modules/mongodb-core/lib/connection/connection.js:151:49) @ socket.g

parsing - How to write a small tokenizer in Python? -

this question has answer here: can add new statements python's syntax? 13 answers mini-languages in python 6 answers normally, python calls functions by func(arg0, arg1) but change to func arg0 arg1 for example, #something... cmd = input() interpret(cmd) #something... if input 'func arg0 arg1' , expect python execute func(arg0, arg1) . args contain string, can't split words. actually, write scripts use on mobile. little annoying type parentheses. you can : class tryclass: def callfunction(self, arg, arg2): print("in call") print(arg) print(arg2) input = str(input()) input = input.split(" ") funcname = input[0] my_cls = tryclass() method = getattr(my_cls, funcname) method(input[1], inpu

c# - int to char array -

static void main(string[] args) { int num = 382; int output = 0; char[] nlst = num.tostring().tochararray(); (int = 0; < nlst.length; i++) { output += nlst[i]; } console.writeline(output); console.readline(); } the output result 157, should 13.with dedbugging found 3 elements of char[] nlst : [0]51'3', [1]56'8', [2]50'2' why? what's meaning of 51,56,50? you're assuming char value of '0' 0. not; in fact utf16 value of '0' 48. so adding utf16 values of characters '3' , '8' , '2' , i.e. 51, 56 , 50. note if aim add digits of integer, best approach avoid converting string completely, so: int num = 382; // compute sum of digits of num int total = 0; while (num > 0) { total += num%10; num /= 10; } console.writeline(total); however if want know how version working, subtract '0' each character before adding codes together

jsp - Displaying Map keys on struts2 autocompleter tag -

i've been struggling while autocompleter tag using struts2 jquery plugin . i've been able use on simple way, retrieving string lists database, wondered if fetch hashmap action , display user keys only . the response comming action successfull, can see on chrome dev tools action returning json containing map . however, autocompleter displays te values instead of keys, want, i'm trying list addresses user , had used them keys on map , values identifiers each address. this example should ilustrate map looks like. it's response i'm getting action call when user writes 'ho': {"addresseslist":{"home":"-20","hotel":"-4","hooters":"-2"}} however, when user starts writing in autocompleter, keeps showing values (-20, -4, -2), not representative user. i know reverse way , store identifiers keys , addresses' names values, i'm curious , wanted learn how force autocompleter

node.js - NPM install peerinvalid - how to fix? -

today circleci stopped working due peer-invalid issue can seen below: src/index.js -> lib/index.js npm err! linux 3.13.0-91-generic npm err! argv "node" "/home/ubuntu/nvm/v0.10.33/bin/npm" "install" npm err! node v0.10.33 npm err! npm v2.13.5 npm err! code epeerinvalid npm err! peerinvalid package react@15.2.1 not satisfy siblings' peerdependencies requirements! npm err! peerinvalid peer material-ui@0.15.2 wants react@^15.0.0 npm err! peerinvalid peer react-addons-pure-render-mixin@15.2.1 wants react@^15.2.1 npm err! peerinvalid peer react-flexbox@3.1.0 wants react@^0.14.0 || ^15.0.0 npm err! peerinvalid peer react-tap-event-plugin@0.2.2 wants react@^0.14.0 npm err! peerinvalid peer react-dom@15.2.1 wants react@^15.2.1 npm err! please include following file support request: npm err! /home/ubuntu/app/npm-debug.log below can see package.json file. idea on how fix? how go solving issue this? whats best approach? { "name": &

JAVA : When to use Socket setSoTimeout? -

i making application client sends message server , waits 5 seconds (lets assume) server respond , if there no return message, retries again. if server responds message client process it. goes on in loop , again happens after sometime. for purpose thinking use setsotimeout(time) on client socket after reading javadoc , lot of explanations on internet confused whether approach right. what read on internet (1) if use setsotimeout on socket gives timeout duration in connection needs established , if not established retries establish connection given time. (2) if use setsotimeout on socket waits incoming messages specified time interval , if no message received stops waiting. my questions - (1) of above true ? (2) if second statement true, can use implementation ? (3) if second statement true, when timeout timer kickoff ? when declare socket , set timeout period on or when send message ? if either of explanation don't apply case should wait fixed interval

clojure - Adding Google Maps to Luminus Reagent page? -

i'd add page containing google maps component luminus application can't figure out how this. i've tried follow reagent google maps guide map won't show. this clojurescript code i've tried: (ns test.maps (:require [reagent.core :as r])) (defn home-render [] [:div {:style {:height "300px"}}]) (defn home-did-mount [this] (let [map-canvas (r/dom-node this) map-options (clj->js {"center" (google.maps.latlng. -34.397, 150.644) "zoom" 8})] (js/google.maps.map. map-canvas map-options))) (defn map-page [] [:script {:type "text/javascript" :src "https://maps.googleapis.com/maps/api/js?key=<mykey>"}] [:div.container [:div.row [:div.col-md-12 (r/create-class {:reagent-render home-render :component-did-mount home-did-mount})]]]) i suspect not right way add script tags. so question how add google maps component lu

javascript - What can service workers do that web workers cannot? -

what can service workers web workers cannot? it seems web workers subserset of functionality of service workers. correct? there pretty difference in intended for: web workers web workers provide simple means web content run scripts in background threads. worker thread can perform tasks without interfering user interface. in addition, can perform i/o using xmlhttprequest (although responsexml , channel attributes null). once created, worker can send messages javascript code created posting messages event handler specified code (and vice versa.) source - using web workers service worker service workers act proxy servers sit between web applications, , browser , network (when available). intended (amongst other things) enable creation of effective offline experiences, intercepting network requests , taking appropriate action based on whether network available , updated assets reside on server. allow access push notifications , backgrou

android - List return null value -

i using code returns null value. when debug code show given null value list<textjson> textlist = null; try{ textlist = new arraylist<textjson>(); cursor cursor = db.rawquery("select * "+table_texts + " " + key_cate + " = '" + text_spinner1 + " ' " , null); log.e("cursor is","==>"+cursor); log.e("0_0", "0_0 1=>"); // code working on here if(!cursor.islast()) { log.e("hey","last"); while (cursor.movetonext()) { textjson txtlist = new textjson(); txtlist.setid(cursor.getint(0)); txtlist.settext_status(cursor.getstring(1)); textlist.add(txtlist); } } db.close(); }catch (exception e){ log.e("error","is==> " +e); } return textli

mechanize - how can I fill data in text field using php programming -

how can fill data in text field using php programming without opening browser chrome or firefox similar work can in python using mechanize or selenium php server side language. the document generates , outputs not processed it. script not execute on server. if want, can set input default value: <input type="text" value="1000" name="aname" /> and headless-browser able handle such operation.

How do I use the LilyPond in Java Netbeans? -

i want use lilypond generate music notations. want use in java netbeans. i'm unable .ly extension file type in java netbeans. how connect lilypond netbeans? please mention steps have follow this? in advance. lilypond

ruby - Rails 5 API - parent 'must exist' error when trying to create a child record via POST -

i'm building first api (ever) in rails 5 learning experience. i'm using rails in --api mode , have active_model_serializers gem installed. the api based on relationship between ships , voyages. a ship has_many :voyages , voyage belongs_to :ship. using postman check voyages api endpoint i'm getting return value: { "id": 1, "tstd_id": 94583, "year": 1722, "began": null, "trade_began": null, "departed_africa": null, "arrived_slaves": null, "ended": null, "length": null, "middle_passage_length": null, "port_departed": "liverpool", "ship": { "id": 1, "name": "mary", "flag": "british", "rig": null, "tonnage": null, "standardized_tonnage": null, "year_constructed": null, "place_registered&qu

javascript - how add class in selected images in slide show? -

when click on thumb image, want selected thumb image, here when click other thumb image previous thumb image remain selected css code: .imgstyle:hover { border-color: black; } .imgstyle { height: 100px; width: 100px; border: 2px solid grey; } .active { border-color: red; } //js code $(document).ready(function () { $('#divcontainer img').on('click', function () { $(this).addclass('active'); var imgurl = $(this).attr('src'); $('#mainimage').fadeout(1000, function () { $(this).attr('src', imgurl); }).fadein(1000); }); }); html : <img id="mainimage" src="images/chrysanthemum.jpg" width="540" height="500" style="border:3px solid grey"> <br/> <div id="divcontainer"> <img class="imgstyle" src="images/chrysanthemum.jpg" /> <img class="

Compiling android app source code + code check -

i'm totally newbee regarding apk , android stuff, suggestion welcome. i'm trying install , test source code link: http://sanjosetech.blogspot.hr/2013/03/gstreamer-streaming-video-and.html the code should load audio , video passed rpi android phone. have rpi part ready , it's working, need compile , install updated version can have support audio , video. if download code directly on phone (over mail account), how can compile , run ? best regards ! you have build code apk file, using compiler, android studio , example. , transfer android device.

node.js - Mongo DB - What should I put to indexes? -

i have query .sort() , .select() : item.find({title: searchregexp}).lean().select('slug title poster').limit(50).sort('-_id') should put mongodb indexes: query fields { title: 1 } sort fields { _id: -1 }) select fields { slug: 1, title: 1, poster: 1 } or them together? { title: 1, _id: -1, slug: 1, title: 1, poster: 1 }

java - Unable to initialize android view using custom annotation -

here i'm creating custom annotation bind view using resource id. annotation working in emulator not working in real devices. bind.class @retention(retentionpolicy.class) @target(elementtype.field) public @interface bind { } binder.class public class binder { @suppresswarnings("trywithidenticalcatches") public static void bind(appcompatactivity activity) { for(field field : activity.getclass().getdeclaredfields()) { field.setaccessible(true); bind annotation = field.getannotation(bind.class); if (annotation != null) { try { field id = r.id.class.getdeclaredfield(field.getname()); field.set(activity, activity.findviewbyid(id.getint(id))); } catch (nosuchfieldexception e) { e.printstacktrace(); } catch (illegalaccessexception e) { e.printstacktrace(); } }

How colon and semicolon differs in linux command? -

how colon , semicolon differs in following linux commands? i: i; in case doesn't matter much. usually, ; used mark end of command in situations: if [[ ... ]]; ...; else ...; fi the who command, however, produce same output regardless of 2 words on command line is. : not special: $ $ makes dinner $ ano.l::e se=el these produce exact same output. so, answer question: the : part of word i: , doesn't mean special here. the semicolon marks end of command, , not needed since there no other command on line after it.

python - Troubles with Scrapy and libxml2 installation on Windows 10 -

need install scrapy have such error: could not find function xmlcheckversion in library libxml2 . libxml2 installed? error: command 'c:\\users\\artur\\appdata\\local\\programs\\common\\microsoft\\visual c++ python\\9.0\\vc\\bin\\cl.exe' failed exit status 2 command: c:\python27\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\artur\\appdata\\local\\temp\\pip-build-apae9o\\lxml\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record c:\users\artur\appdata\local\temp\pip-knhut_-record\install-record.txt --single-version-externally-managed --compile" failed error code 1 in c:\users\artur\appdata\local\temp\pip-build-apae9o\lxml\ tried install libxml2 unfortunately have error. try different ways didn't succeed. have same error: c:\windows\system32>pip install libxml2 collecting libxml2 not find version sat

ios - how to set xAxis label to show dates with interval of 1 day or week using charts? Also issue when showing yAxis value -

Image
my code bar chart shown below: override func viewdidload() { super.viewdidload() ibviewgarph.delegate = self months = ["jan", "feb", "mar", "apr", "may", "jun", "jul", "aug", "sep", "oct", "nov", "dec"] let unitssold = [1200.0, 1400.0, 600.0, 3500.0, 1200.0, 1600.0, 1400.0, 1800.0, 1200.0, 1400.0, 1500.0, 1400.0] setchart(months, values: unitssold) } func setchart(datapoints: [string], values: [double]) { ibviewgarph.leftaxis.axisminvalue = 500 ibviewgarph.leftaxis.axismaxvalue = 3500 var dataentries: [barchartdataentry] = [] in 0..<datapoints.count { let dataentry = barchartdataentry(value: values[i], xindex: i) dataentries.append(dataentry) } let chartdataset = barchartdataset(yvals: dataentries, label: "units sold")

node.js - Nodejs : Multiple One to many in MongoDB -

i developing first database in mongo . m using mongoose create models . want implement multiple relationship 1 many. there 3 models :user, group , role model. user can belong multiple groups , can have several roles in same group. example, john belongs group 1 , 2. juan in group 1 administrator , group 2 administrator , superuser. below show relational schema: schema relational i have create follow models: usermodel const userschema = new schema({ username: {type: string, unique: true}, first_name: string, middle_name: string, first_surname: string, second_surname: string, email: string, password: string }, { timestamps: {createdat: 'created_at', updatedat: 'updated_at', deleteat: 'delete_at'} }); const usermodel = mongoose.model('user', userschema); rolemodel const roleschema = new schema({ name: {type: string, unique: true}, code: {type: string, unique: true},

cordova - Not able to build the package using phonegap build -

i not able build package via phonegap build. some traces log are: /applications/xcode.app/contents/developer/toolchains/xcodedefault.xctoolchain/usr/bin/clang -x objective-c -arch armv7 -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -std=c99 -fobjc-arc -fmodules -gmodules -fmodules-prune-interval=86400 -fmodules-prune-after=345600 -fbuild-session-file=/var/folders/m1/wl3zc68x40z6cn12m764qkf80000gn/c/org.llvm.clang/modulecache/session.modulevalidation -fmodules-validate-once-per-build-session -wno-trigraphs -fpascal-strings -os -wno-missing-field-initializers -wno-missing-prototypes -wno-implicit-atomic-properties -wno-arc-repeated-use-of-weak -wduplicate-method-match -wno-missing-braces -wparentheses -wswitch -wunused-function -wno-unused-label -wno-unused-parameter -wunused-variable -wunused-value -wempty-body -wuninitialized -wno-unknown-pragmas -wno-shadow -wno-four-char-constants -wno-conversion -wconstant-conversion -wint-conversion -

java - How to add background to JPanel and then add a JButton on that JPanel -

//calling function imagepanel panel_2 = new imagepanel(new imageicon("c:/users/kagarwal/downloads/intacct_logo_standard_web.png").getimage()); panel_2.add(new jbutton()); panel_2.revalidate(); //called function public class imagepanel extends jpanel { private image img; public imagepanel(string img) { this(new imageicon(img).getimage()); } public imagepanel(image img) { this.img = img; dimension size = new dimension(img.getwidth(null), img.getheight(null)); setpreferredsize(size); setminimumsize(size); setmaximumsize(size); setsize(size); setlayout(null); } public void paintcomponent(graphics g) { g.drawimage(img, 0, 0, null); } } requirement is: jpanel2 needs have background image, , on top of need add jbutton. but, issue here newly added jbutton not appears in given jpanel, shows background image. missing refresh ? the problem in paintcomponent, ask graphics object draw image. should call superclass paintc

How to change product images path in magento site -

i want change product images path in magento site. in product view page , category page, image serving path: "media/catalog/product/cache/1/small_image/300x/17f82f742ffe127f42dca9de82fb58b1/1/0/100813_484_neon_blue_front.jpg" i want change product & category image path simple 1 like: media/catalog/product/sku-100813.jpg i working .csv file. thanks sumit

oracle - Is before update trigger will fire if same values are updating into a row of column -

i using before update trigger each row on table, emp_table update 1 column modifid_date before loading table. if going update table same/existing values of row, trigger going fire or not? condition in trigger: :new.modifid_dt := sysdate; table values before update: john (name),4867 (id),20-04-2016 (modifid_dt) table values going update: john (name),4867 (id) your trigger fired, no matter values using; example: sql> create table testtrigger ( number) 2 / table created. sql> create or replace trigger before_update_trigger 2 before update on testtrigger 3 each row 4 begin 5 dbms_output.put_line('trigger fired!'); 6 end; 7 / trigger created. sql> insert testtrigger values (10); 1 row created. sql> sql> sql> update testtrigger set = 10; trigger fired! 1 row updated. sql> update testtrigger set = 11; trigger fired! 1 row updated. sql>

xcode - New version of iOS app in App Store can't be upgraded? -

i have released app app store incremented minor version (1.9 -> 1.10). new version has been 'ready sale' > 1 day. when (or others) go to: itmss://itunes.apple.com/app/{myappid}?mt=8 . can see app, can see new version number (1.10) if scroll down. button says 'open' not 'update' (even though i'm on older version). if delete , reinstall app new version. i've added mechanism app allow make breaking changes , enforce every 1 on version of app (like harpy ). need them update it, not reinstall.

magento2 - Magento 2 admin grid add filter to collection -

i created grid in admin xml ui components. need filter collection via url parameter , dont know how achieve that. tried inject requestinterface collection, filter didnt work. di.xml <virtualtype name="slidelistingdataprovider" type="magento\framework\view\element\uicomponent\dataprovider\dataprovider"> <arguments> <argument name="collection" xsi:type="object" shared="false">xxx\xxx\model\resourcemodel\grid\slide\collection</argument> <argument name="filterpool" xsi:type="object" shared="false">slidelistingfilterpool</argument> <!-- define new object filters --> </arguments> </virtualtype> <virtualtype name="slidelistingfilterpool" type="magento\framework\view\element\uicomponent\dataprovider\filterpool"> <arguments> <argument name="applier

ios - Android BLU Studio & Advance series device have issue with wifi connection & mobile data plan -

i have create 1 application android , iphone platform. have hosted our services on virtual machine's iis. have 1 public ip access webservice both platform. somehow it's working fine in iphone not working blu studio , advance series devices. application working fine samsung edge s7. don't know what's problem. every time got java.socket time out in android. as don't have blu device me can't test it. client have device , facing issue since last few days. please let me know if facing same issue. thanks reading question carefully.

java - Generating a number after connecting to wifi -

i beginner android , developing app. connect particular wifi connection in app. want generate number 1 or 2 or 3 or 4. number need other purpose. how this? wifimanager wifimanager = (wifimanager) context.getsystemservice(context.wifi_service); wifiinfo wifiinfo = wifimanager.getconnectioninfo(); if(wifiinfo.getsupplicantstate() == supplicantstate.completed) { if(wifiinfo.getipaddress() != 0) { if((wifiinfo.getipaddress() == wifiip) && (wifiinfo.getssid().equals(wifissid))) { if (enablelogs) } else{ if (enablelogs) wifiip = wifiinfo.getipaddress(); wifissid = wifiinfo.getssid(); } if want generate random number use this:- final int min = 10; final int max = 100; final int random = random.nextint((max - min) + 1) + min;

java - How to convert from String to SealedObject? -

i have sealedobject containing information. before being sent on server, convert string. once information arrives @ server end, have key decrypt encrypted information, if it's sealedobject though, wish convert string sent sealedobject on server side. possible? suggestions appreciated.

computer vision - Illegal instruction error while running C++ inception-v3 on TensorFlow -

i'm attempting run image recognition c++ api tutorial , have illegal instruction error, while trying execute label_image , after tensorflow compilation using bazel. i did following steps: # after installing bazel dependencies, bazel installer $ mkdir ~/bazel-download && cd ~/bazel-download $ wget https://github.com/bazelbuild/bazel/releases/download/0.3.0/bazel-0.3.0-installer-linux-x86_64.sh -o bazel-0.3.0-installer-linux-x86_64.sh $ chmod +x bazel-0.3.0-installer-linux-x86_64.sh # install bazel in ~/bin $ ./bazel-0.3.0-installer-linux-x86_64.sh --user # add bazel path, if not done $ printf '\nexport path=$path:"~/bin/"\n' >> ~/.bashrc # before this, create new terminal refresh bash path $ mkdir ~/inceptionv3 && cd ~/inceptionv3 # stable version of tensorflow $ git clone https://github.com/tensorflow/tensorflow -b r0.9 $ cd tensorflow # add inceptionv3 data/models c++ api $ wget https://storage.googleapis.com/download.tensorflo

flexbox - Tab Using Pure CSS Flex Concept -

how separate flex item flex container , make block width 100% using css without positioning? my html structure: <div class="container"> <div style="display:flex;"> <div>tab</div> <div class="block-container">content</div> </div> </div> expected result the rule need add flex-wrap: wrap; . once add .container , making .block-container 100% wide forces new line, away .tab . .container { display:flex; flex-wrap: wrap; } .tab, .block-container { padding: 1em; border: 1px solid #ccc; text-align: center; } .tab { border-bottom: 1px solid white; position: relative; top: 1px; } .block-container { flex: 0 0 100%; } <div class="container"> <div class="tab">tab</div> <div class="block-container">content</div> </div>

How to run protractor with different config file in sequence? -

i have different configuration file protractor, , create gulp task run protractor each config file in sequence. here actual code: gulp.src('conf/protractor.conf.*.js') .pipe($.debug()) .pipe($.foreach(function(stream, file){ var configfilename = path.join('conf/', path.basename(file.path)); console.log(configfilename); gulp.src(path.join(conf.paths.e2e, '/**/*.js')) .pipe($.protractor.protractor({ configfile: configfilename, args: args })) .on('error', function (err) { // make sure failed tests cause gulp exit non-zero console.log('error catch gulp'); throw err; }) .on('end', function () { // close browser sync server browsersync.exit(); done(); return stream; }); })); it run protractor first

mod rewrite - .htaccess URL rewriting from foo.php to /foo/ -

how rewrite url from: http://subdomain.domain.com/dir/foo.php to http://subdomain.domain.com/dir/foo/ using htaccess paste code .htaccess, file residing in dir directory: rewriteengine on # rewrite filename.php rewriterule ^([^.?]+)$ %{request_uri}.php [l] # return 404 if original request filename.php rewritecond %{the_request} "^[^ ]* .*?\.php[? ].*$" rewriterule .* - [l,r=404] it redirect .php extension, , if type url full .php extension show 404

angular - Angular2 first response to POST request undefined -

i have simple method makes post request postdata(){ var headers = new headers(); headers.append('content-type', 'application/json'); var json = json.stringify({email: 'admin', password: 'admin'}); return this._http.post('http://localhost:8080/addressbook_rest/api/v1/contacts/login', json , {headers: headers}); } then component call above method onlogin() { this._service.postdata().map(res => res.json()).subscribe( data => { this.loggedin = data }, err => { console.log(err); } ); console.log(this.loggedin); } the problem on first call, variable this.loggedin undefined after want( this.loggedin=true). don't know why gets second time. in fact, it's because request handled asynchronously. means console.log(this.loggedin); return undefined first time because it's outside subscribe callback. it's executed before receiving request response. you should use that: onlogin() {

db2 - SQL dynamic where clause based on parent table column -

i've below 2 tables , need single sql these requirements (no union ). if check_child false , return rows parent table. if check_child true , check if there reference row in child table , return parent row. if there no reference row in child table, don't return parent row. parent table id int (pk) check_child boolean child table id int (pk) parent_id int (fk) sample data: parent table ------------ id check_child 1 false 2 true 3 true child table ----------- id parent_id 1 2 with sample data, query should return first 2 rows parent table because third row doesn't have reference row in child table. a couple of alternatives: select p.* parent p left outer join child c on c.parent_id = p.id p.check_child = 'false' or c.parent_id not null or select * parent p p.check_child = 'false' or ( p.check_child = 'true'

sql server - How can I loop through a json array in sql to select a value at a specific index -

i have stored procedure query database , store result in json variable. want loop through json array index specific value. can tell me how achieve this. below query declare @json nvarchar(max) declare @name varchar(50) = 'name' set @json = (select name getalldataview soundex(name) soundex(@name) json path, root('names')) declare @i int = 0 while @i < lengthofarray begin set @i = @i + 1; select value openjson(@json, '$.names[',@i,']'); end when begin end query select openjson , add 1 more column , , value looping index. can add validation inside begin end . openjson read json , insert new row.

mapreduce - How to resolve the HCat Error - ClassNotFound - HCatOutputFormat not found -

how resolve error below, have exported hcat-core.jar before running code, kindly help java.lang.classnotfoundexception: class org.apache.hive.hcatalog.mapreduce.hcatoutputformat not found full trace: 2016-07-28 20:12:48,465 info [main] org.apache.hadoop.mapreduce.v2.app.mrappmaster: created mrappmaster application appattempt_1468985268798_44020_000002 2016-07-28 20:12:48,653 warn [main] org.apache.hadoop.util.nativecodeloader: unable load native-hadoop library platform... using builtin-java classes applicable 2016-07-28 20:12:48,690 info [main] org.apache.hadoop.mapreduce.v2.app.mrappmaster: executing tokens: 2016-07-28 20:12:48,690 info [main] org.apache.hadoop.mapreduce.v2.app.mrappmaster: kind: yarn_am_rm_token, service: , ident: (appattemptid { application_id { id: 44020 cluster_timestamp: 1468985268798 } attemptid: 2 } keyid: 618886960) 2016-07-28 20:12:48,811 info [main] org.apache.hadoop.mapreduce.v2.app.mrappmaster: using mapred newapicommitter. 2016-07-28 20