text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
What would be the most idiomatic way to do the following in JavaScript: If `myParam` is not passed into `MyFunc` by the caller, then I want to set it to a default value. But first I want to try and get it from another object, which may not yet exist: ``` function MyFunc(myParam) { if (!myParam) { if (!my...
[ -0.2790684401988983, 0.02733835019171238, 0.431062251329422, -0.34998050332069397, 0.14414580166339874, 0.09080179780721664, 0.27818000316619873, 0.028967520222067833, 0.004792524501681328, -0.5175840258598328, -0.28047722578048706, 0.37670326232910156, -0.2948455214500427, 0.0673237815499...
myParam = myObj.myParam; } } alert(myParam); } ``` I started to write: ``` myParam = myParam || myObj.mParam || 10 ``` but realized that if `myObj` does not exist then this would fail. I might guess the following: ``` myParam = myParam || (myObj && myObj.mParam) || 10 ``` It might even work. Bu...
[ -0.48926928639411926, 0.18926887214183807, 0.5231345295906067, -0.21585603058338165, -0.01985699124634266, 0.37391531467437744, 0.7180111408233643, 0.09768584370613098, -0.29661914706230164, -0.7743029594421387, -0.08748254925012589, 0.43279141187667847, -0.7131362557411194, 0.143173336982...
|| (window.myObj ? window.myObj.mParam : 10); ``` or ``` myParam = myParam || (window.myObj && window.myObj.mParam) || 10; ``` This works as well: ``` myParam = myParam || ((typeof myObj !== "undefined") ? myObj.mParam : 10); ```
[ -0.6525221467018127, 0.12692846357822418, 0.5242033004760742, -0.3640844523906708, 0.0043471441604197025, 0.6310339570045471, 0.48267537355422974, -0.08438876271247864, -0.26934024691581726, -0.6718086004257202, -0.4820307493209839, 0.1924750953912735, -0.37162160873413086, 0.2093784362077...
I am curious why C# allows me to ignore delegate parameters in some cases but not others. For instance this is permitted: ``` Action<int> action = delegate { Console.WriteLine("delegate"); }; ``` but this is not: ``` Action<int> action = () => Console.WriteLine("lambda"); ``` Is there a way to initialize a deleg...
[ 0.2855497896671295, -0.020491037517786026, -0.21630458533763885, -0.0134672736749053, -0.08716034144163132, -0.132523313164711, -0.010378480888903141, -0.364761620759964, -0.25913989543914795, -0.27005475759506226, -0.07366006821393967, 0.5698115229606628, -0.5063105821609497, -0.046826239...
many different signatures whose body is the single statement `Console.WriteLine...`. Because it can match different signatures, it does not cause a problem. In the second sample, the lambda syntax itself defines a function that takes no parameters with the same body. Obviously the latter is not consistent with the defi...
[ 0.22660596668720245, -0.08082584291696548, 0.19329877197742462, 0.20765048265457153, -0.058428775519132614, -0.17899325489997864, 0.20513004064559937, -0.3858569264411926, -0.19475127756595612, -0.5103429555892944, 0.15385784208774567, 0.46006423234939575, -0.525368332862854, -0.1134944558...
to delegates with a > variety of signatures. This is not > possible with lambda expressions.
[ 0.3659612536430359, 0.014395108446478844, -0.03942142054438591, 0.47622057795524597, 0.06749673187732697, -0.2537427246570587, 0.1187618300318718, -0.3559952676296234, -0.2011300027370453, -0.3621872663497925, -0.16896750032901764, 0.40365809202194214, -0.27034491300582886, -0.060920733958...
I'm working on a project using C++, Boost, and Qt. I understand how to compress single files and bytestreams using, for example, the qCompress() function in Qt. How do I zip a directory of multiple files, including subdirectories? I am looking for a cross-platform (Mac, Win, Linux) solution; I'd prefer not to fire of...
[ 0.32013362646102905, 0.020635077729821205, 0.16372378170490265, 0.13493205606937408, -0.02784808725118637, -0.11318515986204147, 0.0756334513425827, 0.06791271269321442, -0.3238662779331207, -0.8985263705253601, -0.1710958480834961, 0.41335609555244446, -0.2247612625360489, -0.116272553801...
really great. There is an example in the download package (in the "tests" dir) that shows very clearly how to zip up a directory of files. **Update 2**: After completing this task on my Linux build environment, I discovered that QuaZip doesn't work at all with the Visual Studio compiler. It may be possible to tackle a...
[ 0.4277096688747406, -0.1682414561510086, -0.02420061267912388, 0.09368328750133514, -0.06002289056777954, -0.43493691086769104, 0.18641667068004608, 0.28009048104286194, -0.37294086813926697, -0.6803115606307983, -0.10665613412857056, 0.4801909327507019, -0.2892591655254364, -0.08206693083...
[QuaZIP](http://quazip.sourceforge.net/index.html). Based on Qt4. Actually looks nice. They list Windows explicitly (Using mingw). Apparently, it is a C++ wrapper for [this] library. Ah, and of course, i have ripped those sites from [this](http://lists.trolltech.com/qt-interest/2006-07/thread00070-0.html) Qt Mailingli...
[ 0.1624499410390854, 0.11451945453882217, 0.5618984699249268, 0.23963598906993866, -0.2108822762966156, -0.4618520438671112, 0.05423528701066971, 0.24407367408275604, -0.5597929954528809, -0.34142622351646423, -0.23408733308315277, 0.10139457136392593, -0.4389643967151642, 0.309892863035202...
I have a script that seemed to work before but no longer does. It is displaying this message after the script runs: ``` Array ( [0] => Unrouteable address [1] => -All RCPT commands were rejected with this error:\\ 503-Unrouteable address 503 valid RCPT command must precede DATA ) Array ( [0] => Unrouteabl...
[ 0.11206749826669693, 0.17297273874282837, 0.47178107500076294, -0.2074614316225052, 0.01765676587820053, 0.012835191562771797, 0.46540728211402893, -0.3917224407196045, -0.03292742371559143, -0.9697681069374084, -0.01525649894028902, 0.44009825587272644, -0.28339001536369324, 0.03365102782...
503-Unrouteable address 503 valid RCPT command must precede DATA ) ``` The actual function: ``` function emailUser($table, $subject, $message) { $query = "SELECT * FROM $table"; $result=mysql_query($query); while($row = mysql_fetch_array($result)) { $i = 0; while($i <= 0) { ...
[ -0.48968076705932617, 0.07521696388721466, 0.8288217782974243, -0.15596382319927216, 0.10933747887611389, 0.27994102239608765, 0.3788903057575226, -0.56077641248703, -0.17145833373069763, -0.48253509402275085, -0.555018961429596, 0.14441533386707306, -0.4094165563583374, 0.0289651490747928...
htmlMimeMail(); $mail->setHTML($message); $mail->setSubject($subject); $mail->setSMTPParams('mail.site.net', 25, 'site.net'); $mail->setReturnPath("email@site.net"); $mail->setFrom("email@site.net"); $mail_result = $mail->send(array($to), 'smtp');...
[ 0.10319118946790695, -0.33719345927238464, 0.935635507106781, -0.20733080804347992, -0.28710588812828064, 0.06334292888641357, 0.4954361319541931, -0.19647179543972015, -0.3591306805610657, -0.7540746331214905, -0.4935905635356903, 0.04745740815997124, -0.6650521755218506, -0.0788322240114...
print_r($mail->errors); //failure } else { //success } $i++;
[ -0.17831112444400787, 0.277250200510025, 0.17694683372974396, -0.5933007001876831, 0.04740341380238533, 0.17216618359088898, 0.6920596361160278, -0.10185457020998001, 0.16656532883644104, -0.39058321714401245, -0.2953737676143646, 0.7832944393157959, -0.5049663186073303, 0.0174918230623006...
} } print '<h3>Mail successuly sent to:</h3>'; print '<ul>'.$to_all.'</ul>'; } ``` Is there a better script to use? Maybe the email server has changed? Any help is appreciated. Try reordering to the following (setHTML is at the end): ``` $mail->setSubject($subject); $mail->setSMTPParams('mail.site.net',...
[ 0.29609769582748413, 0.021515892818570137, 0.6559512615203857, -0.11567601561546326, 0.005591666791588068, -0.1155027225613594, 0.4599342346191406, -0.19931943714618683, -0.1848730444908142, -0.9119290113449097, -0.4663105607032776, 0.6034431457519531, -0.5614057183265686, -0.2621316909790...
I'm still learning the dark arts of TDD and recently [I've been trying to learn how to do TDD in VB6](https://stackoverflow.com/questions/467789/are-there-any-good-tdd-tools-or-resources-for-vb6) and what I basically narrow down the list to was the free simplyvbunit and the most costly vbunit3. My application is an r...
[ 0.5877980589866638, 0.055008724331855774, 0.041815657168626785, 0.008155137300491333, -0.3491475284099579, -0.10537238419055939, 0.3321981728076935, -0.1380428820848465, -0.08296533674001694, -0.6008425951004028, 0.12139039486646652, 0.7333797216415405, -0.03703978285193443, 0.215592145919...
simply a lifesaver as I'm drowing in the material right now and I still can't write one unit test yet :( Edit ---- Actually the app consists of many forms, modules and class modules and when I compile it, it of course becomes nice neatly packaged .EXE file. And to make things more complicated there are quite a number...
[ 0.60653156042099, 0.18328838050365448, -0.034017786383628845, 0.23070046305656433, 0.26817041635513306, -0.07061872631311417, 0.16984526813030243, -0.328594446182251, -0.1015804260969162, -0.26152303814888, 0.030418964102864265, 0.3446354269981384, -0.17421089112758636, 0.05867516621947288...
is, is to somehow directly test the exe via add reference, etc. Is there a better way to do this? There is a difference between unit tests and integration tests. You don't unit test an executable. You unit test small, self-contained units of computation, like a method or a procedure, depending on what language you are...
[ 0.5381414294242859, -0.0891515240073204, -0.4164125919342041, 0.4698881506919861, -0.02105923742055893, 0.076103575527668, 0.03846748545765877, -0.33920326828956604, 0.20583036541938782, -0.5844526290893555, 0.003752780379727483, 0.6198427081108093, -0.3142867088317871, -0.1436326503753662...
testing tools, I don't think you'll find many unit testing tools that work to test executables. There are other types of test tools that will do a better job at this. Simply writing scripts that provide different types of inputs and check their outputs may be sufficient for many scenarios. If you want to learn more ab...
[ 0.6250195503234863, 0.13707563281059265, -0.26039811968803406, 0.48173660039901733, -0.25386711955070496, -0.23863422870635986, -0.019746480509638786, -0.041947681456804276, 0.03532800078392029, -0.5470840930938721, 0.16448090970516205, 0.7746004462242126, -0.026047483086586, -0.1526518166...
I am having a minor problem with WCF service proxies where the message contains `List<string>` as a parameter. I am using the 'Add Service reference' in Visual Studio to generate a reference to my service. ``` // portion of my web service message public List<SubscribeInfo> Subscribe { get; set; } public List...
[ 0.45729517936706543, 0.18776048719882965, 0.8418580293655396, -0.3248445689678192, -0.12566617131233215, -0.21336467564105988, 0.4941156208515167, -0.36435168981552124, -0.2968723177909851, -0.9211909174919128, -0.11656146496534348, 0.5365071892738342, -0.46754947304725647, 0.1759185940027...
get { return this.SubscribeField; } set { if ((object.ReferenceEquals(this.SubscribeField, value) != true)) { this.SubscribeField = value; this.RaisePropertyChanged("Subscribe"); } } } [System.Runtime.Serialization.DataMemberAttribute(EmitDefaultValue=false)]...
[ -0.02103176712989807, -0.3213809132575989, 0.7445245385169983, 0.07241745293140411, 0.23061184585094452, -0.06968165934085846, 0.5941991209983826, -0.40557926893234253, -0.22486290335655212, -0.5821065902709961, -0.40777167677879333, 0.456892192363739, -0.3688187301158905, 0.01052116136997...
if ((object.ReferenceEquals(this.UnsubscribeField, value) != true)) { this.UnsubscribeField = value; this.RaisePropertyChanged("Unsubscribe"); } } } ``` The ArrayOfString class generated looks like this. This is a class generated in my code - its not a .NET class. It actually gener...
[ 0.08042306452989578, -0.07263399660587311, 0.3268018364906311, -0.12272484600543976, -0.0015625827945768833, -0.06329268217086792, 0.26327016949653625, -0.47297024726867676, -0.25330519676208496, -0.4368056356906891, -0.017269259318709373, 0.5442034602165222, -0.45910146832466125, 0.327498...
[System.Runtime.Serialization.CollectionDataContractAttribute(Name="ArrayOfString", Namespace="http://www.example.com/", ItemName="string")] [System.SerializableAttribute()] public class ArrayOfString : System.Collections.Generic.List<string> { } ``` The problem is that I often create my message like this...
[ -0.14804184436798096, -0.19709190726280212, 0.4924420714378357, -0.17830303311347961, -0.1947421133518219, -0.23403729498386383, 0.4149026572704315, -0.1422378271818161, -0.6839267015457153, -0.6406574845314026, -0.2862872779369354, 0.3899029493331909, -0.6677418947219849, 0.40208595991134...
seem to find ANY way to assign it without extra statements. I've tried the following : * `new ArrayOfString(unsubscribeFrom.ToList())` - this constructor doesn't exist :-( * changing the type of the array used by the code generator - doesn't work - it always gives me ArrayOfString (!?) * try to cast `List<string>` to...
[ 0.15245667099952698, 0.1351032555103302, 0.2960725426673889, -0.19811613857746124, -0.07583314925432205, -0.07858633249998093, 0.49820953607559204, -0.4467928409576416, -0.046324800699949265, -0.5835407376289368, -0.04440861940383911, 0.6685420274734497, -0.3717324435710907, -0.02406707964...
annoying. Am i missing something? Is there a way to tell it not to generate `ArrayOfString` - or some other trick to assign it ? Any .NET object that implements a method named "Add" can be initialized just like arrays or dictionaries. As ArrayOfString does implement an "Add" method, you can initialize it like this: ...
[ 0.017804929986596107, 0.01684812642633915, 0.17380335927009583, -0.10427261143922806, -0.20491713285446167, -0.26559022068977356, 0.2530566155910492, 0.12847614288330078, -0.28044307231903076, -0.27102145552635193, 0.018774479627609253, 0.4310421943664551, -0.5493233799934387, 0.2568611502...
where T : IList<string>, new() { var newList = new T(); foreach (var s in strings) newList.Add(s); return newList; } } ``` Usage: ``` client.UpdateMailingList(new UpdateMailingListMsgIn() { Email = model.Email, Name = model.Name, Source = Request.Url.ToString()...
[ -0.004677960183471441, -0.25797832012176514, 1.0221223831176758, -0.5168145895004272, 0.15929587185382843, 0.0914914682507515, 0.34291478991508484, -0.3276830315589905, -0.4716326892375946, -0.7838279604911804, -0.385403573513031, 0.7780420184135437, -0.6262661218643188, 0.3165702223777771...
From [this question](https://stackoverflow.com/questions/505747/best-way-to-do-nested-case-statement-logic-in-sql-server), [a neat answer about using COALESCE](https://stackoverflow.com/questions/505747/best-way-to-do-nested-case-statement-logic-in-sql-server/505760#505760) to simplify complex logic trees. I considered...
[ -0.09156332910060883, 0.1592196673154831, -0.05511682108044624, 0.049256183207035065, -0.015053518116474152, 0.0896054357290268, -0.029635794460773468, -0.42631927132606506, 0.040565766394138336, -0.2663826048374176, -0.42267540097236633, 0.31415310502052307, -0.08492639660835266, -0.02454...
(1, 2) INSERT INTO Fractions VALUES (1, 3) INSERT INTO Fractions VALUES (1, 0) INSERT INTO Fractions VALUES (2, 0) INSERT INTO Fractions VALUES (3, 0) SELECT Numerator ,Denominator ,COALESCE( CASE WHEN Denominator = 0 THEN 0 ELSE NULL END, CASE WHEN Numerator <> 0 THEN Numerator / Denominator E...
[ -0.13603103160858154, 0.020175807178020477, -0.014868391677737236, -0.05077558383345604, 0.07598484307527542, 0.2601631283760071, 0.008980829268693924, -0.5584613680839539, 0.3485013544559479, -0.3283745050430298, -0.10214050859212875, 0.3089137375354767, 0.056552909314632416, -0.045192927...
error like: ``` Msg 8134, Level 16, State 1, Line 1 Divide by zero error encountered. ``` I found some [mentions](http://it.toolbox.com/blogs/oracle-guide/minitip-5-coalesce-11378) [related](http://forums.oracle.com/forums/thread.jspa?threadID=685976) to Oracle. And some tests with [SQL Server](http://www.emoreau.co...
[ 0.3138260245323181, 0.016236556693911552, -0.07209629565477371, 0.02268761210143566, 0.09434003382921219, -0.206169992685318, 0.5700623393058777, -0.18918544054031372, -0.25663843750953674, -0.25110116600990295, 0.04767944663763046, 0.5949144959449768, -0.3339947462081909, -0.0053884498775...
FROM sysobjects)) SELECT 'test2', @test -- OUCH, a scan through sysobjects ``` COALESCE is implemented according to the [ANSI standard](http://www.contrib.andrew.cmu.edu/~shadow/sql/sql1992.txt). It is simply a shorthand for a CASE statement. ISNULL is not part of the ANSI standard. Section 6.9 does not seem to requi...
[ -0.017657704651355743, -0.2540214955806732, 0.4133065342903137, -0.3091200888156891, 0.03478357195854187, -0.24882768094539642, 0.22276988625526428, -0.382499098777771, 0.005088786128908396, -0.15478457510471344, -0.010073203593492508, 0.3954211175441742, -0.3937481641769409, -0.0981751605...
from sysobjects a join sysobjects b on 1=1 join sysobjects c on 1=1 join sysobjects d on 1=1 join sysobjects e on 1=1 join sysobjects f on 1=1 return @c / 0 END go select dbo.evil() -- takes forever select ISNULL(1, dbo.evil()) -- very fast select COALESCE(1, dbo.evil()) -- very fast ``` ...
[ -0.06252838671207428, -0.18082961440086365, 0.21631383895874023, -0.15555444359779358, 0.09251157939434052, -0.16750852763652802, 0.37243425846099854, -0.5573899745941162, 0.1899421662092209, -0.5349910855293274, -0.38771283626556396, 0.5994572639465332, -0.6992650628089905, -0.12055184692...
when @test = 2 then (SELECT COUNT(*) FROM sysobjects) when 1=0 then (SELECT COUNT(*) FROM sysobjects) else (SELECT COUNT(*) FROM sysobjects) end -- OUCH, two table scans. If 1=0, it does not result in a table scan. ```
[ 0.14745478332042694, -0.13172639906406403, 0.40223464369773865, -0.1705142855644226, 0.06407784670591354, -0.38484516739845276, 0.41576823592185974, -0.306092232465744, -0.208449125289917, -0.6588541269302368, -0.22405636310577393, 0.6126713752746582, -0.44574734568595886, 0.04001865535974...
I am trying to use the PLDatabase framework in my iPhone app. I've added the framework to my Xcode project. However, when I run my app, it crashes with the following error: ``` dyld: Library not loaded: @loader_path/../Frameworks/PlausibleDatabase.framework/Versions/A/PlausibleDatabase Referenced from: /Users/todd/L...
[ 0.32660070061683655, 0.3154261112213135, 0.3061838150024414, 0.29545021057128906, 0.12593498826026917, 0.11343870311975479, 0.23970575630664825, -0.09164740145206451, -0.1763274073600769, -0.8061893582344055, 0.07768189162015915, 0.19046437740325928, -0.34430834650993347, -0.14680764079093...
for the framework (libpldatabase.a), and then link them to the app. The Xcode GUI does not provide a nice interface for static linking, you will need to add appropriate flags in your build prefs (-lpldatabase -L/whatever/dir/it/is/in).
[ 0.28845295310020447, -0.24066594243049622, 0.46324968338012695, 0.12386927753686905, 0.20065812766551971, -0.19329605996608734, -0.11558385193347931, -0.18508370220661163, -0.1210685670375824, -0.8563823699951172, -0.10641685873270035, 0.3996714949607849, -0.494731068611145, -0.26701983809...
Has the $format parameter been removed with the VS2008 SP1 release of ADO.NET Data Services. I try to use it and I get the error: > The query parameter '$format' begins with a system-reserved '$' character but is not recognized. I think the support for the Atom stuff is very cool, but can you get "plain old xml" too?...
[ 0.08450216054916382, 0.06263317912817001, 0.5229863524436951, -0.04588943347334862, -0.20924140512943268, -0.466813325881958, 0.1062072217464447, -0.183068186044693, -0.19996148347854614, -0.5818877816200256, -0.1781543642282486, 0.4710240662097931, -0.42613694071769714, 0.1056587249040603...
Also, I'm wondering what effect upgrading to Ruby 1.9 would have on legacy code from version 1.86. Is the new version backwards compatible? Well, for this example at least, if you want to match only the text inside the quotes you'll need to use a capturing group. Write it like this: ``` $pattern = '/"(.*)"/'; ``` an...
[ 0.6811750531196594, 0.2714492380619049, 0.27266040444374084, -0.1430056244134903, -0.13393783569335938, -0.12673237919807434, 0.15215431153774261, -0.35850733518600464, -0.18792179226875305, -0.40352848172187805, 0.1518481820821762, 0.5239579081535339, -0.547652006149292, -0.18890646100044...
1, and there will be a corresponding element in `$matches` for the text that each group matched. Example: ``` $pattern = '/"([a-z]+) ([a-z]+) (.*)"/'; ``` will select all quoted strings which have two lowercase words separated by a single space, followed by anything. Then `$matches[1]` will be the first word, `$matc...
[ 0.14968690276145935, 0.0064803664572536945, 0.4305628538131714, -0.1840941458940506, -0.2576853036880493, 0.03640739992260933, 0.060312386602163315, -0.3434678614139557, 0.09717369079589844, -0.569169819355011, -0.30020955204963684, 0.42306944727897644, -0.4573517441749573, -0.171599000692...
match as the offset. See the [documentation](http://us3.php.net/manual/en/function.preg-match.php) for details. You could also try searching Google for "regular expression tutorial" or something like that, there are plenty of good ones out there.
[ 0.4046213626861572, -0.20142878592014313, 0.46628883481025696, 0.17194855213165283, -0.17375147342681885, -0.33260276913642883, -0.5445621013641357, -0.10621675848960876, 0.0317726656794548, -0.4361335039138794, 0.22215896844863892, 0.7072104215621948, -0.4580836296081543, -0.4687223434448...
I have a table of vehicles with registration numbers, and want to select a subset of them that are between some user-supplied 'from' and 'to' values. So lets say the table looks like this: ``` id reg_num 1 DD1111 2 DD1112 3 DE2245 4 EE5678 5 EF6547 ``` The SQL I have so far ...
[ 0.3992363512516022, 0.3554917573928833, 0.4049186110496521, 0.07123778760433197, -0.04473412409424782, 0.24690768122673035, -0.2668885290622711, -0.28651759028434753, -0.02435884065926075, -0.49915724992752075, 0.22587592899799347, 0.7331981658935547, 0.2028195858001709, 0.2458489388227462...
supplied and reg_num <= 'DE' -- and so is this one ``` Which should (by my thinking) return: ``` 1 DD1111 2 DD1112 3 DE2245 ``` But instead, only returns: ``` 1 DD1111 2 DD1112 ``` I imagine that SQL server sees 'DE2245' as greater than 'DE', and so excludes the row. My q...
[ 0.13124312460422516, -0.11733152717351913, 0.3731974959373474, 0.1965799480676651, 0.16455890238285065, 0.16046832501888275, -0.06605971604585648, -0.3948653042316437, -0.0644250437617302, -0.44093549251556396, 0.03836462274193764, 0.6769677400588989, -0.35854384303092957, 0.34654715657234...
note that this where does not utilize any index because of a function on the column in SARG.
[ -0.2974949777126312, -0.003283513244241476, 0.0893644466996193, -0.20679891109466553, -0.07399867475032806, -0.19534730911254883, -0.03736339136958122, 0.08647074550390244, -0.26042988896369934, -0.3692072927951813, -0.27560779452323914, 0.1945342719554901, -0.17673233151435852, 0.06402532...
I have a form that makes an Ajax POST request to insert a widget into my database. In the form, I have a select box where you can select from the widgets. After the db insert is made, I must update the select box. I actually just replace the entire form for now. Because the select box has the widgets, I must have a c...
[ 0.3006041944026947, 0.19494925439357758, 0.4969288408756256, -0.006950784008949995, -0.2183142602443695, -0.15686579048633575, 0.34541958570480347, -0.07151583582162857, 0.3134874105453491, -0.8756405115127563, 0.16941846907138824, 0.3740720748901367, -0.35898008942604065, 0.24952399730682...
However, when I try to access the javascript var "widget\_objects" in the onComplete event, the new object does not exist. I create the javascript widget\_objects with this line of code on the page: widget\_objects = <%= @widget\_objects %>; So it seems that the line of code above is not executed before Ajax request's...
[ 0.01597970724105835, 0.15430212020874023, 0.597941517829895, -0.16866058111190796, -0.033741798251867294, -0.2210092693567276, 0.34564709663391113, 0.12242361158132553, -0.10451556742191315, -0.9246193766593933, -0.20402461290359497, 0.4748271703720093, -0.346813827753067, 0.23681241273880...
"Save Widget & Generate Embed Code", { :url => widgets_url(:user_id => @user.id), :update => "widget_form",
[ 0.2777860760688782, -0.062360938638448715, 0.5710392594337463, -0.02908281609416008, 0.2011987566947937, -0.19058384001255035, 0.16960127651691437, -0.22082754969596863, 0.3268374502658844, -0.6232423782348633, -0.3721388578414917, 0.5409577488899231, -0.3634829521179199, 0.106211893260478...
:method => :POST, :html => { :id => "save_widget_button", :onclick => "this.value='Saving...'; this.disabled = 'true';",
[ -0.07966704666614532, -0.1660577654838562, 0.39795538783073425, 0.08003797382116318, 0.3584340214729309, 0.12341255694627762, 0.31292250752449036, -0.310411274433136, -0.01608113944530487, -0.37953096628189087, -0.25178030133247375, 0.34351471066474915, -0.39365869760513306, 0.083785377442...
:style => "width: 220px;" }, :complete =>"
[ 0.3340243697166443, -0.26453033089637756, 0.6929836273193359, -0.06039609760046005, 0.29264500737190247, -0.04840187728404999, 0.36709070205688477, -0.3781733512878418, -0.1583738476037979, -0.4179830253124237, -0.3212856948375702, 0.5450950860977173, 0.15665172040462494, -0.13435241580009...
$('save_widget_button').disabled=''; $('save_widget_button').value='Save Widget & Generate Embed Code'; var last_id = $j('select#widget_id').children(':last').attr('value');
[ -0.016984743997454643, -0.14640887081623077, 0.45772337913513184, -0.24678084254264832, 0.3827548623085022, 0.21327325701713562, 0.16995137929916382, -0.122613824903965, 0.08842305839061737, -0.56736159324646, -0.5057801604270935, 0.7816497683525085, -0.2022082358598709, 0.1034766882658004...
alert( widget_objects[last_id] ); ", :success => "reportMessage('success', request.headerJSON.success, 'save_widget_status'); $('band_form').reset();", :failure => "reportMessage('failure',
[ 0.27570098638534546, -0.3626915514469147, 0.7210661768913269, -0.23017968237400055, 0.5322111248970032, -0.242897629737854, 0.5419758558273315, -0.3142538368701935, -0.21057669818401337, -0.4211104214191437, -0.4469863176345825, 0.8369255065917969, -0.35563424229621887, -0.2678341269493103...
request.headerJSON.errors, 'save_widget_status');" }) %> ``` I had this same problem, so I started building something, here: <https://github.com/rileydutton/Exchange-Web-Services-for-PHP> It doesn't do much yet (basically just lets you get a list of email messages from the server, and send email)...
[ 0.40990063548088074, -0.5173522233963013, 0.15401819348335266, -0.05276896432042122, -0.4496079981327057, 0.10587553679943085, 0.4179493486881256, 0.08979912102222443, -0.14472433924674988, -0.7257413268089294, 0.33244767785072327, 0.1282486617565155, -0.1431259661912918, 0.032448958605527...
with the server, I would use php-ews...this is for folks who just happen to be working with an Exchange server and want an easy way to do some basic tasks. Oh, and it is MIT licensed. Hope that someone finds it useful!
[ 0.3937765061855316, 0.3404705822467804, 0.14985381066799164, 0.34920600056648254, -0.03763032332062721, -0.2897180914878845, -0.10944817960262299, 0.42144763469696045, -0.033628832548856735, -0.42693760991096497, 0.48875197768211365, 0.27889835834503174, -0.1439739316701889, 0.032829158008...
In Vim, what is the command to correct the indentation of all the lines? Often times I'll copy and paste code into a remote terminal and have the whole thing messed up. I want to fix this in one fell swoop. `=`, the indent command can take motions. So, `gg` to get the start of the file, `=` to indent, `G` to the end o...
[ 0.24105273187160492, -0.06391352415084839, 0.6943091154098511, 0.08208739757537842, 0.038023628294467926, -0.12069296091794968, 0.2462557554244995, 0.12874208390712738, -0.14658504724502563, -0.7803252339363098, -0.11727501451969147, 0.39667412638664246, -0.3944605588912964, 0.219810172915...
I'm working on a custom mark-release style memory allocator for the D programming language that works by allocating from thread-local regions. It seems that the thread local storage bottleneck is causing a huge (~50%) slowdown in allocating memory from these regions compared to an otherwise identical single threaded ve...
[ 0.201372429728508, 0.045105259865522385, 0.0653109923005104, -0.057382237166166306, 0.03920528292655945, 0.10274625569581985, -0.0765799805521965, -0.04121069610118866, -0.10765090584754944, -0.9676311612129211, 0.09232912957668304, 0.2197728455066681, -0.11992284655570984, 0.4403910934925...
should basically just involve accessing something through an extra layer of indirection, similar to accessing a variable via a pointer. Is this incorrect? How much overhead does thread-local storage typically have? Note: Although I mention D, I'm also interested in general answers that aren't specific to D, since D's ...
[ 0.2375752329826355, -0.2271118015050888, 0.11627425998449326, 0.27008458971977234, -0.07273087650537491, -0.14838092029094696, -0.1417226493358612, 0.11372454464435577, -0.27537140250205994, -0.8516702651977539, 0.02206197753548622, 0.4688292145729065, -0.06001275032758713, 0.1046689674258...
need help from the scheduler though. The scheduler must - on a task switch - update the pointer to the TLS data. Another fast way to implement TLS is via the Memory Management Unit. Here the TLS is treated like any other data with the exception that TLS variables are allocated in a special segment. The scheduler will...
[ -0.015429168939590454, -0.2900222837924957, 0.32652831077575684, 0.2394963800907135, -0.025202659890055656, -0.28222373127937317, 0.132161483168602, 0.11485899984836578, -0.39402973651885986, -0.739401638507843, -0.14041152596473694, 0.40064579248428345, -0.3965972065925598, 0.048932135105...
the pointer to the TLS block by the ThreadId (may use a map or so) * Release the semaphore * Return that pointer. Obviously doing all this for each TLS data access takes a while and may need up to three OS calls: Getting the ThreadId, Take and Release the semaphore. The semaphore is btw required to make sure no threa...
[ 0.1721515953540802, -0.20573540031909943, 0.5377342104911804, 0.10450073331594467, -0.06534907966852188, -0.3654108941555023, 0.3136422038078308, -0.056220199912786484, -0.1371677964925766, -0.6656922698020935, -0.313211590051651, 0.3181197941303253, -0.26939016580581665, 0.312144786119461...
This is what I've come up with as a method on a class inherited by many of my other classes. The idea is that it allows the simple comparison between properties of Objects of the same Type. Now, this does work - but in the interest of improving the quality of my code I thought I'd throw it out for scrutiny. How can it...
[ -0.10213545709848404, -0.0030426825396716595, 0.20943880081176758, 0.07426349073648453, -0.40820902585983276, 0.24830849468708038, 0.11856643855571747, -0.5286020040512085, -0.20675763487815857, -0.6880661249160767, 0.09899501502513885, 0.3526019752025604, -0.4007395803928375, 0.2713317275...
{ PropertyInfo[] sourceProperties = sourceType.GetProperties(); foreach (PropertyInfo pi in sourceProperties) { if ((sourceType.GetProperty(pi.Name).GetValue(this, null) == null && destinationType.GetProperty(pi.Name).GetValue(comparisonObject, null) == null)) { ...
[ 0.019580325111746788, -0.15313829481601715, 0.42194849252700806, -0.014157366938889027, 0.08199087530374527, 0.004075068514794111, 0.43737801909446716, -0.6025915145874023, 0.15199832618236542, -0.6838777661323547, -0.21475587785243988, 0.631520688533783, -0.17630670964717865, 0.3237729072...
} else if (!(sourceType.GetProperty(pi.Name).GetValue(this, null).ToString() == destinationType.GetProperty(pi.Name).GetValue(comparisonObject, null).ToString())) { // only need one property to be different to fail Equals. return false; } }
[ -0.0930904969573021, -0.24029143154621124, 0.321824848651886, -0.13457049429416656, 0.32003048062324524, 0.15718205273151398, 0.49594172835350037, -0.5748150944709778, 0.13926734030246735, -0.523193359375, -0.04641076922416687, 0.686150074005127, -0.41181519627571106, 0.25692349672317505, ...
} else { throw new ArgumentException("Comparison object must be of the same type.","comparisonObject"); } return true; } ``` I was looking for a snippet of code that would do something similar to help with writing unit test. Here is what I ended up using. ``` public static bool PublicInstance...
[ 0.06762883812189102, -0.2304767221212387, 0.058363720774650574, 0.04968832805752754, -0.0032091327011585236, 0.2079765498638153, 0.46986067295074463, -0.3956301212310791, -0.16663730144500732, -0.3007514178752899, -0.2945035398006439, 0.7395697236061096, -0.29108095169067383, 0.25880336761...
Type type = typeof(T); List<string> ignoreList = new List<string>(ignore); foreach (System.Reflection.PropertyInfo pi in type.GetProperties(System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.Instance)) { if (!ignoreList.Contains(pi.Name)) { ...
[ -0.011152374558150768, -0.17439623177051544, 0.6984878182411194, -0.3512667417526245, 0.21423454582691193, 0.15589052438735962, 0.664523184299469, -0.6414356231689453, -0.09933818131685257, -0.4027663767337799, -0.39683711528778076, 0.5993526577949524, -0.6512495279312134, 0.25722631812095...
if (selfValue != toValue && (selfValue == null || !selfValue.Equals(toValue))) { return false; } } } return true;
[ -0.43450552225112915, -0.09769579023122787, 0.6489617228507996, -0.29197731614112854, 0.2759166657924652, 0.182247593998909, 0.47311896085739136, -0.5231962203979492, 0.2907511293888092, -0.4488471448421478, -0.07245106995105743, 0.9925045371055603, -0.29268309473991394, 0.0009633845183998...
} return self == to; } ``` *EDIT:* **Same code as above but uses LINQ and Extension methods :** ``` public static bool PublicInstancePropertiesEqual<T>(this T self, T to, params string[] ignore) where T : class { if (self != null && to != null) { var type = typeof(T); var ignoreList =...
[ -0.2081780582666397, -0.25976988673210144, 0.5066165924072266, -0.038532767444849014, -0.0037897604051977396, 0.2064008116722107, 0.5002319812774658, -0.692743182182312, -0.1977178007364273, -0.45412778854370117, -0.17871297895908356, 0.6573259234428406, -0.5465777516365051, 0.167527362704...
BindingFlags.Instance) where !ignoreList.Contains(pi.Name) && pi.GetUnderlyingType().IsSimpleType() && pi.GetIndexParameters().Length == 0 let selfValue = type.GetProperty(pi.Name).GetValue(self, null) let toValue = type.GetProperty(pi.Name).GetValue(to, null) where selfV...
[ -0.19727858901023865, -0.010688387788832188, 0.8063609600067139, -0.2789232134819031, 0.0052321734838187695, 0.10808813571929932, 0.6026319265365601, -0.8041799664497375, 0.08248143643140793, -0.6508879065513611, -0.14173783361911774, 0.5635848641395569, -0.6699671745300293, 0.082399688661...
return self == to; } public static class TypeExtensions { /// <summary> /// Determine whether a type is simple (String, Decimal, DateTime, etc) /// or complex (i.e. custom class with public properties and methods). /// </summary> /// <see cref="http://stackoverflow.com/questions/24425...
[ 0.03645114600658417, 0.03793392702937126, 0.10455016791820526, -0.045912694185972214, -0.14336632192134857, 0.14632147550582886, 0.3321821093559265, -0.456903338432312, 0.14951340854167938, -0.22030428051948547, -0.20713944733142853, 0.5864019989967346, -0.4086854159832001, -0.096098564565...
return type.IsValueType || type.IsPrimitive || new[] { typeof(String), typeof(Decimal), typeof(DateTime),
[ 0.05714625492691994, -0.29293087124824524, 0.48669517040252686, -0.29693809151649475, 0.5139569044113159, 0.18919497728347778, 0.09232300519943237, -0.16776148974895477, -0.002890754258260131, -0.28468751907348633, -0.13851334154605865, 0.37439921498298645, -0.19295893609523773, 0.01631460...
typeof(DateTimeOffset), typeof(TimeSpan), typeof(Guid) }.Contains(type) || (Convert.GetTypeCode(type) != TypeCode.Object); } public static Type GetUnderlyingType(this MemberInfo member) {
[ 0.23013821244239807, -0.109545037150383, 0.4056845009326935, -0.2902772128582001, 0.32508715987205505, -0.21497751772403717, 0.33244383335113525, -0.35827577114105225, -0.08156070113182068, -0.5146669745445251, -0.30857717990875244, 0.21125000715255737, -0.7176465392112732, 0.3895404636859...
switch (member.MemberType) { case MemberTypes.Event: return ((EventInfo)member).EventHandlerType; case MemberTypes.Field: return ((FieldInfo)member).FieldType; case MemberTypes.Method: return ((MethodInfo)member).ReturnType;
[ -0.06544279307126999, -0.4804608225822449, 0.15595589578151703, 0.05920388549566269, 0.18541009724140167, 0.1781686246395111, 0.14930018782615662, -0.49150314927101135, -0.10761619359254837, -0.2826043367385864, -0.31151673197746277, 0.4499729871749878, -0.3505358397960663, 0.0542766526341...
case MemberTypes.Property: return ((PropertyInfo)member).PropertyType; default: throw new ArgumentException ( "Input MemberInfo must be if type EventInfo, FieldInfo, MethodInfo, or PropertyInfo"
[ -0.424151748418808, -0.1569901704788208, 0.1775117963552475, -0.07399889081716537, 0.06601037830114365, 0.07213770598173141, -0.010937914252281189, -0.31023821234703064, -0.05045577138662338, -0.2732543647289276, -0.4077851474285126, 0.4992268979549408, -0.35408177971839905, 0.194295242428...
); } } } ```
[ -0.08661697059869766, 0.317827045917511, 0.5813672542572021, -0.4799143373966217, 0.35230764746665955, -0.2661091089248657, 0.2786162495613098, 0.0011841714149340987, 0.0967598482966423, -0.20477955043315887, -0.4967835247516632, 0.9019340872764587, -0.44170042872428894, 0.3344267308712005...
in a CSS like this : ``` ... #big-menu { background: #fff url(../images/big-menu.jpg) no-repeat; } #some-menu { background: #fff url(../images/some-menu.jpg) no-repeat; } #some-other-menu { background: #fff url(../images/some-other-menu.jpg) no-repeat; } ... ``` is there a way to delay the loading of `#b...
[ 0.09609206020832062, 0.0350782610476017, 0.245786651968956, -0.20677058398723602, -0.16656595468521118, -0.18452896177768707, 0.08792965859174728, 0.1305347979068756, -0.41162052750587463, -0.4930785000324249, -0.28774574398994446, 0.2796193063259125, -0.361572802066803, 0.0048172348178923...
than that. (such as the ones used in buttons) Does the order of putting it in CSS or the occurrences of the markup (`#big-menu`) in HTML got anything to do with what gets loaded first ? or is there a more reliable way to control it ? javascript (jQuery preferred) is fine. The ordering in css doesn't control which reso...
[ 0.2268475592136383, -0.19385740160942078, 0.47945141792297363, -0.05320990830659866, 0.02850579097867012, -0.30192795395851135, 0.22965562343597412, -0.1632465422153473, -0.3350033462047577, -0.8519538640975952, -0.38177013397216797, 0.6134404540061951, -0.40524259209632874, 0.036407347768...
I'm trying to fetch the last inserted row Id of a Sqlite DB in my PHP application. I'm using Zend Framework's PDO Sqlite adapter for database handling. the lastInsertId() method is supposed to give me the results, but it wouldn't. In PDO documentation in php.net I read that the lastInsertId() might not work the same on...
[ -0.21541696786880493, -0.21755175292491913, 0.60844886302948, -0.1770591139793396, -0.11291828006505966, -0.032962724566459656, 0.025123383849859238, -0.3539067208766937, -0.16353952884674072, -0.8154404759407043, 0.017894871532917023, 0.6126313209533691, -0.31191161274909973, 0.1416533589...
everytime I call it. is there any special clean way to find the last inserted Id? Given an SQLite3 Database with a table `b`, as follows: ``` BEGIN TRANSACTION; CREATE TABLE b(a integer primary key autoincrement, b varchar(1)); COMMIT; ``` This code gives me a `lastInsertId`: ``` public function lastInsertId() { ...
[ -0.1493101865053177, -0.32376131415367126, 0.5562844276428223, -0.1985291987657547, 0.031224163249135017, -0.3286632001399994, 0.20517542958259583, -0.19143125414848328, -0.5152058005332947, -0.6777249574661255, -0.2637203335762024, 0.659785270690918, -0.3184974789619446, 0.170977026224136...
you don't want to alias the column, in SQLite3 the column should be named "last\_insert\_rowid()".
[ -0.11229134351015091, -0.09582366794347763, 0.32353106141090393, -0.1985158622264862, 0.08539946377277374, -0.22924603521823883, 0.17770341038703918, 0.12494872510433197, -0.15999969840049744, -0.44754981994628906, -0.015017298981547356, 0.3475888669490814, -0.33190587162971497, 0.14431704...
Someone asked me this the other day, and I couldn't think of a good answer. Platform portability is completely irrelevant to the project. In fact, Jet has some features that SQLite does not, namely foreign keys. So can anyone think why SQLite should be used instead of a Jet database? Contrary to what other people are...
[ 0.1706760823726654, 0.20616525411605835, 0.2835487127304077, 0.3836382329463959, 0.012513427063822746, -0.42393428087234497, 0.09025335311889648, -0.0038807725068181753, -0.12406381219625473, -0.5223233103752136, 0.2939686179161072, 0.5163061022758484, -0.33031415939331055, 0.4205376803874...
you and your application. * In either case you can redistribute the engine. * Jet/ACE is a bit more integrated and supported out of the box in MS tools and Visual Studio. * Jet/ACE has more granular locking, which may be important if your app allows multi-users or needs multi-threaded access to the database. * Jet/ACE...
[ 0.18790607154369354, -0.0730699896812439, 0.4548768103122711, 0.40514612197875977, -0.046925611793994904, -0.17980775237083435, -0.010140660218894482, -0.14494504034519196, -0.36117562651634216, -0.7905582189559937, -0.13758330047130585, 0.5351786017417908, -0.5007749795913696, -0.05076269...
app needs to be ported to Linux/Mac under Mono then SQLite is a better choice. * the SQLite engine is tighter so redistributing may be easier. * datatypes are quite loose in SQLite. * SQLite has more liberal redistribution rights (since you can basically do whatever you want with it). People who say that Jet corrupts ...
[ 0.1816365271806717, 0.18559181690216064, 0.7001307606697083, 0.3179658055305481, -0.27671217918395996, -0.06702447682619095, 0.18614710867404938, 0.15420135855674744, -0.6077616810798645, -0.6087300181388855, 0.08060698956251144, 0.6210044622421265, -0.8448619842529297, 0.09280150383710861...
I'm writing an application in ColdFusion, and even though it is mostly stable, it errors every so often. Because it has replaced the old application already, sometimes it is the users who get errors instead of me. I've created a nice page that people get when they get an error that sends information to me, such as err...
[ 0.3308688998222351, 0.3939429521560669, 0.2046160250902176, 0.11317699402570724, 0.010238753631711006, -0.028514714911580086, 0.09034957736730576, -0.06797142326831818, -0.04372251778841019, -0.7584791779518127, 0.22071048617362976, 0.09421571344137192, -0.17129066586494446, 0.103184923529...
if: ``` form.abc = 1 form.def = 2 ``` How can i get the variable names and value from 'form' without knowing them beforehand? Is [this document on looping over a structure](http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=Tags_j-l_16.html) somewhere along the right path? Also, I'm looking for a go...
[ 0.48046407103538513, 0.22086836397647858, 0.2824585437774658, -0.03190663829445839, 0.06955217570066452, -0.1790575236082077, 0.48668739199638367, -0.5605230927467346, -0.01950019598007202, -0.45503875613212585, 0.18021346628665924, 0.38595661520957947, -0.32410338521003723, -0.02853040210...
This one will also include FieldNames and any other variables that have since been added to the Form scope. Either of these could be used inside a `<cfloop index="CurField" list="#StructKeyList(Form)#">` - but there are easier ways... If you are on CF8 you can convert the scope to a string nice and easily with `seria...
[ 0.6004281044006348, -0.2437702715396881, 0.4887469708919525, 0.019230395555496216, -0.14881005883216858, -0.2759122848510742, 0.31944966316223145, -0.07286286354064941, -0.3179202973842621, -0.7062721848487854, 0.008733514696359634, 0.6165093183517456, -0.4897415041923523, 0.11789677292108...
can roll your own with an even simpler loop to the one hinted above - a collection loop lets you loop directly through a Structure or Scope - note that some annoying person picked 'item' rather than 'index' as the attribute for these. Since we know Form variables are all simple objects (i.e. strings) I've elected for ...
[ 0.4113267660140991, -0.13420549035072327, 0.6932557821273804, 0.098737932741642, -0.18999576568603516, -0.015532406978309155, -0.09210916608572006, -0.3795499801635742, -0.25577428936958313, -0.36837106943130493, -0.07732425630092621, 0.3274841010570526, -0.23656851053237915, -0.1342489272...
ListRest(CurLine,'=') /> </cfloop> <cfdump var="#FormData#"/> ``` One last important note: As with all user-supplied variables (Form,Url,Cookie scopes) you must make sure you handle them correctly to prevent security holes - specifically ***make sure you are using cfqueryparam for*** **all** ***your database queries...
[ 0.4154827296733856, -0.004815840627998114, 0.6325932145118713, 0.24154405295848846, -0.18756861984729767, -0.23395009338855743, 0.3637263774871826, -0.006214167922735214, -0.3643184304237366, -0.7250550389289856, 0.01882157474756241, 0.6269304156303406, -0.20048852264881134, -0.12116992473...
I am pretty sure this is possible just not sure what is the term for it and how to do it. Basically if you right click on any file and go to properties then summary , you can add comments etc. to a file. What i want to know is how would you do this problematically from c#. Also once you have added comments , how can ...
[ 0.8772165179252625, 0.06399457901716232, 0.07034307718276978, 0.3248027265071869, -0.12303165346384048, -0.3739161789417267, -0.069307342171669, 0.2876940965652466, -0.25406304001808167, -0.6912001371383667, 0.2609771192073822, 0.47196823358535767, 0.0048027015291154385, 0.3528161644935608...
would need to do this in Windows forms so permissions is not that much of a problem. Thanks in advance. An example using DSO which shows how to set the author & comment fields: ``` try { DSOFile.OleDocumentPropertiesClass doc = new DSOFile.OleDocumentPropertiesClass(); doc.Open(filename, false, DSOFile.dsoFil...
[ -0.22870589792728424, 0.10005227476358414, 0.5684024095535278, 0.0005395657499320805, 0.051118459552526474, -0.060960087925195694, 0.3412942588329315, -0.5399371385574341, -0.22650842368602753, -0.7013238668441772, -0.4355141222476959, 0.6484363079071045, -0.1646624505519867, 0.32449582219...
i have a table called category in which i have main category ids and names and each main category has sub category ids and names.i also have a product table with a category id column which either has a numeric sub category id or a 2 letter main category id eg:EL for electronics..my problem is how to get top categories ...
[ 0.1973886787891388, 0.3644348680973053, 0.41427984833717346, -0.09611045569181442, -0.06106311082839966, 0.17498311400413513, -0.2131292074918747, -0.32573285698890686, -0.29236936569213867, -0.41948214173316956, -0.2349330484867096, 0.4765402674674988, -0.06858973205089569, 0.422022908926...
function. ``` <#function zebra index> <#if (index % 2) == 0> <#return "white" /> <#else> <#return "#efefef" /> </#if> </#function> <#assign arr=["a","b","c","d"] /> <table> <#list arr as n> <tr><td bgcolor=${zebra(n_index)}>${n}</td></tr> </#list> </table> ``` and the [\_index builtin](http://freema...
[ 0.17419402301311493, -0.31863895058631897, 0.2965424060821533, -0.28830498456954956, -0.0657183974981308, 0.16681580245494843, 0.010292192921042442, -0.6743507385253906, -0.37712961435317993, -0.6082535982131958, 0.019510144367814064, 0.669673502445221, -0.5760271549224854, 0.1676106303930...
We have a Single Statement FUNCTION in SQL Server 2005 which uses CONTAINSTABLE(). All works fine when we pass a non empty search string. Is there a wildcard string we can pass to CONTAINSTABLE() so that it matches all records in a table. Kind regards, Looking at the wget manual I can't see this functionality, however...
[ 0.05022323876619339, -0.156900092959404, 0.22277219593524933, 0.09712188690900803, -0.47742336988449097, -0.2897498905658722, 0.21183356642723083, -0.21482190489768982, -0.37760302424430847, -0.3191642165184021, 0.13078458607196808, 0.785284698009491, -0.567690908908844, 0.0352037996053695...
--temp-dir=DIR create temporary files in directory DIR ``` I am not 100% sure wheather this is where it puts the files during downloads as not had chance to try it out.
[ 0.059626784175634384, 0.15880808234214783, 0.03944612666964531, -0.020908284932374954, -0.06420335918664932, -0.302334725856781, 0.13001152873039246, 0.48357516527175903, 0.0721864402294159, -0.5203043222427368, 0.11779443919658661, 0.5138838887214661, -0.16083917021751404, 0.4111926555633...
Surprisingly I was only able to find one previous question on SO about this subject, and I'd just like to get the community "Vote of Confidence" (or not!) on my approach. The way I see it is thus: * use `Debug.Assert` to state things you EXPECT would be true. This would be used when we are in complete control over ou...
[ 0.4591095745563507, 0.1065087765455246, -0.22525781393051147, 0.1404079645872116, 0.15375466644763947, -0.44057363271713257, 0.5567065477371216, -0.08065520226955414, -0.20504747331142426, -0.23793868720531464, -0.15215757489204407, 0.5217406749725342, 0.1509694755077362, 0.132918268442153...
that this is a CONTRIVED EXAMPLE for illustration only! Say we have class MyClass, which has a public property MyMode and a method `GetSomeValueForCurrentMode()`. Consider MyClass as one intended to be shipped (release built) in a library for use by other developers. We expect MyMode to be updated by external users o...
[ 0.09905964136123657, 0.05062243714928627, 0.5136948227882385, 0.10287874937057495, 0.31270265579223633, -0.19867396354675293, 0.1427161544561386, 0.03605273365974426, -0.08455666154623032, -0.5435176491737366, -0.024846544489264488, 0.7450442910194397, -0.07886633276939392, 0.4706722497940...
is one mantra that says we should not trust users of our classes. If we choose Debug.Assert and built MyClass as a release build (thereby removing the Debug Asserts) the user of the class wouldn't get helpful information that they had left it in an invalid state. But it's sort of contrary to the other mantra which says...
[ 0.32143086194992065, -0.000602984509896487, -0.1533808708190918, 0.2604215741157532, -0.5297425985336304, -0.2860178053379059, 0.7457184195518494, -0.2159615159034729, 0.2536952793598175, -0.2244986891746521, 0.10289337486028671, 0.48754647374153137, -0.19693583250045776, 0.094565071165561...
I noticed this response in a related SO question ([Design by contract using assertions or exceptions?](https://stackoverflow.com/questions/117171/design-by-contract-tests-by-assert-or-by-exception)): > The rule of thumb is that you should use assertions when you are trying to catch your own errors, and exceptions when...
[ 0.23531299829483032, 0.23429006338119507, -0.24850979447364807, 0.04748138040304184, -0.052716150879859924, -0.2618200182914734, 0.2353675216436386, -0.4910210967063904, -0.167563334107399, -0.16647061705589294, 0.10763214528560638, 0.6602058410644531, -0.018719060346484184, -0.11143630743...
technique outlined below. Thoughts welcome! I agree with most people here and follow Design-by-Contract. You should try and differentiate very clearly between requirements in deployed code (Contracts) and figuring out expected state during design (Debugging Assertions). You should ALWAYS throw contract assertions as ...
[ 0.643667995929718, -0.046135373413562775, 0.00930634792894125, -0.14512839913368225, -0.07164023071527481, -0.4255824387073517, 0.40003669261932373, -0.4536452889442444, -0.10662136971950531, -0.6399703025817871, 0.17321982979774475, 0.8869315981864929, 0.24159134924411774, -0.292849391698...
this is that as you start using DbC more regularly, you seldom need to use debugging assertions as there are already explicit guarantees written in to your code, so it's actually difficult to get in to an invalid state. So the question in your original post... "What I'm getting at here is that the user of MyClass has...
[ 0.2508242130279541, 0.3249824345111847, 0.13744962215423584, -0.07283729314804077, -0.10039546340703964, -0.2312806099653244, 0.6348698735237122, -0.024985630065202713, 0.0230325385928154, -0.31135332584381104, -0.10942663252353668, 0.3809989094734192, -0.05300075560808182, 0.6775746345520...
I've just started my first development job for a reasonably sized company that has to manage a lot of data. An average database is 6gb (from what I've seen so far). One of the jobs is reporting. How it's done currently is - Data is replicated and transferred onto a data warehouse. From there, all the data required fo...
[ 0.7447983622550964, 0.2727973759174347, 0.1877729892730713, 0.24008718132972717, 0.2768750786781311, 0.09978518635034561, -0.2765153646469116, -0.03161320090293884, -0.394515722990036, -0.6736975908279419, 0.08357184380292892, 0.4930567145347595, 0.170151025056839, 0.37556028366088867, -...
onto a reports database which PHP reads from to display the data. I'm not a big fan of stored procs at all. But the people I've spoken to insist that stored procedures are the only option, as queries directly against the data via a programming language are incredibly slow (think 30 mins?). Security is also a concern. ...
[ 0.4766762852668762, 0.18156041204929352, 0.08718018233776093, 0.2988710403442383, -0.1225518137216568, -0.4022691249847412, 0.4088890850543976, -0.08815105259418488, -0.11056720465421677, -0.45977216958999634, -0.06488928943872452, 0.4352353513240814, 0.17870455980300903, 0.004476267378777...
arranged (and indexed?). I've got a feeling that something is wrong. The reasoning behind using a stored procedure is that the execution plan that is created in order to execute your procedure is cached by SQL Server in an area of memory known as the Plan Cache. When the procedure is then subsequently re-run at a later...
[ 0.24190491437911987, -0.2501751482486725, 0.17717532813549042, 0.3749619126319885, 0.5157444477081299, 0.039268214255571365, -0.21174153685569763, -0.21334685385227203, -0.427563339471817, -0.517238974571228, -0.02724991738796234, 0.3013835847377777, -0.5018011331558228, 0.0673511847853660...
the same for the actual T-SQL. Offloading data to a reporting database is a typical pursuit however you may need to review your indexing strategy on the reporting database as it will likely need to be quite different from that of your OLTP platform for example. You may also wish to consider using SQL Server Analysis ...
[ 0.4149833023548126, -0.1495784968137741, 0.25961458683013916, 0.3119668960571289, -0.10843655467033386, -0.31324413418769836, 0.2499091923236847, 0.025331199169158936, -0.3286935091018677, -0.556839644908905, -0.07826850563287735, 0.314618855714798, -0.14208999276161194, 0.1209196522831916...
business to look as building a data warehouse. I hope this helps but please feel free to request further details. Cheers, John
[ 0.7320258617401123, 0.41601887345314026, 0.3540184199810028, 0.08401412516832352, 0.4585920572280884, -0.44937819242477417, 0.3116671144962311, 0.6111332178115845, -0.3452793061733246, -0.46544092893600464, -0.10831534117460251, 0.6245675683021545, 0.3716217875480652, -0.12208333611488342,...
Let me start out by saying that I'm not a JavaScript developer so this question may be rather basic. When simulating IE's nonstandard [`all`](http://msdn.microsoft.com/en-us/library/aa752281.aspx) property I'm using `getElementsByTagName("*")`, is there a significant performance difference between both methods? Essent...
[ 0.39614543318748474, -0.033673882484436035, -0.06310693174600601, 0.18468831479549408, -0.06102889031171799, -0.46192529797554016, 0.15988610684871674, -0.20264893770217896, -0.14255033433437347, -0.5346294045448303, -0.14898064732551575, 0.5360692143440247, -0.13132569193840027, 0.1011343...
I have a program that (amongst other things) has a command line interface that lets the user enter strings, which will then be sent over the network. The problem is that I'm not sure how to connect the events, which are generated deep inside the GUI, to the network interface. Suppose for instance that my GUI class hier...
[ 0.10355746746063232, -0.01813628524541855, 0.2619418203830719, 0.06823335587978363, -0.08156739175319672, 0.02985900267958641, 0.06445429474115372, 0.13806548714637756, -0.19520112872123718, -0.6815459132194519, 0.03204404190182686, 0.4411543309688568, -0.274842768907547, 0.253505408763885...