text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
color.G -= 10; color.B -= 10; brush.Color = color; } } ``` It's not as pretty, but it's the best I can come up with right now.
[ 0.07087909430265427, 0.13334301114082336, 0.21066249907016754, -0.3114500045776367, 0.022468795999884605, 0.3443251848220825, 0.3219708800315857, -0.29265302419662476, 0.013956508599221706, -0.6338379979133606, 0.043214309960603714, 0.6180657148361206, -0.28789839148521423, -0.130236193537...
I am passing a boolean value to a javascript function in my .net mvc action page. problem is, it is outputting the value True and javascript apparently only accepts 'true' (in lower case). I don't want to hack the variable and make it a string and convert it to lower case in my action, but it looks like I have no cho...
[ 0.36223575472831726, 0.21364787220954895, 0.3289259374141693, -0.24619075655937195, -0.18013103306293488, -0.21746832132339478, 0.5258046388626099, -0.14786100387573242, -0.04224177449941635, -0.22816582024097443, -0.13885347545146942, 0.644170880317688, -0.4381571114063263, 0.147926613688...
value. **EDIT:** Note the difference between: ``` <script type="text/javascript"> var myBoolean = <%= (myBoolean ? "true" : "false") %>; </script> ``` and ``` <script type="text/javascript"> var myBoolean = '<%= (myBoolean ? "true" : "false") %>'; </script> ``` In the first example, you end up with: ``` var my...
[ 0.008504749275743961, 0.4416274130344391, 0.19250820577144623, -0.2771316468715668, 0.3018825948238373, 0.043240223079919815, 0.4576307535171509, -0.09955523908138275, 0.21616065502166748, -0.4101797044277191, -0.4401453733444214, 0.5761540532112122, -0.2804561257362366, -0.128710284829139...
How do I swap left and right mouse buttons in .NET (preferably C#)? Basically the result should be the same as if the user checked the "Switch primary and secondary buttons" checkbox in the Mouse Properties through the control panel. I'm dealing with Windows XP, in case that makes a difference. You can use a Windows AP...
[ 0.26428619027137756, -0.4445115923881531, 0.5778616070747375, -0.11177407950162888, 0.37165459990501404, -0.3080042600631714, -0.08452732115983963, -0.11522660404443741, -0.19523797929286957, -0.8058069348335266, -0.15414713323116302, 1.103595495223999, -0.27848243713378906, -0.12768445909...
I have 3 entities * Printer * Server * Driver The Printer has Server and Driver properties Somwhere in my code I've set up an IEnumerable<Printer> where each instance of printer holds it's own Server and Driver entities. Now when I'm trying to submit it to the db, I'm using following code: ``` foreach (Printer p i...
[ 0.13030624389648438, 0.36223626136779785, 0.8946700096130371, -0.14143991470336914, -0.24592526257038116, 0.4400864839553833, -0.1495787501335144, -0.5089343190193176, -0.36736801266670227, -0.8563398718833923, 0.16068658232688904, 0.4685635566711426, -0.3363748788833618, 0.397927641868591...
each Printer object, and a single record for each unique Driver and Server name. But actual result is quite wired. Code above produces a single record for each unique Driver object, but for no obvious reason creates more than one record for each unique Server. And all Printer records point to single Server record. Fu...
[ 0.2599942684173584, 0.21137061715126038, 1.0293292999267578, 0.1101740151643753, -0.20032328367233276, 0.12807250022888184, -0.37174150347709656, -0.14734765887260437, -0.5859826803207397, -0.7234383225440979, 0.3031054735183716, 0.5617144703865051, -0.33013081550598145, 0.0979923307895660...
looking for something like this: ``` NSMutableArray *array = [[NSMutableArray alloc] init]; while(foo) { // create your string [array addObject:string]; } ```
[ -0.05651864781975746, -0.2108609974384308, 0.26589667797088623, -0.1631905883550644, 0.03404499217867851, -0.0792442336678505, 0.3397383689880371, -0.16636571288108826, -0.24316290020942688, -0.4549201726913452, -0.010444337502121925, 0.6104313135147095, -0.4282190501689911, 0.114784061908...
I want to call an URL in the unload-Function of a Webpage but in the unload-function the get request is not working. My code looks like this: ``` $(window).unload( function () { jQuery.get("someurl") } ); ``` We want to be informed about the closing of the window for some logging of user actions. Is it possible ...
[ 0.3163664937019348, 0.03647773340344429, 0.3405362367630005, -0.06885647028684616, -0.15986602008342743, -0.33605167269706726, 0.3061879277229309, 0.2976105809211731, -0.07031626254320145, -0.7272459864616394, -0.18942277133464813, 0.5294956564903259, -0.14838343858718872, -0.0996188968420...
Can I have a great list of common C++ optimization practices? What I mean by optimization is that you have to modify the source code to be able to run a program faster, not changing the compiler settings. Two ways to write better programs: **Make best use of language** 1. Code Complete by Steve McConnell 2. Effectiv...
[ -0.1316038966178894, 0.2560271620750427, -0.13392309844493866, 0.18437832593917847, 0.07395964115858078, 0.006258251145482063, 0.38488465547561646, -0.14514559507369995, -0.15235744416713715, -0.9464252591133118, -0.027049995958805084, 0.6310170888900757, -0.0703074261546135, -0.7561190724...
The main benefit comes from #2 above.
[ 0.043169762939214706, 0.17638206481933594, 0.35021740198135376, 0.15251310169696808, 0.04763114079833031, -0.2885664105415344, -0.16758406162261963, 0.04035843536257744, -0.32830601930618286, -0.6242970824241638, 0.001895005232654512, 0.6771641373634338, 0.27647867798805237, 0.143800124526...
Say I have: ``` int someValue = 42; ``` Now I want to convert that int value to a String. Which way is more efficient? ``` // One String stringValue = Integer.toString(someValue); // Two String stringValue = String.valueOf(someValue); // Three String stringValue = someValue + ""; ``` I am just curious if there ...
[ -0.23625873029232025, 0.23760537803173065, 0.39112287759780884, -0.31909066438674927, -0.15236151218414307, 0.36156654357910156, 0.12201469391584396, -0.40693652629852295, -0.17050713300704956, -0.567768931388855, 0.20617429912090302, 0.6068260669708252, -0.2314930260181427, 0.002471014391...
win Edit: JVM is standard '/usr/bin/java' under Mac OS X 10.5 ``` java version "1.5.0_16" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_16-b06-284) Java HotSpot(TM) Client VM (build 1.5.0_16-133, mixed mode, sharing) ``` More edit: Code as requested ``` public class One { public static void m...
[ -0.09786003828048706, 0.13293789327144623, 0.5780543684959412, -0.29808172583580017, -0.20930306613445282, -0.08508801460266113, 0.18488718569278717, -0.41681957244873047, 0.05395840108394623, -0.49911704659461975, -0.3253825306892395, 0.8525586724281311, -0.26784786581993103, 0.0833193585...
run using ``` javac *.java; time java One; time java Two; time java Three ```
[ 0.30495935678482056, -0.012243681587278843, 0.0005151451332494617, -0.1645110696554184, 0.11859257519245148, -0.008211825974285603, 0.7879534363746643, -0.10046416521072388, -0.08198491483926773, -0.5346407294273376, -0.2124921977519989, 0.4269547760486603, -0.6235749125480652, -0.10221926...
``` for (int z = 0; z < alParmValues.Count; z++) { asd.Add((alParmValues[z].ToString().Split(',')));// asd is list<string> def.Add(alMethSign[z].ToString().Substring(alMethSign[z].ToString().IndexOf('(') + 1, alMethSign[z].ToString().IndexOf(')') - (alMethSign[z].ToString().IndexOf('(') + 1)).Split(','));// de...
[ -0.05285077914595604, 0.2637454569339752, 0.4203284978866577, -0.3001430034637451, 0.12623915076255798, 0.043136585503816605, 0.66570645570755, -0.6180019378662109, -0.23399552702903748, -0.3896614611148834, -0.3955747187137604, 0.7196348309516907, -0.6266679763793945, 0.07927962392568588,...
a `string` as input, because you're handing it the return of `Split()` which returns a `string[]`. To use a `string[]` as input, use `AddRange()`.
[ 0.0311843641102314, -0.2264183908700943, -0.15629489719867706, -0.22581452131271362, -0.06667555868625641, 0.004932486452162266, -0.1777103990316391, -0.09716182202100754, -0.014141589403152466, -0.26351791620254517, -0.6663342714309692, 0.6040063500404358, -0.4066958725452423, 0.035056862...
In Eclipse source code, I've found some '$NON-NLS-1$' in comments used like that : ``` private String toolTip = ""; //$NON-NLS-1$ ``` What does that mean ? They silence a warning that Eclipse emits when it encounters string literals (and has been configured to complain). The idea is that UI messages should not be e...
[ 0.5428994297981262, 0.17871150374412537, 0.07630623877048492, -0.1442205309867859, -0.38761377334594727, -0.3334948420524597, 0.2179512083530426, 0.1546734869480133, -0.018650326877832413, -0.48908331990242004, -0.14693668484687805, 0.6270641684532166, -0.3210138976573944, -0.2087562680244...
regexps) and so, //$NON-NLS-1$ gives you a way to communicate that fact to the compiler.
[ 0.3070511221885681, -0.15114223957061768, 0.19476504623889923, 0.1266101449728012, 0.1714148372411728, -0.05241833254694939, 0.38813015818595886, 0.1896972954273224, -0.2256452441215515, -0.44279029965400696, -0.07621622085571289, 0.4779645502567291, -0.3898213505744934, -0.116506047546863...
I have some Javascript that is opening a blank window, assigning it with a stylesheet and then writing some text to it. This is all working fine except that the content is not having the styles applied to it. The code looks like this: ``` var newWindow = window.open('', 'SecondWindow', 'toolbar=0,stat=0'); var style...
[ 0.5313861966133118, 0.31313765048980713, 0.747959315776825, -0.21626058220863342, 0.10156543552875519, -0.19432790577411652, 0.29767531156539917, -0.5125475525856018, 0.026672067120671272, -0.8503764867782593, -0.20628468692302704, 0.6174423694610596, -0.10810118168592453, -0.0335911102592...
doing something to force the browser to apply the styles or re-render the page somehow. Any suggestions? Edited to add, the generated source looks like this: ``` <html> <head> <title></title> <link href="styles/style.css" rel="stylesheet" type="text/css"> <head> <body> <p class='verystylish'>Hello w...
[ 0.3778756856918335, -0.056237850338220596, 0.7530243992805481, 0.018545057624578476, -0.19967691600322723, -0.19572634994983673, 0.37711384892463684, 0.040098197758197784, -0.12410389631986618, -0.7782780528068542, -0.3334496319293976, 0.30828434228897095, -0.26169779896736145, 0.061544064...
document, call: ``` newWindow.document.open(); ``` You should then write the skeleton of the document you want to the window. You can include the stylesheet now if you want, as document.write is a more reliable way of adding a stylesheet across older browsers than DOM methods. This method also allows you to write a ...
[ 0.2026699334383011, -0.005066736601293087, 0.8278120160102844, -0.11477933079004288, 0.06258942186832428, -0.370336651802063, 0.15153247117996216, -0.5302102565765381, -0.3734176456928253, -0.6115851402282715, -0.3278157413005829, 0.7029752731323242, -0.05610169097781181, 0.154722407460212...
I am writing a networked application in Java, to communicate between the client and the server I am using serialized objects to represent data/commands and sending them through object output/input streams. I am having problems cleanly closing the connections, I assume that I am missing something fundamental that I do ...
[ 0.06270419806241989, 0.20414377748966217, 0.2949528098106384, -0.031811945140361786, -0.20758551359176636, -0.23806047439575195, 0.26876378059387207, 0.17034579813480377, -0.30116721987724304, -0.7134270071983337, -0.013357730582356453, 0.5235629677772522, -0.4830946922302246, 0.4299024045...
messages, this must be done, as in Java `socket.read()` is a blocking method. What is the correct way to close a socket that I am using to send objects? You need to send your listener (whether client or server, it doesn't matter) some kind of signal to stop listening for more data. Here is a very simple example: ``` ...
[ 0.24214743077754974, -0.16228187084197998, 0.5741127729415894, -0.1900160312652588, -0.0018414511578157544, -0.10151871293783188, 0.8209556341171265, 0.07269515842199326, -0.1686669886112213, -0.651359498500824, -0.1944417506456375, 0.6557983160018921, -0.6049869060516357, 0.20454469323158...
} } // handle object } ois.close(); sock.close(); ```
[ 0.04184262454509735, 0.1681908667087555, 0.353681743144989, -0.35506579279899597, 0.22668036818504333, -0.07258596271276474, 0.4345691502094269, 0.13272009789943695, -0.03945471718907356, -0.6259737610816956, -0.25533831119537354, 0.43084782361984253, -0.378823846578598, 0.4445352852344513...
Here's a piece of code: ``` $obj = new myClass(); $obj->{$_GET["func"]}($_GET["param"]) ``` It works based on variable variables, but I don't really understand how. As far as I know, variable variables are used for stuff like this: ``` require "dbsettings.php" $member_id = $_GET['id']; $db = new DBconnector(); $var...
[ 0.10338925570249557, 0.09958653897047043, 0.3727523982524872, -0.17464466392993927, -0.11765430122613907, 0.06259945034980774, 0.2697724401950836, -0.6010339260101318, -0.13262775540351868, -0.21242721378803253, -0.4017851650714874, 0.2950240671634674, -0.5478161573410034, 0.12758697569370...
also use parentheses in strings for similar purposes, e.g. `echo "calling {$_GET['func']}";` See the [PHP manual page on variable variables](http://uk.php.net/manual/en/language.variables.variable.php) for more, e.g. > In order to use variable variables > with arrays, you have to resolve an > ambiguity problem. Tha...
[ -0.11809394508600235, 0.05137438327074051, 0.08921901136636734, -0.04412256181240082, -0.3792853057384491, -0.099363774061203, 0.11119086295366287, -0.3703175485134125, -0.1269199252128601, -0.2915921211242676, -0.2984553873538971, 0.7691864371299744, -0.4917425811290741, -0.24753858149051...
second. **A note on security** As this is the accepted answer, I'm going to add that you shouldn't use user input so blindly, there may be methods on $obj which you wouldn't want be called. You could, for example, check the method name against an array of allowed methods, e.g. ``` $method=$_GET["func"]; $ok=in_arra...
[ -0.17097529768943787, 0.04087014123797417, 0.15176425874233246, 0.002653774106875062, -0.22875094413757324, -0.3480153977870941, 0.11117970198392868, -0.11336588859558105, -0.16067321598529816, -0.3770900070667267, -0.2988746464252472, 0.4641208350658417, -0.44835132360458374, -0.114268764...
a basic tenet: *assume your worst enemy constructed the `$_GET` array!*
[ 0.15604810416698456, 0.20480488240718842, -0.30024516582489014, -0.05244405195116997, 0.012014920823276043, -0.23488318920135498, 0.5548878312110901, 0.09737779945135117, -0.07584580034017563, -0.36879613995552063, -0.43917614221572876, 0.5480131506919861, -0.2651216685771942, -0.262374192...
I receive a file that contains the following: ``` \direcotry1\directory2\directory3\file1 \direcotry1\file2 \direcotry1\directory2\directory3\directory4\file3 \direcotry1\file4 \direcotry1\directory2\file5 file6 ``` The amount of files in the file and the amount of directories are variable. What I need is the path ...
[ 0.27124717831611633, 0.2867036461830139, 0.42961013317108154, -0.08168414980173111, -0.2849884331226349, 0.1415400207042694, 0.5831000208854675, -0.2906920611858368, 0.16052007675170898, -0.5598919987678528, -0.1589268147945404, 0.7042204141616821, -0.39853018522262573, 0.00342495180666446...
the batfile returns \cft\? I want the bat to return nothing when there's no path. Thanks a lot in advance for your help. After doing some testing, it appears that `"%%~pi"` will prefix the current directory to every element that does not start with `"\"`. I gather that it assumes this is the case since that would be t...
[ 0.31481778621673584, 0.0825374573469162, 0.37828952074050903, -0.17141856253147125, -0.432258278131485, 0.0067669423297047615, 0.528580367565155, -0.4286973178386688, -0.03207727149128914, -0.7636626958847046, -0.01149376854300499, 0.7197876572608948, -0.4436386823654175, 0.021055782213807...
Settings\Administrator directory): ``` \directory1\directory2\directory3\ \directory1\ \directory1\directory2\directory3\directory4\ \directory1\ \directory1\directory2\ \Documents and Settings\Administrator\ \Documents and Settings\Administrator\x\ \ ``` So the answer is simple. Detect first those lines that don't ...
[ -0.00926869548857212, -0.009185855276882648, 0.7021552920341492, -0.0609787255525589, 0.39011672139167786, 0.027360539883375168, 0.31484255194664, -0.6132789850234985, 0.18966151773929596, -0.525962233543396, -0.42693233489990234, 0.6504642963409424, -0.42149075865745544, -0.11038287729024...
leaking up one level and delayed expansion is brilliant (using `"!"` instead of `"%"`). I use a ch0 temporary variable to get the first character of the file (`"!ch0:~0,1!"` is a substring operator, "get one character at offset 0 of ch0 variable", and you can use the `"%"` version as well if you're not doing delayed e...
[ 0.5026708245277405, -0.013862128369510174, 0.3319534957408905, 0.024843761697411537, 0.2016139179468155, 0.2522672414779663, -0.027287522330880165, -0.04254055768251419, 0.15271849930286407, -0.5576547384262085, 0.038319315761327744, 0.7569326758384705, -0.05144358053803444, 0.311753779649...
Apparently Mac keyboards don't have an `Insert` key (or maybe they do but I can't find it). How can I get to insert mode in **vim** on a Mac? If this is as simple a question as it seems, you merely press `i`.
[ -0.05252839997410774, 0.20537954568862915, 0.5232051610946655, -0.08571478724479675, 0.3636103570461273, -0.10397429764270782, 0.21845649182796478, 0.3047381639480591, -0.011452050879597664, -0.4117436707019806, -0.17175796627998352, 1.0969579219818115, -0.19942745566368103, 0.031255371868...
Whats the difference between 12 mtd , 12 mtd rolling and ytd calculation 12 mtd goes back 12 months, whereas a ytd is from the first day of the current year (calendar, fiscal, whatever) to the current day.
[ 0.7000185251235962, -0.13421174883842468, 0.6158723831176758, 0.3767963945865631, -0.05600176751613617, 0.20246531069278717, 0.249088317155838, 0.28584378957748413, -0.12359174340963364, -0.04304133355617523, 0.05851071700453758, 0.2254653126001358, 0.5939399600028992, 0.005555317737162113...
I'm switching back and forth between Java and C# and one thing I miss while I'm coding in C# is the enforced exception checking (Although I admit I also find it really irritating sometimes while I'm coding in Java). I'm aware that [Exception Hunter](http://www.red-gate.com/products/Exception_Hunter/index.htm) can help...
[ 0.6440570950508118, 0.2904227674007416, -0.16274842619895935, -0.10345889627933502, -0.2754984200000763, -0.16346384584903717, 0.4569935202598572, -0.021624628454446793, -0.17542880773544312, -0.6264461278915405, 0.07215146720409393, 0.4302799701690674, -0.07949266582727432, -0.10046066343...
thrown.
[ -0.11602199077606201, 0.3751940131187439, -0.5510164499282837, 0.22017423808574677, -0.793665885925293, -0.5404104590415955, 0.067020483314991, -0.10223928093910217, -0.35061100125312805, -0.5231335759162903, -0.04018726199865341, 0.1719381958246231, -0.1767701804637909, 0.3404767215251922...
I have become interested in C-like languages for performance computing. Can you recommend some alternative programming languages which have the following attributes: * must be close to the hardware (bit fiddling, pointers or some alternative safe method like references) * no managed code (no jvm/.net languages) * has ...
[ 0.5283878445625305, 0.2405090183019638, -0.20251508057117462, 0.16090714931488037, -0.08542564511299133, -0.089506134390831, 0.162400022149086, 0.498909592628479, -0.1998591125011444, -0.6383169889450073, -0.13897070288658142, 0.5614063143730164, -0.05210820958018303, -0.04333237558603287,...
I'm using FitNesse as a functional testing framework. I'm running into trouble when FitNesse runs code that needs configuration. If I need to get a connection string from the configuration file, I can get it to work by adding it to the FitServer.exe.config. However, I don't like that solution. I would like FitNesse to...
[ 0.840562105178833, -0.3927343785762787, 0.01330481469631195, 0.08826057612895966, 0.1774829477071762, -0.24274466931819916, 0.3202524483203888, -0.3873840570449829, 0.08923229575157166, -1.056479811668396, 0.3212805688381195, 0.6904910802841187, -0.5848188400268555, 0.03824407979846001, ...
have the following in root: ``` !define COMMAND_PATTERN {%m -c suite.config %p} !define TEST_RUNNER {..\..\bin\Debug\FitServer.exe} ``` suite.config goes in the same dir as fitnesse.jar: ``` <suiteConfig> <fit.Settings> <appConfigFile>..\..\MyProjectFolder\fitnesse\MyProjectName.config</appConfigFile> ...
[ 0.22529704868793488, 0.13342735171318054, 0.2506962716579437, -0.17571263015270233, 0.23262770473957062, 0.03229116275906563, 0.18690556287765503, -0.8615717887878418, -0.01611914113163948, -0.8712981343269348, -0.21661704778671265, 0.2645898461341858, -0.3532979190349579, -0.0399234704673...
<add key="keyname" value="something" /> </appSettings> </configuration> ``` You can make things easier for yourself if you use an absolute path for the appConfigFile. I started off with an absolute path, got things working, then switched to a relative path by trial and error. Note that I'm running my test runne...
[ 0.05066469684243202, -0.11463052034378052, 0.5523892045021057, -0.05536560341715813, 0.2917243540287018, -0.036581143736839294, 0.6133002042770386, -0.26108911633491516, 0.17381569743156433, -0.9775658845901489, 0.0650377944111824, 0.8723524808883667, -0.14908163249492645, -0.1544411629438...
I have the following snippet of Javascript, which is just attaching an onclick to a button and then updating the text of an em tag underneath it. I'm slowly trying to educate myself and work with jQuery more as I've found to like the syntax a lot more and for some tasks, it's more of a pleasure to work with. Some of t...
[ 0.33950531482696533, 0.2537578344345093, 0.5131184458732605, -0.0806540846824646, 0.2791029214859009, 0.2648601830005646, -0.04175291582942009, -0.166815385222435, -0.5246036052703857, -0.8818291425704956, 0.07584499567747116, 0.5853534936904907, -0.4032052457332611, -0.03430873528122902, ...
}; }); ``` Thanks! Here is a line by line translation from your prototype code. Not a lot different: ``` $('em.green').each(function(i, em) { $(em).closest('button').click(function() { $(em).html('Saving...') }) }); ``` IMO the prototype version looks just as nice if not nicer (without `$` sprin...
[ -0.12105727940797806, -0.28542444109916687, 0.6675124764442444, -0.06704863160848618, 0.13233397901058197, 0.33076566457748413, 0.15759196877479553, 0.1581815481185913, 0.024134347215294838, -0.9632275700569153, -0.29506921768188477, 0.3477288782596588, -0.4847661852836609, 0.0933540239930...
I'm using the driver I posted at [Direct Memory Access in Linux](https://stackoverflow.com/questions/647783/direct-memory-access-in-linux/) to mmap some physical ram into a userspace address. However, I can't use GDB to look at any of the address; i.e., x 0x12345678 (where 0x12345678 is the return value of mmap) fails ...
[ 0.047298770397901535, 0.41852882504463196, 0.205159530043602, -0.2603920102119446, -0.054488785564899445, 0.13956131041049957, 0.4051014482975006, -0.03757175803184509, -0.34440991282463074, -0.6954114437103271, 0.013152964413166046, 0.8523473739624023, -0.24884924292564392, 0.223275005817...
(as in the first snippet there) but about a mmap to memory acquired via ioremap(), virt\_to\_phys() and remap\_pfn\_range() I believe Linux does not make I/O memory accessible via ptrace(). You could write a function that simply reads the mmap'ed address and have gdb invoke it. Here's a slightly modified version of you...
[ 0.24223341047763824, -0.06022903695702553, 0.3563293218612671, -0.3049423098564148, 0.016215240582823753, 0.14451847970485687, 0.24294452369213104, -0.34492555260658264, -0.08816123753786087, -0.5134508013725281, -0.18970979750156403, 0.8328030109405518, -0.5533214211463928, -0.18567737936...
printf("open error...\n"); return 1; } mptr = mmap(0, 1 * 1024 * 1024, PROT_READ | PROT_WRITE, MAP_FILE | MAP_SHARED, fd, 4096); printf("On start, mptr points to 0x%lX.\n", (unsigned long) mptr); printf("mptr points to 0x%lX. *mptr = 0x%X\n", (unsigned long) mptr, *mptr);...
[ -0.6590442657470703, -0.0024709489662200212, 0.4725133776664734, -0.4949294626712799, 0.14989489316940308, 0.6368970274925232, 0.4354258179664612, -0.5089113712310791, -0.3152284622192383, -0.46599072217941284, -0.6778925657272339, 0.5503398776054382, -0.6168804168701172, -0.27061375975608...
printf("mptr points to 0x%lX. *mptr = 0x%X\n", (unsigned long) mptr, *mptr); close(fd); return 0; } $ make foo-user CFLAGS=-g $ gdb -q foo-user (gdb) break 27 Breakpoint 1 at 0x804855f: file foo-user.c, line 27. (gdb) run Starting program: /home/me/foo/foo-user On start, mptr points to 0xB7E1E000. ...
[ -0.21956899762153625, 0.2022658735513687, 0.7178745269775391, -0.6721832156181335, 0.011762911453843117, 0.3467022776603699, 0.5733881592750549, -0.34548869729042053, -0.1414370834827423, -0.2407926321029663, -0.44614943861961365, 0.46011489629745483, -0.7896506190299988, 0.168066278100013...
'b' ```
[ 0.6332426071166992, 0.8720299601554871, 0.13120853900909424, -0.2702859342098236, -0.04050309211015701, 0.040788497775793076, 0.15273010730743408, 0.1876935362815857, -0.09424193948507309, -0.14789414405822754, -0.30522799491882324, 0.32317498326301575, -0.12239006161689758, 0.269021332263...
I have got two timevalues in the format: %H%M%S (E.G.161500) These values are text-based integers. Is there a simple function in Cocoa that calculates the difference between these two integers using a 60 seconds and minutes scale? So if ``` time 1 = 161500 time 2 = 171500 timedifference = 003000 ``` ``` NSDateFor...
[ 0.17544475197792053, 0.04944983497262001, 0.7232158780097961, -0.11903616786003113, -0.11431482434272766, 0.2151975780725479, 0.13609343767166138, -0.26597264409065247, -0.1920335739850998, -0.591857373714447, -0.058509163558483124, -0.028515582904219627, 0.21221178770065308, 0.48726406693...
What is the order in which the destructors and the constructors are called in C++? Using the examples of some Base classes and Derived Classes **The order is:** 1. Base constructor 2. Derived constructor 3. Derived destructor 4. Base destructor **Example:** ``` class B { public: B() { cout<<"Construct B"<<...
[ 0.07719429582357407, -0.0777096152305603, 0.2832852900028229, -0.2697924077510834, -0.03544666990637779, 0.3645232021808624, 0.05988394841551781, -0.3680564761161804, 0.020743174478411674, -0.40107542276382446, -0.5464785695075989, 0.6275874376296997, -0.3924909234046936, 0.351524382829666...
0; } ``` **Output of example:** > Construct B > > > Construct D > > > Destruct D > > > Destruct B **Multiple levels of inheritance works like a stack:** If you consider pushing an item onto the stack as construction, and taking it off as destruction, then you can look at multiple levels of inheritance like ...
[ 0.05369541049003601, 0.042376045137643814, 0.10675570368766785, 0.02583225443959236, -0.12949638068675995, 0.07692105323076248, 0.1363048404455185, -0.6648666262626648, -0.3394307792186737, -0.7988555431365967, -0.4707240164279938, 0.3391679525375366, -0.14420302212238312, 0.40541428327560...
complicated examples:** For more complicated examples, please see the link provided by @JaredPar
[ 0.5892927050590515, 0.3963681161403656, -0.05215249955654144, -0.3017222285270691, -0.24763290584087372, 0.18584421277046204, 0.4143560826778412, 0.3144564926624298, -0.7779479026794434, -0.23013977706432343, -0.18433737754821777, 0.3095589280128479, -0.1356353610754013, 0.2173015177249908...
The BrowserCaps setting is rather quite long. Is there a way to factor it into an external config file. does anyone know the markup? 1. Create a new web.config file in your project and call it browserCaps.config 2. Paste the XML of the latest browserCaps (<http://owenbrady.net/browsercaps/CodeProject.xml>) into this n...
[ 0.27349787950515747, 0.344758003950119, 0.5782341957092285, -0.36454951763153076, 0.06943799555301666, -0.167581245303154, -0.03734920546412468, -0.27870458364486694, -0.42128926515579224, -0.8103125691413879, 0.03852437064051628, 0.39423370361328125, -0.3366695046424866, -0.17019243538379...
> **Possible Duplicate:** > > [How to find out if a .NET assembly was compiled with the TRACE or DEBUG flag](https://stackoverflow.com/questions/629674) > **Possible Duplicate:** > > [How to idenfiy if the DLL is Debug or Release build (in .NET)](https://stackoverflow.com/questions/798971/how-to-idenfiy-if-the-d...
[ 0.3352866768836975, 0.18994469940662384, -0.11474306881427765, -0.05537124350667, 0.11875069886445999, -0.2013959288597107, 0.4906878173351288, -0.24139593541622162, -0.5045344233512878, -0.500645637512207, -0.03556837514042854, 0.45413458347320557, -0.46477386355400085, 0.0330077186226844...
int sum = data[0]; for (int i= 1; i < data.Length; i++) { sum += data[i]; } ``` Or if you want to do certain checks on debug versions of functions you could do it like this: ``` public int Sum(int[] data) { Debug.Assert(data.Length > 0); int sum = data[0]; for (int i= 1; i < data.Length; i++) ...
[ 0.1269606053829193, -0.2393587827682495, 0.365828275680542, -0.22408710420131683, -0.226896271109581, -0.08213305473327637, 0.5284150838851929, -0.8635475635528564, 0.2143389731645584, -0.2863369584083557, -0.3088114857673645, 0.6596479415893555, -0.31796106696128845, 0.19658692181110382, ...
Note that I'm not actually doing anything with a database here, so ORM tools are probably not what I'm looking for. I want to have some containers that each hold a number of objects, with all objects in one container being of the same class. The container should show some of the behaviour of a database table, namely: ...
[ 0.2938458025455475, 0.008745958097279072, -0.042569439858198166, 0.22674813866615295, 0.07428588718175888, -0.19931335747241974, -0.019902663305401802, -0.17584000527858734, -0.3182727098464966, -0.3997703492641449, -0.010414829477667809, 0.3906870186328888, -0.049029067158699036, 0.183352...
that is returned to the caller of the insertion method. Instead of throwing an error when a "duplicate entry" is being requested, the container should just skip insertion and return the key of the already existing object. Now, I would write a generic container class that accepts objects which implement an interface t...
[ -0.09518145769834518, -0.13386845588684082, 0.11323023587465286, 0.19042441248893738, 0.022539334371685982, 0.008137151598930359, -0.03585352003574371, -0.10445582866668701, -0.024295125156641006, -0.3900254964828491, -0.06756936758756638, 0.4559743106365204, -0.29920342564582825, 0.327721...
what you need. You'll have to write your own! P.S. You'll also need to decide whether your class will be thread-safe or not. P.P.S. [ConcurrentHashMap](http://download.oracle.com/javase/1,5.0/docs/api/java/util/concurrent/ConcurrentHashMap.html) is close, but not exactly the same. If you can subclass or wrap it or wr...
[ 0.10945827513933182, -0.030811050906777382, 0.3069476783275604, 0.1709914654493332, -0.010501026175916195, -0.02556014060974121, 0.01181472185999155, -0.01563311368227005, -0.6687584519386292, -0.5149053335189819, 0.05718940123915672, 0.17759113013744354, -0.17579145729541779, -0.038954116...
I have a Windows Service that runs in the background when the PC starts. I want to display an Icon on the system tray to allow configuration after a user has logged in but can't find how to do this. Is there an event I should be looking for which tells me that a user has logged in? As I understand Windows Services ca...
[ 0.4114345610141754, -0.19662100076675415, 0.28806111216545105, -0.07548099011182785, 0.0809217169880867, -0.08129747211933136, 0.3338809609413147, 0.19478069245815277, -0.16468913853168488, -0.838452160358429, -0.033470649272203445, 0.6698322892189026, -0.3205781877040863, 0.26729062199592...
global, running at the system level. There can be multiple desktops running on the system at once, so while there are ways of allowing services to interact with the desktop layer, it is far from trivial to interact with the "users desktop" in the same manner that you do with an application already bound to a specific l...
[ -0.37654078006744385, -0.017267612740397453, 0.5715481042861938, 0.22138315439224243, 0.02278813347220421, -0.0489509254693985, 0.3023136556148529, 0.5587329864501953, -0.6852548718452454, -0.7341806888580322, -0.09922090172767639, 0.544965386390686, -0.3897278904914856, 0.2800827622413635...
disabled by default.
[ -0.018850302323698997, 0.11463692039251328, 0.008419163525104523, 0.12505467236042023, 0.1314534842967987, -0.08670251816511154, 0.30546069145202637, 0.4773005247116089, -0.2642603814601898, -0.42674073576927185, -0.7138776183128357, 0.16363315284252167, -0.2556682825088501, 0.085309654474...
With jQuery I'm retrieving positions of a sortable list using 'serialize', like this: `var order = $('ul').sortable('serialize');` The variable 'order' then receives the following: `id[]=2&id[]=3&id[]=1&id[]=4&id[]=5` Now how can I use this data in an ajax call? This is how I plan to do it, but it's ugly and I c...
[ -0.22327077388763428, 0.058190375566482544, 0.35754433274269104, 0.0075731901451945305, -0.42485490441322327, -0.03483084961771965, 0.08948709815740585, -0.05545705929398537, -0.12038345634937286, -0.6682312488555908, 0.168844535946846, 0.6958404183387756, -0.46746525168418884, 0.020436979...
script? In the example I gave I added it as a query string: `'ajax.php?'+order` But I would like to pass it as a parameter, just like the action parameter. The following doesn't work, it returns a syntax error: `$.post('ajax.php?'+order,{action:'updateOrder',order});` Found it! I needed to add the option `key:'stri...
[ -0.023252278566360474, -0.1762852519750595, 0.15735286474227905, -0.05795479938387871, -0.17300966382026672, 0.10405680537223816, 0.29180023074150085, 0.10743793845176697, 0.11701566725969315, -0.515815794467926, 0.14403140544891357, 0.6262626647949219, -0.3914456367492676, -0.120226733386...
A lot of times you get a form where you need to enter an email address (or other form field) twice in order to confirm that you typed it correctly the first time. Some forms disable the copy and paste action (via javascript) in the browser to force the user to type the email address again. Personally I find this high...
[ 0.7369858026504517, 0.2414417862892151, 0.30744144320487976, -0.03783657029271126, -0.06055202707648277, -0.12749625742435455, 0.5039303302764893, 0.028970183804631233, -0.10614447295665741, -0.7060207724571228, 0.2008039951324463, 0.19806364178657532, -0.3163489103317261, -0.0288645867258...
link which allows the user to confirm his/her email address. For obscured fields like password fields, it is always best to implement a double entry input field in case the user made a typo.
[ 0.05054636672139168, -0.03227217122912407, 0.46532541513442993, 0.18313556909561157, 0.16596606373786926, -0.26462385058403015, 0.35581719875335693, 0.22955627739429474, -0.2770118713378906, -0.6462668776512146, -0.3550031781196594, -0.056532829999923706, -0.4028046131134033, 0.25150907039...
We are programming a web application (not 'just' a web site, but functionality-wise a real application), and have the following discussion for the next release: * our UI designer wants to replace the browser's right-click context menu (showing our own menu where appropriate, or no menu at all) because he wants the we...
[ 0.6917067170143127, 0.24795852601528168, 0.3089221715927124, -0.07213888317346573, 0.032211486250162125, -0.2461874783039093, 0.2639313340187073, -0.008463569916784763, 0.216859832406044, -0.6774536967277527, -0.1498357355594635, 0.6083109378814697, -0.0960572138428688, -0.1402643024921417...
coding arguments etc. - for the pros and cons of this issue, which I can hopefully use to resolve it once and for all... You can't do that reliably anyway. In Firefox, go to Settings, Contents, JavaScript/Advanced (I'm guessing the captions, no English Firefox (; ) to override context menu behaviour and bang, your app ...
[ 0.5817134380340576, 0.3104042410850525, 0.1874273270368576, 0.22185811400413513, 0.25883302092552185, -0.1252596527338028, 0.4280347228050232, 0.009736644104123116, -0.0851641595363617, -0.6246756911277771, -0.20897634327411652, 0.8127460479736328, -0.5959001183509827, -0.11923158168792725...
use a little drop-down arrow where a context menu is needed, that can either be clicked or just hovered over to show the menu. JetBrains' [TeamCity](http://www.jetbrains.com/teamcity) web app does that very well.
[ -0.09045760333538055, -0.16061514616012573, 0.21353231370449066, 0.27975353598594666, 0.005841914564371109, -0.27229171991348267, -0.10978750884532928, 0.22840657830238342, -0.20658816397190094, -0.5306689739227295, 0.007123027928173542, 0.3978714644908905, -0.15617288649082184, -0.9534091...
So I have a model with a ManyToManyField called tournaments. I have a ModelForm with two tournament fields: ``` pay_tourns = forms.ModelMultipleChoiceField( queryset=Tourn.objects.all().active().pay_tourns(), widget=forms.CheckboxSelectMultiple()) rep_tourns = forms.Mode...
[ -0.2094017118215561, -0.06535536050796509, 0.6964478492736816, -0.053925853222608566, -0.16207076609134674, -0.13835150003433228, -0.17205461859703064, -0.30969560146331787, -0.4109336733818054, -0.5836412310600281, 0.025177543982863426, 0.7480098009109497, -0.30097144842147827, 0.26610770...
widget=forms.CheckboxSelectMultiple()) ``` The methods after all() there are from a subclassed QuerySet. When I'm saving the form in my view I do thus: ``` post.tournaments = (post_form.cleaned_data.get('pay_tourns') + post_form.cleaned_data.get('rep_tourns')) ``` Anyway, this all w...
[ 0.3961985409259796, 0.028380323201417923, 0.737659215927124, -0.1334056705236435, -0.11593698710203171, -0.6270654797554016, 0.24828454852104187, -0.2950180470943451, -0.19711971282958984, -0.7696981430053711, 0.1013922244310379, 0.6151286959648132, -0.3550052046775818, 0.2374054342508316,...
I pass instance=post to the form. Any ideas? Paolo Bergantino was on the right track, and helped me find it. This was the solution: ``` def __init__(self, *args, **kwargs): super(MyForm, self).__init__(*args, **kwargs) instance = kwargs.get('instance') if instance: self.fields['pay_tourns'].initia...
[ -0.19948644936084747, 0.0067084054462611675, 0.7222326397895813, -0.0923093929886818, -0.03538186475634575, 0.1709602326154709, 0.08757767081260681, -0.30036473274230957, -0.4648217558860779, -0.6593340039253235, -0.017839759588241577, 0.785485029220581, -0.341348260641098, 0.1790475696325...
I would like to develop a portfolio of code for prospective employers to browse through. The interface used by sites like [assembla](http://code.assembla.com/we20site/subversion/nodes/We20PinaxEd) looks promising; how can I set up something similar on my personal server? I'm also open to suggestions and other methods ...
[ 0.6663946509361267, -0.2189105600118637, 0.18472962081432343, 0.1359758973121643, 0.09279655665159225, -0.15274019539356232, 0.016010059043765068, 0.2200291007757187, -0.29083406925201416, -0.8395177125930786, 0.32070302963256836, 0.41636013984680176, 0.5254588723182678, 0.1896937489509582...
Is there a difference between using const: Cannot change the datatype but can change the value of a or b ``` int add(const int a, const int b); ``` Can change the datatype but cannot change the value of a or b ``` int add(int const a, int const b); ``` Cannot change the datatype and cannot change the value of a ...
[ 0.181998610496521, 0.12946848571300507, 0.10608705878257751, -0.11587800830602646, -0.044929079711437225, 0.08051721751689911, 0.03191179409623146, -0.06771223992109299, -0.01310917641967535, -0.6885575652122498, -0.1393144279718399, 0.7136107087135315, -0.6548408269882202, 0.0554680339992...
don't (probably uncovering z bug in the process). It also helps it to do various optimizations. Here are some const examples and what they mean : ``` f ( const int a ) ``` f cannot change the value of 'a'. ``` f ( int const a ) ``` the same but written in a weird way ``` f ( const int const a ) ``` means not...
[ 0.17067460715770721, 0.27616026997566223, 0.20137718319892883, 0.13627158105373383, 0.04269123449921608, -0.034102506935596466, 0.35805511474609375, 0.3095041811466217, -0.2306385636329651, -0.33794209361076355, -0.09406118094921112, 0.5716126561164856, -0.5768406987190247, 0.3306136727333...
the pointer nor the value pointed to ``` f ( int a ) const ``` The member function f cannot modify its object Hope it makes things clearer ..
[ -0.3760938048362732, 0.32306280732154846, 0.3151959776878357, 0.0612996406853199, -0.09683480858802795, -0.16691957414150238, 0.17250457406044006, 0.09064190834760666, 0.16692198812961578, -0.3728421926498413, -0.5392064452171326, 0.34775683283805847, -0.2577129602432251, 0.166844829916954...
So, I have a webapp with a fair amount of JSPs, servlets, alot of which are using IceFaces. Obviously, most of this will have to stay in Tomcat. However, I've been told that static content (HTML, Images, etc.) is slower on Tomcat than a pure webserver like Apache. My understanding is that when you're using Tomcat as ...
[ 0.4109857380390167, 0.15280847251415253, 0.21665185689926147, 0.1296217143535614, -0.45651116967201233, -0.20773960649967194, 0.25078171491622925, 0.11384513229131699, -0.42601943016052246, -0.32359352707862854, -0.1435556709766388, 0.42423853278160095, -0.12948790192604065, 0.215246573090...
a low volume site? See the [Tomcat Connector FAQ](http://wiki.apache.org/tomcat/FAQ/Connectors) for some information. For modern versions of Tomcat, the performance difference is **much** smaller than it used to be. For a low volume site, there is no reason that you cannot supply all content with Tomcat.
[ 0.27780160307884216, -0.11467745155096054, 0.3772616386413574, 0.04136735573410988, -0.04425801709294319, -0.06180263310670853, 0.12936201691627502, 0.16314056515693665, -0.337557852268219, -0.3325555622577667, -0.14607448875904083, 0.48794615268707275, -0.16600583493709564, 0.268179327249...
Where can I find a good example on how to completely implement the MVC pattern in Windows Forms? I found many tutorials and code examples on various sites (for example, [The Code Project](http://en.wikipedia.org/wiki/The_Code_Project) and .NetHeaven), but many are more representative for the observer pattern than MVC....
[ 0.651872456073761, 0.13279816508293152, 0.21769319474697113, -0.1368531435728073, -0.23192435503005981, -0.25155094265937805, 0.4368901550769806, -0.12069570273160934, -0.16243481636047363, -0.6796926856040955, -0.03610285744071007, 0.3737064301967621, -0.36230987310409546, 0.0203706584870...
have been so different from each other. Some of the design differences I have seen are (including most combinations): * Directly talk to the database (2 tier) * Use a backend that has been written for the given application (3 tier) * Use a set of web services that were written for use by many applications and can’t be...
[ 0.6181781888008118, -0.01662239246070385, 0.4307025969028473, 0.15301841497421265, 0.08556760847568512, -0.10410981625318527, -0.005829945206642151, -0.10463292896747589, -0.34804436564445496, -0.9479462504386902, -0.26626959443092346, 0.430379182100296, -0.1543947011232376, 0.126133084297...
work well in standard grid controls / need custom controls for most of the UI data. * One developer / teams of 10 or 20 developers (just on the UI) * Lots of unit test using mocks etc / no unit tests Therefore I don’t think it’s possible to create one implementation of MVC (or MVP) that always fits well. The best pos...
[ 0.6237936019897461, 0.19414596259593964, -0.07592040300369263, -0.19508308172225952, -0.29230883717536926, 0.425239235162735, 0.48783934116363525, -0.12642621994018555, -0.1446603536605835, -0.7508130669593811, 0.3037475645542145, 0.49042144417762756, -0.22344399988651276, -0.3079810440540...
lot better. [Microsoft's Smart Client Guidance (CAB / Microsoft Composite Application Block)](http://smartclient.codeplex.com/) should also be considered. It is a bit complex, but it can work well for applications that have a good fit. Selecting an [MVC/MVP Implementation for a Winforms Project](http://rdn-consulting....
[ 0.24226127564907074, -0.17742978036403656, 0.42397820949554443, -0.01350729912519455, -0.2859156131744385, -0.2853798568248749, 0.04938333481550217, -0.35325390100479126, -0.04529859498143196, -0.5759930610656738, 0.08897721022367477, 0.5702385306358337, -0.02571602538228035, -0.0123920962...
in the customer’s language. For example: > "When I click the 'save' button then > the file should be saved and the > unsaved file warning should > disappear.” I have no experience using "Presenter First," but I will give it a try when I get a chance, as it looks very promising. Other Stack Overflow questions you ...
[ 0.2313099056482315, 0.05192594975233078, 0.2260286509990692, -0.19127914309501648, 0.18288519978523254, 0.09546130150556564, 0.27651360630989075, -0.1935795396566391, -0.2894412577152252, -0.26731348037719727, -0.1960422545671463, 0.8071711659431458, -0.36539584398269653, -0.20369589328765...
View View Model) Design Pattern for Winforms](http://aviadezra.blogspot.com/2009/08/mvp-mvvm-winforms-data-binding.html) give another option that may make it easer to convert to WPF if ever needed. [Magical.Trevor](http://codermike.com/magical-trevor) is yet another MVVM sample for Windows Forms that also includes auto...
[ 0.2060171514749527, -0.12563636898994446, 0.3237758278846741, 0.09890252351760864, -0.3695985674858093, -0.15471428632736206, 0.49129390716552734, -0.41486603021621704, -0.3791392147541046, -0.40089696645736694, 0.17083626985549927, 0.49445727467536926, -0.05411674082279205, 0.207677572965...
your **aims**, it becomes easier to choose one implementation or another.
[ 0.7639858722686768, -0.03866390883922577, 0.23741662502288818, 0.13841068744659424, -0.16294072568416595, 0.07096316665410995, 0.12367139756679535, -0.14260883629322052, -0.14968015253543854, -0.7620366811752319, 0.1081196740269661, 0.4485502243041992, -0.08587586134672165, -0.050630528479...
I am trying to write a C# P/Invoke wrapper for a C API (a native Win dll), and generally this is working fine. The only exception is a specific method which takes a struct as a parameter in the C code. The function is invoked without any exceptions, but it returns false indicating that something failed in the execution...
[ 0.32359549403190613, 0.06258393079042435, 0.4206725060939789, -0.12790265679359436, 0.07906413078308105, -0.05011049658060074, 0.3686811327934265, -0.23967932164669037, 0.13964515924453735, -0.49674493074417114, -0.11791085451841354, 0.44237467646598816, -0.4901295304298401, -0.13307476043...
LPCTRACKDATA /*pTrack1*/, LPCTRACKDATA /*pTrack2*/, LPCTRACKDATA /*pTrack3*/, LPCTRACKDATA /*reserved*/); ``` I have made an attempt to create a C# P/Invoke wrapper using the following code: ``` public const int MAX_ICE_MS_TRACK_LENGTH = 256; [StructLayout(LayoutKind.Sequentia...
[ -0.13967755436897278, -0.1286911517381668, 0.4533631503582001, 0.00004026302485726774, 0.17039236426353455, 0.020946389064192772, -0.11378166824579239, -0.21328632533550262, -0.5559425354003906, -0.30675822496414185, -0.2620503008365631, 0.7958848476409912, -0.5311061143875122, -0.05244272...
extern bool EncodeMagstripe(IntPtr hDC, [In]ref MSTrackData pTrack1, [In]ref MSTrackData pTrack2, [In]ref MSTrackData pTrack3, [In]ref MSTrackData reserved); ``` Then I try to invoke the EncodeMagstripe method using
[ -0.003061677562072873, 0.2508544325828552, 0.4076823592185974, -0.14660948514938354, -0.210166335105896, -0.08111307770013809, 0.45544949173927307, -0.2156098634004593, 0.3675313889980316, -0.3291378915309906, -0.06960515677928925, 0.44882553815841675, -0.6424359083175659, 0.08156921714544...
the following C# code: ``` CardApi.MSTrackData trackNull = null; CardApi.MSTrackData track2 = new CardApi.TrackData(); byte[] trackBytes = Encoding.ASCII.GetBytes(";0123456789?"); track2.nLength = (uint)trackBytes.Length; Buffer.BlockCopy(trackBytes, 0, track2.TrackData, 0, trackBytes.Length); if (!CardApi.EncodeMags...
[ -0.2733510434627533, 0.17673766613006592, 0.3432859182357788, -0.001411270466633141, 0.3441310226917267, 0.07539796084165573, 0.3065332770347595, -0.48431137204170227, -0.23571349680423737, -0.4218965768814087, -0.3291705846786499, 0.46257588267326355, -0.18705464899539948, -0.073930136859...
cannot see what this may be. Does anyone have any suggestions? All the answers given so far have a bit of the answer but are incomplete. You need the MarshalAs - ByValArray as well as the new, your MSTrackDatas are already references so you do not need to pass them by ref and you must check what calling convention ICEA...
[ 0.33523887395858765, 0.2298780083656311, 0.45084699988365173, 0.42981210350990295, 0.11211136728525162, -0.4580635726451874, 0.29476574063301086, -0.2590349018573761, -0.15864381194114685, -0.5099672079086304, -0.061177272349596024, 0.49093687534332275, -0.23078028857707977, 0.125559106469...
to make sure it is marshaled as 4 byte WinApi style bool. Here are the declares you'll (probably) need: ``` public const int MAX_ICE_MS_TRACK_LENGTH = 256; [StructLayout(LayoutKind.Sequential)] public class MSTrackData { public UInt32 nLength; [MarshalAs(UnmanagedType.ByValArray, SizeConst = 256)] public ...
[ 0.26083460450172424, 0.11364995688199997, 0.20061175525188446, 0.2936210334300995, 0.38088369369506836, -0.030911199748516083, 0.2602052092552185, -0.8189829587936401, -0.25293341279029846, -0.26871269941329956, -0.11932744085788727, 0.46260103583335876, -0.09416740387678146, 0.07090676575...
[In] MSTrackData pTrack3, [In] MSTrackData reserved); ```
[ -0.4888962507247925, 0.1398274004459381, 0.4079529345035553, 0.08312142640352249, 0.3539067804813385, -0.06936246901750565, 0.30305731296539307, -0.15997426211833954, -0.2287812978029251, -0.3045295178890228, -0.7815614342689514, 0.454933226108551, -0.24061013758182526, -0.0314100123941898...
I am looking at design by contract for a Java library, this what I came up with so far in terms of the interface. The user could call executeContract and executeContract invokes invokeContract after calling 'require'. ensure is called after executeContract to ensure the correctness of what is returned by invokeContrac...
[ 0.5083726048469543, 0.024559369310736656, 0.21235406398773193, -0.08043008297681808, 0.12412846088409424, -0.03768035024404526, 0.1462043672800064, -0.5393795967102051, 0.057423315942287445, -0.9647278189659119, 0.3623451888561249, 0.7509391903877258, -0.35503682494163513, -0.1217432543635...
execute method, * check for the validity of the preconditions and the post conditions. * * The precondition can be null. * * @param precondInput - Precondition Input Data, can be null. * @return Post condition output */ public Object executeContract(final ...
[ -0.022802209481596947, -0.21589407324790955, 0.04558399319648743, 0.03261920064687729, -0.13319683074951172, 0.36205220222473145, 0.47420835494995117, -0.6138641238212585, -0.08899236470460892, -0.30393221974372864, -0.23269788920879364, 0.1989918202161789, -0.31068533658981323, 0.22411306...
ContractError; /** * Require that the preconditions are met. */ public Object require(final Object precondInput) throws ContractError; /** * Ensure that the postconditions are met. */ public Object ensure(final Object precondInput) throws ContractError; /** * The precondi...
[ 0.06715965270996094, -0.05333142355084419, 0.3226560950279236, 0.04092458635568619, -0.03467657417058945, 0.10416820645332336, 0.3800739347934723, -0.6115217804908752, -0.23760564625263214, -0.3465254008769989, -0.6042937636375427, 0.40344908833503723, -0.29906851053237915, -0.038083333522...
Input Data, can be null. * @return Post condition output */ public Object invokeContract(final Object precondInput) throws ContractError; } ``` If you are looking for a generic solution to this I would recommend the [*Java Modelling Language*](http://www.eecs.ucf.edu/~leavens/JML/ "JML...
[ 0.006548173259943724, 0.05020589753985405, 0.3977707028388977, -0.0631226897239685, 0.020110201090574265, -0.06989403814077377, 0.1928521692752838, -0.3069066107273102, -0.0004514296306297183, -0.5296010375022888, -0.23325799405574799, 0.5319109559059143, -0.2811134457588196, 0.10237420350...
similar type of functionallity but I've never used it before.
[ 0.02682211995124817, -0.2035362869501114, 0.38592880964279175, 0.09476561099290848, -0.14901195466518402, -0.18599951267242432, -0.09287290275096893, 0.14617180824279785, 0.1257302612066269, -0.3434651494026184, 0.059166260063648224, 0.4852684438228607, -0.026928536593914032, 0.22479906678...
When installing DNN 04.09.02 upgrade (from DNN 4.8.4) I receive System.IndexOutOfRangeException: PermanentRedirect error and cannot install the upgrade. How do I get around this so I can install the upgrade? Well, you could use use the stacktrace class in System.Diagnostics to check where the method call is coming from...
[ 0.12147528678178787, -0.06798671185970306, 0.5648926496505737, 0.09795612096786499, 0.23441116511821747, -0.14116120338439941, 0.7626091837882996, -0.1541549265384674, -0.25958237051963806, -0.5492620468139648, -0.26185277104377747, 0.9920653700828552, -0.020905468612909317, 0.161881387233...
I'd like to create a Dictionary object, with string Keys, holding values which are of a generic type. I imagine that it would look something like this: ``` Dictionary<string, List<T>> d = new Dictionary<string, List<T>>(); ``` And enable me to add the following: ``` d.Add("Numbers", new List<int>()); d.Add("Lette...
[ 0.1676255762577057, 0.16058263182640076, 0.2736055552959442, 0.058750756084918976, 0.040370166301727295, 0.06134131923317909, 0.3359449803829193, -0.32010525465011597, -0.0088277542963624, -0.5423448085784912, -0.1583126336336136, 0.6057524681091309, -0.2856996953487396, -0.123155407607555...
would handle it to some extent. You'd basically have a generic `Add` method: ``` public void Add<T>(string key, List<T> list) ``` (The collection itself *wouldn't* be generic - unless you wanted to make the key type generic.) You couldn't *extract* values from it in a strongly typed manner though, because the compi...
[ 0.07439779490232468, -0.12509390711784363, 0.1942959725856781, 0.09780985862016678, -0.35693925619125366, 0.25016069412231445, 0.12465585023164749, -0.32131779193878174, -0.19049657881259918, -0.2762307822704315, -0.18260458111763, 0.35206007957458496, -0.5188928246498108, 0.17496159672737...
correctly, but which may be informative anyway... No, you can't make one type argument depend on another, I'm afraid. It's just one of the things one might want to express in a generic type system but which .NET's constraints don't allow for. There are always going to be such problems, and the .NET designers chose to ...
[ 0.340442419052124, 0.12050727009773254, 0.007857125252485275, -0.13774210214614868, -0.1557799130678177, -0.1891266405582428, 0.399912565946579, -0.21530258655548096, -0.24369320273399353, -0.37320274114608765, -0.01690690405666828, 0.4717952013015747, -0.4639616012573242, -0.0044311759993...
I have a SSIS package that has a child package that is failing. The error message isn't very helpful. > The attempt to add a row to the Data Flow task buffer failed with error code 0xC0047020 The problem seems to be I am running out of Virtual Memory to complete the job. I found a forum thread that may help solve th...
[ -0.2219318151473999, 0.28410035371780396, 0.3255370259284973, -0.14189136028289795, -0.04739778861403465, 0.3159444332122803, 0.6521121859550476, -0.1608160436153412, -0.17692548036575317, -0.7486399412155151, 0.2993083596229553, 0.336530476808548, -0.0743090957403183, 0.23046675324440002,...
the 12th. I am assuming the dat file that we are using to import data into the database grew to a size that was to large for the database to handle. It's only a 8.90MB csv file though. The import is a straight column to column import. The problem child package is step 1 and fails and continues and successfully complet...
[ -0.15579308569431305, 0.057860057801008224, 0.36588507890701294, 0.30000901222229004, -0.0185365229845047, 0.24386250972747803, 0.017957568168640137, -0.177873894572258, -0.2972007989883423, -0.5830715298652649, 0.06946468353271484, 0.6351786255836487, -0.1078612431883812, -0.0122897243127...