text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
temp; if(DateTime.TryParse(startDateTextBox.Text, out temp)) { // Yay :) } else { // Aww.. :( } ```
[ 0.24305030703544617, -0.15210381150245667, 0.23977230489253998, -0.3331857919692993, 0.10562044382095337, 0.039417050778865814, 0.48777496814727783, -0.04783027991652489, 0.0979129895567894, -0.5000413060188293, -0.39200296998023987, 0.34715116024017334, -0.386384516954422, 0.0220529586076...
The ListView doesn't seem to support the Scroll event. I need to call a function whenever the list is scrolled; how would I go about that? Why do you need to call a function when the list is scrolled? If you are changing the items as it's scrolled i would recommend setting the listview to virtual. Or you could overr...
[ 0.5662190318107605, -0.30335646867752075, 0.5710187554359436, -0.1447148323059082, -0.13842891156673431, -0.2788677215576172, 0.5052552819252014, -0.4020814597606659, -0.14866197109222412, -0.7332263588905334, 0.0021493821404874325, 0.7650554180145264, -0.1673685908317566, 0.19854089617729...
{ if (this.Scroll != null) this.Scroll(this, EventArgs.Empty); } protected override void WndProc(ref System.Windows.Forms.Message m) { base.WndProc(ref m); if (m.Msg == WM_HSCROLL || m.Msg == WM_VSCROLL) this.OnScroll(); } } ```
[ -0.06532388925552368, 0.009110912680625916, 0.9290898442268372, -0.39236336946487427, 0.4710844159126282, -0.1981273889541626, 0.5404383540153503, -0.40461379289627075, -0.19682462513446808, -0.5528512597084045, -0.5406404137611389, 0.7803475856781006, -0.2910904288291931, 0.47055608034133...
What is the difference between abstract class and interface in Python? What you'll see sometimes is the following: ```py class Abstract1: """Some description that tells you it's abstract, often listing the methods you're expected to supply.""" def aMethod(self): raise NotImplementedError("Should h...
[ 0.061956919729709625, -0.01845708303153515, -0.06231563538312912, -0.13582034409046173, -0.3919823467731476, -0.16494612395763397, 0.24211318790912628, -0.20968352258205414, -0.1662425547838211, -0.43088817596435547, -0.034098219126462936, 0.6938670873641968, -0.2970462143421173, -0.176467...
stated intent in the docstring. And the difference between abstract and interface is a hairsplitting thing when you have duck typing. Java uses interfaces because it doesn't have multiple inheritance. Because Python has multiple inheritance, you may also see something like this ```py class SomeAbstraction: pass...
[ 0.3543027341365814, -0.07853616774082184, -0.08478973805904388, -0.1546631157398224, -0.4174818694591522, -0.10069756209850311, 0.47819966077804565, -0.14721322059631348, -0.11550568789243698, -0.5839042067527771, 0.034245025366544724, 0.41218775510787964, -0.5911794900894165, -0.258251577...
uses a kind of abstract superclass with mixins to create concrete subclasses that are disjoint.
[ 0.08632717281579971, -0.15238937735557556, -0.3719538450241089, 0.01000360120087862, -0.19458946585655212, -0.052849847823381424, 0.2602689266204834, -0.05442330613732338, 0.09965979307889938, -0.3988131284713745, -0.2872311770915985, 0.009786219336092472, -0.42262354493141174, 0.016842065...
I want to do something sort of like this: ``` let x = 5 let y = 10 let expr = Console.ReadLine() expr ``` Where one might type `"x+y"` in the console to store in expr. How does one evaluate a statement like this in F#? Ultimately, I want a user to be able to enter expressions, or a set of rules for a system, on ...
[ 0.22953900694847107, 0.34080660343170166, 0.12263021618127823, -0.013047948479652405, -0.17988573014736176, -0.08751138299703598, 0.5019882917404175, 0.023202061653137207, -0.20052680373191833, -0.5837506055831909, -0.1475183218717575, 0.5104947090148926, -0.1282189041376114, 0.05422635748...
have eval, as mentioned, but if you can define the grammar, you can utilize the Lex and Yacc implementations in F# (fslex and and fsyacc). *EDIT:* As a quick follow up, I know in ocaml you can exploit the interactive console to your users with `ocamlmktop`. I am unsure of an equivalent in F#. This, although, doesn't ...
[ 0.2888953685760498, 0.08888155221939087, 0.3322995901107788, -0.11733441054821014, -0.24836254119873047, -0.3736903965473175, 0.23064951598644257, 0.27045363187789917, -0.20674097537994385, -0.5266841650009155, -0.3151978552341461, 0.6319913864135742, -0.3057626485824585, -0.27597111463546...
I asked [another question](https://stackoverflow.com/questions/370024/sql-server-2005-public-database-role-doesnt-seem-to-apply) about roles and permissions, which mostly served to reveal my ignorance. One of the other outcomes was the advice that one should generally stay away from mucking with permissions for the "pu...
[ 0.29266610741615295, 0.2844791114330292, 0.14380541443824768, 0.14068534970283508, 0.1471855789422989, -0.29072457551956177, 0.2879880964756012, -0.041063934564590454, -0.13062222301959991, -0.21264603734016418, 0.10188547521829605, 0.6579306721687317, -0.1826433688402176, 0.15866397321224...
[dbo.tablename] TO [newRole]"`. It gets the job done, but I feel like it could be prettier/easier. Any "best practice" suggestions? Working from memory (no SQL on my gaming 'pooter), you can use [`sys.database_permissions`](http://msdn.microsoft.com/en-us/library/ms188367(SQL.90).aspx) Run this and paste the results ...
[ -0.04747595265507698, 0.2559918165206909, 0.4717128276824951, -0.14971545338630676, 0.036286015063524246, -0.08870355039834976, 0.24512389302253723, -0.4887177050113678, -0.17537647485733032, -0.4620356857776642, -0.2121807187795639, 0.3978176414966583, -0.3251200318336487, 0.2315395623445...
OBJECT_SCHEMA_NAME(major_id) + '.' + OBJECT_NAME(major_id) + ' TO ' + @NewRole FROM sys.database_permissions WHERE grantee_principal_id = DATABASE_PRINCIPAL_ID(@SourceRole) AND -- 0 = DB, 1 = object/column, 3 = schema. 1 is normally enough class <= 3; ```
[ -0.159901961684227, 0.1782289296388626, 0.44790032505989075, -0.0019249123288318515, 0.08180215954780579, -0.05836779251694679, 0.10708947479724884, -0.2799951136112213, 0.03298040106892586, -0.42000657320022583, -0.4574952721595764, 0.388996422290802, -0.08421195298433304, 0.6327455043792...
I'm aware that Python 3 fixes a lot of UTF issues, I am not however able to use Python 3, I am using 2.5.1 I'm trying to regex a document but the document has UTF hyphens in it – rather than -. Python can't match these and if I put them in the regex it throws a wobbly. How can I force Python to use a UTF string or in...
[ 0.28764447569847107, 0.15536902844905853, 0.06259731948375702, -0.1683902144432068, -0.5332767367362976, -0.2269599735736847, 0.5299646854400635, -0.09720728546380997, -0.13633303344249725, -0.5348854064941406, -0.029912041500210762, 0.7764143943786621, -0.4740171730518341, -0.277922987937...
the whole file is UTF-8 encoded by adding adding a comment like this to the first line. ``` # encoding: utf-8 ``` Here's the test file I created and ran on Python 2.5.1 / OS X 10.5.6 ``` # encoding: utf-8 import re x = re.compile("–") print x.search("xxx–x").start() ```
[ 0.4004426896572113, 0.24950379133224487, 0.19493098556995392, -0.09547426551580429, -0.07712086290121078, 0.2868374288082123, 0.1437934935092926, -0.2015913724899292, -0.07531347870826721, -0.4892529547214508, -0.4703195095062256, 0.35744503140449524, -0.5500977635383606, -0.08681777864694...
I have a HashMap that I am serializing and deserializing to an Oracle db, in a BLOB data type field. I want to perform a query, using this field. Example, the application will make a new HashMap, and have some key-value pairs. I want to query the db to see if a HashMap with this data already exists in the db. I do not...
[ 0.39301034808158875, 0.3772115111351013, 0.07420774549245834, -0.11894191056489944, -0.07035987079143524, 0.1199508085846901, 0.019795862957835197, -0.18734793365001678, -0.11227524280548096, -0.46784907579421997, 0.13419266045093536, 0.3045007884502411, -0.46052083373069763, 0.41978672146...
foo is a BLOB type, and the ? is an instance of the new HashMap? Thanks Here's an article for you to read: [Pounding a Nail: Old Shoe or Glass Bottle](http://weblogs.asp.net/alex_papadimoulis/archive/2005/05/25/408925.aspx) I haven't heard much about your application's underlying architecture, but I can tell you immed...
[ 0.4724102318286896, 0.7770751118659973, 0.028079891577363014, -0.4298597276210785, -0.22365757822990417, 0.006791649851948023, 0.281917005777359, 0.20680324733257294, -0.2616429924964905, -0.04954471439123154, 0.06940700858831406, 0.37168771028518677, -0.6288787126541138, 0.191509678959846...
anything that you need to query against). Its much easier to create a table to represent hashmaps in your application as follows: ``` HashMaps -------- MapID (pk int) Key (pk varchar) Value ``` Once you have the content of your hashmaps in your database, its trivial to query the database to see if the data alread...
[ 0.04029834270477295, 0.07940785586833954, 0.2618073523044586, 0.023199573159217834, -0.21057143807411194, 0.14772796630859375, 0.13730014860630035, -0.4633650481700897, -0.33659085631370544, -0.5470626354217529, -0.035265374928712845, 0.34826844930648804, -0.4444011449813843, -0.0074565587...
AFAIK, you never need to specify the protocol in an onclick: `onclick="javascript:myFunction()"` **Bad** `onclick="myFunction()"` **Good** Today I noticed in [this article](http://web.archive.org/web/20080428095515/http://www.google.com/support/analytics/bin/answer.py?answer=55527) on Google Anallytics that *they* a...
[ 0.264283150434494, 0.3820584714412689, 0.5805843472480774, -0.30854901671409607, -0.030816692858934402, -0.21916894614696503, 0.3111676871776581, -0.33867576718330383, -0.21500162780284882, -0.46915075182914734, -0.05084667354822159, 0.3972354233264923, -0.4786898195743561, -0.048016928136...
alert(42); ``` Meaning, that "javascript:" is just a label and has no effect. This works, too: ``` <span onclick="foobar:alert(42)">Test</span> ``` **Update:** I did a little experiment and it turns out that, yes, "javascript:" is handled specially by IE, but definitely not so by Firefox, Safari, Opera or Chrome:...
[ 0.28421321511268616, 0.3019352853298187, 0.30924755334854126, -0.3964878022670746, -0.20072001218795776, -0.4423708915710449, 0.5918527245521545, -0.44677892327308655, -0.20595782995224, -0.7221496105194092, -0.34572309255599976, 0.7550901770591736, -0.47866129875183105, -0.307635605335235...
about the same thing.
[ 0.28646716475486755, 0.2281174212694168, 0.09784869849681854, -0.03481011092662811, 0.05692250281572342, -0.03858475014567375, 0.025000352412462234, 0.14420248568058014, -0.13945990800857544, -0.10907242447137833, 0.20375055074691772, 0.07079703360795975, -0.05225100740790367, 0.0928232818...
Can you show sample code for reading a drive label or volume name in .NET? I get the sense this requires WMI, but I am loathe to "drop-down" into WMI because it is like dropping down into a string-based SQL query in the sense that certain objects may not exist on certain versions of OSes or the user may not have the ri...
[ 0.4311754107475281, 0.09104828536510468, 0.21092994511127472, 0.24151739478111267, 0.059977445751428604, -0.3348848223686218, -0.03581947088241577, -0.026238078251481056, -0.17582371830940247, -0.5344843864440918, -0.10896222293376923, 0.9152907729148865, -0.2736133635044098, 0.17748188972...
select drive.VolumeLabel ```
[ -0.14950482547283173, 0.21889309585094452, 0.33646270632743835, 0.21739090979099274, 0.08338259905576706, -0.07515931129455566, -0.39002227783203125, 0.0441703125834465, -0.023760542273521423, -0.6637978553771973, -0.441152960062027, 0.7796993851661682, -0.24030359089374542, 0.483117640018...
I have a read-only database that has cached information which is used to display pages on the site. There are processes that run to generate the database, and those run on a different server. When I need to update the live database, I restore this database to the live server, to a new name and file. Then I drop the liv...
[ 0.7348396182060242, 0.2581690847873688, 0.5577890276908875, -0.13031180202960968, 0.13821573555469513, 0.1318165808916092, 0.2512930929660797, 0.05568453669548035, -0.4732482433319092, -0.7349545955657959, 0.025878308340907097, 0.2788618206977844, -0.4997859001159668, 0.574738621711731, ...
will throw an error on the site for people and crawlers currently accessing those pages, is there a better methodology for performing this procedure? Probably what you want to do is take the live database offline with the command: ``` ALTER DATABASE name SET OFFLINE ``` You can read more [here](http://www.blackwasp....
[ 0.2521374523639679, 0.1711677461862564, 0.28001001477241516, -0.083426333963871, 0.14443695545196533, -0.2745056450366974, 0.4293738305568695, -0.08011841028928757, -0.35949304699897766, -0.5189396739006042, -0.04503855109214783, 0.5213884711265564, -0.5335808992385864, 0.3553731441497803,...
transactions are rolled back unexpectedly. During the period of blocking, no new connections to the database will be permitted. Once the database is offline, you should be able to do your restore/rename operations safely and bring it back online when done. You might have to do some playing around to see what is permit...
[ 0.012982423417270184, -0.156490296125412, 0.38315415382385254, 0.43664970993995667, 0.3461178243160248, -0.30120840668678284, 0.21897193789482117, 0.06298086792230606, -0.7047003507614136, -0.5295159220695496, -0.2205122709274292, 0.6239091753959656, -0.0585128553211689, 0.2027058005332946...
to wait for a period of time after the ALTER DATABASE SET OFFLINE command has been issued (say 15 minutes), and if the database is still not offline yet, you can reissue the command with the WITH NO\_WAIT option to force it offline. If that isn't high-powered enough for you, you can also gracefully shutdown SQL Server...
[ 0.479889839887619, -0.2573886811733246, 0.7027695775032043, 0.20003902912139893, 0.36559146642684937, -0.509513258934021, 0.3627910614013672, 0.056975457817316055, -0.21946917474269867, -0.4643363058567047, -0.18322354555130005, 0.6880441308021545, -0.22104403376579285, 0.22662262618541718...
I think there must be something subtle going on here that I don't know about. Consider the following: ``` public class Foo<T> { private T[] a = (T[]) new Object[5]; public Foo() { // Add some elements to a } public T[] getA() { return a; } } ``` Suppose that your main method contains the followin...
[ 0.35727113485336304, -0.057641539722681046, -0.1167946308851242, -0.29610675573349, -0.0010551644954830408, -0.1035941019654274, 0.4290105402469635, -0.3219450116157532, -0.03660868480801582, -0.509490430355072, -0.04463426023721695, 0.43884459137916565, -0.5028362274169922, 0.068239547312...
cast an object to a type that cannot be casted. That is, to a subclass of which it is not an instance (to quote the documentation). e.g.: ``` Object o = new Double(3.); Double d = (Double) o; // Working cast String s = (String) o; // ClassCastException ``` And it seems I can do this. If `a` was just a `T` instead of...
[ 0.34556835889816284, 0.07612765580415726, -0.09934993088245392, -0.27687281370162964, -0.398497074842453, -0.025487300008535385, 0.37888088822364807, -0.2386889010667801, -0.03540394455194473, -0.3465798795223236, 0.06663445383310318, 0.5877478718757629, -0.45321500301361084, -0.0798876360...
this line: ``` private T[] a = (T[]) new Object[5]; ``` and replacing `T` with `Double` to get this: ``` private Double[] a = (Double[]) new Object[5]; ``` You cannot cast from Object to Double, hence the ClassCastException. **Update and Clarification:** Actually, after running some test code, the ClassCastExcep...
[ 0.20369631052017212, -0.019503245130181313, 0.20530076324939728, -0.2985457479953766, 0.02612016722559929, -0.04263821244239807, 0.542212188243866, -0.3560359477996826, -0.150518998503685, -0.3498198091983795, -0.28297966718673706, 0.5581216216087341, -0.6078489422798157, 0.124378226697444...
Double[] a2 = f.getA(); // throws ClassCastException System.out.println(a2); } ``` This is because the type-information about the member variable `a` is erased at runtime. Generics only provide type-safety at *compile-time* (I was somehow ignoring this in my initial post). So the problem is not ``` private T[] ...
[ 0.08927537500858307, -0.05299600958824158, 0.02248443476855755, -0.3401910066604614, -0.22326220571994781, -0.014295524917542934, 0.6069082617759705, -0.36271584033966064, -0.2576240301132202, -0.12527213990688324, -0.2174397110939026, 0.3168380856513977, -0.6830357909202576, 0.21691615879...
Double. **Update 2**: to answer your final question "why do arrays break this?" The answer is because the language specification does not support generic array creation. [See this forum post for more](http://forums.sun.com/thread.jspa?threadID=530823) - in order to be backwards compatible, nothing is known about the t...
[ 0.7163767218589783, -0.3516254127025604, -0.02211630530655384, -0.11647967249155045, -0.3563868999481201, -0.13401465117931366, 0.5669803619384766, -0.014429855160415173, -0.4395556151866913, -0.2626212537288666, -0.08289516717195511, 0.3244783580303192, -0.6219832301139832, -0.04835971444...
I installed Aptana Studio plugins for Eclipse and now Eclipse startup is slower than ever because Aptana Studio always checks for updates at startup -- and it's really slow! How do I turn off auto updates in Aptana? Window->Preferences, find the Install/Update item in the tree and locate Automatic Updates. You can ch...
[ 0.5162083506584167, 0.041509609669446945, 0.12315329909324646, -0.09684541076421738, -0.3545847237110138, -0.10486369580030441, 0.3292361795902252, 0.012130649760365486, 0.08280489593744278, -0.9075518846511841, 0.12401951104402542, 0.9577081799507141, -0.15909481048583984, 0.0383267402648...
Is there a way to get notification of date change in c#? I have a requirement where I have to do something when the system date is changed. I found that SystemsEvent.TimeChanged is an event you can hook into, however it is only fired only when user has changed the time. Would this be better handled by having a schedu...
[ 0.2842995822429657, -0.2918649911880493, 0.3601071536540985, 0.21449780464172363, 0.35658398270606995, -0.27796757221221924, 0.1661151647567749, 0.23269042372703552, -0.5825666189193726, -0.3847092092037201, -0.005538614001125097, 0.5388939380645752, -0.0019067719113081694, 0.0580688118934...
I have this line of code for page load: ``` if ($("input").is(':checked')) { ``` and it works fine when the radio button input is checked. However, I want the opposite. Something along the lines of ``` if ($("input").not(.is(':checked'))) { ``` so that my if statement runs when none of the radiobuttons are selec...
[ 0.3935650885105133, 0.17865023016929626, 0.5174800157546997, -0.36858823895454407, 0.05475617200136185, -0.24655847251415253, 0.5689249634742737, -0.7039967179298401, 0.1488734781742096, -0.43823644518852234, -0.10544116050004959, 1.0536764860153198, -0.5470990538597107, 0.0593871288001537...
I'm trying to consume Sharepoint webservices with ruby. I've basically given up trying to authenticate with NTLM and temporarily changed the Sharepoint server to use basic authentication. I've been successful getting a WSDL using soap4r but still cannot authenticate when attempting to use an actual web service call. H...
[ 0.38122937083244324, 0.3111513555049896, 0.2888883650302887, 0.059487007558345795, -0.4016894996166229, -0.3456946611404419, 0.753635048866272, -0.3048264980316162, 0.03164125606417656, -0.7604634165763855, 0.1458876132965088, 0.7876052260398865, -0.11897683143615723, 0.3031601011753082, ...
lists specified (below) using the List GUID and the List View GUID. Edit (May 23, 2011). I should have pointed out that this code requires the ruby-ntlm gem. Here's a decent link that should help. This definitely works. <http://rubydoc.info/gems/ruby-ntlm/0.0.1/file/README.markdown> ``` agent = Mechanize.new agent.a...
[ 0.051143646240234375, -0.0496985986828804, 0.6955218315124512, -0.05074678361415863, -0.3652159571647644, -0.11010786890983582, 0.5288889408111572, -0.5947283506393433, -0.3425453305244446, -0.6049239635467529, -0.14194229245185852, 0.6362504363059998, -0.2916123569011688, 0.09671704471111...
Does string immutability work by statement, or by strings within a statement? For example, I understand that the following code will allocate two strings on the heap. ``` string s = "hello "; s += "world!"; ``` "hello" will remain on the heap until garbage collected; and s now references "hello world!" on the heap...
[ -0.024924229830503464, -0.077921062707901, 0.19324646890163422, 0.013267956674098969, -0.2320082038640976, 0.01926713064312935, 0.37019822001457214, -0.059875305742025375, -0.07604826241731644, -0.4606178104877472, -0.018304038792848587, 0.3763478696346283, -0.3943377733230591, 0.501611828...
means that even if you run this line 20000 times there is still only 1 string. Re testing the results... the easiest way (in this case) is probably to look in reflector: ``` .method private hidebysig static void Main() cil managed { .entrypoint .maxstack 1 .locals init ( [0] string s) L_0000:...
[ 0.020252428948879242, -0.1037534549832344, 0.8808557987213135, 0.0029781945049762726, 0.06060775741934776, 0.12716969847679138, 0.7201461791992188, 0.20143941044807434, -0.15297293663024902, -0.42679762840270996, 0.00737195648252964, 0.3933839797973633, -0.38710713386535645, 0.792107641696...
(`ldstr`), the compiler has done this for you already.
[ 0.24332578480243683, 0.7403356432914734, 0.2166677713394165, 0.037266071885824203, 0.024361776188015938, -0.38049808144569397, 0.2754126191139221, 0.039950910955667496, 0.046880900859832764, -0.36163902282714844, -0.1281578242778778, 0.6405043005943298, -0.138824924826622, -0.2743899822235...
I've been searching around for this and cannot seem to find a solid answer. I know the 2.0 version of the .net framework is supported in Windows98, but does that include SP1? I think the main difference is that between when .Net 2.0 came out (1/22/2006) and .Net 2.0 sp1 came out (11/19/2007), Microsoft [ended all suppo...
[ 0.41793331503868103, 0.2306494265794754, 0.6731261014938354, -0.1266888529062271, -0.10379859060049057, -0.3508060872554779, 0.5530616641044617, -0.11817397177219391, -0.20319633185863495, -0.23749473690986633, -0.16322629153728485, 0.6932312846183777, -0.2470414638519287, 0.16973027586936...
if you have a specific customer in mind who's still running '98 or ME, you might suggest that they upgrade that machine.
[ 0.72248375415802, 0.2646479904651642, 0.04626670852303505, 0.19811701774597168, 0.2057035267353058, 0.22277063131332397, 0.08396267145872116, 0.3619142770767212, -0.34102675318717957, -0.5073591470718384, 0.18271321058273315, 0.9438154697418213, 0.09543034434318542, -0.07802863419055939, ...
I have a simple extension method on the int type so I can do the following: ``` string timeLength = 61.ToTime() // timeLength will be "1:01" ``` This works great in code, but I want to use this extension method in a Repeater Template. When databinding I want to do the following: ``` <%# Eval("LengthInSeconds").ToTi...
[ 0.003677495289593935, -0.006111182272434235, 0.3667660653591156, -0.264628142118454, 0.05795116350054741, 0.049546387046575546, 0.28623250126838684, -0.20819075405597687, -0.17366743087768555, -0.3336429297924042, -0.024638930335640907, 0.6395612359046936, -0.42636099457740784, 0.286474823...
method in the code-behind, but either way, I would still like to know why this isn't working. Thanks Looks like I get to answer my own question! Asp.Net was compiling the .aspx,.ascx templates using the .Net 2.0 compiler. I needed to add the following to my web.config to make it work ``` <system.codedom> <compi...
[ 0.3841732144355774, -0.036419931799173355, 0.42385002970695496, -0.05233769863843918, -0.310751736164093, 0.12596091628074646, 0.34566113352775574, -0.3763587772846222, -0.16098573803901672, -0.7771391868591309, 0.14063094556331635, 0.2656431496143341, -0.2721978724002838, -0.1367262601852...
still have to perform the cast to (int) in the Eval, but that at least makes sense to me.
[ 0.3889600932598114, 0.08729865401983261, 0.3503001630306244, 0.014416791498661041, 0.08687136322259903, -0.03665350750088692, 0.5293879508972168, -0.36696746945381165, -0.12978847324848175, -0.1249089166522026, 0.0003047746140509844, 0.4240500330924988, 0.30914777517318726, -0.327351331710...
I have 3 tables, foo, foo2bar, and bar. foo2bar is a many to many map between foo and bar. Here are the contents. ``` select * from foo +------+ | fid | +------+ | 1 | | 2 | | 3 | | 4 | +------+ select * from foo2bar +------+------+ | fid | bid | +------+------+ | 1 | 1 | | 1 | 2 | | 2 |...
[ -0.2540762424468994, 0.49419355392456055, 0.7282042503356934, -0.3048148453235626, 0.008293152786791325, 0.36174842715263367, -0.04608500003814697, -0.4628758728504181, 0.23427297174930573, -0.8214645981788635, 0.12009298801422119, 0.36613965034484863, -0.3986362814903259, 0.08693332225084...
4 | 4 | +------+------+ select * from bar +------+-------+------+ | bid | value | zid | +------+-------+------+ | 1 | 2 | 10 | | 2 | 4 | 20 | | 3 | 8 | 30 | | 4 | 42 | 30 | +------+-------+------+ ``` What I want to request is, "Give me a list of all the fid and values with zi...
[ -0.08348315209150314, -0.016991540789604187, 0.9034685492515564, -0.16896851360797882, -0.1317419707775116, 0.20208331942558289, -0.16160739958286285, -0.7914197444915771, 0.12546522915363312, -0.45456284284591675, -0.21969068050384521, 0.7350432276725769, -0.5030142068862915, -0.029012981...
for all the fids, so the result would look like: ``` +------+--------+ | fid | value | +------+--------+ | 1 | null | | 2 | 8 | | 3 | null | | 4 | 42 | +------+--------+ ``` ``` SELECT * FROM foo LEFT OUTER JOIN (foo2bar JOIN bar ON (foo2bar.bid = bar.bid AND zid = 30)) USING (fid); ``...
[ -0.2417600005865097, -0.1306876540184021, 0.7001450657844543, -0.3289273977279663, 0.09487026929855347, -0.2233659327030182, 0.012657697312533855, -0.6976277828216553, 0.1462991088628769, -0.35197752714157104, -0.22787730395793915, 0.3599976897239685, -0.5536420345306396, 0.218168929219245...
There's lots of information about how cached execution plans in SQL Server eliminate much if not most of the performance advantage of stored procedures over dynamic sql. However, I have not found much about whether the same is true for Oracle databases. Does anyone have information or pointers to information about dyna...
[ 0.1070261225104332, -0.22451253235340118, 0.02578628435730934, 0.40276679396629333, -0.11632212996482849, -0.017073962837457657, 0.07593328505754471, -0.058788180351257324, -0.4113982617855072, -0.32818344235420227, 0.03226035088300705, 0.4676080048084259, -0.19172102212905884, -0.17918984...
plan for a particular query. As with SQL Server, you need to use a parameterised query to do this, rather than substituting the values into the string - as the latter will generate a different hash value.
[ 0.2813912630081177, -0.5805257558822632, 0.17677181959152222, 0.18261894583702087, 0.2688677906990051, -0.14089663326740265, -0.0347304493188858, -0.26857197284698486, -0.2708893120288849, -0.7035661935806274, -0.06508073210716248, 0.2817145586013794, -0.525900661945343, -0.273853391408920...
I'm overthinking this. I have colors stored in a database table, and I want to set the background of specific cells in a table to those colors. In other words: ``` <table> <tr> <td ???set color here???> ...content... </td> <td ???next color here???> ...next content.....
[ 0.43554702401161194, -0.058733079582452774, 0.0148090785369277, -0.03416361287236214, 0.34472203254699707, 0.04432527348399162, 0.08215498924255371, -0.2731018662452698, -0.13766123354434967, -0.876968502998352, 0.05385472998023033, 0.4102567732334137, -0.4511203467845917, 0.01695978268980...
</tr> </table> ``` Originally I had Panels surrounding each piece of content and I set their background color in the code-behind, which worked fine until I had varying size panels, which threw off the layout. What's the easiest way to feed the color values from the database to the `<td>` element? Note that the colors...
[ 0.40338048338890076, -0.08634044229984283, 0.4716881513595581, 0.06056949123740196, -0.14401720464229584, 0.1177821010351181, 0.07104358077049255, -0.14630842208862305, -0.06324290484189987, -0.7861607074737549, -0.2533913254737854, 0.520562469959259, -0.3746505379676819, -0.00100075546652...
I'm just getting started/familar with Subversion and was wondering which protocol gives the best performance file:// or svn://, when accessing a Subversion repository over the network? If we don't use the svn:// protocol, will be missing out on any features that we couldn't mitgate using the file:// protocol? We're all...
[ 0.39232951402664185, -0.09241648018360138, 0.378876656293869, 0.010966571047902107, -0.3898276686668396, -0.46762409806251526, 0.41327202320098877, 0.03595634922385216, -0.43031400442123413, -0.7067241668701172, 0.024756059050559998, 0.3559879958629608, -0.040217943489551544, 0.26334914565...
file:// URLs. Even if the repository is readily available to everyone via a network share, this is a bad idea. It removes any layers of protection between the users and the repository: users can accidentally (or intentionally) corrupt the repository database, it becomes hard to take the repository offline for inspectio...
[ 0.4587300717830658, 0.10721141844987869, 0.17628589272499084, 0.35070979595184326, 0.04006682336330414, -0.7504063844680786, 0.3825224041938782, 0.1815464347600937, -0.38613322377204895, -0.5712414979934692, -0.35667237639427185, 0.36219722032546997, -0.17977167665958405, 0.566409587860107...
accessing via file://, and it can entail all the same problems if the administrator isn't careful
[ 0.19358670711517334, 0.21692031621932983, 0.20032256841659546, 0.41952386498451233, 0.14375479519367218, -0.23412451148033142, 0.5392257571220398, 0.2694847881793976, -0.3591940701007843, -0.8496972322463989, -0.24675141274929047, 0.443183571100235, -0.0024796363431960344, 0.48594656586647...
I'm using a `DateTime` in C# to display times. What date portion does everyone use when constructing a time? E.g. the following is not valid because there is no zero-th month or zero-th day: ``` // 4:37:58 PM DateTime time = new DateTime(0, 0, 0, 16, 47, 58); ``` Do I use COM's zero date? ``` // 4:37:58 PM DateTim...
[ 0.19601555168628693, 0.1696438044309616, 0.6399351954460144, 0.11325247585773468, 0.18342868983745575, 0.12701186537742615, -0.06799688935279846, 0.02533590979874134, -0.3996649980545044, -0.5095597505569458, 0.16325049102306366, 0.3321390450000763, -0.17137034237384796, 0.4395786821842193...
time1; ``` --- Answer ====== I think I like **MinValue** ``` DateTime time = DateTime.MinValue.Date.Add(new TimeSpan(16, 47, 58)); ``` --- **Note:** I can't use a `TimeSpan`, because that doesn't store times of the day. And the reason I know that is because there's no way to display its contents as a time. Wh...
[ 0.3365961015224457, -0.11991657316684723, 0.6561061143875122, -0.023688731715083122, 0.3101256191730499, 0.21511997282505035, 0.40351077914237976, -0.028080159798264503, -0.6782681941986084, -0.8662509918212891, -0.03480983152985573, -0.07564456760883331, -0.43956851959228516, 0.2891187667...
(Bahrain) PM 4:47:58 (Singapore) 下午 04:47:58 (Taiwan) 04:47:58 PM (Belize) 4:47:58 p.m. (New Zealand) 4:47:58 μμ (Greece) 16.47.58 (Italy) 오후 4:47:58 (Korea) 04:47:58 ب.ظ (Iran) ਸ਼ਾਮ 04:47:58 (India) 04:47:58 p.m. (Argentina) etc ``` In other words, there is a difference between a timespan, and a t...
[ 0.3791571855545044, -0.012993150390684605, 0.90638667345047, -0.10059080272912979, -0.08393698930740356, 0.03819907084107399, 0.10047568380832672, -0.04201902449131012, -0.394879013299942, -0.1131475567817688, -0.23681463301181793, 0.16896453499794006, -0.1240508183836937, 0.05905394628643...
I have inherited a application framework from the previous developer where I now work. This framework utilizes multiple parent/child relationships. In many instances parent/parent/child occur. I asked why he WASN'T using MDI and he stated that years ago, when he had started, MDI had major shortcomings concerning the pr...
[ 0.2194189876317978, 0.3523777723312378, 0.0067291948944330215, 0.30915188789367676, 0.06870311498641968, 0.13096128404140472, 0.14754413068294525, -0.03456179425120354, -0.2356203943490982, -0.9833529591560364, 0.24150417745113373, 0.3851167559623718, -0.279865026473999, 0.4619467854499817...
MDI Containers anyway (see [This Microsoft KB item](http://support.microsoft.com/kb/126962)). Thought i posted that up because i've seen many MDI applications hit that error when its heavily used. I generally like an SDI Interface and make it share the same controls and windows over multiple instances of 'something' i...
[ 0.2724430561065674, 0.020393872633576393, 0.1166883036494255, 0.08809445053339005, -0.3124348223209381, -0.2591140866279602, 0.30126938223838806, 0.02431652694940567, -0.07880615442991257, -0.9212238788604736, 0.1415434330701828, 0.23374268412590027, -0.368490606546402, 0.05285549536347389...
I understand that I can specify system properties to Tomcat by passing arguments with the -D parameter, for example "**-Dmy.prop=value**". I am wondering if there is a cleaner way of doing this by specifying the property values in the context.xml file or some other tomcat configuration file. I would like to do this be...
[ 0.22398735582828522, 0.11840597540140152, 0.5643980503082275, -0.09957384318113327, 0.005537332966923714, -0.09454774111509323, 0.32904312014579773, 0.019047660753130913, -0.11408383399248123, -0.706462025642395, -0.0584145225584507, 0.8444167375564575, -0.216260626912117, 0.17739562690258...
accepted, I can't. I'm updating the description to provide better guidance and discourage folks from using the poor practice I outlined in the original answer). You can specify these parameters via context or environment parameters, such as in context.xml. See the sections titled "Context Parameters" and "Environment ...
[ 0.48173990845680237, 0.07868174463510513, 0.34318283200263977, 0.08684149384498596, 0.10986826568841934, -0.18272395431995392, 0.40959155559539795, -0.6348689198493958, -0.13489243388175964, -0.16432799398899078, -0.0005928456084802747, 0.5834997296333313, -0.12326467782258987, 0.318008780...
a poor practice since a deployed artifact should not be environment specific. However, below is the configuration snippet if you really want to do this: ```xml <env-entry> <env-entry-name>SMTP_PASSWORD</env-entry-name> <env-entry-type>java.lang.String</env-entry-type> <env-entry-value>abc123ftw</env-entry-...
[ -0.11273584514856339, 0.08336995542049408, 0.12390989810228348, 0.14849001169204712, 0.3951357901096344, -0.47931307554244995, 0.2643515169620514, -0.18965251743793488, -0.3382393419742584, -0.8162193298339844, -0.39444398880004883, 0.49976351857185364, -0.03061201237142086, -0.12605234980...
When I inserted text from one SQL Server VARCHAR(MAX) field in one database to another, I get question mark symbols - "?" - in the target database (in addition to line feeds) whenever there are line feeds in the source database. Text in the target database looks like this: Line one.? ? Line two.? ? Any idea...
[ -0.0024946616031229496, -0.25962647795677185, 0.4834473133087158, -0.24396885931491852, -0.316496878862381, 0.1256941854953766, 0.34259864687919617, -0.46965354681015015, 0.03951190784573555, -0.7569444179534912, -0.2592198848724365, 0.5060018301010132, -0.6694767475128174, -0.221909895539...
map.end(), std::back_inserter(values), boost::bind(&map_type::value_type::second, _1)); ```
[ -0.46758079528808594, -0.04131293296813965, 0.7641544938087463, -0.32105714082717896, 0.09742358326911926, -0.14580552279949188, 0.04754217341542244, -0.3072093725204468, -0.008840118534862995, -0.7453488111495972, -0.4342038631439209, 0.6431475877761841, -0.3299994468688965, 0.11993210762...
I would like to store log4net config data in my application.config file. Based on my understanding of the documentation, I did the following: 1. Add a reference to log4net.dll 2. Add the following line in AssemblyInfo.cs: ``` [assembly: log4net.Config.XmlConfigurator(Watch = true)] ``` 3. Initialize the logger as f...
[ 0.18032117187976837, 0.009555744007229805, 0.46177786588668823, -0.12572680413722992, 0.17929533123970032, -0.11663303524255753, 0.09842004626989365, -0.3591121733188629, -0.23313204944133759, -0.7889515161514282, -0.09183400124311447, 0.4662667512893677, -0.3974473476409912, -0.1263175457...
<conversionPattern value="%date [%thread] %-5level %logger [%property{NDC}] - %message%newline" /> </layout> </appender> <root> <level value="INFO" /> <appender-ref ref="ConsoleAppender" /> </root> </log4net> ``` However, when I run the application, I get the following er...
[ 0.056838274002075195, -0.041752904653549194, 0.7124876976013184, 0.1065765768289566, 0.1516234129667282, 0.2314578741788864, 0.45569610595703125, -0.1520070731639862, -0.08249411731958389, -1.0059468746185303, 0.08155833929777145, 0.6710003614425659, -0.2005637139081955, 0.1290184557437896...
your app.config in the configSections element ```xml <configSections> <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821" /> </configSections> ``` Then later add the log4Net section, but delegate ...
[ 0.11254854500293732, 0.4284597337245941, 0.5965798497200012, -0.14881570637226105, 0.226531520485878, 0.28928714990615845, 0.19739855825901031, -0.11249830573797226, -0.340608149766922, -0.8865202069282532, -0.48505017161369324, 0.7098389863967896, -0.6578564643859863, -0.12399811297655106...
I want to prevent the user from maximizing the Windows Form to full screen so I have disabled the Maximize button. However, I want to be able to have the user 'restore' the Form. When they click the Restore button I want it to show a different, smaller, minified, form, which will show them a maximize button which will ...
[ 0.597668468952179, 0.08516018837690353, 0.5094504356384277, 0.034981247037649155, 0.15954047441482544, -0.011497652158141136, 0.38718530535697937, -0.06495407968759537, 0.09307411313056946, -0.5774646997451782, 0.087646484375, 0.6780846118927002, -0.28490567207336426, 0.19051113724708557, ...
new one with less controls on it. When they click maximize on the smaller form, it will return to the original form. I looked at a similar problem to this at work and the only solutions I could find involved setting undocumented window styles, which I was not inclined to do. Therefore the best solution to your proble...
[ 0.2820200026035309, -0.07040030509233475, 0.5382502675056458, -0.008787746541202068, -0.06839489191770554, -0.02695772983133793, 0.07164036482572556, -0.11914818733930588, -0.33059456944465637, -0.8482850790023804, 0.23868687450885773, 0.6542221307754517, -0.5297796726226807, -0.0011425374...
as they do for all others. Overriding that functionality would create confusion for your users, hence why I would recommend creating different buttons either on the title bar or somewhere else on your interface that perform this function.
[ 0.2771303653717041, 0.1623965948820114, 0.33024725317955017, 0.05100547894835472, 0.16695311665534973, 0.07544224709272385, -0.10840862989425659, -0.0587741993367672, -0.2390211820602417, -0.2450522482395172, -0.2269454151391983, 0.7093105912208557, 0.013074561022222042, 0.2643079161643982...
``` enum MyEnum { A( 1, 2, 3, 4), B(1, 2), C(4, 5, 8, 8, 9); private MyEnum( int firstInt, int... otherInts ) { // do something with arguments, perhaps initialize a List } } ``` Are there any problems with this? Any reasons not to do it? Sure, this is perfectly legal. No reason not to do ...
[ 0.20406444370746613, 0.41555705666542053, 0.18074743449687958, -0.13496987521648407, 0.13874664902687073, 0.032218433916568756, 0.2353629171848297, 0.03092147223651409, -0.046664759516716, -0.5508714914321899, -0.3681863844394684, 0.5415812730789185, -0.3856702744960785, 0.1136882677674293...
I have written some CSS which targets elements using the parent > child selector. Specifically for tables so I can apply certain styles to the headers and footers like this ``` table > thead > tr > th ... table > tbody > tr > td ... //there are other uses in the css as well ``` This works great, except in IE6. What ...
[ 0.5082005858421326, 0.22726793587207794, -0.02921534888446331, -0.03531227260828018, -0.2991054952144623, 0.05456210672855377, 0.04845395311713219, 0.09288051724433899, -0.08322235941886902, -0.7193778157234192, 0.183417409658432, 0.5081073641777039, -0.2930581569671631, 0.1222921535372734...
I have uploaded some files to a directory under public and I try to access them using Dir.glob. But I get no results back. The Dir.glob works fine on dev server (mongrel) and also works fine when using script/console on the site installed on site5 is there a way to get this working or a different way to get the list...
[ 0.29819023609161377, -0.02395622991025448, 0.3415367901325226, -0.2294129878282547, -0.20752835273742676, -0.18268191814422607, 0.3757142424583435, 0.027513572946190834, -0.12374237924814224, -0.6432539820671082, -0.07404504716396332, 0.931094229221344, -0.6084112524986267, 0.2151685208082...
[Path.Combine](https://msdn.microsoft.com/en-us/library/system.io.path.combine%28v=vs.110%29.aspx) is handy, but is there a similar function in the .NET framework for [URLs](http://en.wikipedia.org/wiki/Uniform_resource_locator)? I'm looking for syntax like this: ``` Url.Combine("http://MyUrl.com/", "/Images/Image.jp...
[ 0.4520803391933441, 0.07920393347740173, 0.22759652137756348, -0.17132629454135895, -0.18048590421676636, 0.04999377578496933, 0.1775166094303131, -0.7473731637001038, -0.15331578254699707, -0.586798906326294, -0.15353217720985413, 0.2273859977722168, -0.4182349443435669, -0.28085276484489...
I get the name of a variable from the script user as the first argument and I echo the value of said variable back to the console: ``` #!/bin/bash variablename=$1 echo "The value of $variablename is: " ${!variablename} ``` This works great! What I can't get to work is if I want to change that variable into the valu...
[ 0.07956429570913315, 0.13532672822475433, 0.2399047464132309, -0.5388364195823669, 0.010122602805495262, -0.06790031492710114, 0.6543843746185303, -0.6261126399040222, -0.10854697972536087, -0.5045787692070007, -0.03788387030363083, 0.7198846340179443, -0.4129948019981384, 0.03327490016818...
get a variable *name* from the user and both read (already solved) and write to said variable? I had a flash all of a sudden, minutes after asking for help, and I think I have a solution: ``` #!/bin/bash variablename=$1 echo "The value of $variablename is: " ${!variablename} echo "I will now try to change the value in...
[ 0.03076906129717827, 0.1846955120563507, 0.3119666278362274, -0.3995136618614197, 0.07770190387964249, 0.07486511021852493, 0.7029975056648254, -0.7272820472717285, -0.3690802752971649, -0.30004194378852844, 0.00697177741676569, 0.6015180349349976, -0.4995304048061371, 0.11429457366466522,...
How do I maintain the scroll position of the parent page when I open new window using window.open()? The parent page returns to the top of the page. Here is my current code: ``` <a href="#" onclick="javascript: window.open('myPage.aspx');"> Open New Window </a> ``` ``` <a href="#" onclick="window.open('myPage.asp...
[ -0.07178813219070435, 0.061304543167352676, 0.7586872577667236, -0.24518737196922302, 0.046051181852817535, -0.26150670647621155, 0.296319842338562, -0.3060905337333679, -0.009891150519251823, -0.8679448962211609, -0.2220650464296341, 0.6037604808807373, 0.08178859204053879, 0.220830157399...
I am taking in a string from user input, and splitting it on whitespace (using \w) into an array of strings. I then loop through the array, and append a part of the where clause like this: ``` query += " AND ( " + "field1 LIKE '%" + searchStrings[i] +"%' " + " OR field2 L...
[ 0.07654651999473572, 0.28681132197380066, 0.3379519581794739, -0.5245141386985779, 0.2296043485403061, 0.1775701940059662, 0.10715823620557785, -0.43333667516708374, 0.25698187947273254, -0.38096529245376587, -0.24060297012329102, 0.13249626755714417, -0.38428738713264465, 0.09862937033176...
+ searchStrings[i] +"%' " + " OR field3 LIKE '%" + searchStrings[i] +"%' " + ") "; ``` I feel like this is dangerous, since I am appending user input to my query. However, I know that there isn't any whitespace in any of the search strings, since I split the initial input on whitespa...
[ 0.145720437169075, 0.3280673325061798, 0.0880531519651413, -0.08698214590549469, -0.10311952978372574, -0.16073933243751526, 0.6509532928466797, -0.2358841449022293, -0.23738811910152435, -0.18086452782154083, -0.3824431598186493, 0.6153648495674133, -0.37123140692710876, -0.00351339834742...
drop anything, since there needs to be whitespace in there. In that example, it would not behave properly, but no damage would be done. Can anyone with more experience fighting SQL injections help me either fix this, or put my mind at ease? Thanks! **EDIT:** Wow, that is a lot of great input. Thank you everyone who...
[ 0.4440546929836273, -0.1776522397994995, -0.07970430701971054, 0.4869820773601532, -0.2558199167251587, -0.1984378695487976, 0.19599835574626923, -0.004191104788333178, -0.3088143467903137, -0.185245081782341, 0.05018671229481697, 0.4327263832092285, -0.20895837247371674, -0.24278186261653...
this you are vulnerable to SQL injection and it should be avoided like the plague! You should be very careful how you allow your searchStrings[] array to be populated. You should always append variable data to your query using parameter objects: ``` + field1 like @PropertyVal Or field2 like @PropertyVal Or field3 lik...
[ 0.23921991884708405, 0.04014591500163078, 0.27952608466148376, 0.10766075551509857, -0.147769495844841, -0.10106096416711807, 0.20176316797733307, -0.37334144115448, -0.4497881829738617, -0.44119933247566223, 0.13059063255786896, 0.5810338258743286, -0.5013760924339294, 0.05496583878993988...
students;-- And cited that because it needs white space, you couldn't do it - but if the malicious user encoded it using something like this: ``` Robert');Exec(Replace('Drop_Table_students','_',Char(32)));-- ``` I would say - better to be safe and do it the right way. There's no simple way to make sure you catch ev...
[ 0.3328542411327362, 0.25968503952026367, 0.11632956564426422, 0.1725800633430481, 0.5197338461875916, -0.13957251608371735, 0.1050497516989708, 0.13082239031791687, -0.4932003617286682, -0.38534680008888245, -0.5064902305603027, 0.194580078125, -0.05715128779411316, -0.2322394996881485, ...
Just started getting a bunch of errors on our C# .Net app that seemed to be happening for no reason. Things like System.IndexOutOfRangeException on a SqlDataReader object for an index that should be returned and has been returning for a while now. Anyways, I looked at the Task Manager and saw that sqlservr.exe was run...
[ -0.006368238013237715, 0.31153959035873413, 0.42722269892692566, 0.07985884696245193, -0.19632381200790405, -0.13944227993488312, 0.6125971078872681, 0.04579443857073784, -0.14430668950080872, -0.4996720254421234, 0.2224908322095871, 0.7347097992897034, -0.014751747250556946, 0.39483657479...
restart, everything went back to normal. Errors suddenly stopped occurring. **So does this large main memory usage eventually cause errors?** Additionally, I did a quick Google for [high memory usage mssql](http://www.google.com/search?q=high+memory+usage+mssql). I found that if left to default settings; SQL Server ca...
[ -0.09734394401311874, 0.05751562491059303, 0.35010194778442383, 0.30835965275764465, 0.25915834307670593, -0.10161840170621872, 0.24587811529636383, 0.39787039160728455, -0.5425485968589783, -0.4618545472621918, 0.01337932888418436, 0.44787323474884033, 0.08111481368541718, 0.1120734661817...
Windows itself, and can generally be relied on absolutely and completely. 1.5Gb is *nothing* for a rdbms - and and all of them will just keep filling up their available buffers with cached data. Reads in core are typically 1000x or more faster than disk access, so using every scrap of memory available to it is optimal...
[ 0.22997915744781494, 0.1935335248708725, 0.013640043325722218, 0.07720483839511871, -0.2249884158372879, -0.14061032235622406, 0.36340972781181335, 0.09544011205434799, -0.09254371374845505, -0.602497935295105, -0.2659144997596741, 0.3422035276889801, -0.25351324677467346, 0.12348708510398...
with 4Gb memory (assuming 32bit) with 90% dedicated to SQL Server, so you are certainly not looking at any sort of edge condition here. Your most likely problem by far is a coding error or structural issue (such as locking) I do have one caveat though. Very (very, very - like twice in 10 years) occasionally I have s...
[ 0.15341997146606445, 0.2257067859172821, 0.27884379029273987, 0.1872304230928421, 0.011277550831437111, -0.13935542106628418, 0.1845664530992508, 0.24493283033370972, -0.5406979918479919, -0.4634387791156769, 0.1407349556684494, 0.5709512829780579, -0.054726142436265945, 0.0544661954045295...
repairing the database, backing up and restoring to a new disk I was able to recover without falling back to backups. I am uncertain as to how a page tear error would feed through to the C# API, but conceivably if you have a disk error which only manifests itself after core is full (i.e. it's somewhere on some swap spa...
[ 0.257246732711792, 0.1402568370103836, 0.05547330528497696, 0.06727050989866257, -0.2239397019147873, 0.07965248078107834, 0.5830323696136475, -0.0040545836091041565, -0.15112383663654327, -0.47068214416503906, 0.07823915779590607, 0.7332859635353088, -0.08672047406435013, 0.10482363402843...
If I'm rendering a regular view in asp.net mvc the only domain object properties that show up in my page the ones I specifically write out. For example: ``` <div><%= Customer.FirstName %></div> ``` However, if I serialize a domain object for json it will include every property. Example: ``` public JsonResult Custom...
[ -0.003832452930510044, -0.14463374018669128, 0.537992537021637, -0.20582152903079987, -0.19504447281360626, -0.15039552748203278, 0.2001783847808838, -0.0010624316055327654, -0.2645873427391052, -0.8320288062095642, -0.28294113278388977, 0.4735524356365204, -0.38278600573539734, 0.25430500...
JsonCustomer? What would you recommend? I use anonymous types for this: ``` var customer = from c in serviceLayer.GetCustomers() where c.Id == id.Value select new { FirstName = c.FirstName }; ``` This is not just a good idea. Rather, it's protection against the exception that you will g...
[ 0.07331103831529617, -0.22120888531208038, 0.5592440962791443, -0.34263962507247925, -0.17868034541606903, -0.12233301997184753, -0.04628056660294533, 0.12805035710334778, -0.3282308876514435, -0.6183457374572754, -0.10094894468784332, 0.7294904589653015, -0.4146750569343567, 0.22742088139...
I have a SQL statement similar to this: ``` SELECT COUNT(*) AS foo, SUM(foo) AS foo_sum FROM bar ``` But MySQL doesn't allow this because foo is an alias. Does anyone have an idea of how this could be accomplished in SQL? No, you can't use an alias in the select-list or a WHERE clause. You can only use the alias in ...
[ 0.2931824326515198, 0.05023671314120293, 0.09636659920215607, -0.15061263740062714, -0.14805817604064941, -0.16054408252239227, 0.11785389482975006, -0.1315479874610901, -0.06431356817483902, -0.38307273387908936, -0.10475323349237442, 0.41330307722091675, -0.48835790157318115, 0.270290911...
The ISO C committee ([ISO/IEC JTC1/SC21/WG14](http://www.open-std.org/JTC1/SC22/WG14/)) has published [TR 24731-1](http://www.open-std.org/JTC1/SC22/WG14/www/projects#24731-1) and is working on [TR 24731-2](http://www.open-std.org/JTC1/SC22/WG14/www/projects#24731-1): > ### TR 24731-1: Extensions to the C Library Part...
[ -0.07311296463012695, 0.08806046843528748, 0.3202001750469208, 0.16891278326511383, -0.21718566119670868, -0.19657869637012482, -0.2215048223733902, -0.5053088665008545, -0.3712587058544159, -0.33221977949142456, -0.4644702076911926, 0.33899280428886414, -0.41124653816223145, 0.14567051827...
is working on a TR on safer C library functions. This TR is oriented towards new programs using dynamic allocation instead of an extra parameter for the buffer length. The latest draft is in document N1337. This is to become a Technical Report type 2. Questions --------- * Do you use a library or compiler with suppor...
[ 0.02517974004149437, -0.0995699018239975, 0.246230348944664, 0.32760536670684814, 0.19756868481636047, -0.17771443724632263, -0.09870336204767227, -0.29248085618019104, -0.22248806059360504, -0.43643710017204285, -0.1656733751296997, 0.5411894917488098, -0.19161224365234375, -0.04923588037...
Are you planning to use the library in the future? * Are you tracking the TR24731-2 work at all? I have been a vocal critic of these TRs since their inception (when it was a single TR) and would never use them in any of my software. They mask symptoms instead of addressing causes and it is my opinion that if anything t...
[ 0.5069301128387451, 0.05885961651802063, 0.04241184890270233, 0.3340005874633789, 0.35712918639183044, -0.2173568457365036, 0.1380699872970581, 0.18684828281402588, -0.320160835981369, -0.30592384934425354, 0.16120243072509766, 0.3156338930130005, -0.316936194896698, 0.2687658667564392, ...
aware of a single major proponent outside of the committee developing these TRs. I use glibc and as such know that I will be spared having to deal with this nonsense, as Ulrich Drepper, lead maintainer for glibc, [said about the topic](http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1106.txt): > The proposed safe(r)...
[ 0.2586517632007599, 0.3161582946777344, -0.35941076278686523, -0.04907761886715889, -0.3169310986995697, -0.15643121302127838, 0.13069987297058105, -0.1289990246295929, -0.06627853214740753, -0.41355764865875244, -0.37060651183128357, 0.4718121886253357, -0.2024518847465515, -0.10896545648...
detail problems with a number of the proposed functions and has elsewhere indicated that glibc would never support this. The Austin Group (responsible for maintaining POSIX) provided a very critical review of the TR, their comments and the committee responses available [here](http://www.open-std.org/JTC1/SC22/WG14/www...
[ 0.0220806784927845, 0.29456236958503723, 0.2698264420032501, -0.18347325921058655, 0.05341392010450363, 0.029481710866093636, 0.0574081651866436, 0.12311799079179764, -0.045673731714487076, -0.24180223047733307, -0.15266484022140503, 0.8100100159645081, -0.26391640305519104, 0.003966053947...
believe that the only reason the TR is still alive in any form is because it is being pushed hard by Microsoft who has recently proved very capable of getting things rammed though standards committees despite wide-spread opposition. If these functions are ever standardized I don't think they will ever become widely use...
[ 0.6520410180091858, 0.2928255796432495, 0.19572977721691132, 0.05715344473719597, -0.17118656635284424, -0.07363921403884888, 0.283023476600647, 0.4156384766101837, -0.08755511045455933, -0.045180369168519974, 0.108835868537426, 0.5398285388946533, 0.11680412292480469, 0.25916221737861633,...
I have from the backend a time on the format 00:12:54 and I display it to the screen. But, I would like to have this time to continue to go down. I have though to create a variable in javascript that will old the time and with `setTimeout` to loop to display with document.getElementById the new value. I think it can be...
[ 0.4900989234447479, 0.13223901391029358, 0.6071703433990479, 0.14710824191570282, 0.20700694620609283, -0.10695894062519073, 0.24911820888519287, -0.17846794426441193, -0.23339197039604187, -0.8355206847190857, 0.33538004755973816, 0.5625232458114624, 0.06660138815641403, 0.222670540213584...
if it does have a more secure way to do it. General algorithm: 1. Read time from server. 2. Read the current time. 3. Call a function. 4. In your function, read the current time, get the delta from the initial time you read in step 2. 5. Subtract the delta from the initial time you read from the server in step 1 and d...
[ 0.03091510199010372, -0.4198939800262451, 0.8062319159507751, -0.25023555755615234, 0.2862074673175812, 0.36779797077178955, 0.15018002688884735, -0.33795157074928284, -0.4390038847923279, -0.8224839568138123, -0.003971078898757696, 0.47135162353515625, -0.12461677938699722, 0.106555707752...
6000; // from server function tick() { var now = new Date().getTime(); var disp = start - now; if (disp < 0) { disp = 0; } var el = document.getElementById("countdown"); el.innerHTML =
[ 0.4503030776977539, -0.2593359649181366, 0.6135118007659912, -0.15347309410572052, 0.12736907601356506, 0.4432658553123474, 0.06222560629248619, -0.13154387474060059, -0.5198520421981812, -0.4056837260723114, 0.03173117712140083, 0.255498468875885, 0.17420285940170288, 0.5761299133300781, ...
// quick hack to format time /(\d\d:\d\d:\d\d) ...$/.exec(new Date(disp).toUTCString())[1]; if (disp > 1000) { var elapsed = new Date().getTime() - now; window.setTimeout(tick, 1000 - elapsed); } else { // stop countdown and set color to light grey
[ 0.16828501224517822, -0.2743585705757141, 0.6308751106262207, -0.27485400438308716, 0.547085165977478, 0.46362289786338806, 0.292633593082428, -0.019808702170848846, -0.17592129111289978, -0.6143403649330139, -0.11456769704818726, 0.591399610042572, -0.0571434460580349, 0.540592610836029, ...
el.style.color = "#ccc"; } } var start = new Date().getTime() + countdown_start_in_ms; tick(); } ```
[ 0.35507988929748535, -0.2565822899341583, 0.6932499408721924, -0.23133978247642517, 0.5409037470817566, -0.05676831305027008, -0.07863835990428925, 0.061294421553611755, -0.4272156059741974, -0.43899187445640564, -0.16234464943408966, 0.6675359010696411, -0.33149757981300354, 0.55278193950...