Posts

tomcat - Can we inject a request parameter to a http request in apache -

tomcat - Can we inject a request parameter to a http request in apache - we have apache web server acts proxy tomcat server. our web applications hosted on tomcat server , external urls mapped internal urls in apache. the protocol used communication between apache , tomcat ajp13. we required send parameter webapplication when first request client reaches webapplication i.e. when login page requested for. the external url cannot modified since in utilize hence additional http parameters cannot specified. is possible inject request parameter in apache time request ends on tomcat have parameter? create servlet filter checks if particular cookie set. if not, set cookie , create httpservletrequestwrapper injected request parameter. pass wrapped request chain.dofilter(). apache tomcat httpwebrequest

C# non-evil fast array lookup? -

C# non-evil fast array lookup? - i want have big number of class instances homecoming same similar fields of data, in illustration implementation: foreach (someclass sc in someclasses) { system.console.writeline(sc.getdata("1st field")); system.console.writeline(sc.getdata("another field")); system.console.writeline(sc.getdata("and another")); } // ---- within someclass: dictionary<string, string> mydata; public string getdata(string field) { homecoming mydata[field]; } what don't string hashing, lookup , matching has happen on , on 1 time again in illustration (i assume thats how dictionary works). find improve approach. coming c world, thought of assigning fields unique integer key, such can alter array lookup: // ---- within someclass: string[] mydata; public string getdata(int field_key) { homecoming mydata[field_key]; } now field lookup efficient, doesn't sense right in these ...

ide - Delphi XE keyboard errors -

ide - Delphi XE keyboard errors - we have machine running delphi xe professional alter value of keys when typing in ide. alter letters , number keys digit. next key pressed come in next number in sequence 9 , start on @ 0. i haven't found similar posted anywhere else, not easy thing search on. here facts: windows 7 professional 64-bit sp 1 delphi xe , without update 1 (installing update 1 first thing tried prepare it) acer prestige laptop the digits cycle 9 , start on @ zero. typing except delphi ide editor results in right key value. holding shift , key gives corresponding symbol shifted number. example, if next number 5 , pressing shift , key gives % . holding alt , key appropriate function. alt-f open file menu. holding ctrl , key appropriate function. ctrl-z undo. most punctuation, such ,.<>/? , works normally. quitting delphi corrects while, not always. restarting windows same. the problem starts without apparent reason. immediately, oth...

What's the most idiomatic approach to multi-index collections in Haskell? -

What's the most idiomatic approach to multi-index collections in Haskell? - in c++ , other languages, add-on libraries implement multi-index container, e.g. boost.multiindex. is, collection stores 1 type of value maintains multiple different indices on values. these indices provide different access methods , sorting behaviors, e.g. map, multimap, set, multiset, array, etc. run-time complexity of multi-index container sum of individual indices' complexities. is there equivalent haskell or people compose own? specifically, idiomatic way implement collection of type t both set-type of index (t instance of ord ) map-type of index (assume key value of type k provided each t, either explicitly or via function t -> k )? in trivial case every element has unique key that's available, can utilize map , extract key element. in less trivial case each value simply has key available, simple solution map k (set t) . looking element straight involve first extracti...

perl - How do I follow a redirect with Test:WWW::Mechanize? -

perl - How do I follow a redirect with Test:WWW::Mechanize? - i have form, submit_form_ok form codes /process returns redirect / . how can follow redirect create sure it's doing right thing? www::mechanize follows redirects automatically you. so, unless want test sent /process before sent / , shouldn't have care. and, really, if wind in right place right page, care how got there? perl testing

Partial reading of file in Java -

Partial reading of file in Java - i creating java application in need read first few lines of huge text file , processing. possible instead of getting entire file, read first few lines , fetch data? , beingness done using java api. yes, can done. when utilize bufferedreader, example, read (buffer_size) file. can process before reading next fragment... for example, see this tutorial java file api io

ASP.NET MVC, different of Razor syntax and ASP.NET syntax? -

ASP.NET MVC, different of Razor syntax and ASP.NET syntax? - the advantage of razor syntax on asp.net syntax using on short tag "@" instead of "<%= %>"?? is other feature or info binding method razor can do, asp.net syntax not? razor pretty cool, can observe if writing html code in code blocks. declaring big block of c# code, using @. write foreach-loop in that, , write html should echoed out. in asp.net markup, you'd have end c# code block %> , reopen <%. razor, on other hand, can observe when writing html , you. observe set bracket closes loop, without having set within <% %>. handy, , timesaver. for more information: click click. asp.net asp.net-mvc-3