text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
part of some sequences could be the beggining of other sequences, or even whole sequences could be contained by other bigger sequences. Now I don't know for sure the best way to implement this. I had some ideas, though. 1) I could implement a circular n-linked list. But since the list of moves never end, I fear it mig...
[ 0.2774933874607086, -0.3848869800567627, 0.2739899754524231, 0.10551748424768448, 0.133444145321846, 0.28962111473083496, 0.16037608683109283, -0.16786819696426392, -0.4167644679546356, -0.2597094178199768, -0.01453543733805418, -0.2959332764148712, -0.44870200753211975, 0.4852111041545868...
the beggining. Upon arrival on any children, a couple of functions would be executed causing the small and big effect. This might, though, lead to a lot of duplicated nodes on the tree to cope up with all the possible sequences ending on that specific move with different effects, which might be a pain to maintain but I...
[ -0.11870738863945007, -0.47657012939453125, 0.09353816509246826, 0.3690384328365326, -0.16943570971488953, 0.47139155864715576, 0.4276716411113739, -0.07462635636329651, -0.33651432394981384, -0.5599378347396851, 0.08163673430681229, 0.38334059715270996, -0.5540652871131897, 0.272445499897...
some giant nested switch that would call functions and update the machine state accordingly. Seems simpler to implement, but... well... doesn't seem fun... nor ellegant. Giant switchs always seem ugly to me, but would this work better? 3) Suggestions? I am good, but I am far inexperienced. The good thing of the codin...
[ 0.25911056995391846, 0.2626437246799469, -0.10717575252056122, 0.23464255034923553, -0.0498722679913044, 0.14170679450035095, 0.23295782506465912, -0.23705503344535828, -0.23577511310577393, -0.57517009973526, 0.10104096680879593, 0.32333236932754517, -0.015325740911066532, -0.046300221234...
exactly what you're saying, but as an analagous situation, say someone's inputting an endless stream of numbers on the keyboard. '117' is a magic sequence, '468' is another one, '411799' is another (which contains the first one). So if the user enters: > 55468411799 you want to fire 'magic events' at the \*s: > 55...
[ 0.3448355197906494, -0.012780146673321724, 0.45754075050354004, -0.07313375174999237, 0.08913537859916687, 0.23169377446174622, 0.2506280839443207, -0.3576439619064331, -0.29826819896698, -0.3806208670139313, -0.13313347101211548, 0.4820761978626251, -0.2385786920785904, -0.236011549830436...
= ... all of the above ...; while (true) { int num = readNumberFromUser(); for (MagicSequence seq : sequences) { seq.handleNumber(num); } } ``` while MagicSequence has something like: ``` Action action = ... populated from constructor ...; int[] sequence = ... populated from constructor ...; int position ...
[ 0.23123423755168915, -0.16428060829639435, 0.6353579163551331, -0.23897895216941833, 0.20647187530994415, 0.24058088660240173, 0.5040563344955444, -0.7389246225357056, -0.5370466709136963, -0.323056697845459, -0.5028181076049805, 0.4670846164226532, -0.032594554126262665, -0.07444630563259...
position = 0; // Or disable this Sequence from accepting more numbers if it's a once-off } } else { position = 0; // missed a number, start again! } } ```
[ -0.258857786655426, -0.15407006442546844, 0.21716129779815674, -0.34071242809295654, 0.19136828184127808, -0.02090003900229931, 0.10696424543857574, -0.15328510105609894, -0.2576538920402527, -0.39343520998954773, -0.17128895223140717, 0.49616673588752747, -0.18632252514362335, 0.190219894...
I am using DoCmd.SendObject to send emails from MS access 2003. It opens the outlook with all relevant fields filled. But the user may not choose to send the email at that time. In that case, a prompt 'Send Action was cancelled' appears. Is there a way to catch this non-sending of email by user It is possible to use Ou...
[ 0.22304031252861023, 0.1878061443567276, 0.3237793445587158, -0.07371552288532257, -0.21804095804691315, -0.1555711179971695, 0.23962901532649994, 0.1173376590013504, -0.24846547842025757, -0.6582076549530029, 0.2377871870994568, 0.4808439314365387, -0.3232463598251343, 0.30511850118637085...
Where I work, we maintain an FTP site that needs occasional cleanup. Are there any tools out there to create a site map of an FTP site? It would greatly simplify clean up tasks. Thanks! I always the the [Convert](http://msdn.microsoft.com/en-us/library/system.convert.frombase64string.aspx) class to convert the string...
[ 0.4337686598300934, 0.24661582708358765, 0.2783012092113495, -0.1614547222852707, 0.04464152455329895, -0.1007065549492836, 0.22356760501861572, -0.0021646933164447546, -0.38658422231674194, -0.6554784178733826, -0.20603175461292267, 0.44440823793411255, -0.044026847928762436, 0.1593632847...
using (StreamReader sr = new StreamReader(cs)) { string buf = sr.ReadToEnd(); return buf; } } // DeCryptString ```
[ 0.11351658403873444, -0.12120291590690613, 0.4364565312862396, -0.23864290118217468, 0.07235268503427505, 0.11701007932424545, 0.2546147108078003, -0.3416041433811188, -0.09344468265771866, -0.6247416734695435, -0.4539470076560974, 0.5156455039978027, -0.32670509815216064, 0.36155161261558...
What are some recommendations for finding Expression Blend/WPF Designers to perform contract work? I think a (local) freelance designer might be the most reasonably priced, but I don't even know where to start. As additional background, I am located in the Midwest region of the US, where designers are not as prevalent...
[ 0.9775370359420776, -0.11997497081756592, -0.01620476506650448, 0.19581367075443268, 0.2403709590435028, -0.04784371331334114, 0.2548780143260956, 0.12435674667358398, -0.0797266736626625, -0.6646121144294739, 0.07289279997348785, 0.7051554322242737, 0.14344891905784607, -0.102098800241947...
developer with designer tendencies moves more toward the designer side ... or whether a designer with developer tendencies moves more toward the developer side. I am an example of the former. I would also add that cultivating these skills is much harder when that person is not working in close proximity (as most freel...
[ 0.48134616017341614, -0.0755709856748581, -0.19706980884075165, 0.11129269748926163, 0.059533342719078064, -0.3264937400817871, 0.07355961948633194, 0.137052983045578, -0.4305722713470459, -0.6370713114738464, -0.010613764636218548, 0.6723532676696777, 0.10799714922904968, 0.04157969728112...
Building on [How Do You Express Binary Literals in Python](https://stackoverflow.com/questions/1476/how-do-you-express-binary-literals-in-python#13107), I was thinking about sensible, intuitive ways to do that Programming 101 chestnut of displaying integers in base-2 form. This is the best I came up with, but I'd like ...
[ -0.027934197336435318, 0.20135906338691711, 0.0028409312944859266, -0.1930723786354065, -0.22504276037216187, 0.15036439895629883, 0.19728682935237885, -0.2992369830608368, -0.3462328314781189, -0.4382941722869873, -0.056217506527900696, 0.4464646577835083, -0.3034331798553467, -0.25196948...
p, using bitshift, will have exactly one # bit set, at place p x = N & two_p # binary composition, will be one where *both* numbers # have a 1 at that bit. this can only happen
[ -0.20602305233478546, -0.14782139658927917, 0.2032361477613449, -0.15134848654270172, 0.11016727238893509, 0.3125094771385193, -0.00946742668747902, -0.42255812883377075, -0.12818433344364166, -0.5868694186210632, -0.24394206702709198, -0.014576992951333523, -0.41588735580444336, -0.235793...
# at position p. will yield two_p if N has a 1 at # bit p return int(x > 0) bits = ( bit_at_p(N,x) for x in xrange(places)) return "".join( (str(x) for x in bits) )
[ -0.24616943299770355, -0.22356852889060974, 0.4866219162940979, -0.2910761535167694, 0.04003565385937691, 0.24499084055423737, 0.14295117557048798, -0.5933414697647095, -0.1220434382557869, -0.39442577958106995, -0.30011850595474243, 0.14631593227386475, -0.322632372379303, -0.185154944658...
# or, more consisely # return "".join([str(int((N & 1 << x)>0)) for x in xrange(places)]) ``` For best efficiency, you generally want to process more than a single bit at a time. You can use a simple method to get a fixed width binary representation. eg. ``` def _bin(x, width): return ''.join(str((x>>i)&1) f...
[ 0.03639126941561699, -0.18318983912467957, 0.4391457438468933, -0.12521417438983917, -0.1517992615699768, 0.22026899456977844, 0.22618788480758667, -0.4867285192012787, -0.28975921869277954, -0.4903244972229004, -0.2697375416755676, 0.40372511744499207, -0.38061898946762085, 0.001789082190...
the memory to it). ``` _conv_table = [_bin(x,8) for x in range(256)] ``` Then you can use this in your real function, stripping off leading zeroes when returning it. I've also added handling for signed numbers, as without it you will get an infinite loop (Negative integers conceptually have an infinite number of set...
[ -0.09720631688833237, -0.1944192796945572, 0.2927165925502777, -0.09495805948972702, -0.03172045573592186, 0.09854134172201157, 0.25670573115348816, -0.45533496141433716, -0.08907470107078552, -0.3585071563720703, -0.2239902913570404, 0.5241799354553223, -0.23097164928913116, 0.06646867096...
x*=-1 else: sign = '' l=[] while x: l.append(_conv_table[x & 0xff]) x >>= 8 return sign + ''.join(reversed(l)).lstrip("0") ``` [Edit] Changed code to handle signed integers. [Edit2] Here are some timing figures of the various solutions. bin is the function above, constantin\...
[ 0.1436907947063446, -0.1634756177663803, 0.3337481617927551, 0.29079678654670715, -0.09184574335813522, 0.27880313992500305, -0.013215037062764168, -0.7004907727241516, -0.11680570989847183, -0.186470627784729, 0.06312441825866699, 0.30992817878723145, -0.5092493295669556, 0.25292858481407...
above (bin16 below), and tried out Python3's builtin bin() function. All timings were for 100000 runs using an 01010101 bit pattern. ``` Num Bits: 8 16 32 64 128 256 --------------------------------------------------------------------- bin 0.544 0.586 0.744...
[ -0.15223295986652374, 0.21364130079746246, 0.23605877161026, 0.16507843136787415, -0.13774757087230682, 0.13797926902770996, 0.4198663830757141, -0.47300732135772705, -0.12157097458839417, -0.393471360206604, 0.17923280596733093, 0.44708842039108276, -0.15245284140110016, -0.13059689104557...
1.854 3.357 bin16 0.542 0.494 0.592 0.773 1.150 1.886 constantin_bin 2.238 3.803 7.794 17.869 34.636 94.799 num_bin 3.712 5.693 12.086 32.566 67.523 128.565 Python3's bin 0.079 0.045
[ 0.055552974343299866, 0.18823140859603882, -0.3305129408836365, -0.07924805581569672, -0.3771052062511444, 0.5142225027084351, 0.7779209613800049, -0.5129311680793762, -0.2994404435157776, 0.1844492405653, -0.08541237562894821, 0.22326824069023132, -0.5018051862716675, 0.13032719492912292,...
0.062 0.069 0.212 0.201 ``` As you can see, when processing long values using large chunks really pays off, but nothing beats the low-level C code of python3's builtin (which bizarrely seems consistently faster at 256 bits than 128!). Using a 16 bit lookup table improves things, but probably isn't worth it ...
[ 0.008551383391022682, 0.22115404903888702, 0.2277415245771408, -0.10479696094989777, -0.2279871553182602, -0.22068914771080017, 0.31756266951560974, -0.1025748923420906, -0.3106476664543152, -0.35855621099472046, -0.1519812047481537, 0.40708038210868835, -0.14836840331554413, -0.1353274583...
I want to create a simple box with a header bar containing a title and some tool buttons. I have the following markup: ``` <div style="float:left"> <div style="background-color:blue; padding: 1px; height: 20px;"> <div style="float: left; background-color:green;">title</div> <div style="float: right...
[ 0.0959896519780159, 0.14627450704574585, 0.6152432560920715, -0.24094298481941223, -0.024708770215511322, -0.12218239903450012, -0.0026597885880619287, -0.5344238877296448, -0.15268537402153015, -0.5666545033454895, -0.04691249504685402, 0.301880419254303, -0.3052895665168762, -0.139840438...
width in your content div means this is the total width of your box, simply add it to the outermost div, and (optionally) remove it from content, like this: ``` <div style="float:left; width: 200px;"> <div style="background-color:blue; padding: 1px; height: 20px;"> <div style="float: left; background-color...
[ 0.21208882331848145, -0.21777991950511932, 0.6829195618629456, -0.01125470269471407, -0.18812742829322815, -0.1888204962015152, -0.05836162343621254, -0.25270724296569824, -0.09611418098211288, -0.5555100440979004, -0.38421326875686646, 0.44175681471824646, 0.06708309799432755, 0.070747658...
Code lines per file, methods per class, cyclomatic complexity and so on. Developers resist and workaround most if not all of them! There is a good [Joel article](http://www.joelonsoftware.com/items/2006/08/09.html) on it (no time to find it now). What code metric(s) you recommend for use to **automatically** identify ...
[ 0.22490286827087402, 0.10896599292755127, 0.17170433700084686, 0.3387157618999481, -0.4231990873813629, -0.14180099964141846, 0.4412703514099121, 0.33003151416778564, 0.013889710418879986, -0.4294547438621521, 0.05441274493932724, 0.5182093381881714, 0.10472051799297333, 0.0953742042183876...
the time: * [cyclomatic complexity](https://stackoverflow.com/questions/105852) (detected by checkstyle) * [dependency cycle detection](https://stackoverflow.com/questions/62276) (through findbugs for instance) * critical errors detected by, for instance findbugs. I would put coverage test in a second step, as such t...
[ 0.11654642969369888, -0.10238449275493622, 0.5275799036026001, 0.35188138484954834, -0.08182962983846664, -0.47059282660484314, 0.18523116409778595, 0.1462668627500534, -0.5159895420074463, -0.4861149787902832, -0.13917101919651031, 0.46958616375923157, 0.0704355239868164, 0.10920795798301...
I do share your [frustration](http://stackoverflow.uservoice.com/pages/general/suggestions/35815?tracking_code=3c7fc7632b4236f09130fc94064937c2) ;), and I do not share the point of view of tloach (in the comments of another answers) "Ask a vague question, get a vague answer" he says... your question deserve a specific ...
[ 0.1785353720188141, 0.44781389832496643, 0.25149914622306824, -0.05253623053431511, -0.444437175989151, -0.03853954002261162, 0.29251015186309814, 0.09841135144233704, -0.10389179736375809, -0.37001949548721313, 0.05408996343612671, 0.34456077218055725, -0.0487578921020031, 0.1774322688579...
``` private string? typeOfContract { get { return (string?)ViewState["typeOfContract"]; } set { ViewState["typeOfContract"] = value; } } ``` Later in the code I use it like this: ``` typeOfContract = Request.QueryString["type"]; ``` I am getting the following error at the declaration of `typeOfContract` line s...
[ 0.04425392299890518, -0.05675600469112396, 0.3993811309337616, -0.14786992967128754, 0.09935920685529709, -0.01898643560707569, 0.3217734396457672, -0.3166210651397705, -0.1189270094037056, -0.4356262683868408, -0.1960856318473816, 0.5391371250152588, -0.40725964307785034, 0.03189313784241...
DateTime, etc.
[ 0.3574187755584717, -0.2769230902194977, 0.6511831283569336, 0.10644643008708954, 0.5523776412010193, -0.03088259883224964, -0.2752528786659241, 0.3760979473590851, -0.3586063086986542, -0.5621064305305481, -0.12221149355173111, 0.18326789140701294, -0.04674180597066879, 0.2519155144691467...
I don't really *get* lambda expressions. While they've been around since the days of ALGOL, I didn't start hearing about them until fairly recently, when Python and Ruby became very popular. Now that C# has the `=>` syntax, people in my world (.NET) are talking about lamdba expressions more and more. I've read the Wik...
[ 0.6235779523849487, 0.22690778970718384, 0.12295738607645035, -0.12052523344755173, -0.3958122432231903, -0.06836533546447754, 0.24801824986934662, 0.4697420299053192, -0.4253895878791809, -0.3634238541126251, 0.2004012167453766, 0.5932660102844238, -0.40386417508125305, -0.146729588508605...
solve problems with lambda expressions, in a before-and-after format? Any imperative language is fine, but C# would be easiest for me to understand. Basically as far as C# is concerned, lambda expressions are an easy way to create a delegate (or an expression tree, but let's leave those aside for now). In C# 1 we coul...
[ -0.131021186709404, -0.04581666737794876, -0.1704508662223816, 0.22361041605472565, -0.23142527043819427, -0.05665989965200424, 0.34729957580566406, -0.14968430995941162, -0.3983154594898224, -0.3405798375606537, 0.06211452558636665, 0.8243201375007629, -0.6949482560157776, -0.564568459987...
the context of LINQ: ``` // Only include children - a predicate var query = dataSource.Where(person => person.Age < 18) // Transform to sequence of names - a projection .Select(person => person.Name); ``` There's a fuller discussion of
[ 0.052053116261959076, -0.006426548585295677, 0.2844822406768799, 0.3164004683494568, 0.35550567507743835, 0.24725857377052307, -0.34684738516807556, -0.2539845108985901, -0.16876457631587982, -0.30716195702552795, -0.3097051680088043, 0.22777420282363892, -0.1357804536819458, -0.2037175893...
this - along with other aspects - in [my article on closures](http://csharpindepth.com/Articles/Chapter5/Closures.aspx).
[ -0.2803792953491211, 0.012696689926087856, 0.27823713421821594, -0.10748515278100967, -0.04507192596793175, -0.0884510800242424, 0.1906912475824356, 0.22285987436771393, -0.8059812784194946, -0.2107422649860382, -0.3266162872314453, 0.033580780029296875, 0.07224120944738388, 0.388564139604...
I need to create a cherrypy main page that has a login area. I want the login area to be secure, but not the rest of the page. How can I do this in CherryPy? Ideally, any suggestions will be compatible with <http://web.archive.org/web/20170210040849/http://tools.cherrypy.org:80/wiki/AuthenticationAndAccessRestrictions...
[ 0.13643962144851685, -0.2550795376300812, 0.2644551992416382, 0.10973250865936279, 0.026956668123602867, -0.007384353782981634, 0.06184208765625954, -0.23453372716903687, -0.1563216596841812, -0.5369460582733154, -0.03700819984078407, 0.16164284944534302, -0.27345576882362366, 0.0310476031...
pointer that the relevant row referred to e.g. `YourListCtrl.SetItemData((DWORDPTR)&YourData);` Then when the ListCtrl item is selected, you just call `DataTypeYouWant* pData = (DataTypeYouWant*)(YourListCtrl.GetItemData(indexofselecteditem));` Or somesuch thing. Alternatively - if you don't want to use pointers...
[ -0.07484953105449677, -0.35643088817596436, 0.627911388874054, -0.03268522396683693, -0.07835915684700012, -0.06332694739103317, 0.08351320773363113, -0.19960446655750275, -0.08935991674661636, -0.7319196462631226, -0.4018213450908661, 0.4518304169178009, -0.4538927376270294, 0.20609834790...
Any ideas how i can best drive a USB POS printer from c#. POS printers are usually serial, TCP/IP or USB based. I know how to accomplish serial and TCP/IP but have no idea about communications through USB in C#. I know that there is a layer available from Microsoft called POS.NET, but I want to try and avoid using this...
[ 0.48926782608032227, 0.1710241138935089, 0.40037405490875244, 0.3260785639286041, 0.09687141329050064, 0.08874228596687317, -0.5275563597679138, 0.3158598244190216, -0.4448414444923401, -0.7515246272087097, 0.3040761947631836, 0.5364292860031128, -0.015145345591008663, -0.18081031739711761...
interfacing with these devices.
[ -0.08726633340120316, 0.2065231204032898, 0.26637905836105347, 0.13719907402992249, 0.17078067362308502, 0.12663844227790833, 0.051185593008995056, -0.09848468750715256, -0.0189896821975708, -1.0372042655944824, -0.15459971129894257, 0.048237238079309464, 0.20047183334827423, -0.2760410010...
How is Oracle date implemented? Is it stored as milliseconds or something like that? An Oracle DATE stores the date and time to the second. An Oracle TIMESTAMP stores the date and time to up to 9 digits of subsecond precision, depending on the available hardware. Both are implemented by storing the various components ...
[ 0.210689514875412, 0.055911432951688766, -0.03230099380016327, 0.16291594505310059, 0.11972130835056305, 0.1647280752658844, -0.16266952455043793, -0.21465125679969788, 0.08960287272930145, -0.2063635140657425, -0.02941151149570942, 0.12646088004112244, 0.013582157902419567, 0.029502969235...
day, hour, minute, and second. You can use the [DUMP()](http://docs.oracle.com/cd/B28359_01/server.111/b28286/functions048.htm) function to see the internal representation of any particular date (or any other value for that matter), but that's probably more than you need (or want) to know.
[ 0.6876055598258972, -0.14930252730846405, 0.10012153536081314, 0.30440548062324524, 0.2781454026699066, 0.2550364136695862, -0.02305421233177185, 0.31776174902915955, -0.34049665927886963, -0.25349748134613037, -0.026034316048026085, -0.007976118475198746, 0.17520254850387573, 0.3905315101...
I'd like to use the newer `<button>` tag in an ASP.NET website which, among other things, allows CSS-styled text and embedding a graphic inside the button. The asp:Button control renders as `<input type="button">`, is there any way to make a preexisting control render to `<button>`? From what I've read there is an inc...
[ 0.23631905019283295, 0.006347615737468004, 0.14558230340480804, -0.002480839379131794, -0.2066471129655838, -0.07949747145175934, 0.20678263902664185, 0.27262160181999207, -0.25894659757614136, -0.8391696810722351, -0.11840550601482391, 0.4327094852924347, -0.13261249661445618, 0.153118476...
shouldn't use this? If not, how would you go about supporting it with asp:Button, or a new server control based on it? I would prefer to not write my own server control if that can be avoided. --- At first the `<button runat="server">` solution worked, but I immediately ran into a situation where it needs to have a C...
[ 0.32602202892303467, -0.0046723647974431515, 0.04409446194767952, 0.08736147731542587, 0.009089838713407516, -0.15740521252155304, 0.38591906428337097, 0.14134158194065094, -0.23210583627223969, -0.7242228984832764, -0.023710548877716064, 0.5703759789466858, -0.21607272326946259, -0.029723...
reply has made me interested in finding a solution to this again, so I've spent some more time working on it. First, there's a far easier way of overloading the TagName: ``` public ModernButton() : base(HtmlTextWriterTag.Button) { } ``` The problem with Dan's solution as it stands is the innerhtml of the tag is pl...
[ 0.08607140183448792, 0.18872956931591034, 0.4062577784061432, -0.18808118999004364, -0.21211756765842438, -0.16404493153095245, 0.5721054673194885, 0.08441126346588135, 0.14187242090702057, -0.8377426862716675, -0.26687392592430115, 0.5477001070976257, -0.49315956234931946, 0.1907475143671...
to correctly render the value property, and also provide some sort of workaround for IE so it doesn't completely screw up the postback. The IE problem may be insurmountable if you want to take advantage of the CommandName/CommandArgument properties for a databound control. Hopefully someone can suggest a workaround fo...
[ -0.0007007456151768565, 0.0799679234623909, 0.448767751455307, -0.07870455831289291, -0.048311907798051834, 0.04677806794643402, 0.4142279326915741, -0.19863058626651764, 0.017511997371912003, -0.8162362575531006, -0.004525437951087952, 0.6688851714134216, -0.0006809615879319608, -0.006170...
look the same other than the differences I need. So I'm not sure how ASP.Net is wiring up the `Command` event in this case. An additional problem is, nested server controls aren't rendered (as you can see with the ParseChildren(false) attribute). It's pretty easy to inject literal html text into the control during ren...
[ 0.17550760507583618, 0.026396412402391434, 0.13061104714870453, 0.13531914353370667, -0.20182935893535614, -0.02301623299717903, 0.3954554498195648, 0.2136661559343338, -0.18628033995628357, -0.8608070611953735, -0.10179925709962845, 0.4244244694709778, -0.2629493176937103, -0.295890480279...
documentation, the desired markup is as follows: ```html <button class="btn btn-default"> <span class="glyphicon glyphicon-search" aria-hidden="true"></span> Search </button> ``` I needed this markup to be rendered by a server control, so I set out to find options. Button ====== This would be the first log...
[ -0.03596673905849457, 0.15191033482551575, 0.4669611155986786, -0.07433496415615082, -0.11396018415689468, 0.2044694572687149, 0.3550753593444824, -0.3948941230773926, -0.0578804574906826, -0.3707977831363678, -0.45678454637527466, 0.511667788028717, -0.23493781685829163, -0.12381102889776...
`Command` event; `CommandName` and `CommandArgument` properties **Cons** * Renders `<a>` instead of `<button>` * Renders and relies on obtrusive JavaScript HtmlButton (credit to [Philippe's answer](https://stackoverflow.com/a/1171539)) =============================================================================== ...
[ -0.611645519733429, 0.13219371438026428, 0.6911761164665222, 0.08172031491994858, 0.051667388528585434, 0.25519508123397827, 0.2725161612033844, -0.4143231213092804, -0.01901748776435852, -0.451318621635437, -0.42149966955184937, 0.862848162651062, -0.036785926669836044, -0.120205424726009...
achieve the desired functionality. Custom control (credit to [Dan Herbert's answer](https://stackoverflow.com/a/573990)) ===================================================================================== **NOTE: This is based on Dan's code, so all credit goes to him.** ```cs using System.Web.UI; using System.Web....
[ 0.11253497749567032, 0.14694055914878845, 0.5058004260063171, 0.051955368369817734, 0.3590626120567322, 0.13561207056045532, 0.5840505957603455, -0.6216585636138916, 0.0580679289996624, -0.1256939023733139, -0.5681821703910828, 0.4911815822124481, -0.240473672747612, -0.047866396605968475,...
} public string Value { get { return base.Text; } set { base.Text = value; } } protected override HtmlTextWriterTag TagKey { get { return HtmlTextWriterTag.Button; }
[ -0.17656999826431274, -0.28873899579048157, 0.5531714558601379, -0.09754141420125961, 0.1623259335756302, -0.20739172399044037, 0.33215487003326416, -0.2550438940525055, 0.24196425080299377, -0.6631664633750916, -0.22276271879673004, 0.6674184799194336, -0.4372421205043793, -0.063271448016...
} protected override void AddParsedSubObject(object obj) { var literal = obj as LiteralControl; if (literal == null) return; Text = literal.Text; } protected override void RenderContents(HtmlTextWriter writer) {
[ -0.17885704338550568, -0.03744705021381378, 0.6151930093765259, -0.3713950216770172, 0.15056227147579193, -0.010412628762423992, 0.6980066895484924, -0.20581798255443573, 0.19593705236911774, -0.552287757396698, -0.41126546263694763, 0.7461872696876526, -0.6007227897644043, -0.058027349412...
writer.Write(Text); } } } ``` I have stripped the class down to the bare minimum, and refactored it to achieve the same functionality with as little code as possible. I also added a couple of improvements. Namely: * Remove `PersistChildren` attribute (seems unnecessary) * Remove `TagName` override (seems...
[ -0.16497820615768433, 0.13098125159740448, 0.44180458784103394, -0.1859811544418335, -0.162927508354187, -0.057406824082136154, 0.6787182688713074, -0.24013841152191162, 0.017374906688928604, -0.7494109272956848, -0.00825406238436699, 0.5328642725944519, -0.24872511625289917, 0.13122019171...
Register** directive) * Add necessary `using` directives The `Value` property simply accesses the old `Text` property. This is because the native Button control renders a `value` attribute anyway (with `Text` as its value). Since `value` is a valid attribute of the `<button>` element, I decided to include a property f...
[ -0.2033456414937973, 0.034668419510126114, 0.6834425330162048, -0.1721871793270111, 0.11462784558534622, -0.03596857935190201, 0.3032197654247284, -0.5739803314208984, -0.08504638820886612, -0.5371812582015991, -0.5560283064842224, 0.7277148962020874, -0.01765761338174343, 0.18581002950668...
Does not render or rely on obtrusive JavaScript **Cons** * None (other than not being a built-in control)
[ -0.3143542408943176, 0.20408767461776733, 0.021577751263976097, 0.30966272950172424, 0.025205597281455994, -0.08614637702703476, 0.34306061267852783, 0.4993673264980316, 0.22271589934825897, -0.3789674639701843, -0.3984955847263336, 0.2508500814437866, -0.34683915972709656, -0.352342277765...
Can Visual Studio **2005** Team edition for Developer coexist peacefully with Visual Studio **2008** Database edition on my machine? Are they completely separate applications that won't interfere in any way with each other? **Update:** What about Visual Studio 2008 Developer edition? If I install this on the same mac...
[ 0.08542461693286896, -0.049088574945926666, 0.29288941621780396, 0.041188448667526245, -0.5251194834709167, -0.18207374215126038, 0.29232552647590637, -0.24475356936454773, -0.11919782310724258, -0.45929986238479614, 0.27045968174934387, 0.9152088761329651, -0.21921373903751373, -0.2737062...
tell the difference.
[ 0.3321360647678375, 0.12510406970977783, -0.21105170249938965, -0.03906679525971413, -0.1859339475631714, 0.17719943821430206, 0.06656808406114578, -0.084226593375206, 0.22619979083538055, -0.2718375623226166, 0.22236473858356476, 0.24385613203048706, 0.028836501762270927, -0.2028779238462...
I have a package that I just made and I have an "old-mode" that basically makes it work like it worked before: importing everything into the current namespace. One of the nice things about having this as a package is that we no longer have to do that. Anyway, what I would like to do is have it so that whenever anyone d...
[ 0.5145951509475708, 0.3795786201953888, 0.09712939709424973, -0.17840170860290527, 0.0949506163597107, -0.5555827021598816, 0.24793271720409393, 0.0917307436466217, -0.2264525443315506, -0.4646938443183899, -0.0389835387468338, 0.8782302737236023, -0.35913628339767456, 0.2420407235622406, ...
want to alarm in the cases of `use Mod qw<:oldmode>;` This works better: ``` package Foo; use base qw<Exporter>; use Carp qw<carp>; ... sub import { #if ( grep { $_ eq ':oldmode' } @_ ) { # Perl 5.8 if ( @_ ~~ ':oldmode' ) { # Perl 5.10 carp( 'import called with :oldmode!' ); } g...
[ 0.16387106478214264, 0.08361876755952835, 0.2235487848520279, -0.1395169049501419, 0.06865917146205902, -0.0061158426105976105, 0.31241753697395325, -0.03961054980754852, -0.1655053347349167, -0.6536084413528442, -0.07047262042760849, 0.9601939916610718, -0.43061861395835876, 0.08371719717...
learning all the ways to work Perl 5.10 into my code. **Note:** the standard way to use exporter in an import sub is to either manipulate `$Exporter::ExportLevel` or to call `Foo->export_to_level( 1, @_ );` But I like the way above. It's quicker and, I think, simpler.
[ 0.19298294186592102, -0.021709445863962173, 0.16647696495056152, -0.3738933801651001, -0.30545058846473694, -0.2358447164297104, 0.26679283380508423, 0.14075243473052979, -0.04061519727110863, -0.43024975061416626, -0.10849422961473465, 0.7618409395217896, -0.38900333642959595, 0.071692265...
I have a lot of Java source code that requires custom pre-processing. I'd like rid of it but that's not feasible right now so I'm stuck with it. Given that I have an unfortunate problem that shouldn't have existed in the first place, how do I solve it using maven? (For the full story, I'm replacing a python-based bui...
[ 0.17288702726364136, 0.06779907643795013, 0.07829181104898453, 0.06477435678243637, 0.0973290428519249, 0.12360459566116333, 0.49783870577812195, -0.10131930559873581, -0.22444963455200195, -0.7908074259757996, 0.10822665691375732, 0.8611066341400146, -0.2857705354690552, -0.09988719224929...
the original, unprocessed code alone) To be clear, by preprocessing I mean preprocessing in the same sense as antenna or a C compiler would preprocess the code, and by custom I mean that it's completely proprietary and looks nothing at all like C or antenna preprocessing. This is something that is very doable and I've...
[ 0.4433837831020355, 0.07336012274026871, -0.12588445842266083, -0.1276237517595291, -0.2608441114425659, -0.1288624405860901, 0.17690663039684296, -0.27175119519233704, -0.0967993512749672, -0.4515600800514221, 0.002050956478342414, 0.6220008134841919, -0.5733144879341125, 0.17431013286113...
<executions> <execution> <id>process-sources</id> <phase>process-sources</phase> <configuration> <tasks> <!-- Put the code to run the program here --> </tasks>
[ 0.3423076868057251, -0.16313807666301727, -0.47208231687545776, 0.26477402448654175, 0.1058429554104805, 0.4667074382305145, 0.025795912370085716, -0.3453424274921417, -0.5027300715446472, -0.5080184936523438, -0.11799877882003784, 0.09712313860654831, -0.3021051585674286, -0.0862182229757...
</configuration> <goals> <goal>run</goal> </goals> </execution> </executions> </plugin> </plugins> </build> ``` Note the tag where I indicate the phase where this is run. Documentation for the lifecycles in Maven is [here](http://maven.apache.org/guides/introduction...
[ 0.08616285771131516, -0.22758924961090088, 0.11571812629699707, -0.1618170291185379, 0.14662785828113556, -0.33571112155914307, 0.2680099606513977, -0.11769594997167587, -0.09386924654245377, -0.597845196723938, -0.3210504353046417, 0.6114754676818848, -0.09538182616233826, -0.270870506763...
similarly to what I have documented here.
[ 0.1713564395904541, 0.3742032051086426, -0.2313554286956787, -0.07504280656576157, 0.12377222627401352, 0.07270544022321701, 0.10190518200397491, 0.02268453873693943, -0.23898068070411682, -0.8473023772239685, 0.2444908320903778, 0.31588244438171387, 0.1135803684592247, 0.3705505430698395,...
I used Visual Studio's Application Wizard to create a skeleton MFC program with a multi-document interface. When I start this program, it automatically creates a child frame, which I don't want it to do - I need the main frame's client area to be empty until the user chooses to open a file. The debugger tells me that ...
[ 0.07763750106096268, 0.358704149723053, 0.540250837802887, -0.07754136621952057, 0.17705434560775757, 0.19860611855983734, 0.2062494307756424, -0.33461734652519226, -0.35458216071128845, -0.5975977778434753, -0.09662514925003052, 0.402667760848999, -0.3680514991283417, 0.3496646285057068, ...
I am developing a little app that retrieves an XML file, located on a remote server (`http://example.com/myfile.xml`) This file is relatively big, and it contains a big list of geolocations with other information that I need to use for my app. So I read this file remotely once and insert it into a little SqlCE file (`d...
[ 0.35694751143455505, 0.24370968341827393, 0.5170934200286865, 0.10824170708656311, 0.04090798646211624, -0.14222796261310577, -0.05435338616371155, 0.3654037415981293, -0.26621755957603455, -0.8581562638282776, 0.20785240828990936, 0.21796473860740662, -0.04460795596241951, 0.2520594298839...
efficient way (fastest)? Saving the big XML file once locally and load if every time I start my app to load it in a data set? this is would make the app a bit long to load every time Saving the big XML file once locally and reading the nodes one by one to look for geolocation #1? Or is it possible to retrieve geoloc...
[ 0.14159348607063293, 0.024187851697206497, 0.5468626618385315, 0.17768065631389618, 0.022011108696460724, -0.12772201001644135, 0.01496584340929985, -0.14362645149230957, -0.2999022603034973, -0.9421328902244568, 0.06213362514972687, 0.6185768246650696, -0.2678148150444031, -0.384656667709...
3.5. To clarify on your question; actually protobuf-net doesn't even use a `.proto` file (at the moment); a `.proto` file just describes what the data is - protobuf-net simply looks at your classes and infers the schema from that (similar to how XmlSerializer / DataContractSerializer etc work). So there *is* not `.pro...
[ 0.21760046482086182, -0.2438199520111084, 0.09571948647499084, 0.019083276391029358, -0.24552083015441895, -0.27508795261383057, 0.06855321675539017, 0.036806028336286545, -0.11797013133764267, -0.8787825107574463, -0.3148273229598999, 0.30767595767974854, -0.47741565108299255, 0.126670062...
(etc) implementation for CF then becomes the issue. Of course, if you *want* to use protobuf-net here, I'll happily advise etc if you get issues... The other option is for your CF app to call into a web-service that has the data locally...
[ 0.422957181930542, -0.010811880230903625, 0.31056687235832214, -0.08859989047050476, -0.09710462391376495, -0.42166924476623535, 0.19221200048923492, 0.19113196432590485, -0.2710893154144287, -0.6775758862495422, 0.0035866941325366497, 0.702049732208252, -0.42258572578430176, -0.2112789899...
We have a shrink wrap type Windows server application where we need to create a self signed certificate on the server to be used by some WCF web services. From our searches on the web, it appears that the makecert utility in the PlatformSDK from Microsoft cannot be distributed with our application, so we're looking for...
[ 0.7380946278572083, -0.09556534141302109, 0.31421372294425964, 0.2079026848077774, 0.11785364151000977, -0.5413679480552673, 0.12881030142307281, -0.043734099715948105, -0.12653017044067383, -0.42346176505088806, 0.022305099293589592, 0.28601500391960144, -0.04792632535099983, 0.3919095098...
certificate file with openssl? Any help/suggestions would be appreciated. [Unfortunately, I can't comment on anything yet, so I'll post this as an answer.] I see that this post is a bit old, but I'm in a similar boat and I found this in the Visual Studio 2008 redist.txt file: ``` Windows SDK Files Subject to the lic...
[ 0.22783301770687103, 0.30137667059898376, 0.3836934268474579, 0.06085314229130745, -0.3285660743713379, -0.593469500541687, 0.41400301456451416, -0.0055462270975112915, -0.26099008321762085, -0.6093968749046326, -0.13214726746082306, 0.38677534461021423, -0.23221610486507416, 0.21550904214...
We are looking at hiring a software development project manager. His job is going to be concerned with running multiple dedicated project teams focused on delivery of software for external customers. He will also need to provide support to our business development unit and oversee post-implementations support of the af...
[ 0.5361631512641907, 0.09765847027301788, -0.07628250867128372, 0.4214761555194855, 0.4072939455509186, -0.050134703516960144, 0.0898902639746666, -0.2759198248386383, -0.0048590456135571, -0.5208324790000916, -0.2733941376209259, 0.6888936758041382, 0.31487926840782166, 0.00631285272538662...
not matter. 5. Some experience involving same acronyms as we use daily over here. 6. Heavy experience involving same acronyms as we use daily over here. 7. Some experience, mostly with technologies we do not use. 8. Heavy experience, mostly with technologies we do not use. This question is regarding the best level and...
[ 0.8131488561630249, 0.11569762229919434, 0.08667882531881332, 0.31727463006973267, 0.185993954539299, 0.0034764439333230257, 0.18822790682315826, -0.07952161878347397, -0.1742323338985443, -0.2917788326740265, -0.24368685483932495, 0.7559402585029602, 0.060676295310258865, -0.3973949253559...
gap for the skills that you do not already have on your team. If you already have a team with strong technical and technical leadership skills then you don't need to hire someone who is likely to compete with the people you already have. If you are missing this, you probably want to hire a technical manager with some ...
[ 0.22934837639331818, 0.0007027055835351348, -0.22416184842586517, 0.2361632138490677, 0.2000412493944168, 0.18424727022647858, 0.33274900913238525, 0.13536681234836578, -0.6754748821258545, -0.6331102252006531, -0.21087723970413208, 0.7878682613372803, 0.1934833973646164, 0.115755707025527...
communication and collaboration. As a minimum, you should look for someone that has proven experience in either your industry or with the technology space that you are playing in, otherwise they will be unable to gain the respect of the rest of the team and perform their primary role. Which brings me to something else...
[ 0.18370883166790009, -0.07904071360826492, 0.02433358132839203, 0.313619464635849, -0.03350584954023361, -0.0323885940015316, -0.05956336110830307, 0.24891996383666992, -0.5095850229263306, -0.6884676218032837, -0.06156674027442932, 0.5719351768493652, 0.5119068026542664, -0.17448239028453...
good did not stay long. What do you need to do to allow the type of skills you want to acquire for the team to flourish?
[ 0.2910148501396179, 0.12616753578186035, -0.13754427433013916, 0.2039707601070404, -0.292608380317688, -0.4030250608921051, 0.46564164757728577, 0.30055171251296997, -0.13773643970489502, -0.29648274183273315, 0.4564254879951477, 0.6298980712890625, 0.4520518481731415, -0.1203412264585495,...
I am aware of how to setup autocompletion of python objects in the python interpreter (on unix). * Google shows many hits for explanations on how to do this. * Unfortunately, there are so many references to that it is difficult to find what I need to do, which is slightly different. I need to know how to enable, tab...
[ 0.4197655916213989, 0.3777565062046051, -0.08052593469619751, -0.005445243325084448, -0.2778876721858978, -0.09030385315418243, 0.47016435861587524, 0.07578086853027344, -0.41882628202438354, -0.499094694852829, -0.1467016190290451, 0.6569356322288513, -0.19047820568084717, -0.118384368717...
types part of it (and optionally presses the TAB key). I do not need it to work on windows or mac, just linux. Use Python's `readline` bindings. For example, ``` import readline def completer(text, state): options = [i for i in commands if i.startswith(text)] if state < len(options): return options[s...
[ 0.014152959920465946, -0.2038828581571579, 0.476908802986145, -0.24875326454639435, 0.13299047946929932, -0.2057996541261673, 0.04711002856492996, -0.06667293608188629, -0.057974640280008316, -0.5039263367652893, -0.40009862184524536, 0.554530918598175, -0.28661060333251953, -0.19297869503...
I'm trying to use a static library created by me in Visual C++ 2005 (unmanaged C++). I declare one function "int myF(int a);" into a .h file, I implement it in a .cpp file, I compile it - the .lib file is produced. I create a new project (a separate solution) in VC++ 2005 (also native C++), I add the paths for the inc...
[ 0.04367697983980179, 0.16447417438030243, 0.2617650628089905, -0.4373127818107605, -0.18776749074459076, 0.17897233366966248, 0.4723759591579437, -0.2720082700252533, -0.08262676745653152, -0.525569498538971, -0.1313040554523468, 0.5771817564964294, -0.6336546540260315, 0.08338124305009842...
the library project and then add a reference to the library projects, it works, but I'm not going to implement everything like this, but rather to add external libraries to my projects... What is wrong? Thank you. Try setting additional dependencies in the linker input for a project properties.
[ 0.5936385989189148, 0.03837097808718681, 0.16752305626869202, 0.43576157093048096, -0.15127268433570862, -0.4263942837715149, 0.14447154104709625, 0.13004529476165771, -0.05771436169743538, -0.6046157479286194, 0.26617127656936646, 0.608883261680603, -0.15445539355278015, 0.230791568756103...
When sending data over HTTPS, I know the content is encrypted, however I hear mixed answers about whether the headers are encrypted, or how much of the header is encrypted. How much of HTTPS headers *are* encrypted? Including GET/POST request URLs, Cookies, etc. All the HTTP headers are encrypted†. That's why SSL on ...
[ 0.28061288595199585, -0.19697408378124237, 0.07228419929742813, 0.25009432435035706, -0.3075532019138336, -0.4547003507614136, 0.5836505889892578, 0.14779554307460785, -0.36756500601768494, -0.8671098351478577, -0.20332254469394684, 0.363593190908432, -0.3495467007160187, 0.277274727821350...
they were, your packets would not be routable.)
[ 0.4454469680786133, 0.1148010641336441, 0.023053612560033798, 0.20047426223754883, 0.015502002090215683, 0.5846638083457947, 0.13457432389259338, 0.1293109506368637, -0.2504352629184723, -0.4488230347633362, 0.1030830517411232, 0.547176718711853, -0.12491919100284576, 0.19100983440876007, ...
I know this is a bit of a newbie question, but are there equivalents to C#'s string operations in Java? Specifically, I'm talking about `String.Format` and `String.Join`. The Java String object has a `format` method (as of 1.5), but no `join` method. To get a bunch of useful String utility methods not already include...
[ 0.38907262682914734, 0.06673888862133026, 0.38580238819122314, -0.11641474068164825, -0.12284383922815323, -0.42896151542663574, 0.05806716904044151, -0.08595817536115646, -0.3574311137199402, -0.5078832507133484, 0.09296223521232605, 0.42870691418647766, -0.33415520191192627, 0.2209866046...
I've created a copy utility in c# (.NET 2.0 Framework) that copies files, directories and recursive sub directories etc. The program has a GUI that shows the current file being copied, the current file number (sequence), the total number of files to be copied and the percentage completed for the copy operations. There ...
[ 0.3986515700817108, 0.22092010080814362, 0.3472864329814911, 0.11929261684417725, 0.20051774382591248, -0.13933078944683075, 0.12509742379188538, -0.026498448103666306, -0.3956845700740814, -0.7321509718894958, 0.1008833721280098, 0.5453941822052002, -0.12294860184192657, 0.304998487234115...
As a workaround I've separated the file copy operations and GUI display to their own threads and set up a visual cue to show that work is being done. At least the user is aware that the program isn't frozen and is still copying files. It would be nicer to be able to show the progress based on the total number of bytes...
[ 0.4288463294506073, -0.0039447336457669735, 0.4303629994392395, 0.1637987196445465, 0.27657341957092285, -0.14071771502494812, 0.1384306401014328, 0.03431680053472519, -0.5079081058502197, -0.6949528455734253, -0.06073571369051933, 0.7421838045120239, 0.01954835094511509, 0.085442289710044...
own event that is based on this and have a handler on the GUI side of things reading the updates (maybe based on checking the FileInfo.Length property of the destination object using some type of timer?). Does anyone know of a way to do this that I'm overlooking. If I can avoid it, I'd rather not rewrite my class to c...
[ 0.35683324933052063, -0.19687828421592712, 0.2003585696220398, 0.13537466526031494, -0.17839595675468445, -0.396480530500412, 0.4267696440219879, 0.29636335372924805, -0.40740057826042175, -0.8129578828811646, 0.016699381172657013, 0.434510201215744, -0.14495408535003662, -0.13990092277526...
only are not an option for me. PPS - I'm open to solutions in any .NET language variety, not only c#. The FileInfo.CopyTo is basically a wrapper around the Win32 API call "CopyFile" in the kernel32.dll. This method does not support progress callback. However, the CopyFileEx method does, and you can write your own .NE...
[ 0.3572261333465576, -0.16494596004486084, 0.7022683620452881, 0.08304130285978317, 0.07073436677455902, -0.22966942191123962, 0.20035015046596527, 0.05941856652498245, -0.10728839039802551, -0.8620315194129944, -0.37986302375793457, 0.6427794098854065, -0.524142861366272, 0.027404394000768...
I have XML that looks like ``` <answers> <answer> <question-number>1</question-number> <value>3</value> <mean xsi:nil="1" /> </answer> <answer> <question-number>2</question-number> <value>2</value> <mean>2.3</mean> </answer> <answer> <question-number>3</questi...
[ 0.057596560567617416, 0.23592998087406158, 0.3945865035057068, -0.036310337483882904, -0.4662967920303345, 0.19063250720500946, 0.10402406007051468, -0.37732821702957153, 0.07064295560121536, -0.9578113555908203, 0.0328749343752861, 0.3021566867828369, 0.07976958900690079, -0.0645975396037...
representation of the mean. For some potential lists of answers the mean will always be null. At the bottom of the page I want to put a legend explaining the graphical representation of the mean. But I only want it to appear if I actually displayed a mean at all. So I want to be able to do a check, after closing the x...
[ 0.24005027115345, -0.13757413625717163, 0.3279924988746643, 0.2846010625362396, -0.3468969464302063, -0.015436979942023754, 0.2111184149980545, 0.060914862900972366, -0.13125258684158325, -0.6879876852035522, 0.34543007612228394, 0.3865572214126587, -0.12512025237083435, -0.026756906881928...
mean value is greater than zero". Fortunately I know that the mean value, if there is one, will in fact always be greater than zero -- unfortunately this isn't a generalized solution for this reason. I still think the approach that jasper and workmad3 were taking (checking for the xsi:nil attribute) ought to work, but...
[ 0.21826483309268951, -0.08301994204521179, 0.25543975830078125, 0.267756849527359, -0.10930687189102173, -0.28307992219924927, 0.21151559054851532, 0.17704163491725922, -0.05794968828558922, -0.34685608744621277, 0.27333104610443115, 0.7250139713287354, 0.030104098841547966, 0.095005244016...
Is it possible to update IIS on Windows XP from 5.1 to 6? If so how? Thanks. No, it is not possible. The version of IIS is tied to a specific version of Windows. ``` XP = IIS 5.1 2003 = IIS 6 2008 = IIS 7 ``` More information available at <http://support.microsoft.com/kb/224609>.
[ 0.23458454012870789, 0.032982733100652695, 0.5644661784172058, -0.15346087515354156, -0.09581578522920609, -0.4951685070991516, 0.3031423091888428, 0.02711925283074379, -0.08138976991176605, -0.3368450403213501, -0.2565222382545471, 0.5949662327766418, -0.15881046652793884, 0.3023977577686...
Say I've got a class like this: ``` class Test { int x; SomeClass s; } ``` And I instantiate it like this: ``` Test* t = new Test; ``` Is x on the stack, or the heap? What about s? Each time you "instantiate" an object/symbol using a new (we are speaking C++ here), a new memory zone will be allocated for this...
[ 0.3076786398887634, 0.10059835016727448, 0.07865745574235916, -0.13795717060565948, -0.1561788022518158, -0.11503180861473083, 0.17216306924819946, -0.16051164269447327, -0.12156563252210617, -0.6398605704307556, -0.1538868397474289, 0.2999424934387207, -0.1694602519273758, 0.2526693940162...
; } B b ; C * c ; } void doSomething() { A aa00 ; A * aa01 = new A() ; } ``` The object aa00 is allocated on the stack. As aa00::b is allocated on a "local" memory according to aa00, aa00::b is allocated inside the memory range allocated by the new aa00 instruction. Thus, aa00::b is also allocated o...
[ -0.03146654739975929, 0.11065518110990524, 0.2562275230884552, -0.5018209218978882, 0.12041805684566498, 0.23778478801250458, 0.4044424891471863, -0.5079684257507324, -0.1787617951631546, -0.5141729116439819, -0.06072426959872246, 0.54590904712677, -0.46636050939559937, 0.14329439401626587...
case, as aa01::b is allocated on a "local" memory according to aa01, aa01::b is allocated inside the memory range allocated by the new aa01 instruction. Thus, aa01::b is on the heap, "inside" the memory already allocated for aa01. As aa01::c is a pointer, allocated with new, the object designed by aa01::c is on the he...
[ -0.48945361375808716, -0.04434303939342499, -0.052494823932647705, -0.01114758849143982, -0.07102031260728836, 0.1365514099597931, 0.0952448844909668, -0.24140870571136475, -0.016925876960158348, -0.46666640043258667, -0.3482474684715271, 0.31110596656799316, -0.2363486886024475, 0.0154944...
memory, i.e., it is elsewhere on the heap 3 - if the object is allocated "without new", then it is inside the local memory. 4 - If the "local" memory is on the stack, then the object allocated without new is on the stack, too. 5 - If the "local" memory is on the heap, then the object allocated without new is o...
[ -0.049056440591812134, 0.20184554159641266, -0.023617200553417206, 0.2621324956417084, -0.017225107178092003, 0.2004009634256363, 0.30949005484580994, -0.1344049870967865, -0.10017061978578568, -0.8339618444442749, -0.3420894742012024, 0.3730330467224121, 0.08631385862827301, 0.23202541470...
Let me start by saying I'm a huge fan of the elegance of this pattern -- I have a group of basic entities that I have implemented builders for (specifically for testing). However I have found (and this may be the caveat) that as my program evolved I kept having to go back and re-work the builders. In the end, it really...
[ 0.5573347806930542, 0.32887008786201477, -0.21156205236911774, 0.019263222813606262, 0.010344182141125202, 0.27806004881858826, 0.3552083969116211, 0.10901158303022385, -0.23826409876346588, -0.7194703221321106, 0.3232184946537018, 0.5269763469696045, 0.10274849832057953, 0.673421800136566...
TDBs something that should only be created once you're design has reached some stability and the Object Mother becomes too large? Also note, I've found I'm not using the builders anywhere else in the app, as I enjoy using .Net 3.0 's new syntax for property initialization. I like using fluent builders for the object u...
[ 0.45210298895835876, -0.21612291038036346, 0.1101919487118721, -0.18339109420776367, -0.34852245450019836, -0.1844041794538498, 0.6095331907272339, -0.246026873588562, 0.16935424506664276, -0.6800969243049622, 0.10337457060813904, 0.5834196209907532, -0.29475367069244385, 0.109177686274051...
.WithScholarBadge() .WithCriticBadge() ``` vs: ``` User fred = UserObjectMother.Fred() ``` To express the idea that the user has rep 900 and those two particular badges would be unweildy to do with the ObjectMother. The tendecy I've seen is developers then finding this method that bui...
[ 0.2082033008337021, -0.03807350620627403, 0.4954487085342407, 0.15970218181610107, -0.5050565600395203, -0.2062232941389084, 0.37930232286453247, -0.22545619308948517, -0.2005576640367508, -0.587308406829834, -0.04629317298531532, 0.6001080274581909, -0.12090754508972168, -0.05579718947410...
the object. The fluent builder on the other hand is expressive as to what is being built, and is easy to create specific users for the test as required. That said, I also end up using these patterns exclusively in test code as the production code does not usually require this sort of expressiveness.
[ 0.4368816614151001, 0.10049080103635788, 0.15594781935214996, 0.08466371148824692, -0.4780316948890686, 0.1143810823559761, 0.8457300662994385, 0.06124981865286827, -0.01302439346909523, -0.8123674988746643, -0.18433232605457306, 0.8635004758834839, -0.2147301286458969, -0.1018449664115905...
I would like a "system" that monitors a process and would kill said process if: * the process exceeds some memory requirements * the process does not respond to a message from the "system" in some period of time I assume this "system" could be something as simple as a monitoring process? A code example of how this co...
[ 0.46111994981765747, -0.08917750418186188, 0.13116173446178436, 0.31720274686813354, -0.0005659018643200397, 0.0017087808810174465, 0.0952569916844368, 0.1358800232410431, -0.18109549582004547, -0.6166194081306458, 0.18376412987709045, 0.7720188498497009, -0.49082237482070923, 0.1931838393...
sort of thing as well. [God](http://god.rubyforge.org/) is a recent example.
[ 0.6972105503082275, 0.003149152733385563, -0.21395856142044067, -0.04612867534160614, -0.11576733738183975, 0.1590990126132965, 0.590620219707489, 0.436521977186203, -0.7578122019767761, -0.4847910702228546, -0.2630581557750702, -0.062280572950839996, -0.13856622576713562, 0.40369781851768...
I need to tweak some variables (only in a development setting) without having to restart IIS or anything (so I assume Web.Config is the wrong place to put them). Where is the easiest place to put about 500 config settings that have to be read for every request and written to, like I said, while IIS is running? **EDIT*...
[ 0.33672982454299927, 0.10826113075017929, 0.018558954820036888, 0.19177520275115967, 0.1609639972448349, -0.3566139340400696, 0.5721243619918823, 0.12797698378562927, -0.18736685812473297, -0.7907015085220337, 0.23424318432807922, 0.6523292064666748, -0.10025572776794434, -0.01073448359966...
Settings), that I don't have to worry about parsing and can read from and write to. If I do XML, where do I write the file to so I don't have to spend time messing around with permissions? In a database?
[ 0.24945947527885437, 0.08426577597856522, 0.5615474581718445, 0.26024919748306274, 0.29525479674339294, -0.22661451995372772, 0.002253283280879259, -0.20582330226898193, -0.2022879421710968, -0.570438802242279, -0.15857025980949402, 0.5887537002563477, -0.04632820934057236, -0.238631710410...
What I'd like to avoid: ``` ManagementClass m = new ManagementClass("Win32_LogicalDisk"); ManagementObjectCollection managementObjects = m.GetInstances(); List<ManagementObject> managementList = new List<ManagementObject>(); foreach(ManagementObject m in managementObjects){ managementList.Add(m); } ``` Isn...
[ 0.026041114702820778, 0.07445954531431198, 0.37925031781196594, -0.24231012165546417, 0.2049199342727661, -0.13530458509922028, 0.3725256621837616, -0.45091956853866577, -0.5068337321281433, -0.5435224771499634, 0.01882854290306568, 0.6906759738922119, -0.6759048104286194, 0.18280653655529...