text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
} catch (ServletException e) { throw new JspException(e); } catch (IOException e) { throw new JspException(e); } return super.doStartTag(); } } ``` My `menu.jsp` file, which is the wrapper for the menu itself, then might look like this: ``` <div id="menu> <%someh...
[ 0.35836708545684814, -0.32305434346199036, 0.502704381942749, -0.2934049367904663, 0.06861785799264908, 0.04675181210041046, 0.32864639163017273, -0.41353365778923035, 0.07277431339025497, -0.5378453135490417, -0.10008196532726288, 0.6746009588241577, -0.27474457025527954, -0.2091886252164...
of my `mytags:Menu` tag, which will generate the HTML for the actual menu items, into the `menu.jsp`, between the opening and closing tags. I know I could break it up into two different jsp files, one for the start tag, and one for the end tag, but that seems sloppy. Is it possible to do this? Thanks! I really sugges...
[ 0.17040327191352844, 0.04234001412987709, 0.39146316051483154, -0.2186516970396042, -0.24587905406951904, -0.05423080921173096, 0.15824902057647705, -0.10498692840337753, -0.27639853954315186, -0.5482990741729736, -0.14654694497585297, 0.741064190864563, -0.465985506772995, -0.362363994121...
the same ends but with much cleaner means, with a much nicer separation of code and presentation.
[ 0.27353858947753906, 0.13437288999557495, 0.2911413609981537, 0.38511162996292114, -0.24672377109527588, -0.0018436661921441555, 0.27289554476737976, -0.1468231976032257, -0.11835304647684097, -0.6891881227493286, -0.2586595416069031, 0.20846959948539734, 0.11052918434143066, 0.13869421184...
I have a page designed with many HTML Tables which are hidden or displayed based on what needs to be shown at the time. There are various ASP.NET standard web controls within these tables, usually check boxes, radio button lists, text entry boxes, labels, etc. and all work just fine. I am trying to put a DataGrid with...
[ 0.02444012649357319, 0.11714430898427963, 0.37160724401474, 0.06995633244514465, -0.09394454210996628, -0.09163403511047363, 0.468374639749527, -0.1965736448764801, -0.17327044904232025, -0.7879418134689331, -0.07135607302188873, 0.20290371775627136, -0.1675669401884079, 0.1727880388498306...
redesign the page to put the DataGrid outside of a table, but if I can find a way to avoid this that's what I want to do. So my question is: is there any way to make the HtmlTable accept a DataGrid, GridView or similar object nested in it? And would changing to an asp table tag make it acceptable? Or any other creativ...
[ 0.30865365266799927, -0.0935458317399025, 0.31576135754585266, 0.10976295173168182, -0.10309068113565445, -0.008639535866677761, 0.14911693334579468, -0.09000740945339203, -0.35616534948349, -0.8593583106994629, 0.11765334010124207, 0.24971352517604828, -0.34714484214782715, 0.047088123857...
HTML, so while I couldn't get the Datagrid IN the table, I could put it outside of a table and simply display or hide it. When this is placed "in the middle" of a table it requires splitting the table up into two parts (before and after). This is the best way I've found so far to keep things looking the same on the pa...
[ 0.11510413885116577, -0.031685952097177505, 0.484716534614563, 0.23200687766075134, -0.48855912685394287, -0.28737974166870117, 0.07115498930215836, 0.03321000188589096, -0.32261496782302856, -0.8157409429550171, 0.14053495228290558, -0.07744207978248596, -0.3584090769290924, 0.21630984544...
How can I do this in PHP ``` $myDBClass->users()->limit(5);//output you limited users to 5 $myDBClass->comments()->limit(3);//output you limited comments to 3 ``` what I meant is nested methods or nested class (I don't know!) so when I call the limit method as a child of users it will know that I am calling it from ...
[ 0.2507777810096741, 0.06254599988460541, 0.19221962988376617, -0.06147962063550949, -0.2599932551383972, -0.15832483768463135, 0.04417148977518082, -0.36286112666130066, -0.2194344699382782, -0.5524008870124817, 0.28451237082481384, 0.2876265048980713, -0.2950984835624695, 0.19483894109725...
$DB->comments()->id(" > 3")->limit(10); ``` to generate the sql code "select \* from comments where id > 3 limit 10" Thanks Have the methods return objects with the methods described, and you get what you are after. So, as long as `$DB` is an object that has a `comments()`-method, that part is valid. If that `commen...
[ 0.08201946318149567, 0.2454020380973816, 0.19364488124847412, -0.10535609722137451, -0.4689592719078064, -0.14328248798847198, 0.1657053679227829, -0.5269297361373901, 0.21791277825832367, -0.43391427397727966, -0.10282716155052185, 0.5980648994445801, -0.36021140217781067, 0.0661339983344...
preparations that make the object select the "comments"-table... return $this; } public function id($string) { // handle this too... return $this; } public function limit($int) { // also this return $this; } public function execute() { $success = try_to_execute_accumulated_db_comm...
[ 0.4731195867061615, 0.012017758563160896, 0.38118019700050354, -0.3109337091445923, 0.10762562602758408, 0.3472060263156891, 0.15758831799030304, -1.0320097208023071, -0.1566019058227539, -0.504798948764801, -0.07995738834142685, 0.632434606552124, -0.21943120658397675, 0.19945234060287476...
database query is done, you actually evaluate the query by invoking `execute()` that (in my case) would return a boolean that would represent the success of the database execution. User nickohm suggested that this is called a [fluent interface](http://en.wikipedia.org/wiki/Fluent_interface). I must admit that this is ...
[ 0.24237093329429626, 0.19397708773612976, 0.3419075906276703, 0.06919772922992706, -0.06692874431610107, -0.33748435974121094, 0.4693954288959503, -0.05849886313080788, 0.0910879373550415, -0.31429943442344666, 0.013910217210650444, 0.725299060344696, -0.15051259100437164, -0.0046856752596...
![alt text](https://farm4.static.flickr.com/3352/3270044482_610eee066a.jpg?v=0) I am using the autocomplete YUI feature. However, as you can see I am having trouble aligning the suggestion drop down with the text input when I put a label in front of the text input. I am following [the example here](http://developer.ya...
[ -0.026836710050702095, -0.07277166843414307, 0.5496814846992493, -0.0858537033200264, -0.2407587766647339, -0.07927390933036804, 0.15236300230026245, -0.37652871012687683, -0.20745150744915009, -0.5384552478790283, -0.18681983649730682, 0.46831798553466797, -0.09710165113210678, 0.02998087...
drop down to line up with the text input? I would like a solution that works on all popular modern browsers (FF3, Safari, Chrome, IE), plus IE6. AutoComplete doesn't automatically brute-force the position of your AC container every time it shows, because unless you're doing inline work this is unnecessary. However, now...
[ 0.2779926359653473, -0.20033329725265503, 0.43824639916419983, 0.05185626074671745, 0.11323530972003937, -0.07565602660179138, -0.13021881878376007, -0.13830269873142242, -0.13073335587978363, -0.5669100284576416, -0.18692801892757416, 0.8406224250793457, -0.4538485109806061, -0.1579328477...
Dom.setXY("myContainer", [Dom.getX("myInput"), Dom.getY("myInput") + Dom.get("myInput").offsetHeight] ); return true; } ``` Here's a working example: <http://ericmiraglia.com/yui/demos/acalign.php>
[ 0.07193658500909805, -0.17985306680202484, 0.31490960717201233, 0.17067663371562958, 0.16247358918190002, -0.15576347708702087, 0.21330632269382477, -0.5148705244064331, -0.06476106494665146, -0.2746838331222534, -0.5435135364532471, 0.7549381852149963, -0.22053927183151245, 0.137954428791...
I know that I have to use `SetConsoleCtrlHandler()` if I want to manage console closing events. I do not know how to block the `CTRL_CLOSE_EVENT`. I've tried returning false/true if it catches that event, but no success Here is what I have so far (thank you Anton Gogolev!): ``` [DllImport("Kernel32")] public static ...
[ -0.11685962229967117, 0.09556512534618378, 0.509790301322937, -0.02016204409301281, -0.046535100787878036, -0.07138311862945557, 0.4301322400569916, -0.4692768156528473, 0.058117423206567764, -0.4889526665210724, -0.3984592854976654, 0.6108034253120422, -0.4826320707798004, 0.3424596488475...
return false;// I have tried true and false and viceversa with the return // true/false but I cant seem to get it right. return true; } //and then I use this to call it SetConsoleCtrlHandler(new HandlerRoutine(ConsoleCtrlCheck), true); ``` Also, is it possible to run a new thread to monit...
[ 0.040589239448308945, -0.12924815714359283, 0.6853141188621521, -0.18413914740085602, 0.14106883108615875, -0.2828013598918915, 0.36524227261543274, -0.20320473611354828, -0.1180148646235466, -0.47471264004707336, -0.1376909613609314, 0.46809151768684387, -0.32593971490859985, 0.1451414227...
and CTRL\_SHUTDOWN\_EVENT signals when the user closes the console, logs off, or shuts down the system so that the process has an opportunity to clean up before termination. This implies that unlike when handling CTRL+C or CTRL+BREAK events, your process does not get the opportunity to cancel the close, logoff, or shu...
[ -0.17528992891311646, -0.036150820553302765, 0.49031388759613037, -0.021569175645709038, 0.29008349776268005, -0.4163091778755188, 0.3165312111377716, 0.10670415312051773, -0.2790369987487793, -0.17064480483531952, -0.5789796710014343, 0.5161619782447815, -0.3024641275405884, 0.25970128178...
I engage in lot of training sessions and I would like to create video tutorials of all my sessions so that I can distribute it. What are the best Windows-based tools to add my PowerPoint slides, notes, voice and video (tutorials of code I write) and compile them into one video? [Camtasia](http://www.techsmith.com/camta...
[ 0.9644842743873596, -0.14741240441799164, 0.30180683732032776, 0.3804251253604889, 0.2693440318107605, -0.1851389855146408, -0.07545048743486404, 0.09545525908470154, -0.2588917911052704, -0.4805844724178314, 0.11683716624975204, 0.8417114019393921, 0.1758212298154831, -0.12486293911933899...
I am pulling my ddl options from a database, which sets the order of the list. How do I keep the selected option to display when I Response.Redirect? Page loads with Adidas -(ddl list order) **Adidas**, Nike, Puma when Nike is selected -(ddl list order) Adidas, **Nike**, Puma for Puma - -(ddl list order) Adidas, Nik...
[ 0.47104132175445557, -0.6496730446815491, 0.5981996655464172, 0.276123970746994, -0.41528376936912537, 0.5883294343948364, 0.09772896021604538, 0.25421303510665894, -0.40987858176231384, -0.7582995891571045, 0.05142054706811905, 0.3013727068901062, -0.4288662374019623, 0.325717955827713, ...
string (foo.aspx?currentSelectedShoes=Nike) or set a cookie with the same information before your response.redirect. Then in your page load event handler check for the query string or cookie and set the selected item accordingly.
[ 0.17199832201004028, -0.6203711032867432, 0.4762158691883087, 0.1859501153230667, -0.07656696438789368, 0.07441540062427521, 0.25624725222587585, -0.1611320823431015, -0.11178919672966003, -0.5520567893981934, -0.18040113151073456, 0.3648531436920166, -0.39680784940719604, -0.1721553951501...
This is probably very simple, but I simply cannot find the answer myself :( Basicaly, what I want is, given this string: "<http://www.google.com/search?hl=en&q=c#> objects" I want this output: <http://www.google.com/search?hl=en&q=c%23+objects> I'm sure there's some helper class somewhere buried in the Framework ...
[ -0.011386498808860779, 0.12250470370054245, 0.4714338183403015, 0.22004806995391846, 0.022136228159070015, 0.15391948819160461, 0.12320079654455185, -0.1127641573548317, -0.14234855771064758, -0.6671129465103149, -0.2752847373485565, 0.34421589970588684, -0.30375513434410095, 0.08864060789...
querystring: ``` System.Web.HttpUtility.UrlEncode("c# objects"); ```
[ -0.3567470610141754, 0.03438984975218773, 0.5179715752601624, 0.15003015100955963, 0.00470421276986599, -0.06576507538557053, 0.06204100325703621, 0.08020054548978806, -0.3710041344165802, -0.2694755792617798, -0.5368295311927795, 0.4277075529098511, -0.4031688868999481, 0.1948507428169250...
What would you realistically use OnItemDataBound for on a Repeater ? "This event provides you with the last opportunity to access the data item before it is displayed on the client. After this event is raised, the data item is nulled out and no longer available." ~<http://msdn.microsoft.com/en-us/library/system.web.u...
[ 0.1494046002626419, -0.35663437843322754, 0.35918480157852173, 0.4290676712989807, 0.14145591855049133, -0.21719186007976532, 0.45492318272590637, -0.070148766040802, -0.09610884636640549, -0.6480488181114197, 0.08277139812707901, 0.2836478352546692, -0.30405235290527344, 0.330302268266677...
Most Stackoverflow answers that I have found in regards to the Perl build process and unit testing and code coverage simply point me to CPAN for the documentation there. There's absolutely nothing wrong with pointing to CPAN modules because that's where the full documentation is supposed to reside. I've had trouble fin...
[ 0.5506371855735779, 0.38341718912124634, 0.130604088306427, 0.0519627220928669, -0.04338843747973442, -0.13301540911197662, 0.02131029963493347, 0.031465236097574234, -0.4644277095794678, -0.33435967564582825, -0.1327410787343979, 0.31298017501831055, 0.07201052457094193, 0.238771304488182...
unit testing and code coverage analysis. Does anyone have a small example of a complete working project that demonstrates these technologies and processes? *(I do have a small working example and I will answer my own question with it, but there are probably other SO users who have better examples than the ones I came...
[ 0.6582901477813721, 0.23848092555999756, -0.07905098050832748, 0.13958323001861572, -0.23056839406490326, 0.10840579122304916, 0.1596246212720871, -0.03233480826020241, -0.27452170848846436, -0.3943966329097748, 0.2202429473400116, 0.4954497218132019, 0.33061113953590393, -0.16465848684310...
unit testing and code coverage analysis & reporting. (I'm using [ActiveState ActivePerl](http://www.activestate.com/activeperl/) v5.10.0 on a Windows XP Pro PC, [Module::Build](http://search.cpan.org/~ewilhelm/Module-Build-0.31012/lib/Module/Build.pm), [Test::More](http://search.cpan.org/dist/Test-Simple/lib/Test/More....
[ 0.5724683403968811, -0.0391557477414608, 0.5296308994293213, 0.19784043729305267, -0.008028630167245865, -0.10138661414384842, -0.012507467530667782, -0.50909024477005, -0.20176517963409424, -0.23438799381256104, -0.297109991312027, 0.4824914336204529, -0.026748275384306908, 0.145220249891...
Paste the following content into this file: ``` use strict; use warnings; package HelloPerlBuildWorld; $HelloPerlBuildWorld::VERSION = '0.1'; sub hello { return "Hello, Perl Build World!"; } sub bye { return "Goodbye, cruel world!"; } sub repeat { return 1; } sub argumentTest { my ($booleanArg) = @_;...
[ 0.12833952903747559, -0.05631232634186745, 0.5586743354797363, -0.3288975656032562, 0.0809209942817688, 0.3272627294063568, 0.8123672604560852, -0.0682789757847786, 0.12491035461425781, -0.44335809350013733, -0.1754496693611145, 0.5103311538696289, -0.35260796546936035, 0.6408626437187195,...
"true"; } else { return "unknown"; } return "Unreachable code: cannot be covered"; } 1; ``` In the "t" directory, create a text file named "HelloPerlBuildWorld.t". This file is your unit test script that will attempt to fully test your Perl module above. Paste the following content into this ...
[ 0.4313613176345825, 0.01649835892021656, 0.5158961415290833, -0.20098374783992767, 0.31443095207214355, -0.19856278598308563, 0.5816836357116699, -0.3724537789821625, 0.187681183218956, -0.40332353115081787, -0.4605110287666321, 0.6615867018699646, -0.30511826276779175, 0.04552318528294563...
.*World/, "hello() RE test"); # Test hello_message() routine using a got/expected routine is($helloCall, "Hello, Perl Build World!", "hello() IS test"); # Do not test bye() routine # Test repeat() routine using a got/expected routine for (my $ctr=1; $ctr<=10; $ctr++) { my $repeatCall = HelloPerlBuildWorld::repea...
[ -0.011683530174195766, 0.06031091883778572, 0.8872289657592773, -0.19240856170654297, 0.19785118103027344, 0.058543942868709564, 0.5753667950630188, -0.286581814289093, 0.03725900501012802, -0.38858044147491455, -0.21080438792705536, 0.7948962450027466, 0.058486033231019974, 0.292276442050...
project directory, create a text file named "Build.PL". This file will create your build scripts that you will use later. Paste the following content into this file: ``` use strict; use warnings; use Module::Build; my $builder = Module::Build->new( module_name => 'HelloPerlBuildWorld', license ...
[ 0.556135356426239, 0.05025869235396385, 0.6684994101524353, -0.28688713908195496, 0.09975418448448181, -0.21029481291770935, 0.3455072343349457, -0.20820897817611694, -0.00996121671050787, -0.6809171438217163, -0.29686683416366577, 0.6335328817367554, -0.19291971623897552, 0.17373305559158...
{ 'Test::More' => '0.10', }, ); $builder->create_build_script(); ``` That's all the files you need. Now from the command line in the top level project directory, type the following command: ``` perl Build.PL ``` You will see something similar to the following: ``` Checking prerequisites... Looks goo...
[ 0.4581558108329773, 0.12105906009674072, 0.48822543025016785, 0.01144266128540039, 0.027281517162919044, -0.13915830850601196, 0.5330916047096252, -0.42676830291748047, -0.13466674089431763, -0.7012134194374084, -0.22346898913383484, 0.756998598575592, 0.17024798691272736, 0.22358219325542...
analysis, try this: ``` Build testcover ``` And you'll see something on the order of this: ``` t\HelloPerlBuildWorld....ok All tests successful. Files=1, Tests=18, 12 wallclock secs ( 0.00 cusr + 0.00 csys = 0.00 CPU) cover Reading database from D:/Documents and Settings/LeuchKW/workspace/HelloPerlBuildWorld/cove...
[ -0.4366597533226013, 0.005892237648367882, 0.4318154454231262, 0.07255189120769501, 0.20366959273815155, -0.09047586470842361, 0.5259186625480652, -0.39798834919929504, -0.12472351640462875, -0.5900750756263733, -0.4044552147388458, 0.805336058139801, 0.2226419895887375, -0.268191486597061...
0.0 0.0 0.0 0.0 n/a 0.0 D:/Perl/lib/ActiveState/Path.pm 0.0 0.0 0.0 0.0 n/a 0.0 D:/Perl/lib/AutoLoader.pm 0.0 0.0 0.0 0.0 n/a 0.0 D:/Perl/lib/B.pm
[ -0.18249139189720154, 0.06837163120508194, 0.7084479928016663, -0.3300376534461975, 0.016038931906223297, 0.19157622754573822, 0.1980348378419876, -0.6346185207366943, -0.35896003246307373, -0.27852898836135864, -0.2858714163303375, 0.45170241594314575, -0.402197003364563, 0.00942802336066...
18.6 16.7 13.3 19.2 96.4 17.6 ... [SNIP] ... D:/Perl/lib/re.pm 0.0 0.0 0.0 0.0 n/a 0.0 D:/Perl/lib/strict.pm 84.6 50.0 50.0 100.0 0.0 73.1 D:/Perl/lib/vars.pm
[ 0.15104342997074127, 0.08901567757129669, 0.884375274181366, -0.06720146536827087, 0.06249376758933067, 0.3629581332206726, 0.5234037637710571, -0.6811138391494751, -0.4165964424610138, -0.3214980363845825, -0.18230020999908447, 0.5355923175811768, -0.2784006893634796, 0.23957559466362, ...
44.4 36.4 0.0 100.0 0.0 36.2 D:/Perl/lib/warnings.pm 15.3 12.1 0.0 11.1 0.0 12.0 D:/Perl/lib/warnings/register.pm 0.0 0.0 n/a 0.0 n/a 0.0 blib/lib/HelloPerlBuildWorld.pm 87.5 100.0
[ -0.2521374225616455, 0.3601425886154175, 0.6287501454353333, -0.20796312391757965, 0.14100374281406403, 0.1780984103679657, 0.8925272822380066, 0.08658755570650101, -0.09556923806667328, -0.4034053087234497, -0.3447767496109009, 0.3213222622871399, -0.6031849980354309, 0.11081573367118835,...
n/a 83.3 0.0 89.3 Total 9.9 4.6 2.8 11.3 100.0 7.6 ----------------------------------- ------ ------ ------ ------ ------ ------ Writing HTML output to D:/Documents and Settings/LeuchKW/workspace/HelloPerlBuildWorld/cover_db/coverage.html ... done. ``` *(Someone pl...
[ 0.5522834062576294, 0.1464546173810959, 0.7356839179992676, -0.10919677466154099, -0.057982638478279114, 0.00945155881345272, 0.3207549452781677, -0.07566772401332855, -0.21739260852336884, -0.7857540249824524, -0.05255335569381714, 0.5790908932685852, -0.2481725811958313, -0.1710420548915...
single file that I wrote. I could not get Cover filtering to work according to the CPAN documentation!)* Now if you refresh your top level directory, you can see a new subdirectory called "cover\_db". Go into that directory and double click on the "coverage.html" file to open the code coverage report in your favorite ...
[ 0.7141463160514832, 0.10116074234247208, 0.3092741370201111, 0.08485303074121475, -0.07255290448665619, -0.3783228397369385, 0.2457204908132553, -0.023656658828258514, -0.34532684087753296, -0.5479732155799866, -0.014305904507637024, 0.36859461665153503, -0.2794746458530426, 0.231660932302...
this report that we did not cover the "bye()" routine at all and also there is a line of code that is unreachable that was not covered as we expected. [![snapshot of code coverage report](https://i.stack.imgur.com/bW6cH.jpg)](https://i.stack.imgur.com/bW6cH.jpg) (source: [leucht.com](http://www.leucht.com/images/Co...
[ 0.5632215738296509, 0.07217917591333389, 0.27098748087882996, -0.13302716612815857, -0.0638117790222168, -0.3211769759654999, 0.5544450283050537, -0.3273838460445404, -0.2972947657108307, -0.48744288086891174, -0.24486447870731354, 0.7659493684768677, -0.22352014482021332, -0.1867059767246...
config_dir => '_build', }, ); $build->dispatch('build'); $build->dispatch('test'); ``` Then I set up my IDE to execute this file (via "perl BuiltTest.PL") with a single mouse click and it automatically runs my unit test code from the IDE instead of me doing it manually from the command line. Replace the "dispatch(...
[ 0.5664422512054443, 0.0008420718950219452, 0.38271909952163696, -0.31041499972343445, 0.11288215965032578, 0.00036244624061509967, 0.3261831998825073, -0.4944242537021637, 0.29306522011756897, -0.7010831236839294, -0.222575843334198, 0.96892911195755, -0.14848360419273376, -0.1077118292450...
Please keep in mind that I'm new to C# and OOP so I apologize in advance if this seems like an easy question to some. I'm going back through my code and looking for ways to objectify repetitive code and create a class for it so that I can simply reuse the class. That being said, I'm not looking to learn NHibernate or a...
[ 0.8106946349143982, 0.33336105942726135, -0.056319933384656906, 0.1157851293683052, -0.1859692633152008, -0.14635907113552094, 0.07257429510354996, 0.6021159291267395, -0.320529580116272, -0.4319343864917755, 0.06674149632453918, 0.4265802800655365, -0.03966923803091049, 0.1462307870388031...
the values that I get. An example: ``` protected void LoadSchools() { SqlDataReader reader; var connectionString = ConfigurationManager.ConnectionStrings["MyConnectionString"].ConnectionString; var conn = new SqlConnection(connectionString); var comm = new SqlCommand("SELECT * F...
[ 0.24203939735889435, -0.10045390576124191, 0.3239961564540863, -0.00003430490323808044, 0.22608278691768646, -0.00232255388982594, 0.22829970717430115, -0.14973419904708862, -0.1391231268644333, -0.5241323113441467, -0.42272141575813293, 0.4028489589691162, -0.16998055577278137, 0.40637028...
reader = comm.ExecuteReader(); cmbEditSchool.DataSource = reader; cmbEditSchool.DataBind(); cmbEditSchool.Text = "Please select an existing school to edit..."; if (reader != null) reader.Close(); } finally {
[ -0.2717931568622589, -0.17920605838298798, 0.5206805467605591, 0.1244792491197586, 0.09415633976459503, 0.15852245688438416, 0.2560977637767792, 0.07271335273981094, 0.12779685854911804, -0.8713356852531433, -0.5236388444900513, 0.11679408699274063, -0.20096376538276672, 0.1829150170087814...
conn.Dispose(); } } ``` I use this same bit of code, over and over again throughout my program, on different pages. Most often, I'm populating a drop-down list or combo box, but sometimes I will populate a gridview, only slightly altering the query. **My question is how can I create a class that will all...
[ 0.46159452199935913, 0.12046162784099579, 0.20621410012245178, 0.015823474153876305, 0.06702108681201935, -0.0027045540045946836, -0.004290856886655092, -0.1946922242641449, -0.13114985823631287, -0.9044840335845947, 0.09397731721401215, 0.4865752160549164, -0.4154246747493744, 0.132885619...
to start with selects. I've been reading up on IEnumerable which seems like the appropriate interface to use, but how do I use it? ***Edited to add:*** I marked Rorschach's answer as THE answer because s/he addressed my IEnumerable question. I also understand the need for a proper DAL and perhaps BLL layer. What I wa...
[ 0.38036343455314636, 0.02772006206214428, 0.4261457622051239, 0.06105490401387215, -0.2898186147212982, 0.22398114204406738, -0.35685160756111145, -0.2939739525318146, 0.04813293740153313, -0.9270369410514832, -0.09926959872245789, 0.15611346065998077, -0.003635312197729945, -0.10034793615...
starting with the code that I gave above. Perhaps I'm not wording my question, or what I'm after, correctly. At any rate, Rorschach came closest to answering my actual question. Thanks. You can create a class that lets you call stored procedures (this is known as a Data Access Component (DAC) class, which is usually r...
[ 0.2901912033557892, 0.07569032907485962, 0.008878526277840137, 0.17240653932094574, 0.0037331506609916687, -0.06358040124177933, 0.028949569910764694, -0.2520574927330017, -0.21006911993026733, -0.45016780495643616, -0.12408451735973358, 0.632781982421875, -0.36922505497932434, 0.235375732...
{ } public System.Collections.IEnumerable GetSchoolData() { string connectionString = ConfigurationManager.ConnectionStrings["MyConnectionString"].ConnectionString; Database db = DatabaseFactory.CreateDatabase(connectionString); string sqlCommand = "GetSchoolData"; DbCommand ...
[ -0.07557015120983124, -0.17160937190055847, 0.251430869102478, 0.1640799641609192, -0.04742066562175751, 0.0654260590672493, 0.39201706647872925, -0.23619991540908813, -0.0689772292971611, -0.9568613767623901, -0.2428969293832779, 0.11055917292833328, -0.3161073327064514, 0.290900319814682...
will look like this: ``` public class SchoolPage : Page { public void Page_Init(object sender, EventArgs e) { DataAccess dac = new DataAccess(); cmbEditSchool.DataSource = dac.GetSchoolData(); cmbEditSchool.DataBind(); } } ``` Note that this is just to help you learn how to do this. It is not a go...
[ 0.06997305899858475, -0.07817208021879196, 0.5525099635124207, 0.040488194674253464, 0.10824303328990936, -0.20230063796043396, 0.40896129608154297, 0.05891121178865433, -0.22383245825767517, -1.039041519165039, -0.3683212697505951, 0.2656104266643524, -0.27891620993614197, 0.2558451592922...
I have a UIView subclass that draws itself when `-drawRect:` is called. It only takes a moment, but under extreme circumstances, such as low memory and deletion of the instance when going to another view controller, the draw function doesn't complete before the the object is deallocated. How am I supposed to deal with...
[ 0.25845658779144287, 0.05173812434077263, 0.47492578625679016, -0.2615809738636017, -0.25983887910842896, -0.05439005419611931, 0.3111378252506256, 0.006478038150817156, 0.08437390625476837, -0.8995504379272461, 0.020933788269758224, 0.5886625647544861, -0.18074001371860504, 0.328102916479...
UIView uses, which come in before the UIView is released. However, since it's asynchronous, the `-didReceiveMemoryWarning` runs while it's drawing, causing the view to be released in the middle of the drawing. To answer the question in the title: no, not a priori. For example, reflection can be extremely handy when imp...
[ 0.4524381160736084, -0.12663981318473816, 0.6883796453475952, -0.034690000116825104, -0.3571833670139313, -0.35452887415885925, 0.1673329770565033, 0.045522090047597885, 0.15771305561065674, -0.8384345173835754, -0.147738516330719, 0.3845590353012085, -0.1656884253025055, 0.050077579915523...
contest with reflection in general. But don't try to implement dynamic dispatching or listeners/callbacks using reflection when OOP would be adequate.
[ 0.030253831297159195, 0.04729052633047104, -0.05528169497847557, 0.42238977551460266, -0.46686872839927673, -0.04518411308526993, 0.3191887438297272, -0.0674164742231369, 0.018068255856633186, -0.5598212480545044, -0.1351492702960968, 0.8593549132347107, 0.0263924989849329, -0.498823702335...
In [*Programming Python*](https://rads.stackoverflow.com/amzn/click/com/0596009259), Mark Lutz mentions the term *mixin*. I am from a C/C++/C# background and I have not heard the term before. What is a mixin? Reading between the lines of [this example](http://books.google.com/books?id=5zYVUIl7F0QC&pg=RA1-PA584&lpg=RA1...
[ 0.7694265842437744, -0.09727942198514938, -0.22774763405323029, -0.152805358171463, 0.10684547573328018, -0.19194194674491882, 0.2618313133716583, -0.06233544275164604, -0.10467388480901718, -0.08264272660017014, -0.21416321396827698, 0.2585136592388153, -0.701773464679718, 0.1078747585415...
inheritance? Is it just a matter of semantics? A mixin is a special kind of multiple inheritance. There are two main situations where mixins are used: 1. You want to provide a lot of optional features for a class. 2. You want to use one particular feature in a lot of different classes. For an example of number one, c...
[ 0.2579924166202545, -0.17741617560386658, 0.025796260684728622, -0.005220913328230381, -0.2107713669538498, -0.2910132110118866, 0.013750973157584667, -0.5299290418624878, -0.006044751964509487, -0.3761042654514313, -0.18985961377620697, 0.4589758813381195, -0.6428537964820862, 0.116243727...
I wanted to make a request object that supports accept headers, etags, authentication, and user agent support, I could do this: ``` from werkzeug import BaseRequest, AcceptMixin, ETagRequestMixin, UserAgentMixin, AuthenticationMixin class Request(AcceptMixin, ETagRequestMixin, UserAgentMixin, AuthenticationMixin, Bas...
[ 0.1639072746038437, -0.07035662978887558, 0.22288553416728973, -0.0393109992146492, -0.29047560691833496, -0.019669536501169205, 0.24914687871932983, -0.5227411389350891, 0.2890011966228485, -0.3017895221710205, 0.04724470525979996, 0.24537847936153412, -0.49649056792259216, 0.011281833983...
`IGNORE_DUP_KEY = ON` basically tells SQL Server to insert non-duplicate rows, but silently ignore any duplicates; the default behavior is to raise an error and abort the entire transaction when there are duplicates in a column that doesn't allow them. I've worked with a ton of data that normally has at least one dupl...
[ 0.08245593309402466, 0.2859918177127838, 0.17948272824287415, -0.08304703235626221, 0.2649615705013275, -0.2012142390012741, 0.3039974272251129, 0.11020125448703766, -0.5909914374351501, -0.16233892738819122, -0.05237709730863571, 0.25775274634361267, -0.7727409601211548, 0.337827891111373...
duplicate and error the whole thing out (Yes, I know the obvious solution is to make sure there are no duplicates, but sometimes I'm just handed a spreadsheet filled with data and told to load it ASAP). So, what is the reason for having the default be `OFF`, and why **wouldn't** you want it to be on all the time so th...
[ 0.5891180634498596, 0.13364677131175995, -0.004394741728901863, 0.28234967589378357, 0.187395378947258, -0.20119649171829224, 0.2756650149822235, 0.24471861124038696, -0.5718043446540833, -0.24438925087451935, -0.008936275728046894, 0.6126353740692139, -0.31941455602645874, 0.1949555873870...
to be some reason why it's not the default behavior. Mainly, is there a good reason **not** to use this that I should be aware of, or should it be up for evaluating on a case-by-case basis? Whenever there is a deviation from the "normal" in the database , you probably want to know about it. You kept the key unique b...
[ 0.6117348074913025, -0.08744331449270248, 0.06711673736572266, 0.3663193881511688, 0.3562520742416382, -0.41674095392227173, 0.17877662181854248, 0.04627351090312004, -0.377605676651001, -0.13647693395614624, 0.258395791053772, 0.41940930485725403, -0.28962242603302, 0.17796257138252258, ...
your mind' If that is intentional you can ask database to shut up by using IGNORE\_DUP\_KEY :)
[ 0.5535277724266052, 0.3199625015258789, 0.0821801945567131, -0.010524340905249119, 0.07854662090539932, -0.30220746994018555, 0.5406148433685303, 0.248049795627594, -0.1914679855108261, -0.4231812655925751, -0.04271015152335167, 0.3932165205478668, -0.649566650390625, 0.15856827795505524, ...
I have the following models: ``` class Author(models.Model): author_name = models.CharField() class Book(models.Model): book_name = models.CharField() class AuthorBook(models.Model): author_id = models.ForeignKeyField(Author) book_id = models.ForeignKeyField(Book) ``` With that being said, I'm trying to em...
[ 0.015244213864207268, 0.5292032957077026, 0.3997724950313568, -0.32697537541389465, 0.08729616552591324, -0.11837462335824966, -0.02806086465716362, -0.05775779113173485, -0.1509293019771576, -0.5553064942359924, 0.11719760298728943, 0.740490734577179, -0.23043124377727509, 0.0899608507752...
structure. You can't realloc memory that wasn't malloced in the first place. You should declare reverse as "char \*" and malloc it to start with. This will get you going, but you really should think about reallocing in chunks, rather than one byte at a time. Oh, I didn't bother to fix the fact that "reverse" is probab...
[ -0.31003546714782715, 0.14508697390556335, 0.20551340281963348, -0.3380691111087799, 0.10519774258136749, 0.242525115609169, 0.338716983795166, -0.07415317744016647, -0.2552894651889801, -0.4207379221916199, -0.2237822264432907, 0.18271367251873016, -0.336690753698349, 0.3576677441596985, ...
*ptr--); reverse = (char*)realloc(reverse, (i++ * sizeof(char))); reverse[strlen(reverse)-i] = *ptr; } printf("%s", reverse); return 0; } ```
[ -0.1837865710258484, -0.16719725728034973, 0.5855751037597656, -0.5607142448425293, 0.1198793575167656, 0.5173664093017578, 0.45323169231414795, -0.5393334031105042, -0.11031120270490646, -0.31460040807724, -0.39889153838157654, 0.6247227787971497, -0.24991732835769653, 0.2570824921131134,...
I have a multiline radio button and I want the bullet to be to the left of the content (as default) aligned to the top of the radio button control. What's the easiest way to do this in XAML? **Note**: Be sure to check out [Rachel's answer](https://stackoverflow.com/a/16342879/16940) - she takes this one stage further i...
[ 0.09926927834749222, 0.12106914073228836, 0.5402182340621948, 0.17109766602516174, 0.06533511728048325, -0.17854748666286469, 0.47744107246398926, -0.3248746991157532, 0.13278016448020935, -0.5178689956665039, 0.08624600619077682, 0.7004886269569397, -0.22542186081409454, 0.211283609271049...
will set the position of the icon automatically. You have no additional control over this: > A Bullet always aligns with the first line of text when the Child > object is a text object. If the Child object is not a text object, the > Bullet aligns to the center of the Child object. Unless you change the control tem...
[ 0.09941309690475464, 0.04651603847742081, 0.6091821789741516, 0.19205129146575928, 0.21308813989162445, 0.019390538334846497, 0.38959354162216187, -0.5120943784713745, 0.21266591548919678, -0.6459564566612244, 0.06363373249769211, 0.72210693359375, -0.30047425627708435, -0.0368800163269043...
many `VerticalAlignment` properties you try to set. ``` <RadioButton> <StackPanel> <TextBlock Text="First line"/> <TextBlock Text="Something else"/> </StackPanel> </RadioButton> ``` **BUT** fortunately you can put pretty much anything you want in a `TextBlock` using `InlineUIContainer`. The t...
[ -0.05035682022571564, -0.12669406831264496, 0.8359900712966919, -0.03879033774137497, -0.2643768787384033, -0.19144409894943237, 0.21537065505981445, -0.04698360338807106, -0.38183027505874634, -0.624937891960144, -0.05446823313832283, 0.5421789288520813, -0.2560544013977051, -0.0081680221...
TextWrapping="Wrap"> <TextBlock Text="Products with &lt;" VerticalAlignment="Center" Margin="0,0,5,0"/> <InlineUIContainer BaselineAlignment="Center"> <TextBox FontSize="30" Width="25" Text="10" Margin="0,0,5,0"/> </InlineUIContainer> <TextBlock VerticalAlignment...
[ -0.22468699514865875, -0.05871995911002159, 0.8074901700019836, -0.26375263929367065, -0.18696066737174988, 0.37494269013404846, 0.24682630598545074, -0.2799609303474426, -0.15167798101902008, -0.48984140157699585, -0.09051819145679474, 0.40113046765327454, -0.007951312698423862, -0.207580...
</TextBlock> <LineBreak/> <InlineUIContainer> <StackPanel> <CheckBox Content="Include unsold products" /> <CheckBox Content="Include something else" /> </StackPanel> </InlineUIContainer> </TextBlock> </RadioButton> ```
[ 0.24736274778842926, 0.12761801481246948, 0.22305385768413544, -0.24254469573497772, -0.24594064056873322, -0.35347551107406616, 0.1584421545267105, -0.4971969723701477, 0.031130900606513023, -0.1628357470035553, -0.23663845658302307, 0.48186343908309937, -0.39442315697669983, 0.0064957030...
Suppose I have an ASP.NET application running across several web servers behind a load balancer: Can I: * Force OutputCache (Page and/or Control level) to expire globally? * Force Data Cache (i.e. Cache.Insert) to expire? * Monitor ASP.NET caching usage (keys, RAM, etc) from a central location? One possible solution...
[ 0.3060086667537689, -0.03718709945678711, 0.5586261749267578, -0.025902416557073593, -0.16680650413036346, -0.17147955298423767, 0.2101828008890152, -0.23315347731113434, -0.2816687822341919, -0.6095503568649292, -0.1252903938293457, 0.3234196603298187, -0.319232314825058, 0.19793309271335...
expires the item at a defined point in time. ``` Response.Cache.SetExpires(DateTime.Now.AddSeconds(360)); Response.Cache.SetCacheability(HttpCacheability.Private) Response.Cache.SetSlidingExpiration(true); ``` Now when it comes to monitoring cache, unless there is an API on the cache to tell you, then there is no di...
[ 0.4054889678955078, -0.14178970456123352, 0.8278346061706543, 0.11291691660881042, 0.19732804596424103, -0.24559113383293152, 0.4798344671726227, -0.22539885342121124, -0.4902036488056183, -0.642000138759613, -0.201727494597435, 0.5604605674743652, -0.42554622888565063, 0.01710302382707595...
Then cc.Append("<b>Contents of the ASP.NET Cache (" _ & Cache.Count.ToString() & " items):</b><br />") For Each item As Object In Cache cc.Append("Key:'" & item.Key & "' Type:" _ & item.Value.GetType().ToString() & "<br />") Next Else cc.Append("<b>ASP.N...
[ 0.14222723245620728, -0.004378357902169228, 0.48182442784309387, 0.10589104890823364, 0.0536167286336422, -0.040788132697343826, -0.1787259578704834, -0.4439416527748108, -0.5471531748771667, -0.33447209000587463, -0.15952487289905548, 0.37415120005607605, -0.28629353642463684, 0.315019756...
End If ```
[ 0.0691138431429863, 0.2896515429019928, 0.10454868525266647, -0.060777679085731506, -0.13093841075897217, -0.4864383339881897, 0.15016253292560577, -0.11301429569721222, 0.2619117498397827, -0.4032612144947052, -0.36051052808761597, 0.4201245903968811, -0.16840113699436188, 0.2324494719505...
I have a list of files, and i need to read them each in a specific order into byte[] of a given size. This in itself is not a problem for a single file, a simple *while ((got = fs.Read(piece, 0, pieceLength)) > 0)* gets the job done perfectly fine. The last piece of the file may be smaller than desired, which is fine. ...
[ 0.37555596232414246, 0.08010349422693253, 0.18687455356121063, -0.0437920056283474, -0.11892851442098618, 0.1786837875843048, 0.1260872781276703, -0.1843060553073883, -0.5684133172035217, -0.6654741168022156, 0.010682416148483753, 0.40882766246795654, -0.1075332835316658, 0.229234173893928...
(pieceLength-got) of the next file, and then keep on going on until the end of the last file. So essentially, given X files, I will always read pieces that are exactly pieceLength long, except for the very last piece of the very last file, which may be smaller. I just wonder if there is already something build in .ne...
[ 0.3275015950202942, -0.13060665130615234, 0.1751919388771057, 0.05146193131804466, -0.24607811868190765, -0.2208399623632431, 0.09984296560287476, 0.09850554913282394, -0.4266888201236725, -0.5101291537284851, -0.04423823580145836, 0.2888990044593811, -0.06870979070663452, 0.36542522907257...
not have to change my calling code that reads the data, but before I reinvent the wheel I'd just like to double check that the wheel is not already built into the BCL. Thanks :) I don't believe there's anything in the framework, but I'd suggest making it a bit more flexible - take an `IEnumerable<Stream>` in your cons...
[ 0.6230862736701965, 0.038573380559682846, 0.22735591232776642, 0.044635429978370667, 0.055394429713487625, -0.16827137768268585, -0.12852342426776886, -0.20211993157863617, -0.11681336909532547, -0.4649243950843811, 0.2100442796945572, 0.6229951977729797, -0.3450752794742584, 0.20761127769...
it reads from, but you *may* not want it to have to iterate through all the rest of the streams and close them all if *it's* closed prematurely.
[ 0.6849987506866455, 0.1240975558757782, 0.5329618453979492, 0.15626715123653412, -0.025117700919508934, -0.04485703259706497, 0.3085845410823822, 0.03236731141805649, 0.2068430781364441, -0.5870026350021362, -0.1340193748474121, 0.06943379342556, -0.13087058067321777, 0.4742427468299866, ...
We are currently in the process of migrating from Server 2003 to Server 2008. We have a few different environment changes for our ASP.NET application. Our Test Environment is working perfectly at this time, but the production machine with same code is injecting Invalid Characters into the SQL. The following is the SQ...
[ -0.09668946266174316, -0.36589306592941284, 0.5811131000518799, 0.016249023377895355, -0.3216714859008789, 0.18932615220546722, -0.08027300238609314, -0.20075364410877228, -0.005062513519078493, -0.6031271815299988, 0.03252411633729935, 0.5232090353965759, -0.21163572371006012, 0.061437573...
[t0].dBy], [t0].[timestamp], [t0].[DetailConfirmDate], [t0].[DetailConfirmBy], [t0].[SalesConfirmDate], [t0].[SalesConfirmBy], [t0].[ContractTypeId] FROM [dbo].[tbl_VenueProgramDetails] AS [t0] WHERE ([t0].[VenueID] = @p0) AND ([t0].[ProgramID] = @p1)',N'@p0 int,@p1 int',@p0=7477,@p1=27 ``` I've copied all of the dll...
[ 0.5616928935050964, -0.11063412576913834, 0.5749279260635376, -0.024691808968782425, 0.01643565483391285, 0.09007599949836731, 0.3014640510082245, -0.20508988201618195, 0.12741707265377045, -0.5801770687103271, -0.19303278625011444, 0.8396537899971008, 0.001746457302942872, 0.2748434245586...
up being a network card driver. The physical machine was the issue not configuration or code. EDIT: The machine I was having issues with is a HP DL360 with Broadcom Network Cards. We will be contacting HP regarding the issue. The packets were being assembled wrong when sending the LINQ request across the wire.
[ 0.3138014078140259, 0.1534823477268219, 0.3737335503101349, 0.3297683000564575, -0.12272369116544724, -0.10351860523223877, -0.2293778508901596, -0.1975739598274231, -0.20087669789791107, -0.4425192177295685, 0.1710660457611084, 0.3890567719936371, -0.3494366705417633, 0.36014237999916077,...
I have a server in at a hoster (which has a static IP) and want to run a server at home too and don't want to buy the dyndns package from dyndns.com I would either like to find a program that does this without costing money and using my own server and domain so I can have myclient.domain.com or I would like to write ...
[ 0.36256206035614014, 0.07389189302921295, 0.38819462060928345, 0.15345190465450287, -0.3766220510005951, -0.2431642860174179, 0.2716336250305176, 0.0006302546244114637, -0.3161083161830902, -0.5463794469833374, 0.18014633655548096, 0.23478570580482483, -0.3300735652446747, 0.32226672768592...
the server with the static ip to run as the dyndns managing server I use zoneedit.com for my DNS servers, and they have a free dynamic service that works fine for my home box. (On the other hand, my home box changes IP about twice a year, so it's not like I stress it.) On my home box, I have a script that polls a tiny...
[ -0.02949376404285431, -0.25403374433517456, 0.5587449669837952, 0.2550846338272095, -0.03743912652134895, -0.045379191637039185, 0.03338371962308884, 0.3762306869029999, -0.4985325038433075, -0.6443011164665222, -0.00016024276555981487, 0.018021130934357643, -0.019134867936372757, 0.253022...
get home, I'll try to remember to post the script.
[ 0.5035397410392761, 0.378368079662323, 0.3663945496082306, -0.1574883610010147, 0.0640091747045517, -0.2680930197238922, 0.34325093030929565, 0.3360295593738556, 0.21337634325027466, -0.2725467383861542, 0.08030464500188828, 0.30299943685531616, 0.4486079216003418, -0.12982366979122162, ...
i have three double variable a ,b and c ``` a = 0.000006 b = 6 c = a/b; ``` so C should be 0.000001 i want to show this value in text box so i wrote ``` textbox.text = c.tostring(); ``` but it's give result as "1E-06".. Can anybody help me out how can i put correct value in textbox ? Thanks ``` a = 0.000006;...
[ -0.0734674483537674, 0.5244103074073792, 0.5070620775222778, -0.2685096263885498, -0.1250569224357605, 0.4194570779800415, 0.3129669725894928, -0.275195837020874, -0.1415780931711197, -0.12047635018825531, 0.12059564143419266, 0.5200055241584778, -0.21975813806056976, 0.15786966681480408, ...
What are your thoughts on this? I'm working on integrating some new data that's in a tab-delimited text format, and all of the decimal columns are kept as single integers; in order to determine the decimal amount you need to multiply the number by .01. It does this for things like percentages, weight and pricing inform...
[ 0.5364777445793152, 0.13762442767620087, 0.24769070744514465, 0.257644921541214, -0.08621367812156677, 0.37219899892807007, -0.4359464645385742, -0.06460195034742355, -0.4499376118183136, -0.1291571408510208, 0.6187810301780701, 0.5434139370918274, 0.1504983752965927, 0.3546256124973297, ...
Should I be keeping my data structure identical to the one provided by the vendor, or should I make the database columns true decimals and use SSIS or some sort of ETL process to automatically multiply the integer columns into their decimal equivalent? At this point I haven't decided if I am going to use an ORM or Stor...
[ 0.4238249957561493, 0.19528327882289886, 0.08376898616552353, 0.12673301994800568, 0.1283309906721115, 0.17483142018318176, -0.25642290711402893, -0.08429086208343506, -0.05758136138319969, -0.2787555754184723, 0.11125079542398453, 0.5887166857719421, 0.004120242316275835, 0.16189108788967...
// ... private int _price; public decimal Price { get { return (this._price * .01); } set { this._price = (value / .01); }
[ 0.2013075053691864, -0.31024694442749023, 0.2785884439945221, 0.1899581104516983, 0.07665759325027466, 0.3580613434314728, -0.45949047803878784, -0.11921492218971252, 0.003350252751260996, -0.23957255482673645, -0.44025060534477234, 0.9377543926239014, 0.16168339550495148, 0.30203750729560...
} } ``` But that seems like extra and unnecessary work on the part of a class. How would you approach this, keeping in mind that the data is provided in the integer format by a vendor that you will regularly need to get updates from. "Do you think this is a good or bad idea?" Bad. "Should I be keeping my data struc...
[ 0.3630092442035675, 0.25899478793144226, 0.16174562275409698, 0.26254671812057495, 0.1276225745677948, -0.01995503343641758, 0.03372742235660553, 0.2971501052379608, -0.20368006825447083, -0.3595125377178192, -0.0008133641676977277, 0.7258747220039368, -0.1662512570619583, 0.20601855218410...
doesn't any real significance. The data is decimal. Decimal math works. Use the decimal math provided by your language and database. Don't invent your own version of Decimal arithmetic.
[ 0.318342387676239, 0.39031997323036194, -0.13699497282505035, 0.5864202380180359, 0.05366120487451553, 0.0059455703012645245, 0.27000942826271057, 0.49911051988601685, -0.12597431242465973, -0.21451829373836517, 0.042488910257816315, 0.08424747735261917, 0.014817150309681892, 0.06344950199...
He is good programmer (won some competitions) but he absolutely ignores formatting. He consider i, j, k beautiful... I hope he won't find out about existence of goto keyword. I told my students (post-secondary) that they had the choice of writing code well or of me writing their assignments in the same sort of way that...
[ 0.2389809638261795, 0.49911171197891235, -0.19732144474983215, 0.2952754497528076, -0.1712450236082077, -0.07103216648101807, 0.20741982758045197, 0.03529568761587143, -0.0705936923623085, -0.48684030771255493, -0.29271143674850464, 0.18765221536159515, 0.16268745064735413, -0.155899703502...
random whitespace * capitalize random letters They could then have the assignment... hey its "right" (all of the words are there) good luck understanding what the assignment is though. Oddly the complaints stopped at that point :-) I also compared it to English. We use paragraph breaks, capitalizations, etc... as a ...
[ 0.21542485058307648, 0.018870888277888298, -0.14907711744308472, 0.3001308739185333, -0.4905209541320801, -0.2918859124183655, 0.20286232233047485, 0.41146111488342285, -0.12114927172660828, -0.5196981430053711, 0.20174087584018707, 0.302020788192749, -0.05782704055309296, -0.0349143147468...
I have been reading a lot about [Reinforcement Learning](http://en.wikipedia.org/wiki/Reinforcement_Learning) lately, and I have found ["Reinforcement Learning: An Introduction"](http://incompleteideas.net/sutton/book/ebook/the-book.html) to be an excellent guide. The author's helpfully provice [source code](http://inc...
[ 0.27136123180389404, 0.4476991891860962, -0.2461012750864029, -0.21325770020484924, -0.4022574722766876, -0.140290766954422, 0.4991942346096039, 0.142578125, -0.11553361266851425, -0.5826725363731384, 0.028286512941122055, 0.19834284484386444, -0.22298865020275116, -0.13894954323768616, ...
I did not contact him, and figured Stack Overflow would be a much better choice. I have been trying to run the code on a linux machine, using both GNU's CLISP and SBCL but have not been able to run it. I keep getting a whole list of errors using either interpreter. In particular, most of the code appears to use a lot ...
[ 0.2927991449832916, 0.3413150906562805, 0.1838962882757187, 0.01626044511795044, -0.09604421257972717, -0.3645896017551422, 0.3065145015716553, 0.08551129698753357, -0.0575876347720623, -0.4444759786128998, -0.12538906931877136, 0.6159206628799438, -0.7959030866622925, 0.21780747175216675,...
it could just be some other package of code. ``` > * (load "utilities.lisp") > > debugger invoked on a > SB-KERNEL:SIMPLE-PACKAGE-ERROR in > thread #<THREAD "initial thread" > RUNNING {100266AC51}>: The name > "CCL" does not designate any package. > > Type HELP for debugger help, or > (SB-EXT:QUIT) to exit from SBC...
[ 0.029210079461336136, -0.003747978713363409, 0.2651158571243286, -0.10010536015033722, 0.030394984409213066, -0.3559266924858093, 0.4272826015949249, -0.16821713745594025, -0.14080512523651123, -0.3191588819026947, -0.24892526865005493, 0.3617728054523468, -0.558465301990509, 0.27541086077...
> (/ (- RSS-UTILITIES::MAX-V > RSS-UTILITIES::V-SIZE) 2)) ; ; caught > WARNING: ; undefined variable: > *MENUBAR-BOTTOM* > > ; (- > RSS-UTILITIES::*SCREEN-HEIGHT* > RSS-UTILITIES::*MENUBAR-BOTTOM*) ; ; > caught WARNING: ; undefined > variable: *SCREEN-HEIGHT* > > ; (IF RSS-UTILITIES::CONTAINER ; > (RS...
[ -0.11854211986064911, -0.24506361782550812, 0.4283764362335205, -0.3645676374435425, 0.2088477909564972, 0.037576187402009964, 0.26500311493873596, -0.31741198897361755, -0.15418641269207, -0.29528796672821045, -0.5269624590873718, 0.4720481336116791, -0.4457114040851593, -0.07472106069326...
undefined function: > POINT-H > > ; (RSS-UTILITIES::POINT-V > (RSS-UTILITIES::VIEW-SIZE > RSS-UTILITIES::VIEW)) ; ; caught > STYLE-WARNING: ; undefined function: > POINT-V ``` Anybody got any idea how I can run this code? Am I just totally ignorant of all things lisp? **UPDATE [March 2009]:** I installed Clo...
[ -0.34081077575683594, 0.3162173926830292, 0.5797067880630493, -0.01348439883440733, 0.033222392201423645, -0.43664926290512085, 0.3083983063697815, -0.0709865540266037, -0.14899273216724396, -0.0385998971760273, -0.14083491265773773, 0.6360883712768555, -0.5840334892272949, 0.0895774811506...
RANDOM-STATE called with arguments (64497 9) . > While executing: CCL::READ-DISPATCH, in process listener(1). > Type :GO to continue, :POP to abort, :R for a list of available restarts. > If continued: Retry applying RANDOM-STATE to (64497 9). > Type :? for other options. 1 > ``` Unfortuately, I'm still learning abou...
[ -0.053559809923172, -0.10920266807079315, 0.28195083141326904, -0.07267060875892639, -0.1985035091638565, 0.0006419984274543822, 0.1642543375492096, -0.04573766142129898, -0.11702051758766174, -0.33319607377052307, -0.08992744237184525, 0.7052176594734192, -0.5354956388473511, 0.1049432978...
also is slightly special for MCL. You have to port it to portable Common Lisp ([make-random-state](http://www.lispworks.com/documentation/HyperSpec/Body/f_mk_rnd.htm), etc.). Also the file names are special for the Mac. Clozure CL is a fork from Macintosh Common Lisp, but has be changed to Unix conventions (pathnames,...
[ -0.35945558547973633, 0.008149953559041023, 0.7566099166870117, 0.12192533910274506, -0.10096461325883865, -0.1796281337738037, -0.24689270555973053, 0.22890833020210266, -0.42826563119888306, -0.1625005453824997, -0.13849304616451263, 0.42185306549072266, -0.4694633483886719, -0.070860512...
I have following questions regarding strings in C++: 1>> which is a better option(considering performance) and why? 1. ``` string a; a = "hello!"; ``` OR 2. ``` string *a; a = new string("hello!"); ... delete(a); ``` 2>> ``` string a; a = "less"; a = "moreeeeeee"; ``` how exactly memory management is hand...
[ -0.024399764835834503, -0.005408032331615686, 0.12693747878074646, -0.15555335581302643, -0.04023824259638786, -0.056120142340660095, 0.20133985579013824, -0.39906045794487, -0.12890413403511047, -0.4786812365055084, -0.35769858956336975, 0.879818320274353, -0.3437112867832184, 0.003223936...
other operations). Then you assign a new value, overwriting the length value that was already set. It may also have to perform a check to see how big the current buffer is, and whether or not more memory should be allocated. ``` string *a; a = new string("hello!"); ... delete(a); ``` Calling new requires the OS and ...
[ -0.07092572003602982, -0.13953059911727905, 0.18356028199195862, -0.24619810283184052, 0.22515632212162018, -0.10539073497056961, 0.4664459526538849, -0.27923670411109924, -0.4923690855503082, -0.5992663502693176, -0.4772377908229828, 0.6746910810470581, -0.3105616271495819, 0.134177848696...
memory leak, *in addition* to a string that is extremely slow to allocate. So this is bad. ``` string a; a = "less"; a = "moreeeeeee"; ``` Like in the first case, you first initialize a to contain the empty string. Then you assign a new string, and then another. Each of these *may* require a call to new to allocate...
[ 0.020479250699281693, -0.1575436145067215, -0.10340002179145813, 0.08177179098129272, 0.14940513670444489, 0.13249091804027557, 0.25683239102363586, -0.16765569150447845, -0.1141427531838417, -0.5445563197135925, -0.21572555601596832, 0.5099269151687622, -0.32015174627304077, 0.30796048045...
have a nonsensical empty string anywhere in your program. If the string exists, it contains the value you want. About memory management, google RAII. In short, string calls new/delete internally to resize its buffer. That means you *never* need to allocate a string with new. The string object has a fixed size, and is ...
[ 0.21611467003822327, -0.09451775252819061, 0.19706608355045319, -0.07686837017536163, 0.2747068703174591, -0.3188571035861969, 0.5074337124824524, 0.11826981604099274, -0.4424460232257843, -0.769802987575531, -0.46779415011405945, 0.7439691424369812, -0.20605000853538513, 0.191312834620475...
In an answer to the question *[Documents for a project?](https://stackoverflow.com/questions/533126/documents-for-a-project)*, Chris Ballance replied that ["User Stories" and a "burndown chart" are the two most useful types of project documentation for a developer.](https://stackoverflow.com/questions/533126/documents-...
[ 0.6148300766944885, 0.42785540223121643, -0.4378136992454529, 0.1835695505142212, -0.012292200699448586, -0.11491623520851135, 0.19747847318649292, -0.04268905892968178, -0.362666517496109, -0.10713355988264084, -0.09248469024896622, 0.34766915440559387, 0.06473085284233093, -0.12880106270...
start as far as books are concerned is [User Stories Applied](https://rads.stackoverflow.com/amzn/click/com/0321205685) and [Agile Estimation and Planning](https://rads.stackoverflow.com/amzn/click/com/0131479415) both by Mike Cohn. This have excellent examples and good starting points for anyone first coming to agile ...
[ 0.12237831950187683, 0.21404244005680084, 0.00425844406709075, 0.2147228866815567, -0.039384856820106506, 0.05495881289243698, 0.24487781524658203, -0.4050326347351074, -0.24770855903625488, -0.3479389250278473, -0.05519508942961693, 0.5545724034309387, 0.2379758358001709, -0.5351763963699...
you run on your current story points left in an iteration, User stories are more complex than that and do require a bit of reading to wrap your head around. Start with User Stories Applied book for that. Hope that helps!
[ 0.40035364031791687, -0.19561584293842316, 0.0739360824227333, 0.5440821647644043, 0.06997346132993698, 0.18370674550533295, 0.3856772482395172, 0.17824555933475494, -0.041886843740940094, -0.5397617220878601, 0.3869381844997406, 0.4714878797531128, 0.3369758129119873, -0.05876034870743751...