text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
want, with incrementing pages strURL = "http://www.website.com/results.aspx?page=" + strPageNo; //makes the web request wrGETURL = WebRequest.Create(strURL); //gets the web page for me objStream = wrGETURL.GetResponse().GetResponseStream(); /...
[ -0.006152957212179899, -0.10975288599729538, 0.950442910194397, -0.1616809070110321, 0.053104471415281296, 0.31031161546707153, 0.5281702876091003, -0.33165520429611206, -0.25714319944381714, -0.6723329424858093, -0.38979005813598633, 0.475361168384552, -0.1781490594148636, 0.1604624539613...
objReader = new StreamReader(objStream); //-------- // -snip- code that saves it to file, etc. //-------- objStream.Close(); objReader.Close(); //so the server doesn't get hammered
[ -0.3806086480617523, -0.007895407266914845, 0.7205387353897095, -0.19441354274749756, 0.052726633846759796, 0.03908407315611839, 0.32031235098838806, 0.18066036701202393, -0.3385220468044281, -0.6344677805900574, -0.6037250757217407, 0.42724165320396423, -0.29313868284225464, 0.13684557378...
System.Threading.Thread.Sleep(1000); } ``` Pretty simple, right? **The problem is**, even though it increments the page number to get a different web page, I'm getting the *exact same results page* each time the loop runs. `i` IS incrementing correctly, and I can cut/paste the url `strURL` creates into a ...
[ 0.3831557631492615, -0.017981640994548798, 0.5167178511619568, 0.00901822093874216, 0.08031312376260757, 0.013237280771136284, 0.5338580012321472, -0.08536974340677261, -0.38040781021118164, -0.7257465124130249, 0.1070396676659584, 0.47727611660957336, -0.3609277904033661, 0.33704060316085...
or what? I make sure I close both the stream and the reader before it loops again... Have you tried creating a new WebRequest object for each time during the loop, it could be the Create() method isn't adequately flushing out all of its old data. Another thing to check is that the ResponseStream is adequately flushed ...
[ 0.4015808403491974, -0.13044393062591553, 0.48033249378204346, 0.5099468231201172, -0.052759796380996704, 0.018212629482150078, 0.4450279474258423, 0.03411014378070831, -0.3156854510307312, -0.5505136251449585, 0.24600569903850555, 0.6162170171737671, -0.10616156458854675, 0.18359614908695...
Are there any good reasons not to use \u0000 as a delimiter within a Java String? I would be encoding and decoding the string myself. This is for saving a list of user-inputted (I'm expecting input to be typed?) strings to an Eclipse preference and reading it back. The list may be variable size so I don't think I can ...
[ 0.3599805235862732, 0.02910066582262516, -0.05087919905781746, 0.06645802408456802, -0.24000999331474304, 0.10556280612945557, 0.19155164062976837, 0.1251523494720459, -0.27402806282043457, -0.5137246251106262, 0.22606727480888367, 0.41649338603019714, -0.21283815801143646, 0.2534840703010...
libraries that will handle strings as null terminated.
[ -0.09884457290172577, -0.2228875607252121, -0.1676129698753357, 0.321654349565506, -0.061003439128398895, -0.36068251729011536, 0.3332165777683258, 0.34422579407691956, -0.17293605208396912, -0.3859453499317169, -0.5334739685058594, 0.09348345547914505, -0.5511875152587891, 0.2045861631631...
What is the Emacs mode or package that highlights Lisp forms changing the color of the backgrounds so that the form you are in has one color, the outer form another, the outer outer form another and so on? You may want to try [mwe-color-box](http://www.foldr.org/~michaelw/emacs/) (screenshot below) or read [Five approa...
[ -0.12870429456233978, -0.28849026560783386, 0.43271830677986145, 0.024114593863487244, -0.029894154518842697, 0.2647589147090912, 0.21780401468276978, -0.14661969244480133, -0.35931381583213806, -0.596044659614563, -0.3328709602355957, 0.5656037926673889, -0.25014227628707886, -0.682148516...
I was wondering about the best way to manage projects dependencies from ant. What are the pros and cons of the Maven Ant task and of Ivy? Since what you're wanting to do is add dependency management to an existing Ant project, that's precisely what Ivy's designed to do. Dependency management is a big part of Maven, but...
[ 0.32654425501823425, -0.19092564284801483, 0.042812496423721313, -0.023438844829797745, 0.12310396134853363, 0.002616252051666379, 0.1580813229084015, -0.015496890991926193, 0.014643547125160694, -0.5847976207733154, 0.5798335671424866, 0.6373491287231445, -0.33838582038879395, 0.033139001...
a bit much if all you'd use it for is to spin off Ant. Your type of dependencies and your expectations for how they behave will also make a difference. Pulling third-party dependencies is almost trivial in Maven, while Ivy excels in rebuilding your own dependent components. In either case, the tools won't provide dece...
[ 0.27602526545524597, -0.3328308165073395, 0.016229234635829926, 0.23452460765838623, -0.019014457240700722, 0.12109728902578354, 0.17257572710514069, -0.2031082659959793, 0.05379442125558853, -0.45128676295280457, 0.1611223667860031, 0.5655661821365356, -0.04385637119412422, 0.086046062409...
I'm pretty sure this is not the right way to do this so I'm looking for some suggestions. I don't think my problem so much is that I'm trying to solve a spatial problem. I'm just not sure of a good way to take the latitude and longitude and return a geography data type in a select statement. I have successfully create...
[ 0.22733564674854279, -0.021938230842351913, 0.6920632719993591, 0.09454796463251114, -0.15013542771339417, 0.17418454587459564, -0.0351407527923584, -0.18786652386188507, 0.09754697978496552, -0.7913787364959717, -0.18899643421173096, 0.24935422837734222, -0.30511441826820374, 0.1847420930...
0); select @g ``` Since what you're wanting to do is add dependency management to an existing Ant project, that's precisely what Ivy's designed to do. Dependency management is a big part of Maven, but far from all of it. Maven is more of a project-oriented tool that does several other things in addition to dependenci...
[ 0.16711866855621338, -0.45416831970214844, 0.12855461239814758, -0.14093002676963806, 0.15127785503864288, -0.23770026862621307, 0.21707844734191895, -0.0006683649262413383, 0.2813153564929962, -0.7187379002571106, 0.17351609468460083, 0.5946441888809204, -0.5759369730949402, 0.12066519260...
also make a difference. Pulling third-party dependencies is almost trivial in Maven, while Ivy excels in rebuilding your own dependent components. In either case, the tools won't provide decent build, versioning, and repository *policies*, those are still up to you and needed to get the configuration right.
[ 0.29743707180023193, -0.05153605341911316, 0.0179462693631649, 0.2109646201133728, 0.07039500772953033, -0.05978262424468994, 0.16760750114917755, -0.15437282621860504, -0.007996725849807262, -0.45844998955726624, 0.032684896141290665, 0.6252254843711853, 0.08226998895406723, -0.0336688049...
How would I go about setting different authentication tags for different parts of my web app? Say I have: ``` / /folder1/ /folder2/ ``` Would it be possible to specify different `<authentication/>` tags for each folder? I want folder1 to use Windows authentication but folder2 use Forms authentication. I tried doi...
[ 0.2942679524421692, 0.08854742348194122, 0.45336785912513733, 0.1139066144824028, 0.1771237850189209, -0.2606235444545746, 0.4361115097999573, -0.51667720079422, -0.2299121767282486, -0.8339946866035461, 0.08693902939558029, 0.49068698287010193, -0.5564375519752502, -0.06853405386209488, ...
virtual directory not being configured as an application in IIS. ``` <location path="/folder1"> <system.web> <authentication mode="Forms" /> <authorization> <deny users="?"/> </authorization> </system.web> </location> ``` You can only have `<authentication />` on the top level `we...
[ 0.1674913465976715, -0.20379173755645752, 0.4965980052947998, 0.17805053293704987, 0.16216537356376648, -0.17901203036308289, 0.1974884569644928, 0.3289673924446106, -0.4450797438621521, -1.0650743246078491, -0.10828012228012085, 0.587587833404541, -0.41163507103919983, 0.4997974634170532,...
I'd like to programatically determine the encoding of a page via JavaScript, or some other API from a browser. The reason I want this information is because I am attempting to fuzz major browsers on what character encodings they support, and obviously just because I sent the appropriate "Content-Type" doesn't mean that...
[ 0.5709831118583679, 0.13087207078933716, 0.2861334979534149, 0.22192400693893433, -0.0280253067612648, -0.09865006059408188, 0.035036034882068634, 0.1155996024608612, 0.03404338285326958, -1.0069671869277954, -0.013704772107303143, 0.29327282309532166, -0.16395987570285797, -0.002565310103...
you for you to base any hardcore tests on. There are things such as `document.inputEncoding`, `document.characterSet` (non IE), `document.charset`, and `document.defaultCharset` (IE) which might get you some of the way there. But these might be as flaky as the actual support. That is, if a browser "thinks" it support...
[ 0.4217110276222229, 0.11962291598320007, -0.30495020747184753, 0.4764458239078522, -0.05659417435526848, -0.07946567237377167, 0.39694708585739136, 0.07916887104511261, -0.10415665805339813, -0.5209949016571045, -0.08222789317369461, 0.6827729940414429, 0.033485572785139084, -0.31674307584...
settings, original encoding request, and contents of `testElement.innerHTML` which you can then verify against expected results.
[ 0.4336164593696594, -0.1282435655593872, 0.1729990839958191, 0.48113569617271423, 0.23237137496471405, -0.007607629522681236, -0.016251403838396072, 0.1404772251844406, 0.06441811472177505, -0.5685557723045349, -0.26612311601638794, 0.46338558197021484, -0.04348542541265488, -0.13452672958...
I've often heard Ruby's inject method criticized as being "slow." As I rather like the function, and see equivalents in other languages, I'm curious if it's merely Ruby's **implementation** of the method that's slow, or if it is inherently a slow way to do things (e.g. should be avoided for non-small collections)? `inj...
[ -0.09300091117620468, -0.17041680216789246, -0.2223762720823288, -0.08282072097063065, -0.2892743647098541, -0.3054714798927307, 0.4253954291343689, 0.18166060745716095, 0.1053619459271431, -0.47838103771209717, -0.09085200726985931, 0.3872838020324707, -0.5361837148666382, -0.180667430162...
I'm having some problems with a datagridview element I'm using in VS2008. This DataGridView is actually a tab in a TabControl element. I gave it 5 colums which need to be filled up with elements from a costum Object i made. It's basically a small library application which contains a main class and several classed der...
[ -0.004923353902995586, -0.15527264773845673, 0.47509491443634033, 0.09754994511604309, -0.05263834074139595, 0.07054074108600616, 0.1665801703929901, -0.1325937658548355, -0.18083813786506653, -0.5516497492790222, 0.24200719594955444, 0.44166299700737, -0.31355810165405273, 0.1703892946243...
the datagrid doesn't fill itself, instead it adds an amount of columns equall to the amount of keywords the specific object has. What i'm currently doing is this: ``` public void libDataGrid_Click(object sender, EventArgs e) { if(this.manager.Lib.LibList[0] != null) { l...
[ -0.5036194324493408, -0.08127082139253616, 0.7682605385780334, -0.25758427381515503, -0.09153041988611221, -0.16978126764297485, 0.5179228186607361, -0.3751121759414673, -0.17020806670188904, -0.49775633215904236, -0.101988285779953, 0.541296660900116, -0.4878940284252167, 0.34108477830886...
} } ``` `this.manager.Lib.LibList` returns and ArrayList, in which all objects are stored. The ArrayList can contain elements of all derived classes, but since they are all connected, the string representation will always contain the elements I need to fill up the grid. I don't see how I can filter only the ...
[ -0.08729951083660126, -0.02059180475771427, 0.3613155484199524, -0.14165565371513367, -0.13913197815418243, -0.0536983497440815, 0.08768372237682343, -0.031259819865226746, -0.2775324285030365, -0.6956831216812134, 0.08018839359283447, 0.5996549725532532, -0.3095633089542389, 0.21082390844...
to its specific tab on the Tabcontrol I mean. I tried adding an argument for SelectedIndexChanged, but that does nothing really... Or at least, it doesn't appear to do anything. What I mean is I commented out the code above and added this instead: ``` public void tabControl1_SelectedIndexChanged(object sender, Event...
[ -0.3392902612686157, -0.37711459398269653, 0.41661912202835083, -0.13445352017879486, -0.04651127755641937, -0.0385436937212944, 0.2723676860332489, -0.07164561748504639, -0.27443045377731323, -0.4705334007740021, -0.1096128299832344, 0.466202974319458, -0.4915982782840729, 0.2555138170719...
tab is changed, no matter to which one. I had to remove the if-statement, since it gave me an Exception. Probably because the length of the ArrayList isn't set on initialisation. I'm a little confused by the question, but here are some thoughts: 1. `DataGridView` has an [`AutoGenerateColumn`s](http://msdn.microsoft.co...
[ 0.017229700461030006, -0.1461060792207718, 0.6597409844398499, -0.24382823705673218, -0.2822711169719696, 0.13632407784461975, 0.12304992973804474, -0.2296917885541916, -0.3619663715362549, -0.44001832604408264, -0.009355369955301285, 0.35403144359588623, -0.6501919627189636, 0.24266088008...
empty list. In general, in 2.0 using `ArrayList` is a mistake.
[ -0.1656903624534607, -0.054709918797016144, -0.03387252986431122, -0.2995554506778717, -0.037259068340063095, -0.3227342367172241, 0.2404230684041977, -0.1544969081878662, -0.31879913806915283, -0.5178333520889282, -0.3580807149410248, 0.3050675094127655, -0.6176563501358032, -0.0881509259...
Testing: ``` return request.getCookies() == null; ``` is not an appropriate way test. Is there another way? You generally want to use JavaScript to determine if the client's browser has cookies enabled: ``` <script type="text/javascript"> var cookieEnabled=(navigator.cookieEnabled)? true : false //if not IE4+ nor ...
[ 0.4182162880897522, -0.011145586147904396, 0.1267978399991989, 0.04033466428518295, 0.05354364216327667, -0.24499931931495667, 0.6654271483421326, -0.4594665765762329, 0.17660537362098694, -0.9008550047874451, 0.01819840632379055, 0.641081690788269, 0.07561187446117401, -0.2277183979749679...
How do I convert a string into the corresponding code in PLT Scheme (which does not contain the `string->input-port` method)? For example, I want to convert this string: ``` "(1 (0) 1 (0) 0)" ``` into this list: ``` '(1 (0) 1 (0) 0) ``` Is it possible to do this without opening a file? Scheme has procedure `read`...
[ 0.304054856300354, 0.01203772984445095, 0.4775632917881012, -0.3360772728919983, -0.22656196355819702, -0.1197843849658966, 0.3297187089920044, -0.6692452430725098, -0.1364029198884964, -0.7605522871017456, 0.08815989643335342, 0.44292423129081726, -0.23007720708847046, 0.00473801326006650...
Let's say I have a table like this: ``` name | score_a | score_b -----+---------+-------- Joe | 100 | 24 Sam | 96 | 438 Bob | 76 | 101 ... | ... | ... ``` I'd like to select the minimum of score\_a and score\_b. In other words, something like: ``` SELECT name, MIN(score_a, score_b) FROM t...
[ -0.3485504984855652, 0.4102414548397064, 0.3351648151874542, -0.16976748406887054, 0.027823390439152718, 0.1618388295173645, 0.06330210715532303, -0.25040411949157715, -0.38359329104423523, -0.5782399773597717, 0.09860723465681076, 0.5655790567398071, -0.23751500248908997, 0.04449772089719...
Postgres, I get, "No function matches the given name and argument types. You may need to add explicit type casts." MAX() and MIN() appear to work across *rows* rather than *columns.* Is it possible to do what I'm attempting? [LEAST](https://www.postgresql.org/docs/current/functions-conditional.html#FUNCTIONS-GREATEST-...
[ -0.13736489415168762, 0.08755344152450562, 0.46351099014282227, -0.06838425248861313, -0.14137481153011322, 0.2682339549064636, 0.452925443649292, -0.33775806427001953, 0.1196616142988205, -0.3339768946170807, -0.39767542481422424, 0.4861697554588318, -0.34297826886177063, -0.0736577957868...
to NULL. > > > Note that `GREATEST` and `LEAST` are not in the SQL standard, but are a common extension. Some other databases make them return NULL if any argument is NULL, rather than only when all are NULL...
[ -0.04691426455974579, 0.04857443645596504, -0.15076500177383423, 0.0027538766153156757, -0.056153640151023865, -0.26325899362564087, 0.2904863655567169, 0.10074880719184875, -0.11856778711080551, -0.32918301224708557, -0.3198467195034027, 0.30944788455963135, -0.2765564024448395, 0.2522649...
I found a lot of questions asking for the best tool, but none asking for the **features, you really need**? And what features you *never* really needed? (I caught myself to be comparing tools on feature matrices. Something I hate, because in the end I will be using only the 3-4 most important features and leave the re...
[ 0.6127251386642456, 0.07225103676319122, 0.28849539160728455, 0.39446139335632324, 0.1273551881313324, -0.020230263471603394, 0.07787822932004929, 0.01347910426557064, -0.3134593069553375, -0.46500179171562195, -0.040967587381601334, 0.745169460773468, -0.18125422298908234, 0.1012715622782...
reproduce the bug 9. usable by more than one developer 10. bug status need to be accessible by the client that reported the bug. And there are more.
[ 0.4371378719806671, 0.20197811722755432, 0.27099868655204773, 0.19530293345451355, 0.1527489274740219, 0.24401767551898956, 0.2503468990325928, 0.37315642833709717, -0.221173495054245, -0.879122793674469, -0.18299579620361328, 0.42525187134742737, -0.561491847038269, -0.2420894354581833, ...
I am currently building a .Net userform using C# and I am populating it with custom user controls. The controls each have an accessor that gets and sets the object that contains the data that the control will be populated with. At runtime, everything works great, but at design time I will get errors in the form design...
[ 0.33091026544570923, 0.043565426021814346, 0.4942648708820343, 0.19209221005439758, 0.11925072222948074, 0.0333121120929718, 0.25687849521636963, -0.16981126368045807, 0.1160617247223854, -0.9813270568847656, -0.009204105474054813, 0.5560640096664429, -0.2840719521045685, 0.349173009395599...
go into the designer.cs file and delete the line in InitializeComponent that sets the accessor of the control to the data from the resx file. Once I've done that, the form will display in the designer until it rebuilds the InitializeComponet and reinserts the lines / data into the resx and InitializeComponent. What a...
[ 0.41926926374435425, -0.33657336235046387, 0.55961674451828, 0.17649273574352264, 0.19647160172462463, -0.11450564861297607, 0.27400001883506775, -0.014152449555695057, -0.09938932210206985, -0.8770395517349243, -0.21304045617580414, 0.6429498195648193, -0.23829470574855804, 0.377025246620...
I added the attribute... ``` [DesignerSerializationVisibility(DesignerSerializationVisibility.Content)] ``` To the property and I got an error in the designer "ObjectA is null, this is not allowed!", so I changed the line to ... ``` [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] ``` a...
[ 0.16464842855930328, -0.0015407028840854764, 0.2808056175708771, -0.021924352273344994, -0.029569311067461967, -0.08751219511032104, 0.25692424178123474, -0.0905647873878479, -0.10203049331903458, -0.6100327372550964, -0.14989760518074036, 0.544325590133667, -0.41539499163627625, 0.4662436...
property: [DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
[ -0.02372233010828495, -0.007926912978291512, -0.05172606557607651, 0.12109974771738052, 0.08713715523481369, -0.3260287642478943, -0.4149308204650879, 0.0198158361017704, -0.20485664904117584, -0.6380000710487366, -0.2974167466163635, 0.07978956401348114, -0.08733461797237396, 0.5307090282...
Here's the problem: 1.) We have page here... www.blah.com/mypage.html 2.) That page requests a js file www.foo.com like this... ``` <script type="text/javascript" src="http://www.foo.com/jsfile.js" /> ``` 3.) "jsfile.js" uses Prototype to make an Ajax request back to www.foo.com. 4.) The ajax request calls www.fo...
[ 0.22654147446155548, 0.5007835626602173, 0.4744889736175537, -0.21952205896377563, -0.2719346880912781, -0.1080823466181755, 0.35922759771347046, -0.03563934564590454, -0.24247990548610687, -0.6002601981163025, 0.30213233828544617, 0.4501277506351471, -0.5032089352607727, 0.254236996173858...
things that way. If you really need to, make your AJAX code call the local code (PHP, ASP, whatever) on blah.com and make it behave like client and fetch whatever you need from foo.com and return that back to the client. If you use PHP, you can do this with fopen('www.foo.com/blah.html', 'r') and then reading the con...
[ 0.565534234046936, 0.08694722503423691, 0.5575978755950928, -0.04102185741066933, -0.009946722537279129, -0.18227516114711761, 0.11769748479127884, 0.3315948247909546, -0.43995893001556396, -0.7773449420928955, -0.1838388293981552, 0.8630521297454834, -0.27542737126350403, -0.0933322757482...
I have several files that are in several different languages. I thought they were all encoded UTF-8, but now I'm not so sure. Some characters look fine, some do not. Is there a way that I can break out the strings and try to identify the character sets? Perhaps split on white space then identify each word? Finally, is ...
[ 0.3605140149593353, 0.19989177584648132, 0.18740075826644897, 0.22189468145370483, 0.031254660338163376, 0.2491782307624817, 0.18864890933036804, 0.03424235060811043, -0.34773528575897217, -0.3260417878627777, -0.14731928706169128, 0.3930223286151886, -0.07602182030677795, 0.05821905285120...
that if it isn't unicode it must be a specific character set (Like Latin-1), you lucky. If you have no idea, you're screwed. In any case, you should always assume the whole file is in the same character set, unless otherwise specified. You will lose your sanity if you don't. As for your question how to convert between...
[ 0.3303218185901642, 0.34168606996536255, 0.0022778580896556377, 0.41856107115745544, 0.4238634407520294, -0.040262989699840546, 0.1629381775856018, -0.12736600637435913, -0.5567132234573364, -0.22138454020023346, -0.348073810338974, 0.3973652124404907, 0.020669177174568176, 0.1542758643627...
I'm working on a project where I am using a script.aculo.us Sortable object. It works nice and fast in Firefox and Chrome, but in IE it is incredibly slow whenever I drop an element. I've done a little checking, and it turns out that in IE, the "onUpdate" callback function gets called about 8 times every time I drop....
[ 0.15589182078838348, 0.02880227193236351, 0.22546347975730896, -0.055230122059583664, 0.06514237076044083, -0.030183861032128334, 0.13390731811523438, 0.09431049227714539, -0.21800903975963593, -0.7320841550827026, -0.07678360491991043, 0.24215054512023926, -0.46558499336242676, -0.0733756...
problem in IE, or how to fix it? EDIT: I've noticed that the problem isn't that it triggers many many times when it is dragged, the problem is that the `onUpdate` function gets fired when the order of a sortable changes, even if the drag hasn't ended. It seems that `onUpdate` is actually working like the `onChange` ca...
[ 0.22812709212303162, -0.34851008653640747, 0.5553660988807678, -0.1496029645204544, -0.14426054060459137, -0.1413179188966751, 0.2454010248184204, 0.035846009850502014, -0.20238222181797028, -0.7018290758132935, -0.1454307734966278, 0.6964605450630188, -0.47442686557769775, 0.0452711135149...
base * b; template<typename T> my_any(T t):b(new concrete_base<T>(t)) { } template<typename T> T any_cast() { concrete_base<T> * t = dynamic_cast< concrete_base<T>* >(b); if(!t) throw bad_any_cast(); return t->t; } }; ``` I hope it's clear what the above does. There is n...
[ 0.6418498754501343, 0.06856968253850937, -0.015196021646261215, -0.44930750131607056, -0.0068217492662370205, -0.20542873442173004, 0.5370197296142578, -0.05515917390584946, -0.06156140938401222, -0.4122518301010132, -0.024048559367656708, 0.4941035211086273, -0.645315408706665, 0.10588392...
prove useful here. RTTI doesn't provide it.
[ 0.3033429980278015, 0.168471559882164, 0.192766472697258, 0.2753859758377075, 0.1996491700410843, -0.2204233556985855, 0.08230268210172653, 0.12124954909086227, 0.2323846071958542, -0.5027492046356201, 0.24421028792858124, 0.48767730593681335, 0.05587763711810112, 0.07879859209060669, -0...
I'm not sure how to ask the question, for I don't know what I don't know, and therefore I don't know the proper terminology for what I'm trying to get the answer to. I will explain my scenario, in hopes that it will help: I've got three tables, a Book table, a Tag table and a BookTag lookup table. Each book has an ID...
[ 0.1561252474784851, 0.16221566498279572, 0.6516076326370239, 0.423475980758667, 0.3294317424297333, 0.06639574468135834, -0.29543325304985046, -0.2381875216960907, -0.17592443525791168, -0.39291757345199585, 0.07323811948299408, 0.03221873566508293, -0.16508188843727112, 0.0039324327372014...
got my objects setup in this fashion: ``` Book.cs int BookID string Title List<BookTag> Tags Tag.cs int TagID string Title BookTag.cs int ID int BookID int TagID ``` I would like the Books.cs class to have a collection of Tags, and not BookTags, but I cannot seem to get the mapping right in NHibernate. This is wha...
[ -0.08821772783994675, 0.10793997347354889, 0.6390218734741211, 0.08075333386659622, -0.2803668975830078, -0.08155204355716705, 0.182536780834198, -0.5154591798782349, -0.2511711120605469, -0.6428834795951843, -0.0958324521780014, 0.24053120613098145, -0.307455837726593, 0.1373353898525238,...
column="BookID"/> <one-to-many class="DomainModel.Books.BookTag, DomainModel"/> </set> </class> </hibernate-mapping> ``` And this is my BookTag.hbm.xml: ``` <?xml version="1.0" encoding="utf-8" ?> <hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" assembly="DomainModel" namespace="DomainModel.Books"> ...
[ -0.3330571949481964, -0.05200699716806412, 0.9422091841697693, -0.06728113442659378, -0.18230508267879486, 0.043479010462760925, -0.032445717602968216, -0.40465131402015686, -0.09869319200515747, -0.7839882373809814, -0.30114254355430603, 0.34112411737442017, -0.28681042790412903, -0.08496...
but that just seems inefficient. Can I use NHibernate to map out the BookTags.TagID with the Tags.TagID in the database so that I can get Book.Tags[0] to return a Tag object, instead of a BookTags object? I didn't know of a better way to associate Books to tags so that a tag used on Book1 can be used on Book2 without a...
[ 0.2398531436920166, 0.0338168703019619, 0.5723979473114014, 0.4344845712184906, -0.05878782644867897, -0.26425525546073914, 0.1306716650724411, -0.2633635699748993, -0.15327824652194977, -0.5090442895889282, 0.18723806738853455, 0.3208589553833008, -0.17600351572036743, 0.1478605419397354,...
BookTag class at all. You can map Book.Tags collection as many-to-many. To do this you will specify BookTag in the map to connect the association. Look [here](http://www.hibernate.org/hib_docs/nhibernate/html/collections.html#collections-ofvalues) in section 6.8 Bidirectional Associations.
[ -0.00771570997312665, -0.34012019634246826, 0.47128593921661377, 0.280124694108963, -0.2566782534122467, -0.39832669496536255, 0.2296091616153717, -0.258125364780426, -0.4145320951938629, -0.409603476524353, -0.18935957551002502, 0.21977731585502625, -0.2768743932247162, 0.0595006793737411...
An integer's max value in Java is 2147483647, since Java integers are signed, right? 0xff000000 has a numeric value of 4278190080. Yet I see Java code like this: ``` int ALPHA_MASK = 0xff000000; ``` Can anyone enlighten me please? The high bit is a sign bit. Setting it denotes a negative number: -16777216. Java,...
[ -0.11821112036705017, 0.17971482872962952, 0.20525257289409637, -0.5585407614707947, -0.3993090093135834, 0.21493345499038696, 0.31605711579322815, -0.34005019068717957, -0.18021053075790405, -0.22042088210582733, 0.08344241231679916, 0.1854279488325119, -0.25296956300735474, -0.0985263288...
I'll have couple of python functions I must interface with from the assembly code. The solution doesn't need to be a complete solution because I'm not going to interface with python code for too long. Anyway, I chewed it a bit: * What does a python object look like in memory? * How can I call a python function? * How ...
[ 0.0775534063577652, 0.24442510306835175, 0.07763179391622543, 0.0005251046968623996, -0.08698993921279907, 0.15298956632614136, 0.04641559720039368, -0.1610483080148697, -0.12695080041885376, -0.5795146822929382, 0.04753720760345459, 0.6957514882087708, -0.17477655410766602, -0.07662118971...
how to interface with Python from C. Everything you can do in C you can equivalently do in assembly code too, but you're on your own for this as it is not directly described from a Python perspective.
[ 0.17140446603298187, -0.028704630210995674, -0.0962437242269516, 0.019639983773231506, -0.283992737531662, -0.17963789403438568, 0.31015104055404663, 0.16775859892368317, -0.11380566656589508, -0.7646454572677612, -0.005942339543253183, 0.9107303023338318, -0.242270365357399, -0.4747547507...
I have an ASP.NET 2.0 application. The login page redirects twice when the login is successful. This works OK on all test environment and production servers except one. We can see with Fiddler that the login redirects to the second page and it redirects to the third. When getting to the third page the authentication co...
[ 0.27900150418281555, 0.039162810891866684, 0.524207353591919, -0.1563125103712082, -0.1597672402858734, -0.13457205891609192, 0.7962269186973572, -0.18463313579559326, -0.31111136078834534, -0.7735887765884399, 0.03919383883476257, 0.44718483090400696, -0.0963011085987091, -0.0844155028462...
the same from FireFox. I can see clearly of fiddler, that in this case the cookie is not lost. Any ideas? Are you setting a cookie with a domain name set? When browsing, does your URL contain the domain name? "localhost" cookies don't really work like domain-set cookies and can often disappear. HttpCookie contains t...
[ 0.36169975996017456, -0.062252227216959, 0.23613084852695465, 0.17360033094882965, -0.0735933929681778, -0.4797719120979309, 0.23642529547214508, 0.4311303496360779, -0.4286007285118103, -0.6861491799354553, 0.10676933825016022, 0.6540000438690186, -0.1647426038980484, 0.1849854439496994, ...
The Eclipse [Visual Editor](http://www.eclipse.org/projects/project_summary.php?projectid=tools.ve) project seems to be dead, no commits, no updates. Any one know what is happening? **Update 2:** The project [has been archived](http://www.eclipse.org/archived/) (i.e. dead) since June 2011 again. **Update:** The projec...
[ 0.37266311049461365, -0.02285689301788807, 0.4455774128437042, -0.34576112031936646, -0.5321583151817322, -0.05771530047059059, 0.3605707585811615, 0.3190634250640869, -0.6283130049705505, -0.38129937648773193, -0.1594965159893036, 0.3934052586555481, -0.0659252405166626, 0.208430349826812...
I can not figure out what all the parameters to the arc() function are (by experimentation) and I have not found any tutorial that seems to explain them. Where would a good explanation of the arc() function be? ``` arc(x, y, radius, startAngle, endAngle, anticlockwise) ``` The first three parameters, x and y and radi...
[ -0.11069617420434952, 0.009509202092885971, 0.5769444108009338, 0.021199995651841164, -0.367266982793808, 0.3550333082675934, 0.012894104234874249, -0.5822544693946838, 0.10853416472673416, -0.4918554127216339, -0.022760208696126938, 0.4016866087913513, -0.2595117688179016, -0.000478460598...
the attached diagrams, the only difference is the anticlockwise param. Math.PI/2 always ends south when clockwise or anticlockwise
[ -0.4755493998527527, 0.06959512829780579, 0.6905872821807861, 0.04901657998561859, -0.2511475086212158, 0.015096297487616539, 0.33808019757270813, -0.37068304419517517, -0.4005107581615448, -0.5583372116088867, -0.13479219377040863, -0.32619398832321167, -0.1702583283185959, 0.157118141651...
So I added an EXE to my project's solution. The EXE does some stuff and outputs data via stdout. I want to capture the output, but more importantly how do I execute that EXE within my program? ``` Process p = new Process(); p.StartInfo.UseShellExecute = false; p.StartInfo.RedirectStandardOutput = true; p.StartInfo.File...
[ 0.10077081620693207, 0.22902393341064453, 0.4262191653251648, -0.06682965159416199, 0.2201099544763565, 0.16954468190670013, 0.27798667550086975, -0.2816879451274872, -0.2397143393754959, -0.5179755091667175, -0.3299461305141449, 0.25218164920806885, -0.2919690012931824, 0.2745071649551391...
I'm a little lost (still working with Ron Jeffries's book). Here's a simple class: ``` public class Model{ private String[] lines; public void myMethod(){ String[] newLines = new String[lines.length + 2]; for (i = 0, i <= lines.length, i++) { newLines[i] = lines[i]; } }...
[ -0.017894087359309196, -0.40170007944107056, 0.4398249089717865, 0.15911802649497986, 0.33259305357933044, 0.14088009297847748, 0.18449664115905762, -0.03976286202669144, 0.1063564270734787, -0.6072992086410522, 0.05976942926645279, 0.2644250988960266, -0.22833262383937836, 0.5991257429122...
When I invoke `myModel.myMethod()`, I get a subscript out of range error. Looking at the debugger, what I see is that `myModel.lines` has zero dimensions and zero length. Shouldn't it have a dimension and length of 1? Granted the value of `lines[0]` is `null`, but the array itself shouldn't be, should it? Any thought...
[ 0.3181825876235962, 0.041060611605644226, 0.08466076105833054, -0.021655192598700523, -0.14455699920654297, -0.0955202579498291, 0.4367200434207916, -0.03998903930187225, -0.33408108353614807, -0.5144546031951904, 0.2661966383457184, 0.3629942238330841, -0.34854087233543396, 0.186183407902...
that you check that the index is strictly less than the length of the array. As others have indicated you also need to make sure that the array itself is not null before trying to reference it. My take on your code: ``` public class Model{ private String[] lines = new string[0]; public Model( string[] lines ...
[ 0.3384063243865967, -0.46285367012023926, 0.28643345832824707, -0.045547567307949066, 0.059989579021930695, 0.1421097368001938, 0.3811884820461273, -0.04366612434387207, -0.2242894172668457, -0.6469835638999939, 0.04246830567717552, 0.5468829274177551, -0.34332507848739624, 0.2389340102672...
(lines != null) { len = len + lines.length; } String[] newLines = new String[len]; for (i = 0, i < lines.length, i++) { newLines[i] = lines[i]; } } } ```
[ 0.012381534092128277, -0.5619438290596008, 0.5817943215370178, -0.20884378254413605, -0.02021993324160576, 0.1323593109846115, 0.2828695774078369, -0.3035663664340973, -0.37641018629074097, -0.460397332906723, -0.45178842544555664, 0.3118293285369873, -0.33544158935546875, 0.37316128611564...
I've got an app on the iTunes store, and Apple provides daily (and weekly) sales reports. I'd like to download these in an automated fashion (say, via script attached to a cron job), but I'm not sure how to get around all their https-forms, Web-objects controls, session-IDs, etc. Does anyone have a plug & play solutio...
[ 0.6840940713882446, 0.25551700592041016, 0.28773823380470276, 0.11123562604188919, 0.054584477096796036, 0.1833937019109726, 0.1808079332113266, 0.11443343013525009, -0.43214961886405945, -0.5426319241523743, -0.021451976150274277, 0.7626535892486572, 0.23414970934391022, -0.04665452614426...
I have a problem with time My server is in the USA and I'm in Denmark (Europa) and I would like to have my site show the time in my local time. How can I do that? I try this ``` Datetime localtime = DateTimeOffset.Now.ToOffset(new TimeSpan(1,0,0)).DateTime; ``` and it works, but it will only work when I'm in GM...
[ 0.1685975044965744, -0.11513029783964157, 0.8358259797096252, -0.0066960034891963005, 0.49132442474365234, -0.013760935515165329, 0.5426493883132935, 0.24306932091712952, -0.40595218539237976, -0.6310349702835083, -0.07372185587882996, 0.13945551216602325, -0.24500584602355957, 0.162280797...
is " + result + " in Denmark"); ``` Using the TimeZoneInfo class is the only reliable way in .Net to convert to/from different timezones AND get proper DST conversions. `TimeZoneInfo.ConvertTimeToUtc(dtLocal,tzi)` is the reverse converting from a local time to a utc time. --- For the TimeZone Id strings, you can r...
[ 0.2310333251953125, -0.40150269865989685, 0.7832592129707336, -0.0557066835463047, 0.3204368054866791, -0.014926139265298843, 0.30594557523727417, -0.12890641391277313, 0.1100616380572319, -0.7319240570068359, -0.31019285321235657, 0.5293977856636047, -0.16113980114459991, 0.21580047905445...
I'm able to get cells to format as Dates, but I've been unable to get cells to format as currency... Anyone have an example of how to create a style to get this to work? My code below show the styles I'm creating... the styleDateFormat works like a champ while styleCurrencyFormat has no affect on the cell. ``` private...
[ 0.4889237880706787, 0.010790287517011166, 0.7168979048728943, -0.17235437035560608, 0.2609086036682129, -0.10410990566015244, 0.2765473425388336, -0.6155192852020264, 0.16009506583213806, -0.5929964780807495, -0.17488673329353333, 0.5011218786239624, -0.1344880312681198, 0.197397843003273,...
styleCurrencyFormat.setDataFormat(HSSFDataFormat.getBuiltinFormat("$#,##0.00")); } ``` After digging through the documentation a bit more, I found the answer: <http://poi.apache.org/apidocs/org/apache/poi/hssf/usermodel/HSSFDataFormat.html> Just need to find an appropriate pre-set format and supply the code. ``` ...
[ 0.4090200960636139, -0.23751842975616455, 0.8359749913215637, 0.08922689408063889, 0.05076909810304642, -0.005853356793522835, 0.13340002298355103, -0.3351336717605591, -0.08021432161331177, -0.6643375754356384, -0.13758988678455353, 0.37180641293525696, -0.14921708405017853, -0.3559376001...
Are there any libraries out there for Java that will accept two strings, and return a string with formatted output as per the \*nix diff command? e.g. feed in ``` test 1,2,3,4 test 5,6,7,8 test 9,10,11,12 test 13,14,15,16 ``` and ``` test 1,2,3,4 test 5,6,7,8 test 9,10,11,12,13 test 13,14,15,16 ``` as input, a...
[ 0.3090274930000305, 0.025713002309203148, -0.12112446129322052, -0.13183653354644775, -0.07650616019964218, 0.2475554347038269, 0.4128371477127075, -0.1430133432149887, 0.13833801448345184, -0.5615059733390808, 0.04716141149401665, 0.26893290877342224, -0.3793972134590149, -0.1033257693052...
test 5,6,7,8 test 9,10,11,12
[ -0.1005186066031456, -0.1497601419687271, -0.29439303278923035, 0.1360960602760315, 0.05426056683063507, 0.41741180419921875, 0.4261268079280853, -0.06285939365625381, -0.16877180337905884, -0.717258870601654, 0.37488406896591187, -0.1120721846818924, 0.2712453603744507, 0.0070058368146419...
| test 9,10,11,12,13 test 13,14,15,16 test 13,14,15,16 ``` Exactly the same as if I had passed the files to `diff -y expected actual` I found [this question](https://stackoverflow.com/questions/132478/how-to-perform-string-diffs-in-java), and it gives some good advice o...
[ 0.25541451573371887, 0.1906292736530304, 0.24187467992305756, -0.27943548560142517, -0.16129805147647858, 0.17070908844470978, 0.4060480296611786, -0.520184338092804, -0.11548082530498505, -0.30872735381126404, -0.08060140907764435, 0.38383540511131287, -0.19391995668411255, -0.08037316799...
this particular app will be running on unix and windows and I can't be sure that the environment will actually have `diff` available. I ended up rolling my own. Not sure if it's the best implementation, and it's ugly as hell, but it passes against test input. It uses [java-diff](http://www.incava.org/projects/java/ja...
[ 0.2884902358055115, 0.09542430937290192, 0.6297719478607178, -0.0069151148200035095, -0.0317147932946682, 0.09202121943235397, 0.19969049096107483, -0.17539222538471222, -0.032780688256025314, -0.4514808654785156, -0.060523174703121185, 0.72160404920578, -0.4558250904083252, -0.00502791255...
test. String[] fromLines = fromStr.split("\n"); String[] toLines = toStr.split("\n"); List<Difference> diffs = (new Diff(fromLines, toLines)).diff(); int padding = 3; int maxStrWidth = Math.max(maxLength(fromLines), maxLength(toLines)) + padding; StrBuilder diffOut = new StrBuilder(); diff...
[ 0.11753277480602264, -0.49476486444473267, 0.5228734612464905, -0.23686538636684418, -0.05222340673208237, 0.1642063558101654, 0.6043784022331238, -0.8514002561569214, 0.025687281042337418, -0.4253099858760834, -0.4737219512462616, 0.396220326423645, -0.18155118823051453, 0.044818714261054...
int addStart = diff.getAddedStart(); int addEnd = diff.getAddedEnd(); boolean isAdd = (delEnd == Difference.NONE && addEnd != Difference.NONE); boolean isDel = (addEnd == Difference.NONE && delEnd != Difference.NONE); boolean isMod = (delEnd != Difference.NONE && addEnd != Difference.NO...
[ -0.1912030577659607, -0.23232831060886383, 0.4786038398742676, -0.24207839369773865, -0.021418260410428047, 0.21997535228729248, 0.36304977536201477, -0.6826481223106384, -0.003066029865294695, -0.46719852089881897, -0.36075323820114136, 0.527869462966919, -0.20326681435108185, -0.16831324...
String left = ""; String right = ""; if (fromLineNum < (delStart)){ left = fromLines[fromLineNum]; fromLineNum++; } if (toLineNum < (addStart)) {
[ -0.1515445113182068, -0.5914956331253052, 0.6579001545906067, -0.43083855509757996, 0.2748917043209076, -0.20230768620967865, 0.037293873727321625, -0.5009241700172424, -0.13725332915782928, -0.2921934425830841, -0.7615125775337219, 0.5284251570701599, -0.05967018008232117, 0.1078483611345...
right = toLines[toLineNum]; toLineNum++; } diffOut.append(StringUtils.rightPad(left, maxStrWidth)); diffOut.append(" "); // no operator to display diffOut.appendln(right);
[ -0.4171939790248871, -0.3915863633155823, 0.9020434021949768, -0.28110089898109436, 0.23782558739185333, 0.212090864777565, 0.19282883405685425, -0.3295266628265381, 0.11453834921121597, -0.38769015669822693, -0.5197889804840088, 0.48587217926979065, -0.49747326970100403, -0.02937833406031...
if( (fromLineNum == (delStart)) && (toLineNum == (addStart))) { break; } } if (isDel) { //write out a deletion for(int i=delStart; i <= delEnd; i++) {
[ -0.11098460853099823, -0.5429748296737671, 0.28653407096862793, -0.4141412079334259, 0.27450963854789734, 0.08747260272502899, 0.16272297501564026, -0.48948386311531067, -0.22691459953784943, -0.3234376609325409, -0.48700985312461853, 0.5388249754905701, -0.23552948236465454, 0.13998371362...
diffOut.append(StringUtils.rightPad(fromLines[i], maxStrWidth)); diffOut.appendln("<"); } fromLineNum = delEnd + 1; } else if (isAdd) { //write out an addition for(int i=addStart; i <= addEnd; i++) {
[ 0.013113951310515404, -0.32439368963241577, 0.6031805276870728, -0.48128968477249146, 0.06941123306751251, 0.31992945075035095, 0.3162785470485687, -0.6229701638221741, 0.042046837508678436, -0.48272043466567993, -0.2927687466144562, 0.6314006447792053, -0.3616834878921509, 0.0307279173284...
diffOut.append(StringUtils.rightPad("", maxStrWidth)); diffOut.append("> "); diffOut.appendln(toLines[i]); } toLineNum = addEnd + 1; } else if (isMod) { // write out a
[ -0.14421497285366058, -0.42044147849082947, 0.6807114481925964, -0.4385785758495331, 0.24390563368797302, 0.10658310353755951, 0.4376794993877411, -0.6365323662757874, 0.12487716227769852, -0.4189243018627167, -0.3955306112766266, 0.4571826159954071, -0.6273154616355896, 0.0464834086596965...
modification while(true){ String left = ""; String right = ""; if (fromLineNum <= (delEnd)){ left = fromLines[fromLineNum];
[ -0.04566553235054016, -0.5743111371994019, 0.6504778265953064, -0.4447343945503235, 0.5196609497070312, 0.05027419328689575, 0.29659304022789, -0.5751209855079651, -0.019607068970799446, -0.438284307718277, -0.5173777937889099, 0.7547883987426758, -0.010014835745096207, 0.28709739446640015...
fromLineNum++; } if (toLineNum <= (addEnd)) { right = toLines[toLineNum]; toLineNum++;
[ -0.32621583342552185, -0.6243971586227417, 0.8652529120445251, -0.4210856854915619, 0.5265207886695862, -0.19782674312591553, -0.16646267473697662, -0.40677177906036377, 0.2995702624320984, -0.4260004460811615, -0.739161491394043, 0.5033364295959473, -0.2941933870315552, 0.0669484063982963...
} diffOut.append(StringUtils.rightPad(left, maxStrWidth)); diffOut.append("| "); diffOut.appendln(right); if( (fromLineNum > (delEnd)) && (toLineNum > (addEnd))) { break;
[ -0.05741209164261818, -0.32347699999809265, 0.4870148003101349, -0.47846150398254395, 0.5397586822509766, 0.007994703017175198, 0.5363897085189819, -0.601604163646698, 0.06258537620306015, -0.08857818692922592, -0.6573429703712463, 0.648155927658081, -0.237041637301445, 0.17082735896110535...
} } } } //we've finished displaying the diffs, now we just need to run out all the remaining unchanged lines while(true) { String left = ""; String right = ""; if (fromLineNum < (fromLines.length)){
[ 0.1426078975200653, -0.47694069147109985, 0.9700224995613098, -0.26188674569129944, 0.40640443563461304, -0.03668208047747612, 0.4744452238082886, -0.37867867946624756, 0.09564971923828125, -0.46134695410728455, -0.3209298849105835, 0.3837119936943054, -0.16691087186336517, 0.1371178328990...
left = fromLines[fromLineNum]; fromLineNum++; } if (toLineNum < (toLines.length)) { right = toLines[toLineNum]; toLineNum++; } diffOut.append(StringUtils.rightPad(left, maxStrWidth)); diffOut.append(" "); // no operator
[ -0.4408349096775055, -0.6041911244392395, 0.9055567979812622, -0.3976621925830841, 0.3474401533603668, 0.05700273439288139, 0.06843912601470947, -0.5317592024803162, 0.12345407158136368, -0.41011837124824524, -0.5477427840232849, 0.49330952763557434, -0.3897669315338135, -0.151124686002731...
to display diffOut.appendln(right); if( (fromLineNum == (fromLines.length)) && (toLineNum == (toLines.length))) { break; } } return diffOut.toString(); } private static int maxLength(String[] fromLines) { int maxLength = 0; for (int i = 0; i < fromLines.length; i+...
[ -0.06229809299111366, -0.5991119146347046, 1.0011481046676636, -0.36226633191108704, 0.14896616339683533, 0.08585646748542786, 0.3496955931186676, -0.6536871194839478, 0.0022548274137079716, -0.3669321835041046, -0.5646945238113403, 0.33024078607559204, -0.3998062312602997, 0.1372012495994...
maxLength = fromLines[i].length(); } } return maxLength; } ```
[ 0.06146299093961716, -0.7307064533233643, 0.7795654535293579, -0.23046733438968658, -0.006265111267566681, -0.10458502173423767, 0.23819886147975922, -0.26065903902053833, -0.26405128836631775, -0.4075198769569397, -0.3759680986404419, 0.5921751260757446, -0.36322546005249023, 0.2364466935...
I have a simple app that uses an SQL Express 2005 database. When the user closes the app, I want to give the option to back up the database by making a copy in another directory. However, when I try to do it, I get "The process cannot access the file '...\Pricing.MDF' because it is being used by another process." I clo...
[ 0.01647162064909935, 0.21505261957645416, 0.6017102003097534, -0.17573043704032898, 0.14211353659629822, 0.046673767268657684, 0.3698117733001709, -0.09146352112293243, -0.2573262155056, -0.4663456082344055, 0.08838585019111633, 0.5809586048126221, -0.420451819896698, 0.5427520275115967, ...
I could detach the database to counter the attach in the connection string. 1 - How do I RELEASE the thing? 2 - Is there a better way than just copying the database? The app is for my husband only, so I will be able to handle it if he actually does need to restore from backup. Thanks! You don't want to copy the mdf d...
[ 0.527260422706604, 0.06986398249864578, 0.6800811290740967, 0.30408549308776855, 0.26575639843940735, -0.1309008151292801, 0.13246029615402222, -0.3893863260746002, -0.07255639880895615, -0.23625069856643677, -0.10422594845294952, 0.5234364867210388, -0.2230319231748581, 0.1756194978952407...
job. Having SQL generate the backup is much safer and more desirable, single-user or multi-user. You can provide a link to a function calling the T-SQL which you can completely automate as far as source db and destination folder: ``` BACKUP DATABASE [mydatabasename] TO DISK = N'C:\Program Files\Microsoft SQL Server\...
[ 0.20856238901615143, 0.0719340518116951, 0.37773212790489197, -0.02483481727540493, -0.14294157922267914, -0.13948872685432434, 0.15299536287784576, 0.14728035032749176, -0.26838403940200806, -0.38175293803215027, -0.07147648185491562, 1.2198461294174194, -0.24762524664402008, -0.143643409...
I'm not sure how "tests first" works and I'd like to hear arguments about when and why one would take this approach. I hear that it's often recommended to write tests and mock things before writing a single line of implementation. However, I can't help but think that it doesn't fit every situation. For instance, say ...
[ 0.7827314138412476, 0.3410818576812744, -0.3970626890659332, 0.2255653291940689, -0.110234834253788, 0.10861249268054962, 0.27016860246658325, -0.09881091117858887, 0.15669219195842743, -0.5533438920974731, 0.4829334318637848, 0.3636176884174347, 0.12466362118721008, 0.08801288157701492, ...
and it didn't take that long. This is essentially "my test". It's not a unit test, but it is a test (most likely it's a console app). This is pretty much how I work. I think about what I want to do and try to do it. If it works then I eventually go back and write unit tests so that I can trap regression. Is this diffe...
[ 0.6293522715568542, 0.10093583911657333, -0.15665803849697113, 0.30278727412223816, 0.11401945352554321, 0.036161649972200394, 0.22051499783992767, -0.0960061177611351, 0.28590404987335205, -0.4501933157444, 0.21243615448474884, 0.7059633135795593, 0.15114174783229828, -0.24366606771945953...
interfaces and behaviour of the objects that are being created. For many projects, that may well be true, and TDD is very appropriate in those cases. However, in many projects that is not the case, and applying TDD in those cases is a poor choice. If your highest risk is usability, stop futzing about with unit tests...
[ 0.16932527720928192, -0.003966053016483784, 0.03486790508031845, 0.32113638520240784, -0.21474778652191162, -0.07465196400880814, 0.6564459800720215, -0.11919032037258148, -0.16856235265731812, -0.8243709206581116, -0.07227928936481476, 0.8116294145584106, -0.07759293913841248, -0.24794252...
trouble but are salvageable get the project management focus early, when it can do some good. * The business side of your organization will value a project higher when it has a low risk of failure; there's less chance that it will be cancelled early unnecessarily.
[ 0.3191881477832794, 0.04700460657477379, -0.08101906627416611, 0.14326703548431396, -0.02388100139796734, 0.026287715882062912, 0.49976059794425964, 0.13732193410396576, -0.37371063232421875, -0.5356534719467163, -0.2869149446487427, 0.5981938242912292, 0.2444601058959961, -0.2151148468255...
I've got the a SQL Server stored procedure with the following T-SQL code contained within: ``` insert into #results ([ID], [Action], [Success], [StartTime], [EndTime], [Process]) select 'ID' = aa.[ActionID], 'Action' = cast(aa.[Action] as int), 'Success' = aa.[Success], 'StartTime' = aa.[StartTime], ...
[ 0.4574736952781677, 0.18361985683441162, 0.5446802973747253, -0.1916416734457016, 0.20989172160625458, 0.11998451501131058, 0.1271784007549286, -0.2773164212703705, 0.10153289139270782, -0.4331660270690918, 0.0832679346203804, 0.5458856225013733, -0.13550955057144165, -0.012732270173728466...
when (@loggingLevel = 1 and aa.[LoggingLevel] = 1) then 0 end and 1 = case when (@applicationID is null) then 1 when (@applicationID is not null and aa.[ApplicationID] = @applicationID) then 1 end and 2 = case when
[ 0.17761871218681335, -0.16432499885559082, 0.6484057307243347, -0.18296802043914795, 0.13669048249721527, 0.21624425053596497, 0.4840816855430603, -0.4388040602207184, -0.20457684993743896, -0.26844340562820435, -0.08729468286037445, 0.44574853777885437, -0.5863720178604126, -0.13081645965...
(@startDate is null) then 2 when (@startDate is not null and aa.[StartTime] >= @startDate) then 2 end and 3 = case when (@endDate is null) then 3 when (@endDate is not null and aa.[StartTime] <= @endDate) then 3 end and 4
[ 0.3141407370567322, -0.030597109347581863, 0.6391879320144653, -0.4132338762283325, 0.05901820585131645, 0.2572527229785919, 0.43142956495285034, -0.5982639193534851, -0.15650926530361176, -0.35693493485450745, -0.2429017573595047, 0.3416517674922943, -0.2569529414176941, 0.083110585808753...
= case when (@success is null) then 4 when (@success is not null and aa.[Success] = @success) then 4 end and 5 = case when (@process is null) then 5 when (@process is not null and aa.[Process] = @process) then 5
[ 0.2565300464630127, 0.003826125292107463, 0.31842178106307983, -0.2403813898563385, -0.02978980913758278, 0.6546602845191956, 0.46745166182518005, -0.5525608062744141, -0.16948358714580536, -0.16008564829826355, 0.11336709558963776, 0.5514703989028931, -0.14656956493854523, 0.2585096359252...
end ``` It's that "dynamic" WHERE clause that is bothering me. The user doesn't have to pass in every parameter to this stored procedure. Just the ones that they are interested in using as a filter for the output. How would I go about using SQL Server Studio or Profiler to test whether or not this store procedure is...
[ 0.374152809381485, 0.19413870573043823, 0.4314497411251068, 0.002799122128635645, 0.028362203389406204, -0.4169839322566986, 0.3166525959968567, -0.10123107582330704, -0.08060364425182343, -0.41264045238494873, -0.002771658357232809, 0.5211251378059387, -0.3043721616268158, 0.2749942541122...
appropriate trace name, select the > events tab and remove the already > existing events on the "Selected event > classes" list box. Now choose the > "Stored Procedures" node in the > "Available event classes" and add > SPComplete, SPRecompile, SPStarting, > SP:StmtStarting and SP:StmtCompleted. > Now choose th...
[ 0.09058317542076111, -0.47339239716529846, 0.35937193036079407, 0.21655496954917908, 0.2208556979894638, -0.18421387672424316, 0.1802893579006195, -0.3757513463497162, -0.16893014311790466, -0.8638975024223328, 0.17332470417022705, 0.4999169111251831, -0.42484980821609497, -0.2901592552661...
I'm looking to generate a random number and issue it to a table in a database for a particular user\_id. The catch is, the same number can't be used twice. There's a million ways to do this, but I'm hoping someone very keen on algorithms has a clever way of solving the problem in an elegant solution in that the followi...
[ 0.35621652007102966, 0.19376514852046967, -0.031146492809057236, 0.22237083315849304, -0.09995804727077484, 0.19582128524780273, 0.019659534096717834, -0.09738710522651672, -0.2845107614994049, -0.6561248302459717, 0.1700083613395691, 0.32477790117263794, -0.3134447932243347, 0.17120581865...
to 9999999 2) Check the database to see if the number exists OR 2) Query the database for all numbers 3) See if the returned result matches whatever came from the db 4) If it matches, repeat step 1, if not, problem is solved. Thanks. No your algorithm is not scalable. What I've done before is to issue...
[ 0.4228695333003998, 0.10053922981023788, 0.5054595470428467, 0.2481819987297058, -0.26605725288391113, 0.1201968714594841, 0.41093677282333374, -0.0431068055331707, -0.4959208369255066, -0.4732774794101715, -0.06434126943349838, 0.3654443919658661, -0.34924426674842834, 0.1616818755865097,...
Additional information This algorithm's logic goes like this you use a known sequence to generate unique numbers and then you deterministically manipulate them, so they don't look serial anymore. The general solution is to use some form of encryption, which in my case was an XOR flipflop, because its as fast as it ...
[ 0.06133594736456871, -0.16202998161315918, 0.21241126954555511, 0.4675038754940033, 0.04935789853334427, -0.07347127050161362, 0.10117997229099274, 0.1842394918203354, -0.47060662508010864, -0.5316451191902161, 0.15679757297039032, 0.50281822681427, -0.25650832056999207, -0.046837020665407...