Posts

Featured post

apache - PHP Soap issue while content length is larger -

we have developed soap based webservice post data third party webservice. accepts 4 params. in 1 of parameters accepts xml string no size limit restriction put in place. the webservice works fine in local environment running on php 5.2 , apache2. works content length long 10 mb. in staging server running nginx , php fpm.we have updated max post size , max upload filesize in php.ini , client_max_body param in nginx.conf allow upto 50 mb. but webservice client keeps on loading in staging environment. gives 502 timeout , gives soap error. can me understand issue here?

knockout.js - KnockoutJS Changes Model to Controller -

i have dropdownbox binded videmodel foreach <td> <input class='required' type="text" data-bind="value: muhasebekodu" id="muhasebekodu" /></td> <td> <select data-bind="options: gidertipleri, value: selectedoptionvalue" onchange="setcodefield(this.value);" id="muhcodes" name="muhcodess"></select></td> and model this var self = null; var viewmodel = null; $(document).ready(function () { var giderlers = json.parse(document.getelementbyid('contentplaceholder1_hdnoutgoingtypes').value); var selectedgider = document.getelementbyid('contentplaceholder1_hdnoutgoingtypesselected').value; var odemetipleri = json.parse(document.getelementbyid('contentplaceholder1_hdnfirmpaymenttypes').value); var selectedodemetipi = document.getelementb...

java - Get more than One value and display it -

i checking 'n' number of servers every minute, if servers down mail triggered user server name down. issue facing if more 1 server down getting 1 server name down. how name of servers down. obj = dataaccess.getservers(); //getting status , links of servers mailserver sender = new mailserver(from,password); list<string> downserver = new arraylist(); (map<string, string> objs : obj) { //iterating each server serverstatus = objs.get("status"); if (serverstatus.equals("down")) { servername = objs.get("name"); statusserver=objs.get("status"); } downserver.add(servername); if(!(servername.equals(null))){ sender.sendmail("server status",downserver.get(i),from,to) } without checking reasonability of code or trying improve anything, code should little more following (at least) come clo...

javascript - Complete OpenIDConnect auth when requesting via Ajax -

the normal openidconnect server works like: you go a.com/secure-resource you 302 server your browser handles , sends identity server you login there it sends a.com via post you logged in on a.com , a.com/secure-resource on browser. however have scenario i'm trying solve need help. the user logged in on idserver the user logged in on a.com the user not logged in on b.com we need send ajax call web server b.com (from domain a.com ) b.com configured use openidconnect. but because request b.com via ajax, user cannot redirected idserver. (all in response 302 ) we can go ahead , handle 302 via ajax (i'm still not sure whether work, security-wise). but is there scenario in identityserver/openidconnect designed these situations? with identityserver in scenario setup server b.com use bearer token authentication, need use access token provided a.com in headers of ajax call $.ajax({ url: 'http://b.com', headers: { ...

c# - Replace text in MailItem Body -

i've added ribbon button in outlook explorer, creates new email selected email when clicked. works fine using mailitem.copy method. need replace text in message body different value. the problem email html/richtext formatted email , contain text formatting and/or pictures. , replacing text value in body property loses text formatting , pictures. so code below no good newmailitem.body = newmailitem.body.replace("old value", "new value"); and i've tried loading html , rtf value devexpress richeditcontrol , used richeditcontrol.document.replaceall method try , replace text occurrences. devexpress richeditcontrol changes/formats rtf / html value differently , causes message wrong when html / rtf set in mailitem. i've tried replacing text getting reference word document (see code below). doesn't work either. inspector inspector = newmailitem.getinspector; if (inspector.iswordmail()) { microsoft.office.interop.word.document worddocument...

Where does a browser event's timeStamp come from in Javascript? -

event objects passed event handler callbacks contain event.timestamp of when event occurred, timestamp produced? bubbles underlying os, or generated browser? i'm interested in gauging reliability of timestamp , recognise later timestamp produced less accurate it's be. also, way in timestamp produced vary between platforms , browser implementations? thanks. according dom4 specification §4.2 , it's assigned when event created (you have scroll down bit): the timestamp attribute must return value initialized to. when event created attribute must initialized number of milliseconds have passed since 00:00:00 utc on 1 january 1970, ignoring leap seconds. which leads question of: when event created? can think of 3 times might done: when os notifies browser when javascript main ui thread next able anything when javascript main ui thread dispatch task related event using snippet below, @ least click event, seems vary browser: chrome seems assi...

c++ - Synchronization mode in mutex protected block -

http://www.boost.org/doc/libs/1_58_0/doc/html/atomic/usage_examples.html in "singleton double-checked locking pattern" example of above boost examples, memory_order_consume second load of _instance , memory_order_release store of _instance necessary? thought scoped_lock has acquire , release semantics , first load of _instance has synchronization mode memory_order_consume. under assumption boost primitives used here support same functionality std counterparts, second load not require memory_order_consume since guaranteed synchronized store/release based on acquire/release semantics of mutex , right that. perhaps, use of memory_order_consume based on false assumption load/relaxed may float across mutex/acquire barrier, not possible per mutex guarantees , such memory_order_relaxed fine. the store/release on other hand absolutely necessary because synchronizes first load/consume not protected mutex .