text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
but the initial version of Microsoft's Entity Framework does not. MS caught a lot of flak for this and PI is probably the #1 most discussed feature for the next version (whenever that is). As far as what you are trying to do with interfaces, does the collection of Bars need to be modified after it is retrieved? If the...
[ 0.19199706614017487, 0.01797453872859478, 0.30235326290130615, 0.10796009749174118, -0.22984054684638977, -0.14230377972126007, 0.1900867074728012, -0.22486832737922668, -0.13731174170970917, -0.7147911190986633, 0.18684230744838715, 0.2595329284667969, -0.5854501724243164, 0.0026952591724...
IEnumerable<IBar> Bars { get; } } partial class Foo : IFoo { IEnumerable<IBar> IFoo.Bars { get { return Bars.Cast<IBar>(); } } } ``` Also, I know of [at least one effort](http://blogs.msdn.com/jkowalski/archive/2008/09/09/persistence-ignorance-poco-adapter-for-entity-framework-v1.aspx) to make th...
[ -0.0742473304271698, 0.18759144842624664, 0.3333471417427063, -0.43755632638931274, 0.015389090403914452, -0.08215576410293579, 0.5806578993797302, -0.1666399985551834, -0.00757501320913434, -0.7320351004600525, -0.013505631126463413, 0.6066151261329651, -0.3153032958507538, 0.068681955337...
I am creating an application which sends the measurement data every 200 ms from mobile phone to the server. The data have to be processed in real-time, but I noticed that the difference between the sent time and the time of process start is getting bigger and bigger so I have to find the point where the requests get st...
[ 0.5348147749900818, -0.016653798520565033, 0.5653135180473328, 0.17915014922618866, -0.16156548261642456, 0.06759877502918243, 0.4090234935283661, -0.5494476556777954, 0.02134176716208458, -0.5915501713752747, 0.22046780586242676, 0.29909148812294006, 0.0642893984913826, 0.1043050885200500...
there any other practical way to determine what can be the maximum number of requests per seconds handled without causig the delay? Thanks! The [Apache Benchmarking (ab)](http://httpd.apache.org/docs/2.0/programs/ab.html) tool might be a good way to do this (it will work with any HTTP server, not just Apache).
[ 0.4129706025123596, -0.1433425396680832, 0.06721410900354385, 0.32835638523101807, -0.20276741683483124, -0.344810426235199, 0.33860576152801514, -0.11237629503011703, -0.3331342339515686, -0.460856169462204, 0.2357063740491867, 0.44354450702667236, 0.04499013349413872, -0.1847229897975921...
I am a bit confused about the difference between events and messages in mfc. Are they the same? Since you specifically ask about MFC, I assume you mean the event handlers and message handlers that you can define in the properties windows of a MFC class. Under "events" you can define: * Handlers for WM\_COMMAND windo...
[ 0.14305245876312256, -0.21330894529819489, 0.18668678402900696, -0.17484617233276367, 0.1308342069387436, 0.060393888503313065, 0.07387170195579529, -0.26905539631843567, -0.5105870962142944, -0.7062813639640808, -0.18363185226917267, 0.3713271915912628, -0.3904764652252197, 0.201774030923...
handlers, are in fact message handlers. The other answers explain the difference between Windows events (unrelated to the MFC "events" described above), and Windows messages (correspond to both "events" and "messages" described above). If you think that this is a bit confusing, I completely agree...
[ 0.05411922186613083, -0.19742164015769958, -0.0016098548658192158, 0.10209245979785919, -0.021314801648259163, -0.11766289919614792, 0.16178613901138306, -0.01566609926521778, -0.4435344934463501, -0.3500569760799408, -0.26487311720848083, 0.3313882350921631, -0.5891004204750061, -0.088076...
I stumbled upon a function looking like this: ``` public void function(Class<?> clazz) {...} ``` What are the pros/cons of changing the method to: ``` public <T> void function(Class<T> clazz) {...} ``` edit: what are the compile time / runtime diff. todd.run is totally right on, but that's only half the answer. T...
[ 0.1146107167005539, -0.1248934417963028, 0.21888458728790283, 0.018112672492861748, 0.026911292225122452, -0.03530174121260643, 0.05450368672609329, -0.16002871096134186, -0.11625108867883682, -0.5133584141731262, 0.13579733669757843, 0.4733870327472687, -0.2728128135204315, 0.242387741804...
{ if (b instanceof JLabel) { t = t && labels.add(b); } } return t; } ``` and ``` public boolean add(List<? extends JLabel> j) { boolean t = true; for (JLabel b : j) { if (b instanceof JLabel) { t = t && labels.add(b);
[ 0.23585325479507446, -0.049925439059734344, 0.21739770472049713, -0.6038351655006409, 0.06212635710835457, -0.0876813679933548, 0.4195408821105957, -0.4100995361804962, 0.0659700334072113, -0.2646438777446747, -0.7033905386924744, 0.8583519458770752, -0.5866004228591919, -0.009801795706152...
} } return t; } ``` The first method will actually not compile UNLESS you add an appropriate type parameter to the enclosing class, whereas the second method WILL compile regardless of whether the enclosing class has a type parameter. If you do not use `<?>`, then you are locally responsible for telling the c...
[ 0.13778960704803467, 0.016846034675836563, 0.09710366278886795, -0.12187765538692474, 0.0008242444018833339, -0.1941070556640625, 0.3141847550868988, -0.058099374175071716, 0.018348757177591324, -0.5279569625854492, -0.38321375846862793, 0.5109220147132874, -0.4461684226989746, 0.073628909...
use or need "extends" and "super." A better but more elaborate treatment of this issue is on page 18 of [Gilad Bracha's Generics Tutorial (PDF)](http://java.sun.com/j2se/1.5/pdf/generics-tutorial.pdf). Also see [this stack overflow question](https://stackoverflow.com/questions/695298/java-field-type-for-a-value-of-a-ge...
[ 0.15497973561286926, 0.17021644115447998, 0.24475052952766418, -0.03611114248633385, -0.04095214977860451, -0.30470162630081177, 0.4177035093307495, -0.08618155121803284, -0.3397641181945801, -0.3626749515533447, -0.21073795855045319, 0.525970458984375, -0.33608782291412354, 0.243583723902...
I have to create a short program in C that manipulates strings, but I always run into some weird pointer errors. While K&R is a great reference on the language, and I often look at it when I am puzzled it already assumes you are an adequate programmer. The lecturer that teaches us programming said that good programme...
[ 0.37756749987602234, 0.33180785179138184, -0.18377886712551117, 0.23404943943023682, 0.0059270476922392845, 0.041586048901081085, 0.1722549945116043, 0.11422634869813919, -0.08901150524616241, -0.49058327078819275, 0.0686098262667656, 0.2995874285697937, -0.07775015383958817, -0.0812052488...
then, if you feel the need, you can include an ascii version of them into the code. I normally use these three formats: --- to reason about memory: ``` +--------+ 0 | | <- start +--------+ 1 | | <- q scans from start to end +--------+ ~ ..... ~ +--------+
[ 0.19661898910999298, 0.1664346307516098, 0.33507540822029114, -0.1692904233932495, 0.05445181950926781, 0.1315189152956009, 0.0052666133269667625, -0.1385449320077896, -0.040868740528821945, -0.7929142117500305, -0.26779693365097046, 0.36655521392822266, -0.10756869614124298, 0.06756781041...
| | <- end +--------+ \ | | | +--------+ |__ rest of the ~ ..... ~ | allocated memory n | | | +--------+ / ``` --- to reason about strings: ``` 0
[ -0.661658525466919, 0.1701674610376358, 0.26006019115448, -0.05791914463043213, 0.296939879655838, 0.11055275797843933, 0.4203770160675049, -0.2646932303905487, 0.0858895480632782, -0.3530295491218567, -0.38308465480804443, 0.3499491810798645, -0.20585539937019348, 0.1428319364786148, 0....
n +--+-- --+--+--+--+ | | ... | | |\0| +--+- --+--+--+--+ ^ ^__ q moves from the | end to the start p moves from start to the end ``` --- to reason about bits in a word: ``` xxxx yyzz 00tt 11ss \ \
[ -0.5531969666481018, 0.22602562606334686, 0.29223358631134033, -0.28010448813438416, 0.0654182955622673, 0.3997965157032013, 0.3247012794017792, -0.3000476360321045, 0.0895823985338211, -0.21524666249752045, -0.41747525334358215, -0.12382631748914719, -0.06712755560874939, 0.23109588027000...
\ \ \ \ \__ storage registry \ \ \ \ \ \___ always set to 1 \ \ \ \ \_____ temp value \ \ \ \______ always zeroed \ \ \________ zero flag value \ \_________ y register \_____________ x address
[ -0.4513610899448395, 0.13750123977661133, 0.25601381063461304, 0.3303736746311188, 0.20529231429100037, 0.360576868057251, 0.02594747021794319, 0.2657366394996643, -0.13008467853069305, -0.446850448846817, -0.12059541791677475, 0.2343851625919342, -0.4286355972290039, 0.34207528829574585, ...
``` --- I used to do something similar for finite state machines too but they tended to be too complex (and time consuming to do) so I now directly embed the graphviz code into a comment. Even not knowing about GraphViz it should be easy to guess how to draw the FSM diagram. ``` digraph G { mode = hier LIMBO [...
[ -0.41465577483177185, -0.32800188660621643, 0.7365494966506958, 0.30571937561035156, -0.1389726847410202, -0.16128890216350555, 0.12327524274587631, 0.09853670746088028, -0.3034220039844513, -0.6495882868766785, -0.3275867998600006, 0.09957820922136307, -0.6166050434112549, -0.093631088733...
TUNE ; TUNE -> LYRICS ; TUNE -> CHORD [style=dashed ]; TUNE -> LIMBO ; GRACE -> TUNE ; GRACE -> CHORD [style=dashed ] ; SYMBOLS -> TUNE ; SYMBOLS -> LIMBO ; overlap=false sep = 1.5 } ``` --- These cover the vast majority of diagrams I need. For more complex ones I use...
[ 0.09609760344028473, 0.04532693326473236, 0.2796868085861206, 0.15030869841575623, -0.23127222061157227, 0.07066855579614639, 0.2573803961277008, -0.4883975088596344, -0.2158668339252472, -1.0071473121643066, -0.29140281677246094, 0.2604820728302002, -0.30418580770492554, -0.10897157341241...
What are 'best-practices' for saving Composite patterns in a Relational Database? We have been using Modified Preorder Tree Traversal. This is very quick to build the whole tree, but very slow to insert or delete new nodes (all left and right values need to be adjusted). Also querying the children of a node is not eas...
[ 0.1773129254579544, 0.06737462431192398, -0.340181827545166, 0.35993877053260803, 0.07982342690229416, 0.1275802105665207, 0.13801918923854828, -0.08771198987960815, -0.4399826228618622, -0.6219996809959412, 0.36468324065208435, 0.38563838601112366, -0.49769774079322815, -0.008704992942512...
work very good however, the Modified Preorder Tree Traversal, but I was wondering if there are better alternatives. While finding all descendents of a row with MPTT is fast, finding all children can be slow. However you should be able to fix that by adding a `parent_id` field to your table that records (yes, redundantl...
[ 0.02558845654129982, 0.05076855793595314, 0.3462667465209961, 0.15450769662857056, 0.2328697293996811, 0.03092091716825962, 0.26011258363723755, -0.15887530148029327, -0.15405985713005066, -0.7312279343605042, -0.05468231067061424, 0.6510170698165894, 0.05279669165611267, 0.095933094620704...
that records the vertical level of the row, although that is in fact *more* likely to change under certain types of transformations (e.g. moving a subtree to a different point in the tree). The plain old link-to-parent representation (i.e. just having `parent_id` and no `left_pos` or `right_pos`), is of course faster ...
[ -0.354875385761261, -0.07228463143110275, 0.2533445656299591, 0.23139218986034393, -0.04951600730419159, 0.2942277193069458, 0.1797369420528412, 0.0400521419942379, -0.3012767434120178, -0.7247812747955322, -0.3715018630027771, 0.08573100715875626, -0.08730275928974152, 0.15633994340896606...
link-to-parent?
[ 0.34545257687568665, -0.31126895546913147, 0.12406681478023529, 0.34480753540992737, -0.1525016874074936, -0.07832004129886627, -0.01816282421350479, 0.33826157450675964, -0.3011849820613861, -0.22635124623775482, 0.053154509514570236, -0.07437901198863983, -0.20383775234222412, 0.38038799...
I have a plug-in that I am distributing via an Eclipse update site. I want to track how many times it is being downloaded, and preferably by whom. For regular pages on my site, I can use Google analytics. However, Eclipse doesn't use any HTMLs when going for update sites. Is there any way to do this when I don't have...
[ 0.5827352404594421, 0.16899102926254272, 0.310009628534317, 0.13046209514141083, -0.31333252787590027, -0.290274441242218, 0.08275683969259262, 0.02681909129023552, -0.16804197430610657, -0.5492157936096191, 0.2825585603713989, 0.6012633442878723, -0.20316870510578156, -0.0321001261472702,...
that, you use AWStats using its' web interface.
[ 0.5763159394264221, 0.06057898327708244, 0.10477818548679352, 0.21564912796020508, -0.26819121837615967, -0.30733874440193176, 0.02644084021449089, 0.3361307382583618, 0.16538962721824646, -0.5439761877059937, 0.055160075426101685, 0.49491173028945923, -0.09390134364366531, 0.1053707897663...
I'm looking for a static analysis tool with the maturity of splint that also produces test coverage analysis of the code. For instance, all non-static functions in libfoo.c should be present in libfoo.h, by that token all functions in libfoo.h should have unit tests. Of course, such behavior would need some kind of gr...
[ 0.19730927050113678, 0.12412138283252716, 0.10087325423955917, 0.15239645540714264, -0.0737767368555069, -0.204950749874115, 0.01067954208701849, 0.053951241075992584, -0.29232341051101685, -0.6448943018913269, 0.03830796107649803, 0.5921286940574646, -0.24952268600463867, 0.09565035253763...
unit test coverage remains adequate. Its a large, geographically distributed team which means stuff gets committed 24/7, I need nightly builds to be smarter. I don't need it to be super smart, I just need it to break the build if something isn't being tested, unless its explicitly taken out of scope. CCAN is working ...
[ 0.37874874472618103, 0.22956840693950653, -0.08346711844205856, -0.16673921048641205, -0.2596820294857025, -0.20247064530849457, 0.41304105520248413, -0.4808926582336426, -0.22996141016483307, -0.3417375087738037, 0.06298208236694336, 0.7387003302574158, 0.30892330408096313, 0.167717814445...
discussion of using gcov.
[ 0.11300104856491089, 0.008682206273078918, 0.17668716609477997, -0.17436043918132782, -0.11050595343112946, -0.4191736876964569, -0.3911115825176239, -0.0069291419349610806, -0.3331209421157837, -0.5326360464096069, -0.27403393387794495, 0.2455967217683792, -0.25177350640296936, -0.1476586...
I would like to use the WebKit web inspector in a custom browser based on WebKit on OS X. Is it possible to use the web inspector on a webview object? If so, how? Set `WebKitDeveloperExtras` to `YES` in your default user defaults when you send `-[NSUserDefaults registerDefaults:]`. This applies app-wide, of course. Re...
[ 0.009763217531144619, -0.06053353473544121, 0.5362502932548523, 0.21382027864456177, 0.03799216449260712, -0.17007525265216827, 0.4812348186969757, 0.05484398454427719, -0.06851041316986084, -0.5519754886627197, -0.08355405926704407, 0.726843535900116, -0.3355335593223572, -0.0625039562582...
in your menu bar. You may find this an unacceptable risk.
[ 0.5825130939483643, 0.15905283391475677, 0.06352954357862473, 0.0011670710518956184, 0.45467284321784973, -0.1523720920085907, 0.2540815472602844, 0.541616678237915, -0.17319679260253906, -0.7132005095481873, 0.12259469926357269, 0.6559879779815674, 0.0995045155286789, 0.07519765943288803,...
I'm learning Python as my second programming language (my first real one if you don't count HTML/CSS/Javascript). I'm trying to build something useful as my first real application - an IRC bot that alerts people via SMS when certain things happen in the channel. Per a request by someone, I'm (trying) to build in schedu...
[ 0.2599380910396576, -0.12410013377666473, 0.4952627122402191, -0.34114396572113037, -0.3740094304084778, -0.12127580493688583, 0.3689093291759491, 0.3370366096496582, -0.3180818259716034, -0.5174566507339478, -0.006504595745354891, 0.7169654369354248, -0.5712766051292419, -0.19268408417701...
# storing stuff in a CSV, reading out of it recipient = row[0] # who the SMS is going to s = row[1] # gets the first hour of the "no alert" time range f = row[2]
[ -0.1291692852973938, -0.2422955334186554, 0.9591637849807739, 0.012775425799190998, 0.08935233950614929, 0.009363600052893162, 0.4911439120769501, 0.1415163278579712, -0.16045762598514557, -0.3692471981048584, -0.5420548319816589, 0.2885459065437317, -0.48072996735572815, -0.47342243790626...
# gets last hour of above nrt = [] # empty array that will store hours curtime = time.strftime("%H") # current hour if s == "no":
[ 0.3831414580345154, -0.04066964611411095, 0.8109889626502991, 0.04354450851678848, 0.414441853761673, 0.007236312609165907, 0.39458248019218445, -0.28244683146476746, -0.19795143604278564, -0.5817474126815796, -0.0582108274102211, 0.7183959484100342, -0.014620988629758358, 0.22552236914634...
print "They always want alerts, sending email" # start time will = "no" if they always want alerts # send mail code goes here else: for hour in range(int(s), int(f)): #takes start, end hours, loops through to get hours in between, stores them in the above list
[ 0.3356849253177643, -0.07644195109605789, 0.5135191679000854, -0.178431436419487, 0.13091309368610382, 0.015703311190009117, 0.30536988377571106, -0.0021925922483205795, -0.2805682420730591, -0.4503324329853058, -0.12583115696907043, 0.5291810631752014, -0.24337869882583618, -0.16013802587...
nrt.append(hour) if curtime in nrt: # best way I could find of doing this, probably a better way, like I said I'm new print "They don't
[ 0.3264774680137634, 0.014317788183689117, 0.8402198553085327, -0.03510551527142525, -0.21341194212436676, 0.3377850353717804, 0.5445170998573303, -0.01708308607339859, -0.5143426656723022, -0.6300452351570129, 0.1445399969816208, 0.3545164465904236, -0.04561716690659523, -0.067786075174808...
want an alert during the current hour, not sending" # <== what it says else: # they do want an alert during the current hour, send an email
[ 0.5019780993461609, 0.11659010499715805, 0.8272828459739685, -0.02217244915664196, 0.2010839432477951, -0.27894970774650574, 0.2805904448032379, 0.15974260866641998, -0.34763312339782715, -0.45363596081733704, -0.1820431351661682, 0.6438693404197693, -0.1417846828699112, -0.302240908145904...
# send mail code here ``` The only problem I'm having is somehow the script only ends up looping through one of the lines (or something like that) because I only get one result every time, even if I have more than one entry in the CSV file. There are at least two bugs in your program: ``` curtime = time.strftime("%H...
[ 0.013859162107110023, 0.10657830536365509, 0.4382777512073517, -0.20290140807628632, -0.21826793253421783, 0.20783722400665283, 0.3645876348018646, -0.32304802536964417, -0.3039478361606598, -0.4835868179798126, 0.06545525044202805, 0.48508420586586, -0.3552949130535126, 0.0771384164690971...
two are not interchangeable, and won't compare equal: ``` '4' == 4 # False '4' in [3, 4, 5] # False ``` This revised code addresses that issue, and is also more efficient than generating a list and searching for the current hour in it: ``` cur_hour = time.localtime().tm_hour if int(s) <= cur_hour < int(f): # Yo...
[ 0.36110052466392517, 0.018979109823703766, 0.4149092137813568, -0.2282116860151291, 0.05338920280337334, 0.13053230941295624, 0.1356361210346222, -0.5757240653038025, -0.2041299045085907, -0.5815461277961731, -0.029635528102517128, 0.7801893353462219, -0.5732048749923706, 0.042979940772056...
hours wrap around midnight (e.g. s = 22 and f = 8). Neither of these problems are necessarily related to "the script only ends up looping through one of the lines", but you haven't given us enough information to figure out why that might be. A more useful way to ask questions is to post a **brief** but **complete** co...
[ 0.871918261051178, -0.2979123890399933, 0.3436673879623413, 0.20033106207847595, 0.17783191800117493, -0.5251873135566711, 0.2835124433040619, 0.2676403820514679, -0.39699432253837585, -0.5590604543685913, 0.034114282578229904, 0.4006405770778656, 0.0427703931927681, 0.12033858150243759, ...
In C# what is the difference between: ``` public static class ClassName {} ``` And: ``` public class ClassName {} ``` A static class cannot be instantiated, and can contain only static members. Hence, the calls for a static class are as: `MyStaticClass.MyMethod(...)` or `MyStaticClass.MyConstant`. A non static cl...
[ -0.22552022337913513, -0.2318129986524582, 0.44747433066368103, 0.09733188897371292, 0.11465992778539658, 0.0685727670788765, -0.24856148660182953, 0.19048668444156647, -0.08602195233106613, -0.10007141530513763, -0.6112703680992126, 0.6495349407196045, -0.2768135666847229, 0.2331330627202...
> See also: [Why is my image rotation algorithm not working?](https://stackoverflow.com/questions/697520/why-is-my-image-rotation-algorithm-not-working) This question isn't language specific, and is a math problem. I will however use some C++ code to explain what I need as I'm not too hot on math. Here's how the imag...
[ 0.038454409688711166, 0.1454489529132843, 0.8108130693435669, -0.007894889451563358, -0.2497873157262802, 0.05409162491559982, -0.041876181960105896, -0.3384578824043274, 0.023258434608578682, -0.6838981509208679, 0.09681085497140884, 0.749022364616394, -0.3895643949508667, -0.254860937595...
backwards. Instead of calculating where each pixel in the input image ends up in the output image, you calculate where each pixel in the output image is located in the input image (by rotationg the same amount **in the other direction**. This way you can be sure that all pixels in the output image will have a value. `...
[ 0.1693650782108307, 0.12139727920293808, 0.6143524646759033, -0.11714011430740356, -0.2720477879047394, 0.4333508312702179, 0.005295760929584503, -0.6394198536872864, -0.4241563379764557, -0.6490362882614136, 0.202884703874588, 0.5934906601905823, -0.4618757665157318, -0.1001412570476532, ...
here it is (rotation of point (x,y) angle degrees/radians): ``` newX = cos(angle)*x - sin(angle)*y newY = sin(angle)*x + cos(angle)*y ```
[ -0.1162298172712326, 0.11999330669641495, 0.6663411855697632, -0.6356662511825562, -0.08168687671422958, -0.021653546020388603, -0.14105866849422455, -0.433350533246994, -0.08065745234489441, -0.5840902924537659, -0.28625205159187317, 0.3192202150821686, 0.13170962035655975, 0.457865089178...
If I have a series of pixels, which range from say -500 to +1000, how would I normalize all the pixels on the same gradient so that they fall between a specific range, say 0 and 255? Some pseudocode like this would scale values linearly from one range to another ``` oldmin=-500 oldmax=1000 oldrange=oldmax-oldmin; new...
[ 0.06865869462490082, -0.028336066752672195, 0.8209532499313354, -0.21624383330345154, 0.16301563382148743, 0.5472579002380371, 0.28177136182785034, -0.5770518183708191, 0.11530525982379913, -0.978349506855011, -0.02299628220498562, 0.5140438079833984, -0.12118156254291534, 0.31758773326873...
Is it possible to limit Google Maps to display only a given country? e.g. I'd only like the UK to be visible in a huge sea of blue. It can be done using overlays, [this](http://maps.forum.nu/gm_texas.html) is the closest example I've seen.
[ 0.3770142197608948, -0.19432523846626282, 0.21123924851417542, 0.045164722949266434, 0.3387271463871002, -0.16829948127269745, -0.017169702798128128, 0.7674847841262817, -0.48454025387763977, -0.33316755294799805, -0.12822820246219635, -0.17939342558383942, -0.3921400010585785, -0.06497452...
I read somewehere (I thought on codinghorror) that it is bad practice to add strings together as if they are numbers, since like numbers, strings cannot be changed. Thus, adding them together creates a new string. So, I was wondering, what is the best way to add two strings together, when focusing on performance? Whic...
[ 0.25241175293922424, 0.1405990719795227, -0.0974096730351448, -0.2551988661289215, -0.36551207304000854, 0.11710205674171448, 0.5002101063728333, -0.25965550541877747, -0.2717934250831604, -0.3905166685581207, -0.023050326853990555, 0.5424239039421082, -0.4594062268733978, 0.15705059468746...
'Hello'; $str2 = 'World!'; $output3 = sprintf('%s %s', $str1, $str2); //Good? //This last one is probaply more common as: //$output = sprintf('%s %s', 'Hello', 'World!'); $str1 = 'Hello '; $str2 = '{a}World!'; $output4 = str_replace('{a}', $str1, $str2); ``` Does it even matter? You are always going to create a new ...
[ -0.09661728888750076, -0.03911580517888069, 0.00031912155100144446, -0.3674333691596985, -0.19442999362945557, 0.10888373106718063, 0.5958330035209656, 0.11525290459394455, -0.12575247883796692, -0.36808347702026367, 0.030493494123220444, 0.22130395472049713, -0.5142391920089722, 0.1074619...
just a few), just make it readable. You are not going to see a performance hit from a low number of them.
[ 0.5216951370239258, -0.1744813472032547, 0.17888207733631134, 0.35818588733673096, -0.14011012017726898, -0.07498998939990997, 0.4273929297924042, 0.220435231924057, -0.013026466593146324, -0.38088515400886536, 0.19508568942546844, 0.8787297606468201, 0.025547035038471222, -0.1623308956623...
I need a free very simple CMS which i can host on my own server just like Cushy CMS www.cushycms.com. is there any ? I recently wrote an alternative to CushyCMS because I wanted the open source community to have a free alternative. [Mechedit](http://code.google.com/p/mechedit/) is an open source CushyCMS like applciat...
[ 0.13951469957828522, -0.044062066823244095, 0.28237104415893555, 0.1988360434770584, -0.4598052203655243, -0.0353858545422554, 0.124081090092659, 0.4581151008605957, -0.36194419860839844, -0.7486048936843872, 0.29086577892303467, 0.28412091732025146, -0.4220763146877289, 0.2206735759973526...
How do I play the "New Mail" system sound in C#? This is also called the "Notify" sound. In Win32, that would be something like ``` sndPlaySound('Notify', (SND_ALIAS or SND_ASYNC)); ``` So how do you do that in .Net? I know that you can do ``` System.Media.SystemSounds.Asterisk.Play(); ``` But there's a very l...
[ 0.30650705099105835, 0.05177237465977669, 0.5868799686431885, -0.23017244040966034, 0.1654570996761322, -0.23908762633800507, 0.16300363838672638, -0.2755263149738312, -0.1080700233578682, -0.8047685027122498, 0.06249971315264702, 1.0780149698257446, -0.33012720942497253, 0.039417043328285...
a system sound, I embedded a wav file into the application as a resource, and played it with `System.Media.SoundPlayer` One option is to just PInvoke directly into the sndSound API. Here is the PInvoke definition for that method ``` public partial class NativeMethods { /// Return Type: BOOL->int ///pszSound: ...
[ -0.07581772655248642, -0.16579018533229828, 0.7233355045318604, -0.06857316195964813, 0.18288682401180267, 0.030375324189662933, 0.2771892249584198, -0.593235433101654, 0.0665331482887268, -0.4665686786174774, -0.2258654087781906, 0.7775869965553284, -0.2503615617752075, 0.5623966455459595...
SND_ALIAS_START -> 0 public const int SND_ALIAS_START = 0; /// SND_RESOURCE -> 0x00040004L public const int SND_RESOURCE = 262148; /// SND_FILENAME -> 0x00020000L public const int SND_FILENAME = 131072; /// SND_ALIAS_ID -> 0x00110000L public const int SND_ALIAS_ID = 1114112; /// SND_...
[ -0.25598928332328796, -0.02788161113858223, 0.2514554262161255, -0.023348107933998108, 0.3298092186450958, 0.14839811623096466, 0.2807292342185974, -0.14416150748729706, -0.14752374589443207, -0.6200605630874634, -0.1862664818763733, 0.6348767280578613, -0.013056815601885319, -0.0072706560...
public const int SND_MEMORY = 4; /// SND_PURGE -> 0x0040 public const int SND_PURGE = 64; /// SND_ASYNC -> 0x0001 public const int SND_ASYNC = 1; /// SND_ALIAS -> 0x00010000L public const int SND_ALIAS = 65536; /// SND_SYNC -> 0x0000 public const int SND_SYNC = 0; /// SND_LOOP -...
[ -0.23479865491390228, 0.01980544626712799, 0.19062554836273193, 0.04307691380381584, 0.21501785516738892, 0.385898232460022, 0.4727541208267212, -0.12491460889577866, -0.2129846215248108, -0.42741143703460693, -0.2986357510089874, 0.5273393392562866, -0.4389352798461914, 0.1426565349102020...
int SND_NODEFAULT = 2; } ```
[ -0.23655939102172852, -0.026889892295002937, 0.09872066229581833, -0.4047340452671051, 0.14656317234039307, -0.2981303334236145, 0.3104139268398285, 0.060762420296669006, -0.1215306967496872, -0.5185717344284058, -0.2316863238811493, 0.36767756938934326, -0.2713131606578827, 0.215009778738...
With a list in Python I can return a part of it using the following code: ``` foo = [1,2,3,4,5,6] bar = [10,20,30,40,50,60] half = len(foo) / 2 foobar = foo[:half] + bar[half:] ``` Since Ruby does everything in arrays I wonder if there is something similar to that. Yes, Ruby has very similar array-slicing syntax to ...
[ 0.07154954969882965, 0.09594815224409103, 0.19165338575839996, -0.44765013456344604, -0.5497276782989502, 0.12584760785102844, 0.11884061247110367, -0.34849777817726135, -0.21020253002643585, -0.20820924639701843, 0.043591003865003586, 0.46299195289611816, -0.43164581060409546, -0.11299706...
-> an_array or nil array[range] -> an_array or nil array.slice(index) -> obj or nil array.slice(start, length) -> an_array or nil array.slice(range) -> an_array or nil ------------------------------------------------------------------------ Element Referen...
[ -0.5271140933036804, -0.3623347878456116, 0.15756899118423462, 0.0722939744591713, -0.3368503451347351, 0.19212861359119415, -0.023066503927111626, -0.062212277203798294, 0.02065679244697094, -0.8063703179359436, -0.5685235261917114, -0.034508246928453445, -0.2227552831172943, 0.1357544958...
subarray starting at start and continuing for length elements, or returns a subarray specified by range. Negative indices count backward from the end of the array (-1 is the last element). Returns nil if the index (or starting index) are out of range. a = [ "a", "b", "c", "d", "e" ] a...
[ -0.1027522087097168, -0.21547426283359528, 0.3602922856807709, -0.16389155387878418, -0.13664384186267853, 0.41498783230781555, 0.3766636252403259, -0.4394722282886505, 0.06061091646552086, -0.36958324909210205, -0.04140504449605942, 0.2471032291650772, -0.4399648606777191, 0.3336926698684...
a[6] #=> nil a[1, 2] #=> [ "b", "c" ] a[1..3] #=> [ "b", "c", "d" ] a[4..7]
[ 0.11925078183412552, 0.10501577705144882, 0.01903827302157879, -0.2620413899421692, -0.3804386854171753, 0.2516074478626251, 0.33538129925727844, -0.3850207030773163, -0.011673307046294212, -0.1450553983449936, -0.45432689785957336, 0.4780842959880829, -0.05094359442591667, 0.0985355377197...
#=> [ "e" ] a[6..10] #=> nil a[-3, 3] #=> [ "c", "d", "e" ] # special cases a[5] #=> nil
[ -0.15397174656391144, -0.038332488387823105, -0.08997511863708496, -0.18528366088867188, -0.16905786097049713, 0.10837382823228836, 0.2083471417427063, -0.27666643261909485, -0.046867210417985916, -0.4245501458644867, -0.5355919003486633, 0.4736337661743164, -0.09786754101514816, -0.064152...
a[6, 1] #=> nil a[5, 1] #=> [] a[5..10] #=> [] ```
[ 0.13244149088859558, 0.1325753629207611, -0.09877607971429825, -0.3737247586250305, -0.3236663341522217, 0.2776351273059845, 0.28322044014930725, -0.2391660511493683, -0.08465056121349335, -0.22909663617610931, -0.2471270114183426, 0.5172203183174133, -0.14260205626487732, 0.20802913606166...
I have an .erb file with form template that uses `form_for` helper to generate form, and some of their fields generated with `text_field` method. In resulting HTML I see `size` properties are added to every input generated with aforementioned method. I want to control input sizes with CSS and that `size` property prev...
[ 0.3702874779701233, 0.16551128029823303, 0.36911216378211975, -0.21197348833084106, -0.2600991725921631, -0.11398198455572128, 0.19137349724769592, -0.14694444835186005, -0.3008895516395569, -0.8510761260986328, 0.0007695769891142845, 0.5233909487724304, -0.37111979722976685, 0.20256876945...
sure if there is an option to remove the size attribute, I've always just ignored it and set the width of input fields with CSS.
[ 0.23955683410167694, -0.07714030146598816, -0.31010839343070984, -0.10777930170297623, -0.239955335855484, -0.036079708486795425, -0.008058595471084118, 0.35908788442611694, -0.4424313008785248, -0.44428399205207825, 0.22216874361038208, 0.533087968826294, -0.11540816724300385, 0.020541969...
I am having a problem running Ant with JDK 1.6 on Mac OS X. Even though Java application versions is set to Java SE 6 in OS X's Java Preference, executing `java -version` in Terminal also shows `java version "1.6.0_07"`, Ant still seems to use JDK 1.5 to be using JDK 1.5 as it does not see JDK 1.6 classes when compilin...
[ 0.09091110527515411, 0.41043806076049805, 0.13846850395202637, -0.4064595699310303, -0.1519903987646103, -0.0777079313993454, 0.41265058517456055, 0.05486593395471573, -0.1324334442615509, -0.8232722878456116, 0.09990216791629791, 0.5557982325553894, -0.5699896812438965, 0.1583593040704727...
Ant runs with JDK 1.6 on Mac OS X. If the correct way is still to set `JAVA_HOME` environment variable, how to set the variable on OS X. The JAVA\_HOME environment variable is set in your home directory's .profile file. (/Users/ejel/.profile ?) Edit it and set it to what you want it to be. E.g.: ``` export JAVA_HOME=/...
[ -0.0350336953997612, 0.11211320757865906, 0.3108169138431549, -0.5379657745361328, -0.07868997007608414, 0.31731390953063965, 0.2970159947872162, 0.11062625050544739, -0.2598806619644165, -1.2064292430877686, 0.16177581250667572, 0.06972024589776993, -0.7175577878952026, 0.0490372590720653...
other software, the export statement could always be run in the terminal manually or go into a script (eg: setj6ev.sh) that is run once before you start running ant tasks.
[ 0.15852680802345276, -0.41445180773735046, -0.055760908871889114, -0.002730241045355797, -0.12972691655158997, -0.021926600486040115, 0.2613174319267273, 0.17368920147418976, -0.26657634973526, -0.5415846109390259, -0.2713579535484314, 0.27854469418525696, -0.4448713958263397, -0.195681810...
I have a few ideas I would like to try out in the Disk Defragmentation Arena. I came to the conclusion that as a precursor to the implementation, it would be useful, to be able to put a disk into a state where it was fragmented. This seems to me to be a state that is more difficult to achieve than a defragmented one. I...
[ 0.5724058747291565, 0.09857137501239777, -0.20441114902496338, 0.30488237738609314, -0.05016849935054779, 0.028091996908187866, -0.28997164964675903, 0.033946532756090164, -0.2862449884414673, -0.3562052249908447, 0.14731696248054504, 0.3574587106704712, 0.2017398327589035, 0.6419660449028...
a defragmenter?** How you can best fragement depends on the file system. In general, concurrently open a large number of files. Opening a file will create a new directory entry but won't cause a block to be written for that file. But now go through each file in turn, writing one block. This typically will cause the ne...
[ 0.5760493278503418, 0.22616223990917206, 0.0713588148355484, 0.016042450442910194, -0.19974079728126526, 0.09905627369880676, 0.5167639851570129, -0.5384387969970703, -0.4102110266685486, -0.47677668929100037, -0.020487390458583832, 0.46715834736824036, -0.11215825378894806, 0.475370496511...
and rename of copy.
[ 0.006771509535610676, 0.29657846689224243, 0.4743826985359192, 0.17398831248283386, 0.024634497240185738, -0.18871524930000305, -0.00780015392228961, 0.2904064357280731, -0.07015496492385864, -0.3723076283931732, -0.5630671381950378, 0.14292748272418976, -0.28931230306625366, 0.40347620844...
I have a file named AttachmentDownload.aspx and inside Page\_Load method have such code which offers to download file. All names work correctly in IE except names which include ";" or "#". They offer user to save the file under name "AttachmentDownload.aspx". Is there a workaround for this? Here is an example: ``` va...
[ 0.010460169985890388, 0.052257172763347626, 0.791395902633667, -0.04830021783709526, -0.1423380821943283, -0.10558371990919113, 0.0888928472995758, -0.3609781265258789, 0.037874575704336166, -1.0120035409927368, -0.24024295806884766, 0.402008593082428, -0.19442561268806458, 0.2730003297328...
If I understand the parallel port right, sending data from (D0 to D7) simultaneous, but that it can control the sticks individually? example: ``` D0 = Input D1 = Input D2 = Output ... ... ... D7 = Input ``` would it work? what I want to do is to both send and receive data simultaneously. This [site](http://www.lvr.c...
[ 0.6328290104866028, 0.09267948567867279, 0.5394423604011536, -0.0932072103023529, -0.15204328298568726, 0.2310187816619873, -0.31708642840385437, -0.21963518857955933, -0.36183714866638184, -0.4083946943283081, 0.2973906695842743, 0.9105804562568665, -0.37372031807899475, 0.044314634054899...
the box. The Parallel port will generally reside at one of three address 278,378, 3BC. This port. have the bytes you are reading or writing. The (base)+1 port allows access to the status bytes. IE. 279,379, 3BD The (base)+2 port allows access to the control bytes. IE. 27A,37A,3BE The parallel port documentation wi...
[ 0.25636956095695496, -0.01922726444900036, 0.6943948268890381, 0.20032788813114166, -0.101605623960495, 0.27060431241989136, 0.03092903271317482, 0.095314621925354, -0.3280348777770996, -0.6244524717330933, 0.05642819032073021, 0.5478641986846924, -0.3447616398334503, 0.10944642871618271, ...
manipulated individual bits of that ports as form of cheap Digital I/O Controller. We did use the status and control bytes as additional inputs and outputs. There were commands you can send to the Parallel Port chip configure the modes precisely. Today there are are hundreds of sites with example of using the Parallel...
[ 0.30150362849235535, -0.23042188584804535, 0.2521628141403198, 0.8115792274475098, -0.03480080887675285, -0.016423702239990234, -0.012320458889007568, 0.18150454759597778, -0.28174832463264465, -0.3938193917274475, 0.33821403980255127, 0.7657456994056702, -0.3320580720901489, 0.22811429202...
is too esoteric for that book it will give a springboard from which you can find the exact setup you need.
[ 0.4009250998497009, -0.11600655317306519, -0.08271849900484085, 0.6062490344047546, 0.36947980523109436, -0.3132120668888092, 0.4269777834415436, -0.04417583718895912, 0.2012031376361847, 0.011131184175610542, 0.22515790164470673, 0.2907146215438843, 0.058663029223680496, -0.18262007832527...
We a have a [GDBM](http://www.delorie.com/gnu/docs/gdbm/gdbm.html) key-value database as the backend to a load-balanced web-facing application that is in implemented in C++. The data served by the application has grown very large, so our admins have moved the GDBM files from "local" storage (on the webservers, or very ...
[ 0.27593961358070374, -0.01658797822892666, 0.4168582856655121, 0.07336318492889404, -0.08736678957939148, -0.22743509709835052, -0.024980710819363594, -0.009361081756651402, -0.14239610731601715, -0.4753416180610657, -0.3502902388572693, 0.2945820689201355, -0.3380802869796753, 0.076473720...
the problem is that the application makes lots of random reads from the GDBM files, and that these are slow over NFS, and this will be even worse in production (where the front-end and back-end have even more network hardware between them) and as our database gets even bigger. While this is not a critical application,...
[ 0.3809146583080292, -0.15808241069316864, 0.0225790124386549, 0.030062977224588394, 0.11391870677471161, -0.3356943428516388, 0.17992714047431946, -0.20863017439842224, -0.25826162099838257, -0.8383139371871948, 0.05950615182518959, 0.6813874244689941, -0.4250390827655792, 0.03937978670001...
My instinct is we wont get much out of this, but I have been wrong before, and I don't really know very much about NFS tuning. 2. Move to a different key-value database, such as [memcachedb](http://memcachedb.org/) or [Tokyo Cabinet](http://tokyocabinet.sourceforge.net/index.html). 3. Replace NFS with some other protoc...
[ 0.2710816562175751, -0.361555278301239, 0.31742677092552185, -0.06898251920938492, -0.22181646525859833, -0.452163428068161, 0.19455276429653168, -0.16943027079105377, -0.3796871602535248, -1.0010297298431396, -0.11840948462486267, 0.36950230598449707, -0.4519062042236328, 0.19187378883361...
accessed over the network**. Crossing that line means you are now better served by a dedicated, network serviced, database management system. Whether the management server manages relational databases isn't relevant for that aspect. For getting it up and running quickly, [MariaDB](https://mariadb.org/) (the successor ...
[ -0.3036686182022095, -0.20171715319156647, 0.562443196773529, 0.3455426096916199, 0.1801941692829132, -0.13117195665836334, 0.28507643938064575, 0.48717549443244934, -0.4785548746585846, -1.0270310640335083, -0.16419096291065216, 0.19241201877593994, -0.05715849623084068, 0.466778606176376...
I have some custom programs I've written to do various maintenance/monitoring tasks that I run periodically (some every few minutes, some as little as once a day). Is it a better practice to run them out of the task scheduler, or to run them as a windows service (triggered by an embedded timer object)? Here's an intere...
[ 0.3856532871723175, 0.024542992934584618, 0.26355305314064026, -0.13089527189731598, 0.018723217770457268, 0.22297325730323792, 0.37001684308052063, -0.03677113726735115, -0.42502233386039734, -0.6184954643249512, 0.005516732577234507, 0.648417592048645, -0.021396882832050323, 0.1072983816...
the same way. Like Martin said [Quartz.NET](http://quartznet.sourceforge.net/) is really powerful for writing scheduled services, and gives you more flexibility than plain scheduled tasks.
[ 0.305108904838562, -0.3461809754371643, -0.09171725064516068, 0.2062671184539795, 0.024269936606287956, -0.17759159207344055, 0.3767833411693573, 0.15881885588169098, -0.26528725028038025, -0.5597139000892639, 0.04797974228858948, 0.6569889783859253, 0.04169151186943054, -0.280500113964080...
I have a method like this: ``` def foo(fruit='apple', cut="sliced", topping="ice cream") # some logic here end ``` How can I call it where I only override the topping parameter but use the default values for the others, something like this ``` foo('','','hot fudge') ``` Of course this does not work as intended,...
[ 0.4373001456260681, 0.48097190260887146, 0.1427091658115387, -0.25332194566726685, -0.11843827366828918, -0.16569951176643372, 0.2019469290971756, 0.10009422898292542, -0.21207556128501892, -0.2644237279891968, 0.08456071466207504, 0.5682618618011475, -0.3644053041934967, -0.03712030872702...
would recommend the hash syntax for this. ``` def foo(args={}) args[:fruit] ||= 'apple' args[:cut] ||= 'sliced' args[:topping] ||= 'ice cream' # some logic here end foo(:topping => 'hot fudge') ``` You could also do this using positional arguments: ``` def foo(fruit=nil,cut=nil,topping=nil) frui...
[ -0.25046437978744507, 0.3020336329936981, -0.006862123031169176, -0.19372017681598663, -0.07672517746686935, 0.32180896401405334, 0.22766607999801636, 0.0943092629313469, -0.29751208424568176, -0.08842125535011292, -0.5492751002311707, 0.7558870315551758, -0.17417645454406738, -0.292761564...
I am making a website with articles, and I need the articles to have "friendly" URLs, based on the title. For example, if the title of my article is `"Article Test"`, I would like the URL to be `http://www.example.com/articles/article_test`. However, article titles (as any string) can contain multiple special charact...
[ 0.7191745638847351, 0.5910449028015137, 0.47899943590164185, -0.03521079570055008, -0.07718557864427567, -0.5332494378089905, 0.2605644464492798, 0.09593356400728226, 0.10694120079278946, -0.5585185289382935, -0.06568170338869095, 0.2940828204154968, -0.17848066985607147, 0.246041521430015...
URI, but do not have a reserved > purpose, are called unreserved. These include uppercase and lowercase > letters, decimal digits, hyphen, period, underscore, and tilde. > > > > ``` > ALPHA DIGIT "-" / "." / "_" / "~" > > ``` Note that RFC 3986 lists fewer reserved punctuation marks than the older [RFC 2396](h...
[ -0.2742609977722168, 0.29766127467155457, 0.37470483779907227, -0.06272177398204803, -0.5969527363777161, 0.30975884199142456, -0.15611158311367035, 0.2729036211967468, 0.1735517829656601, -0.4046492576599121, -0.39736208319664, -0.1888861209154129, -0.19056765735149384, 0.3798695504665375...
I am still new to Ruby and basically just writing my first micro-program after finishing Cooper's book. I was pointed to the direction of avoiding monkey patching but the problem is I don't know what are the alternatives to achieve the same behavior. Basically, I want to add a new method that is accessible by every str...
[ 0.38919442892074585, 0.3291398286819458, -0.05966583639383316, -0.1465560346841812, -0.20326104760169983, -0.10483784228563309, 0.5691391825675964, 0.06660521030426025, -0.2539167106151581, -0.6222999691963196, 0.33104726672172546, 0.4906746745109558, -0.446283221244812, 0.0842565521597862...
me make that method available to the String class and child objects? Any other way of doing this would just be a more awkward syntax for monkey patching. There are ways involving `send` and `eval` and all sorts of things, but *why*? Go ahead and do it the obvious way. You want to be careful of monkey patching in big p...
[ 0.5724044442176819, -0.11828335374593735, -0.2463824301958084, 0.23471906781196594, -0.09292484074831009, -0.064544677734375, 0.5019956827163696, 0.12635084986686707, -0.22694222629070282, -0.6128165125846863, 0.24397946894168854, 0.31081143021583557, -0.29084327816963196, -0.2068671435117...
when you're making changes that could affect code that's not yours. This probably isn't a concern in your particular case. It's just something that might need to be addressed in larger projects. One alternative in Ruby is that you can add methods to a single object. ``` a = "Hello" b = "Goodbye" class <<a def to_sl...
[ -0.029158325865864754, 0.0045978715643286705, 0.1554800420999527, -0.06294839084148407, 0.007898654788732529, -0.028553210198879242, 0.4337156116962433, -0.09834935516119003, -0.23181232810020447, -0.6507728099822998, -0.26459944248199463, 0.2779858708381653, -0.4529147744178772, 0.1117479...
What's the best database admin software for OSX? * maintain database schema and data * run queries * convert schema from one database type to another * datapump to move data around * schema diff tools, ideally able build a script to update a schema * easy to use Databases I'm interested in are * MSSQL * PostgreSQL ...
[ 0.26662445068359375, 0.2991277873516083, 0.06923865526914597, 0.2826900780200958, 0.04333501681685448, 0.10999643802642822, -0.1449902355670929, 0.3234749138355255, -0.09117155522108078, -0.6893360614776611, 0.38417142629623413, 0.3442157506942749, -0.22894927859306335, -0.2871816754341125...
all of what you are asking for.
[ 0.027226123958826065, 0.16020123660564423, 0.0016618508379906416, 0.27701419591903687, -0.2321571260690689, 0.032058220356702805, 0.032725002616643906, -0.22002342343330383, -0.22049133479595184, -0.35558682680130005, 0.10893408954143524, 0.7456440925598145, -0.5708991885185242, 0.36969858...
I am trying to return List< T> from PowerShell function, but get one of: 1. null - for empty list 2. System.Int32 - for list with one element 3. System.Object[] - for list with more elements Code: ``` function CreateClrList { $list = New-Object "System.Collections.Generic.List``1[System.Int32]" $list.Add(3) ...
[ 0.10754059255123138, 0.0989253893494606, 0.46382948756217957, -0.07972531020641327, 0.04619534686207771, -0.06641124188899994, 0.2542153298854828, -0.3440569043159485, -0.06513798981904984, -0.6309623122215271, -0.1582609862089157, 0.5307108759880066, -0.49057456851005554, 0.30155679583549...
I have the following code: ``` delegate int doStuffDel(int instanceNo, int sleepTime, int repeatCount); string result; private int doStuff(int instanceNo, int sleepTime, int repeatCount) { for (int i = 0; i < repeatCount; i++) { Console.Write(instanceNo); Thread...
[ 0.08853994309902191, -0.19939738512039185, 0.5954335927963257, -0.2937361001968384, 0.39162901043891907, 0.03897736594080925, 0.2568885087966919, -0.484913170337677, 0.008770224638283253, -0.7523429989814758, -0.09466895461082458, 0.6113981604576111, -0.06868873536586761, 0.480478137731552...
= instanceNo + " repeated " + repeatCount; return instanceNo; } private void button3_Click(object sender, EventArgs e) { doStuffDel del = doStuff; IAsyncResult ar = del.BeginInvoke(3, 120, 50, finishedCallback, result); } private void finishedCallback(IAsyncResult ar) {...
[ -0.003206564811989665, -0.16347205638885498, 0.5590537786483765, -0.41768789291381836, 0.17825530469417572, 0.40359121561050415, 0.5385007858276367, -0.3929700553417206, -0.28620779514312744, -0.1753978133201599, -0.2653115689754486, 0.7323291301727295, -0.0720745399594307, 0.3228332400321...
passed as the last argument in the call to BeginInvoke, but it's null. Does anybody know why? PS, I know I could pass the del as the last argument in BeginInvoke and then call EndInvoke in the callback, to get some result from the doStuff method, -- or I could just get the string val from the class! -- but I am surpis...
[ -0.13566261529922485, -0.13011403381824493, 0.6572773456573486, -0.14739324152469635, -0.4576500952243805, 0.3177606761455536, 0.1612420380115509, -0.06840077042579651, -0.09064944833517075, -0.5079073905944824, -0.16497457027435303, 0.6837303042411804, 0.0962906926870346, 0.22406435012817...
mean that it's "bound" to the result variable. It's just the value of the `result` variable when you pass it to start with. To see this, either set `result` to some test value before calling `BeginInvoke`, or just pass a string literal instead. Either way, you'll get that value in the callback. On the other hand, you...
[ 0.529910683631897, -0.2857827842235565, 0.03161327913403511, 0.28447243571281433, 0.003607065649703145, -0.5971903204917908, 0.1769258975982666, -0.12799684703350067, -0.09456079453229904, -0.5362681746482849, -0.4194830060005188, 0.42110276222229004, -0.07438186556100845, 0.21068881452083...
I am trying to compile the Python bindings for OpenSSL (pyOpenSSL) on Windows Vista x64 using Visual Studio 2008. When I run `python setup.py build_ext -I C:\OpenSSL\include`, it dies with the following error: ``` building 'OpenSSL.crypto' extension C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\amd64\cl.ex...
[ -0.05166991800069809, 0.6625617146492004, 0.13746732473373413, -0.2545086741447449, 0.04171418771147728, 0.012716858647763729, 0.8844440579414368, -0.28484907746315, 0.1235736757516861, -0.6881104111671448, -0.08718416094779968, 0.3319050371646881, -0.3530915379524231, 0.24793535470962524,...
or not. Since this is a Python library, I would guess that is is written to compile in gcc, but I don't have a Cygwin environment installed on this computer. Is there some switch that I can use to get this code to compile with VS2008? Answer: ------- Later on in the code, there is this: ``` /* * ADD_METHOD(name) ex...
[ 0.19928807020187378, 0.11347677558660507, 0.4249151349067688, -0.008164850994944572, 0.12074258178472519, -0.03912748023867607, 0.11994647979736328, -0.2857842445373535, -0.2218027114868164, -0.4277133643627167, -0.028554504737257957, 0.48904186487197876, -0.3880525827407837, 0.05607952550...
ADD_METHOD(der), ADD_METHOD(get_components), { NULL, NULL } }; #undef ADD_METHOD ``` Going off of the suggestion of Neil Butterworth, I changed the line in error from: ``` static PyMethodDef crypto_X509Name_methods[]; ``` to: ``` static PyMethodDef crypto_X509Name_methods[4]; ``` and the code compiled....
[ 0.21563977003097534, 0.2535359263420105, 0.37673643231391907, -0.22960175573825836, -0.19296778738498688, 0.16759267449378967, 0.13741539418697357, -0.8052539229393005, -0.00394829548895359, -0.22720645368099213, -0.03500664234161377, 0.634183406829834, -0.5590962767601013, 0.0015156989684...
value before calling `BeginInvoke`, or just pass a string literal instead. Either way, you'll get that value in the callback. On the other hand, your callback and original delegate both have the same target object, so you could use use `result` within the callback and it would have the value you want - that's another ...
[ 0.20251215994358063, -0.3231377601623535, 0.1762460619211197, 0.07379981130361557, -0.07806233316659927, -0.10562504082918167, 0.08529866486787796, -0.1369726061820984, 0.08901519328355789, -0.3762686550617218, -0.23738771677017212, 0.5411454439163208, -0.003196104895323515, 0.394342929124...
I need to find a way to stop a while statement when a messagebox is closed in java. I am modifying a chat program, the server has no gui and listens with a while(true) statement. I am trying to find a way to close the server with out going into task manager and killing java.exe. I have little experience with java so so...
[ 0.44227972626686096, -0.1556256264448166, 0.43407920002937317, -0.08018859475851059, -0.16625820100307465, -0.39661508798599243, 0.4414237141609192, 0.1707516461610794, -0.34322649240493774, -0.557433545589447, -0.040615737438201904, 0.8231257200241089, -0.4647739827632904, 0.1899121999740...
not to use HWND\_BROADCAST, but instead to use a HWND from your app's own window](http://blogs.msdn.com/oldnewthing/archive/2006/06/13/629451.aspx). You don't say what language you're using, but if it's C# or VB.NET, there are plenty of samples about demonstrating how to call this from those languages.
[ 0.5941630601882935, 0.033590611070394516, 0.22370444238185883, -0.09721818566322327, -0.0834374725818634, -0.39487046003341675, 0.30613893270492554, 0.3391575813293457, -0.32344791293144226, -0.7132121324539185, -0.5231057405471802, 0.5661104321479797, -0.3936297595500946, -0.0595391392707...
I've used the command-line switches for installing a Firebird database from within the install package for my application. But now I'd like to uninstall Firebird in the same way. The problem is that the Windows install executable for Firebird was built with Inno Setup. In order to uninstall an Inno Setup executable, ...
[ 0.46381667256355286, 0.24025125801563263, 0.15537144243717194, -0.348975270986557, -0.013946766965091228, -0.03146796673536301, 0.19994822144508362, -0.10681752115488052, 0.10192787647247314, -0.9142118096351624, -0.09304824471473694, 1.199947714805603, -0.4099157750606537, 0.0778937712311...
version. (I need concurrent user access for this application.) HKLM\Software\Microsoft\Windows\Currentversion\Uninstall\ with example like {350C97B0-3D7C-4EE8-BAA9-00BCB3D54227} Under that you will find a key named "UninstallString" you should be able to just execute that and uninstall. Some programs are listed by na...
[ -0.3620341122150421, -0.09688958525657654, 0.6630487442016602, -0.003824763698503375, 0.02352193184196949, -0.27937284111976624, 0.5340614318847656, 0.24516701698303223, -0.26015394926071167, -0.5990076661109924, -0.4590000808238983, 0.5124126672744751, -0.4839579164981842, 0.5243892669677...
I am looking for an easy way to convert some XAML animation to C# code. Is there any tool available to do that? Thanks! Wally This is the code I am trying to convert: ``` <Storyboard x:Key="Storyboard1"> <Rotation3DAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="DefaultGroup" Story...
[ 0.2590487003326416, -0.013234438374638557, 0.6780213713645935, 0.21748821437358856, -0.15824688971042633, -0.01255719643086195, 0.048283036798238754, -0.15076039731502533, -0.24470028281211853, -0.8968920111656189, 0.1358882188796997, 0.5557006001472473, 0.06598345935344696, 0.146230340003...