text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
telling Windows to treat the click exactly the same as if it had occured on the caption of the form.
```
private const int WM_NCHITTEST = 0x84;
private const int HTCLIENT = 0x1;
private const int HTCAPTION = 0x2;
protected override void WndProc(ref Message m)
{
switch(m.Msg)
{
case WM_NCHITTEST... | [
0.135253444314003,
-0.350541353225708,
0.7770045399665833,
-0.17961622774600983,
0.6093990206718445,
-0.10344535112380981,
0.6656094193458557,
-0.22791504859924316,
-0.027933616191148758,
-0.3483145236968994,
-0.46797311305999756,
0.984045147895813,
-0.4404297173023224,
0.13203957676887512... | |
return;
}
base.WndProc(ref m);
}
``` | [
-0.03329098969697952,
0.09393537044525146,
0.09096121042966843,
-0.5688803195953369,
0.3846650719642639,
-0.22679200768470764,
0.4255436062812805,
-0.1415543407201767,
-0.033188071101903915,
-0.4160183370113373,
-0.4833669662475586,
0.9456834197044373,
-0.2637496888637543,
0.21452473104000... | |
I am trying to set a `javascript` `date` so that it can be submitted via `JSON` to a `.NET` type, but when attempting to do this, `jQuery` sets the `date` to a full `string`, what format does it have to be in to be converted to a `.NET` type?
```
var regDate = student.RegistrationDate.getMonth() + "/" + student.Regist... | [
0.6156983971595764,
0.15909002721309662,
0.5555825233459473,
-0.11421152204275131,
0.04392777383327484,
-0.3471291959285736,
0.1804533302783966,
-0.29034021496772766,
0.13130702078342438,
-0.499757319688797,
-0.17586158215999603,
0.1652851402759552,
-0.1430625468492508,
0.5079397559165955,... | |
KB Article 320687](http://support.microsoft.com/kb/320687 "KB Article 320687") has a detailed answer to this question.
Basically, you override the WndProc method to return HTCAPTION to the WM\_NCHITTEST message when the point being tested is in the client area of the form -- which is, in effect, telling Windows to tre... | [
0.12408561259508133,
0.03427235409617424,
0.5920249819755554,
-0.058901794254779816,
0.36503130197525024,
-0.2784472107887268,
0.36289480328559875,
-0.43963757157325745,
-0.23227691650390625,
-0.3068888783454895,
-0.48810192942619324,
0.5623255372047424,
-0.3341100513935089,
0.218929126858... | |
case WM_NCHITTEST:
base.WndProc(ref m);
if ((int)m.Result == HTCLIENT)
m.Result = (IntPtr)HTCAPTION;
return;
}
base.WndProc(ref m);
}
``` | [
-0.003343892050907016,
-0.2164921909570694,
0.4648093581199646,
-0.2979732155799866,
0.4626629054546356,
-0.13176262378692627,
0.5351558923721313,
-0.48859402537345886,
-0.0519724041223526,
-0.1843043714761734,
-0.6081607341766357,
0.8319867253303528,
-0.23610790073871613,
0.21836803853511... | |
Is the ZIP compression that is built into Windows XP/Vista/2003/2008 able to be scripted at all? What executable would I have to call from a BAT/CMD file? or is it possible to do it with VBScript?
I realize that this is possible using [WinZip](http://en.wikipedia.org/wiki/WinZip), [7-Zip](http://en.wikipedia.org/wiki/... | [
0.32164907455444336,
-0.14172105491161346,
0.11075376719236374,
-0.021213363856077194,
-0.335166335105896,
0.16504672169685364,
0.2793020009994507,
-0.03841625526547432,
-0.21827314794063568,
-0.40739238262176514,
-0.11644987016916275,
0.7128502726554871,
-0.32823723554611206,
-0.251543849... | |
your choice.
The basic principle is that within windows you can treat a zip file as a directory, and copy into and out of it. So to create a new zip file, you simply make a file with the extension `.zip` that has the right header for an empty zip file. Then you close it, and tell windows you want to copy files into it... | [
0.38711684942245483,
0.029352987185120583,
0.4581221342086792,
0.013092310167849064,
0.2998547852039337,
-0.143013134598732,
0.058883510529994965,
-0.16258008778095245,
-0.3483164608478546,
-0.7234275341033936,
-0.4660159647464752,
0.32957565784454346,
-0.48110830783843994,
0.3381342291831... | |
keepITcool Dec-12-2005
If Len(Dir(sPath)) > 0 Then Kill sPath
Open sPath For Output As #1
Print #1, Chr$(80) & Chr$(75) & Chr$(5) & Chr$(6) & String(18, 0)
Close #1
End Sub
Function bIsBookOpen(ByRef szBookName As String) As Boolean
' Rob Bovey
On Error Resume Next
bIsBookOpen = Not (Applicatio... | [
0.24387484788894653,
-0.1340552717447281,
0.6444023251533508,
-0.4155176877975464,
-0.07647422701120377,
-0.08110738545656204,
0.8532701730728149,
-0.26271653175354004,
0.06956284493207932,
-0.009459244087338448,
-0.19467571377754211,
0.6600446701049805,
-0.715387225151062,
0.0643177255988... | |
Application.Substitute(sStr, sdelim, """,""") & """}")
End Function
Sub Zip_File_Or_Files()
Dim strDate As String, DefPath As String, sFName As String
Dim oApp As Object, iCtr As Long, I As Integer
Dim FName, vArr, FileNameZip
DefPath = Application.DefaultFilePath
If Right(DefPath, 1) <> "\" Then
... | [
-0.036579594016075134,
-0.2909957468509674,
0.9802515506744385,
-0.22826354205608368,
0.10918539762496948,
0.26778748631477356,
0.1200811043381691,
-0.34424877166748047,
-0.2188989520072937,
-0.8070145845413208,
-0.5297284126281738,
0.6111475229263306,
-0.6567197442054749,
0.04551935940980... | |
'Browse to the file(s), use the Ctrl key to select more files
FName = Application.GetOpenFilename(filefilter:="Excel Files (*.xl*), *.xl*", _
MultiSelect:=True, Title:="Select the files you want to zip")
If IsArray(FName) = False Then
'do nothing
Else
'Create empty Zip Fi... | [
0.38282591104507446,
-0.24150508642196655,
0.6180881857872009,
0.11433540284633636,
0.2768206298351288,
-0.16904869675636292,
0.47586789727211,
-0.15492786467075348,
-0.14403897523880005,
-0.6400307416915894,
-0.573367178440094,
0.646547257900238,
-0.672214150428772,
0.18121500313282013,
... | |
Set oApp = CreateObject("Shell.Application")
I = 0
For iCtr = LBound(FName) To UBound(FName)
vArr = Split97(FName(iCtr), "\")
sFName = vArr(UBound(vArr))
If bIsBookOpen(sFName) Then
MsgBox "You can't zip a file that is open!" & vbLf & _ | [
0.2711677849292755,
-0.20244960486888885,
0.6797655820846558,
-0.1694822758436203,
0.12101799249649048,
0.0601484552025795,
0.26118287444114685,
-0.4268184006214142,
-0.20027709007263184,
-0.3868546485900879,
-0.5597855448722839,
0.40151605010032654,
-0.5634927749633789,
-0.261402904987335... | |
"Please close it and try again: " & FName(iCtr)
Else
'Copy the file to the compressed folder
I = I + 1
oApp.Namespace(FileNameZip).CopyHere FName(iCtr) | [
0.0022200688254088163,
0.22010205686092377,
0.7653989791870117,
-0.024507790803909302,
0.5503105521202087,
0.11497097462415695,
0.19608457386493683,
0.06621744483709335,
-0.3000109791755676,
-0.739194393157959,
-0.7065548896789551,
0.37478598952293396,
-0.3190724849700928,
0.24527223408222... | |
'Keep script waiting until Compressing is done
On Error Resume Next
Do Until oApp.Namespace(FileNameZip).items.Count = I
Application.Wait (Now + TimeValue("0:00:01"))
Loop | [
0.453076034784317,
-0.07370415329933167,
0.8990916013717651,
-0.29796892404556274,
0.16641005873680115,
0.05890641361474991,
0.6423331499099731,
-0.15188951790332794,
-0.3338260352611542,
-0.47156184911727905,
-0.3753015398979187,
0.5613180994987488,
-0.1546298861503601,
0.2824291884899139... | |
On Error GoTo 0
End If
Next iCtr
MsgBox "You find the zipfile here: " & FileNameZip
End If
End Sub
```
UNZIP
=====
```
Sub Unzip1()
Dim FSO As Object
Dim oApp As Object
Dim Fname As Variant
Dim FileNameFolder As Variant
Dim DefPath As String | [
-0.09651317447423935,
-0.23502707481384277,
0.5876106023788452,
-0.16919812560081482,
-0.07115493714809418,
0.01106586679816246,
0.5170459151268005,
-0.1293085217475891,
-0.4253937602043152,
-0.28294989466667175,
-0.5507381558418274,
0.42135220766067505,
-0.5947477221488953,
0.063797749578... | |
Dim strDate As String
Fname = Application.GetOpenFilename(filefilter:="Zip Files (*.zip), *.zip", _
MultiSelect:=False)
If Fname = False Then
'Do nothing
Else
'Root folder for the new folder.
'You can also | [
0.49810606241226196,
-0.36403968930244446,
0.9200897216796875,
-0.20668236911296844,
0.13527637720108032,
-0.09591974318027496,
0.5100186467170715,
-0.2700740694999695,
-0.32648739218711853,
-0.29342928528785706,
-0.2838464379310608,
0.5948402285575867,
-0.624570906162262,
0.13417124748229... | |
use DefPath = "C:\Users\Ron\test\"
DefPath = Application.DefaultFilePath
If Right(DefPath, 1) <> "\" Then
DefPath = DefPath & "\"
End If
'Create the folder name
strDate = Format(Now, " dd-mm-yy h-mm-ss")
FileNameFolder = DefPath & "MyUnzipFolder " & strDate &... | [
0.0935857743024826,
-0.18137171864509583,
0.6104854345321655,
-0.12569738924503326,
0.10313553363084793,
-0.01965055614709854,
0.43120190501213074,
-0.3235588073730469,
-0.30420491099357605,
-0.7878044247627258,
-0.23694390058517456,
0.6897761225700378,
-0.4784943163394928,
0.0576873347163... | |
'Make the normal folder in DefPath
MkDir FileNameFolder
'Extract the files into the newly created folder
Set oApp = CreateObject("Shell.Application")
oApp.Namespace(FileNameFolder).CopyHere oApp.Namespace(Fname).items
'If you want to extract only one file you can use this:
... | [
0.2579766511917114,
-0.2708030641078949,
0.3850405812263489,
-0.027101274579763412,
0.021619632840156555,
0.13786731660366058,
0.2857084274291992,
-0.2951614260673523,
-0.1552869975566864,
-0.5950090885162354,
-0.17105934023857117,
0.5737318396568298,
-0.4290560185909271,
-0.13030248880386... | |
" & FileNameFolder
On Error Resume Next
Set FSO = CreateObject("scripting.filesystemobject")
FSO.deletefolder Environ("Temp") & "\Temporary Directory*", True
End If
End Sub
``` | [
0.08071883767843246,
0.03182334080338478,
0.6465693116188049,
-0.2507895827293396,
0.40585872530937195,
0.052995383739471436,
0.42053869366645813,
-0.2925161123275757,
-0.05546006187796593,
-0.6377828121185303,
-0.335281640291214,
0.7012321949005127,
-0.17882446944713593,
-0.00161875109188... | |
I have an images folder with a png in it. I would like to set a MenuItem's icon to that png. How do I write this in procedural code?
```
menutItem.Icon = new System.Windows.Controls.Image
{
Source = new BitmapImage(new Uri("images/sample.png", UriKind.Relative))
};
``` | [
0.03387179970741272,
-0.04691682383418083,
0.5432618856430054,
-0.015838496387004852,
-0.046803317964076996,
0.28533703088760376,
0.1268550008535385,
-0.18409627676010132,
-0.27018681168556213,
-0.7959635853767395,
0.0751577839255333,
0.6738234162330627,
-0.44286632537841797,
0.05273608118... | |
Is there an online resource somewhere that maintains statistics on the install-base of Java including JRE version information? If not, is there any recent report that has some numbers?
I'm particularly interested in Windows users, but all other OS's are welcome too.
The source code seemed to be geared for an executabl... | [
0.4607008397579193,
-0.04246655851602554,
-0.13949181139469147,
0.14351294934749603,
-0.19197943806648254,
-0.2096984088420868,
0.17033402621746063,
0.3602208197116852,
-0.35573363304138184,
-0.47252386808395386,
0.18110352754592896,
0.6274455189704895,
-0.04393240809440613,
-0.06174385920... | |
try Google.
Once you have tesseract-ocr code in a DLL file, you can then import the file into your C# project via Visual Studio and have it create wrapper classes and do all the marshaling stuffs for you. If you can't import then [DllImport](http://www.codeproject.com/KB/cs/c__and_api.aspx) will let you call the funct... | [
0.35778123140335083,
-0.16081029176712036,
0.13281506299972534,
0.20150403678417206,
-0.1330147683620453,
0.03960084170103073,
0.09906331449747086,
0.047446753829717636,
-0.2201022505760193,
-0.6898548007011414,
0.07418081164360046,
0.7581562995910645,
-0.4784579873085022,
-0.1788398176431... | |
Header, footer and sidebars have fixed position. In the center a content area with both scroll bars. No outer scroll bars on the browser. I have a layout that works in IE7 and FF. I need to add IE6 support. How can I make this work?
Here is an approximation of my current CSS.
```html
<!DOCTYPE html PUBLIC "-//W3C... | [
0.33688315749168396,
0.053822387009859085,
0.6024627685546875,
0.08685756474733353,
-0.3535600006580353,
-0.08256067335605621,
-0.24514339864253998,
-0.15477390587329865,
-0.09350510686635971,
-1.0010584592819214,
-0.14450602233409882,
0.33113399147987366,
0.0473296083509922,
0.02173935435... | |
margin: 0px;
padding: 0px;
border: 0px;
}
.sample-border {
border: 1px solid black;
}
#header {
position: absolute;
top: 0px; | [
-0.21377235651016235,
-0.22741657495498657,
0.6800670623779297,
0.2050780951976776,
0.1759023368358612,
0.03917304053902626,
-0.12994933128356934,
-0.21106693148612976,
0.08853805065155029,
-0.3750459551811218,
-0.39968034625053406,
0.19020994007587433,
-0.20490771532058716,
0.141650691628... | |
left: 0px;
right: 0px;
height: 60px;
}
#left-sidebar {
position: absolute;
top: 65px;
left: 0px;
width: 220px;
bottom: 110px; | [
-0.30626407265663147,
-0.1289890557527542,
0.6232761144638062,
-0.1436927765607834,
0.23675379157066345,
0.23777522146701813,
0.024053499102592468,
0.10099540650844574,
0.14016093313694,
-0.2762572467327118,
-0.4260527193546295,
0.6899451017379761,
0.17729532718658447,
-0.14770692586898804... | |
}
#right-sidebar {
position: absolute;
top: 65px;
right: 0px;
width: 200px;
bottom: 110px;
}
#footer {
position: absolute; | [
-0.3697830140590668,
-0.21600890159606934,
0.6623960137367249,
-0.08937598019838333,
0.3244246542453766,
0.2861417233943939,
0.05033857747912407,
0.0815381333231926,
0.0440288670361042,
-0.31525784730911255,
-0.1725754290819168,
0.6119551062583923,
0.2516936659812927,
-0.1176401898264885,
... | |
bottom: 0px;
left: 0px;
right: 0px;
height: 105px;
}
@media screen {
#content {
position: absolute;
top: 65px; | [
0.08465632051229477,
-0.2863863408565521,
0.9121802449226379,
0.20867881178855896,
0.03347092494368553,
-0.24132196605205536,
0.007577398791909218,
0.07463645190000534,
-0.021214773878455162,
-0.5764829516410828,
-0.4185348153114319,
0.7176584601402283,
-0.03980843350291252,
0.224907800555... | |
left: 225px;
bottom: 110px;
right: 205px;
overflow: auto;
}
body #left-sidebar,
body #right-sidebar,
body #header, | [
-0.13621345162391663,
0.06245134770870209,
0.36924782395362854,
-0.05901288241147995,
0.1385311335325241,
0.4574646055698395,
0.05004914849996567,
-0.012257645837962627,
0.13096897304058075,
-0.5076755881309509,
-0.23732425272464752,
0.14545315504074097,
0.0017071501351892948,
-0.084637999... | |
body #footer,
body #content {
position: fixed;
}
}
</style>
</head>
<body>
<div id="header" class="sample-border"></div>
<div id="left-sidebar" class="sample-border"></div>
<div id="right-sidebar" class="sample-border"></div>
<div id="conten... | [
0.18512913584709167,
-0.220823273062706,
0.5480100512504578,
0.2106425017118454,
-0.26077067852020264,
0.22285987436771393,
-0.03776552900671959,
-0.5380323529243469,
-0.31258147954940796,
-0.5076566934585571,
0.08262685686349869,
0.18528147041797638,
0.1379627287387848,
0.1623819172382354... | |
3000px;" /></div>
<div id="footer" class="sample-border"></div>
</body>
</html>
```
Might be overkill for your project, but [Dean Edwards' IE7 javascript adds support for fixed positioning to IE6](http://dean.edwards.name/IE7/). | [
0.30076146125793457,
-0.20593944191932678,
0.6937633156776428,
0.20220346748828888,
0.13887718319892883,
0.11389823257923126,
0.1446005254983902,
-0.3112398087978363,
-0.1837777942419052,
-0.7367060780525208,
0.09484425187110901,
0.23100177943706512,
-0.07620956748723984,
-0.15028122067451... | |
I have a simple webform that will allow unauthenticated users to input their information, including name. I gave the name field a limit of 50 characters to coincide with my database table where the field is `varchar(50)`, but then I started to wonder.
Is it more appropriate to use something like the `Text` column type... | [
-0.046259526163339615,
0.3100869357585907,
0.5459756255149841,
-0.026290100067853928,
-0.21058781445026398,
0.19768211245536804,
-0.029804302379488945,
-0.44245466589927673,
-0.20790062844753265,
-0.336525559425354,
-0.23668941855430603,
0.2521657943725586,
0.04521368071436882,
0.091152191... | |
Family Name, or 70 characters for a single field to hold the Full Name. | [
-0.3669241666793823,
0.00962925422936678,
0.05468742549419403,
-0.16860772669315338,
-0.4110422730445862,
0.5175353288650513,
0.2580753564834595,
0.12192367017269135,
-0.326188325881958,
-0.4087224304676056,
-0.37836605310440063,
-0.4121515154838562,
0.0006581703783012927,
0.59633380174636... | |
I'm looking for a good way to enumerate all the Video codecs on a Windows XP/Vista machine.
I need present the user with a set of video codecs, including the compressors and decompressors. The output would look something like
```
Available Decoders
DiVX Version 6.0
XVID
Motion JPEG
CompanyX's MPEG-2 Decoder
Windows ... | [
0.392572283744812,
0.21510200202465057,
0.6559941172599792,
0.20372013747692108,
-0.06781657785177231,
-0.1587659865617752,
0.022782767191529274,
-0.37580499053001404,
-0.19779302179813385,
-0.6678534150123596,
-0.04460543394088745,
0.6991461515426636,
-0.3846355080604553,
0.15950447320938... | |
For Windows components, but you get no indication if these are encoders or decoders.
3. There are DirectShow filters that may do the job for you perfectly well (Motion JPEG filter for example), but there is no indication that a particular DirectShow filter is a "video decoder".
Has anyone found a generalizes solution ... | [
0.14365142583847046,
-0.11088978499174118,
0.553578794002533,
0.1885562539100647,
-0.35937315225601196,
-0.3784918487071991,
0.20455452799797058,
-0.2792903184890747,
-0.29750415682792664,
-0.5099896192550659,
-0.11529776453971863,
0.5946301221847534,
-0.3312245309352875,
0.055102888494729... | |
= 0;
HRESULT hr = pMk->BindToStorage(0, 0, IID_IPropertyBag, (void **)&pBag );
if( FAILED( hr ) || pBag == 0 )
{
return hr;
}
VARIANT var;
var.vt = VT_BSTR;
hr = pBag->Read(L"FriendlyName", &var, NULL);
if( SUCCEEDED( hr ) && var.bstrVal != 0 )
{
str = reinterpret_cast<wchar_t*>( var.bstrVal )... | [
-0.20318855345249176,
-0.0042708697728812695,
1.0087928771972656,
-0.14058709144592285,
0.15932056307792664,
0.07497989386320114,
0.7962104678153992,
-0.2685773968696594,
-0.02548099122941494,
-0.2814336121082306,
-0.44233328104019165,
0.7835574746131897,
-0.19062668085098267,
0.3644331693... | |
end
hr = ::CoCreateInstance( CLSID_SystemDeviceEnum, NULL, CLSCTX_INPROC_SERVER, IID_ICreateDevEnum, reinterpret_cast<void**>( &pCreateDevEnum ) );
assert( SUCCEEDED( hr ) && pCreateDevEnum != 0 );
if( FAILED( hr ) || pCreateDevEnum == 0 )
{
return hr;
}
IEnumMoniker* pEm = 0;
hr = pCreateDevEnum->C... | [
-0.26861000061035156,
-0.017448460683226585,
0.660286009311676,
-0.04142189398407936,
0.18280737102031708,
0.07186207920312881,
0.6079303622245789,
-0.7840819358825684,
0.03956218808889389,
-0.2815035581588745,
-0.2464631348848343,
0.6016246676445007,
-0.027355775237083435,
0.3573027551174... | |
) && ((hr == S_OK && pEm != 0 ) || hr == S_FALSE) );
if( FAILED( hr ) )
{
pCreateDevEnum->Release();
return hr;
}
if( hr == S_OK && pEm != 0 ) // In this case pEm is != NULL
{
pEm->Reset();
ULONG cFetched;
IMoniker* pM = 0;
while( pEm->Next(1, &pM, &cFetched) == S_OK && pM != 0 )
... | [
-0.14937148988246918,
-0.06196293234825134,
0.6066592335700989,
-0.32999664545059204,
0.45965325832366943,
0.4263635277748108,
0.47240883111953735,
-0.6605848670005798,
-0.17912006378173828,
-0.29003578424453735,
-0.5376357436180115,
0.6394014358520508,
-0.17519038915634155,
0.157804891467... | |
if( SUCCEEDED( extractFriendlyName( pM, str ) )
{
// str contains the friendly name of the filter
// pM->BindToObject creates the filter
std::wcout << str << std::endl;
}
pM->Release();
}
pEm->Release();
}
pCreateDevEnum->Release();
return rval;
}
```
... | [
-0.04411313310265541,
-0.12328655272722244,
1.059183120727539,
-0.3126900792121887,
0.1271924376487732,
-0.03507396951317787,
0.1745755523443222,
-0.6283186078071594,
0.11411117762327194,
-0.47906816005706787,
-0.39602556824684143,
0.753104031085968,
-0.400458425283432,
0.2177629917860031,... | |
:
```
enumerateDShowFilterList( CLSID_VideoCompressorCategory );
```
The MSDN page [Filter Categories](http://msdn.microsoft.com/en-us/library/ms783347(VS.85).aspx) lists all other 'official' categories.
I hope that is a good starting point for you. | [
0.4394165575504303,
-0.0941622331738472,
0.7001297473907471,
0.1587270051240921,
-0.11031576246023178,
-0.6665045022964478,
-0.04443109780550003,
-0.024182120338082314,
-0.4980847239494324,
-0.4284627139568329,
-0.34429723024368286,
0.5142604112625122,
-0.2922265827655792,
0.10170704126358... | |
This error just started popping up all over our site.
***Permission denied to call method to Location.toString***
I'm seeing google posts that suggest that this is related to flash and our crossdomain.xml. What caused this to occur and how do you fix?
Are you using javascript to communicate between frames/iframes whi... | [
0.4027082920074463,
0.2642679810523987,
0.3085227608680725,
-0.14506696164608002,
-0.031796034425497055,
-0.23490890860557556,
0.6143204569816589,
0.17599406838417053,
-0.4446391761302948,
-0.6850529313087463,
0.0027235490269958973,
0.30473798513412476,
-0.4947109818458557,
0.4584580957889... | |
have content from different subdomains. [Here](http://www.mozilla.org/projects/security/components/same-origin.html) you can find a short and to the point explanation of it with examples. | [
0.898979127407074,
-0.15438376367092133,
-0.2642565071582794,
0.16921360790729523,
0.03406539186835289,
-0.4750661849975586,
0.07891043275594711,
0.16029267013072968,
-0.5880907773971558,
-0.12272743135690689,
-0.14455470442771912,
0.012707369402050972,
-0.2112337201833725,
0.3491450250148... | |
I have one field that I need to sum lets say named items
However that field can be part of group a or b
In the end I need to have all of the items summed for group a and group b
when I say grouped I mean there is a LEFT OUTER JOIN to another table the previous table has a type for the items and the one being joined ha... | [
0.41279858350753784,
0.049341004341840744,
0.036554884165525436,
0.20631682872772217,
-0.5303500294685364,
-0.24010232090950012,
0.1294006109237671,
0.08977135270833969,
-0.08798952400684357,
-0.4216291904449463,
0.5026306509971619,
0.20224161446094513,
-0.15260663628578186,
0.053256120532... | |
feel like we are getting close just not yet allain's I can get them to separate but the issue I need to have both groups to sum on the same row which is difficult because I also have several LEFT OUTER JOIN's involved
Tyler's looks like it might work too so I am trying to hash that out real fast
Alain's seems to be t... | [
0.10351238399744034,
0.3582381308078766,
0.27841123938560486,
0.030523119494318962,
-0.23054522275924683,
0.16452747583389282,
0.28938400745391846,
-0.49181997776031494,
-0.2353816032409668,
-0.4801250994205475,
0.4260491728782654,
0.5520392060279846,
-0.04586351662874222,
0.03711851313710... | |
care which of a or b the item belongs to then this will do:
```
SELECT SUM(value)
FROM items
WHERE groupname IN ('a', 'b')
``` | [
0.02156972326338291,
0.028034314513206482,
0.14335645735263824,
0.05979681387543678,
0.04693249613046646,
0.13232901692390442,
0.14163543283939362,
-0.4746236503124237,
0.14368966221809387,
-0.6557812094688416,
-0.19856487214565277,
0.5983984470367432,
-0.11917638778686523,
0.0143910972401... | |
In Maven, dependencies are usually set up like this:
```xml
<dependency>
<groupId>wonderful-inc</groupId>
<artifactId>dream-library</artifactId>
<version>1.2.3</version>
</dependency>
```
Now, if you are working with libraries that have frequent releases, constantly updating the <version> tag can be somewhat a... | [
-0.11443694680929184,
-0.06797735393047333,
0.7913541793823242,
-0.3421940803527832,
0.12771132588386536,
-0.1783541440963745,
0.2804461121559143,
-0.07082412391901016,
-0.3136465549468994,
-0.5436698794364929,
-0.2189057469367981,
0.8177219033241272,
-0.3860092759132385,
-0.01377099193632... | |
Maven has two keywords you can use as an alternative to version ranges. You should use these options with care as you are no longer in control of the plugins/dependencies you are using.
> When you depend on a plugin or a dependency, you can use the a version value of LATEST or RELEASE. LATEST refers to the latest rele... | [
0.03938760608434677,
-0.25208449363708496,
0.41826704144477844,
-0.0744006335735321,
0.18433670699596405,
0.03764519840478897,
0.19443075358867645,
0.11336056888103485,
-0.2801949381828308,
-0.4966728687286377,
-0.3825247585773468,
0.5218321681022644,
0.04286720231175423,
0.375935494899749... | |
non-specific version of an artifact. If you are developing software, you might want to use RELEASE or LATEST as a convenience so that you don't have to update version numbers when a new release of a third-party library is released. When you release software, you should always make sure that your project depends on spec... | [
0.2913622260093689,
0.17105033993721008,
0.2808676064014435,
0.24320416152477264,
0.03067866340279579,
-0.4681554138660431,
0.040660735219717026,
0.05365604907274246,
-0.48560306429862976,
-0.4658198356628418,
-0.37145012617111206,
0.31615149974823,
0.18672986328601837,
0.1021912470459938,... | |
on [Dependency Version Ranges](http://www.mojohaus.org/versions-maven-plugin/examples/resolve-ranges.html), where:
* A square bracket ( `[` & `]` ) means "closed" (inclusive).
* A parenthesis ( `(` & `)` ) means "open" (exclusive).
Here's an example illustrating the various options. In the Maven repository, com.foo:m... | [
-0.01622067764401436,
0.3918803632259369,
0.6805813908576965,
-0.3816506862640381,
0.051464930176734924,
0.17978854477405548,
-0.1699356585741043,
-0.32590988278388977,
-0.1976303905248642,
-0.26040950417518616,
-0.2855110168457031,
0.5521498918533325,
-0.4207942485809326,
0.32494175434112... | |
dependency on that artifact is required, you have the following options (other [version ranges](https://cwiki.apache.org/confluence/display/MAVENOLD/Dependency+Mediation+and+Conflict+Resolution#DependencyMediationandConflictResolution-DependencyVersionRanges) can be specified of course, just showing the relevant ones h... | [
-0.12935663759708405,
0.07389692217111588,
1.1905591487884521,
-0.3648138642311096,
0.12421807646751404,
-0.004347831476479769,
0.3776410222053528,
-0.23506346344947815,
-0.12428288906812668,
-0.5297805666923523,
-0.3318434953689575,
0.6312557458877563,
-0.2459011971950531,
0.1891755312681... | |
deployments will update the "latest" entry in the Maven metadata, but to update the "release" entry, you need to activate the "release-profile" from the [Maven super POM](http://maven.apache.org/guides/introduction/introduction-to-the-pom.html). You can do this with either "-Prelease-profile" or "-DperformRelease=true"... | [
0.21708470582962036,
-0.1484239399433136,
0.6450307369232178,
-0.1463480144739151,
0.18664726614952087,
-0.5106835961341858,
0.30940380692481995,
-0.27953943610191345,
-0.1985904425382614,
-0.4263710081577301,
-0.5521004796028137,
0.5985230207443237,
0.033644042909145355,
-0.25041395425796... | |
[Tim's answer](https://stackoverflow.com/questions/30571/how-do-i-tell-maven-to-use-the-latest-version-of-a-dependency/1172805#1172805) points out, the [maven-versions-plugin](http://www.mojohaus.org/versions-maven-plugin/) is a handy tool for updating dependency versions, particularly the [versions:use-latest-versions... | [
-0.06223287060856819,
0.19483953714370728,
0.8978094458580017,
-0.13126826286315918,
0.18377377092838287,
-0.03174007683992386,
0.1558041125535965,
-0.29010486602783203,
-0.3350929021835327,
-0.0019052072893828154,
-0.3037082254886627,
0.43142950534820557,
-0.06049187108874321,
-0.03042813... | |
I would like to know if I can open 2 different diagrams using MS Visio and each diagram have its own window. I've tried in several ways, but I always end up with 1 Visio window ...
I'm using a triple monitor setup and I'd like to put one diagram to each side of my main monitor.
[]'s
André Casteliano
PS: I'm using V... | [
0.0524967685341835,
-0.11370322853326797,
0.5233535766601562,
-0.06656965613365173,
-0.3615630269050598,
0.0727364644408226,
0.29007965326309204,
-0.1593441665172577,
-0.4178720712661743,
-0.986931324005127,
0.20678342878818512,
0.43482357263565063,
-0.671175479888916,
0.060121431946754456... | |
- you'll need to stretch the whole visio window across the two monitors in question, then choose the "Window" menu and select "Tile" after you've opened your two documents.
Alternately, in the upper right hand corner just below the application minimize, restore and close buttons you'll find the document minimize, rest... | [
0.7681119441986084,
0.12551404535770416,
0.31164687871932983,
0.2105785310268402,
0.4301701784133911,
0.0958825945854187,
0.05283089727163315,
-0.14875227212905884,
-0.015467440709471703,
-1.0339231491088867,
-0.275713175535202,
0.5031845569610596,
-0.05464472621679306,
-0.3379943966865539... | |
I'm running a master-slave MySQL binary log replication system (phew!) that, for some data, is not in sync (meaning, the master holds more data than the slave). But the slave stops very frequently on the slightest MySQL error, can this be disabled? (perhaps a my.cnf setting for the replicating slave ignore-replicating-... | [
0.26330551505088806,
0.3159222900867462,
0.23905260860919952,
0.023109223693609238,
0.23464824259281158,
-0.1862928867340088,
0.24156376719474792,
0.3476397395133972,
-0.37171700596809387,
-0.619055449962616,
0.0631071999669075,
0.07144659757614136,
-0.23043721914291382,
0.5429927110671997... | |
Slave-SQL-Running: No
Replicate-Do-DB:
Last-Errno: 1062
Last-Error: Error 'Duplicate entry '15218' for key 1' on query. Default database: 'db'. Query: 'INSERT INTO db.table ( FIELDS ) VALUES ( VALUES )'
```
which I promptly fix (once I realize that the slave has been stopped) by doi... | [
0.00651529710739851,
0.1917504072189331,
0.16077128052711487,
-0.1221584901213646,
-0.054982688277959824,
-0.019942009821534157,
0.5789945125579834,
-0.4263399541378021,
0.007672043517231941,
-0.48398634791374207,
-0.00693511450663209,
0.4261114001274109,
-0.5211142301559448,
0.55488967895... | |
which does this for me, i was wondering if there's some my.cnf entry which will not kill the slave on the first error.
Cheers,
/mp
Yes, with --slave-skip-errors=xxx in my.cnf, where xxx is 'all' or a comma sep list of error codes. | [
0.02623545564711094,
0.23620779812335968,
0.45672518014907837,
0.2994658350944519,
-0.24058403074741364,
0.27130019664764404,
0.01396969985216856,
0.17759785056114197,
-0.6477388739585876,
-0.4818291664123535,
0.04337986558675766,
0.3119109570980072,
0.0699341893196106,
0.18258433043956757... | |
Reading [this question](https://stackoverflow.com/questions/437/what-is-your-solution-to-the-fizzbuzz-problem) I found this as (note the quotation marks) "code" to solve the problem (that's perl by the way).
```
100,{)..3%!'Fizz'*\5%!'Buzz'*+\or}%n*
```
Obviously this is an intellectual example without real (I hope... | [
0.02493239939212799,
-0.013620978221297264,
0.5015974640846252,
0.033015333116054535,
-0.207882821559906,
-0.17197008430957794,
0.3196665048599243,
-0.009860393591225147,
-0.0941835567355156,
-0.42978256940841675,
-0.19669131934642792,
0.6279863715171814,
-0.37025073170661926,
-0.395234048... | |
readability only **after** you've written the code, I ask about before you write it as well. Sometimes you can foresee a performance improvement in the future by making some darker design or providing with some properties that will make your class darker. You may decide you will use multiple threads or just a single on... | [
0.5503481030464172,
0.10988235473632812,
0.09489037096500397,
0.24392886459827423,
-0.09264475852251053,
-0.11196008324623108,
0.4022883176803589,
0.1264924257993698,
-0.13150380551815033,
-0.9346603751182556,
0.09324990212917328,
0.4691060185432434,
-0.11166748404502869,
-0.24840112030506... | |
are meaningful performance issues: refactor for speed.
Note that this does not apply to higher-level design decisions that are more difficult to change at a later stage. | [
0.25980672240257263,
0.3544204533100128,
0.3474309742450714,
0.3841201961040497,
0.14348773658275604,
-0.08798013627529144,
0.08647286146879196,
-0.11580954492092133,
-0.2049543708562851,
-0.6497922539710999,
-0.24983762204647064,
0.6910465359687805,
0.034494929015636444,
-0.45522880554199... | |
I would like to create a database backed interactive AJAX webapp which has a custom (specific kind of events, editing) calendaring system. This would involve quite a lot of JavaScript and AJAX, and I thought about Google Web Toolkit for the interface and Ruby on Rails for server side.
Is Google Web Toolkit reliable an... | [
0.42872878909111023,
0.11725039035081863,
0.04693899303674698,
0.33641567826271057,
-0.2233484983444214,
-0.03374437987804413,
-0.015588524751365185,
0.19777104258537292,
-0.3051472306251526,
-0.7363699078559875,
0.32415902614593506,
0.7495632171630859,
0.06827837973833084,
-0.024505397304... | |
I am an experienced programmer (c++, java, c#), and I would like to use only free tools for this project.
RoR is actually one of the things the GWT is made to work well with, as long as you're using REST properly. It's in the Google Web Toolkit Applications book, and you can see a demo from the book using this kind of ... | [
0.4371670186519623,
0.14063605666160583,
0.18932470679283142,
-0.07220255583524704,
-0.04610566049814224,
-0.17730341851711273,
0.06706710159778595,
0.21724024415016174,
-0.3011968731880188,
-0.5608174204826355,
-0.024941464886069298,
0.8325098752975464,
0.10202955454587936,
-0.00391805404... | |
haven't had a chance to try it out yet, but it looks like a good amount of thought has been put into it. One catch is that it looks like it hasn't been fully tested with 2.1 Rails yet, just 2.0, so you may run into a few (probably minor and fixable) errors. | [
0.6252161264419556,
-0.26885801553726196,
-0.1825309842824936,
0.24081774055957794,
0.26070940494537354,
-0.21749341487884521,
0.5093048214912415,
0.15853117406368256,
-0.08113297820091248,
-0.2981119155883789,
0.5232889652252197,
0.471694678068161,
-0.09697379171848297,
-0.221080616116523... | |
Is there any Visual Studio Express plug ins for source versioning? I am starting a project on my own and only have the Express version of Visual Studio 2008.
Short answer: No.
The Express editions support neither the Add-Ins nor Source Control providers (SCC plug-ins). While there are ways to make this work, they are ... | [
0.17829842865467072,
0.1953694075345993,
-0.018706655129790306,
-0.011370199732482433,
-0.3318786323070526,
-0.14414095878601074,
0.31792426109313965,
0.08896351605653763,
0.17225660383701324,
-0.14965268969535828,
-0.08445748686790466,
0.3435248136520386,
-0.25087636709213257,
-0.24570891... | |
How do I write the results from a mysql query to file? I just need something quick. Output can be CSV, XML, HTML, etc.
```
SELECT a,b,a+b
FROM test_table
INTO OUTFILE '/tmp/result.txt'
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
LINES TERMINATED BY '\n'
```
(the docs show INTO OUTFILE up in the SELEC... | [
0.2470780313014984,
0.03566955029964447,
0.4010660648345947,
-0.12551751732826233,
0.07675985991954803,
0.04646346718072891,
-0.04468069598078728,
-0.23852016031742096,
-0.025741664692759514,
-0.6707428693771362,
-0.23050986230373383,
0.48236697912216187,
-0.2878393232822418,
-0.0745101496... | |
Suppose you have two seperate ASP.NET Web Application projects that both need to use a common MasterPage.
What's the best way to share the MasterPage across projects without having to duplicate code? Preferably without having to resort to source control or file system hacks.
I have trying to accomplish the same thing.... | [
0.2835216224193573,
-0.023203520104289055,
-0.13610002398490906,
0.24084730446338654,
-0.2604665458202362,
-0.0601644329726696,
0.0182891096919775,
-0.03413568437099457,
-0.4229908883571625,
-0.8970524072647095,
0.026532981544733047,
0.3172276020050049,
-0.07656869292259216,
0.129748970270... | |
2.0 - Master Pages: Tips, Tricks, and Traps](http://www.odetocode.com/articles/450.aspx)
The third bullets near the end the article tells you of possible ways you can share Masterpages also. | [
0.24828675389289856,
0.11803252249956131,
0.14084695279598236,
0.31206995248794556,
-0.13035090267658234,
-0.20121008157730103,
0.4324548840522766,
-0.5491207838058472,
0.08895833790302277,
-0.4287852942943573,
0.10938197374343872,
0.37314966320991516,
-0.18248054385185242,
-0.140368193387... | |
If possible one that supports at least spell checking:
* C# string literals
* HTML content
* Comments
Well, 3 weeks later, I've stumbled across [CodeSpell](http://www.exactmagic.com/products/codespell/). *[**Note:** this link no longer works and the product does not appear to be listed by that company).*
Its $30 but... | [
0.13986770808696747,
-0.001316780224442482,
0.355446994304657,
-0.06468141078948975,
0.04419495537877083,
-0.13039639592170715,
0.3503737449645996,
0.025528665632009506,
-0.14690488576889038,
-0.5676121711730957,
0.062048330903053284,
0.11767690628767014,
0.27105259895324707,
0.19049309194... | |
We have an external service that is currently accessible via the http (port 80, non-SSL) and https (port 443, SSL) addresses.
What is the best way to limit connections to only the https address? Is it something we can do via IIS or does it have to be done via code.
Additional info: Regular ASP.NET web service (.asmx)... | [
0.35470736026763916,
0.06533019244670868,
0.42637398838996887,
-0.011691480875015259,
-0.08686479181051254,
-0.12243610620498657,
0.40305057168006897,
-0.08686116337776184,
-0.4778922498226166,
-0.5775318741798401,
0.03619151934981346,
0.4678150415420532,
-0.1518283635377884,
0.18362307548... | |
How can I check the existence of an element in jQuery?
The current code that I have is this:
```
if ($(selector).length > 0) {
// Do something
}
```
Is there a more elegant way to approach this? Perhaps a plugin or a function?
In JavaScript, everything is 'truthy' or 'falsy', and for numbers `0` means `false`, ... | [
0.25157368183135986,
0.17519371211528778,
0.053871527314186096,
0.012163328938186169,
-0.09096954017877579,
-0.32628655433654785,
0.2620624601840973,
-0.2111918181180954,
0.05760754272341728,
-0.45331841707229614,
0.05546038970351219,
0.4287107288837433,
-0.18443265557289124,
-0.0777245461... | |
How can I replace lone instances of \n with \r\n (LF alone with CRLF) using a regular expression in C#?
I know to do it using plan `String.Replace`, like:
```
myStr.Replace("\n", "\r\n");
myStr.Replace("\r\r\n", "\r\n");
```
However, this is inelegant, and would destroy any "\r+\r\n" already in the text (although t... | [
0.015972590073943138,
0.18513324856758118,
0.5366774201393127,
-0.18660962581634521,
0.04731612280011177,
-0.2575572431087494,
0.37371665239334106,
-0.3218415081501007,
-0.06434008479118347,
-0.7916703224182129,
-0.36388418078422546,
0.5384815335273743,
-0.46844813227653503,
-0.10669206082... | |
or those that are *not* preceded with '\r'
There might be special cases to check since you're messing with the definition of lines itself the '$' might not work too well. But I think you should get the idea.
**EDIT:** credit @Kibbee Using look-ahead s is clearly better since it won't capture the matched preceding cha... | [
0.28520241379737854,
-0.14721082150936127,
0.755640983581543,
-0.048401135951280594,
-0.14737370610237122,
0.16149945557117462,
0.3373652696609497,
-0.16584058105945587,
-0.025697678327560425,
-0.6386231780052185,
-0.2500759959220886,
0.5252206921577454,
-0.1396111100912094,
-0.05225713551... | |
I didn't see any similar questions asked on this topic, and I had to research this for something I'm working on right now. Thought I would post the answer for it in case anyone else had the same question.
I found the answer here: <http://blog.sqlauthority.com/2007/08/22/sql-server-t-sql-script-to-insert-carriage-return... | [
-0.04018261656165123,
0.011518011800944805,
0.3937871754169464,
-0.2729584276676178,
-0.21106114983558655,
0.1269853115081787,
0.09083910286426544,
-0.35912713408470154,
-0.13976691663265228,
-0.45408895611763,
-0.1681905835866928,
-0.04095706343650818,
-0.597833514213562,
0.05442441999912... | |
Looking for a way to display a PDF in Flex. I'm sure there are several ways. Looking for the easiest to maintain / integrate / most user friendly. I'm guessing it's possible to display a browser window in the app and render it, but if it goes off of IE / FireFox it's not acceptable for this project.
Thanks...
This loo... | [
0.7083064317703247,
-0.195027694106102,
0.17475591599941254,
0.3978985846042633,
-0.16231220960617065,
-0.23280803859233856,
0.22947825491428375,
-0.14054158329963684,
-0.2784353792667389,
-0.9198396801948547,
0.24000808596611023,
0.6097404360771179,
-0.0935809388756752,
0.1252464801073074... | |
The `Open` button on the open file dialog used in certain windows applications includes a dropdown arrow with a list of additional options — namely `Open With..`.
[](https://i.stack.imgur.com/GLM3T.png)
I haven't seen this in every Windows application, so you m... | [
0.058621883392333984,
-0.08770643174648285,
0.6976448893547058,
-0.11923546344041824,
-0.09497956931591034,
-0.06117405369877815,
0.09658247232437134,
0.05799113214015961,
-0.4442274570465088,
-0.6477950215339661,
-0.4220111668109894,
0.5602016448974609,
-0.46607837080955505,
0.35395413637... | |
Studio. I should clarify that I'm looking for that specific button, not the entire dialog. Any thoughts?
I used the draggable search in Spy++ (installed with VS) to look at the split open button on the file-open dialog of VS.
This revealed that it's an ordinary windows button with a style which includes BS\_DEFSPLITBU... | [
0.9565445780754089,
-0.3284124732017517,
0.13293889164924622,
0.06669340282678604,
-0.14153921604156494,
-0.3483293056488037,
0.22757112979888916,
-0.19660791754722595,
-0.5795139074325562,
-0.6735785007476807,
-0.05272556468844414,
0.4469321072101593,
-0.07353992015123367,
-0.023891596123... | |
'Standard' which is the default. I've not bothered to hook-up the event handling stuff for the drop-down, but that's covered in the MSDN link, I think.
Of course, this is Vista-only (but doesn't need Aero enabled, despite the name on codeplex) - if you need earlier OS support, you'll be back to drawing it yourself. | [
0.12243032455444336,
-0.32627445459365845,
0.4387332499027252,
0.20171800255775452,
-0.16761934757232666,
-0.3710702955722809,
0.04175499454140663,
-0.015281718224287033,
-0.2504412829875946,
-0.5173014402389526,
-0.2339920699596405,
0.7584287524223328,
-0.14031967520713806,
-0.30911347270... | |
Visual Basic code does not render correctly with [prettify.js](https://code.google.com/archive/p/google-code-prettify) from Google.
on Stack Overflow:
```
Partial Public Class WebForm1
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
... | [
-0.210379958152771,
0.2004529982805252,
0.25521305203437805,
-0.12905427813529968,
-0.14495204389095306,
0.12940910458564758,
0.45568838715553284,
-0.07801467180252075,
0.09051433205604553,
-0.6025773286819458,
-0.41135671734809875,
0.5074731111526489,
-0.19225649535655975,
-0.076081387698... | |
a language by specifying
> the language extension along with the
> prettyprint class like so:
>
>
>
> ```
> <pre class="prettyprint lang-html">
> The lang-* class specifies the language file extensions.
> Supported file extensions include
> "c", "cc", "cpp", "cs", "cyc", "java", "bsh", "csh", "sh",
> "cv... | [
0.16186626255512238,
0.13792341947555542,
0.31053510308265686,
-0.1980798989534378,
0.03737219423055649,
-0.035765036940574646,
0.42924267053604126,
-0.0019260062836110592,
-0.2956165671348572,
-0.32684633135795593,
-0.6879198551177979,
0.22147279977798462,
-0.4178328514099121,
-0.24916911... | |
I've rewritten the whole posting.
Below is a pretty complete solution to the VB highlighting problem. If SO has got nothing better, *please* use it. VB syntax highlighting is definitely wanted.
I've also added a code example with some complex code literals that gets highlighted correctly. However, I haven't even trie... | [
0.2537809908390045,
-0.044565487653017044,
0.22680039703845978,
0.17408661544322968,
-0.3218807578086853,
-0.20233525335788727,
0.42100605368614197,
0.2611316740512848,
-0.14553780853748322,
-0.7743672728538513,
-0.10471781343221664,
0.30769243836402893,
-0.18695001304149628,
0.06091439351... | |
works on **HTML**. As a consequence, &, < and > are required to be read as named (!) entities, not single characters.
Sorry for the long regex.
```
var highlightVB = function(code) {
var regex = /("(?:""|[^"])+"c?)|('.*$)|#.+?#|(&[HO])?\d+(\.\d*)?(e[+-]?\d+)?U?([SILDFR%@!#]|&)?|\.\d+[FR!#]?|\s+|\w+|&|... | [
-0.19576892256736755,
-0.29305750131607056,
0.6109272241592407,
-0.11047367006540298,
-0.1008983850479126,
0.08726903051137924,
0.5928005576133728,
-0.4061468541622162,
-0.2614341378211975,
-0.6759260892868042,
-0.4647567570209503,
0.05729306489229202,
-0.15668925642967224,
0.0044204089790... | |
var tok = getToken(tokens);
switch (tok.charAt(0)) {
case '"':
if (tok.charAt(tok.length - 1) == "c")
result += span("char", tok); | [
0.19628435373306274,
-0.5358822345733643,
0.45916712284088135,
-0.14117762446403503,
0.02354040928184986,
0.19566085934638977,
0.3669895529747009,
-0.6531955003738403,
-0.2280009686946869,
0.001754424418322742,
-0.29907792806625366,
0.5096016526222229,
-0.06112228333950043,
0.1124773770570... | |
else
result += span("string", tok);
break;
case "'": | [
-0.018328608945012093,
-0.3126121759414673,
0.4049683213233948,
-0.20312872529029846,
0.08953014761209488,
-0.01144667062908411,
0.3919316530227661,
-0.5620805621147156,
-0.33747270703315735,
0.15317456424236298,
-0.5426027774810791,
0.565629780292511,
-0.05451096594333649,
-0.094013713300... | |
result += span("comment", tok);
break;
case '#':
result += span("date", tok);
break; | [
0.07438795268535614,
-0.3307300806045532,
0.4748018682003021,
-0.12495466321706772,
0.1100412905216217,
0.16603386402130127,
-0.035187121480703354,
-0.08919785171747208,
-0.3333696722984314,
0.0849040299654007,
-0.6214929819107056,
0.2950981557369232,
-0.1347239464521408,
0.049797028303146... | |
default:
var c1 = tok.charAt(0);
if (isDigit(c1) ||
tok.length > 1 && c1 == '.' && isDigit(tok.charAt(1)) || | [
-0.30234530568122864,
-0.14917556941509247,
0.25295475125312805,
-0.3023547828197479,
0.11358623951673508,
0.09086981415748596,
0.31429946422576904,
-0.3226355016231537,
-0.05313723906874657,
-0.027075590565800667,
-0.3956950604915619,
0.35138124227523804,
-0.22284364700317383,
-0.02075646... | |
tok.length > 5 && (tok.indexOf("&") == 0 &&
tok.charAt(5) == 'H' || tok.charAt(5) == 'O')
)
result += span("number", tok); | [
0.09363491088151932,
-0.09690926969051361,
0.8841772675514221,
-0.21540914475917816,
0.09947962313890457,
0.18783004581928253,
0.19854258000850677,
-0.9085012674331665,
-0.28315237164497375,
0.0032825616654008627,
-0.3529174327850342,
0.5238959193229675,
0.1266351044178009,
0.1731770336627... | |
else if (isKeyword(tok))
result += span("keyword", tok);
else
result += tok; | [
-0.2653224766254425,
-0.27541881799697876,
0.46792060136795044,
-0.2977362275123596,
0.014466357417404652,
-0.2497873604297638,
0.12165943533182144,
-0.6759103536605835,
-0.01172824390232563,
-0.08194497972726822,
-0.620112419128418,
0.6750437617301941,
-0.13705825805664062,
-0.35185667872... | |
break;
}
}
lines[i] = result;
}
return lines.join("\n");
}
var keywords = [
"addhandler", "addressof", "alias", "and", "andalso", "as", "boolean", "byref",
"byte", "byval", "call", "case", "catch", "cbool", "cbyte", "cchar", "cdate",
"cdec", "cdbl", "char", "cint", "cl... | [
0.21250225603580475,
0.011258679442107677,
0.33656707406044006,
-0.030145669355988503,
0.19436997175216675,
0.2140832394361496,
0.10491114109754562,
-0.024708116427063942,
-0.17225442826747894,
0.006407976616173983,
-0.6028223633766174,
0.2079039216041565,
-0.43072211742401123,
0.285258680... | |
"do", "double",
"each", "else", "elseif", "end", "endif", "enum", "erase", "error", "event",
"exit", "false", "finally", "for", "friend", "function", "get", "gettype",
"getxmlnamespace", "global", "gosub", "goto", "handles", "if", "if",
"implements", "imports", "in", "inherits", "integer", "interface", ... | [
-0.1591431200504303,
-0.12696334719657898,
0.5075486898422241,
0.17546628415584564,
0.2426430881023407,
0.5754431486129761,
0.23471002280712128,
0.2460118681192398,
-0.06847916543483734,
-0.2951062321662903,
-0.9300304055213928,
0.29529064893722534,
-0.27248138189315796,
0.2575348019599914... | |
"public", "raiseevent", "readonly", "redim", "rem", "removehandler", "resume",
"return", "sbyte", "select", "set", "shadows", "shared", "short", "single",
"static", "step", "stop", "string", "structure", "sub", "synclock", "then",
"throw", "to", "true", "try", "trycast", "typeof", "variant", "wend", "uinteg... | [
0.0198250450193882,
-0.27664339542388916,
0.3474828004837036,
-0.08295910805463791,
0.1913926899433136,
0.41253072023391724,
0.2938620150089264,
-0.28821370005607605,
-0.1331915706396103,
-0.17688338458538055,
-0.6761264801025391,
0.3581926226615906,
-0.17945215106010437,
0.149657323956489... | |
i < tokens.length; i++)
if (tokens[i] != undefined)
return tokens[i];
return null;
}
var span = function(class, text) {
return "<span class=\"" + class + "\">" + text + "</span>";
}
```
Code for testing:
```
Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me... | [
-0.011800047941505909,
-0.351117342710495,
0.875810444355011,
-0.22216938436031342,
-0.2681679129600525,
0.06225794181227684,
0.16577661037445068,
-0.6333811283111572,
-0.38268420100212097,
-0.4320783019065857,
-0.41375643014907837,
0.3639712631702423,
-0.10364944487810135,
0.2840260267257... | |
d As Double = 1.23
Dim s As Single = .123F
Dim l As Long = 123L
Dim ul As ULong = 123UL
Dim c As Char = "x"c
Dim h As Integer = &H0
Dim t As Date = #5/31/1993 1:15:30 PM#
Dim f As Single = 1.32e-5F
End Sub
``` | [
0.44227632880210876,
-0.08827557414770126,
0.9481644630432129,
-0.5123144388198853,
-0.5448698997497559,
-0.10278047621250153,
0.44935142993927,
-0.3287741243839264,
-0.13915018737316132,
0.1541341096162796,
-0.20931850373744965,
0.5585532188415527,
-0.24057283997535706,
0.6027203798294067... | |
The HTML standard defines a clear separation of concerns between CSS (presentation) and HTML (semantics or structure).
Does anyone use a coding standards document for CSS and XHTML that has clauses which help to maintain this separation? What would be good clauses to include in such a coding standards document?
We don... | [
0.7806369662284851,
0.536361038684845,
0.05048295855522156,
-0.10832569748163223,
-0.33648425340652466,
-0.40992990136146545,
0.24166184663772583,
-0.1388896256685257,
-0.24121089279651642,
-0.375685453414917,
-0.14095066487789154,
0.5244649648666382,
-0.3559335470199585,
-0.19893364608287... | |
to make it easier to read. [Smashing Magazine](http://www.smashingmagazine.com/2008/05/02/improving-code-readability-with-css-styleguides/) has a great article on this subject. | [
0.456958532333374,
0.09558520466089249,
-0.13204796612262726,
0.26598429679870605,
-0.39038291573524475,
-0.3446464240550995,
0.43792569637298584,
0.36106425523757935,
-0.2806810438632965,
-0.06703230738639832,
-0.05402841046452522,
0.2712654769420624,
-0.14977583289146423,
-0.154822900891... | |
Alright.
So I figure it's about time I get into unit testing, since everyone's been banging on about it for long enough. I've installed NUnit and gone through a few "intro to unit testing" type tutorials.
I'm currently putting together a small framework to help with the rebuild of one of our web apps, so I've created... | [
0.7796230912208557,
0.25953733921051025,
0.15291981399059296,
0.28815507888793945,
-0.10253371298313141,
-0.32879742980003357,
0.3995274603366852,
-0.10324999690055847,
0.02116643451154232,
-0.5003331303596497,
0.17209762334823608,
0.6640118360519409,
0.3189586102962494,
0.0861166864633560... | |
can do model-view-controller or model-view-presenter type architectures without using a full blown framework. You already found out that unit-testing ui-components is difficult. There are ways around that but you probably don't want to go that route. Usually this will make your tests very hard to maintain, more mainten... | [
0.30156800150871277,
-0.07965129613876343,
0.24718615412712097,
0.49438580870628357,
-0.055236972868442535,
-0.22807632386684418,
0.2002294659614563,
-0.2997268736362457,
-0.10395219922065735,
-0.6459099650382996,
0.048172444105148315,
0.5771190524101257,
-0.3265025317668915,
0.22021742165... | |
view through the interface. That way you can mock up the view in your tests.
I know this sounds like a lot of work and it seems like a workaround but if you get used to this it's a realy nice architecture that makes it far easier to change ui behaviour. You can always start using a "real" mvc framework when you realy ... | [
0.322555273771286,
-0.14220324158668518,
0.6980888843536377,
0.05147892236709595,
-0.3099537193775177,
0.06189560517668724,
0.40699297189712524,
0.027764473110437393,
-0.11787009239196777,
-0.6389654874801636,
-0.0001725506444927305,
0.7357401847839355,
-0.23196227848529816,
0.193690896034... | |
In Visual Studio 2005, whenever I would view a file in the main editor, the Solution Explorer would find and highlight that file. Some time ago, this stopped working and the Solution Explorer would do nothing.
This has become quite a pain since following a chain of "Go To Definition"s can lead you all over your soluti... | [
-0.1967639923095703,
-0.27019059658050537,
0.43897300958633423,
-0.07859651744365692,
-0.2932290732860565,
-0.1051885113120079,
0.3064281940460205,
-0.012250510044395924,
-0.04406759887933731,
-0.7226929068565369,
0.2153385579586029,
0.8261463046073914,
-0.3983733654022217,
0.0333829037845... | |
What's the most useful hack you've discovered for Mozilla's new [Ubiquity](https://wiki.mozilla.org/Labs/Ubiquity) tool?
"translate this" and "edit-page". I think I'd find the Google Apps features useful if they supported hosted domains. | [
0.6418193578720093,
0.11016349494457245,
0.2698889970779419,
0.40214788913726807,
-0.10888536274433136,
-0.24056361615657806,
0.2136465162038803,
0.35049447417259216,
-0.08500497788190842,
-0.5642525553703308,
-0.126590296626091,
0.39254629611968994,
-0.32665908336639404,
0.045535720884799... | |
We're in the process of redesigning the customer-facing section of our site in .NET 3.5. It's been going well so far, we're using the same workflow and stored procedures, for the most part, the biggest changes are the UI, the ORM (from dictionaries to LINQ), and obviously the language. Most of the pages to this point h... | [
0.3141554296016693,
-0.0963376984000206,
0.6365839838981628,
-0.006101782899349928,
-0.06274936348199844,
0.10009155422449112,
0.26878976821899414,
0.049814023077487946,
-0.006164281163364649,
-0.7866907119750977,
-0.1013338565826416,
0.3114525377750397,
0.04477481171488762,
-0.16731700301... | |
a bit deceiving too since we're working with gems like this
```
function GetDealText(sUSCurASCII, sUSCurName, sTemplateOptionID, sSellerCompany, sOfferAmount, sSellerPremPercent, sTotalOfferToSeller, sSellerPremium, sMode, sSellerCurASCII, sSellerCurName, sTotalOfferToSeller_SellerCurr, sOfferAmount_SellerCurr, sSelle... | [
0.06369221210479736,
-0.008299306035041809,
0.6799035668373108,
0.22614333033561707,
0.01503247581422329,
0.16891750693321228,
0.20806381106376648,
0.037482358515262604,
-0.04777024686336517,
-0.7542860507965088,
-0.2966651916503906,
0.44083452224731445,
0.07984720170497894,
-0.05608655512... | |
code in the `aspx.cs` file and start rewriting, making obvious refactorings as I go especially to take advantage of our ORM. If I get a function call that we don't have, I'll write out the definition.
After I have everything coded I'll do a few passes at refactoring/testing. I'm just wondering if anyone has any tips o... | [
0.6274130344390869,
0.11816062033176422,
0.20445607602596283,
0.040192097425460815,
-0.020908081904053688,
-0.01668320596218109,
0.5274378061294556,
0.20701268315315247,
-0.2726818919181824,
-0.9272710680961609,
-0.20188429951667786,
0.29411885142326355,
-0.1573031097650528,
-0.01411544810... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.