Posts

Showing posts from February, 2012

javascript - How to open a window when a window is already open in extjs -

Image
i want open new window window open. window opening @ of window open?? new extjs , using extjs 6. model: true bringtofront: true both not working here in image see when click on edit small window opening @ window want open @ front of window. hope understand problem now the method show() ( tofront() also) trick you. here small example: var = new ext.window({ title: 'a', width: 200, height: 200 }).show(); var b = new ext.window({ title: 'b', width: 200, height: 200 }).show(); a.show(); // or a.tofront(); there property tofrontonshow , true default.

angular - Webpack - Unable to find loader for SASS/SCSS -

i error message of: error in ./src/assets/css/site.scss module parse failed: c:\_code\vscode\angular2-webpack-starter\src\assets\css\site.scss unexpected character '@' (1:0) may need appropriate loader handle file type. | @import "_variables.scss"; | @import "_helpers.scss"; | html { @ ./src/app/app.component.ts 5:0-34 @ ./src/app/app.module.ts module: { loaders: [ { test: /\.woff(\?v=\d+\.\d+\.\d+)?$/, loader: "url?limit=10000&minetype=application/font-woff" }, { test: /\.woff2(\?v=\d+\.\d+\.\d+)?$/, loader: "url?limit=10000&minetype=application/font-woff" }, { test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/, loader: "url?limit=10000&minetype=application/octet-stream" }, { test: /\.eot(\?v=\d+\.\d+\.\d+)?$/, loader: "file" }, { test: /\.svg(\?v=\d+\.\d+\.\

php - Alamofire request parameters empty -

i'm trying send post request alarmofire library, request doesn't send parameters properly. my code: let parameters : parameters = [ "email": tfloginemail.text! string, "password": tfloginpassword.text! string ] alamofire.request(url, method: .post, parameters: parameters, encoding: jsonencoding.default).responsejson{ response in //some code uses response } the parameters variable has count of 2 , both values present, response request error email and/or password being empty. edit: php: /** * account login * url - /login * method - post * params - email, password */ $app->post('/login', function() use ($app) { // check required params verifyrequiredparams(array('email', 'password')); // reading post params $email = $app->request()->post('email'); $password = $app->request()->post('password'); $response

javascript - Retrieving Activities returns undefined error from getstream.io API -

i following documentation steps of getstream , went until " retrieving activities " step. running import stream 'getstream' // stream-js v3.5.0 const client = stream.connect(app_key, null, app_id, { location: 'eu-west' }); const user1 = client.feed('user', '1', read_only_token); user1.get({ limit:5, offset:5 }) .catch((errordata) => { console.log(errordata); }); gives me { error: undefined, response: { statuscode: 0, request: { uri: { protocol: "https:", slashes: true, auth: null, host: "api.getstream.io", port: null, hostname: "api.getstream.io", hash: null, search: "?limit=5&offset=5&api_key=...secret...&location=unspecified", query: "limit=5&offset=5&api_key=...secret...&

android - how to use greater than or less than in date in java i have two date in simple date format or as a string -

this question has answer here: how compare dates in java? 11 answers i have date object m getting date date object , converted string object have validate if current date equal next date m getting greater or less date somedate = new date(); // or whatever date dayafter = new date(somedate.gettime() + timeunit.days.tomillis( 2 )); dateformat dateformat=new simpledateformat("yyyy-mm-dd"); string dayafterddate=dateformat.format(dayafter); editoradddetail1.putstring("days", formatteddate); //current date date date=new date(); simpledateformat simpledateformat= new simpledateformat(); date today = new date(date.gettime() + timeunit.days.tomillis(0 )); dateformat dateformat=new simpledateformat("yyyy-mm-dd"); string todayddate=dateformat.format(today); you can compare 2 dates number of ways. can use below: simpledateformat sdf

Guava : LinkedHashMultimap values as list and not String -

i reading guava's linkedhashmultimap , thought might useful me. i have requirement such have map follows: key:value b c d p q p r if above input in map, want use linkedhashmultimap create map like: key : value list<b,c,d> p list<q,r> tried using linkedhashmultimap has following issue: maplen.entries().stream().foreach(entry -> { system.out.println("maptemp2 key + " + entry.getkey()); system.out.println("maptemp2 value + " + entry.getvalue()); }); above prints string values in map , not list<string> . can pointout how can done. (kindly note: aware of normal core java solution of iterating, checking , creating list , inserting map.) as can see in javadoc, multimap#entries() returns collection<map.entry<k,v>> - basically, iterate on each key/value pair, instead of key/(value set). so, try turning multimap<k, v> standard map<k, list<v>

model view controller - Insert image into database with c# -

i want upload image database (shoppingitems) or save image folder in project , insert path of image db. can help? code (view): @using (html.beginform("index3", "upload", formmethod.post)) { @html.textboxfor(x => x.itemname, new { @class = "form-control", placeholder = "item name", required = "required" }) <br /> @html.textboxfor(x => x.price, new { @class = "form-control", placeholder = "item price", required = "required" }) <br /> @html.textboxfor(x => x.quantity, new { @class = "form-control", placeholder = "item quantity"}) <br /> @html.textboxfor(x => x.authoridentity, new { @class = "form-control", placeholder = "username", required = "required" }) <br /> // image upload should <br /> @html.textboxfor(x => x.category, new { @class = "form-control&q

javascript - Disable toggle inheritance from parent tag -

hi wondering if possible override or disable inheritance parent tag. what want able make use if "input-group" class having particular tag not inheriting toggle function parent a-tag. the reason i'm doing because i'm using plugin , want add button looking consistent overall theme. here code: <div class="col-lg-12 col-md-6"> <lable class="lfinputlable">from date</lable> <div class="dropdown"> <a class="dropdown-toggle" id="dropdown1" role="button" data-toggle="dropdown" data-target="#"> <div class="input-group"> <!-- comment: want span tag shown under comment not inherit a-tag's toggle function, being inside , --> <span type="button" id="dateremove" class="input-group-addon" ng-click="cleartodate()"><i class="gly

javascript - How to use JS detect user close page on Safari -

i want detect user close page using js, in chrome/firefox use onbeforeunload event, in safari (on macos , ios) doesn't work (but mdn work...) in safari on macos, onbeforeunload work first time refresh/close page. i try unload, beforeunload, pagehide not work. please try following. window.unload = function () { // add code here }; here documentation https://www.w3.org/tr/dom-level-2-events/events.html

java - App crashes on pressing the back button from a Camera Activity -

Image
i'm trying make motion detector app captures images on motion detection. working fine & saving images. problem app crashes when press button camera activity return home activity. how fix ? here code: public class motiondetectionactivity extends sensorsactivity { private static final string tag = "motiondetectionactivity"; private static final string enable_motion_detection="switch_md"; private static surfaceview preview = null; private static surfaceholder previewholder = null; private static camera camera = null; private static boolean inpreview = false; private static long mreferencetime = 0; private static imotiondetection detector = null; public static mediaplayer song; public static vibrator mvibrator; private static volatile atomicboolean processing = new atomicboolean(false); public int my_permissions_request_camera; /** * {@inheritdoc} */ @override public void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate);

javascript - CSS, HTML, Make div text remain on middle of its div regardless of text -

this question has answer here: how centre absolutely positioned content of unknown width? 3 answers i have text in middle of webpage inside div tag, not yet on middle, need on middle default. there button there when click, text in middle change. problem that, when changed text, not centered anymore. want that, text should @ center regardless of text content. $("#mybutton").on('click', function() { $('#throbber_status_info').html('texxxxxxxxxxxxxt'); }); #throbber_status_info { position: absolute; color: black; top: 53%; left: 50%; margin: 0px auto; } <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <button id="mybutton"> click me </button> <div id="throbber_status_info" style="">text</d

sybase ase - Sybse ASE Configuration for Fluent NHibernate -

i new fluent nhibernate. is there configuration available sybase ase? if not, how create one? please point me right resource? i'm not sure particular hibernate variation, hibernate in general, see: • https://community.jboss.org/wiki/hibernatesybaseintegration • http://infocenter.sybase.com/help/topic/com.sybase.infocenter.dc20155.1570/html/os_sdk_nf/os_sdk_nf76.htm

Rails i18n inflections for error messages -

does know how define gender attributes in model? when error messages appear can give them specific gender such as: la dirección no puede estar en blanco ( address can't left blank) - address has female article in spanish el usuario no puede estar en blanco ( user can't left blank) - user has masculine article in spanish all of obiously using i18n inflections in specific rails /config/locales/language.yml file ------ --------- please it's not duplicate because i'm not defining key_vale relationship "possible duplicate" suggest, i'm working actual attributes model when use things such as: app/views/tablename/new.html.erb <% if @tablename.errors.any? %> <h2>los siguientes errores no permitieron que se salvara este elemento</h2> <ul> <% @tablename.errors.full_messages.each |msg| %> <li><%= msg %></li> <% end %> </ul> i can article (based on gender) before actual mess

java - Unable to send cookies through angular2 web app in post request -

im running 2 different servers on same instance different port numbers, 1 node(front-end) , tomcat(back-end). example: http://localhost:4021 node server (angular2 web app), http://localhost:8090 tomcat server (java) im able data 8090 before login no issues that, when login 2 cookies set browser through backend. whenever make request data these 2 cookies has sent browser every time server in request headers not being sent. i tried sending "withcredentials: true" in request options did not worked. let headersdefult = new headers({'content-type':'application/json;charset=utf-8'}); let requestoptions = new requestoptions({ headers: headersdefult, withcredentials: true }); httppost(link, payload): observable<any> { let url = 'http://localhost:8090/'; let self = this; return this.http.post(url, payload, requestoptions) .map(this.extractdata) .catch(this.handleerror); }

python - Embedded linux printer using cups raster driver -

i'm busy project make custom printer. rpi/beaglebone connected gantry stepper motors , print-head. i'm working on getting setup print image memory (with python), want able print format application. at point think easiest way setup cups on rpi appear network printer on wi-fi. i've seen few tutorials showing how regular usb printer. so i'd know how write custom cups raster driver takes file , saves raster image in memory @ specific dpi. otherwise, i'd know if there easier way this. seems 1 should able query cups raster version of job in queue, not so?

python - I can't place a call using Skype4Py API in Windows.The application goes on wait state and then call drops. -

i have been trying connect skype using skype4py api.all goes until try call contact.the terminal shows calling designated user call doesn't connect.is wrong code or has microsoft discontinued support such third party apis. here found on microsoft's support page third party apis code snippet same: found = false f in skype.friends: # print f.handle if f.handle == cmdline: found = true print 'calling ' + f.handle + '..' skype.placecall(cmdline) break if not found: # print 'call target not found in contact list' sys.exit() this output of code: connecting skype.. calling live:ronakshah983.. the code stops @ , call isn't connected.i have tried replacing username address of user same problem occurs. have tried lot of researching can't figure out wrong. tips? found solution finally.the problem skype has disabled third party apis latest version(version 7.x).i installed older version(version 6.x)

php - Why I obtain this "Class App\Listeners\LogAuthenticationAttempt does not exist" error trying to log in using a custom user provider? -

i pretty new in php , laravel framework , going crazy trying implement following task. i trying follow tutorial implement custom user provider : https://blog.georgebuckingham.com/laravel-52-auth-custom-user-providers-drivers/ i using larave 5.3 version. i briefly expain need: laravel application front end application, business logic, included user authentication, performed java end application exposes rest web services. performing call to: http://localhost:8080/extranet/login and passing username , password basic authentication obtain json response represent logged user: { "username": "painkiller", "email": "painkiller@gmail.com", "enabled": true } so, in laravel application, have perform call , parse previous returned json object generate authenticated object front end application session. i think previous custom user provide r neater , natural solution it, obtaining erro, explain situation. i h

javascript - How to set global variable in query.on() -

var loadlatitude = ""; query.on("child_added", function(messagesnapshot){ var messagedata = messagesnapshot.val(); // gets key particular entry var key = messagesnapshot.getkey(); // create object var obj = {key:key, url:messagedata.url, longitude:messagedata.longitude, latitude:messagedata.latitude, filename:messagedata.filename}; arr.push(obj); loadlatitude = messagedata.latitude; s = s+ "<p align='center'><img src='" + messagedata.url + "' style=' border-style:solid; border-width:5px; border-radius:5px; margin-left: auto; margin-right: auto; width: 300px; height:300px;'/>"+messagedata.filename+messagedata.latitude+messagedata.longitude+"</p>"; $("#photolist").html(s); }); i retreive latitude , longitude firebase database. however, unable save global variable.

ios - Real time audio effects on streaming playback -

i'm developing audio streaming playback audio effects such distortion , reverb on ios. in understanding, audio unit can add these audio effects. but, not find way apply them on streaming playback. the image achieve following... audio queue service receives , stores audio data streaming data. audio queue gives data audio unit or audio graph. audio unit adds effects , plays in real time. do think can achieve design image ? the audio queue api adds latency pseudo-real-time audio effects processing. if use audio unit api recording input short buffers (6 milliseconds or less on newer ios devices), total audio graph latency might tolerable.

Error connecting to Azure Virtual Network - Point to Site -

Image
i followed tutorial create point-to-site connection: https://docs.microsoft.com/en-us/azure/vpn-gateway/vpn-gateway-howto-point-to-site-resource-manager-portal now, when try connect vpn error: a certificate not found can used extensible authentication protocol. (error 798) it doesn't work in computer generated self-signed cert. neither works in client installed pfx private key , fails in both same error. any ideas? ok turns out document create certs not complete here , not mentioning client cert , says how create root cert: https://docs.microsoft.com/en-us/azure/vpn-gateway/vpn-gateway-certificates-point-to-site here had make work: create root cert: makecert -sky exchange -r -n "cn=azurerootcert" -pe -a sha1 -len 2048 -ss "azurerootcert.cer" create client cert: makecert.exe -n "cn=azureclientcert" -pe -sky exchange -m 96 -ss -in "azurerootcert" -is -a sha1 then rest documented. have export root cert , up

codenameone - RoundBorder doesnt work for ScaleImageButton -

roundborder doesnt work scaleimagebutton. //it doesnt works scaleimagebutton leavebutton = new scaleimagebutton(leaveicon); leavebutton.getallstyles().setborder( roundborder.create().color(0xffd04b).rectangle(true) ); //it works label leavebutton = new label(leaveicon); leavebutton.getallstyles().setborder( roundborder.create().color(0xffd04b).rectangle(true) ); one more thing how can make roundborder square? there's rectangle() method there other methods other structures instance pentagonal, hexagonal? roundborder rounded, looking roundedborder else. both of these won't work scaledimage* classes rely on background style being image. can wrap class in container , give style want.

android - Google Mobile Vision crashes on some devices -

i used google vision sdk in app read text images. when tested in of our devices worked well. users experience crashes. fount stack trace in google play console: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** build fingerprint: 'htc/htconem9vzw/htc_himawl:6.0/mra58k/669662.19:user/release-keys' revision: '0' abi: 'arm64' pid: 5005, tid: 5713, name: asynctask #7 >>> package_name <<< signal 11 (sigsegv), code 2 (segv_accerr), fault addr 0x7f4d6ab1b0 x0 000000559fa64d10 x1 0000000004349110 x2 0000007f4d6ab120 x3 0000000000000000 x4 00000000000001c8 x5 000000559fad3600 x6 000000559f903df0 x7 00000000043491c0 x8 0000000000000001 x9 0000007f58b696e0 x10 0000000000000008 x11 0000007f4a1c2090 x12 0000007f49362090 x13 00000000000001c5 x14 00000000000001c4 x15 0000000000000000 x16 00000000000001af x17 00000000000031c5 x18 0000007f4a777668 x19 0000007f5f1cc600 x

html5 - Which event is fired when releasing a HTML input range (slider) on touch device? -

in angular 2 app use plain vanilla html5 input type "range" provide user simple slider component. <input type="range" [min]="x" [max]="y" (mouseup)="onreleased()" /> i need know when user released slider. releasing means using mouse dragging finished , mouse button has been released. purpose hook onmouseup event. however, not apply in case use touch device. on tablet can drag slider aroun, when releasing finger event no fired. i know, not mouse, event equivalent on mouse , works on touch devices?

ruby on rails - Override the values in the method -

i have online store. there column price(using gem money ). , there column "discount". , if store manager records price in column "discount", store needs display price(column "discount") think need override "price" in model. don't know how access column "price"? class item < activerecord::base monetize :price_cents monetize :discount_cents def price if self.discount > 0 self.discount else ? if call, self.price turns out called once again method. self[:price] = nil, why? end end end super may work, or consider using decorators kind of stuff.

osx - Jupyter notebook Conda error running MoviePy code -

on macos v 10.11.6, got error running moviepy on jupyter notebook python v 3.5.2 conda v 4.3.8 jupyter 4.2.1 i'm importing , running simple cell: from moviepy.editor import videofileclip ipython.display import html new_clip_output = 'test_output.mp4' test_clip = videofileclip("test.mp4") new_clip = test_clip.fl_image(lambda x: cv2.cvtcolor(x, cv2.color_rgb2yuv)) #note: function expects color images!! %time new_clip.write_videofile(new_clip_output, audio=false) the error is: typeerror traceback (most recent call last) <ipython-input-8-27aee53c99d8> in <module>() 1 new_clip_output = 'test_output.mp4' --> 2 test_clip = videofileclip("test.mp4") 3 new_clip = test_clip.fl_image(lambda x: cv2.cvtcolor(x, cv2.color_rgb2yuv)) #note: function expects color images!! 4 get_ipython().magic('time new_clip.write_videofile(new_clip_output, audio=false)') /users/<username>/anaconda3/envs

sql server - How can I join 3 SQL tables and return latest current date and status? -

i have 3 tables: i'm trying write sql query joins 3 tables return first , last name table a, status of 1 there no 2 logged afterwards , logdate (only want current day) table c. tablea: userid | firstn | lastn | ------------------------- 2324 | john | doe | 2034 | jane | doe | 2946 | mike | blank | tableb: viewid | userid | ----------------- 2315 | 2324 | 8956 | 2034 | 6587 | 2946 | tablec: viewid | logdate | status | ------------------------------------------- 2315 | 2017-02-14 11:03:47.000 | 1 | 2315 | 2017-02-14 10:14:47.000 | 2 | 2315 | 2017-02-14 10:00:19.000 | 1 | in status column of tablec, 1 means viewing , 2 means done viewing, logdate giving date , time of status. tablea , tableb have userid column in common. tableb , tablec have viewid column in common. a person can view document multiple times in 1 day it's possible viewid shows multiple times

ios - Google 400 Error: invalid request Custom scheme URIs are not allowed for 'Web' client type -

Image
when signing gmail in ios app, getting below error (screenshot) , sign-in fields not appear. loading sign-in screen in wkwebview. we using custom uri redirect why google throwing error now. alternatives custom uri? swift 2.3 project using oauthswift v0.6.0 cocoapod this started quite in past week or believe changed google's apis. i have read google deprecating webviews oauth , block requests on april 20, 2017. seen here in google developers blog: https://developers.googleblog.com/2016/08/modernizing-oauth-interactions-in-native-apps.html does mean need use or there viable solution? thought had more time before needing update this. my guess client registered incorrectly in google cloud console. 'web' client typically server or javascript application. ios app should registered ios client. https://developers.google.com/identity/protocols/oauth2installedapp#creatingcred

sending multiple parameters on checkbox submit rails -

i'm having trouble getting multiple parameters submitted when use checkbox submit. how send both parameters? i have 2 items in each row in table, columns "product revenue" , "product title" , use check box on each row select , on submit i'd send both of these values controller. can 1 item working, wasn't able figure out how send second item tried using hidden field, couldn't working. view code <%= form_tag add_multiple_path, method: :post %> <%= check_box_tag 'price_test_datum[product_title][]', p.dimensions[0] %> <% hidden_field_tag('price_test_datum[product_price][]', p.metrics[0].values[0]) %> <%= submit_tag "add selected" %> <% end %> controller code (only 1 item @ moment since both params aren't being sent) def add_multiple params[:price_test_datum][:product_title].each {|p| pricetestdatum.create(product_title: p) } respond_to |format| format.html { redirect

android - WilliamChart not possible to use Animations properly - Easing and methods missing -

i tried simple animation done in williamchart. thing can change duration of animation. i used application on app store " https://play.google.com/store/apps/details?id=com.db.williamchartdemo&hl=de " extract customized code , implement chart. everything working, animation not possible implement (see screenshots). easing , animation methods not available. maybe i've done wrong in gradle. can't myself no more. animation code thank in advance!

date - MYSQL - SUM values of last 10 days -

i have table in mysql: | player1 | player2 | date | fs_1 | fs_2 | jack tom 2015-03-02 10 2 mark riddley 2015-05-02 3 1 ... i need know how many aces (fs_1) player 1 have done before match reported in date_g (10 days before example). this tried without success: option 1 select players_atp.name_p 'player 1', p.name_p 'player 2', date(date_g) 'date', result_g 'result', fs_1, fs_2, sum(if(date_sub(date_g, interval 10 day)< date_g, fs_1, 0)) 'last 10 days' stat_atp stat_atp join backup3.players_atp on id1 = id_p join backup3.players_atp p on p.id_p = id2 join backup3.games_atp on id1_g = id1 , id2_g = id2 , id_t_g = id_t , id_r_g = id_r date_g > '2015-01-01' group id1; option 2 select players_atp.name_p 'player 1', p.name_p 

javascript - Php: Change in list values dynamically without page load -

i have 3 list in form having same option while loading form. but requirement : user selects first option should removed second list , user gives second option should removed third list. there no chances have duplicate choice. <html> <head> <script language="javascript"> function enable_text(status) { status=!status; document.f1.other_text.disabled = status; } </script> </head> <body onload=enable_text(false);> <form name=f1 method=post> <label>first pref : </label> <select name="colors option 1"> <option value="">select 1st</option> <option value="r">red</option> <option value="g">green</option> <option value="b">blue</option> <option value="b">yellow</option> </select> </br></br> <label>second pref : </label> <select name=&

sql - Multi level GROUP BY clause not allowed -

i have following crosstab query transform max(vwdrssta.datum_zeit) maxofdatum_zeit select vwdrssta.antragsnummer ,iif(vwdrssta.system = 'vs', ( select (max(vwdrssta.dunkel)) d vwdrssta ), null) dunkel ,max(vwdrssta.vers_nr_int) versicherungsnummer vwdrssta inner join v_names on (vwdrssta.system = v_names.system_code) , (vwdrssta.ereignis = v_names.ereignis) group vwdrssta.antragsnummer order vwdrssta.antragsnummer pivot v_names.mapped_name; which gives me error "multi-level group clause not allowed in subquery". going wrong code? try vwdrssta.system in group by clause. it should trick. edit detail answer : transform max(vwdrssta.datum_zeit) maxofdatum_zeit select vwdrssta.antragsnummer ,iif(vwdrssta.system = 'vs', ( select (max(vwdrssta.dunkel)) d vwdrssta ), null) dunkel ,max(vwdrssta.vers_nr_int) versicherungsnummer vwdrssta inner join v_names on (vwdrssta.system

python - Make an overloaded operator use an argument -

let's suppose have simple class defines rational number: class rational(object): def __init__(self, numerator, denominator): self.n = numerator self.d = denominator def gcd(self): = self.n b = self.d while b: a, b = b, % b return def simplify(self): gcd = self.gcd() self.n = self.n / gcd self.d = self.d / gcd def __add__(self, other): rat = rational(self.n * other.d + self.d * other.n, self.d * other.d) rat.simplify() return rat now, whenever sum 2 rational instances, rational(2,3) + rational(1,3) , method __add__ automatically simplifies number (returns rational(1,1) ). like def __add__(self, other, simp=true): rat = rational(self.n * other.d + self.d * other.n, self.d * other.d) if simp: rat.simplify() return rat and able rational(2,3) +(0) rational(1,3) returns rational(3,3) , of course rationa

sapui5 - Lazy loading data after initial load -

in section 10 of openui5 developer guide tutorial on routing ( see here ), talks lazy loading. tutorial not show how lazy-load data. scenario: have openui5 app gives list of employees , on detail page shows main employee details , gives access further info, projects, hobbies, , notes selected employee's resume. because in 99.99% of use cases user not wish @ hobbies, prefer not load hobbie data main model app. make choice based on performance concerns. instead detect user has requested see hobbies , load hobbies data current user model. how ? edit: managed discover ontabselect() plumbing [tip other confused folks, openui5 tutorials tend leave stuff out keep on topic - useful @ code of working versions if lost]. after routing in tutorial makes lot more sense. my question remains relevant changes 'user clicks tab , load further json data model. should in oninit() of target controller or before navto() invoked load controller?' can see issue because of async natu

jsonb - Get all JSON keys efficiently on PostgreSQL -

having table create table tbl(data jsonb) i can select keys match pattern object in data column using select keys.key ( select distinct jsonb_object_keys(data) key tbl ) keys keys.key ~ '^fc_[a-z]+$' while gives me desired results pretty slow large number of columns large objects in data column. have not been able find way of creating index on jsonb keys, except via materialized view. there solution give me better performance without overhead?

ios - Can't change size of view in Storyboard -

Image
i using xcode 7.3, can change size of kind of view property , can drag views around. unfortunately, view seems locked while trying edit size of view using mouse. can see in image, when click imageview not giving option resize view. you can go editor > canvas > show resize knobs make changes.

content management system - Prestashop: Buying: Redirect after shipping, step (step #2) -

prestashopers! have such problem: have no different others, can't pass second step! don't understand why. after choose delivery (any of them) redirect page without errors. , started make var_dump!.. (only ru version, think guess do; choose "Мгновенная покупка" , fill fields, takes opportunity buy without logging. link: http://ultradom.com....-khrom-cne.html ). after many searching found have no product in autostep method of ordercontroller.php. go upper parents, , cart.php in classes (cartcore). found method (getdeliveryoptionlist()) gave me empty array, see empty result of getproducts(). var_dump $this->_products , filled, time empty , empty hit getdeliveryoptionlist(). not know logic of prestashop work, can't explore find out how prestashop works @ all. can me? maybe sorted out such problem? will thankfull.

java - javafx communication between controllers -

i'm new in javafx , need in sharing data between 2 controllers. i have simple window has simple menu: @fxml label labellabel; @fxml menuitem sbor; @fxml menuitem alim_poluch; @fxml menuitem paragraphs; @fxml menuitem poluch_cat; @fxml menuitem visluga_vid; @fxml anchorpane menupane; @fxml mdicanvas mdicanvas; @fxml tab tabone; @fxml vislugavidcontroller vid; @fxml tab tabtwo; @fxml public void initialize() { mdicanvas mdicanvas = new mdicanvas(mdicanvas.theme.default); menupane.getchildren().add(mdicanvas); anchorpane.setbottomanchor(mdicanvas, -1d); anchorpane.setleftanchor(mdicanvas, 0d); anchorpane.settopanchor(mdicanvas, 0d);//button place anchorpane.setrightanchor(mdicanvas, 0d); sbor.setonaction(new eventhandler<actionevent>() { public void handle(actionevent event) { stage stage = new stage(); anchorpane pane = null; try { pane = fxmlloader.load(getclass().g

javascript - JS & NodeJs: Read table from DB with AJAX and display in table -

Image
i’m working on project nodejs , i’m trying read mysql database ajax display db table rows in html table. i think i’m having problem how handle/store data once out of db. here structure of db(completely fictitious data of course), , code far: also here if console.log(serverdata); seems me data should in kind of nested array or kind of structure allows me identify value in array i’m accessing. server.js var http = require('http'); var fs = require('fs'); var mysql = require('mysql'); var url = require('url'); var mime = require('mime'); var config = json.parse(fs.readfilesync('config.json')); var host = config.host; var port = config.port; var connection = mysql.createconnection({ host : 'localhost', user : 'root', password : 'root', database : 'innovation_one' }); function connecttodb(){ connection.connect(function(err){ if (err){ console.log('error: 

c# - Getting Access Denied issue while using wmi process to restart a process -

i trying restart service remotely finding process id through wmi commands. able process , restart service when use individual id. when use generic id, getting access denied exception. generic id having permanent admin access server. attaching code piece. getting exception @ starting line of foreach . public bool process(string processname, string servername, string serveruserid, string serveridpassword,mdmjobmanager mdmjobmanagerobj,string _logfile) { var processname = "java.exe"; // var processtest = "xxxxxx"; var processtest = processname; var connectoptions = new connectionoptions(); connectoptions.username = @"nu\" + serveruserid; connectoptions.password = serveridpassword; string ipaddress = getipaddress(servername); bool status = false; mdmjobmanagerobj.writetologfile("trying connect server :" + servername, _logfile); managementscope scope = new managementscope(@"\\" + ipaddress + @&

php - Prestashop $category variable doesn't work within another if -

i use prestashop , need add specific slideshow category->id 1 on top of category's products, , it's need within code below: i tried insert code: {if category->id == '1'} ... {/if} within code: {if isset($category)} {if $category->id , $category->active} {if $scenes || $category->description || $category->id_image} ... {if $scenes} ... {include file="$tpl_dir./scenes.tpl" scenes=$scenes} {if $category->description} ... {if tools::strlen($category->description) > 350} ... {else} {$category->description} {/if} ... {/if} ... {else} there's tried insert code {/if} {/if} {/if} {/if} and doesn't work ..

Confusion of Storm acker and guaranteed message processing -

now learning storm's guaranteeing message processing , confused concepts in part. to guarantee message emitted spout processed, storm uses acker achieve this. each time spout emits tuple, acker assign "ack val" initialized 0 store status of tuple tree. each time downstream bolts of tuple emit new tuple or ack "old" tuple, tuple id xor "ack val". acker needs check whether "ack val" 0 or not know tuple has been processed. let's see code below: public class wordreader implements irichspout { ... ... while((str = reader.readline()) != null){ this.collector.emit(new values(str), str); ... ... } the code piece above spout in word count program "getting started storm" tutorial. in emit method, 2nd parameter "str" messageid. confused parameter: 1) understand, each time tuple (i.e., message) emitted no matter in spouts or in bolts, should storm's responsibility assign 64-bit messageid message. correct?