text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
on Windows. As Silverlight becomes more capable, we may find many of the .NET calls that currently rely on Win32 no longer do so. I guess my point is that we ARE starting to see some changes **in the Windows world** at least. Of course, as soon as you need to be more cross-platform, C/C++ becomes more appealing agai...
[ 0.2583712339401245, 0.11875969171524048, 0.3639916479587555, 0.11912444233894348, -0.1761714220046997, -0.33314770460128784, 0.05695071071386337, 0.3132288157939911, -0.4307486116886139, -0.5418995022773743, -0.04407662898302078, 0.6328015327453613, -0.16250400245189667, 0.1935919523239135...
I want to open a file dialog box in user control. I used `using System.Windows.Forms`, but still I can't access SaveFileDialog class. Can anybody tell me how to do this? Thanks. You cannot use SaveFileDialog in asp.net (if I look at the tags of the question). It seems you want to let the uset click on some button to d...
[ 0.33940544724464417, -0.12921568751335144, 0.2244873195886612, 0.22920477390289307, -0.19179868698120117, -0.28470754623413086, 0.37622565031051636, -0.13840149343013763, -0.43961575627326965, -0.6455368995666504, 0.013477343134582043, 0.8619344234466553, -0.12986154854297638, -0.118341326...
How can a program capture ~~generates~~ events from a dynamically created button control in asp.net? > Button ButtonDeleteFromDB = new Button(); > > > ButtonDeleteFromDB.Text = "Delete"; > > > ButtonDeleteFromDB.ID = "btnDeleteFromDB" + ctrlCount.ToString(); > > > ButtonDeleteFromDB.Click += new EventHandler(Butt...
[ 0.016791831701993942, -0.5875519514083862, 0.24176332354545593, -0.04287371784448624, 0.20680774748325348, 0.08097783476114273, 0.3966681659221649, -0.38835468888282776, -0.2556615173816681, -0.4773980677127838, -0.06776247918605804, 0.514566957950592, -0.4490026831626892, -0.0067464192397...
Or any open source project which utilize collective intelligence extensively?. There's a new book out from Manning, ["Collective Intelligence in Action"](http://www.manning.com/alag/). There are also code samples available written in Java. I also recommend the Toby Segaran book. Coming from a Java background I was able...
[ 0.6200361847877502, -0.03943322226405144, -0.7077035307884216, 0.15578946471214294, -0.24523571133613586, 0.09790891408920288, 0.3191814422607422, 0.04998692870140076, -0.1917126476764679, -0.3845599293708801, 0.13485050201416016, 0.5448001623153687, -0.19646340608596802, -0.46939274668693...
I know this will be a difficult question, so I am not necessarily looking for a direct answer but maybe a tutorial or a point in the right direction. What I am doing is programing a robot that will be controlled by a remote operator. We have a 3D rendering of the robot in SolidWorks. What I am looking to do is get the...
[ 0.67374187707901, -0.06117922440171242, 0.44306933879852295, 0.1757510006427765, 0.11510752141475677, -0.06315542012453079, 0.20749950408935547, 0.04226754233241081, -0.18138670921325684, -0.806879997253418, -0.08037322014570236, 0.6303646564483643, -0.09483478963375092, 0.2966228127479553...
video to look at, but that doesn't really matter for this question. Any help would be greatly appreciated. Thanks! Sounds like a tough idea to implement. Well, for VB you are stuck with [MDX](http://en.wikipedia.org/wiki/Managed_DirectX) 1.1(Comes with DirectX SDK) or [SlimDX](http://slimdx.mdxinfo.com/wiki/index.php?...
[ 0.7680827379226685, -0.2827529013156891, 0.8184040188789368, 0.28296393156051636, -0.47581395506858826, -0.35056862235069275, -0.0014614134561270475, 0.0599488727748394, -0.35821694135665894, -0.5785923004150391, -0.038010746240615845, 0.6761258244514465, -0.3090426027774811, 0.21854963898...
game engine to simplified you job. Try [Ogre](http://www.ogre3d.org/), and it's managed wrapper [MOgre](http://www.ogre3d.org/wiki/index.php/MOGRE). It was one of the candidate for my project. But I ended up with SlimDX due to Ogre not supporting video very well. But since video is not your requirement, you can really ...
[ 0.24059434235095978, 0.04910966008901596, 0.46502867341041565, 0.16379062831401825, -0.24531391263008118, -0.07996897399425507, -0.09005870670080185, -0.08111711591482162, -0.09295579791069031, -0.6048915386199951, 0.15717390179634094, 0.9199090003967285, -0.3469504714012146, 0.03437502309...
to do that. You might need to spend a bit on that or spend more time looking for free converter tools. That's about it. If you have more question, post again. Good Luck
[ 0.48379257321357727, 0.12813366949558258, 0.2121196985244751, 0.20358586311340332, 0.021729474887251854, -0.26616764068603516, 0.281065434217453, 0.73716139793396, -0.2138737589120865, -0.43526723980903625, 0.012755266390740871, 0.3877696990966797, 0.20926514267921448, -0.10298227518796921...
I was browsing the SGI STL documentation and ran into [`project1st<Arg1, Arg2>`](http://www.sgi.com/tech/stl/project1st.html). I understand its definition, but I am having a hard time imagining a practical usage. Have you ever used project1st or can you imagine a scenario? My guess is that if you were using the strate...
[ 0.30136093497276306, -0.18635793030261993, -0.09552682936191559, -0.0011644557816907763, 0.002420286415144801, -0.255977600812912, 0.1861484944820404, 0.11243757605552673, -0.4248679280281067, -0.6164540648460388, -0.1007596105337143, 0.271899551153183, -0.24276390671730042, -0.20831952989...
Suppose I have this code: ``` var myArray = new Object(); myArray["firstname"] = "Bob"; myArray["lastname"] = "Smith"; myArray["age"] = 25; ``` Now if I wanted to remove "lastname"?....is there some equivalent of `myArray["lastname"].remove()`? (I need the element gone because the number of elements is important an...
[ -0.22847437858581543, 0.27924323081970215, 0.2571123242378235, -0.3868510127067566, 0.013153295032680035, 0.0003827554464805871, 0.24080903828144073, -0.41909515857696533, -0.23968350887298584, -0.6876971125602722, -0.3737034201622009, 0.24358047544956207, -0.3246220052242279, 0.1445631533...
(ie. an array with a missing index). When working with instances of `Array`, if you do not want to create a sparsely populated array - and you usually don't - then you should use [`Array#splice`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/splice) or [`Array#pop`](https://dev...
[ -0.1268749237060547, 0.23466013371944427, 0.03697078302502632, 0.004846699070185423, 0.039628881961107254, -0.17134501039981842, 0.2345406711101532, -0.15100309252738953, -0.3109804093837738, -0.4026910662651062, -0.5929380059242249, 0.3515346050262451, -0.4575468897819519, 0.4433266818523...
What are the C++ coding and file organization guidelines you suggest for people who have to deal with lots of interdependent classes spread over several source and header files? I have this situation in my project and solving class definition related errors crossing over several header files has become quite a headach...
[ 0.5720040798187256, 0.31736692786216736, -0.015841752290725708, 0.12166060507297516, -0.0696917250752449, -0.1785934716463089, 0.3719218671321869, 0.05299462750554085, -0.27170461416244507, -0.6304923892021179, 0.08479470759630203, 0.6939916610717773, -0.3588050901889801, -0.03757753968238...
down the road. * Put a set of related (and interdependent) functionality into a single file. Java and other environments encourage one-class-per-file. With C++, you often want one *set of* classes per file. It depends on the structure of your code. * Prefer forward declaration over `#include`s whenever possible. This a...
[ 0.3080659508705139, 0.2610574960708618, -0.08986467868089676, -0.14566262066364288, -0.4538688659667969, 0.024479206651449203, 0.10381108522415161, -0.2906363308429718, -0.23481272161006927, -0.6761910915374756, -0.07611699402332306, 0.5773321986198425, -0.36639830470085144, 0.116698868572...
be a library consumed by other developers, there are some additional steps that are important to take: * If necessary, use the concept of "private headers". That is, header files that are required by several source files, but never required by the public interface. This could be a file with common inline functions, ma...
[ 0.6386706829071045, 0.0994955524802208, -0.07398595660924911, 0.03888469189405441, -0.0899529680609703, -0.24169370532035828, 0.1379663199186325, 0.058625977486371994, -0.16586615145206451, -0.6514701843261719, -0.1015605702996254, 0.5232754945755005, -0.4590335190296173, -0.11439096927642...
recommend finding a copy of John Lakos' book *Large-Scale C++ Software Design*. It's a pretty hefty book, but if you just skim through some of his discussions on physical architecture, you'll learn a lot.
[ 0.2905195653438568, 0.3640974164009094, -0.35874074697494507, 0.3994341492652893, 0.1716042160987854, -0.08591369539499283, 0.07512883096933365, 0.4236137568950653, -0.11842262744903564, -0.4279104173183441, -0.07927366346120834, 0.7271952629089355, 0.16688407957553864, 0.14454735815525055...
I have unevenly distributed data (wrt `date`) for a few years (2003-2008). I want to query data for a given set of start and end date, grouping the data by any of the supported intervals (day, week, month, quarter, year) in [PostgreSQL 8.3](https://www.postgresql.org/docs/8.3/functions-datetime.html#FUNCTIONS-DATETIME-...
[ -0.18927812576293945, 0.11029838770627975, 0.5395821928977966, -0.10116550326347351, -0.07589468359947205, 0.1738494336605072, 0.10585583001375198, 0.0009625721140764654, -0.2084895521402359, -0.37369051575660706, 0.1977686733007431, 0.2296077162027359, 0.042981650680303574, 0.561536252498...
| 31 2008-02-01 | 14 2008-03-01 | 21 2008-04-01 | 28 2008-05-01 | 44 2008-06-01 | 100 2008-07-01 | 72 2008-08-01 | 91 2008-09-01 | 92 2008-10-01 | 79 2008-11-01 | 65 (12 rows) ``` But some of them miss some intervals because there is no data present, as this one: ``` select ...
[ -0.2840542495250702, 0.4162725508213043, 0.380758672952652, -0.07686542719602585, -0.14355260133743286, 0.5716282725334167, 0.1986362338066101, -0.17952027916908264, -0.1807936728000641, -0.2947330176830292, -0.1421278566122055, 0.4106627404689789, 0.08898810297250748, 0.3289269208908081, ...
by date_trunc('month',date) order by date_trunc('month',date); to_char | count ------------+------- 2007-12-01 | 2 2008-01-01 | 2 2008-03-01 | 1 2008-04-01 | 2 2008-06-01 | 1 2008-08-01 | 3 2008-10-01 | 2 (7 rows) ``` where the required resultset is: ``` to_char | count ...
[ -0.8234463334083557, 0.527912974357605, 0.44999948143959045, -0.06828412413597107, -0.03765216842293739, 0.5414231419563293, 0.3126550018787384, -0.23797990381717682, -0.25771281123161316, -0.21511663496494293, -0.3418426215648651, 0.09106123447418213, 0.11712812632322311, 0.22279633581638...
2008-04-01 | 2 2008-05-01 | 0 2008-06-01 | 1 2008-07-01 | 0 2008-08-01 | 3 2008-09-01 | 0 2008-10-01 | 2 2008-11-01 | 0 (12 rows) ``` A count of 0 for missing entries. I have seen earlier discussions on Stack Overflow but they don't solve my problem it seems, since my grouping ...
[ -0.46859925985336304, 0.38176098465919495, 0.281227707862854, -0.061904408037662506, -0.2674044966697693, 0.24426430463790894, 0.36270058155059814, -0.38929876685142517, -0.39143437147140503, -0.2974870502948761, -0.10245636105537415, 0.2145247906446457, -0.15012520551681519, 0.23512652516...
like left join with a calendar table or sequence table will not help I guess. My current solution to this is to fill in these gaps in Python (in a Turbogears App) using the calendar module. Is there a better way to do this? You can create the list of all first days of the last year (say) with ``` select distinct dat...
[ 0.06701749563217163, -0.028544887900352478, 0.7030566334724426, -0.05413702130317688, -0.20725470781326294, -0.08302710950374603, 0.1538711041212082, 0.05303362384438515, -0.390076607465744, -0.26019957661628723, 0.2445553094148636, 0.39086395502090454, -0.04662705585360527, 0.119956344366...
00:00:00+01 2008-12-01 00:00:00+01 ``` Then you can join with that series.
[ 0.3674145042896271, 0.11154629290103912, 0.6384395956993103, 0.18629240989685059, -0.15786434710025787, -0.44532158970832825, 0.20679272711277008, -0.058689046651124954, -0.03900139406323433, -0.5289472341537476, -0.2479136437177658, 0.6429538726806641, 0.1679442971944809, 0.37258622050285...
In 64 bit versions of windows, 32 bit software is installed in "c:\program files (x86)". This means you cannot use $(programfiles) to get the path to (32 bit) software. So I need a $(ProgramFiles32) to overcome this in my MSBuild project. I don't want to change the project depending on the os it is running on. I have ...
[ 0.10367310792207718, 0.1602458357810974, 0.2513553500175476, 0.04197702929377556, 0.2596656382083893, -0.25860360264778137, 0.478036493062973, 0.0476444810628891, -0.10439091920852661, -0.8125856518745422, -0.3794930577278137, 0.6249869465827942, -0.3379290997982025, 0.09926837682723999, ...
it's going to be available and [Fail Fast](http://en.wikipedia.org/wiki/Fail-fast) if it's not). If you're not and need something that can Do The Right Thing even when executed in an MSBuild 2.0 or later environment (i.e., back to VS 2005 environments), the complete solution is: ``` <PropertyGroup> <!--MSBuild 4....
[ -0.18411962687969208, -0.11291138827800751, 0.6412627696990967, -0.09877962619066238, 0.3511612117290497, -0.10919525474309921, 0.6265743970870972, -0.1146007776260376, 0.037783827632665634, -0.7037608623504639, -0.5086806416511536, 0.5989953875541687, -0.18592475354671478, -0.004541545175...
available. http://stackoverflow.com/questions/336633 NB this trick (Adding a literal " (x86)" to the 64 bit Program Files path) may or may not work on all versions/locales of Windows --> <ProgramFiles32 Condition ="'$(ProgramFiles32)'=='' AND 'AMD64' == '$(PROCESSOR_ARCHITECTURE)'">$(ProgramFiles) (x86)</Pro...
[ 0.07422087341547012, 0.09168542176485062, 0.391690194606781, 0.03219972550868988, 0.06612090766429901, 0.017125844955444336, 0.3582475781440735, -0.3325234651565552, -0.3813418447971344, -0.5174908638000488, -0.4998357892036438, 0.3835621774196625, -0.1642778515815735, 0.4272216558456421, ...
support .NET 2.0.
[ 0.2949996590614319, -0.06116008013486862, 0.2693657875061035, 0.05925070494413376, -0.14568500220775604, -0.3754763901233673, 0.3190844655036926, 0.0621381513774395, 0.07742569595575333, -0.5947940349578857, -0.6964288353919983, 0.49311408400535583, -0.5173543095588684, -0.1798060685396194...
I am totally new to XSLT and can't work out where I am going wrong with the following code. ``` <xsl:variable name="var" select="boolean('false')"/> <xsl:if test="$var'">variable is true</xsl:if> ``` It is always returning true when it is meant to be false. Why? The value of the $var variable as defined in:    `<x...
[ 0.18578533828258514, 0.23691532015800476, 0.5809105038642883, -0.1574667990207672, -0.10967529565095901, -0.2591273784637451, 0.36510348320007324, -0.20344378054141998, 0.37210533022880554, -0.5044196248054504, -0.20626427233219147, 0.7694547176361084, -0.03098757565021515, 0.1167246252298...
to a boolean as follows: * a number is true if and only if it is neither positive or negative zero nor NaN * a node-set is true if and only if it is non-empty * a string is true if and only if its length is non-zero * an object of a type other than the four basic types is converted to a boolean in a way that is depend...
[ 0.07843667268753052, 0.07593392580747604, 0.07188361883163452, -0.02395791746675968, -0.1307903677225113, -0.34678763151168823, 0.3803769052028656, -0.09529894590377808, 0.14903618395328522, -0.040532879531383514, -0.30869653820991516, 0.5289891362190247, -0.4185488522052765, 0.14710439741...
whose value is** [**`false()`**](http://www.w3.org/TR/xpath#function-false), one needs to write the definition as the following:    `<xsl:variable name="vMyVar" select="false()"/>` or, if you don't exactly remember this, you could always write:    `<xsl:variable name="vMyVar" select="1 = 0"/>` (specify any expressi...
[ 0.04911216348409653, 0.07861046493053436, 0.597809910774231, -0.2919987440109253, -0.03807789087295532, -0.23655444383621216, 0.46011438965797424, -0.6474406123161316, 0.0832429975271225, -0.583486795425415, -0.255400687456131, 0.6798690557479858, -0.3162675201892853, -0.002063739579170942...
I have data that needs to be executed on a certain background thread. I have code coming from all other threads that need to call into this. does anyone have a good tutorial or best practice on having a queue for synchronization to support this threading requirement You could either: * implement a [producer/consumer m...
[ 0.4914737939834595, -0.1648755967617035, 0.278431236743927, 0.2858700454235077, 0.05261136218905449, -0.07498402148485184, -0.015497327782213688, -0.028115365654230118, -0.35050249099731445, -0.4849463701248169, 0.022458335384726524, 0.16633036732673645, -0.12445893883705139, 0.34035536646...
I have been hearing that with unit testing we can catch most of the bugs in the code and I really believe that this is true. But my question is in large projects where each class is dependent on many other classes how do you go about unit testing the class ? Stubbing out every other class doesn't make much sense becaus...
[ 0.6560310125350952, 0.20516246557235718, -0.6744012832641602, 0.4395679831504822, -0.10391321033239365, -0.08436980098485947, 0.5953373908996582, -0.05984126776456833, -0.05183854326605797, -0.5539262890815735, 0.35589396953582764, 0.5338988304138184, 0.09266945719718933, 0.113742277026176...
you will increase maintainability and reusability of your code, both highly desirable traits. Since you are introducing tests into an existing code-base, you will no doubt encounter many hard-to-test situations which will require refactoring to test properly. This refactoring will increase the testability of your cod...
[ 0.5459074974060059, 0.2734757363796234, 0.03440321981906891, 0.2984239459037781, 0.35344943404197693, -0.1390605866909027, 0.5805352926254272, -0.24201838672161102, -0.12775908410549164, -0.6163316369056702, -0.3566761612892151, 0.661670982837677, -0.20537826418876648, 0.26879459619522095,...
I want to create a program that requests from the user 10 grades and then filters them to pass and fail, then prints the number of passes and fails. I did the program but the output is wrong. ``` int pass,fail,grade,studentcounter; pass=0; fail=0; grade=0; studentcounter=10; while (studentcounter!=0) { printf("...
[ 0.24173061549663544, -0.11844370514154434, 0.2977641522884369, -0.07108882814645767, 0.3925359845161438, 0.26332220435142517, 0.2783249020576477, -0.31993967294692993, 0.09757738560438156, -0.5570327043533325, -0.3240553140640259, 0.42373400926589966, -0.05128882825374603, 0.23850010335445...
%d",fail); printf("the number of pass is %d",pass); } ``` The problem is that the program request the ten grades but at the end it will print the number of fail and the number of pass as zero. Why? You are entering a grade number. A switch statement tests that grade against the cases, and i am pretty sure the grades...
[ 0.25359004735946655, 0.14360418915748596, 0.21311217546463013, -0.0377766378223896, 0.005157439038157463, 0.08998027443885803, 0.5194764137268066, 0.026564931496977806, 0.03821004182100296, -0.6421606540679932, -0.1580028533935547, 0.552662193775177, 0.19052550196647644, 0.1747881472110748...
is NOT zero"... ``` studentcounter=0; while (studentcounter!=0) { printf("enter the next grade\n"); scanf("%d",grade); student--; } ``` The third problem is, you misspelled grade. you can rewrite your code as follows: ``` #include <stdio.h> #include <stdlib.h> int main() { int pass,fail,grade,studentcounter;...
[ -0.11710181832313538, 0.10108666121959686, 0.32670706510543823, -0.0935526043176651, 0.21919655799865723, 0.0951956957578659, 0.40818095207214355, -0.16050274670124054, 0.062872514128685, -0.40857982635498047, -0.2920907437801361, 0.389251172542572, -0.03243444114923477, 0.1865990906953811...
In Ruby you can reference variables inside strings and they are interpolated at runtime. For example if you declare a variable `foo` equals `"Ted"` and you declare a string `"Hello, #{foo}"` it interpolates to `"Hello, Ted"`. I've not been able to figure out how to perform the magic `"#{}"` interpolation on data re...
[ 0.4525577127933502, 0.03357492759823799, 0.15933355689048767, -0.23075997829437256, -0.35714805126190186, -0.060841403901576996, 0.5841295123100281, -0.5215252637863159, -0.22767573595046997, -0.29133519530296326, -0.02194509468972683, 0.4891816973686218, -0.7985141277313232, -0.0076585281...
template.result # prints "My name is Rasmus" ``` [`Kernel#eval`](http://www.ruby-doc.org/core-2.1.1/Kernel.html#method-i-eval) could be used, too. But most of the time you want to use a simple template system like `erb`.
[ 0.3230186402797699, 0.015536731109023094, 0.1101362407207489, -0.05710802599787712, -0.05592367798089981, -0.242957204580307, 0.16480033099651337, -0.10705266892910004, -0.18444520235061646, -0.5101100206375122, -0.17597956955432892, 0.37319856882095337, -0.4875151216983795, -0.07135852426...
Where should I put the .html files in a wicket Application? my current project layout is as follows: ``` src/myproject --classes+ duplicated html files web --numerous .html files - previewed web/img --resource files such as css/png/js files ``` i want to avoid putting the html files on dupliate locations. what is...
[ 0.07997015118598938, 0.12700264155864716, 0.07167907804250717, 0.2603864073753357, -0.2195204198360443, 0.06348757445812225, 0.21873034536838531, -0.08434129506349564, -0.34991103410720825, -0.8028672933578491, 0.016474297270178795, 0.25745752453804016, -0.25182992219924927, 0.050681635737...
any examples for this? do i need special code (such as a IResourceStreamLocator) in my wicketappllication class? i am using wicket 1.4-rc1. so after gathering some experience with wicket, it turned out that the default location for the html files is just fine. no need to reinvent the wheel. you can link resources wi...
[ 0.19565971195697784, -0.15723136067390442, 0.11834636330604553, 0.2847048044204712, -0.16022410988807678, -0.24227267503738403, 0.31910279393196106, 0.43978995084762573, -0.4383564591407776, -0.818269670009613, 0.44135087728500366, 0.2127002328634262, 0.007602636236697435, 0.08877898007631...
I am having problems using [django-tagging](http://code.google.com/p/django-tagging/). I try to follow the [documentation](http://code.google.com/p/django-tagging/source/browse/trunk/docs/overview.txt) but it fails at the second step > Once you've installed Django Tagging and want to use it in your Django applications...
[ 0.3112212121486664, 0.6211233735084534, 0.4101364016532898, -0.29530322551727295, 0.09610704332590103, -0.47157979011535645, 0.38851121068000793, -0.5484444499015808, -0.060069650411605835, -0.6061136722564697, -0.11469687521457672, 0.8519842624664307, -0.6722639799118042, -0.2415847480297...
missing? <http://code.djangoproject.com/ticket/7680> parse\_lookup has been removed. Not sure how this will affect tagging. Might want to do some searching. Update: apparently it's been fixed in the trunk version of tagging. Download the latest SVN build of tagging.
[ 0.2655983567237854, -0.23142088949680328, 0.138682559132576, 0.33198049664497375, 0.11107274144887924, -0.531004786491394, 0.31326600909233093, 0.2237694263458252, -0.6962642669677734, -0.42931070923805237, 0.05721871554851532, 0.48253950476646423, -0.4060491919517517, 0.023315057158470154...
On my blog, I want to display the all the posts from the last month. But if that is less than 10 posts, I want to show the ten most recent posts (in other words, there should never be less than 10 posts on the front page). I am wondering if there is a way to do this in a single query? Currently, I first run this query...
[ 0.3547773063182831, 0.15141011774539948, 0.6406366229057312, 0.03557021543383598, -0.38466185331344604, 0.0719638466835022, 0.1047140583395958, 0.2307441234588623, -0.4058137536048889, -0.6932165026664734, 0.18905813992023468, 0.22285106778144836, -0.16228167712688446, 0.3541419208049774, ...
by timestamp desc limit 10 ``` But this requires me to run two queries. Is there a more efficient way to do this with a single query? (I'm using MySQL.) Just do this: ``` select * from posts order by timestamp desc limit 100 ``` And filter the results further in memory. (assumes 100 is a practical upper limit for ...
[ 0.06568631529808044, 0.17640836536884308, 0.5686836838722229, -0.0788787454366684, -0.023968005552887917, -0.10460343956947327, 0.3153691291809082, -0.2899896204471588, -0.32774117588996887, -1.0396912097930908, -0.014472859911620617, 0.31398361921310425, -0.23045314848423004, 0.0556074082...
The following code will generate a link to the page I want to get to. ``` <%= Html.ActionLink(image.Title, image.Id.ToString(), "Image") %> ``` The following code will cause the correct url to be rendered on the page. ``` <%= Url.Action("Index", "Image", new { id = image.Id })%> ``` But when I try to use it in ja...
[ -0.1242203488945961, 0.050774794071912766, 0.979763388633728, -0.08112584799528122, -0.06847475469112396, -0.020867956802248955, 0.47192707657814026, -0.27438145875930786, -0.1523093730211258, -0.9937370419502258, -0.416352778673172, 0.45292454957962036, -0.28412455320358276, -0.0311662908...
the class > defined in this code file matches the > 'inherits' attribute, and that it > extends the correct base class (e.g. > Page or UserControl). Looks like it indicates a bigger problem. **Fixed** Thanks for your help, the code contained a div with `runat="server"`. When I removed this it runs OK. This maybe ...
[ 0.05730661377310753, -0.21593569219112396, 0.5741579532623291, 0.058888088911771774, -0.23487019538879395, -0.2090882509946823, 0.5496867299079895, 0.006023337598890066, -0.44986534118652344, -0.7290013432502747, -0.11740042269229889, 0.3782918155193329, -0.4905661642551422, 0.238510489463...
definition or javascript. What is the output of your view? Is the "strange error" coming from Javascript or ASP.NET? **EDIT**: regarding your update: make sure your Index.aspx has the "Codebehind" attribute (this is in Page-tag on the very first line) pointing to Index.aspx.cs and the attribute "Inherits" contains the...
[ 0.5287963151931763, -0.4540947675704956, 0.336179256439209, 0.3019598424434662, -0.04455959051847458, -0.14007334411144257, 0.016467640176415443, -0.2429925948381424, -0.236578106880188, -0.9523722529411316, -0.058512914925813675, 0.5682498812675476, -0.2528679668903351, 0.0420374684035778...
I'm trying to do project Euler number [219](http://projecteuler.net/index.php?section=problems&id=219) but am failing to get a grasp of it. I'm trying to use Python which according to project Euler should be able to do it within a minute! This leads me to think that they can't possibly want me to compute each individua...
[ 0.11883743107318878, 0.06773330271244049, 0.051749419420957565, 0.08762048929929733, -0.3555757701396942, 0.13223545253276825, 0.42695707082748413, -0.30422699451446533, -0.33216604590415955, -0.4857715368270874, -0.041558295488357544, -0.037325263023376465, -0.1615489423274994, -0.1633772...
in brute-forcing values up to a bit over 10: ``` cost(1) = 1 cost(2) = 5 cost(3) = 11 cost(4) = 18 cost(5) = 26 cost(6) = 35 cost(7) = 44 cost(8) = 54 cost(9) = 64 cost(10)= 74 cost(11)= 85 cost(12)= 96 ``` Past this, I am struggling to comprehend how reduce the problem. It is always possible to make a pattern that ...
[ -0.006801616866141558, 0.006462857127189636, -0.0053527164272964, -0.09388235956430435, -0.2193882167339325, 0.5356473326683044, 0.23822277784347534, -0.5079271197319031, -0.12226112186908722, -0.8735536932945251, 0.009753400459885597, 0.7406139969825745, -0.14747276902198792, 0.0826848819...
that thing, it's practically impossible. That thing is [Huffman trees](http://en.wikipedia.org/wiki/Huffman_tree). [Edit] Upon further review, it seems that you can't quite build a Huffman tree on N nodes with certain frequencies, because the cost function for a string is 4\*(# of 1's) + (# of 0's). If the cost functi...
[ 0.30624574422836304, -0.11141826957464218, -0.2832290530204773, 0.27887171506881714, 0.18037864565849304, 0.2271668165922165, 0.37183940410614014, -0.19152767956256866, -0.0784795880317688, -0.5617966651916504, -0.10263270139694214, 0.21171510219573975, -0.6696323752403259, 0.2411389946937...
construct a tree with N+1 nodes as follows: 1. Choose the leaf node with the smallest cost, where the cost of a leaf node is 4\*(# of 1's on path from root to leaf) + (# of 0's on path) * Add 2 children to that node Thus, if the code for the node was previously xxxx, then we remove that code from our code set (since...
[ -0.4255519211292267, -0.199229434132576, 0.13970555365085602, 0.12572717666625977, 0.2748911678791046, 0.6311555504798889, 0.2305634617805481, -0.35455015301704407, -0.08313172310590744, -0.90296471118927, -0.14814896881580353, 0.02533842623233795, -0.17309311032295227, 0.1323467344045639,...
+ cost(xxxx) Hence, mincost(N+1) <= mincost(N) + 5 + cost(cheapest code in best solution for N). My theory is that that inequality should be an equality, but I haven't been able to prove it yet. For all of the values you've listed which you brute-forced, this statement is in fact an equality. If it is an equality, th...
[ 0.12395185977220535, 0.04354220628738403, -0.10080421715974808, -0.14642001688480377, -0.03266407549381256, 0.4944697618484497, -0.033412180840969086, -0.45023292303085327, 0.06313730031251907, -0.6895581483840942, 0.14801937341690063, 0.677111029624939, -0.03305786848068237, 0.05738311260...
and 1 * Add the cost of that code + 5 to the total cost If you use a [priority queue](http://en.wikipedia.org/wiki/Priority_queue), you should be able to do this in O(N log N) time. This may or may not be feasable, given the upper limit of 109.
[ 0.3923010528087616, 0.09746772795915604, 0.17339622974395752, 0.13779619336128235, 0.3752405643463135, 0.009415310807526112, -0.14232204854488373, -0.4027385711669922, -0.28096652030944824, -0.5875635743141174, -0.21749533712863922, 0.5054734945297241, 0.10907122492790222, -0.0553200803697...
Would a LINQ for java be a useful tool? I have been working on a tool that will allow a Java object to map to a row in a database. 1. Would this be useful for Java programmers? 2. What features would be useful? LINQ for Java would be lovely, but the problem is the language integration. Java doesn't have anything as ...
[ 0.12778064608573914, 0.07460616528987885, 0.20551027357578278, 0.19590310752391815, 0.013860680162906647, -0.0987437516450882, -0.10444515198469162, -0.21162870526313782, -0.16530902683734894, -0.4567873775959015, 0.2010582685470581, 0.5137288570404053, -0.4090862572193146, -0.213883623480...
hideous. You'd also need expression trees if you wanted to do anything like LINQ to SQL. Checked exceptions *might* get in the way, but we'd have to see. The equivalent of IQueryable would need to have some sort of general checked exception - or possibly it could be generic in both the element type and the exception t...
[ 0.4967951476573944, 0.4657132625579834, -0.06933201104402542, -0.10867105424404144, -0.48197394609451294, -0.06572678685188293, 0.3389081656932831, 0.5593109726905823, -0.2593214809894562, -0.36984968185424805, 0.08311393857002258, 0.3545502722263336, -0.1224588006734848, 0.238165825605392...
in a "Java-like" language. Groovy has certain useful aspects already, for instance. For the library side, Hibernate already provides a "non-integrated" version of a lot of the features of LINQ to SQL. For LINQ to Objects, you should look at the [Google Java Collections API](http://code.google.com/p/google-collections/...
[ 0.36445632576942444, -0.23506008088588715, 0.2395174652338028, 0.1367085874080658, -0.26634418964385986, -0.1346229612827301, 0.13245746493339539, -0.02594374120235443, -0.15307101607322693, -0.19937734305858612, -0.07205379009246826, 0.48988431692123413, -0.26508671045303345, -0.323858350...
I want to find (not generate) 2 text strings such that, after removing all non letters and ucasing, one string can be translated to the other by simple substitution. The motivation for this comes from a project I known of that is testing methods for attacking cyphers via probability distributions. I'd like to find a l...
[ 0.2353813797235489, 0.2433941513299942, -0.07793666422367096, 0.2024829387664795, -0.1614152044057846, 0.09081954509019852, 0.32591190934181213, 0.059027284383773804, 0.11047042906284332, -0.47974658012390137, -0.3620299994945526, 0.18561996519565582, -0.47658243775367737, -0.0168436132371...
amiable to some sort of attack with a B-tree keyed off the string after a substitution that makes the sequence of first occurrences sequential. ``` HELLOWORLDTHISISIT 1233454637819a9b98 ``` A little optimization based on knowing the maximum value and length of the string based on each depth of the tree and the rest ...
[ -0.06279334425926208, -0.10507997870445251, 0.2674921751022339, 0.19621287286281586, 0.002839891007170081, -0.2357448786497116, 0.2860572636127472, 0.17426981031894684, -0.2065126895904541, -0.2427433431148529, 0.0867941752076149, 0.6766086220741272, -0.25253552198410034, -0.26396903395652...
text? The question is; Any ideas on how to do this better? --- Edit: the cipher that was being used is an insanely basic 26 letter substitution cipher. p.s. this is more a thought experiment then a probable real project for me. There are 26! different substitution ciphers. That works out to a bit over 88 bits of ch...
[ 0.030074501410126686, 0.2510116696357727, 0.38478487730026245, 0.016146639361977577, -0.4422479569911957, 0.06983993947505951, 0.5422478914260864, 0.22340260446071625, -0.19556039571762085, -0.6533002853393555, -0.09834878146648407, 0.44463247060775757, -0.14606508612632751, -0.10524486005...
Wikipedia, for a start. You can download an dump of all the English Wikipedia's XML files from their website.
[ 0.4488167464733124, -0.09920821338891983, -0.03132971376180649, 0.37886732816696167, -0.3948792815208435, -0.42868974804878235, 0.07193462550640106, 0.46475860476493835, -0.15365181863307953, -0.3206658959388733, -0.012893890962004662, 0.31405946612358093, 0.07998029887676239, 0.0747901722...
In Latex how can you make the background image to occupy the whole sheet on every page *except* a certain stripe on the inner side of each page? I can't figure it out. I have a background image I'd like to be seen in whole on each page after printing/binding. Matyi The beauty of two's complement is that at the bina...
[ 0.6720324754714966, -0.148276686668396, 0.04048977047204971, -0.03377964720129967, -0.24752174317836761, 0.28553304076194763, -0.24108320474624634, -0.04910366237163544, -0.19875699281692505, -0.6479676365852356, -0.12645740807056427, 0.5224013328552246, -0.3251917064189911, -0.16443780064...
Your example numbers * 01001001 = 73 * 10101010 = -86 So, the correct answer is indeed -13. Subtracting is just the same, in that no special processing is required for two's complement numbers: you "just subtract them". Note that where things get interesting is the handling of overflow/underflow bits. You can't re...
[ 0.07843922823667526, 0.12023817002773285, -0.0392630472779274, -0.24013324081897736, -0.29613542556762695, 0.048806723207235336, 0.310695618391037, -0.2908340096473694, -0.2928774058818817, -0.37203019857406616, -0.18570324778556824, 0.19109341502189636, -0.2739619016647339, -0.24257853627...
I am making a game in JAVA where I want to come up with a list of files in a certain directory in my jar so I can make sure to have a list of those classes to be used in the game. For example say in my jar I have a directory ``` mtd/entity/creep/ ``` I want to get a list of all the .class files in that directory *...
[ 0.08849086612462997, 0.10030224919319153, -0.2077840268611908, -0.05739717558026314, -0.2819272577762604, -0.2771144211292267, 0.16737347841262817, -0.05762958526611328, -0.14581072330474854, -0.8040386438369751, 0.20689119398593903, 0.5505099296569824, -0.4598727822303772, 0.0063262237235...
final List classes = new ArrayList(); JarInputStream jarFile = null; try { jarFile = new JarInputStream(new FileInputStream(jar)); JarEntry jarEntry; do { try {
[ 0.007860968820750713, -0.3216933310031891, 0.5310142636299133, -0.20951056480407715, -0.04598146304488182, 0.3272284269332886, 0.4605211913585663, -0.3217223286628723, -0.020178385078907013, -0.4235328733921051, -0.007293823640793562, 0.4869115352630615, -0.45926010608673096, 0.29623398184...
jarEntry = jarFile.getNextJarEntry(); } catch(IOException ioe) { throw new CCException.Error("Unable to get next jar entry from jar file '"+jar+"'", ioe); } if (jarEntry
[ 0.2453097701072693, -0.02266068197786808, 0.4882504940032959, -0.2503591775894165, 0.11036133021116257, 0.12401683628559113, 0.4236604869365692, -0.3094483017921448, -0.07024737447500229, -0.3115391731262207, -0.0512596033513546, 0.5780962109565735, -0.32238849997520447, 0.4905273020267486...
!= null) { extractClassFromJar(jar, packageName, classes, jarEntry); } } while (jarEntry != null); closeJarFile(jarFile); } catch(IOException ioe) { throw new CCException.Error("Unable to get Jar input stream from '"+jar+"'", ioe);
[ 0.0032637491822242737, -0.04524259641766548, 0.3794046938419342, -0.419252872467041, 0.048476751893758774, 0.22321929037570953, 0.622360348701477, -0.20310421288013458, 0.035442933440208435, -0.23203754425048828, -0.2702666223049164, 0.5501871705055237, -0.4155310392379761, 0.2347596585750...
} finally { closeJarFile(jarFile); } return classes; } private static void extractClassFromJar(final String jar, final String packageName, final List classes, JarEntry jarEntry) throws Error { String className = jarEntry.getName(); if (className.endsWith(".class")) { classNam...
[ -0.15122269093990326, -0.05387827754020691, 0.565185010433197, -0.511897623538971, 0.04309039190411568, 0.2779272496700287, 0.8067792654037476, -0.17220887541770935, 0.1334487497806549, -0.24399727582931519, -0.25534042716026306, 0.7297092080116272, -0.25776395201683044, 0.1777328997850418...
{ classes.add(Class.forName(className.replace('/', '.'))); } catch (ClassNotFoundException cnfe) { throw new CCException.Error("unable to find class named " + className.replace('/', '.') + "' within jar '" + jar + "'", cnfe);
[ 0.14751049876213074, -0.12515360116958618, 0.2871253788471222, -0.0370759591460228, 0.006615851074457169, 0.15081745386123657, 0.22683162987232208, -0.2768647372722626, -0.2013673633337021, -0.3810993432998657, -0.19790881872177124, 0.44340628385543823, -0.33773332834243774, 0.340585380792...
} } } } private static void closeJarFile(final JarInputStream jarFile) { if(jarFile != null) { try { jarFile.close(); } catch(IOException ioe) { mockAction();
[ 0.14057324826717377, -0.04852956160902977, 0.4593060612678528, -0.3799135684967041, 0.0972886011004448, 0.43474894762039185, 0.5341216921806335, -0.08089827001094818, 0.21406801044940948, -0.393538236618042, -0.1651645451784134, 0.526694655418396, -0.5286116003990173, 0.14148502051830292, ...
} } } ```
[ 0.033695679157972336, 0.4034728407859802, 0.1949702352285385, -0.15257494151592255, 0.4299153685569763, -0.20141436159610748, 0.07711705565452576, 0.4467844069004059, 0.3091506361961365, -0.5090379118919373, -0.3048633635044098, 0.5600791573524475, -0.33611243963241577, 0.3141762912273407,...
I would like to keep a list of a certain class of objects in my application. But I still want the object to be garbage collected. Can you create **weak references** in .NET? For reference: * [Garbage Collecting objects which keep track of their own instances in an internal Map](https://stackoverflow.com/questions/346...
[ -0.16712702810764313, -0.14883174002170563, 0.10440746694803238, 0.04599277675151825, -0.12685957551002502, -0.056010618805885315, 0.32871726155281067, -0.02089150995016098, -0.36267605423927307, -0.6005576848983765, -0.06705154478549957, 0.32548603415489197, -0.43930795788764954, 0.173325...
code example, > see WeakReference in the class > library. Yes, there's a generic weak reference class. [MSDN > Weak Reference](http://msdn.microsoft.com/en-us/library/xt0a1s34.aspx)
[ -0.22197450697422028, -0.08913569152355194, -0.04258556663990021, 0.19050420820713043, -0.25737881660461426, -0.02442070096731186, 0.4414139986038208, 0.07477135211229324, -0.17544329166412354, -0.5912684202194214, -0.3515147268772125, 0.11655603349208832, -0.32439035177230835, 0.166170045...
I understand what the .Net Client Profile is, but what does "PREVIEW" mean? (<http://www.microsoft.com/downloads/details.aspx?familyid=8CEA6CD1-15BC-4664-B27D-8CEBA808B28B&displaylang=en>) Is this like a beta release? Is it safe to deploy alongside my application? Thanks. It does look like the title is in error, beca...
[ 0.30365708470344543, -0.1395115703344345, 0.5468607544898987, 0.08881692588329315, -0.04910219833254814, -0.516350269317627, 0.3958970010280609, 0.047627516090869904, -0.3150545656681061, -0.6102575659751892, -0.02554759569466114, 0.57192063331604, -0.059766121208667755, 0.0200323797762393...
I am doing some calculations that require a large array to be initialized. The maximum size of the array determines the maximum size of the problem I can solve. Is there a way to programmatically determine how much memory is available for say, the biggest array of bytes possible? Thanks Well, relying on a single hug...
[ 0.18327997624874115, 0.004555064719170332, -0.3122687041759491, 0.29601794481277466, 0.18024614453315735, 0.10384921729564667, 0.05212588980793953, 0.02766045182943344, -0.34436362981796265, -0.6822430491447449, 0.07105915993452072, 0.6018373966217041, -0.07538065314292908, 0.0915297418832...
each of fixed size - i.e. the indexer divides to to find the appropriate array, then uses % to get the offset inside that array. You might also want to ensure you are on a 64-bit OS, with lots of memory. This will give you the maximum available head-room. Depending on the scenario, more sophisticated algorithms such ...
[ 0.296550989151001, -0.005399361718446016, 0.32583633065223694, 0.276425302028656, 0.10806344449520111, 0.2508504390716553, -0.3846142590045929, -0.5352950096130371, -0.44822561740875244, -0.6700634956359863, 0.036665283143520355, 0.35916686058044434, -0.10977088660001755, 0.129718542098999...
I'm using C# and I have windows form and web service... I have a custom object that I want to send to the web service.. sometime, the object may contain a huge of data.. as a best performance, what is the best way to send a custom object to the web service? Web Services are designed to handle custom objects as long ...
[ 0.5830118656158447, 0.13654732704162598, 0.25674527883529663, 0.17216941714286804, -0.08439639955759048, -0.06091311201453209, 0.18944022059440613, -0.13324442505836487, -0.5961520671844482, -0.6016020178794861, 0.033383648842573166, 0.4359879493713379, -0.080254927277565, 0.22145757079124...
http. See [How to: Enable a Web Service to Send and Receive Large Amounts of Data](http://msdn.microsoft.com/en-us/library/aa528822.aspx).
[ 0.06094551831483841, -0.11311972141265869, 0.1953761875629425, 0.2816298007965088, 0.2101271003484726, -0.17686615884304047, 0.18718548119068146, -0.042937248945236206, -0.3798251152038574, -0.6252287030220032, -0.533154308795929, -0.023554250597953796, 0.013233263976871967, 0.120218344032...
I'm looking for tips, suggestions, advice or examples of applications build using Google's Web Toolkit with Google AppEngine. Here's a screencast on the subject: [Using Java (GWT) with Google App Engine](http://www.thescreencast.com/2008/04/using-java-gwt-with-google-app-engine.html "Using Java (GWT) with Google App En...
[ 0.38486459851264954, 0.024726642295718193, 0.28637415170669556, -0.1922168880701065, -0.48073938488960266, 0.02993137761950493, 0.0654807910323143, 0.08562140166759491, -0.1579744517803192, -0.5205031037330627, 0.11814159899950027, 0.6962186694145203, -0.07975950092077255, 0.03182319179177...
I seem to be in a never ending tail spin of Linux, or not, Windows or not. Web programming or system programming. Python or PHP. I'am self teaching myself programming. But it seems I keep being torn about which way to go. Unfortunately it is always seemingly good reasons to get side tracked. You know the whole open so...
[ 0.9558085203170776, 0.36573901772499084, 0.1738433986902237, 0.10884428024291992, -0.006696620956063271, -0.21923741698265076, 0.17650313675403595, 0.9056602120399475, -0.39176857471466064, -0.40966153144836426, 0.19445623457431793, 0.4401874840259552, -0.026849890127778053, 0.345109313726...
to, "Should I learn ASP.NET, since I am more so deciding Windows IS a "necessary" evil. I hope this made sense. The reason I settled in on Web Development as my course to learning programming is because I actually have a task to implement rather then aimlessly reading reference books etc. Does anyone have any advice ...
[ 0.605004608631134, 0.06096746772527695, -0.030341550707817078, 0.16399410367012024, -0.122640460729599, -0.28254374861717224, 0.28595054149627686, 0.48908936977386475, -0.13060323894023895, -0.4664979875087738, -0.04985158145427704, 0.6533807516098022, 0.0750865787267685, -0.00034517364110...
the Firehose" experience. Keep early project simple, and tangible. Build useful things and the motivation will be there. Web / desktop / mobile / etc, its all good. Find the one that gets you thinking about code when your not coding, and you'll know your going in the right direction.
[ 0.32243454456329346, 0.1332298368215561, 0.08902795612812042, 0.38169634342193604, -0.21510207653045654, -0.339796781539917, 0.4167526066303253, 0.050057072192430496, 0.23210409283638, -0.812682032585144, 0.0038324964698404074, 0.7349731922149658, 0.27067890763282776, -0.2844773232936859, ...
I am trying to have a tooltip on multiple lines. how do i do this? Put a newline (use `Environment.NewLine`) into the actual tooltip text.
[ 0.5131670832633972, 0.05633006989955902, 0.3247511088848114, 0.022612981498241425, 0.04005855694413185, -0.21444842219352722, 0.3221454918384552, 0.06710346043109894, -0.16174818575382233, -0.8242188692092896, 0.35664743185043335, 0.39135146141052246, -0.18722990155220032, 0.04232703149318...
In a CF8 form, I'm using a tag such as the following: ``` <cfinput type = "Text" name = "Num" value = "0" validate = "range,integer" range = "0,1000" validateAt="onBlur,onSubmit" required = "yes" message = "Invalid Value" > ``` When the field loses focus (onBlur), the input i...
[ 0.08245652168989182, 0.1551450490951538, 0.8167427778244019, -0.1464640200138092, -0.1820516139268875, -0.08260703831911087, 0.024686705321073532, -0.11217443645000458, -0.13603639602661133, -0.3806314170360565, -0.20452448725700378, 0.3918609619140625, -0.24414598941802979, -0.15585607290...
code that is auto generated: ``` <input name="Num" id="Num" type="text" value="0" onblur="if( !_CF_hasValue(this, 'TEXT', false) && !_CF_checkrange(this.value,0.0,1000.0, true) || !_CF_checkinteger(this.value, true) ) { _CF_onErrorAlert(new Array('Invalid Value')); }" />...
[ 0.31065160036087036, 0.035948943346738815, 0.41161492466926575, -0.038458824157714844, -0.017225878313183784, -0.016711145639419556, 0.36667710542678833, -0.3253513276576996, -0.10122445225715637, -0.32862722873687744, -0.27028077840805054, 0.8211199641227722, -0.5163986086845398, -0.11758...
&& !in_range || !is_integer) show_error() ``` but I think it really should be: ``` if (!has_value || !in_range || !is_integer) show_error() ``` Since JavaScript short-circuits logical expressions and `&&` takes precedence over `||`, the third check in the original expression never gets executed if the other two re...
[ 0.28488701581954956, 0.3450981676578522, 0.3006533086299896, -0.3041718900203705, 0.2629023492336273, -0.35224196314811707, 0.7166730761528015, -0.09156665951013565, -0.21401511132717133, -0.33286231756210327, -0.15603362023830414, 0.8665514588356018, -0.5319322943687439, -0.20601949095726...
How would you append an integer to a `char*` in c++? First convert the int to a `char*` using `sprintf()`: ``` char integer_string[32]; int integer = 1234; sprintf(integer_string, "%d", integer); ``` Then to append it to your other char\*, use `strcat()`: ``` char other_string[64] = "Integer: "; // make sure you a...
[ -0.22063738107681274, 0.17801155149936676, 0.2133236974477768, -0.4458746612071991, 0.05698138102889061, 0.2884373962879181, 0.2311192750930786, -0.4707489609718323, -0.040303267538547516, -0.2865715026855469, -0.17877249419689178, 0.26054322719573975, -0.4706261157989502, -0.4361386299133...
Do you put unit tests in the same project for convenience or do you put them in a separate assembly? If you put them in a separate assembly like we do, we end up with a number of extra projects in the solution. It's great for unit testing while coding but how do you release the application without all of these extra a...
[ 0.9296870827674866, 0.08303672075271606, -0.5683490633964539, 0.5009709000587463, 0.18519733846187592, 0.02419264428317547, -0.20607131719589233, -0.2965765595436096, -0.3427610993385315, -0.3088131248950958, 0.2858593761920929, 0.39398327469825745, -0.027357935905456543, 0.391714960336685...
with production code. The only thing shipped with product code is production code. 2. Assemblies will be unnecessarily bloated by unit tests. 3. Unit tests can affect build processes like automated or continuous build. I don't really know of any pros. Having an extra project (or 10) isn't a con. **Edit: More Info On ...
[ 0.9650968909263611, 0.2703562378883362, -0.0698462426662445, -0.00400371802970767, 0.15519270300865173, 0.1417115479707718, 0.20349770784378052, -0.13526268303394318, -0.13731631636619568, -0.4200759530067444, -0.1965654343366623, 0.643582820892334, -0.03161414712667465, 0.1712250411510467...
bits being separated for shipping, etc. Additionally, it is fairly trivial to run automated unit testing at this point on all tests in a particular directory. To summarize, here is the general idea for a daily build and testing and shipping of bits and other files: 1. Production build runs, placing production files i...
[ 0.8119099140167236, -0.01070951297879219, -0.07910609990358353, 0.21278980374336243, 0.10893076658248901, 0.13557957112789154, 0.24144604802131653, -0.4905310571193695, 0.020781535655260086, -0.2402743101119995, -0.42897218465805054, 0.46636515855789185, 0.11081863939762115, 0.478301376104...
"tests" directory. 2. Build unit tests to "tests" directory. 3. Run unit tests. 3. Send build notifications and unit tests results to developers. 4. When a release candidate (like Release20081225) is accepted, ship these bits.
[ 0.7563619017601013, -0.02228652685880661, 0.201205313205719, 0.3023149073123932, 0.11292441934347153, 0.05053391680121422, 0.13133524358272552, -0.3279072344303131, 0.3113829493522644, -0.4115367531776428, -0.36899498105049133, 0.45368027687072754, 0.14320988953113556, 0.16800110042095184,...
I've created a table in Microsoft Sql CE that I'm using to hold some data. I've generated an ORM via SqlMetal and I've pulled the datasource into my WPF project. I want to create a simple WPF form that can be used to edit a record in the table via the ORM-generated classes. I want this form to support typical OK/Cance...
[ 0.5171934962272644, 0.10184775292873383, 0.31070518493652344, -0.015093152411282063, -0.0417705662548542, -0.2849859297275543, -0.048477835953235626, -0.13624900579452515, -0.22200243175029755, -0.4769495129585266, -0.006526379846036434, 0.30120018124580383, -0.33771950006484985, 0.1132836...
that has a property "TaskName", I've included the following in my WPF form: ``` <Label Grid.Column="0" Grid.Row="0" > Name: </Label> <TextBox Name="txtName" Grid.Column="1" Grid.Row="0" Text="{Binding TaskName, Mode=TwoWay}" AcceptsReturn="False" MaxLines="1" /> ``` This, combined with a DataC...
[ 0.05679812654852867, -0.1755501925945282, 0.6756478548049927, -0.24558569490909576, 0.08126118779182434, -0.06672900170087814, 0.15218448638916016, -0.5176451206207275, -0.10449682176113129, -0.8488291501998901, -0.1063540130853653, 0.5997408032417297, -0.1578095257282257, 0.23113930225372...
canceling changes if, e.g., the OrmGeneratedClass is filled with previously saved values. **What is a good design for this scenario, or am I designing it wrong before I get to this point?** I'm a newbie with WPF and the Sql Server datasource/ORM integration aspects. (This is a personal project that I'm using to learn ...
[ 0.11551117897033691, -0.10828185081481934, 0.4686420261859894, 0.07498659193515778, 0.03807271271944046, -0.14298363029956818, 0.2498779296875, -0.2548794448375702, -0.22465987503528595, -0.43913280963897705, -0.00880218856036663, 0.6756982207298279, -0.622477114200592, -0.1882064193487167...
you can either apply the changes or revert back to the original.
[ 0.6136910319328308, -0.02662358246743679, 0.2780347466468811, 0.14046241343021393, 0.2482604682445526, 0.08090536296367645, 0.4352274537086487, -0.17371931672096252, -0.08557583391666412, -0.5709812045097351, -0.25489747524261475, 0.3766142725944519, 0.030632788315415382, 0.188165336847305...
I have written a [toolbar](http://osirisdevelopment.com/BatteryBar) that runs on the taskbar. Unfortunately, after it is installed, the user has to enable it manually. Is there a way to tell explorer to open (or close) a given toolbar? I would like for the installer, NSIS, to turn on the toolbar when the installation ...
[ 0.44932878017425537, 0.21114976704120636, 0.37671273946762085, -0.21280856430530548, 0.31117722392082214, -0.19159109890460968, 0.3294298052787781, -0.17927426099777222, -0.06739688664674759, -0.6741735339164734, -0.11724080890417099, 0.9386753439903259, -0.2521727681159973, -0.04124794155...
to do this, with [ShowDeskBand](http://msdn.microsoft.com/en-us/library/bb774485(VS.85).aspx) and [HideDeskBand](http://msdn.microsoft.com/en-us/library/bb774482(VS.85).aspx) * Edit: This code can now Add a deskband object (from Pinvoke.net, and [these](http://social.msdn.microsoft.com/Forums/en-US/ieextensiondevelopme...
[ -0.3775116503238678, 0.027544284239411354, 0.6527629494667053, 0.1963936686515808, 0.0358683243393898, 0.03368178755044937, 0.39348411560058594, -0.31576108932495117, -0.1823858767747879, -0.7550672888755798, -0.3070888817310333, 0.46166151762008667, -0.14189116656780243, 0.140415921807289...
return BandSite.AddBand(DeskbandObject); } ``` And, an example use: ``` Guid address_toolbar_guid = new Guid("{01E04581-4EEE-11D0-BFE9-00AA005B4383}"); uint band_id = AddDeskbandToTray(address_toolbar_guid); ``` It would make sense that a similar call to RemoveBand would also do the trick, but as of yet, I can't g...
[ -0.15499597787857056, -0.14268094301223755, 0.7111620306968689, -0.3386286199092865, 0.12572278082370758, -0.29461929202079773, 0.33436119556427, -0.34216582775115967, -0.06411230564117432, -0.6157722473144531, -0.16464148461818695, 0.5928028225898743, -0.3530573844909668, 0.19846390187740...
I have a dataset in MySQL where using limit is already an expensive query, and finding the number of results is expensive as well. Thus, I'd like to avoid doing another query to find the number of results. I cannot use MYSQL\_CALC\_FOUND\_ROWS because the limit is inside a subquery: ``` SELECT * FROM items, ( SELECT...
[ -0.12669599056243896, -0.0637286975979805, 0.39491212368011475, 0.024927429854869843, -0.008144477382302284, 0.08344506472349167, -0.02682715654373169, -0.28540828824043274, -0.2677513360977173, -0.8125873804092407, -0.019943468272686005, 0.48667505383491516, -0.2608364224433899, 0.2788515...
to use MYSQL\_CALC\_FOUND\_ROWS, however this is very, very, slow. I've tried all index optimizations and let's just assume it is out of the question. This now becomes more a design question... **how do I allow the user to page through this data when I don't know the last page**? I only know if they've gone too far (e...
[ 0.19878517091274261, 0.07390359789133072, 0.49280959367752075, 0.2254917472600937, -0.26430249214172363, 0.2651320695877075, 0.1851358860731125, -0.14037184417247772, -0.2878343462944031, -0.7309436798095703, -0.006414562463760376, 0.5502169728279114, -0.3138427138328552, 0.160909458994865...
show the total count or the intermediate links to other pages. Show only the "next" link. 4. Estimate how many results there are. Again, Google does this and nobody complains.
[ 0.34340593218803406, -0.18202657997608185, 0.6134225130081177, 0.49074938893318176, -0.14726759493350983, -0.15083488821983337, 0.21789579093456268, -0.060653943568468094, -0.3783561587333679, -0.5869130492210388, -0.05344105139374733, 0.329340398311615, -0.011637534946203232, -0.195913031...
After trying to setup my site for Google Webmaster Tools I found that my Custom ASP.NET 404 page was not returning the 404 status code. It displayed the correct custom page and told the browser that everything is OK. This is consider a soft 404 or false 404. Google doesn't like this. So I found many articles on the iss...
[ 0.34761467576026917, 0.1462172567844391, 0.4735647439956665, -0.0262451171875, -0.05565061792731285, -0.08565308898687363, 0.6228143572807312, 0.09390760958194733, -0.3478587567806244, -0.47294628620147705, -0.10270574688911438, 0.6632194519042969, -0.36130771040916443, 0.13835172355175018...
page still returns 200 OK. I found however that if I hard code the following code into the design code it will work properly. ``` <asp:Content ID="ContentMain" ContentPlaceHolderID="ContentPlaceHolderMaster" runat="server"> <% Response.Status = "404 Not Found"; Response.StatusCode = 404; %> ... Much more co...
[ 0.10058488696813583, 0.21948085725307465, 0.7448351979255676, 0.1302022784948349, -0.1761748343706131, -0.036641597747802734, 0.5520999431610107, -0.3778487741947174, -0.21489377319812775, -0.6077616810798645, 0.11111962050199509, 0.57956463098526, -0.12223231047391891, -0.116099052131176,...