text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
Windows Vista icons](http://www.rw-designer.com/compile-vista-icon) | [
-0.16323041915893555,
0.1825021654367447,
0.47486740350723267,
-0.11020541191101074,
0.0666373074054718,
0.19373123347759247,
0.305309921503067,
-0.09410987049341202,
-0.6204555630683899,
-0.5912759900093079,
-0.040069758892059326,
0.6435443162918091,
-0.2152845561504364,
-0.00838594138622... | |
In the Google C++ Style Guide, there's a section on [Operator Overloading](http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml#Operator_Overloading) that has a curious statement:
> Overloading also has surprising
> ramifications. For instance, you can't
> forward declare classes that overload
> `operator... | [
-0.10480985045433044,
0.11538917571306229,
0.10383269190788269,
-0.1637950986623764,
-0.01654425449669361,
-0.3733142018318176,
0.4448296129703522,
0.03903050720691681,
-0.23569786548614502,
-0.3228979706764221,
-0.4410119950771332,
0.4219392240047455,
-0.6363941431045532,
0.12585546076297... | |
behavior is undefined (and no diagnostic is required)."
I didn't know this either, but as another poster has pointed out, it's easy to see how it could cause a compiler to generate incorrect code. | [
0.31457462906837463,
0.12188325077295303,
-0.1559983491897583,
0.2590661644935608,
-0.006057046819478273,
-0.2696487605571747,
0.6900544762611389,
0.02825624868273735,
-0.3339330852031708,
-0.3237832188606262,
0.30266398191452026,
0.25679469108581543,
-0.40301036834716797,
0.10273293405771... | |
If I have a datetime field, how do I get just records created later than a certain time, ignoring the date altogether?
It's a logging table, it tells when people are connecting and doing something in our application. I want to find out how often people are on later than 5pm.
(Sorry - it is SQL Server. But this could... | [
0.46113988757133484,
-0.03806274011731148,
0.48462292551994324,
-0.012857458554208279,
0.3666307032108307,
-0.3380592167377472,
0.005571300629526377,
0.1868886798620224,
-0.48165345191955566,
-0.5155545473098755,
0.0899665579199791,
0.18940378725528717,
-0.07172796875238419,
0.198937118053... | |
What is the easiest way to do this? Is it possible with managed code?
```
this.BackgroundImage = //Image
this.FormBorderStyle = FormBorderStyle.None;
this.Width = this.BackgroundImage.Width;
this.Height = this.BackgroundImage.Height;
this.TransparencyKey = Color.FromArgb(0, 255, 0); //Contrast Color
```
This allows y... | [
0.11369438469409943,
-0.12154452502727509,
0.2837590277194977,
-0.006092479918152094,
-0.27457237243652344,
0.04203034192323685,
0.1531209498643875,
-0.45679545402526855,
-0.02421569637954235,
-0.8649783730506897,
-0.036992140114307404,
0.596611499786377,
-0.31692424416542053,
-0.103098638... | |
I have a web service that uses Python's SimpleJSON to serialize JSON, and a javascript/ client that uses Google's Visualization [API](http://code.google.com/apis/visualization/documentation/reference.html). When I try to read in the JSON response using Google Data Table's Query method, I am getting a "invalid label" er... | [
0.2863113582134247,
0.15330027043819427,
0.23602768778800964,
0.08716059476137161,
-0.33357834815979004,
0.13296088576316833,
0.061984580010175705,
-0.23907911777496338,
-0.0339069589972496,
-0.5858092308044434,
0.01637951284646988,
0.5746820569038391,
-0.3855356276035309,
0.11691129207611... | |
that seems sloppy. The javascript JSON parsing libraries I've tried won't read in JSON syntax without quotes around the object keys.
Here's some good background reading re: quotes around object keys:
<http://simonwillison.net/2006/Oct/11/json/>.
Are you certain the Google API is expecting JSON? In my experience Goog... | [
0.10162771493196487,
0.0812402293086052,
0.10489275306463242,
-0.004975580144673586,
-0.2778257429599762,
-0.05232534557580948,
0.21198485791683197,
-0.16225773096084595,
-0.18852278590202332,
-0.2612299919128418,
-0.10759572684764862,
0.6107922792434692,
-0.047923289239406586,
-0.27587643... | |
In your spreadsheet, select the range of cells.
> 2. Select 'Insert' and then 'Gadget' from the menu.
> 3. Open the gadget's menu by clicking on the top-right selector.
> 4. Select menu option 'Get data source URL'.
I did this and opened the URL in my browser. The data it was returning was certainly not JSON:
```
goo... | [
-0.061235278844833374,
-0.05198623985052109,
0.6610445380210876,
0.05424518138170242,
0.20414046943187714,
-0.02877204678952694,
0.26795241236686707,
-0.1747371107339859,
-0.06551264226436615,
-0.7670266628265381,
-0.46608832478523254,
0.5013337731361389,
-0.40439364314079285,
-0.034037880... | |
I have 2 tables. Table1 has fields A, B, C, D and Table2 has fields A, B. Field A and B of both tables have same record type. I would like to grab the records from both tables of fields A and B as single result.
Is there any Query or Function in PHP+MySql?
Thanks...
I assume MySql does this:
select a,b from table1 w... | [
0.2111912965774536,
0.2037334442138672,
0.2718122899532318,
0.009057871997356415,
-0.14170417189598083,
0.16223472356796265,
-0.10799185931682587,
-0.2629857063293457,
-0.19600147008895874,
-0.6452872157096863,
0.2826206684112549,
0.2529812753200531,
-0.18884959816932678,
0.222732111811637... | |
Currently I am [borrowing `java.math.BigInteger` from the J# libraries as described here](http://msdn.microsoft.com/en-us/magazine/cc163696.aspx). Having never used a library for working with large integers before, this seems slow, on the order of 10 times slower, even for `ulong` length numbers. Does anyone have any b... | [
0.0035820479970425367,
0.12238767743110657,
0.290097177028656,
0.03219543769955635,
-0.33958983421325684,
0.0657724142074585,
0.12973667681217194,
-0.17120788991451263,
-0.34805217385292053,
-0.6710293889045715,
0.09901214390993118,
0.23741531372070312,
-0.13517388701438904,
0.419270545244... | |
all the
> basic operations on integers like
> addition, multiplication, comparing,
> bitwise shifting etc. | [
-0.09755264222621918,
0.0297522135078907,
-0.011184300296008587,
0.1969996988773346,
0.002154572866857052,
-0.21298132836818695,
-0.13300716876983643,
-0.2168554663658142,
0.04647119715809822,
-0.6302564740180969,
-0.10541719943284988,
0.447053998708725,
-0.44901400804519653,
-0.0539603643... | |
So, I have an autocomplete dropdown with a list of townships. Initially I just had the 20 or so that we had in the database... but recently, we have noticed that some of our data lies in other counties... even other states. So, the answer to that was buy one of those databases with all towns in the US (yes, I know, geo... | [
0.37702715396881104,
-0.0631718710064888,
0.5279104113578796,
0.4617289900779724,
0.061383940279483795,
0.21991068124771118,
0.2416982203722,
0.3746815323829651,
-0.5542043447494507,
-0.6908397674560547,
0.2301277071237564,
-0.04655573517084122,
-0.15407656133174896,
0.26196834444999695,
... | |
easy.
As I type I am thinking that the best way to do this is default to this state, then there will be much less. I will add a state selector to the page that defaults to NJ then you can pick another state if need be, this will narrow down the list to < 1000. Though, I may have the same issue? Does anyone know of a ... | [
0.1240115761756897,
-0.22522662580013275,
0.1186010017991066,
0.10962742567062378,
0.038060467690229416,
-0.039217472076416016,
0.6248061060905457,
0.2151726484298706,
-0.17116637527942657,
-1.0247238874435425,
0.027441522106528282,
0.5906352400779724,
0.015934083610773087,
-0.139085009694... | |
or more...?
Also, can you just return the top 10 rows, or something? | [
0.10198657959699631,
0.1002529114484787,
0.2479856163263321,
0.3021286129951477,
0.12216687947511673,
0.25832703709602356,
-0.03886452317237854,
0.42099782824516296,
-0.2877538502216339,
-0.44263938069343567,
0.2684592306613922,
0.42987120151519775,
-0.09843537956476212,
-0.224567562341690... | |
I have a VB6 project in Visual Source Safe 6.0. When I open the project I want to Check Out (Get) all the files in the project so that I can edit them.
I have the VSS Options (within VB6) set to act on the Project recursively, but when I check out the project.vbp it only checks out the project file, not all the module... | [
0.5890825986862183,
-0.03813430294394493,
0.32389035820961,
-0.17872518301010132,
-0.0832657739520073,
-0.11261848360300064,
0.4361187219619751,
-0.11642030626535416,
-0.2853661775588989,
-0.8438882827758789,
-0.1846451759338379,
0.5599087476730347,
-0.3727046251296997,
0.17545229196548462... | |
get a checkbox for each and a button for Select All).
**Why I had problems**
For some reason, if you *right-click* on the Project in the Project tree and choose Check Out it doesn't give you that dialog. It just checks out the Project file. (However, if you do the same thing and Check In, it gives you the dialog with... | [
0.5158634185791016,
-0.06781812012195587,
0.3574182093143463,
0.1644372195005417,
0.05001221224665642,
-0.11048557609319687,
0.43151089549064636,
0.09060381352901459,
-0.37238502502441406,
-0.6720407009124756,
0.13115279376506805,
0.3536711037158966,
-0.1733674257993698,
0.1205016747117042... | |
I have an ASP.NET linkbutton control on my form. I would like to use it for javascript on the client side and prevent it from posting back to the server. (I'd like to use the linkbutton control so I can skin it and disable it in some cases, so a straight up tag is not preferred).
How do I prevent it from posting back ... | [
-0.04276426509022713,
-0.12507133185863495,
0.5552056431770325,
-0.18898339569568634,
-0.008536631241440773,
-0.10476972162723541,
0.3991377651691437,
-0.029535070061683655,
-0.10829469561576843,
-0.9177997708320618,
-0.29321685433387756,
0.5170750021934509,
-0.4951149523258209,
0.12142517... | |
}
}
```
What renders as HTML is:
```
<a onclick="return false;" id="someID" href="javascript:__doPostBack('someID','')">clicky</a>
```
In this case, what happens is the onclick functionality becomes your validator. If it is false, the "href" link is not executed; however, if it is true the href will get executed. ... | [
-0.1811484843492508,
0.2270091474056244,
0.40714031457901,
-0.2664341330528259,
-0.01176851149648428,
-0.2230702042579651,
0.4607313573360443,
0.013113707304000854,
0.10546442866325378,
-0.5964967012405396,
-0.3857928216457367,
0.47542691230773926,
-0.3266855478286743,
0.14292140305042267,... | |
For decades, in the field of computing (except disk manufacturers), a KB (kilobyte) was understood to mean 1024 bytes. In the past few years, there has been a movement to use KiB ("kibibyte") to mean 1024 bytes, and *change the meaning of kilobyte to be 1000 bytes*, dooming us to many more years of confusion. On the ot... | [
0.20378056168556213,
0.16175051033496857,
-0.01981346495449543,
0.16108450293540955,
-0.2310786098241806,
0.30936822295188904,
0.16732682287693024,
0.3087572157382965,
-0.553634762763977,
-0.47409701347351074,
-0.23270006477832794,
-0.03935066610574722,
-0.3230065405368805,
0.4943466782569... | |
How to add offline access functionality to [MoinMoin wiki](http://moinmo.in)?
As a minimum, I would love to have browsing access to all pages on a server-based wiki (while being offline). Search and other things, which do not modify the content, are secondary. An added bonus would be if this solution allowed to update... | [
0.1659138798713684,
-0.04108816757798195,
0.5493014454841614,
0.4800339341163635,
0.048961177468299866,
-0.4003448486328125,
0.2743997871875763,
0.1660912185907364,
-0.24069690704345703,
-0.7207071781158447,
0.0023605318274348974,
0.712108850479126,
0.10699471086263657,
0.17805533111095428... | |
it easier to port wiki content from one location to another, but I don't know if that can play any role in answering this question.
Note: if you see a good reply please rate it up. i'd love to do that, but the site does not let me do ratings yet.
*By using Gears with the Firefox Greasemonkey plugin, you can inject Gea... | [
0.9366235733032227,
0.24816782772541046,
0.13091272115707397,
-0.026912609115242958,
0.05475006625056267,
-0.20183904469013214,
0.23054344952106476,
0.14852042496204376,
-0.2017994225025177,
-0.7356935739517212,
0.14761433005332947,
0.7226004004478455,
-0.2893454432487488,
-0.1918677389621... | |
In the early days of C++ when it was bolted on top of C, you could not use NULL as it was defined as `(void*)0`. You could not assign NULL to any pointer other than `void*`, which made it kind of useless. Back in those days, it was accepted that you used `0` (zero) for null pointers.
To this day, I have continued to u... | [
0.2116025984287262,
0.3266594707965851,
-0.35618457198143005,
0.1221994087100029,
-0.397154837846756,
-0.32305389642715454,
0.15926198661327362,
0.15176552534103394,
-0.25780221819877625,
0.0896923765540123,
0.08882400393486023,
0.43035364151000977,
-0.4004257619380951,
0.29531043767929077... | |
test pointers as truth values:
```
if (p && !q)
do_something();
```
then using zero makes more sense (as in if you use `NULL`, you cannot logically use `p && !q` - you need to explicitly compare against `NULL`, unless you assume `NULL` is zero, in which case why use `NULL`).
Is there any objective reason to prefe... | [
0.32164859771728516,
0.16794511675834656,
-0.2439962923526764,
0.21056585013866425,
-0.3472200930118561,
-0.1566164791584015,
0.37363705039024353,
-0.2814960777759552,
0.12541227042675018,
-0.3408748209476471,
0.017016924917697906,
0.46667489409446716,
-0.14486974477767944,
-0.150045558810... | |
In C++, the definition of `NULL` is 0, so there is only an aesthetic difference. I prefer to avoid macros, so I use 0. Another problem with `NULL` is that people sometimes mistakenly believe that it is different from 0 and/or not an integer. In pre-standard code, `NULL` was/is sometimes defined to something unsuitable ... | [
0.4932597577571869,
0.17719772458076477,
-0.1664283275604248,
-0.49424099922180176,
-0.3079160451889038,
-0.19566918909549713,
0.2176634669303894,
0.1835860311985016,
-0.19485574960708618,
-0.3820999264717102,
-0.13011309504508972,
0.4994133412837982,
-0.43265557289123535,
-0.1883507966995... | |
First, two examples:
```
// This works
int foo = 43;
long lFoo = foo;
// This doesn't
object foo = (int)43;
long? nullFoo = foo as long?; // returns null
long lFoo = (long)foo; // throws InvalidCastException
if (foo.GetType() == typeof(int))
Console.WriteLine("But foo is an int..."); // This gets written out
```... | [
0.03855125233530998,
0.01348799280822277,
0.16053245961666107,
-0.2944476008415222,
0.07339544594287872,
-0.054989658296108246,
0.29605433344841003,
-0.5046221613883972,
0.05834050476551056,
-0.46417197585105896,
0.048540305346250534,
0.6037032008171082,
-0.5717054605484009,
-0.03246646001... | |
implement checks for each basic numeric type (byte, int, long, ubyte, ...) I'd rather just catch them in the largest numeric type and deal with it that way. Thoughts from all the smart people here? How can I unbox the object, preferably avoiding reflection, but I suppose if that's the only way... Or should I just not i... | [
0.5363258719444275,
0.22436773777008057,
0.11566711217164993,
-0.10526689141988754,
0.2286474108695984,
-0.076812244951725,
0.583712100982666,
-0.4141075313091278,
-0.027333803474903107,
-0.47971367835998535,
-0.036438412964344025,
0.5810866951942444,
-0.7880610227584839,
-0.03706462308764... | |
This should be a really really simple thing, but for some reason it is just eluding me.
I want a Sharepoint page which will have a drop down list that is tied to a database lookup table.
When an item is selected and they click a GO button, I want it to update a gridview that is also on the page.
I'm looking for a s... | [
0.32603442668914795,
-0.18797872960567474,
0.2743397355079651,
0.2639724910259247,
0.0806819349527359,
-0.30095550417900085,
0.05314962565898895,
0.09742717444896698,
-0.16515512764453888,
-0.867409348487854,
0.026550812646746635,
0.45825323462486267,
-0.47881436347961426,
0.04250119999051... | |
list. This used to be called a master - detail relationship.
For example, my regular data has school name, application name, and how long the application was running. Because there could be a hundred applications per school and there are 60+ schools, I only want to show one schools information at a time.
So, I want t... | [
0.8437007665634155,
-0.11694362014532089,
0.17648576200008392,
0.3869033753871918,
0.1739596724510193,
0.1360512226819992,
0.13167791068553925,
0.14872145652770996,
-0.5445353984832764,
-0.6067756414413452,
0.026746131479740143,
-0.11544983834028244,
0.04876719042658806,
0.1795125901699066... | |
dataview of another sharepoint List.
The instructions are here:
<http://blogs.msdn.com/sharepointdesigner/archive/2007/03/05/asp-net-controls-filter-the-data-view.aspx> | [
0.35490453243255615,
-0.600562572479248,
0.6391487717628479,
0.011666822247207165,
-0.07832355797290802,
-0.3939671516418457,
0.30485936999320984,
-0.2753160297870636,
-0.28178906440734863,
-0.7364971041679382,
-0.21861284971237183,
0.6431825757026672,
-0.40179792046546936,
-0.243301421403... | |
In particular, I am interested in:
1) Getting up a *free* environment setup to do workflows.
2) How to use existing workflow items/states and what is involved in that.
Thanks!
Are you looking for a virtual lab like this one from [MSDN](http://blogs.msdn.com/pandrew/archive/2007/04/16/new-msdn-virtual-lab-for-windows-w... | [
0.3139719069004059,
-0.015539687126874924,
-0.17531833052635193,
0.5213420987129211,
0.17398996651172638,
-0.29578521847724915,
-0.006429958622902632,
0.09337728470563889,
-0.3076775074005127,
-0.7823697328567505,
-0.11645811051130295,
0.24342063069343567,
0.22985567152500153,
0.1676711887... | |
Is it possible to set an iPhone Xcode project to skip the 'CompressResources' build step?
Specifically, I want to skip the stage where it runs pngcrush on all of my .png files, many of which don't survive the experience in a form which my app can read.
**Edit:** the version of pngcrush used creates png files which co... | [
0.3838193416595459,
-0.028493160381913185,
0.1585061401128769,
-0.04118979349732399,
-0.12604640424251556,
0.027604088187217712,
0.35896825790405273,
0.200454443693161,
-0.1659756749868393,
-0.6205402612686157,
-0.10887377709150314,
0.549606442451477,
-0.4820510745048523,
-0.30548250675201... | |
value of transparent pixels, so alpha-ed textures show fringing at smaller mip levels.
The iphone png format is described here: <https://web.archive.org/web/20110519164905/http://modmyi.com/wiki/index.php/Iphone_PNG_images>. In short,
* Skip the CgBI chunk
* Skip the zlib headers
* Swap BGR to RGB channel order
**Ed... | [
0.11918476969003677,
-0.13868626952171326,
0.12559793889522552,
-0.1531953066587448,
-0.05355024337768555,
0.3739767074584961,
0.1331060528755188,
-0.20053201913833618,
-0.5062476992607117,
-0.4582800567150116,
-0.33436882495880127,
0.48077768087387085,
-0.5235232710838318,
-0.585205018520... | |
I'm not talking about a post build event for a project. Rather, I want to run an executable automatically after the entire solution is built. Is there a way to do a post build event for the solution?
Visual Studio 2010 and before
-----------------------------
You can do this in the Macro Editor by handling OnBuildDone... | [
0.1915910840034485,
-0.10278064012527466,
0.2691485285758972,
-0.18581587076187134,
-0.2553873062133789,
-0.12430378049612045,
0.33773866295814514,
-0.3016805350780487,
-0.31179389357566833,
-0.607522189617157,
-0.32292312383651733,
0.5142225623130798,
-0.22611355781555176,
-0.106154136359... | |
If scope = vsBuildScope.vsBuildScopeSolution Then
System.Diagnostics.Process.Start("some file I want to run")
End If
End Sub
```
Visual Studio 2012
------------------
The solution above won't work in Visual Studio 2012 because Microsoft has removed macros in that version. However, you can still do essent... | [
0.25929418206214905,
-0.12805959582328796,
0.5686959624290466,
-0.14385977387428284,
0.16529865562915802,
-0.12630219757556915,
0.3931998908519745,
-0.1094755306839943,
-0.30540210008621216,
-0.5075669884681702,
-0.08428207039833069,
0.7639548182487488,
-0.4515098035335541,
-0.007537661585... | |
Sometime I see many application such as msn, windows media player etc that are single instance applications (when user executes while application is running a new application instance will not created).
In C#, I use `Mutex` class for this but I don't know how to do this in Java.
If I believe this [article](http://www.... | [
0.27596649527549744,
0.18362967669963837,
0.15328821539878845,
-0.07732771337032318,
-0.17714112997055054,
-0.41932106018066406,
0.29968973994255066,
0.0326884500682354,
-0.24661356210708618,
-0.756889283657074,
-0.06346046179533005,
0.5305548310279846,
-0.3225743770599365,
0.3187901079654... | |
application is already running. The new instance must notify the existing instance that a launch was attempted, then exit. The existing instance takes over after receiving the notification and fires an event to the listener that handles the action.
Note: [Ahe](https://stackoverflow.com/users/4427/ahe) mentions in the ... | [
-0.21323038637638092,
-0.0026414706371724606,
0.47284135222435,
-0.06775642931461334,
-0.09758598357439041,
-0.23722806572914124,
0.5909696221351624,
-0.38323378562927246,
-0.2952671945095062,
-0.4755898714065552,
-0.40735605359077454,
0.494005024433136,
-0.522571861743927,
0.1323246955871... | |
which reports than Expected results of `getLocalHost`: return IP address of machine, vs. Actual results : return `127.0.0.1`.
> it is surprising to have `getLocalHost` return `127.0.0.1` on Linux but not on windows.
---
Or you may use [`ManagementFactory`](http://web.archive.org/web/20090529082521/http://www.trap17.... | [
-0.12895700335502625,
-0.07296624034643173,
0.7004662156105042,
0.1394076645374298,
-0.04691488295793533,
0.004209568258374929,
0.06760485470294952,
-0.26804259419441223,
-0.3195991814136505,
-0.43768635392189026,
-0.317558228969574,
0.60297691822052,
-0.26533588767051697,
-0.0118158524855... | |
search JVM for another process with the same name, if we found it and the application PID is different, it means that is the second application instance.
JNLP offers also a [`SingleInstanceListener`](http://forums.sun.com/thread.jspa?messageID=9509621) | [
0.1342107653617859,
-0.25332576036453247,
0.3479485809803009,
0.013212891295552254,
-0.34586384892463684,
-0.1728704422712326,
0.23216699063777924,
-0.008116078563034534,
-0.7063207030296326,
-0.45580634474754333,
-0.13192488253116608,
0.11208894848823547,
-0.33782070875167847,
0.140106081... | |
What is the easiest way of finding out what version of the iPhone SDK is installed on my OS X?
When you log into the Apple's iPhone Developer Center, you can see the build number of the current available version of the SDK, but you have to remember if you have already downloaded that version or not.
What is the easi... | [
0.150221049785614,
0.21043021976947784,
0.2502898573875427,
0.1261315792798996,
0.22451569139957428,
-0.085411436855793,
0.30585819482803345,
0.2183718979358673,
-0.40880852937698364,
-0.63926762342453,
-0.023512335494160652,
0.7187532186508179,
-0.059810563921928406,
-0.2546592652797699,
... | |
Info... > Software > Developer
>
>
> Once there, you'll see version and build numbers for all of the major components of the Developer Tools. The top level version and build number corresponds to the name of the disk image you downloaded from Apple.
>
>
> This works in Snow Leopard, but apparently not in Leopard. I... | [
0.21773956716060638,
0.02560296095907688,
0.15248419344425201,
0.02038048952817917,
0.1465451419353485,
-0.11379124224185944,
0.3667789399623871,
0.031039975583553314,
-0.23479531705379486,
-0.531521737575531,
-0.2645469009876251,
0.6626784205436707,
-0.11644256860017776,
-0.31190693378448... | |
Do you know any implementation / technique which would provide similar behavior as Viewstate provides in ASP.NET. (Serializing the data into hidden field within the HTML form).
I am using only JSP, Servlet, and Spring MVC.
I think the [Stripes](http://www.stripesframework.org/) framework provides that. | [
0.6829251050949097,
-0.3568941056728363,
0.04917990788817406,
0.11846010386943817,
0.11869382113218307,
-0.3281891644001007,
-0.1359933316707611,
-0.009955570101737976,
-0.43759238719940186,
-0.7798231244087219,
0.13039682805538177,
0.33265477418899536,
-0.1922072023153305,
-0.243559762835... | |
I have a table that looks something like this:
```
word big expensive smart fast
dog 9 -10 -20 4
professor 2 4 40 -7
ferrari 7 50 0 | [
0.2595166563987732,
0.3483514189720154,
0.33746546506881714,
0.25036710500717163,
0.27143192291259766,
0.1992724984884262,
-0.31723660230636597,
0.5691894888877869,
-0.06439012289047241,
-0.40352946519851685,
0.336203396320343,
0.8142159581184387,
0.04153992608189583,
-0.06827688962221146,... | |
48
alaska 10 0 1 0
gnat -3 0 0 0
```
The + and - values are associated with the word, so professor is smart and dog is not smart. Alaska is big, as a proportion of the total value associated with its entries, and the opposite is | [
0.12266416102647781,
0.3926519751548767,
-0.011807034723460674,
0.3964669704437256,
0.16941331326961517,
0.12066046893596649,
0.1767379492521286,
-0.02413370832800865,
0.11692994832992554,
-0.09743431955575943,
-0.3552570343017578,
-0.2037474364042282,
-0.10746569186449051,
0.2646741271018... | |
true of gnat.
Is there a good way to get the absolute value of the number farthest from zero, and some token whether absolute value =/= value? Relatedly, how might I calculate whether the results for a given value are proportionately large with respect to the other values? I would write something to format the output ... | [
0.04076295346021652,
-0.06878422945737839,
-0.010854491963982582,
0.14271864295005798,
-0.0060868230648338795,
0.11392907053232193,
0.018212590366601944,
0.2200382500886917,
0.10736466199159622,
-0.21061024069786072,
-0.08963135629892349,
0.9126733541488647,
-0.5227237343788147,
-0.3233802... | |
if there is any python solution with normal dbapi modules or a more abstract module, any help appreciated.
abs value fartherest from zero:
```
select max(abs(mycol)) from mytbl
```
will be zero if the value is negative:
```
select n+abs(mycol)
from zzz
where abs(mycol)=(select max(abs(mycol)) from mytbl);
``` | [
-0.11838161945343018,
-0.287451833486557,
0.4135527014732361,
-0.3197765052318573,
0.2476908564567566,
-0.019568532705307007,
-0.09546782821416855,
0.10610060393810272,
-0.14695748686790466,
-0.34946370124816895,
-0.437354177236557,
0.5454273223876953,
-0.44823315739631653,
-0.263704538345... | |
I've been experimenting with [Adobe Flex](http://www.adobe.com/products/flex/) recently. Being a long-time server-side web app developer, I'm faced with difficulties that I last experienced when I dabbled in Java Swing development a long time ago. It mainly revolves around the **flow of control between my code and the ... | [
0.32700130343437195,
-0.04696737229824066,
0.40708380937576294,
-0.10157248377799988,
-0.31802278757095337,
-0.03643534332513809,
-0.07150404155254364,
-0.2258705496788025,
-0.607769787311554,
-0.43754830956459045,
-0.044108450412750244,
0.5459394454956055,
0.047849465161561966,
-0.2725614... | |
two models I'm seeing in the market right now:
* Blended UI. The server is still involved in the UI construction effort, but a lot of it is offloaded to javascript. This is how a lot of the javascript toolkits work (except dojo, extjs, ...).
* Separated concerns. The server is treated as a data storage and synchroniza... | [
0.4183156490325928,
-0.42365995049476624,
0.5841158628463745,
0.00042461519478820264,
-0.31816866993904114,
-0.14403793215751648,
0.08734212815761566,
-0.017861535772681236,
-0.4152164161205292,
-1.0385768413543701,
-0.0033432412892580032,
0.6761536002159119,
-0.38103678822517395,
-0.15790... | |
the architecture. I've been toying with ExtJS and Flex, and the development experience is a lot like building a desktop app, only without the fancy drag-and-drop IDE's. It's hard to think of large differences between a three-tier desktop app and a web app in this fashion.
So my advice would be: stop thinking you're bu... | [
0.33630314469337463,
0.22592131793498993,
0.10966794192790985,
0.3892245590686798,
0.15188175439834595,
0.2938515543937683,
0.2599541246891022,
-0.15845273435115814,
-0.2954401671886444,
-0.7301669120788574,
0.09421754628419876,
0.7361871004104614,
0.06726066023111343,
-0.05420825630426407... | |
Is there a way to generate a hash of a string so that the hash itself would be of specific length? I've got a function that generates 41-byte hashes (SHA-1), but I need it to be 33-bytes max (because of certain hardware limitations). If I truncate the 41-byte hash to 33, I'd probably (certainly!) lost the uniqueness.
... | [
0.0014813593588769436,
0.2680087387561798,
0.1899362951517105,
0.1370972841978073,
-0.2899165749549866,
0.0713443011045456,
0.2685393989086151,
-0.09137004613876343,
-0.5258551836013794,
-0.319832444190979,
0.03853053227066994,
0.35641342401504517,
0.007504634093493223,
0.02488454058766365... | |
my purpose. The uniqueness is an important issue, but I don't expect the number of those hashes to be very large at any given time - these hashes represent software servers on a home LAN, so at max there would be 5, maybe 10 running.
The way hashes are calculated that's unfortunately not possible. To limit the hash len... | [
0.4121851623058319,
0.14064504206180573,
0.27791836857795715,
-0.10278593003749847,
-0.07956825941801071,
0.04076526314020157,
0.4235178828239441,
-0.05416674539446831,
-0.39862462878227234,
-0.5518766641616821,
-0.12308574467897415,
0.33030328154563904,
-0.11901435256004333,
0.22744299471... | |
md5 is 16 bytes, sha1 20 bytes and sha256 is 32 bytes, however as hexstrings, they all double in size. If you can store bytes, you can even use sha256. | [
-0.16508907079696655,
0.0035517853684723377,
0.33520957827568054,
-0.14327146112918854,
-0.3726292848587036,
0.11314509809017181,
-0.038040127605199814,
-0.4352951943874359,
-0.5527186989784241,
-0.48900842666625977,
0.16333819925785065,
0.01611807569861412,
0.0035547777079045773,
0.339903... | |
```
const static int foo = 42;
```
I saw this in some code here on StackOverflow and I couldn't figure out what it does. Then I saw some confused answers on other forums. My best guess is that it's used in C to hide the constant `foo` from other modules. Is this correct? If so, why would anyone use it in a C++ contex... | [
0.10388211905956268,
0.22649723291397095,
0.22631043195724487,
-0.45009952783584595,
-0.112961046397686,
-0.2216193974018097,
0.23518526554107666,
0.024444226175546646,
-0.2894957661628723,
0.0978493019938469,
-0.21375693380832672,
0.6508026719093323,
-0.6831268668174744,
0.092814229428768... | |
not let anybody modify it. This variable is either put in the data or bss segment depending on the architecture, and might be in memory marked read-only.
All that is how C treats these variables (or how C++ treats namespace variables). In C++, a member marked `static` is shared by all instances of a given class. Wheth... | [
0.5717093348503113,
-0.10896147787570953,
-0.023336034268140793,
-0.019629061222076416,
-0.14450599253177643,
-0.4414176046848297,
0.41861528158187866,
0.17361630499362946,
-0.5410492420196533,
-0.38529711961746216,
-0.29570984840393066,
0.3367847800254822,
-0.8377231359481812,
0.416925281... | |
own version (optimizer notwithstanding). | [
0.06719213724136353,
-0.276454359292984,
0.6163708567619324,
-0.0561378076672554,
0.007518420461565256,
-0.06038665398955345,
0.08122287690639496,
-0.23123401403427124,
0.12731584906578064,
-0.5195786952972412,
-0.4177394211292267,
0.4617328643798828,
-0.13098479807376862,
-0.4245131909847... | |
I have a sort of tree structure that represent a hierarchy of layers in a map, divided by types of layers and categories. Each node can be a different class for different types of layers (but all nodes implement a common interface).
I need to convert that class to an ASP.NET TreeView control. Each node in the input tr... | [
0.1563165783882141,
-0.10692638903856277,
0.20557080209255219,
0.13884025812149048,
0.0007425585063174367,
0.013844715431332588,
0.08684588223695755,
-0.057022303342819214,
-0.07991381734609604,
-0.8117752075195312,
0.06192338466644287,
0.5436071157455444,
-0.24066980183124542,
0.289294302... | |
currently 4 types of concrete node classes, 2 of them are composite (contain child-nodes) and 2 of them are leaves. This might change in the future.
It feels like there is a design pattern here itching to be used, can you help me find what it is?
A [Visitor](http://en.wikipedia.org/wiki/Visitor_pattern) perhaps, to wa... | [
-0.2340366691350937,
-0.12328100204467773,
0.25381338596343994,
0.31147301197052,
0.016319163143634796,
0.08038763701915741,
0.34981751441955566,
0.11830288171768188,
-0.3775266706943512,
-0.7032961249351501,
-0.07833845913410187,
-0.4467414617538452,
-0.18161678314208984,
0.53651106357574... | |
I'm looking into building a content site with possibly thousands of different entries, accessible by index and by search.
What are the measures I can take to prevent **malicious crawlers** from ripping off all the data from my site? I'm less worried about SEO, although I wouldn't want to block legitimate crawlers all ... | [
0.5877547860145569,
0.11968255043029785,
0.16182097792625427,
0.3042747974395752,
0.011103808879852295,
-0.17294037342071533,
0.34125760197639465,
0.4012124240398407,
-0.4333268404006958,
-0.6713160872459412,
-0.15080216526985168,
0.3186611831188202,
-0.1531042903661728,
0.3741630911827087... | |
this, by definition, **must** be the case (how else will speaking browsers be able to deliver your content if it isn't machine readable).
Your best bet is to look into watermarking your content, so that at least if it does get ripped you can point to the watermarks and claim ownership. | [
0.4547591805458069,
-0.016137007623910904,
-0.013175221160054207,
0.30757826566696167,
-0.07847864180803299,
-0.3584754467010498,
0.4412018656730652,
0.36974677443504333,
-0.309431791305542,
-0.4413629472255707,
-0.4357353448867798,
0.3479059338569641,
0.26274481415748596,
0.21690377593040... | |
I am wondering if there are any alternatives to using the Expand key word when performing an LINQ to ADO.net Data Services query. The expand method does get me the data I am interested in, but it requires me to know all of the sub-objects that I am going to be working with in advance. My absolute preference would be th... | [
0.0833042785525322,
0.046623121947050095,
0.4690692722797394,
0.08075988292694092,
0.2611496150493622,
-0.388943076133728,
0.05606306716799736,
0.049699816852808,
-0.16362011432647705,
-0.7570865154266357,
-0.21575649082660675,
0.5430522561073303,
-0.12079416960477829,
0.11154394596815109,... | |
I do an update of the data service reference).
Does anyone have any suggestions/best practices/alternatives for this situation? Thanks.
===== Example Code using Member that has a MailingAddress =====
Works:
```
var me = (from m in ctx.Member.Expand("MailingAddress")
where m.MemberID == 10000
se... | [
0.024480773136019707,
-0.06680819392204285,
0.5381501317024231,
-0.19583718478679657,
-0.0028903447091579437,
0.09242235869169235,
0.4193001985549927,
-0.38546067476272583,
-0.2790643274784088,
-0.8986114263534546,
-0.3130057752132416,
0.43314072489738464,
-0.22849531471729279,
0.396426528... | |
at least (note: something similar to this, with MailingAddressReference, works on the server side if I do so as LINQ to Entities in a Service Operation)
```
var me = (from m in ctx.Member
where m.MemberID == 10000
select m).First();
if (!(me.MailingAddress.IsLoaded())) me.MailingAddress.Load()
Mess... | [
-0.12238232046365738,
-0.25093868374824524,
0.6998922228813171,
-0.14948034286499023,
-0.06627906858921051,
0.13245819509029388,
0.27092376351356506,
-0.5836342573165894,
-0.2852611243724823,
-0.719517707824707,
-0.38185542821884155,
0.46225354075431824,
-0.1275000125169754,
0.111410401761... | |
where m.MemberID == 10000
select m).First();
MessageBox.Show(me.MailingAddress.Street);
```
Lazy Loading
------------
Accomplished by calling .LoadProperty on the context and passing it the variable and the property that should be lazy loaded.
```
var me = (from m in ctx.Member
... | [
-0.19828572869300842,
-0.04460492730140686,
0.624159574508667,
-0.47676339745521545,
0.19915731251239777,
0.22516696155071259,
0.4356071650981903,
-0.4058784544467926,
-0.1265813410282135,
-0.6394432783126831,
-0.6637937426567078,
0.5372437238693237,
-0.39578860998153687,
0.284838855266571... | |
Is there a simple way to prevent browser from downloading and displaying images, best would be via some magic style tag or javasctipe.
The thing is, I'd like to tweak the company's website a bit to be more usable via mobile devices. The company is a gaming one, there's like 5MBs of images on it's main page (and those ... | [
0.5120253562927246,
0.24878039956092834,
0.3417375385761261,
0.1990300714969635,
-0.1755288541316986,
-0.1676621288061142,
0.3137168288230896,
0.4918688237667084,
-0.3667129576206207,
-0.3099488615989685,
0.25475484132766724,
0.510369598865509,
-0.24275116622447968,
0.22547414898872375,
... | |
be written from scratch, but it's not in my gesture to do it now) :)
I was thinking about two solutions:
1) If there was some kind of style-tag (or maybe a javascript? the one that would work on mobile browsers tho) that would prevent browser from downloading images and force to display alt-parameter instead I could ... | [
0.5821548104286194,
-0.02034875750541687,
0.29954642057418823,
0.18558450043201447,
-0.35021916031837463,
0.05367782711982727,
0.17392288148403168,
-0.1846296787261963,
0.04839998111128807,
-0.8305051922798157,
0.0005760946660302579,
0.5104291439056396,
-0.21614649891853333,
-0.48641532659... | |
tho - I'd like to allow the user to view images if he actually wants to.
It seems that first solution would be best - what you guys think? And is there a javascript way to do it?
I could try building document DOM, then get all `<img>` elements, and replace their `src` with some placeholder even but will that work on... | [
0.2179895043373108,
-0.15866968035697937,
0.46010103821754456,
0.2779063880443573,
0.08223643898963928,
-0.23567992448806763,
-0.14543746411800385,
0.06070394441485405,
-0.3118364214897156,
-0.4589517116546631,
0.161369189620018,
1.0268363952636719,
-0.1209523007273674,
-0.0027825750876218... | |
be honest).
You can use htaccess to redirect image requests made from mobile browser users. I haven't tested this but it should work:
```
RewriteCond %{HTTP_USER_AGENT} (nokia¦symbian¦iphone¦blackberry) [NC]
RewriteCond %{REQUEST_URI} !^/images/$
RewriteRule (.*) /blank.jpg [L]
```
This code redirects all requests ... | [
0.26190561056137085,
-0.02950529009103775,
0.6019656658172607,
0.17598845064640045,
-0.25314435362815857,
-0.06278492510318756,
0.38674890995025635,
-0.07292524725198746,
0.033559855073690414,
-0.7793137431144714,
-0.1095694825053215,
0.7615308165550232,
-0.10566334426403046,
-0.0280499588... | |
Every time I need to do something *N* times inside an algorithm using C# I write this code
```
for (int i = 0; i < N; i++)
{
...
}
```
Studying Ruby I have learned about method *times()* which can be used with the same semantics like this
```
N.times do
...
end
```
Code fragment in C# looks more complex a... | [
0.23924396932125092,
0.02326604537665844,
0.04367790371179581,
-0.09639529138803482,
-0.09327162057161331,
-0.17786774039268494,
0.5322445631027222,
-0.2627262473106384,
-0.22480225563049316,
-0.8145601153373718,
-0.02109745889902115,
0.46387970447540283,
-0.4058224558830261,
0.19045071303... | |
Times(this int times)
{
for (int i = 0; i < times; i++)
yield return true;
}
}
...
foreach (var i in 5.Times())
{
...
}
```
Is it possible using some new C# 3.0 language features to make *N* times cycle more elegant?
A slightly briefer version of [cvk's answer](https://stackoverflow.... | [
0.6269199848175049,
0.05513164773583412,
0.46733805537223816,
-0.2156585156917572,
0.26573389768600464,
0.3456375300884247,
0.20436027646064758,
-0.5119525194168091,
-0.42914602160453796,
-0.6784933805465698,
0.03846318647265434,
0.5609939098358154,
-0.4637148976325989,
0.1789947897195816,... | |
< count; i++)
{
action();
}
}
public static void Times(this int count, Action<int> action)
{
for (int i=0; i < count; i++)
{
action(i);
}
}
}
```
Use:
```
5.Times(() => Console.WriteLine("Hi"));
5.Times(i | [
0.30616360902786255,
-0.05323106050491333,
0.4581841826438904,
-0.45150986313819885,
0.26214972138404846,
0.1399555653333664,
0.2712418735027313,
-0.7742632031440735,
-0.25759774446487427,
-0.5846473574638367,
-0.27756989002227783,
0.582272469997406,
-0.38700851798057556,
0.182128041982650... | |
=> Console.WriteLine("Index: {0}", i));
``` | [
-0.12652793526649475,
0.20496012270450592,
0.5261939764022827,
-0.27971550822257996,
0.41007035970687866,
-0.025756752118468285,
0.32622072100639343,
-0.1943737417459488,
0.44218114018440247,
-0.5300425291061401,
-0.2865046560764313,
0.49936625361442566,
-0.20900090038776398,
0.29079794883... | |
I have an app written in C# that lies on a network share. When I run it from a local drive, everything works fine. When I start it from the remote share, calls like
```
try
{
System.Reflection.Assembly.GetExecutingAssembly();
System.IO.Directory.GetCurrentDirectory();
}
```
throw a SecurityException 'Request... | [
0.2723292410373688,
0.3672078847885132,
0.4088193476200104,
0.013800086453557014,
0.24572421610355377,
0.20801490545272827,
0.4301646649837494,
-0.04575514793395996,
-0.052854105830192566,
-0.7902945280075073,
-0.3097824454307556,
0.6905736327171326,
-0.20506156980991364,
0.168255597352981... | |
latest SP (3.5SP1?) if you have *mapped* the share (i.e. as F:) it is trusted; otherwise you will need to either:
a: apply a [caspol](http://msdn.microsoft.com/en-us/library/cb6t8dtz(VS.80).aspx) change to all clients (yeuck)
b: use [ClickOnce](http://msdn.microsoft.com/en-us/library/t71a733d(VS.80).aspx) to deploy t... | [
0.2572638690471649,
-0.06956692039966583,
1.0575255155563354,
0.00483457837253809,
0.029315413907170296,
-0.47693079710006714,
0.2434392273426056,
-0.3401457667350769,
-0.4874201714992523,
-0.5902150869369507,
-0.3383423686027527,
0.4742969870567322,
-0.24125134944915771,
-0.23105120658874... | |
As good developers we keep our code as standard compliant as possible to help in porting between platforms. But what tools are available that help us build the code in a uniform way across multiple platforms.
\*nix family has `make` but Windows needs `nmake`.
I have read about [SCons](http://www.scons.org) but never ... | [
0.27555859088897705,
0.14367800951004028,
-0.000016564797988394275,
0.2073775678873062,
-0.15626342594623566,
-0.32669883966445923,
0.1569669097661972,
-0.0036843062844127417,
-0.4282691180706024,
-0.8834385871887207,
-0.018002768978476524,
0.4559757113456726,
-0.188725084066391,
0.0566759... | |
I had a little discussion with a friend about the usage of collections in return/input values of a method. He told me that we have to use
- the most derived type for return values.
- the least derived type for input parameters.
So, it means that, for example, a method has to get a ReadOnlyCollection as parameter, and ... | [
-0.0343468151986599,
0.15013320744037628,
-0.03960433974862099,
0.34031200408935547,
-0.1720794439315796,
0.02963993325829506,
0.07839292287826538,
-0.2116144597530365,
-0.13603714108467102,
-0.2536308467388153,
-0.1110805869102478,
0.4755052626132965,
-0.3549371063709259,
0.37368714809417... | |
Collection, ReadOnlyCollection, ...
Is it right ?
Regarding input parameters, it's generally more flexible to use the least specific type. For example, if all your method is going to do is enumerate the items in a collection passed as an argument, it's more flexible to accept IEnumerable<T>.
For example, consider a m... | [
0.1344490796327591,
-0.20019613206386566,
0.4157947599887848,
0.09879220277070999,
-0.1484447717666626,
0.2265019565820694,
-0.07616269588470459,
-0.3530693054199219,
-0.34824734926223755,
-0.4006309509277344,
-0.3100229501724243,
0.49795329570770264,
-0.47344115376472473,
0.28282931447029... | |
IEnumerable<Customer> GetCustomersByCountryCode(IEnumerable<Customer> customers, int countryCode)
{
foreach(Customer c in customers)
{
if (c.CountryCode == countryCode) yield return c;
}
}
...
ProcessCustomers(GetCustomersByCountryCode(myCustomers, myCountryCode);
...
```
In general MS guideline... | [
-0.012672968208789825,
0.006553717888891697,
0.6352231502532959,
-0.29379189014434814,
0.04445444792509079,
-0.20369014143943787,
0.4321765899658203,
-0.22837422788143158,
-0.26250341534614563,
-0.4590512812137604,
-0.45922693610191345,
0.5311797857284546,
-0.30094966292381287,
0.056574285... | |
I have a strongly-typed MVC View Control which is responsible for the UI where users can create and edit Client items. I'd like them to be able to define the `ClientId` on creation, but not edit, and this to be reflected in the UI.
To this end, I have the following line:
```
<%= Html.TextBox("Client.ClientId", ViewDa... | [
0.082125723361969,
0.2585848569869995,
0.8154173493385315,
-0.4477967619895935,
-0.11632205545902252,
-0.06720580905675888,
0.08976051211357117,
-0.17165493965148926,
-0.17349085211753845,
-0.8697898983955383,
-0.10006048530340195,
0.6465497016906738,
-0.33383241295814514,
0.25911390781402... | |
the input read-only, which is annoyingly counter-intuitive. Is there a nice, ternary-operator-based way to drop the attribute completely if it is not required?
Tough problem... However, if you want to define only the `readonly` attribute, you can do it like this:
```
<%= Html.TextBox("Client.ClientId", ViewData.Model.... | [
-0.029477475211024284,
-0.07496318966150284,
0.38868939876556396,
0.07682459056377411,
-0.21672582626342773,
0.011612714268267155,
0.1704452782869339,
0.07527345418930054,
-0.22842244803905487,
-0.693438708782196,
-0.11772320419549942,
0.8942882418632507,
-0.39921626448631287,
0.1081706807... | |
> 0
? (object)new { @readonly = "readonly", @class = "myCSS" }
: (object)new { @class = "myCSS" }
``` | [
0.03898056596517563,
0.08698806166648865,
0.43741047382354736,
-0.16469551622867584,
0.16421106457710266,
-0.14568893611431122,
0.2704581916332245,
-0.18091188371181488,
-0.0744820162653923,
-0.6316424608230591,
-0.347524493932724,
0.5273118615150452,
-0.16967973113059998,
0.18587632477283... | |
I'm migrating a TSQL stored procedure to PL/SQL and have encountered a problem - the lack of a CONTINUE keyword in Oracle 10g.
I've read that Oracle 11g has this as a new feature, but upgrading is not an option unfortunately.
Is there any alternative to CONTINUE in 10g? I don't believe it's practical to restructure t... | [
0.30481114983558655,
-0.08844608068466187,
0.30322474241256714,
0.020586920902132988,
0.06510060280561447,
-0.11116905510425568,
0.4430760145187378,
0.08303036540746689,
-0.24303752183914185,
-0.24684679508209229,
0.009001161903142929,
0.6040500998497009,
-0.19384759664535522,
-0.178955540... | |
labels](http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14261/controlstructures.htm#BCGFGDAA).
```
DECLARE
done BOOLEAN;
BEGIN
FOR i IN 1..50 LOOP
IF done THEN
GOTO end_loop;
END IF;
<<end_loop>> -- not allowed unless an executable statement follows
NULL; -- add NULL stateme... | [
0.3338881731033325,
-0.023117832839488983,
0.12415918707847595,
0.028769899159669876,
0.12350935488939285,
-0.24423164129257202,
0.451140820980072,
-0.5446986556053162,
-0.3227154612541199,
-0.12052430957555771,
-0.19297854602336884,
0.5563018918037415,
-0.3632950186729431,
0.3436558246612... | |
Is there guide out there that will help me, A .Net developer whose been using Visual studio for some time, get to grips with Eclipse?
Even just a quick guide to eclipse.
Has anyone else made the transition, and if so how did you cope. Any Tips?
Not sure if it will help you, but Eric Sink ran a nice four part series s... | [
0.23273858428001404,
-0.03382056951522827,
0.19177305698394775,
0.010528065264225006,
-0.5736268758773804,
-0.33866220712661743,
-0.033068589866161346,
-0.1012415885925293,
-0.24377213418483734,
-0.49256432056427,
0.11265585571527481,
0.4684697985649109,
-0.05379670485854149,
-0.3962880671... | |
Trying to perform a single boolean NOT operation, it appears that under MS SQL Server 2005, the following block does not work
```
DECLARE @MyBoolean bit;
SET @MyBoolean = 0;
SET @MyBoolean = NOT @MyBoolean;
SELECT @MyBoolean;
```
Instead, I am getting more successful with
```
DECLARE @MyBoolean bit;
SET @MyBoolean ... | [
-0.10390050709247589,
0.13065461814403534,
0.16547279059886932,
-0.09521184861660004,
-0.09708001464605331,
-0.30730557441711426,
0.4942346513271332,
0.18859988451004028,
-0.1766442507505417,
-0.17211703956127167,
-0.19325169920921326,
0.3324221968650818,
-0.4719567596912384,
0.13903224468... | |
I'm reading the book "The Software Architect's Profession" by Marc and Laura Sewell ([Amazon link](https://rads.stackoverflow.com/amzn/click/com/0130607967)) and it got me wondering whether a software architect is a part of the old non-agile BDUF approach.
Is there a place for software architects in an agile approach?... | [
0.5295782089233398,
0.5323063731193542,
-0.298114538192749,
-0.061680566519498825,
0.1919160634279251,
0.05850090831518173,
0.2636427581310272,
0.13675019145011902,
-0.29131269454956055,
-0.36642012000083923,
-0.011215963400900364,
1.0642926692962646,
0.5211072564125061,
-0.065648280084133... | |
managing your project, one of the key ideas is developing a short iteration cycle, prioritizing the backlog of tasks to accomplish, determining what is going to be in iteration A, B, C, etc. There is where an architect can really be valuable. Having someone with a clear idea of how X, Y and Z all will fit together can ... | [
0.2861233353614807,
-0.06827490031719208,
-0.22470901906490326,
0.3971613347530365,
-0.0005665363860316575,
0.18421640992164612,
0.3981515169143677,
0.0959339439868927,
-0.36976751685142517,
-0.8479099273681641,
0.365466445684433,
0.4052503705024719,
0.24479271471500397,
-0.034507963806390... | |
I have a lot of classes in the App\_Code directory could this be a problem? Would it build faster if it was in a separate library?
Any other tips?
There's a decent article [here](http://weblogs.asp.net/bradleyb/archive/2005/12/06/432441.aspx). Items listed there are:
* Do not disable batch compilation
* Leverage Serv... | [
0.19187645614147186,
0.2448546141386032,
0.1135699525475502,
0.0388118140399456,
0.027806654572486877,
0.07889291644096375,
0.5033679604530334,
-0.2671976089477539,
-0.3272879421710968,
-0.623940646648407,
0.027467483654618263,
0.6009853482246399,
-0.2712743580341339,
-0.015658652409911156... | |
One of our unit tests is to populate properties within our business objects with random data.
These properties are of different intrinsic types and therefore we would like to use the power of generics to return data of the type you pass in. Something along the lines of:
```
public static T GetData<T>()
```
How woul... | [
0.1128329411149025,
-0.21966540813446045,
0.3221476972103119,
0.3398653268814087,
-0.21809421479701996,
-0.039359308779239655,
0.0000865754482219927,
-0.1145552471280098,
-0.1631595343351364,
-0.6164011359214783,
0.045194581151008606,
0.4846753776073456,
-0.46594879031181335,
0.41705799102... | |
obviously makes the use of generics a nice semplification on the user's end, but it adds no value to the way you write the class. You could use a switch clause or a dictionary (like Jon Skeet suggests):
```
switch(typeof(T))
{
case System.Int32:
Random r = new Random();
return (T)r.Next();
case... | [
0.15595859289169312,
-0.41751429438591003,
0.0737227201461792,
0.009369113482534885,
-0.17343182861804962,
-0.17615532875061035,
0.06278207153081894,
-0.20150581002235413,
-0.26590707898139954,
-0.6142841577529907,
0.057526908814907074,
0.5814974904060364,
-0.5859771966934204,
0.4335113167... | |
Let's say I have to implement a piece of T-SQL code that must return a table as result. I can implement a table-valued function or else a stored procedure that returns a set of rows. What should I use?
In short, what I want to know is:
**Which are the main differences between functions and stored procedures?** What ... | [
0.24393394589424133,
0.2390458583831787,
0.16032607853412628,
0.0840410590171814,
-0.10876153409481049,
0.19542235136032104,
-0.12707465887069702,
-0.17516764998435974,
-0.25710394978523254,
-0.5049301385879517,
0.14464478194713593,
0.4474734663963318,
-0.26990190148353577,
-0.048882167786... | |
a single SELECT statement.
Generally, there's a hierarchy (View < TV Function < Stored Proc). You can do more in each one, but the ability to compose the outputs, and for the optimizer to get really involved decreases as the functionality increases.
So use whichever one minimally allows you to express your desired re... | [
0.3639911115169525,
-0.341271311044693,
0.28668782114982605,
0.12281951308250427,
-0.24250774085521698,
0.15875446796417236,
-0.2707354426383972,
-0.15351851284503937,
-0.20934000611305237,
-0.49880659580230713,
-0.33094263076782227,
0.5561835169792175,
-0.4034239947795868,
0.0113618103787... | |
Originally I thought to ask if there would be an easy way to provide an automatically managed last update field with MS Access.
After some googling I found following approach:
```
Private Sub Form_Dirty(Cancel As Integer)
Me.Last_Update = Date()
End Sub
```
Which seems to do the job. I thought I'd share it wit... | [
0.18609167635440826,
-0.15108880400657654,
0.5382359027862549,
0.021846240386366844,
0.07542778551578522,
-0.12381548434495926,
0.03309302777051926,
-0.08426179736852646,
-0.3516378104686737,
-0.28552329540252686,
-0.013863806612789631,
0.6163707375526428,
-0.15475602447986603,
0.481844872... | |
record just before it gets committed to the database.
The latter may be preferable if you have a user who starts editing a record, goes to a meeting and then finishes editing it an hour later. | [
0.5998228788375854,
0.06563770771026611,
-0.01201483141630888,
0.40074124932289124,
0.36031579971313477,
-0.43806764483451843,
-0.19790680706501007,
0.0301646888256073,
-0.549368143081665,
-0.4146294891834259,
-0.12510384619235992,
0.3479768633842468,
0.06708017736673355,
0.179541423916816... | |
I have an application in C# (2.0 running on XP embedded) that is communicating with a 'watchdog' that is implemented as a Windows Service. When the device boots, this service typically takes some time to start. I'd like to check, from my code, if the service is running. How can I accomplish this?
I guess something like... | [
0.4323787987232208,
0.07935154438018799,
0.6838488578796387,
-0.09912852197885513,
0.32180309295654297,
-0.20602189004421234,
0.45655784010887146,
0.10086383670568466,
-0.10922441631555557,
-0.6848019957542419,
-0.27308738231658936,
0.5908212661743164,
-0.2624278962612152,
0.23104785382747... | |
return "Stopped";
case ServiceControllerStatus.Paused:
return "Paused";
case ServiceControllerStatus.StopPending:
return "Stopping";
case ServiceControllerStatus.StartPending:
return "Starting";
default:
return "Status Changing";
}
```
Edit: There is also a method `sc.W... | [
-0.1253708451986313,
-0.28862687945365906,
0.918857991695404,
-0.12811928987503052,
0.3741541802883148,
0.030236881226301193,
0.38858190178871155,
0.2651109993457794,
-0.5245292782783508,
-0.6697884202003479,
-0.6368346214294434,
0.505917489528656,
-0.13268046081066132,
0.39493250846862793... | |
object in .NET. | [
-0.18481692671775818,
-0.11656288802623749,
-0.14146992564201355,
0.09026391059160233,
-0.2502898871898651,
-0.37128105759620667,
0.06827820092439651,
0.1584361046552658,
-0.2523864805698395,
-0.775902509689331,
-0.24940311908721924,
0.23637989163398743,
-0.5916056036949158,
0.305318295955... | |
I am designing a class for log entries of my mail server. I have parsed the log entries and created the class hierarchy. Now I need to save the in memory representation to the disk. I need to save it to multiple destinations like mysql and disk files. I am at a loss to find out the proper way to design the persistence ... | [
-0.02894791215658188,
0.2622683644294739,
0.33838650584220886,
-0.06397854536771774,
-0.18737544119358063,
0.215158611536026,
0.42559218406677246,
-0.1518188863992691,
-0.29455241560935974,
-0.921483039855957,
0.08892042934894562,
0.5136030912399292,
-0.34955650568008423,
0.484035819768905... | |
ugly
2. "Correct" method name to call each
persistance mechanism: eg:
Object.save\_mysql, Object.save\_file,
or Object.save (mysql) and
Object.save(file)
I am sure there is some pattern to solve this particular problem. I am using ruby as my language, with out any rails, ie pure ruby code. Any clue is much welcome.
r... | [
0.06573314219713211,
0.40844306349754333,
0.18638600409030914,
-0.1603253036737442,
-0.4250308573246002,
0.014042921364307404,
0.5506305694580078,
0.14524699747562408,
-0.013824665918946266,
-0.6590774059295654,
0.12000591307878494,
0.5785871744155884,
-0.6659594178199768,
0.24901930987834... | |
type, to be called on save.
```
class Object
cattr_accessor :store
def save
@@store.save(self)
end
end
class MySQLObjectStore
def initialize(connection_string)
# Connect to DB etc...
end
def save(obj)
# Write to database
end
end
store = MySQLObjectStore.new("user:password@localhost/databa... | [
-0.15391163527965546,
0.12350992858409882,
0.49905410408973694,
-0.3150133788585663,
0.054386746138334274,
0.01864834502339363,
0.5258438587188721,
-0.1369352638721466,
-0.08857066929340363,
-0.7370733618736267,
-0.19837018847465515,
0.47276338934898376,
-0.42705103754997253,
0.58289670944... | |
I am developing an application using MVC Preview 5. I have used typed views.
After setting debug="false", I have found that I am receiving errors of the form:
> "The model item passed into the
> dictionary is of type
> 'blah.Models.UserAdmin.IndexData' but
> this dictionary requires a model item
> of type
> 'bla... | [
0.12385401874780655,
0.14102664589881897,
0.319476842880249,
-0.32205793261528015,
-0.1693156659603119,
0.15737710893154144,
0.30575743317604065,
-0.28469550609588623,
-0.1397329866886139,
-0.5852410197257996,
0.052752505987882614,
0.7129836678504944,
-0.34530115127563477,
0.32279995083808... | |
is successful, the second always results in this error.
For example, I have a UserAdminController and an OrganisationAdminController.
* Both have an ‘Index’ action.
* Both use a view called ‘Index.aspx’ (each contained in the controller’s view folder; Views/UserAdmin/Index.aspx and Views/OrganisationAdmin.Index.aspx... | [
0.037722621113061905,
-0.333852618932724,
1.0485429763793945,
0.09889459609985352,
0.27972355484962463,
-0.05767238140106201,
0.15719488263130188,
-0.20212358236312866,
-0.458327978849411,
-0.8076986074447632,
-0.05936165526509285,
0.5360138416290283,
-0.22469176352024078,
0.15633396804332... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.