text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
transforms are implemented like a stack - so the last transform is performed first. Try reversing the order of the rotate and scale transformations and you should get what you are looking for. ``` newTransform.concatenate(AffineTransform.getTranslateInstance(x1, x2)); newTransform.concatenate(AffineTransform.getRotate...
[ -0.2315143197774887, -0.45674189925193787, 0.7867752909660339, -0.09867705404758453, -0.3726808428764343, 0.112568199634552, 0.22833633422851562, -0.724739134311676, 0.04660508409142494, -0.7024950385093689, -0.4321151673793793, 0.7758805155754089, -0.20280595123767853, 0.00196698447689414...
I am trying to use os.system() to call another program that takes an input and an output file. The command I use is ~250 characters due to the long folder names. When I try to call the command, I'm getting an error: `The input line is too long`. I'm guessing there's a `255 character limit` (its built using a C syste...
[ 0.033380527049303055, 0.09500935673713684, 0.30975615978240967, -0.014761053957045078, 0.046552300453186035, 0.06186143681406975, 0.3610038757324219, 0.0707247406244278, -0.22320246696472168, -0.7379714846611023, 0.0786544680595398, 0.4317237138748169, -0.1787107288837433, 0.19329822063446...
way to get around this limit or get it to recognize relative paths? You should use the subprocess module instead. See [this](http://docs.python.org/library/subprocess.html#subprocess-replacements) little doc for how to rewrite os.system calls to use subprocess.
[ -0.09900782257318497, -0.18485765159130096, 0.3985709846019745, 0.24353578686714172, 0.18585564196109772, 0.053475502878427505, 0.18311083316802979, -0.03329280763864517, -0.3239547312259674, -0.8221917152404785, -0.0927276462316513, 0.6463596820831299, -0.40681466460227966, -0.14081120491...
I have a warehouse. Sometimes I want to lookup a box location by a name, sometimes by a description, sometimes by a UPC, maybe something else, etc. Each of these lookup methods call the same various private methods to find information to help locate the data. For example, upc calls a private method to find a rowid, so...
[ 0.732652485370636, 0.271355003118515, 0.0141897676512599, 0.11254319548606873, 0.291034460067749, 0.16338089108467102, -0.3337339758872986, 0.16135373711585999, -0.4247792065143585, -0.5737220644950867, 0.05935591459274292, 0.18946868181228638, -0.1145361140370369, 0.42611172795295715, 0...
something else) because I am looking up my box in different ways. In other words, say my code for lookups is very similar for UPC and for location. Each method may call something with (select \* from xxxx where location =, or select \* from xxxx where upc =). I could just create two different methods in the same class...
[ 0.08063829690217972, -0.23750974237918854, 0.4413604438304901, 0.026086680591106415, 0.03893008083105087, 0.0889616310596466, -0.10950177162885666, -0.44781479239463806, -0.1784861832857132, -0.737592875957489, 0.023505924269557, 0.4296604096889496, -0.3771529495716095, 0.2997976243495941,...
for whichever version I need? I don't know why I'd want to do this other than it looks OOD, which really means I'd like to do this if I have a good reason. But, I know of no advantage. I just find that my class gets bigger and bigger and I just slightly change the name of the methods and a little bit of code and it ma...
[ 0.6618675589561462, -0.2060118019580841, 0.14126870036125183, 0.14618711173534393, -0.3668164312839508, -0.14060606062412262, 0.1625080406665802, -0.3524225354194641, -0.33763545751571655, -0.5516147017478943, 0.18778422474861145, 0.6964288949966431, -0.19966812431812286, 0.069208078086376...
would tell my properties, etc. and what methods to override. Neither ======= neither using an abstract class nor an interface will simplify the protocol, i.e. you will still end up with a bunch of LocateXXX methods I would recommend having a generic Locate(string criteria) method as the basis, and only defining speci...
[ 0.4446912407875061, -0.023012075573205948, 0.5518169403076172, 0.23047465085983276, 0.1420435756444931, -0.31857842206954956, 0.28030073642730713, -0.3867201805114746, 0.25599056482315063, -0.5935114622116089, 0.11931239068508148, 0.3296641707420349, -0.18166926503181458, 0.133986011147499...
I would like to remove the item.description part of a twitter feed within yahoo pipes and I haven't figured out how to do it yet. Obviously the filter module will remove posts with that item so I've been trying to use Regex. I think clearing the item.description field would work well enough. Is there a Regex expressi...
[ 0.48266223073005676, -0.07527206093072891, 0.5101454854011536, -0.009460958652198315, 0.0016792985843494534, -0.16402213275432587, 0.29679983854293823, -0.12842069566249847, -0.10672186315059662, -0.5979449152946472, 0.05903112515807152, 0.36602529883384705, -0.26637235283851624, 0.4712878...
of the transition event method, the state will persist. For example, say you have an object with the following event: ``` class Book < ActiveRecord::Base # ... aasm_event :close do transitions :to => :closed, :from => [:opened] end # ... end ``` Calling `book.close` will set the state to `closed`, but...
[ -0.16516044735908508, 0.006040707230567932, 0.4523538649082184, -0.448638379573822, 0.2580350637435913, -0.01570354402065277, 0.3992573916912079, -0.2211908996105194, -0.08889855444431305, -0.4890264570713043, -0.4251873195171356, 0.5515503883361816, -0.5053866505622864, 0.4308897256851196...
Would it be possible to see the `CallStack` in VBA for MS Access 2003? That is to say, would it be possible to see from what `procedure` or `function` another `function` was called? There is no programmatic way in VBA to view the call stack that I know of. The usual solution to this problem is to use some structure to ...
[ -0.02464267611503601, 0.02877337485551834, 0.2074291855096817, -0.09440349042415619, -0.11110621690750122, -0.38296812772750854, 0.14046750962734222, -0.12566910684108734, -0.3819705545902252, -0.0691598504781723, 0.010887319222092628, 0.9269658923149109, -0.37470465898513794, 0.0209210272...
is sufficient. And, BTW, I always put the call stack button on my VBE toolbar, since it's one of the most frequently used functions for me. I also add the compile button -- I think it's crazy that it's not on the toolbar by default because it encourages people to code without ever forcing a compile. Then again, Access...
[ 0.2616722881793976, 0.017176181077957153, 0.45460405945777893, -0.010765350423753262, 0.12496386468410492, -0.23535983264446259, 0.23460699617862701, -0.06503909826278687, -0.35358908772468567, -0.25762295722961426, -0.07107143104076385, 1.1341670751571655, -0.42392629384994507, -0.2634080...
We have at work a Hudson machine that acts as a build server for a Java Swing Project. The build process is based on Ant scripts (and not Maven). Has anyone integrated tests from QuickTest Professional is such configuration? In other words: Is it possible to execute qtp tests automatically via Ant? Not sure about you...
[ 0.5412353873252869, -0.1164795458316803, 0.11372245103120804, 0.07385513186454773, -0.0375579334795475, -0.020801560953259468, 0.24826182425022125, -0.17349864542484283, 0.04188591614365578, -0.5295842885971069, 0.13235823810100555, 0.35432466864585876, -0.31435427069664, -0.04349757730960...
' Declare a Test object variable Set qtApp = CreateObject("QuickTest.Application") ' Create the Application object qtApp.Launch ' Start QuickTest qtApp.Visible = True ' Make the QuickTest application visible qtApp.Open "C:\Temp\simple_test", True ' Open the test in read-only mode ' set run settings for the test Set ...
[ 0.37749624252319336, -0.014021273702383041, 0.23298712074756622, -0.03829279541969299, 0.05027484521269798, -0.015859169885516167, 0.6748896241188049, -0.41754424571990967, 0.1609974354505539, -0.3408069610595703, -0.33236750960350037, 0.5962206125259399, -0.3957875370979309, -0.1297004222...
QTP with Ant and CruiseControl.
[ -0.3997548222541809, -0.5140343904495239, 0.4605231285095215, 0.04832623526453972, 0.10946863144636154, 0.1249132826924324, 0.08855545520782471, 0.120973601937294, -0.1454232782125473, -0.5349261164665222, -0.2300107181072235, 0.37103599309921265, 0.052556730806827545, -0.17924705147743225...
I'm working on an installer project that consists of an MSI file and a bootstrap application that manages the prerequisites; and since the need for some of the prerequisites depends on what features the user chooses to install, the bootstrap app also provides the UI. I want to be able to force the Add/Remove Programs (...
[ 0.8209283947944641, -0.013485264964401722, 0.5181354284286499, 0.028603684157133102, 0.4911358058452606, 0.06544845551252365, 0.26774466037750244, -0.23026175796985626, 0.04876654967665672, -0.7682819366455078, -0.07542215287685394, 0.8015007972717285, -0.5147431492805481, -0.2045698165893...
to no avail. Clicking the Change button in the ARP still gets me the MSI. Is there an easy way to do what I want? Failing that, is there a way for the MSI to detect that it was run from the ARP using the Change button so that I could get it to show an error message that tells the user to run the bootstrap app instead?...
[ 0.35434266924858093, 0.012221145443618298, 0.5494986772537231, -0.012706763111054897, 0.2204185128211975, 0.23321369290351868, 0.5530808568000793, -0.2501903474330902, -0.3962388038635254, -0.28975337743759155, 0.054100655019283295, 0.7546499967575073, -0.4075188934803009, -0.0169369075447...
UI? If not, what should I look for?) **Edit** My installer is installing not just one application, but a suite of applications, each of which the user is allowed to choose not to install. (We're installing these applications as a suite, because most of them depend on one of them in particular being installed. Therefor...
[ 0.5299444794654846, 0.0063500311225652695, 0.7599859237670898, 0.1600399613380432, 0.14014549553394318, -0.2053070068359375, 0.15609639883041382, -0.21776922047138214, -0.0699387639760971, -1.0344809293746948, -0.30172887444496155, 0.5780543684959412, -0.20007571578025818, 0.02880653552711...
MSI to check for the prerequisites until it knows which applications in the suite the user wants to install. Furthermore, we want to make it easy for the user by having the installers for all of the prerequisites for the applications that the user does want installed launched automatically. (This is the main reason why...
[ 0.22159449756145477, -0.3530322313308716, 0.8443451523780823, 0.2238074690103531, 0.43845412135124207, -0.28308990597724915, 0.2830633223056793, -0.06851986050605774, -0.2223452776670456, -0.791878879070282, -0.4733463227748871, 0.43620923161506653, -0.6761727929115295, 0.06120764091610908...
line args it passes into the MSI is a property that tells it that the bootstrap app launched it. This is currently used, among other things, to allow the MSI to show an error message telling the user to run the bootstrap app unless an uninstall or repair install was specified on the command line.) I was able to solve m...
[ 0.5725793838500977, -0.2199336588382721, 0.7633460164070129, -0.06706061214208603, 0.12114442884922028, 0.18604230880737305, 0.36189723014831543, 0.02635505236685276, -0.25918465852737427, -0.02184181846678257, -0.06816069036722183, 0.40692681074142456, -0.6629059910774231, 0.0041404748335...
the UI sequence, but I couldn't end the install without generating errors that way. Since my goal was to run the bootstrap only for Modify installs, I put a couple of new control events on the Next button of the Maintenance dialogue (where the user chooses between Modify, Repair and Remove). If the user has chosen Mai...
[ -0.08478828519582748, -0.28207385540008545, 0.6473157405853271, -0.015854259952902794, 0.14533306658267975, 0.13419033586978912, 0.44976335763931274, -0.17724522948265076, 0.14103147387504578, -0.36837220191955566, -0.3448166847229004, 0.8152406215667725, -0.3860282301902771, -0.0831144154...
that causes the bootstrap to be launched, i.e., NOT (MaintenanceMode ~= "Modify").) The bootstrap app is programmed to skip past the Maintenance dialogue in its GUI and start off at the next dialogue in the sequence, although the user is permitted to go back to the Maintenance dialogue if he so chooses. (If he does, th...
[ 0.3778287172317505, 0.020330626517534256, 0.4236864149570465, 0.11583306640386581, 0.31081724166870117, -0.09744425117969513, 0.37001436948776245, 0.2911478281021118, -0.07442369312047958, -0.3750588893890381, -0.39235714077949524, 0.9599890112876892, -0.4486541748046875, -0.29432967305183...
I have an RTF file that I need to display to a user. I know that I need to convert it if I want to display it in the browser. I would like to be able to convert it to JPG so that I can take advantage of other code that I am using that uses ImageMagick to convert JPG to PDF. ImageMagick will convert a PDF to a JPG, but ...
[ 0.39468273520469666, 0.20521602034568787, 0.773224949836731, 0.016790052875876427, -0.3878791332244873, -0.19184929132461548, -0.08415305614471436, -0.24134573340415955, -0.07699710130691528, -0.9951025247573853, -0.06450280547142029, 0.666663646697998, -0.40719151496887207, 0.097209103405...
it to JPG for display. I don't like the fact that I have to go to PDF first, but it works so I am going to stick with it. Thanks to all that have responded. Perhaps you could convert the RTF to PDF then to JPG. Sure thats more work than going straight from RTF to JPG but it might be an acceptable short term workaround ...
[ 0.4284138083457947, -0.18065226078033447, 0.4816078543663025, 0.24301575124263763, -0.4450324475765228, -0.32795944809913635, -0.19168581068515778, 0.3111777603626251, -0.28501346707344055, -0.7704329490661621, 0.010308684781193733, 0.6643843650817871, 0.08286626636981964, 0.09604451805353...
It is possible for an operating system to determine whether a page of memory is in DRAM or in swap; for example, simply try to access it and if a page fault occurs, it wasn't. However, is the same thing possible with CPU cache? Is there any efficient way to tell whether a given memory location has been loaded into a...
[ 0.13888828456401825, 0.05328698456287384, 0.01351045910269022, 0.328167587518692, 0.2990545332431793, -0.0171955693513155, -0.046599507331848145, -0.1107962429523468, -0.30146849155426025, -0.6636142730712891, -0.024848654866218567, 0.5889797806739807, -0.19085876643657684, 0.0242427717894...
a tight timing loop of a memory read and try to see if it completes fast enough to be in the cache or if it had to go out to main memory - this would be very error prone. On multi-core/multi-proc systems, there are [cache coherency protocols](http://en.wikipedia.org/wiki/Cache_coherency) that are used between processo...
[ 0.18479488790035248, 0.0025083268992602825, -0.15134099125862122, 0.16266335546970367, 0.12168443948030472, -0.09055110067129135, 0.2228497564792633, -0.02994716167449951, -0.40560978651046753, -0.5634053349494934, -0.15350914001464844, 0.46425744891166687, -0.3095542788505554, 0.111569650...
the cache in a non-blocking way, for instance with Visual C++ you could use [`_mm_prefetch`](http://msdn.microsoft.com/en-us/library/84szxsww(VS.80).aspx) to fetch a line into the cache. EDIT: I haven't done this myself, so use at your own risk. To determine cache misses for profiling, you may be able to use some arch...
[ 0.03287508711218834, -0.014464757405221462, 0.1156376451253891, 0.27042993903160095, -0.062033578753471375, 0.07397405058145523, 0.4023507237434387, -0.13564005494117737, -0.19669270515441895, -0.6739044785499573, -0.20747709274291992, 0.3798072040081024, -0.26100918650627136, -0.014434643...
I've been sending emails on my application (ruby 1.8.7, rails 2.3.2) like this `Thread.new{UserMailer.deliver_signup_notification(user)}` Since ruby use green threads, there's any performance advantage doing this, or I can just use `UserMailer.deliver_signup_notification(user)` ? Thanks Global VM lock will still a...
[ 0.3397117555141449, -0.0735643208026886, 0.3909910321235657, -0.1181255653500557, -0.21400432288646698, -0.18673889338970184, 0.4742707312107086, 0.05493554845452309, -0.5753905773162842, -0.6761524677276611, 0.119957834482193, 0.40094077587127686, -0.4789062738418579, 0.3356991708278656, ...
**just dispatching** been thread-safe, and only if you turn it on in environment.rb with config.threadsafe!. [This article](http://m.onkey.org/archives/2008/10) explains in more detail. If you want to send your message asynchronously use [BackgroundRb](http://backgroundrb.rubyforge.org/) or its analog.
[ 0.351723849773407, -0.39969733357429504, 0.1434415727853775, -0.23348979651927948, -0.3251992464065552, -0.1794312447309494, 0.5289260149002075, 0.4837974011898041, -0.5738568305969238, -0.4974283277988434, -0.03549416363239288, 0.43212029337882996, -0.6715041995048523, -0.0557486824691295...
My server was doing just fine up until yesterday. It was running [Redmine](http://www.redmine.org/), and it was the happiest little server **until** my "friend" imported a SQL table that my little guy couldn't take. Unfortunately, after an hour of trying to get the lil guy to respond, we had to power cycle him. Now af...
[ 0.11940445005893707, 0.1510545164346695, 0.3185485303401947, -0.038545552641153336, 0.06348702311515808, 0.0056615108624100685, 0.4140254557132721, 0.42899268865585327, -0.4738234281539917, -0.8086839318275452, 0.29838743805885315, 0.5537242293357849, -0.27908140420913696, 0.38191217184066...
Ruby application working fine. But this bit is not working in my Apache configuration file: ``` <VirtualHost *:80> ServerName sub.example.com ProxyPass / http://localhost:8000 ProxyPassReverse / http://localhost:8000 ProxyPreserveHost on LogLevel debug </VirtualHost> ``` Here's the error log outp...
[ -0.2963903844356537, 0.2863568365573883, 0.45057210326194763, -0.23618081212043762, -0.47856029868125916, 0.21232791244983673, 0.7744471430778503, -0.436553418636322, -0.45485347509384155, -0.42940449714660645, 0.10445123165845871, 0.41703617572784424, -0.405604749917984, 0.248962119221687...
HTTP: fam 2 socket created to connect to localhost [error] (13)Permission denied: proxy: HTTP: attempt to connect to 127.0.0.1:8000 (localhost) failed [error] ap_proxy_connect_backend disabling worker for (localhost) [debug] proxy_util.c(1773): proxy: HTTP: has released connection for (localhost) ``` Apache will res...
[ -0.1638774573802948, -0.10849153995513916, 0.7303497195243835, -0.0353943333029747, -0.3079221248626709, -0.006489853840321302, 0.5657833814620972, -0.326333224773407, -0.3179214894771576, -0.5368760228157043, -0.36800065636634827, 0.2358563393354416, -0.48782458901405334, 0.13218221068382...
now 'up'. Please see the apache docs on ProxyPass where it states: > retry 60 > > > > > Connection pool worker retry timeout in seconds. If the connection pool worker to the backend server is in the error state, Apache will not forward any requests to that server until the timeout expires. This enables to shut dow...
[ 0.3339700400829315, 0.012094727717339993, 1.036935806274414, 0.10282713919878006, -0.12563471496105194, -0.24062961339950562, 0.5213894248008728, -0.1915241777896881, -0.42616361379623413, -0.8545969724655151, -0.3104148507118225, 0.35406482219696045, -0.15469932556152344, 0.28753876686096...
restart your backend service. This is also useful when using Apache as reverse proxy during development! For example: > ProxyPass / <http://localhost:8000> retry=0
[ -0.051940180361270905, -0.43205344676971436, 0.4076494574546814, 0.1708424687385559, 0.12877468764781952, -0.28060975670814514, 0.689416229724884, 0.2161683440208435, -0.278709352016449, -0.7265955805778503, -0.22494439780712128, 0.5907779932022095, 0.08344967663288116, 0.10718837380409241...
I'm working with C++ unmanaged, the problem that I have happens when I call a method that returns an LPVOID. ``` LPVOID MyMethod(...); ``` The problem is that this method sometimes returns a Bad Ptr and I want to know if there is a way of detecting this, if the value returned is a Bad Ptr. I have tried asking if it...
[ 0.10325167328119278, 0.20816925168037415, 0.13056838512420654, -0.2107105553150177, -0.18859480321407318, -0.280988872051239, 0.09709902107715607, 0.14184747636318207, -0.24613267183303833, -0.44171467423439026, -0.10349410772323608, 0.676609218120575, -0.5697718262672424, 0.17117008566856...
pointer is bad. Windows does have IsBadReadPtr, IsBadWritePtr. These functions are inherently flawed - they only determine if a function is readable or writable in your address space at the moment of the call. They can also be the cause of [security](http://blogs.msdn.com/LarryOsterman/archive/2004/05/18/134471.aspx) ...
[ -0.07133601605892181, 0.3402988910675049, 0.40624576807022095, -0.1814432144165039, 0.05343783646821976, -0.24037964642047882, 0.6081855893135071, 0.09055997431278229, -0.13317666947841644, -0.6233156323432922, 0.0807594582438469, 0.5137447118759155, -0.33617788553237915, 0.505850434303283...
be able to access it without crashing but writing to it will corrupt your state.
[ 0.37326714396476746, 0.08888722956180573, 0.09526660293340683, 0.5137448906898499, 0.20761960744857788, -0.5019220113754272, 0.5820245146751404, 0.39391517639160156, 0.17857669293880463, -0.7029827833175659, -0.0782788023352623, 0.5692715048789978, 0.15263479948043823, -0.09647862613201141...
I am still new to C# and I've been struggling with various issues on arrays. I've got an array of metadata objects (name value pairs) and I would like to know how to create only the number of "InputProperty" objects that I truly need. In this loop I've arbitrarily set the number of elements to 20 and I try to bail out ...
[ 0.17243553698062897, 0.022496463730931282, 0.41346076130867004, -0.2848733067512512, 0.10018143057823181, -0.25519582629203796, 0.49412357807159424, -0.41889724135398865, 0.043607257306575775, -0.442506343126297, -0.14358468353748322, 0.8820436000823975, -0.3347140848636627, 0.120992809534...
InputProperty[] ip = new InputProperty[20]; // how to make this "dynamic" int i; for (i = 0; i < nvPairs.Length; i++) { if (nvPairs[i] == null) break; ip[i] = new InputProperty(); ip[i].Name = "udf:" + nvPairs[i].Name; ip[i].Val = nvPairs[i].Value; } update.Items = i...
[ -0.3513200581073761, -0.3522648215293884, 0.5790557861328125, -0.07637980580329895, -0.056238602846860886, 0.31451889872550964, 0.2928372025489807, -0.688697338104248, -0.4223572611808777, -0.5530809760093689, -0.2785915732383728, 0.4031681716442108, -0.2715579867362976, 0.3057802021503448...
in the above input array? Rather than allocate 20 elements for the array called ip, how can code this so ip is only as big as it needs to be. The update object is passed across another webservice so serialization is important (i.e. I can't use namevaluecollection, etc.). p.s. Is the only way to followup on a posted q...
[ 0.23667344450950623, -0.1360199749469757, 0.2889292538166046, 0.19396795332431793, -0.2146064043045044, -0.062009312212467194, -0.06341670453548431, -0.4682110548019409, -0.5500168204307556, -0.6063783764839172, 0.04333281144499779, 0.22535257041454315, -0.24620182812213898, -0.03158482536...
possible size, keep track of how many items you put in it, and then create a new array with just those items in it: ``` private Update BuildMetaData(MetaData[] nvPairs) { Update update = new Update(); InputProperty[] ip = new InputProperty[20]; // how to make this "dynamic" int i; for (i = 0; i < nvPa...
[ -0.04692999646067619, -0.2953743636608124, 0.5016239881515503, -0.017438234761357307, 0.3505808115005493, 0.13047033548355103, 0.22227232158184052, -0.7393546104431152, -0.3942786753177643, -0.5298570990562439, -0.37187525629997253, 0.557902991771698, -0.3114161491394043, 0.029666515067219...
ip[i].Name = "udf:" + nvPairs[i].Name; ip[i].Val = nvPairs[i].Value; } if (i < nvPairs.Length) { // Create new, smaller, array to hold the items we processed. update.Items = new InputProperty[i]; Array.Copy(ip, update.Items, i); } else { update.Items = ip;...
[ -0.15224005281925201, -0.2629179060459137, 0.5058655142784119, 0.07071561366319656, -0.06847262382507324, 0.2832801640033722, 0.0035126295406371355, -0.6010385751724243, -0.5111292004585266, -0.5137363076210022, -0.02554422616958618, 0.253837525844574, -0.258164644241333, 0.507740080356597...
update; } ``` An alternate method would be to always assign `update.Items = ip;` and then resize if necessary: ``` update.Items = ip; if (i < nvPairs.Length) { Array.Resize(update.Items, i); } ``` It's less code, but will likely end up doing the same amount of work (i.e. creating a new array and copying the ol...
[ -0.0992022231221199, -0.22195500135421753, 0.38888031244277954, -0.1696566790342331, -0.09836138039827347, -0.0594680979847908, 0.20371142029762268, -0.42749688029289246, -0.2715551257133484, -0.6420484781265259, -0.32862216234207153, 0.42594918608665466, -0.40735042095184326, 0.2434079349...
So, SUPER low-level what does an IF() look like, how is it handled by an x86 processor? The processor has "Branch if" instructions that when a certain condition is met it branches, and otherwise it continues on to the next instruction. So ``` if(A) { dosomething; } ``` would become ``` load A into register 0 i...
[ 0.1228029802441597, -0.4415203928947449, 0.3500765860080719, 0.05522466450929642, 0.18126685917377472, -0.07432789355516434, 0.22013317048549652, -0.21501022577285767, -0.2102542519569397, -0.28547948598861694, -0.34928300976753235, 0.49265801906585693, -0.3204251229763031, -0.059548720717...
conditional flags. There are many conditional flags (zero, carry, negative, overflow, etc), and some branchif instructions also operate on more complex conditions (ie, it might actually check to see if a register is equal to another register, rather than simply looking at flags). Each architecture is different and mak...
[ 0.22313232719898224, -0.42853212356567383, -0.3101111650466919, -0.03384842723608017, -0.12066894769668579, 0.11328960210084915, 0.1759185940027237, -0.24112167954444885, -0.24137483537197113, -0.15615740418434143, -0.24097836017608643, 0.24167540669441223, -0.27097368240356445, -0.1525246...
is very, very, very complex beyond this simple explanation once you get into pipelining, out of order execution, caching, microcode, and all the other advanced topics. For most purposes the above explanation is sufficient. If you're writing a hand crafted very, very tightly wound algorithm, though, you'll have to take ...
[ 0.3441668152809143, 0.34345710277557373, -0.35932159423828125, 0.18725009262561798, 0.4248078167438507, 0.040564633905887604, 0.2577277421951294, 0.0008678358281031251, -0.21088159084320068, -0.5346723198890686, -0.13365861773490906, 0.226971834897995, 0.059578314423561096, -0.089814238250...
Below is a snippet of what you get when you save the configuration of IIS 6/Windows Server 2003 web sites to a file: ``` <?xml version ="1.0"?> <configuration xmlns="urn:microsoft-catalog:XML_Metabase_V64_0"> <MBProperty> <IIsWebServer Location ="/LM/W3SVC/1" AppPoolId="DefaultAppPool" DefaultDoc="De...
[ -0.4127054810523987, 0.010235157795250416, 0.5218999981880188, 0.025262968614697456, 0.049156587570905685, -0.006269061006605625, 0.23359709978103638, -0.30944356322288513, -0.34363484382629395, -0.7060461044311523, -0.151060551404953, 0.6976413726806641, -0.16385656595230103, -0.081985399...
ServerAutoStart="TRUE" ServerBindings="161.230.9.48:80:" ServerComment="QSP2.Downtime" > </IIsWebServer> </MBProperty> </configuration> ``` As you can see, there are multiple `<IIsWebServer>` sections between the `<MBProperty>` and `</MBProperty>` elements. I'd like to create a simple xsl stylesheet which ou...
[ -0.12292040884494781, -0.24424831569194794, 0.9945194721221924, 0.0022825764026492834, -0.37501707673072815, -0.12656773626804352, 0.4211837947368622, -0.35423949360847473, -0.03315146639943123, -0.9793709516525269, -0.19913668930530548, 0.5382339358329773, -0.14524880051612854, 0.02609341...
xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:mb="urn:microsoft-catalog:XML_Metabase_V64_0" exclude-result-prefixes="msxsl"> <xsl:output method="text" indent="yes"/> <xsl:template match="/"> ServerComment&#160;&#160;&#160;ServerBindings&#160;&#160;&#160;AuthFlags <xsl:apply-templates ...
[ -0.1989215463399887, 0.12903454899787903, 0.7118435502052307, 0.02173774689435959, -0.030489381402730942, -0.20960953831672668, -0.04173406586050987, -0.4573706388473511, -0.0706903263926506, -0.7674130201339722, -0.3280221223831177, 0.44353237748146057, -0.03274192288517952, -0.0227847155...
can be done - no problem. Marc
[ 0.6345136165618896, 0.32999348640441895, 0.014960492961108685, 0.2325316071510315, 0.2043541818857193, 0.19652260839939117, 0.17092014849185944, 0.6375437378883362, 0.048449497669935226, -0.8643959760665894, 0.004997114650905132, 0.5814578533172607, 0.4121992290019989, -0.2081950604915619,...
My company has an application developed for SQL Server 2005 (among others), and a potential client is attempting to install it on SQL Server 2000. Naturally, installation failed. Specifically, it failed with syntax errors in our CREATE TABLE statements. Is there a summary of the language differences between these two ...
[ 0.3137419521808624, 0.33027657866477966, 0.1268654316663742, 0.043967071920633316, 0.33926552534103394, -0.14537616074085236, 0.12986426055431366, 0.16707676649093628, -0.22855152189731598, -0.4075686037540436, 0.1346503049135208, 0.5854300260543823, -0.13464587926864624, 0.137125611305236...
Okay, this is a bit abstract, but here goes: I'm creating a website and I want to have a field, "foo", that I can access from any page on the site. I figured the best way to do this would be to create a subclass of Page called "bar", add the protected field "foo" to it, and then have all my webpages inheret from "bar"...
[ 0.4320794939994812, 0.269773930311203, 0.13355880975723267, 0.03254938870668411, -0.071360744535923, -0.23551665246486664, 0.03116060048341751, 0.27273082733154297, -0.31545770168304443, -0.21462279558181763, -0.002717912895604968, 0.39653679728507996, -0.5651902556419373, 0.23335103690624...
know about "foo"? I can access foo by doing something like this in my control: ``` Foo foo = ((Bar)Page).foo; ``` This works, but strikes me as a bit ugly. I'd really like to just be able to use foo. I figure, hey, maybe I can do the same trick with my controls that I did for page. I create a new class, "blargh" tha...
[ 0.24276421964168549, 0.3270310163497925, 0.30880722403526306, -0.23094704747200012, -0.2532835602760315, -0.1447579711675644, 0.48528555035591125, 0.13452397286891937, -0.08623114228248596, -0.5431149005889893, 0.17942260205745697, 0.6181447505950928, -0.45121121406555176, 0.30644103884696...
Page is null. Why? How could Page be null? When I look at the call stack I get no help. Is there an easy, well understood way to do this? Am I barking up the wrong tree? Another easy way to get started with this, before you decide which objects will need access and which won't, is to simply make a public static class ...
[ -0.1095425933599472, 0.18714787065982819, 0.39759349822998047, 0.007093047257512808, -0.28950273990631104, -0.2643170654773712, 0.28613582253456116, 0.07297778874635696, -0.4584989845752716, -0.6236945986747742, -0.05139812454581261, 0.24771748483181, -0.6552973389625549, 0.451977908611297...
I am creating an ASHX that returns XML however it expects a path when I do ``` XmlWriter writer = XmlWriter.Create(returnXML, settings) ``` But returnXML is just an empty string right now (guess that won't work), however I need to write the XML to something that I can then send as the response text. I tried XmlDocu...
[ 0.3992711901664734, 0.10377688705921173, 0.08977724611759186, -0.08283272385597229, -0.24330365657806396, -0.038157302886247635, 0.49630770087242126, -0.25444909930229187, 0.2972135841846466, -0.7686845064163208, 0.0763857513666153, 0.4226561188697815, -0.39629390835762024, 0.2490627765655...
XmlWriterSettings settings = new XmlWriterSettings(); settings.Indent = true; StringBuilder builder = new StringBuilder(); using (XmlWriter writer = XmlWriter.Create(builder, settings)) { writer.WriteStartDocument(); writer.WriteStartElement("root"); ...
[ -0.08849041163921356, -0.05890187621116638, 0.5855044722557068, -0.21288356184959412, 0.19867630302906036, 0.15029054880142212, 0.4843021035194397, -0.7509967088699341, 0.1352854073047638, -0.5888413190841675, -0.1340000182390213, 0.5642428398132324, -0.14978264272212982, 0.117738373577594...
writer.WriteString("content"); writer.WriteEndElement(); writer.WriteEndElement(); writer.WriteEndDocument(); } Console.WriteLine(builder); } } ``` If you want to write it directly to the response, however, you could pass in `HttpResponse.Output` which is a `Tex...
[ -0.04047510400414467, -0.059546809643507004, 0.762937605381012, -0.2227780818939209, 0.04639481008052826, 0.098454549908638, 0.4332137107849121, -0.3632057309150696, 0.14490744471549988, -0.7035727500915527, -0.23496386408805847, 0.5137389302253723, -0.18516679108142853, 0.1378186196088791...
By default, RHEL5.x64 comes with 5.1.6 - pretty old. I'm looking for a more up to date version, 5.2.8, or even the latest 5.2.9 (as of March 2009). Ideally, a Yum/RPM-based solution, for transparent upgrades (when I plan). How do you upgrade the default for an up-to-date version? I've elected to go for the Zend-CE sol...
[ 0.15362799167633057, 0.03117990680038929, 0.8768982887268066, 0.1228857934474945, 0.06340030580759048, -0.2394772171974182, 0.17334282398223877, 0.005768326576799154, -0.19304612278938293, -0.45824530720710754, -0.05383574962615967, 0.8808504343032837, -0.05805472657084465, 0.1216437220573...
complicated.
[ -0.11023994535207748, 0.10805181413888931, -0.05362563580274582, 0.3320571482181549, 0.15554124116897583, -0.339939683675766, 0.08593432605266571, 0.02328517846763134, -0.10325706005096436, -0.5152120590209961, -0.11883921921253204, 0.1586505025625229, -0.26371920108795166, 0.2302689850330...
I'm trying to understand how CSS sprites improve performance on a site? Why is the downloading of several small images slower than the download of a single image holding the smaller images if the total size of the single image is the sum of the smaller images? It's important to understand why the overhead of an HTTP r...
[ 0.27654364705085754, -0.09020674973726273, 0.5202000141143799, 0.3125825524330139, -0.44628843665122986, 0.1311677247285843, -0.0007506902329623699, -0.07498179376125336, -0.23466043174266815, -0.6769993305206299, -0.36397647857666016, 0.190706267952919, -0.1375521719455719, 0.332595527172...
with a SYN-ACK, and the client responds to that with an ACK. So, before you send a single byte of application data, you have to wait for a whole one and a half round trips to the server, at least. Then the client needs to send the request, wait for the server to parse the request, find the requested data, send it ba...
[ -0.207865908741951, -0.07335294783115387, 0.6183189749717712, 0.3712867200374603, 0.16156601905822754, 0.0398007407784462, 0.020787518471479416, -0.1322656124830246, -0.4473350942134857, -0.43960893154144287, -0.23511454463005066, 0.2263033390045166, -0.2453218400478363, -0.122732497751712...
would result in packets being dropped and retransmitted. Every chance you have to avoid this, you should. Modern browsers will issue multiple requests in parallel in an attempt to reduce some of the overhead involved. HTTP requests can theoretically be done on the same socket, making things a little better. But in ge...
[ 0.3360367715358734, -0.1847476065158844, -0.05881645530462265, 0.3999646008014679, -0.10230276733636856, -0.2539702355861664, 0.48311692476272583, 0.2729296088218689, -0.4931139349937439, -0.7607013583183289, -0.20519320666790009, 0.2694944441318512, -0.2682695984840393, 0.2035885900259018...
I have classes like this ``` [DataContract(Namespace = "")] public class Foo { [DataMember(Order = 0)] Bar bar; } [DataContract(Namespace = "")] public class Bar { Baz baz; [DataMember(Order = 0)] string TheBaz { get { baz.ToString(); } set { SomeOtherCode(value); } } } `...
[ -0.10347548127174377, 0.057731982320547104, 0.3882393538951874, -0.23444733023643494, 0.16643069684505463, 0.001869143103249371, -0.04035872966051102, -0.048037391155958176, -0.19949914515018463, -0.637104868888855, -0.32890868186950684, 0.4629882574081421, -0.41212478280067444, 0.23821809...
artical](http://www.danrigsby.com/blog/index.php/2008/03/07/xmlserializer-vs-datacontractserializer-serialization-in-wcf/) says that one of the disadvantages of DataContractSerializer is: > 1. No control over how the object is serialized outside of setting the name and the order leading me to wonder is this is not a ...
[ 0.19901056587696075, -0.10691400617361069, 0.8103359341621399, -0.05773090198636055, -0.2887117266654968, -0.13650721311569214, -0.007846085354685783, -0.2763288617134094, -0.17568708956241608, -0.4882236421108246, 0.14417973160743713, 0.6971678733825684, -0.6483763456344604, 0.03382782638...
Visual Studio, or by executing the corresponding `msiexec.exe` commands). To embed an MSM into an MSI, the easiest way is to create a setup project in Visual Studio and add the **Merge Module** from the merge module project you have just created in your solution. This will automatically reference the MSM file and incl...
[ 0.3069782853126526, -0.24260401725769043, 0.30172625184059143, 0.09545116126537323, 0.0983537882566452, -0.06348908692598343, 0.005265052430331707, -0.17411455512046814, -0.2386789172887802, -0.8089593052864075, -0.3505839407444, 0.40952783823013306, -0.39856746792793274, -0.17713405191898...
What is the best way to embed Login Form into several pages in Zend Framework? Currently I have two controllers, LoginController for separate login form and IndexController for actions on index page. I need to include Login Form into index page to let users log in both from the front page and from Login page. My cur...
[ 0.0368388369679451, -0.309358149766922, 0.6348806619644165, 0.4071604013442993, 0.010891132056713104, -0.22635336220264435, 0.039394933730363846, -0.32496127486228943, -0.2253149300813675, -0.9084353446960449, 0.15612296760082245, 0.40092697739601135, -0.092257559299469, 0.277753084897995,...
inharitance? What is the best practice? Action helpers may help you <http://devzone.zend.com/article/3350-Action-Helpers-in-Zend-Framework>
[ 0.18142594397068024, -0.4530732035636902, 0.030515415593981743, 0.127602219581604, -0.2655159533023834, -0.03995862975716591, 0.6280676126480103, -0.37343624234199524, -0.153082475066185, -0.3423496186733246, -0.15581722557544708, 0.4737580418586731, 0.15663689374923706, -0.395358830690383...
Do you guys know about an ajax toolkit (or something similar to the m$-ajaxtoolkit) for mono?? I agree with Brian, but want to add that you should read Dave Ward's series on jQuery and ASP.net. He really distills the essence of what you can do with jQuery, PageMethods, and WebForms without MS Ajax. These ideas are dire...
[ 0.3828967809677124, 0.15744724869728088, -0.11452750861644745, 0.27204567193984985, -0.5004758238792419, -0.37654605507850647, 0.29039955139160156, -0.015408065170049667, -0.2043643444776535, -0.5650885105133057, 0.13476024568080902, 0.8096476197242737, -0.09911225736141205, -0.25908425450...
I've got a regular expression (javascript) which is something like... /(x)(y)+(z)/gi The problem is that I'll always get exactly 3 captures from those parens, even if the (y)+ matched multiple times. If it does match multiple times, it just returns the last match. I've no way of knowing ahead of time how many times y...
[ 0.41499754786491394, 0.16909651458263397, 0.11319790035486221, -0.060997989028692245, -0.21850360929965973, 0.08483738452196121, 0.29031217098236084, -0.4047646224498749, -0.1870231032371521, -0.5913707613945007, 0.11711115390062332, 0.51051926612854, -0.4362470209598541, -0.27784216403961...
What is the best way to implement polymorphic behavior in classes that I can't modify? I currently have some code like: ``` if(obj is ClassA) { // ... } else if(obj is ClassB) { // ... } else if ... ``` The obvious answer is to add a virtual method to the base class, but unfortunately the code is in a differ...
[ -0.14362801611423492, 0.06636185199022293, 0.31041762232780457, -0.27358120679855347, -0.13229842483997345, 0.09392540901899338, 0.5207915902137756, -0.23431099951267242, -0.0252236258238554, -0.7730352282524109, -0.040423400700092316, 0.5440443754196167, -0.5307034850120544, 0.41093158721...
protected ClassA _actualA; public MyA( ClassA actualA ) { _actualA = actualA; } public void DoWhatYouWant() { _actualA.DoWhatADoes(); } } public class MyB : ITheInterfaceYouNeed { protected ClassB _actualB; public MyB( ClassB actualB ) { _actualB = actualB...
[ 0.1549866944551468, 0.0010512933367863297, 0.2950581908226013, -0.2287788689136505, 0.11030390113592148, 0.32817333936691284, 0.620385468006134, 0.0024415438529103994, 0.35017603635787964, -0.343317449092865, 0.1385471522808075, 0.6658547520637512, -0.02608657069504261, 0.4835512638092041,...
_actualB.DoWhatBDoes(); } } ``` Seems like a lot of code, but it will make the client code a lot closer to what you want. Plus it'll give you a chance to think about what interface you're actually using.
[ 0.24775680899620056, 0.07297758013010025, 0.4314884841442108, 0.0018472495721653104, -0.11271236091852188, -0.11891274154186249, 0.19697993993759155, 0.2956918478012085, 0.2119542360305786, -0.8915395736694336, 0.2916947901248932, 0.8668569922447205, -0.11267361789941788, 0.043619219213724...
How can I set a key binding that globally overrides and takes precedence over all other bindings for that key? I want to override all major/minor mode maps and make sure my binding is always in effect. This of course doesn't work: ``` (global-set-key "\C-i" 'some-function) ``` It works in `text-mode`, but when I us...
[ -0.09605301916599274, 0.1953713744878769, 0.556995153427124, -0.1896732747554779, -0.03495512530207634, -0.4912712872028351, 0.4018554389476776, -0.19885022938251495, -0.17089231312274933, -0.6029908061027527, -0.275827020406723, 0.7801201939582825, -0.6393104791641235, 0.09602553397417068...
that all of my key bindings aren't being overridden by the new mode. I want to do this because I want to emulate bindings I've already learned and ingrained from other editors. I use a minor mode for all my "override" key bindings: ``` (defvar my-keys-minor-mode-map (let ((map (make-sparse-keymap))) (define-key...
[ 0.10775413364171982, 0.026364151388406754, 0.7679409980773926, -0.1456243246793747, 0.07568253576755524, -0.2677280902862549, 0.3928482234477997, -0.39126038551330566, -0.05816985294222832, -0.5034026503562927, -0.09403246641159058, 0.8521148562431335, -0.3587052524089813, -0.0383015759289...
(just disable the minor mode) in case someone else is driving the keyboard or if I need to see what a default key binding does. Note that you may need to turn this off in the minibuffer: ``` (defun my-minibuffer-setup-hook () (my-keys-minor-mode 0)) (add-hook 'minibuffer-setup-hook 'my-minibuffer-setup-hook) ```
[ -0.016887405887246132, -0.2536449134349823, 0.6083862781524658, -0.2376738339662552, 0.5125810503959656, -0.12949976325035095, 0.4757336676120758, 0.17801620066165924, 0.026030536741018295, -0.3662128746509552, -0.3930274248123169, 1.1951417922973633, -0.17628543078899384, 0.17822436988353...
What is the best way to **deep** clone an interconnected set of objects? Example: ``` class A { B theB; // optional // ... } class B { A theA; // optional // ... } class Container { A[] a; B[] b; } ``` The obvious thing to do is walk the objects and deep clone everything as I come to it. Th...
[ 0.33266833424568176, -0.3049129545688629, -0.14351916313171387, 0.17154282331466675, 0.2120632529258728, 0.28364503383636475, 0.3333593010902405, 0.052488721907138824, -0.35436490178108215, -0.702812135219574, 0.06401278078556061, 0.27082008123397827, -0.48894163966178894, 0.08563362807035...
after I clone the `Container`. The next logical step is to create a `Dictionary` and look up every object before I clone it. This seems like it could be a slow and ungraceful solution, however. Any thoughts? Its not an elegant solution for sure, but it isn't uncommon to use a dictionary (or hashmap). One of the benef...
[ 0.21637076139450073, 0.18094420433044434, 0.18364828824996948, 0.0657753050327301, 0.22613190114498138, 0.06910156458616257, 0.09265536814928055, 0.2972779870033264, 0.19842198491096497, -0.8916727304458618, 0.035183534026145935, 0.4978756904602051, 0.031572211533784866, -0.030373824760317...
The offsetof macro seems not to work under C++/CLI. This works fine in unmanaged C++, but throws "error C2275: 'Entity' :illegal use of this type as an expression" error in CLI. ``` struct Property{ char* label; PropertyTypes type; unsigned int member_offset; unsigned int position; unsigned ...
[ 0.2673579454421997, -0.07475867122411728, 0.4033080041408539, -0.17952004075050354, 0.08480276167392731, -0.08016280084848404, -0.08009877800941467, -0.5245241522789001, -0.15730786323547363, -0.20335885882377625, -0.025176431983709335, 0.6883687376976013, -0.5280356407165527, 0.0419602505...
offsetof(Entity, transparent), 0, 0}; // C2275 HERE ``` Does CLI have some replacement? My guess would be that the compiler message boils down to: "offsetof" is not a known macro and if it was a function its parameters must not contain a typename. **Edit**: As somebody pointed out in the comments, *o...
[ 0.23629130423069, 0.10129044950008392, 0.22530917823314667, -0.06488380581140518, 0.003303298493847251, -0.10741671919822693, -0.2637892961502075, -0.2123163789510727, -0.3019558787345886, -0.3548595905303955, 0.0777553915977478, 0.6317214965820312, -0.6052200198173523, -0.1909886300563812...
#define OFFSET_OF( s, m )\ (size_t)((ptrdiff_t)&reinterpret_cast<const volatile char&>((((s*)0)->m)) ) #else #define OFFSET_OF( s, m )\ (size_t)&reinterpret_cast<const volatile char&>((((s*)0)->m)) #endif ```
[ 0.03603706508874893, -0.015578284859657288, 0.3356265723705292, -0.27802982926368713, 0.37510576844215393, 0.12100686877965927, -0.14508281648159027, -0.4684366285800934, -0.06848486512899399, -0.3152265250682831, -0.39365100860595703, 0.8601321578025818, -0.28132981061935425, -0.166271373...
Is it possible to integrate Python and JavaScript? For example, imagine you wanted to be able to define classes in JavaScript and use them from Python (or vice versa). If so, what's the best way? I'm interested not only if this is possible but if **anyone has done it within a "serious" project or product**. I'm guessi...
[ 0.36260557174682617, -0.11836988478899002, -0.42030465602874756, 0.0569271519780159, -0.05742702633142471, -0.037773504853248596, 0.06859462708234787, 0.29352664947509766, -0.5162426829338074, -0.5659139156341553, 0.15526704490184784, 0.45354482531547546, -0.32987430691719055, -0.270010590...
this may have been asked before, but I could not find it. Suppose I have an XML element ``` XMLElement nd = xmlDoc.CreateElement("Node"); ``` Now, I would like to add a child to nd with a full XML snippet I get from some other function, like this: ``` nd.AppendChild("<a1><a2></a2></a1>"); ``` What is the best w...
[ -0.26672297716140747, -0.05985892936587334, 0.2738211750984192, -0.03562598302960396, 0.24653783440589905, 0.2929668128490448, -0.1898750215768814, -0.13468417525291443, -0.026449063792824745, -0.7352296710014343, -0.08004128187894821, 0.2741352915763855, -0.07805155962705612, 0.0699610412...
I did something similar to [this](http://www.postneo.com/projects/pyxml/), but couldn't find a way to write the result to an xml file. The code on the web page you linked to uses `doc.toprettyxml` to create a string from the XML DOM, so you can just write that string to a file: ``` f = open("output.xml", "w") try: ...
[ 0.19534417986869812, 0.09764814376831055, 0.7152364253997803, -0.32992061972618103, -0.015916135162115097, -0.2681676745414734, 0.09527955204248428, -0.25911298394203186, -0.22470597922801971, -0.5622043013572693, -0.3692728281021118, 0.752640962600708, -0.307110071182251, -0.1224537491798...
the file.
[ -0.09492706507444382, 0.3043126165866852, 0.11837504804134369, 0.18218445777893066, 0.10817520320415497, -0.10893955081701279, -0.28479695320129395, 0.08127830177545547, -0.12324964255094528, -0.11067509651184082, -0.13923852145671844, 0.22805155813694, -0.15154123306274414, 0.393568277359...
I pressed Build before I was done coding my class, and Xcode is showing me a bunch of red errors, which are obviously because I'm not done. How do I get rid of the errors so they are not showing up in my coding window? **XCode 4:** `^`+`⌘`+`M` or Editor → Issues → (uncheck) Show All Issues **Older Versions:** ...
[ -0.05713578313589096, 0.11049895733594894, 0.3122466504573822, -0.08307551592588425, -0.07403039187192917, 0.06397336721420288, 0.5926460027694702, -0.05551612749695778, 0.0045940768904984, -0.667539656162262, -0.23543234169483185, 0.5338121652603149, -0.409898966550827, -0.125004619359970...
I'm looking for a class in java that has key-value association, but without using hashes. Here is what I'm currently doing: 1. Add values to a `Hashtable`. 2. Get an iterator for the `Hashtable.entrySet()`. 3. Iterate through all values and: 1. Get a `Map.Entry` for the iterator. 2. Create an object of type `Module`...
[ 0.14000730216503143, -0.010583426803350449, 0.19847983121871948, -0.14216278493404388, -0.2648536264896393, -0.0876988098025322, 0.14391671121120453, -0.4282762408256531, -0.2507375180721283, -0.6692946553230286, -0.04184766486287117, 0.4937029480934143, -0.508243203163147, 0.0676997825503...
use an `ArrayList` or `Vector` for this, but later in the code I need to grab the `Module` object for a given Key, which I can't do with an `ArrayList` or `Vector`. Does anyone know of a free/open-source Java class that will do this, or a way to get values out of a `Hashtable` based on when they were added? Thanks! I...
[ 0.08650186657905579, -0.006388623267412186, 0.24085721373558044, -0.06375190615653992, -0.027660565450787544, -0.27371957898139954, 0.011809200048446655, -0.42177414894104004, -0.4929005205631256, -0.3819235563278198, -0.18788929283618927, 0.5185399055480957, -0.48715561628341675, -0.30894...
sorted, `LinkedHashMap` should be faster for most cases; `TreeMap` has `O(log n)` performance for `containsKey`, `get`, `put`, and `remove`, according to the Javadocs, while `LinkedHashMap` is `O(1)` for each. If your API that only expects a predictable sort order, as opposed to a specific sort order, consider using t...
[ -0.08348721265792847, -0.05748618021607399, 0.34790167212486267, 0.049604665488004684, 0.08594696968793869, -0.13469186425209045, 0.04698524996638298, -0.21223564445972443, -0.4568413197994232, -0.7967057824134827, -0.25216981768608093, 0.08438482135534286, -0.6023709177970886, 0.076319694...
I remember the old effective approach of studying a new framework. It was always the best way to read a good book on the subject, say MFC. When I tried to skip a lot of material to speed up coding it turned out later that it would be quicker to read the whole book first. There was no good ways to study a framework in s...
[ 0.6748931407928467, 0.29948779940605164, 0.10301843285560608, 0.1069081574678421, -0.18415844440460205, -0.09939207881689072, 0.43645772337913513, 0.16942989826202393, -0.3913690745830536, -0.5892733931541443, 0.19773951172828674, 0.1975337117910385, 0.0925535038113594, 0.14205677807331085...
of open source frameworks. Right now when we write software we much often depend on third-party (usually open source) frameworks/ libraries. And a lot of times we need to know only a small amount of their functionality to use them. It's just about finding the simplest way of using a small subset of the library without...
[ 0.459960013628006, 0.20895904302597046, -0.1128409132361412, 0.3785569965839386, -0.1451922357082367, -0.31780320405960083, 0.20156244933605194, -0.12198672443628311, -0.3354372978210449, -1.0057252645492554, -0.5358868837356567, 0.43888354301452637, -0.10381007194519043, -0.01575164496898...
index in one file vs. multiple files, fuzzy queries and a lot of other stuff that is going to occupy your brain if you study Lucene in depth. **So what are your strategies, approaches, tricks to save your time?** I will enumerate what I would do, though I feel that my process can be improved. * Search "lucene tutori...
[ 0.4727562367916107, -0.15683859586715698, 0.3570384085178375, 0.4001120924949646, -0.26886090636253357, -0.12162506580352783, 0.029116686433553696, 0.2925894260406494, -0.030189504846930504, -0.9004976749420166, -0.06979621946811676, 0.28984081745147705, 0.2875160872936249, -0.145513519644...
on the target. * Search for really quick tutorials/ newbie guides on official site * Estimate how valuable are javadocs for a newbie. (Read [Lucene highlight package summary](http://lucene.apache.org/java/2_4_1/api/org/apache/lucene/search/highlight/package-summary.html)) * Search for simple examples that come with a l...
[ 0.5034710764884949, -0.23465150594711304, 0.07290555536746979, 0.33742254972457886, -0.15573632717132568, -0.1153242439031601, -0.021463830024003983, -0.023603469133377075, -0.13344594836235046, -0.7238475680351257, -0.1974252611398697, 0.39471137523651123, 0.1301734447479248, -0.292074292...
give me a working example of search keywords highlighting in Lucene". However this question is very specific and can gain no answers or a bad score. * Estimate how easy to get the answer from the framework code if it's open sourced. **What are your study/ search routes? Write them in priority order if possible.** I us...
[ 0.2878420650959015, -0.04808781296014786, 0.21316933631896973, 0.21248720586299896, -0.1309332698583603, 0.008213995024561882, 0.045782484114170074, -0.2801589369773865, -0.014535344205796719, -0.7873001098632812, -0.1666664332151413, 0.4069118797779083, 0.08168120682239532, -0.17944584786...
I found in my gathering phase I try to find out if it suits my needs. To do this I jump right into the API documentation and make sure it has all of the features I need. The results of this go into a weighted list with the best solutions at the top and all of the cruft filtered out. 3) Prototype - I take the top few ...
[ 0.48543581366539, 0.15753577649593353, 0.3263870179653168, 0.15770211815834045, 0.037181396037340164, 0.31418994069099426, -0.018300112336874008, -0.3888498842716217, 0.049491334706544876, -0.7331631183624268, 0.05563412979245186, 0.7684531211853027, 0.026490824297070503, -0.23979894816875...
choice during implementation, it's possible to fall back on other implementations. Of course, a huge number of factors go into choosing the best API for the project. Some important ones: 1. How much will this increase the size of my distribution? 2. How well does the API fit with the style of my existing code? 3. Doe...
[ 0.6386205554008484, 0.16637076437473297, 0.35736238956451416, -0.0015180754708126187, 0.04734395816922188, -0.060423288494348526, 0.4274951219558716, -0.13440591096878052, -0.23416069149971008, -0.6625729203224182, 0.0003414552775211632, 0.662617564201355, -0.08576052635908127, -0.18544237...
my needs? 10. How expensive will it be to implement overall? ... And of course many more. It's all very project dependent. As to saving time, I would say trying to save too much here will just come back to bite you later. The time put into selecting a good library is at least as important as the time spent implementi...
[ 0.8680602312088013, 0.19687213003635406, 0.15093426406383514, 0.4065682590007782, 0.13729289174079895, 0.15850044786930084, 0.17925871908664703, 0.008386337198317051, 0.012537936680018902, -0.7874118685722351, 0.2765944302082062, 0.4414864182472229, 0.24149112403392792, -0.0533811226487159...
save a lot of pain later.
[ 0.17348718643188477, 0.14279118180274963, -0.06678514182567596, 0.13534529507160187, -0.25235846638679504, 0.16580094397068024, 0.12563715875148773, 0.22689957916736603, 0.09776940941810608, -0.21651819348335266, 0.1986544132232666, 0.07235487550497055, 0.25105375051498413, -0.393900185823...
I'm using SqlMembershipProvider and trying to get information about users using the GetAllUsers's method of the System.Web.Security namespace, but it doesn't retrieve any online user. I'm logged into the application, but my user appeared as offline too. Why could this happen? Check out [this](https://connect.microso...
[ 0.3375192880630493, -0.22592775523662567, 0.53261399269104, -0.006596808787435293, -0.1334020048379898, -0.21457570791244507, 0.4787537753582001, 0.18491491675376892, -0.38736358284950256, -0.6132450103759766, 0.21903927624225616, 0.35225433111190796, 0.014261037111282349, 0.45587185025215...
I am trying to bring focus to window using jquery. The window is popup initiated through a button click on the parent page. I have some ajax calls going on in the child window, so data is being updated. My issue is that if the user clicks on the parent window and hides the child behind it, i would like to bring that ch...
[ 0.2634633779525757, -0.21686166524887085, 0.6782423853874207, -0.2420155107975006, 0.09977763146162033, -0.14606973528862, 0.15711036324501038, 0.005461234133690596, -0.15515479445457458, -0.8026160001754761, -0.1666164994239807, 0.8209123015403748, -0.19161131978034973, 0.0160967782139778...
function: ``` function FocusInput(){ if(!WindowHasFocus){ $(window).focus(); } } ``` This works as expected in IE8, but in FireFox(and all other browsers) the Blur event nevers seem to fire if I click the parent window. Any suggestions/ideas on how achieve this? update: Total facepalm moment: In FireFox: \*...
[ -0.2607191205024719, -0.2598167657852173, 0.952629566192627, -0.35027211904525757, -0.0711606815457344, -0.10704031586647034, 0.5042315125465393, -0.06512624770402908, -0.17717967927455902, -0.7896273732185364, -0.4006260931491852, 1.0684007406234741, -0.23209883272647858, -0.2642504572868...
in Chrome, that Safari would be the same, but you know what they say about "assuming" (it works in Safari, but not Chrome).
[ 0.5747684240341187, 0.12761090695858002, -0.058485209941864014, 0.013530497439205647, 0.14509397745132446, -0.2576693594455719, 0.14422759413719177, 0.013831796124577522, 0.06557314842939377, -0.611461877822876, 0.2588706612586975, 0.8096032738685608, -0.3027755916118622, -0.45003643631935...