Posts

Showing posts from June, 2011

javascript - Decryption of URL variables without view source revealing decryption code -

from php code, i'm passing 2 variables on url show below: https://www.myurl.com?var1=3940291834f8&var2=7c5b38920001134d8a the problem if encrypt values i'm passing, how going de-crypt them without revealing (from browser's view source option) how encryption performed , making encryption effort moot? the variables function in same way username , password java script uses poll variable values , connection status of iot device. any appreciated.

escaping - cmake: How to include literal double-quote in custom command? -

i'm trying create custom command runs environment variables, such ldflags, value needs quoted if contains spaces: ldflags="-lmydir -lmyotherdir" i cannot find way include argument in cmake custom command, due cmake's escaping rules. here's i've tried far: command ldflags="-ldir -ldir2" echo blah verbatim) yields "ldflags=\"-ldir -ldir2\"" echo blah command ldflags=\"-ldir -ldir2\" echo blah verbatim) yields ldflags=\"-ldir -ldir2\" echo blah it seems either whole string quoted, or escaped quotes don't resolve when used part of command. would appreciate either way include literal double-quote or alternative better way set environement variables command. please note i'm still on cmake 2.8, don't have new "env" command available in 3.2. in advance! note not duplicate of cmake: when quote variables? none of quoting methods work particular case. the obvious choic...

javascript - Webpack offline plugin how to add assets to sw.js -

i'm trying add webpack , offline-plugin existing project use gulp - webpack working fine adding offline-plugin giving hard time, what did adding offline-plugin throw npm webpack.confing.js const {resolve} = require('path') const webpackvalidator = require('webpack-validator') const offlineplugin = require('offline-plugin'); module.exports = webpackvalidator({ context: resolve('app/scripts'), entry: ["./main.js","./skrollr.js"], output: { filename: "[name].[hash].js", },devtool: 'eval', module: { loaders :[ {test:/\.(jsx|js)$/,exclude: /node_modules/,loader: 'imports?jquery=jquery,$=jquery,this=>window'}, { test: /\.css$/,exclude: /node_modules/, loader: "style-loader!css-loader" }, { test: /\.eot$/, loader: "file...

javascript - Getting Error Cannot set property 'innerText' of null -

i have scenario of adding text html element using id. getting error. first html gets dynamically loaded adding add variable html element using id detail geocoder.geocode({ 'location': temp1 }, function(results, status) { if (status === 'ok') { if (results[1]) { add = results[1].formatted_address; var marker0 = createmarker({ position: temp1, map: map, }, '<h1>details</h1><p id="detail"></p>'); } else { window.alert('no results found'); } } else { window.alert('geocoder failed due to: ' + status); } }); var geocoder = new google.maps.geocoder; var infowindow = new google.maps.infowindow(); var add; /* * marker creater function (acts closure html parameter) */ function createmarker(options, h...

New Ionic push registering device tokens -

i´ve set necessary push notifications described here . i registering device on startup like: // register pushio $ionicpush.register().then(function(t) { return $ionicpush.savetoken(t, {ignore_user:true}); }).then(function(t) { console.log('token saved:', t.token); }); the device token logged "token saved: xxxxthetokenxxxx". now i´m sending push curl , ionic.io dashboard. status (checked curl) of message 200 , no errors. push notification sent: {"meta": {"request_id": "8d9c69ce-b66c-4002-8cb3-f91c57505b0f", "version": "2.0.0-beta.0", "status": 200}, "data": []} but device isn´t recieving notification. think due savetoken() function. savetoken() saving token? does have clue how solve this? update: i´m using code send push: <?php $curl = curl_init(); $token = "mytoken"; curl_setopt_array($curl, array( curlopt_url => "https://api....

python - Tkinter/matplotlib multiple active windows on osx -

i have script follows executes on windows machine import matplotlib.pyplot plt import numpy np import tkinter class main(tkinter.frame): #main window def __init__(self, root): # initialise tkinter.frame.__init__(self) self.root = root tkinter.button(self, text='new spots', command=self.newspots).grid() def newspots(self): x = np.random.rand(10) y = np.random.rand(10) plt.scatter(x,y) plt.show() if __name__=='__main__': root = tkinter.tk() app = main(root).grid() root.mainloop() when running on windows, opens window simple button, , clicking button opens matplotlib viewer 10 dots plotted in random positions. each subsequent press of button adds further ten dots. executing code on mac produces same initial window, , first press of button generates plot , opens viewer expected. however, becomes impossible interact original window (only controls on viewer work) until viewer window ...

mysql - SQL: Selecting/Ignoring records on the basis of tables in an array -

given following schema: create table test (`id` int, `testname` varchar(7), `description` varchar(55)); insert test (`id`, `testname`, `description`) values (1, 'test1', 'td1'),(2, 'test2', 'td2'),(3, 'test3', 'td2'); create table forcedata (`id` int, `forcedata` varchar(7), `description` varchar(55)); insert forcedata (`id`, `forcedata`, `description`) values (1, 'f1', 'fd1'), (2, 'f2', 'fd2'), (3, 'f3', 'fd3'); create table temp (`id` int, `tempname` varchar(7), `description` varchar(55)); insert temp (`id`, `tempname`, `description`) values (1, 'tm1', 'tmd1'),(2, 'tm2', 'tmd2'); create table sensor (`id` int, `sensorname` varchar(7), `description` varchar(55)); insert sensor (`id`, `sensorname`, `description`) values (1, 's1', 'sd1'),(2, 's2', 'sd2'); i...

Accessing Poloniex HTTP API with Java -

i try connect poloniex.com api https://poloniex.com/support/api/ says: (all calls trading api sent via http post https://poloniex.com/tradingapi , must contain following headers: key - api key. sign - query's post data signed key's "secret" according hmac-sha512 method. additionally, queries must include "nonce" post parameter. nonce parameter integer must greater previous nonce used.) but {"error":"invalid api key\/secret pair."} my hmac512digest works fine, i've checked it. there must wrong in code. can please help? public class pol2 { public static string poloniex_secret_key = "12345"; public static string poloniex_api_key = "abx"; public static void main(string[] args) { try { accesspoloniex(); } catch (ioexception e) { e.printstacktrace(); } } public static final void accesspoloniex() thr...

C# - Tryinig to do exchange rates in if/else statement and pass argument into method parameters in main function -

i trying use method calculate exchange rate pass argument method in main. unsure if have converted money cant figure out put parameters when calling method in main. for example: exchange(dont know put here); also unsure if have done exchange method correctly. program runs point of asking currency user whats exchange to, thats when comment out exchange method. stuck, tips? i think might have assign values each of currencies sek, usd ,eur not sure there... any appreciated! (if have enetered code wrong on question im sorry, not sure how make cleaner) ----this console application---- class program { static void main(string[] args) { writemenu(); //exchange(); //exchange(choicefromcurrency, coicetocurrency, valuetoexchange); console.readkey(); } public static void writemenu() { console.writeline("welcome next level currency converter!"); console.writeline("---we---change---your---money---fo...

html - How to create view all function in shopify? -

i want view maximum amount of products can when user clicks view all. i've been following tutorial: https://help.shopify.com/themes/customization/collections/add-view-all-to-collection-pages i've gotten of way through doesn't seem work @ last step. know i've not done basic html need , can't figure out i'm pretty new this. any appreciated. in order make page on store of products, can create catalog page. catalog page found @ /collections/all in online store. automated collection created shopify exist default in store. display products in shop not hidden, including products out of stock. page can on home page or page together. you can learn how @ on shopify's website .

After renaming solution/projects, ASP.NET IIS is looking in the wrong (old) location for the config file -

Image
i error: "the requested page cannot accessed because related configuration data page invalid." delete .vs folder (should in same directory .sln file). visual studio recreate correct paths.

rxjs - angular 2, return Observables according to if statement -

hi want create this. somefunction():observable<response>{ let response$ = new observerable(); if (...){ response$ = this.http.get(url1) }else{ response$ = this.http.get(url2) } return response$ } if subscribe it, i'm getting error cannot read property 'subscribe' of undefined thanks in advance! edit--------- actual function using ionic 2 , cordova. checks whether app on mobile device or not , opens popup url (intend used social logins) once window closed need perfom http.get request fetch token backend. public social(providername:string):observable<response>{ let response$ = new observable<response>(); let url =providername+'/someurl' let authwindow; if(window.cordova){ let authwindow= inappbrowser.open(url, '_blank', 'location=no'); authwindow.addeventlistener('loadstop', event => { if(event.url.indexof(`${providername}/callback`) > -1){ authwind...

javascript - Local variable between inner macro calls -

i'm trying create pair of sweet js macros inner , outer macro share local variable: syntax cdo = function(ctx) { let call = ctx.next().value; let dummy = #`dummy`.get(0); let context_id = #`${dummy.fromidentifier("$context$")}`; return #`let ${context_id} = ${call}`; } syntax context = function(ctx) { let func = ctx.next().value; // function keyword let func_name = ctx.next().value; let args = ctx.next().value; // args let body = ctx.next().value; // function body let dummy = #`dummy`.get(0); let context_id = #`${dummy.fromidentifier("$context$")}`; let body_result = #`let ${context_id} = 1234`; (let stx of body.inner()) { body_result = body_result.concat(#`${stx}`); } return #`${func} ${func_name}${args}{${body_result}}`; } context function foo(a, b) { cdo bar(); } what want "context" macro call able assign local variable accessible/assignable inner cdo macro c...

c# - Can't navigation between xaml in frame? -

i have got issues . why did not navigate other xaml? wrong? so, trying make can navigated between 2 or more xaml in frame. here link : https://github.com/englbach/mutiviewinrootpage <splitview.content> <!-- onnavigatingtopage synchronize selected item in nav menu current page. onnavigatedtopage move keyboard focus first item on page after it's loaded. --> <frame x:name="appshellframe"> <frame.contenttransitions> <transitioncollection> <navigationthemetransition> <navigationthemetransition.defaultnavigationtransitioninfo> <entrancenavigationtransitioninfo /> </navigationthemetransition.defaultnavigationtransitioninfo> </navigationthemetransition> </transitioncollection> </frame.contenttransitions> </frame> </splitview.content> public st...

sql - MySQL Update using Wildcard Replace -

i have table route has names 'sap_eah_in_rfc_gb_wmart' , 'sap_eah_in_rfc_gb_tesco' want changing %eas_in% instead of eah_in. have on 3k of entries. can use following? update sap_xref set route = replace(route, 'eah_in', 'eas_in') route 'sap_eah_in_rfc_%'

javascript - How to query Overpass area through leaflet? -

i have openstreetmap leaflet . i'm using this plugin leaflet query overpass. var opl = new l.overpasslayer({ query: "(area['name'='roma']; node(area)['amenity'='drinking_water']);out;", }); but map showing nothing when used plugin. what wrong? note: query working based on this . edit: this query working plugin not on http://overpass-turbo.eu/ ?! var opl = new l.overpasslayer({ query: "(node(bbox)['amenity'='drinking_water'];);out;", }); full example: var attr_osm = 'map data &copy; <a href="http://openstreetmap.org/">openstreetmap</a> contributors', attr_overpass = 'poi via <a href="http://www.overpass-api.de/">overpass api</a>'; var osm = new l.tilelayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {opacity: 0.7, attribution: [attr_osm, attr_overpass].join(', ')}); var map = new l.map('map...

onRequestPermissionsResult is not called in fragment android -

i taking runtime permission user using below code in fragment . if (contextcompat.checkselfpermission(getactivity(), manifest.permission.read_external_storage) != packagemanager.permission_granted) { activitycompat.requestpermissions(mactivity, new string[]{manifest.permission.read_external_storage}, storage_permission_code); } and overriding @override public void onrequestpermissionsresult(int requestcode, string permissions[], int[] grantresults) { switch (requestcode) { case 21: { // if request cancelled, result arrays empty. if (grantresults.length > 0 && grantresults[0] == packagemanager.permission_granted) { ...

java - maven unable to authenticate via proxy -

i using maven 3.3.9 build project. running maven via command line. created simple project, while try execute mvn clean install i getting below error [error] plugin org.apache.maven.plugins:maven-clean-plugin:2.5 or 1 of dep endencies not resolved: failed read artifact descriptor org.apac he.maven.plugins:maven-clean-plugin:jar:2.5: not transfer artifact org.apa che.maven.plugins:maven-clean-plugin:pom:2.5 from/to central (https://repo.maven .apache.org/maven2): not authorized proxy , reasonphrase:proxy authentication required ( isa server requires authorization fulfill request. access web proxy filter denied. ). -> [help 1] my environment under proxy, using proxy connecting internet. while googling error found need set proxy made necessary changes in settings.xml . but unable connect repository. here want highlight pc proxy there no username , password required. setting.xml <proxy> <id>optional</id> <active>true</active> ...

javascript - How can I add link on the background banner? -

how can add link on background banner displayed in background of whole page? .wrapper { width: 100%; display: inline-block; text-align: center; } .banner { background-position: 50% 0; background-repeat: no-repeat; } .banner { background-image: url(https://s15.postimg.org/n11a3vr8b/image.jpg); background-repeat: repeat-y; } .wrapper.banner { background-image: url(https://s10.postimg.org/hyzxs6mmx/image.png); background-repeat: no-repeat; } .banner-link { position: absolute; width: 100%; display: block; margin: 0 auto; height: 200px; } .page-content { background-color: white; width: 300px; display: inline-block; } <div class="banner"> <div class="wrapper banner"> <a href="#" class="banner-link"></a> <div class="page-content"> lorem ipsum dolor sit amet, consectetur adipiscing elit, sed eiusmod tempor incididu...

jvm - Memory Allocation in Java for Parameters -

would data in following statement stored automatic memory allocation, or dynamic memory allocation or both myfunction(new myclass()); thank you! the terms “automatic memory allocation” , “dynamic memory allocation” make no sense in context of java. in java, memory managed execution environment. in other programming languages, terms “automatic storage” , “dynamic storage” used distinguish between storage, automatically deallocated when going out of scope, , storage, requires explicit deallocation action performed application. in java, there no explicit deallocations @ all. find people , literature continue distinguish between stack , heap, latter contains objects, lifetime may exceed execution of method in created. this, however, logical separation, might not reflect how particular jvm implementation works. the java® language specification doesn’t mandate details workings of this. there 2 spots @ all: 15.12.4.5. create frame, synchronize, transfer control ...

c# - WebClient DownloadFileAsync() does not work -

webclient downloadfileasync() not work same url , credentials... any clue? static void main(string[] args) { try { var urladdress = "http://mywebsite.com/msexceldoc.xlsx"; using (var client = new webclient()) { client.credentials = new networkcredential("username", "password"); // works fine. client.downloadfile(urladdress, @"d:\1.xlsx"); } /*using (var client = new webclient()) { client.credentials = new networkcredential("username", "password"); // y creats file 0 bytes. dunow why it. client.downloadfileasync(new uri(urladdress), @"d:\1.xlsx"); //client.downloadfilecompleted += new asynccompletedeventhandler(completed); ...

multithreading - Sleep a long running process -

i have app iterates on tens of thousands of records using various enumerators (such directory enumerators) i seeing os x saying process "caught burning cpu" since taking large amount of cpu in doing so. what build in "pressure valve" such a [nsthread sleepfortimeinterval:cpudelay]; that not block other processes/threads on things dual core machine. my processing happening on separate thread, can't break out of , re-enter enumerator loop , use nstimers allow machine "breathe" any suggestions - should [nsthread sleepfortimeinterval:cpudelay]; working? i run stuff inside dispatch queue: if(!primarytask)primarytask=dispatch_queue_create( "com.me.app.task1",backgroundpriorityattr); dispatch_async(primarytask,^{ [self dosync]; }); try wrapping processing in nsoperation , set lower qos priority. here little more information: http://nshipster.com/nsoperation/ here code example made up. op...

paypal sandbox - In-Context Checkout: No response handler found for post message response error -

i use advanced in-context checkout integration . i ajax , utilize these functions, docs explain it: paypal.checkout.setup() paypal.checkout.initxo() paypal.checkout.startflow() paypal.checkout.closeflow() and annoying error after execute payment step . didn't bother explain anywhere api docs. missing. new error("no response handler found post message response "+t.name+" in "+window.location.href); what error mean? kind of response handler post message response expected? how provide it? my client side code simple following: oncheckoutbtnclick(ev) { paypal.checkout.initxo(); $.post('/checkout', { user: json.stringify(this.props.user), data: json.stringify(this.props.wcs), }) .done(res => { paypal.checkout.startflow(res.approval_url); }) .fail(err => { paypal.checkout.closeflow(); }); }, and server side follows: router.post('/checkout', (req, res, next) =...

React Native Router Flux Redirect Scene on Login Example -

i'm looking example of using react native router flux redirect user new scene once authentication has been validated. assuming have defined router component so: <router> <scene key="root"> <scene key="login" component={login} title="login" initial={true} hidenavbar="true" duration={1} /> <scene key="home" component={home} title="home" hidenavbar="true" duration={1} /> </scene> </router> what needs updated in <router> redirect login home ? if router component nested within drawer component, where/how update state specify user logged in? you should use actions.home() in login component authentication completed. router component doesn't need change. and second question, can't have global states(unless want complicate simple app). use one, have use redux or similar libraries.

xslt - XSL use regex group result + other element outside regex path for one outcome element -

<xsl:variable name="groups" as="element(group)*"> <xsl:analyze-string regex="^^([0-9-]+)([a-z ]*)[ ]*([\(](.*)[\)])*$" select="/fault/informations/restriction1"> <xsl:matching-substring> <group> <x><xsl:value-of select="regex-group(1)"/></x> <y><xsl:value-of select="regex-group(4)"/></y> </group> </xsl:matching-substring> </xsl:analyze-string> </xsl:variable> it allready in xsl analyze-string -> matching-substring multiple variables but question how use on example concate eg regex-group(1) other element outside regex path "/fault/informations/restriction2" so simple imput xml: <fault > <information> <reference1>22-00 x (aa - 03 stolat)</reference1> <opr>sample sam (66-33) sample</opr> </information> </fault> and output have in 1 element ...

Apache Camel Endpoint URI validation -

when got error inside endpoint uri camel context wont start. seems camel validates in first step every endpoint uri before starting context. can pleas tell me, how works? am right? cant figure out. yes camel validates has been configured correctly when startup. happens part of starting camel routes. its misconfiguring other software report error fix. there tooling can use validate source code find endpoints has been misconfigured. wrote blog entry this: http://www.davsclaus.com/2016/01/cheers-fabric8-camel-maven-plugin-to.html

apache - Do I need an index for every field when using a BinaryObject? -

i've been doing experiments apache ignite. i've developing flexible object based on following code public static void main(string[] args) throws igniteexception { ignite start = ignition.start("examples/config/example-ignite.xml"); cacheconfiguration<integer, binaryobject> cfg = new cacheconfiguration<>(); cfg.setqueryentities(new arraylist<queryentity>() {{ queryentity e = new queryentity(); e.setkeytype("java.lang.integer"); e.setvaluetype("binarytest"); e.setfields(new linkedhashmap<string, string>(){{ put("name", "java.lang.string"); }}); add(e); }}); ignitecache<integer, binaryobject> cache = start.getorcreatecache(cfg).withkeepbinary(); binaryobjectbuilder builder = start.binary().builder("binarytest"); builder.setfield("name", "test"); cache.put(1, builder.build()); querycursor<list<?>> query = cache.query(new sq...

clojure - What does :scope "provided" mean? -

i've seen lot of places dependencies in clojure project marked :scope "provided" ( example ). what mean? you can read maven scopes, since same thing. difference between maven scope compile , provided jar packaging . far can understand, if use lib in project, should add these dependencies project.clj, lib (still can mistaken) there other scopes can use: https://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#dependency_scope

javascript - JSON - How to give onclick element in script? -

how give onclick function id in javascript? eg: onclick function oclick="function('#id')" , need action made in div. each buttons contain own id 's. couldnt figure out how use element generate using json. i prefer javascript rathar jquery. function myfunction(arr) { var out = ""; var i; for(i = 0; i<arr.length; i++) { out += '<button onclick="function('#' + arr[i].ids + '')">' + arr[i].blaah + '</button><br>'; } document.getelementbyid("id01").innerhtml = out; } do need this? var arr = ["id1", "id2", "id3", "id4"] function onclick() { alert("you clicked button id: " + this.id); } function createbuttons(arr) { var out = document.getelementbyid("out"); (var = 0, l = arr.length; < l; i++) { var node = document.createelement("butt...

html - How do I put images next to each other? -

i want make slide show put images won't show next each other. i have made code, can't figure out how put next each other. each image same size: 960 x 600 thanks in advance. html <div class="container">     <img src="images/logo.png" alt="club penguin item codes" align:"left" class="logo" />   <nav>    <ul class="navigation">    <li><a href="index.html" class="active">home</a></li>    <li><a href="clothing/index.html">clothing items</a></li>       <li><a href="furniture/index.html">furniture items</a></li> <li><a href="igloos/index.html">igloos</a></li> <li><a href="stamps/index.html">stamps</a></li> <li><a href="music/index.html">music</a>...

php - How to reformatted array -

i have array indexes like $array = array( "first_name" => "test", "last_name" => "testsurename" ); i need convert to: $array = array( "0" => array("first_name" => "test"), "1" => array("last_name" => "testsurename") ); try this, $array = array("first_name"=>"test","last_name"=>"testsurename"); $newarray = array(); foreach($array $key=> $val) { $newarray[][$key] = $val; } print_r($newarray); output : $array = array( "0" => array("first_name" => "test"), "1" => array("last_name" => "testsurename") ); demo

c# - Insert data to multiple tables -

i need inserting data multiple tables. have 3 tables: revizija (rev_id, broj_rev) verzija (verz_id, broj_verz, rev_id) program (prog_id, naziv_prog, verz_id) connected fk - revizija verzija , verzija programski sustav. my insert fails when try run program. sqlconnection con = new sqlconnection(configurationmanager.connectionstrings["database1"].connectionstring); sqlcommand xp = new sqlcommand("insert revizija values(@broj_rev)", con); xp.parameters.addwithvalue("@broj_rev", textbox5.text); con.open(); xp.executenonquery(); con.close(); sqlcommand xp1 = new sqlcommand("insert verzija values(@broj)", con); xp1.parameters.addwithvalue("@broj", textbox4.text); con.open(); xp1.executenonquery(); con.close(); sqlcommand xp4 = new sqlcommand("insert program values (@naziv_prog)", con); xp4.parameters.addwithvalue("@naziv_prog", textbox2.text); con.open(); xp4.executenonquery(); con.close(); ...

c# - Insert a user interface in a DLL -

in project have implemented plugin manager: https://code.msdn.microsoft.com/windowsdesktop/creating-a-simple-plugin-b6174b62 in way can add .dll file , make project more modular. wanna know if in 1 of these .dll plugin can add .xaml user interface, , use inside main project visualize content of xaml in main gui. in way can make app more modular not code library user interface. thanks if create project contains wpf usercontrol items, long expose items through dll interface can utilise them in project. you should able verify doing following: 1) within 'dll' project make public class squarecontrol, usercontrol under hood, , canvas containing red square of fixed size. 2) within utilising project, reference dll. 3) within utilising project, in c# code somewhere create instance of squarecontrol, , check in debugger properties expect. 4) create usercontrol within utilising project, , open vs designer control. within empty grid has been created drop instan...

Opening a href link in Selenium Java -

i trying click on following href link in selenium. have tried using xpath , by.linktext() , by.cssselectort() have not able locate element. appreciated driver.findelement(by.linktext("ccc_ph3_sandbox_keybridge: ccc ph3 sandbox keybridge")).click(); and by.xpath() unable locate element webelement course = driver.findelementbyxpath("html/body/table/tbody/tr/td/div/div[2]/table/tbody/tr/td[3]/a/span[1]"); course.click(); css locator : driver.findelement(by.cssselector("a[href*='/webapps/portal']")).click(); here html snippet: <img width="12" height="12" src="/images/ci/icons/bookopen_li.gif" alt=""> <a target="_top" href=" /webapps/portal/frameset.jsp?tab_tab_group_id=_2_1&url=%2fwebapps%2fblackboard%2fexecute%2flauncher%3ftype%3dcourse%26id%3d_2135_1%26url%3d">ccc_ph3_sandbox_keybridge: ccc ph3 sandbox keybridge</a> try using by.partiallink...

django - TypeError at /add/ unhashable type: 'list' -

i got following traceback when try save inline formset in django: django version: 1.10 python version: 3.5.1 installed applications: ['django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'books', 'bootstrapform'] traceback: file "d:\virtualenv\lib\site-packages\django\core\handlers\exception.py" in inner 39. response = get_response(request) file "d:\virtualenv\lib\site-packages\django\core\handlers\base.py" in _get_response 187. response = self.process_exception_by_middleware(e, request) file "d:\virtualenv\lib\site-packages\django\core\handlers\base.py" in _get_response 185. response = wrapped_callback(request, *callback_args, **callback_kwargs) file "d:\virtualenv\lib\site-packages\django\views\generic\base.py...

unacceptable certificate, application verification failure. POCO Openssl -

i trying perform following: generate client certificate,key,bundle generate server certificate,key,bundle and trying perform: -client verification of server certificate -server side verification of client certificate using poco-https. client verifies certificate(server) server fails verify client certificate , "certificate validation error unacceptable certificate 127.0.0.1: application verification failure. used https://jamielinux.com/docs/openssl-certificate-authority/sign-server-and-client-certificates.html client , server certificate/key/csr generation on ubuntu code: client code: **while(1){ try{ sharedptr<privatekeypassphrasehandler> pconsolehandler = new keyconsolehandler(true); sharedptr<invalidcertificatehandler> pinvalidcerthandler = new consolecertificatehandler(true); poco::net::context::ptr m_pcontext = new poco::net::context( poco::net::context::client_use,"client.key.pem","client.cert...

javascript - Socket.io emit() delay / buffer flush? -

i'm using socket.io send messages browser. on node.js side i'm doing socket.emit('message', data); on browser-side i'm doing socket.on('message', handledata); now works fine. testing purposes i'm manually triggering (from node-inspector console) socket.emit() . i'm able 2-3 times after next message takes long time deliver. 10 seconds. my messages rather short. compression enabled , object json {"could about": "this long"} . when testing longer strings, messages sent instantly. has buffering/optimization, in our case, it's important messages sent instantly. does have insight delay? thanks

java - How to convert List<Map.Entry<String, String>> to Javascript array -

i have list in java: list<map.entry<string, string>> list = new arraylist<map.entry<string, string>>(map.entryset()); my question how convert above java list javascript array this: var prevyear = [["2011-08-01",398], ["2011-08-02",255.25], ["2011-08-03",263.9], ["2011-08-04",154.24]]; thanks!

typescript - Angular 2: How to bind select field in model-driven forms? -

i couldn't find example of binding model-driven one-way data bound form value select field. can me find it? below example of non-working code try(jade syntax). select([formcontrol]='registerform.controls["type"]') option(value='value1') value 1 option(value='value2') value 2 it easier thought. select([formcontrol]='registerform.controls["type"]') option([value]='"value1"') value 1 option([value]='"value2"') value 2

java - Issue between android:windowLightStatusBar and Navigation Drawer -

Image
i have set android:windowlightstatusbar true display black icons , text on status bar inside app picture below. however, navigation drawer no longer fit screen, see picture below. because ensure android:windowlightstatusbar works, android:windowtranslucentstatus must set false. workaround? app google calendar seem work fine feature. here's main activity's xml <android.support.v4.widget.drawerlayout 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:id="@+id/drawer_layout" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@color/colortoolbarbackground" android:fitssystemwindows="true" > <linearlayout android:layout_width="match_parent" android:layout_height=...

angularjs - Angular: Setting variables inside $on events, need to call $apply? -

i using angular module sends messages , trying set variable true or false notice not updated in ui unless wrap them inside $apply. best way of doing this. this working code, remove $apply , although variable updated - view never updates. $scope.$on('duscrollspy:becameactive', ($event, $element, $target) => { $scope.$apply(() => { this.ready = true; }); }); anyone ideas best way fix ? calling $apply seems code smell, know listening events on scope isn't considered practice 3rd part angular module. thanks modifying scope inside event requires call $apply(). ( this bound scope btw) there's no way around it. (if need view updated.) $apply called automatically in many places $http promise resolve code ( https://github.com/angular/angular.js/blob/master/src/ng/http.js line 1331-1351) it's not called on events. note, line numbers may change. search function done() so not code smell, standard.