text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
because I neglected to build the shared objects (there were no .so files installed as you can see from the "ls" in the original question). The solution was to add `--with-shared` to my configure options. This however caused other problems. Most notably, `make` failing with "undefined symbol" messages for libiconv. Thi...
[ 0.12517531216144562, -0.1384640783071518, 0.3662055432796478, -0.1808793693780899, -0.2078632265329361, 0.10734518617391586, 0.35284966230392456, -0.3382238745689392, -0.1390669047832489, -0.42600494623184204, -0.09748920798301697, 0.9773451685905457, -0.4457000494003296, -0.02507376670837...
For some of the customers that we develop software for, we are required to "guarantee" a certain amount of spare resources (memory, disk space, CPU). Memory and disk space are simple, but CPU is a bit more difficult. One technique that we have used is to create a process that consumes a guaranteed amount of CPU time (...
[ 0.5225681066513062, 0.18150068819522858, 0.03847436234354973, 0.3550567030906677, 0.48597481846809387, 0.04584232717752457, 0.14104829728603363, -0.11461900174617767, -0.10548887401819229, -0.713101863861084, -0.03349323198199272, 0.754168689250946, 0.08817947655916214, -0.3238482475280761...
pass all of their functionality tests while the spare time process is running as well, then we "assume" that we have met our commitment for spare CPU time. I'm sure that there are other techniques for doing the same thing, and would like to learn about them. So this may not be exactly the answer you're looking for, bu...
[ 0.46623462438583374, 0.00605453085154295, 0.25024762749671936, 0.20121394097805023, 0.33338266611099243, -0.3337414860725403, 0.10923805087804794, 0.03880440816283226, -0.28332945704460144, -0.6232993006706238, -0.09248758852481842, 0.8901551961898804, -0.13281241059303284, -0.159258529543...
user and only run the process under that user. This is of course assuming that you have that level of control on your client's production environment.
[ 0.4358145594596863, 0.1928219497203827, 0.19628293812274933, -0.11237782984972, 0.016970206052064896, 0.008405346423387527, -0.09122361987829208, 0.07800289988517761, -0.23070555925369263, -0.44874927401542664, -0.1410284787416458, 0.8754159808158875, -0.15024180710315704, 0.17347718775272...
As a contractor, out-sourcer and shareware author,I have about 5-10 projects going on at any one time. Each project has a todo list, requirements need to be communicated to other outsources and employees, status needs to be given to clients, and developer's questions need to be answered. Sometimes it is too much... bu...
[ 1.0039268732070923, 0.3666105270385742, -0.3376411199569702, -0.01912866160273552, 0.06061626225709915, 0.22246301174163818, 0.2694839835166931, -0.06666301190853119, -0.20687037706375122, -0.5880450010299683, 0.25436559319496155, 0.5259044766426086, 0.13467681407928467, 0.1701652556657791...
What processes? You should have a look at [No Kahuna](http://nokahuna.com) Easy to use; Free and Pay versions; active, responsive development team.
[ 0.4372047781944275, -0.037582769989967346, -0.2590313255786896, 0.21485787630081177, 0.027747614309191704, 0.08590353280305862, 0.33799710869789124, -0.12162517011165619, -0.46286049485206604, -0.41026902198791504, -0.11924764513969421, 0.07292955368757248, 0.07389577478170395, -0.00196802...
This I think is related to my use of the nlog C++ API (and my question on the nlog forum is [here](http://www.nabble.com/NLogC-problems-with-VB6-IDE-tt19662300s6167.html)); the purpose of my asking this question here is to get a wider audience to my problem and perhaps to also get some more general ideas behind the VB6...
[ 0.0529436320066452, 0.4517351984977722, 0.09517216682434082, -0.2495778352022171, -0.09449677914381027, -0.082180917263031, 0.25259360671043396, -0.11319376528263092, -0.2889236807823181, -0.6437068581581116, 0.004988320637494326, 0.7093455791473389, -0.0622493140399456, 0.2458107173442840...
they are occurring when the binary is being built which suggests to me that it's some kind of linker type problem? Don't know enough about how VB6 binaries are produced to tell. The VB6 binary is produced, but it is corrupted and crashes shortly after it is invoked. Has anyone had any similar experiences with VB6 (doe...
[ 0.14934593439102173, 0.31882262229919434, -0.10480497032403946, -0.0375099778175354, -0.224521666765213, -0.1530153602361679, 0.705759584903717, 0.35477325320243835, -0.24446380138397217, -0.5674635767936707, -0.0725637674331665, 0.37590667605400085, -0.42770472168922424, 0.323128461837768...
the nlog-enabled C++ component from a 'blank' VB6 project doesn't crash it or cause weird build problems. So it isn't a 'native' VB6 issue, possibly an issue with the interaction between nlog and the various components and 3rd party libraries used by other referenced components? 3. As for C++ calling conventions: the n...
[ -0.1001959890127182, -0.0568593330681324, 0.08171086013317108, 0.06885113567113876, -0.30914488434791565, -0.31494250893592834, 0.1397884339094162, 0.09296077489852905, -0.2760150134563446, -0.5061384439468384, -0.07395506650209427, 0.7473642826080322, -0.46872878074645996, -0.207827076315...
that that is immaterial since the API calls are being made from the C++ component; VB6 shouldn't know or care about what the C++ component is referencing (that's as far as my understanding on this goes...) edit2: I should also note that the error message obtained during build is: "Errors during load. Please refer to "...
[ 0.23084710538387299, 0.3103889226913452, 0.09207874536514282, 0.10282663255929947, -0.06182411313056946, -0.15496022999286652, 0.41535088419914246, 0.04653702676296234, -0.21888767182826996, -0.23121514916419983, -0.03918081521987915, 0.5652180910110474, -0.30412086844444275, 0.18378871679...
the problem by using NLog's COM interface (NLog.ComInterop.DLL) from my unmanaged C++ code. Not as easy to do as the C\C++ API but at least it doesn't crash my VB6 components.
[ -0.1975100189447403, 0.19943855702877045, 0.2567785382270813, 0.1690821647644043, -0.07350758463144302, -0.09126634895801544, 0.4610059857368469, 0.3574388921260834, -0.21831616759300232, -0.704720675945282, 0.16361390054225922, 0.6796004772186279, -0.31175583600997925, 0.2981618046760559,...
I want a C program to produce a core dump under certain circumstances. This is a program that runs in a production environment and isn't easily stopped and restarted to adjust other kinds of debugging code. Also, since it's in a production environment, I don't want to call abort(). The issues under investigation aren't...
[ 0.5360822081565857, 0.4124632775783539, -0.3815642297267914, -0.19707614183425903, 0.36506369709968567, -0.3193701505661011, 0.046546030789613724, -0.011204779148101807, 0.0811329185962677, -0.31248581409454346, -0.26366084814071655, 0.5382927656173706, -0.572926938533783, 0.50785994529724...
// Crash the app in your favorite way here *((void*)0) = 42; } } ``` Fork the process then crash the child - it'll give you a snapshot whenever you want
[ 0.3032558560371399, 0.2225617915391922, 0.13094741106033325, 0.18016602098941803, 0.5252636671066284, 0.2217804342508316, 0.11433425545692444, 0.27778539061546326, 0.022630859166383743, -0.4806719422340393, -0.24747373163700104, 0.7155680656433105, -0.2612835466861725, 0.28631019592285156,...
What does it take to get C++ **tr1** members (shared\_ptr especially, but we'd like function and bind and ALL the others) working with **GCC 3.4.4** (for the Nokia **N810** tablet computer). Has anyone done this? Attempted this? It may **not** be feasible for us to upgrade to GCC 4.x to cross-compile for this devic...
[ 0.3446762263774872, 0.06562153995037079, 0.24337422847747803, 0.37866291403770447, 0.04511621221899986, -0.2634267508983612, 0.2968890070915222, -0.2442243993282318, -0.15635289251804352, -0.237894669175148, 0.1249798983335495, 0.5693750381469727, 0.05358535423874855, -0.13477608561515808,...
with 20 more), and keeping code size down is important to us. Thank you! For shared\_ptr from boost, at least, the number of dependencies is pretty small. You can use [bcp](http://www.boost.org/doc/libs/1_36_0/tools/bcp/bcp.html) to extract subsets from boost as well, so you don't need the whole of boost to compile y...
[ 0.6459824442863464, -0.1428462564945221, 0.26111820340156555, 0.18578524887561798, -0.2207554429769516, -0.0808425322175026, 0.16241024434566498, -0.24694795906543732, -0.49073535203933716, -0.07621848583221436, -0.08406803011894226, 0.5871390104293823, -0.2369638830423355, -0.288934171199...
How do I apply the MarshalAsAttribute to the return type of the code below? ``` public ISomething Foo() { return new MyFoo(); } ``` According to <http://msdn.microsoft.com/en-us/library/system.runtime.interopservices.marshalasattribute.aspx>: ``` [return: MarshalAs(<your marshal type>)] public ISomething Foo() {...
[ 0.18665285408496857, 0.4109925329685211, 0.41359254717826843, 0.07127489149570465, 0.34244152903556824, -0.17368493974208832, 0.3598919212818146, -0.6216439604759216, -0.05183957517147064, -0.47631514072418213, -0.23893581330776215, 0.49333494901657104, -0.3693256080150604, -0.161344259977...
I have a rails app that I have serving up XML on an infrequent basis. This is being run with mongrel and mysql. I've found that if I don't exercise the app for longer than a few hours it goes dead and starts throwing Errno::EPIPE errors. It seems that the mysql connection get timed out for inactivity or something like ...
[ 0.19550208747386932, -0.03377993032336235, 0.12003330886363983, 0.14180436730384827, 0.031923651695251465, -0.10889431089162827, 0.34519633650779724, 0.3410215973854065, -0.2895118296146393, -0.5927734971046448, 0.041450873017311096, 0.5218404531478882, -0.10554119944572449, -0.10599593073...
do to prevent this problem from occurring in the 1st place? (e.g. don't time me out!!). * Failing that, is there some code I can insert somewhere to automatically remake the Db connection? Here's a solution: <https://boxpanel.blueboxgrp.com/public/the_vault/index.php/Mongrel_/_MySQL_Timeout> The timeouts on the above...
[ 0.47257089614868164, 0.07221822440624237, 0.10456021130084991, 0.17435689270496368, 0.22453618049621582, -0.09484506398439407, 0.3383224904537201, -0.05706068128347397, -0.2299865335226059, -0.788084864616394, 0.04662351682782173, 0.46972352266311646, 0.1456199586391449, 0.3814098536968231...
I have a web application using ASP.NET 2.0 and I want to know if I should be moving it to ASP.NET 3.5, particularly... what am I missing by not moving to ASP.NET 3.5? I understand the disadvantages, but I don't understand the advantages. What are the biggest benefits of migrating/rewriting? Will I get a speed impro...
[ 0.2400982528924942, 0.07745528221130371, 0.46513813734054565, 0.015129747800529003, -0.07967612892389297, -0.1670035868883133, 0.025630030781030655, 0.04058801382780075, -0.34760674834251404, -0.8168510794639587, -0.07218532264232635, 0.7056382894515991, -0.3795534074306488, 0.072296366095...
.NET 3.5...yet.
[ 0.3709951937198639, -0.21068938076496124, 0.48035740852355957, 0.4332515597343445, -0.012586994096636772, -0.5984970927238464, 0.24782462418079376, 0.16351091861724854, -0.042951084673404694, -0.8790457248687744, 0.11849522590637207, 0.25833573937416077, 0.006102107465267181, 0.32375448942...
Maybe this applied to other Delphi's (I've only used 7). We've got our code broken up so that nearly every DLL in our fairly massive app is in a different folder. 99% of the open source stuff I've downloaded to plug into Delphi have had all their source munged into one folder. It seems like this was an assumption tha...
[ 0.40826478600502014, 0.049251701682806015, -0.15020279586315155, -0.07719890028238297, -0.2038615643978119, -0.13772837817668915, 0.22696642577648163, 0.22747287154197693, -0.3850921094417572, -0.4437851309776306, -0.03655502200126648, 0.5358222723007202, -0.23679181933403015, 0.0288992729...
fact that code is spread around different directories (such as the flatten directories option), so I think it is accepted that this is how many people organize their code. I suspect it's more to do with projects growing organically over time, and whether anyone takes the time to tidy up.
[ 0.6346759796142578, -0.02277486026287079, -0.4216184616088867, 0.19345033168792725, 0.09937099367380142, -0.03887566924095154, 0.18266640603542328, 0.13851290941238403, -0.6154656410217285, -0.629210352897644, -0.11629676818847656, -0.0314016230404377, -0.2157028168439865, 0.05270895734429...
I need to create an installer program that will do install the following: 1. ASP.Net Website 2. Windows Service 3. SQL Express if it isn't installed and the user doesn't have a SQL Server 4. Dundas Charts 5. ASP.Net AJAX v.1.0 6. ReportViewer control (for 2.0 Framework) 7. Check Framework prerequisites (2.0) 8. Config...
[ 0.6713218092918396, 0.058190710842609406, 0.56010901927948, 0.14899387955665588, -0.13127745687961578, -0.4546055793762207, 0.43471670150756836, -0.22099220752716064, -0.07130592316389084, -0.9221606254577637, 0.07966722548007965, 0.6870031952857971, -0.26506757736206055, -0.05458207428455...
What version control systems have you used with MS Excel (2003/2007)? What would you recommend and Why? What limitations have you found with your top rated version control system? To put this in perspective, here are a couple of use cases: 1. version control for VBA modules 2. more than one person is working on a Exc...
[ 0.11985921114683151, -0.03528476506471634, 0.2814408540725708, -0.07172397524118423, -0.13606448471546173, -0.1399482637643814, -0.011926689185202122, -0.383657842874527, -0.5369608998298645, -0.2775202691555023, 0.08818145096302032, 0.7221335172653198, -0.27945250272750854, -0.05507199093...
Ideally only incremental changes are saved rather than the entire Excel spreadsheet. I've just setup a spreadsheet that uses Bazaar, with manual checkin/out via TortiseBZR. Given that the topic helped me with the save portion, I wanted to post my solution here. *The solution for me was to create a spreadsheet that exp...
[ 0.1650077849626541, -0.009850640781223774, 0.36986830830574036, -0.11072441935539246, 0.010507837869226933, 0.15288110077381134, 0.1926461011171341, -0.02417191118001938, -0.4326881766319275, -0.9413357973098755, -0.13232912123203278, 0.640110433101654, -0.3860876262187958, -0.143363609910...
the modules are text files, the standard diff-style commands in BZR work for my sources except the Excel file itself. I've setup a directory for my BZR repository, X:\Data\MySheet. In the repo are MySheet.xls and one .vba file for each of my modules (ie: Module1Macros). In my spreadsheet I've added one module that is ...
[ 0.3178918957710266, 0.20126305520534515, 0.673281729221344, -0.3913010358810425, 0.030050652101635933, 0.11206672340631485, 0.09351332485675812, -0.3079177439212799, -0.4236713945865631, -0.5066923499107361, -0.3723345100879669, 0.5906291007995605, -0.45462605357170105, 0.09754157811403275...
If .VBComponents(i%).CodeModule.CountOfLines > 0 Then sName$ = .VBComponents(i%).CodeModule.Name .VBComponents(i%).Export "X:\Tools\MyExcelMacros\" & sName$ & ".vba" End If Next i End With End Sub Sub ImportCodeModules() With ThisWorkbook.VBProject For i% = 1 To .VBComponents....
[ -0.02666395716369152, 0.06378492712974548, 0.6648942232131958, -0.5761198401451111, 0.24607668817043304, 0.17749950289726257, 0.4928189516067505, -0.6122380495071411, -0.267053484916687, -0.7289171814918518, -0.5018969178199768, 0.6276191473007202, -0.3313884437084198, 0.2939481735229492, ...
"Macros" Then .VBComponents.Remove .VBComponents(ModuleName) .VBComponents.Import "X:\Data\MySheet\" & ModuleName & ".vba" End If End If Next i End With End Sub ``` Next, we have to setup event hooks for open / save to run these macros. In the code viewer, right...
[ 0.15758337080478668, -0.0611870177090168, 0.5869540572166443, -0.4300704896450043, 0.39161720871925354, 0.002967170672491193, 0.1919635832309723, -0.09837649762630463, -0.4557729959487915, -0.7127270698547363, -0.3236291706562042, 0.8007762432098389, -0.4864838719367981, -0.014097431674599...
the select box at the top of the code window to change from "(General)" view to "Workbook" view. **Contents of "Workbook" view:** ```vb Private Sub Workbook_Open() ImportCodeModules End Sub Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean) SaveCodeModules End Sub ``` I'll be settlin...
[ 0.21503500640392303, 0.035218577831983566, 0.5676907896995544, -0.11810996383428574, 0.05465705320239067, -0.10899554193019867, 0.5687364935874939, 0.015853581950068474, -0.29112693667411804, -0.7559043169021606, -0.46013835072517395, 0.6903247833251953, -0.2611410617828369, 0.043354183435...
What techniques and/or modules are available to implement robust rate limiting (requests|bytes/ip/unit time) in apache? The best * [mod\_evasive](https://github.com/jzdziarski/mod_evasive) (Focused more on reducing DoS exposure) * [mod\_cband](http://dembol.org/blog/mod_cband/) (Best featured for 'normal' bandwidth co...
[ 0.11997657269239426, -0.21679241955280304, 0.2690529227256775, 0.11145801842212677, -0.1760060042142868, -0.3453758656978607, 0.2136199176311493, -0.5703045725822449, -0.24463167786598206, -0.59284508228302, -0.18642516434192657, 0.5608148574829102, -0.1802925020456314, 0.09519601613283157...
Several years back, I innocently tried to write a little app to save my tactically placed desktop icons because I was sick of dragging them back to their locations when some event reset them. I gave up after buring WAY too much time having failed to find a way to query, much less save and reset, my icons' desktop posit...
[ 0.5441993474960327, 0.010087771341204643, 0.6176226139068604, -0.023914480581879616, 0.026034001260995865, 0.05788148567080498, 0.3270055651664734, 0.1890348494052887, -0.7303626537322998, -0.43050140142440796, 0.13561342656612396, 0.44332316517829895, -0.14158259332180023, 0.0551914945244...
for some c# code and couldn't find a example, but I did found the following article. [Torry: ...get/set the positions of desktop icons?](http://www.swissdelphicenter.ch/torry/showcode.php?id=1897). It's delphi code, but I find it very readable and with some P/Invokes you'll be able to translate it to c#.
[ -0.06518321484327316, 0.06380780786275864, 0.2162756323814392, -0.07090155780315399, -0.03881954774260521, 0.09356603026390076, 0.33252739906311035, 0.2733722925186157, -0.5073594450950623, -0.6975972652435303, -0.025041429325938225, 0.28236624598503113, -0.24047021567821503, -0.3241672515...
I have an old Delphi codebase I have to maintain, lots of DLLs, some older than others. In some of these DLLs there is no version information in the Project Options dialog. The controls for adding a version are greyed out and I can't even add a version number by manually editing the .DOF file. How can I include a versi...
[ 0.45033541321754456, 0.031532563269138336, 0.41214126348495483, -0.17821256816387177, -0.059389278292655945, -0.3022530674934387, 0.2762719690799713, -0.22931917011737823, -0.36469656229019165, -0.6551342010498047, -0.23136408627033234, 0.4874682128429413, 0.03723345696926117, 0.3010348081...
does not exist, the simplest way to recreate it is to add the {$R \*.RES} compiler directive to the .DPR file, immediately after the uses clause. ``` library foolib; uses foo in 'foo.pas', baz in 'baz.pas'; {$R *.RES} exports foofunc name 'foofunc'; end; ``` As soon as you add the {$R \*.RES} com...
[ 0.18494661152362823, 0.2350950837135315, 0.24434709548950195, -0.22530296444892883, 0.06940732896327972, -0.18942949175834656, 0.47608962655067444, -0.27951082587242126, -0.09215177595615387, -0.37354764342308044, -0.5116418600082397, 0.5360630750656128, -0.4792994558811188, 0.062779121100...
I'd love to figure it out myself but I was wondering **roughly what's the algorithm for converting a function with yield statements into a state machine for an enumerator?** For example how does C# turn this: ``` IEnumerator<string> strings(IEnumerable<string> args) { IEnumerator<string> enumerator2 = getAnotherEnume...
[ -0.053776636719703674, -0.1954485923051834, 0.4357042610645294, -0.33870962262153625, 0.041760217398405075, 0.05877268314361572, 0.20387428998947144, -0.5512592792510986, -0.14137256145477295, -0.5444079637527466, -0.1797347068786621, 0.4022485911846161, -0.3809128999710083, 0.337126493453...
this.state = -1; this.enumerator2 = getAnotherEnumerator(); this.argsEnumerator = this.args.GetEnumerator(); this.state = 1; while (this.argsEnumerator.MoveNext()) { this.arg = this.argsEnumerator.Current;
[ -0.22682254016399384, -0.3218105137348175, 0.6865850687026978, -0.3990948498249054, 0.4161716401576996, 0.13775920867919922, 0.4302622377872467, -0.5618941187858582, -0.1771422177553177, -0.5155136585235596, -0.33062759041786194, 0.20717671513557434, -0.4386667311191559, 0.5547270774841309...
this.enumerator2.MoveNext(); this.current = this.arg + this.enumerator2.Current; this.state = 2; return true; state1: this.state = 1;
[ -0.0802450031042099, -0.31549012660980225, 0.2673524022102356, -0.5415516495704651, 0.46031543612480164, 0.08907724916934967, 0.5231491327285767, -0.5763244032859802, -0.06138000264763832, -0.3224152624607086, -0.35574859380722046, 0.30051958560943604, -0.4479338228702545, 0.25868526101112...
} this.state = -1; if (this.argsEnumerator != null) this.argsEnumerator.Dispose(); break; case 2: goto state1; } return false; } ``` Of course the result can be completely different depending on the original code. The particular code sample you are look...
[ 0.27979153394699097, -0.20426978170871735, -0.20533022284507751, -0.13531315326690674, 0.2343967705965042, -0.04209611564874649, 0.34603622555732727, -0.673595130443573, -0.25225600600242615, -0.3240366578102112, -0.2631183862686157, 0.31179988384246826, -0.358516663312912, 0.3003700077533...
series of transformations. Please note that this is an approximate description of the algorithm. The actual names used by the compiler and the exact code it generates may be different. The idea is the same, however. The first transformation is the "foreach" transformation, which transforms this code: ``` foreach (var...
[ 0.02453790418803692, -0.22981694340705872, 0.3160445988178253, -0.1878659725189209, -0.21226991713047028, 0.2886081039905548, 0.06520773470401764, -0.6171143651008606, -0.12520048022270203, -0.6593148708343506, -0.43206578493118286, 0.3254963755607605, -0.5613890290260315, -0.0059453211724...
label" right after the yield. The third transformation lifts all the local variables and function arguments in the method body into an object called a closure. Given the code in your example, that would look similar to this: ``` class ClosureEnumerable : IEnumerable<string> { private IEnumerable<string> args...
[ -0.10715294629335403, -0.2471626251935959, 0.5564588308334351, -0.19109834730625153, -0.021494539454579353, -0.06291051208972931, 0.24399547278881073, -0.3923437297344208, -0.1771821528673172, -0.5249137282371521, -0.1933257281780243, 0.5866345167160034, -0.39533597230911255, 0.29038450121...
{ return new Closure(origThis, args); } } class Closure : IEnumerator<string> { public Closure(ClassType originalThis, IEnumerable<string> args) { state = 0; this.args = args; this.originalThis = originalThis; } private IEnumerable<string> args; private IEnumer...
[ -0.16805686056613922, -0.052975695580244064, 0.31861767172813416, -0.2766211926937103, 0.14546698331832886, 0.3559552729129791, 0.41633477807044983, -0.24536758661270142, -0.20136836171150208, -0.3757729232311249, -0.3211057484149933, 0.3384034335613251, -0.4897623360157013, 0.275511682033...
// This may be optimized away if the method does not access any // class members private ClassType originalThis; //This holds the state value. private int state; //The current value to return private string currentValue; public string Current { get { ret...
[ 0.11885396391153336, -0.39996060729026794, 0.39392417669296265, -0.351473331451416, 0.5379790663719177, 0.138690784573555, 0.31227055191993713, -0.32621893286705017, -0.17247015237808228, -0.06599130481481552, -0.11000094562768936, 0.45876291394233704, -0.25159621238708496, 0.3607167005538...
} } } ``` The method body is then moved from the original method to a method inside "Closure" called MoveNext, which returns a bool, and implements IEnumerable.MoveNext. Any access to any locals is routed through "this", and any access to any class members are routed through this.originalThis. Any "yield return ...
[ -0.349871426820755, -0.005076485686004162, 0.4966737926006317, -0.3406558930873871, 0.11752445250749588, -0.09309301525354385, 0.2597365081310272, -0.25125953555107117, 0.1273535043001175, -0.4634958803653717, -0.4801340103149414, 0.39366599917411804, -0.3459610044956207, 0.225021630525589...
the procedure that looks at the state number and jumps to the associated label. The original method is then translated into something like this: ``` IEnumerator<string> strings(IEnumerable<string> args) { return new ClosureEnumerable(this,args); } ``` The fact that the state of the method is all pushed into an ...
[ -0.12645359337329865, -0.24908876419067383, 0.29239368438720703, -0.21307574212551117, 0.041218940168619156, -0.13069288432598114, -0.07679982483386993, -0.3338613212108612, -0.1453840136528015, -0.4638863503932953, -0.4310797154903412, 0.48666486144065857, -0.4129936099052429, 0.011680458...
is not the best way to do this. It suffers from poor performance when trying to use "yield" with recursive algorithms. There is a good paper that outlines a better way to do this here: <http://research.microsoft.com/en-us/projects/specsharp/iterators.pdf> It's worth a read if you haven't read it yet.
[ 0.47883424162864685, -0.21161645650863647, 0.08182311058044434, 0.13064749538898468, 0.17167910933494568, -0.2573980689048767, 0.22304567694664001, -0.4180607199668884, -0.05454985797405243, 0.06435802578926086, -0.011261498555541039, 0.6717653870582581, 0.1074804738163948, -0.259574651718...
How do I read a time value and then insert it into a TimeSpan variables? If I understand you correctly you're trying to get some user input in the form of "08:00" and want to store the time in a timespan variable? So.. something like this? ``` string input = "08:00"; DateTime time; if (!DateTime.TryParse(input, out t...
[ 0.28464314341545105, -0.09173854440450668, 0.3590567409992218, -0.13066241145133972, 0.5860185623168945, 0.12658511102199554, 0.1996162086725235, -0.07342469692230225, -0.13418351113796234, -0.6665060520172119, -0.18754607439041138, 0.4045202136039734, -0.23719455301761627, 0.3223927319049...
Is there a keyboard shortcut for pasting the content of the clipboard into a command prompt window on Windows XP (instead of using the right mouse button)? The typical `Shift`+`Insert` does not seem to work here. I personally use a little [AutoHotkey](http://www.autohotkey.com/) script to remap certain keyboard functi...
[ -0.12869592010974884, -0.03338528797030449, 0.8581364154815674, -0.11172877997159958, -0.042555030435323715, 0.055600859224796295, 0.05436486378312111, -0.20450957119464874, -0.15055154263973236, -0.4643966555595398, -0.09680598229169846, 0.6989274024963379, -0.11299250274896622, -0.097832...
{WheelDown} return ; Paste in command window ^V:: ; Spanish menu (Editar->Pegar, I suppose English version is the same, Edit->Paste) Send !{Space}ep return #IfWinActive ```
[ -0.15830880403518677, -0.04040718078613281, 0.492666095495224, 0.013424663804471493, 0.16735194623470306, 0.1340997815132141, 0.26601842045783997, -0.005774117074906826, -0.20238502323627472, -0.40154796838760376, -0.45068761706352234, 0.8161081671714783, -0.07081612199544907, -0.103443667...
See the question. I want to see the methods and classes offered by a DLLs library. This is exactly what the Object Browser is for. * Add a reference to the DLL. * Right click it in the list. * Click *View in Object Browser*.
[ 0.3396112024784088, -0.06297900527715683, 0.15241611003875732, 0.2471122145652771, -0.14381244778633118, -0.34904614090919495, -0.04115467891097069, 0.2998758852481842, -0.19617681205272675, -0.7989985942840576, -0.1741396188735962, 0.5091342329978943, -0.2214130163192749, 0.02835140749812...
I deploy a webapp on two different containers (Tomcat and Jetty), but their default servlets for serving the static content have a different way of handling the URL structure I want to use ([details](http://issues.apache.org/bugzilla/show_bug.cgi?id=42411)). I am therefore looking to include a small servlet in the web...
[ 0.17331872880458832, 0.12580321729183197, 0.7140043377876282, -0.06298014521598816, -0.1395728439092636, -0.050361476838588715, 0.20279404520988464, -0.0415027029812336, -0.42870891094207764, -0.762002170085907, -0.39746570587158203, 0.11936379224061966, -0.3120282292366028, 0.258997261524...
structure I want to use - in case you are wondering - is simply: ```xml <servlet-mapping> <servlet-name>main</servlet-name> <url-pattern>/*</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>default</servlet-name> <url-pattern>/static/*</url-pat...
[ 0.14134101569652557, 0.16475433111190796, 0.47446030378341675, -0.13652430474758148, -0.016399061307311058, -0.22751660645008087, -0.12872689962387085, -0.3110220730304718, -0.23688432574272156, -0.2952510118484497, -0.3239496946334839, 0.16734296083450317, -0.5288800597190857, 0.435933202...
servlet does not take the ServletPath into account (so it looks for the static files in the main folder), while Jetty does (so it looks in the `static` folder). I ended up rolling my own `StaticServlet`. It supports `If-Modified-Since`, gzip encoding and it should be able to serve static files from war-files as well. I...
[ 0.3302465081214905, -0.06487058103084564, 0.31289923191070557, 0.04871629551053047, -0.18478962779045105, -0.12515242397785187, 0.10015510022640228, -0.2557353079319, -0.38528674840927124, -0.4304669499397278, -0.05449962615966797, 0.407946914434433, -0.5801253318786621, -0.063555754721164...
only method you need is `coalesce` (which is identical to the SQL function [`COALESCE`](http://en.wikipedia.org/wiki/Null_(SQL)#COALESCE)). This is the code: ``` public static <T> T coalesce(T...ts) { for(T t: ts) if(t != null) return t; return null; } ```
[ 0.20007754862308502, -0.1793912947177887, -0.005058289971202612, 0.2610962390899658, 0.14801043272018433, 0.08739641308784485, 0.23942141234874725, -0.21462874114513397, -0.29596248269081116, -0.3680325150489807, -0.2978819012641907, 0.4302036762237549, -0.2597200274467468, 0.1843731105327...
I have this Python application that gets stuck from time to time and I can't find out where. Is there any way to signal Python interpreter to show you the exact code that's running? Some kind of on-the-fly stacktrace? ***Related questions:*** * [Print current call stack from a method in Python code](https://stacko...
[ 0.31381314992904663, 0.16740615665912628, 0.0672154352068901, -0.06223302334547043, 0.10414226353168488, -0.35445189476013184, 0.21642890572547913, -0.08268630504608154, -0.36693620681762695, -0.3469567596912384, -0.005964782554656267, 0.2572996914386749, -0.3270634114742279, 0.03891281783...
unix (requires signals): ``` import code, traceback, signal def debug(sig, frame): """Interrupt running process, and provide a python prompt for interactive debugging.""" d={'_frame':frame} # Allow access to frame object. d.update(frame.f_globals) # Unless shadowed by global d.update(fram...
[ -0.21644945442676544, 0.03961362689733505, 0.43072864413261414, -0.23177269101142883, 0.1988055408000946, -0.18565677106380463, 0.05110663175582886, 0.08936770260334015, -0.1993338018655777, -0.5883898138999939, -0.27318689227104187, 0.9704409241676331, -0.49594825506210327, 0.122183077037...
function at some point when your program starts up (You could even stick it in site.py to have all python programs use it), and let it run. At any point, send the process a SIGUSR1 signal, using kill, or in python: ``` os.kill(pid, signal.SIGUSR1) ``` This will cause the program to break to a python console at t...
[ 0.13599127531051636, -0.2577042281627655, 0.32302340865135193, -0.15286439657211304, 0.11730726808309555, -0.10582500696182251, 0.26937636733055115, 0.08436155319213867, -0.09155036509037018, -0.4787296652793884, -0.2831156849861145, 0.7198600172996521, -0.2910923659801483, -0.148429334163...
another script that does the same thing, except it communicates with the running process through a pipe (to allow for debugging backgrounded processes etc). Its a bit large to post here, but I've added it as a [python cookbook recipe](http://code.activestate.com/recipes/576515/).
[ 0.49110567569732666, -0.14292731881141663, -0.23510345816612244, 0.06761811673641205, 0.05363655090332031, -0.008609171956777573, 0.46111053228378296, 0.11491291224956512, 0.011179214343428612, -0.6700425744056702, 0.25112268328666687, 0.20732282102108002, -0.30757513642311096, -0.17786940...
What is the best way to design an interface so that very long drop down values that get trucated due to size limits do not create a very bad user experience. My question is for web applications. Could you please send your suggestions. Thanks. Well, what I have done in such a case is: 1. Using autocomplete (so that t...
[ 0.10590127855539322, -0.15682385861873627, 0.24449878931045532, 0.012682093307375908, -0.151462122797966, 0.3990101218223572, 0.06951474398374557, 0.01809215359389782, -0.3792976140975952, -0.5036523342132568, 0.17152108252048492, 0.5152050256729126, -0.051160894334316254, -0.3014794886112...
hover on this value will make the full text appear as a 'title' or similar.
[ 0.4037466049194336, 0.15182684361934662, 0.5248727202415466, 0.26524022221565247, 0.024739965796470642, -0.3634047210216522, -0.19306112825870514, 0.0489594042301178, -0.035499922931194305, -0.24351030588150024, -0.37207144498825073, 0.16267719864845276, 0.2607315480709076, 0.0679015442728...
Can you suggest an asp.net 3.5 hosting provider with continuous integration (cctray – nant builds) and source control facilities (svn)? My requirement would be something like this: * I checkin to a svn branch (say trunk) on the hosting provider space. * CruiseControl.NET on the server fires off a build. * I see suc...
[ 0.3907874822616577, -0.16323961317539215, 0.41745874285697937, 0.2534625828266144, -0.10902314633131027, -0.1899576038122177, -0.05148759111762047, 0.12923584878444672, -0.655188798904419, -0.530932605266571, -0.14597778022289276, 0.5355305075645447, 0.09095582365989685, 0.1392542719841003...
provide a way to kick off a build process by allowing you to specify a URL to post to when a check-in occurs. This URL can kick off a script that pulls the latest code and builds it. You can find more details on how to set this up [here](http://blog.assembla.com/assemblablog/tabid/12618/bid/2916/Running-builds-from-Ass...
[ 0.6351962685585022, -0.12661179900169373, 0.23725073039531708, 0.3420241177082062, -0.051794786006212234, -0.33569762110710144, 0.1932678371667862, -0.005451834760606289, -0.22878630459308624, -0.6020392775535583, -0.12255432456731796, 0.31135094165802, 0.30414482951164246, 0.1304866224527...
I wish to test a function that will generate `lorem ipsum` text, but it does so within html tags. So I cant know in advance the textual content, but i know the html structure. That is what I want to test. And maybe that the length of the texts are within certain limits. So what I am wondering is if the assertTags can d...
[ 0.15135884284973145, -0.12183510512113571, 0.4965893626213074, -0.10169452428817749, -0.5048216581344604, 0.07826951891183853, 0.41466841101646423, -0.5941340923309326, 0.09031490236520767, -0.49958816170692444, -0.19244390726089478, 0.5440341234207153, -0.019432859495282173, -0.5050164461...
= array( '<p', 'preg:/[A-Za-z\.\s\,]+/', '/p' ); ```
[ -0.05975863337516785, 0.08622750639915466, 0.22855418920516968, -0.46969085931777954, 0.07358703762292862, 0.1566583663225174, 0.2932388186454773, -0.22566929459571838, 0.05242433026432991, -0.28777164220809937, -0.5284112095832825, 0.36204853653907776, -0.5026792883872986, 0.1723523437976...
I just figured out that I can actually **store objects in the $\_SESSION** and I find it quite cool because when I jump to another page I still have my object. Now before I start using this approach I would like to find out if it is really such a good idea or if there are **potential pitfalls** involved. I know that ...
[ 0.31375086307525635, 0.29764291644096375, 0.22030624747276306, 0.26154348254203796, -0.02216966636478901, 0.013243562541902065, 0.2635173499584198, 0.25781428813934326, -0.42427074909210205, -0.3969792127609253, 0.15788798034191132, 0.0881623923778534, 0.1260831505060196, 0.359649181365966...
I don't lose my state like that. (Now I've also read that I should program stateless sites but I don't understand that concept yet.) So **in short**: Is it ok to store objects in the session, are there any problems with it? --- Edit: *Temporary summary*: By now I understand that it is probably **better to recreate*...
[ 0.4073203504085541, 0.12269316613674164, 0.1415378451347351, 0.23048603534698486, -0.1021001935005188, -0.2125774770975113, 0.5416496992111206, 0.2652372717857361, -0.4084677994251251, -0.5607812404632568, 0.04665655642747879, 0.40192970633506775, 0.14039839804172516, 0.5180813074111938, ...
them whole cloth based on data stashed in hidden form fields, or re-query them from the DB each time, you are using state. HTTP is stateless (more or less; but see GET vs. PUT) but almost everything anybody cares to do with a web app requires state to be maintained somewhere. Acting as if pushing the state into nooks a...
[ 0.6207517981529236, -0.02683974616229534, 0.4090266823768616, 0.3255941867828369, -0.10601513087749481, -0.13500279188156128, 0.6386523842811584, -0.0482783205807209, -0.279061883687973, -0.8364244103431702, -0.2503480017185211, 0.3501493036746979, 0.04929229989647865, 0.4561787247657776, ...
advance that you ought to be losing sleep over it. I am especially flummoxed by the blessing received by the "double whammy" arguments put forth by Hank Gay. Is the OP building a distributed and load-balanced e-commerce system? My guess is no; and I will further posit that serializing his $User class, or whatever, wil...
[ 0.4437393546104431, 0.5646347999572754, 0.10184851288795471, 0.0795920267701149, 0.22664014995098114, -0.1029062569141388, 0.17759919166564941, 0.17912939190864563, -0.1270073503255844, -0.3980681896209717, -0.11909016221761703, 0.8228809237480164, -0.25840628147125244, 0.09023084491491318...
What would you suggest would be the best operating system for a web server? If possible, please enumerate the advantages and disadvantages if there are any... Use an operating system you have an administrator account for. A mainstream flavour of Linux is a great choice for stability, but if no one knows how to look a...
[ 0.4013310670852661, -0.09218398481607437, -0.1801990270614624, 0.44266197085380554, 0.07940742373466492, -0.05084460601210594, -0.18118540942668915, 0.382720410823822, -0.19102130830287933, -0.49060916900634766, 0.10159137845039368, 0.6834505200386047, -0.029505500569939613, -0.04673571139...
I have two different ways of displaying items in a WPF application. The first uses a WrapPanel and the second a vertical StackPanel. I can switch between the two ways of displaying my items by switching the host panel between the two types. This does work but you get an instance change in layout. Instead I want the c...
[ 0.3810437321662903, -0.27409791946411133, 0.47385266423225403, 0.1248662993311882, -0.09514227509498596, 0.31727057695388794, -0.193583145737648, -0.4493454396724701, -0.45005130767822266, -0.9047559499740601, 0.45320358872413635, 0.19695480167865753, 0.04704529792070389, 0.128887027502059...
would be a real pain! Have a look at the SwitchPanel from IdentityMine's [Blendables Layout](http://www.blendables.com/products/productsLayoutmix.aspx) and also read Dr WPF's article on CodeProject about [Conceptual Children](http://www.codeproject.com/KB/WPF/ConceptualChildren.aspx)
[ 0.19066576659679413, -0.2174995094537735, -0.0513952299952507, 0.1161433607339859, 0.17507000267505646, 0.3366895318031311, 0.05922563374042511, -0.18373242020606995, -0.007652836851775646, -0.5599122643470764, 0.0633266344666481, 0.534211277961731, 0.33018919825553894, 0.18817594647407532...
I've got a web application that is running against Windows Authentication using our Active Directory. I've got a new requirement to pull some personal information through from the Active Directory entry. What would be the easiest way to get access to this information? Accessing the user directly through a DirectoryEntr...
[ 0.5695499181747437, 0.3109108507633209, 0.41960132122039795, 0.186170756816864, 0.22122439742088318, -0.2999323308467865, 0.14707735180854797, 0.002508393255993724, -0.03328157961368561, -0.7169322371482849, 0.0559215284883976, 0.4288935959339142, -0.24355755746364594, 0.17257508635520935,...
string, not null. Null causes an exception. * To clear a multi-valued property, use the *DirectoryEntry.Property.Clear()* method. * The Active Directory schema reference will say which data type a value will be and whether it is multi-value or single-value. * You do not need to manually RefreshCache() on a Directoryent...
[ -0.1724933236837387, -0.45765718817710876, 0.5008081793785095, -0.06170950084924698, -0.03908252343535423, -0.23952166736125946, 0.3604631721973419, 0.09180548787117004, -0.2127504050731659, -0.651364266872406, -0.393470823764801, 0.6119812726974487, -0.24081797897815704, 0.167229160666465...
need to use DirectorySearcher to get your user's directory entry if you don't know its path (which you wouldn't, just by having him logged in). Using it was fairly easy but beware of the quirks in LDAP syntax; namely, having to encode non-ASCII (and other?) characters. The search string you'd use would probably be some...
[ 0.1826440542936325, -0.03021477907896042, 0.2679939568042755, 0.14864987134933472, -0.0757615864276886, -0.290917307138443, 0.07469739764928818, 0.10703062266111374, -0.09498437494039536, -0.7217632532119751, 0.04286894202232361, 0.32694220542907715, -0.21165861189365387, 0.109869442880153...
tool which you can use for debugging and low-level AD data management. I've found it useful when I know which property I want to set but cannot find the right dialog box in the AD management tool.
[ 0.4423615038394928, 0.026260577142238617, 0.1397358477115631, 0.24507199227809906, -0.027154332026839256, -0.2750677168369293, -0.1811046153306961, -0.08054378628730774, 0.1542273908853531, -0.5530582666397095, 0.24068394303321838, 0.5578136444091797, -0.12926077842712402, 0.21255975961685...
I'm looking at building a simple web app that will expose an API that lets third-party (well, written by me, but that's not the point) apps query for and modify user-specific data stored on the site. Obviously I don't want to allow apps to be able to get user-specific information without that users consent. I would wa...
[ 0.7447163462638855, 0.5202316045761108, 0.22184523940086365, 0.2815273106098175, 0.2636896073818207, -0.21980132162570953, 0.20051896572113037, 0.1424986869096756, -0.22025278210639954, -0.42991945147514343, 0.19473646581172943, 0.44249197840690613, 0.1278882771730423, 0.19413401186466217,...
work for you? That's the problem it was designed to solve.
[ 0.8342615365982056, 0.214578315615654, -0.23703329265117645, 0.23127983510494232, 0.24032089114189148, 0.05964810028672218, 0.19872313737869263, -0.028390495106577873, -0.26589176058769226, -0.11628112196922302, -0.00953693687915802, 0.6429035663604736, -0.3031516969203949, -0.041343484073...
We want migrate from Delphi 7.0 to Delphi 2009, to stay up with a modern IDE and current technology. Our target platform is .NET. What is best way, to achieve this goal? I'd take onboard the Unicode situation with string handling that came in from D2007 to D2009 - the changes involved in this step might affect your app...
[ 0.002734420821070671, -0.04815884307026863, 0.7399718165397644, -0.08745002746582031, -0.08758033066987991, -0.3592913746833801, 0.034204188734292984, 0.1991446614265442, -0.024057701230049133, -0.9079951643943787, -0.30376672744750977, 0.5680368542671204, -0.41603630781173706, -0.27256059...
all. One smarter path might be to **migrate D7 to D2007** (which is a well-trodden path, largely painless with lots of wins and worthwhile improvements). Then you're in a modern, stable, pretty-up-to-date, supported Delphi platform from which you can better evaluate a jump to .Net. My own opinion on this last stage w...
[ 0.1956045776605606, -0.2141336351633072, 0.2742231786251068, 0.4553411304950714, 0.02680772915482521, -0.1238701194524765, 0.08103523403406143, 0.29181644320487976, -0.2017444521188736, -0.9490590691566467, -0.28179898858070374, 0.4787139594554901, -0.2295071929693222, 0.03529130294919014,...
Win32 development. Either evolve the code from D7 to D2007/D2009, or just jump from D7 to .Net; to do one and then the other seems a little odd!
[ 0.035940296947956085, -0.32845228910446167, 0.0898100733757019, 0.0338006466627121, 0.0568070225417614, -0.15061809122562408, 0.21353834867477417, 0.06574691832065582, 0.09142093360424042, -0.6901694536209106, -0.08803719282150269, 0.5524711608886719, -0.1543358415365219, -0.02790779247879...
I have an ANSI encoded text file that should not have been encoded as ANSI as there were accented characters that ANSI does not support. I would rather work with UTF-8. Can the data be decoded correctly or is it lost in transcoding? What tools could I use? Here is a sample of what I have: ``` ç é ``` I can tell...
[ 0.44051048159599304, 0.28187090158462524, 0.23075616359710693, 0.04126378893852234, 0.0321449339389801, 0.006253412924706936, -0.04137023910880089, 0.05034324526786804, -0.2017069011926651, -0.8378824591636658, 0.16022516787052155, 0.28567811846733093, -0.30520099401474, 0.0485480390489101...
could just be a case of somebody sending you a utf8 file that you're reading in an editor set to say cp1252. Just taking the two examples, this is a case of utf8 being read through the lens of a single-byte encoding, likely one of iso-8859-1, iso-8859-15, or cp1252. If you can post examples of other problem character...
[ 0.14482490718364716, -0.11388131231069565, 0.06126780807971954, 0.26691168546676636, -0.05322430655360222, -0.0033417611848562956, 0.1498042345046997, 0.32817280292510986, -0.3469487726688385, -0.4280361533164978, -0.2584357261657715, 0.3926893472671509, -0.1594507247209549, 0.240870594978...
the kind of character set conversion you have to do. Can you assume that all of your data has been distorted in exactly the same way - that it's come from the same source and gone through the same sequence of transformations, so that for example there isn't a single é in your text, it's always ç? If so, the problem c...
[ 0.5709981918334961, 0.09564009308815002, -0.1249014139175415, 0.3022054135799408, 0.016811057925224304, 0.09663979709148407, 0.05794674530625343, -0.3601045310497284, -0.0805947408080101, -0.6868659257888794, -0.04678893834352493, 0.6661424040794373, -0.16114167869091034, 0.125188887119293...
problem characters are only occurring in some places in your data, you'll have to take it instance by instance, based on assumptions along the lines of "no author intended to put ç in their text, so whenever you see it, replace by ç". The latter option is more risky, firstly because those assumptions about the intenti...
[ -0.30215486884117126, 0.33300045132637024, 0.20151005685329437, 0.19848088920116425, 0.001669572084210813, 0.21708035469055176, 0.4686011075973511, 0.12494318187236786, -0.31791314482688904, -0.5782214403152466, -0.4635140895843506, 0.3374645709991455, -0.24127060174942017, 0.0367145016789...
In order to improve performance reading from a file, I'm trying to read the entire content of a big (several MB) file into memory and then use a istringstream to access the information. My question is, which is the best way to read this information and "import it" into the string stream? A problem with this approach (...
[ 0.15665845572948456, -0.23654179275035858, 0.403698205947876, -0.20911379158496857, 0.15941312909126282, -0.027729075402021408, 0.10589583963155746, -0.2706103026866913, -0.2585654854774475, -0.5396983027458191, -0.22218455374240875, 0.41550305485725403, -0.4130055904388428, 0.022034253925...
= is.tellg(); is.seekg (0, std::ios::beg); // allocate memory: char *buffer = new char [length]; // read data as a block: is.read (buffer,length); // create string stream of memory contents // NOTE: this ends up copying the buffer!!! istringstream iss( string( buffer ) ); // delete temporary buffe...
[ -0.2745482325553894, -0.1412287801504135, 0.704342782497406, -0.3665889501571655, 0.20546014606952667, 0.18806450068950653, 0.018498769029974937, -0.3804211914539337, -0.21034716069698334, -0.6367084383964539, -0.3484554886817932, 0.20533189177513123, -0.42431023716926575, 0.01911392621695...
<fstream> #include <sstream> int main() { std::ifstream file( "myFile" ); if ( file ) { std::stringstream buffer; buffer << file.rdbuf(); file.close(); // operations on the buffer... } } ``` EDIT: As Martin York remarks in the comments, this might not be the fastes...
[ -0.027076056227087975, -0.11820121109485626, 0.47040650248527527, -0.33986005187034607, 0.2104172557592392, 0.11713341623544693, 0.16591203212738037, -0.3796844780445099, 0.03609117120504379, -0.4284639060497284, -0.4245070815086365, 0.4969366192817688, -0.5329224467277527, 0.0001389466924...
`ifstream`'s `read` method as you used to do, and then set the `stringstream` buffer to point to the previously allocated memory.
[ -0.21133102476596832, -0.2735576927661896, 0.21655580401420593, -0.21097448468208313, 0.29203179478645325, -0.176376610994339, -0.1407056450843811, 0.18460364639759064, 0.27109014987945557, -0.5417085886001587, 0.007084702141582966, 0.284954696893692, -0.1694263517856598, 0.042015139013528...
I need to do some command lines through a browser. What I need to do in a command-line would be: ``` $login <login name> <password> $passwd <old password> <new password> <retype new password> ``` So, how can I do this using the [`proc_open`](http://www.php.net/manual/en/function.proc-open.php) function? Or should I ...
[ 0.5239821672439575, -0.04351041093468666, 0.3036805987358093, 0.008763065561652184, 0.24947379529476166, -0.11669410020112991, 0.3387635052204132, 0.08352348953485489, -0.07454241812229156, -0.5852541327476501, -0.05907508730888367, 0.7457863688468933, -0.2816079556941986, -0.3944963216781...
1:1 port forwarding. The advantage of using a balance/LD approach over DNS balancing is that you can easily then use it to take servers out of the pool (for upgrades, deployments, debugging, etc).
[ 0.17733187973499298, -0.4791795015335083, 0.08395244181156158, 0.1313886046409607, -0.04766203463077545, -0.1636360138654709, -0.40592139959335327, -0.3599871098995209, -0.2651194930076599, -0.5754566788673401, -0.10500960052013397, 0.37431707978248596, -0.4961012303829193, 0.0540923960506...
I was wondering what are the benefits of using anything else but Java for Mobile Application Development. Java is the most ubiquitous and for that alone it is your best choice.
[ 0.37162700295448303, 0.17817255854606628, -0.18901197612285614, 0.09267627447843552, 0.04569825902581215, -0.06867761164903641, 0.028104355558753014, 0.574124813079834, -0.40745604038238525, -0.6297022700309753, 0.14066827297210693, 0.5242999792098999, -0.26477381587028503, 0.1231593638658...
Consider the following code: ``` void Handler(object o, EventArgs e) { // I swear o is a string string s = (string)o; // 1 //-OR- string s = o as string; // 2 // -OR- string s = o.ToString(); // 3 } ``` What is the difference between the three types of casting (okay, the 3rd one is not a casting, b...
[ 0.2414570152759552, 0.05072610825300217, 0.02948189526796341, -0.1453830599784851, -0.2935637831687927, -0.00923763308674097, 0.24978961050510406, -0.3540762960910797, -0.010428138077259064, -0.37109804153442383, -0.09761621057987213, 0.39226266741752625, -0.3154858946800232, 0.06548872590...
= o as string; // 2 ``` Assigns `null` to `s` if `o` is not a `string` or if `o` is `null`. For this reason, you cannot use it with value types (the operator could never return `null` in that case). Otherwise, assigns `o` to `s`. ``` string s = o.ToString(); // 3 ``` Causes a [NullReferenceException](https://msdn....
[ -0.3464907705783844, 0.04741246998310089, 0.44460785388946533, -0.4221099317073822, 0.026409074664115906, -0.006663364823907614, 0.37125518918037415, -0.23101806640625, -0.09165545552968979, -0.5927127003669739, -0.47696787118911743, 0.48306068778038025, -0.47091227769851685, 0.15649212896...
only seen a need for this return-null type of functionality with badly designed libraries which use error codes (e.g. return null = error, instead of using exceptions). 3 is not a cast and is just a method invocation. Use it for when you need the string representation of a non-string object.
[ 0.13325871527194977, -0.21066004037857056, -0.08124347776174545, -0.10897886753082275, -0.47189798951148987, -0.35393285751342773, 0.5400258898735046, -0.2819812297821045, 0.01795586198568344, -0.25547105073928833, 0.042559169232845306, 0.37076643109321594, -0.6541247963905334, -0.30795770...
How to sort list of values using only one variable? EDIT: according to @Igor's comment, I retitled the question. A solution in C: ---------------- ``` #include <stdio.h> int main() { int list[]={4,7,2,4,1,10,3}; int n; // the one int variable startsort: for (n=0; n< sizeof(list)/sizeof(int)-1; ++n)...
[ -0.08916498720645905, -0.22707518935203552, 0.48524370789527893, -0.2312615066766739, -0.03103570081293583, 0.06961436569690704, 0.16573505103588104, -0.4334264099597931, -0.3576872944831848, -0.3825056552886963, -0.13770972192287445, 0.431627482175827, -0.5512833595275879, 0.0750155225396...
list[n] ^= list[n+1]; goto startsort; } for (n=0; n< sizeof(list)/sizeof(int); ++n) printf("%d\n",list[n]); return 0; } ``` Output is of course the same as for the Icon program.
[ -0.24285826086997986, -0.2304069995880127, 0.5376572012901306, -0.5979928374290466, 0.07106567174196243, 0.13792023062705994, 0.1296980232000351, -0.27667275071144104, -0.44780582189559937, -0.5187714695930481, -0.41987937688827515, 0.6851814389228821, -0.5349598526954651, 0.00270711514167...
I'm working in Java with XML and I'm wondering; what's the difference between an element and a node? The Node object is the primary data type for the entire DOM. A node can be an element node, an attribute node, a text node, or any other of the node types explained in the "Node types" chapter. An XML element is every...
[ -0.21071523427963257, -0.09839803725481033, 0.34734880924224854, 0.3575667440891266, -0.07101517915725708, -0.11876662075519562, -0.2611978352069855, 0.033856675028800964, -0.033957310020923615, -0.20899851620197296, -0.3434853255748749, 0.19058868288993835, -0.11776208132505417, 0.2958369...
Despite my most convincing cries to the contrary, I was recently forced to implement a horizontal drop-down navigation system, so I opted for the friendliest one I could find - [Son of Suckerfish](http://www.htmldog.com/articles/suckerfish/dropdowns/). I tested in various browsers on my machine and all appeared to be ...
[ -0.0077884686179459095, 0.04045989736914635, 0.7265893816947937, 0.0006397090037353337, 0.08693002164363861, -0.027055954560637474, 0.5210340619087219, 0.5281608700752258, -0.3343486785888672, -0.6042941212654114, -0.31830844283103943, 0.28141918778419495, -0.05963704362511635, -0.08132866...
send screenshots of the tabs in Internet Options) on the same OS (XP). I cannot verify if Vista is affected or not. Obviously trying to debug this issue is a nightmare since I cannot replicate it, so I am wondering if anyone here can and might know how to solve it. I have set up an example page here: > <http://x01.co...
[ 0.5219613909721375, 0.10294442623853683, 0.2572984993457794, 0.05672290921211243, -0.17929689586162567, -0.2956590950489044, 0.6908424496650696, 0.3484524190425873, -0.27749529480934143, -0.8211343884468079, -0.2033340483903885, 0.5328295826911926, -0.22643423080444336, 0.11091236025094986...
page has focus (ie, you clicked somewhere and then mouse-over the menu). It seems to be an issue with the :hover pseudo-class. Adding a hasLayout trigger to the :hover style should fix the problem. ``` #nav li:hover { position: static; } ``` There are other solutions too. There's a great write-up about the probl...
[ 0.013309027068316936, -0.04144145920872688, 0.7802414894104004, -0.004473378416150808, -0.17246593534946442, -0.20700699090957642, 0.12796913087368011, 0.5161202549934387, -0.33602219820022583, -0.7561230659484863, -0.1749221831560135, 0.1782340109348297, -0.3498748242855072, 0.09181425720...
I've been writing a little application that will let people upload & download files to me. I've added a web service to this applciation to provide the upload/download functionality that way but I'm not too sure on how well my implementation is going to cope with large files. At the moment the definitions of the upload...
[ -0.04331599548459053, 0.10527418553829193, 0.5943640470504761, 0.09278904646635056, -0.10278308391571045, 0.03449989855289459, -0.029939834028482437, -0.14336632192134857, -0.4241727590560913, -0.5107707381248474, -0.12233346700668335, 0.4908521771430969, -0.3204943537712097, 0.27082508802...