Posts

php - $_POST is empty even though CONTENT_LENGTH is correct -

i've got http post pointed @ 2 different places. the first location handled thirdparty solution , can't see how they're handling data (which must because values getting through , i'm seeing results). in my location , have nginx server (which has never had problems before lots of use). using php read post data , , expect content in $_post variable post $_server["content_type"] => "multipart/form-data" but, though type , $_server["content_length"] correct, i'm getting nothing in $_post , $_request , , when checking file_get_contents('php://input') there nothing inside either. the body small json lump (<1k) . array of objects. to see what's in arrays used echo json_encode( array( "get" => $_get, "post" => $_post, "request" => $_request, "server" => $_server ) ) i've run out of ideas of check now. the entry $_server["php_self"] has str...

java - How to use `transient` members? -

i have serialized class transient members. not sure how use members. public class clientbeanbase extends beanbase { protected rewsstubclient getservicestub( boolean initsession ) { rewsstubclient stub = null; stub = (rewsstubclient) sessionvars.get(constants.session_key_stub) ... } my base class is: public class beanbase implements serializable { protected transient map<string,object> sessionvars = ...; ... } i see sessionvars being null in getservicestub . confused when can use sessionvars in clientbeanbase ? you can use sessionvars whenever like. the thing transient keyword does, tell jvm not serialize particular field in case of object serialization. in other words, reset it's default value when object recreated.

iphone - Override method using runtime library -

i need override - (void)viewwillappear:(bool)animated for viewcontrollers adding nslog(@"blabla") in method. i.e. after every call of viewwillappear invokes implemented realization of viewwillappear + nslog message. possible? if yes, please give me advice. currently have tried code @implementation runtimetest imp previusimp; imp newimp; - (void)ovverrideviewwillappearinviewcontroller:(class)vcclass { newimp = class_getmethodimplementation([self class], @selector(viewwillappear:)); method viewwillappearmethod = class_getinstancemethod(vcclass, @selector(viewwillappear:)); previusimp = method_setimplementation(viewwillappearmethod, newimp); } - (void)viewwillappear:(bool)animated { previusimp(self, @selector(viewwillappear:), animated); nslog(@"log2"); } @end then have @implementation irviewcontroller2 - (void)viewwillappear:(bool)animated { [super viewwillappear:animated]; nslog(@"log"); } @end my custom view...

hibernate - HQL Criterion with join -

i have use case display list of entities using subset of values in full entity. approach have taken create entitylist class fields appear in list. class mapped same table full entity subset of fields. using hql, want filter entitylist returned based on fields in full entity. in example below, want entitylist filtered on description field of entity (which in table not in entitylist class). public interface ithreephasemotorlist { abstract public long getid(); abstract public string getmfg(); abstract public double getpowerunits(); abstract public integer getpoles(); } public interface ithreephasemotor extends imotor { public abstract long getid(); public abstract void setid(long id); public abstract integer getversion(); public abstract void setversion(integer version); public abstract string getidsrc(); public abstract void setidsrc(string idsrc); public abstract string getdescription(); public abstract void setdescription(string description); public abstract string getmanu...

java - Centralized Application properties for multiple system -

i looking open-source solutions allow hosting different properties different applications , allow changes. on change of properties should notify or push change application appropriately. so, instead every application managing properties in physical file , deploying physically; these properties can pushed single system. user have gui load , change properties per right. should allow push mentioned. if have similar open source solutions in mind please advice. is puppet can manage you?

c# - Custom inspection pattern for catch block logging -

i have downloaded trial of resharper 7.1. goal enforce rule our custom logger must used on catch blocks within our c# code-base. example; try{ // amount of code } catch(exception e){ } should illegal, however: try{ // amount of code } catch(exception e){ logger.logexception(e.message, e); } is acceptable. end, have following pattern set detect , re-factor. search pattern: try{ $anystatements$ } catch($exceptiontype$ $exceptionarg$){ $anycatchstatements$ } replace pattern: try{ $anystatements$ } catch($exceptiontype$ $exceptionarg$){ logger.logexception($exceptionarg$.message, $exceptionarg$) $anycatchstatements$ } resharper detecting smells fine, treating replace pattern smell in added line logging being matched $anycatchstatement$ placeholder. how can define placeholder describe "match number of statements in catch block not calls custom logger, , append call logger"? unfortunatley no, i'm using reshar...

wireshark - How can I convert the RTP payload containing SILK-encoded audio into a file? -

i have pcap of voip call involving silk . i'm able see in wireshark rtp payload. rtp headers can understand sample rate (e.g. 24 khz) , frame size (e.g. 20 ms). i'd extract rtp payload , generate file containing silk-encoded audio. the rtp payload format description can see in case of storage in file, each block of audio needs block header, specify sample rate , block size (because block size variable , can different on each frame). how can generate file correct file header ("magic number") , add block header each block of audio? i can use few different programming languages i'm interested in required algorithm, appreciate references code implementations (or perhaps existing tool?). use pcaputil of pjproject : converts captured rtp packets in pcap file wav file or play audio device. can filter pcap file on source or destination ip or port, able deal srtp , supports codecs in pjmedia, including silk (have not tried myself). examples: pcaputil...