Posts

ios - Two UINavigationItems? -

could explain why there 2 navigationitems ? when log below: nslog(@"%@", self.navigationitem); nslog(@"%@", self.navigationcontroller.navigationitem); i 2 different instances of uinavigationitem : <uinavigationitem: 0x7f85b06f5a20> <uinavigationitem: 0x7f85b06ab640> i have created uinavigationcontroller programmatically once. all uiviewcontroller s have property navigationitem . therefore, because uinavigationcontroller subclass of uiviewcontroller , has property. self.navigationitem 1 presented when controller pushed. documentation navigationitem , it's clear property this unique instance of uinavigationitem created represent view controller when pushed onto navigation controller. self.navigationcontroller.navigationitem would item displayed if apple allowed uinavigationcontroller s nested. however, since isn't allowed, it's best forget it.

Attempting to Pause JMS Queue Consumption from MessageBean fails to establish JMX Connection in WebLogic -

i trying pause jms queue message driven bean on weblogic server using jmx. idea if message fails execute set number of times pauses queues consumption. when attempt connect via jmx failing, though running within weblogic container. following code using, fails on call jmsruntimehelper.getjmsdestinationruntimembean( ctx, queue ); the code below works fine if run within session facade bean called via business delegate (i.e. t3/rmi connection). category access = opentwinsclientproperties.getinstance().getcategory( opentwinsclientproperties.category_access ); string destinationaddresses = access.getvalue( opentwinsclientproperties.access_provider_url ); final string protocol = stringutils.substringbefore( destinationaddresses, "://" ); destinationaddresses = stringutils.removestart( destinationaddresses, protocol ); final string[] destinations = stringutils.split( destinationaddresses, ',' ); string[] hostandport = null; ( string destination : destinations ) { ...

mongodb - Getting "'mongoimport' is not recognized as an internal or external command, operable program, or batch file." when trying to import data from a file -

new mongodb. i'm following this tutorial , , above error when trying follow step 2. i'm putting command windows command prompt, , i've set directory location of 'mongoimport' file (c:\mongodb). i've included same directory in path, , primer-dataset.json file saved in location. i'm confident mongodb installed properly. i had same problem. need navigate in command prompt mongoimport.exe file lives. try running command in tutorial. should put example .json file in same directory

osx - Whats the difference between 127.0.0.1 and ::1 -

for couple day fighting set apache installed homebrew on osx 10.10 . reason working not local domains trying setup via hosts file. no matter doing http://localhost available trough browser. , i've changed 1 thing. originally in /etc/hosts putting line set local domain: 127.0.0.1 imac.dev and did not work, changed to: ::1 imac.dev which how localhost set in hosts files , works! can explain me why? the first 1 ipv4 address , other signifies , ipv6 local address. loopback address ipv4 127.0.0.1 imac.dev loopback local address ipv6 ::1 imac.dev in current oses ipv6 if enabled, takes precedence on ipv4 might reason having issue. i, had use ipv6 ip address in dns record spf because gmail looking too. whether or not, it's being favored , replace ipv4 eventually. https://en.wikipedia.org/wiki/localhost

How could I make a good application architecture in Python with PyQt? -

Image
i think appication doesn't have architecture. can't figure out how navigate between files correctly. here non-standardized schema of application. each file contains 1 class. the principal problem can't variables class because of architecture of code. if put classes in 1 file, runs want separate classes (which qwindow and qwidget ) in several files. 1. in every parent class, import each child : from childfilename import childclassname for example, in optionwindow class, have : from mainwindowfilename import mainwindowclassname toolbarfilename import toolbarsclassname menubarfilename import menubarclassname note 1 : better lisibility, name files same name classes. *for example : mytoolbar.py contains class mytoolbar(qtgui.qtoolbar)* note 2 : need place empty __init__.py in every folder contains class) note 3 : can place classes in different folders. if so, use : from folder.childfilename import childclassname 2. instantiate , call chil...

c# - Error : Conversion failed when converting date and/or time from character string -

in sql table date_of_birth , date_of_joining data type date . need perform update . i have code , it's showing error - conversion failed when converting date and/or time character string. please help. string sql = "update employees set designation = '" +textbox_beupdtd.text + "', employee_subgroup = '" +combobox_beupdt.text + "', date_of_birth = " + datetimepicker_dobupdt.text + ", date_of_joining = " + datetimepicker_dojupdt.text + " employee_name ='"+combobox_empnm.text+"' "; sqlcommand cmd7 = new sqlcommand(, con7); con7.open(); int o = cmd7.executenonquery(); messagebox.show(o +" : record has been updated"); ' aside sql injection issues sending in user variables directly database, suggest using parameterized queries simplify you're trying do. sqlcommand cmd7 = new sqlcommand("update employees set designation = @designation, emplo...

javascript - How to get JSON array on client_JS from server_JS? -

from nodejs (with express) try send json_array in response client js: asksjsonarray = json.parse(fs.readfilesync("tasks.json", 'utf-8')); app.get('/getarr', function (req, res) { readjsoncontent(); res.json(json.stringify(tasksjsonarray)); //sending json array client_js in response }); on client-side want it, nothing receive: $.get('/getarr').success(function(res) { var currencydata = json.parse(res); if (!currencydata.rates) { // possibly handle error condition unrecognized json response alert("currency data not found!"); } else { taskarr = currencydata; } }) so receive msg 'currency data not found!' ... res.json converts data json, don't have manually: res.json(tasksjsonarray); i believe set appropriate headers, on client, don't have explicitly parse json, jquery you: $.get('/getarr').done(function(currencydata){ if (!currencydata.rates) { // possibly han...