text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
ref si, //startup info
out pi); //process info
if (!bResult)
throw new Win32Exception(Marshal.GetLastWin32Error());
if (pi.hProcess != IntPtr.Zero)
Windows.CloseHandle(pi.hProcess);
if (pi.hThread != IntPtr.Zero)
Windows.CloseHandle(pi.hTh... | [
-0.21857620775699615,
0.1455269306898117,
0.7771279811859131,
-0.08693675696849823,
0.3388706147670746,
0.14167819917201996,
0.20880693197250366,
-0.5186358690261841,
0.07125123590230942,
-0.6112548112869263,
-0.3722899854183197,
0.6229264736175537,
-0.19782783091068268,
0.193325936794281,... | |
finally
{
if (hToken != IntPtr.Zero)
Windows.CloseHandle(hToken);
}
}
finally
{
WinSafer.SaferCloseLevel(saferLevelHandle);
}
}
```
**P/Invoke declarations:**
```
using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.InteropServices... | [
0.11658962815999985,
-0.11868593096733093,
0.7597761154174805,
0.1829005777835846,
0.3020702600479126,
-0.2875155210494995,
0.13039414584636688,
-0.6542401909828186,
0.16106906533241272,
-0.42590078711509705,
-0.27304908633232117,
0.6675698161125183,
-0.1416798084974289,
0.0463055334985256... | |
/// <param name="scopeId">The scope of the level to be created.</param>
/// <param name="levelId">The level of the handle to be opened.</param>
/// <param name="openFlags">Must be SaferOpenFlags.Open</param>
/// <param name="levelHandle">The returned SAFER_LEVEL_HANDLE. When you have finished using th... | [
0.1844474971294403,
-0.1344211995601654,
0.7584171295166016,
0.1648731678724289,
0.07815346866846085,
-0.30788955092430115,
0.3188265264034271,
-1.002453327178955,
-0.07892362028360367,
-0.5467151999473572,
-0.1548798680305481,
0.42234867811203003,
-0.28271788358688354,
-0.1201044097542762... | |
public static extern bool SaferCreateLevel(SaferLevelScope scopeId, SaferLevel levelId, SaferOpen openFlags,
out IntPtr levelHandle, IntPtr reserved);
/// <summary>
/// The SaferComputeTokenFromLevel function restricts a token using restrictions specified by a SAFER_LEVEL_HANDLE.
/// </su... | [
0.006701727397739887,
-0.12756101787090302,
0.5652957558631897,
0.12526822090148926,
0.08618342131376266,
-0.31186607480049133,
0.19551490247249603,
-0.339511513710022,
-0.0007374514825642109,
-0.4989970624446869,
-0.38066449761390686,
0.294981449842453,
-0.561949610710144,
0.2164079695940... | |
SAFER_LEVELID_DISALLOWED does not contain a token.</param>
/// <param name="inAccessToken">Token to be restricted. If this parameter is NULL, the token of the current thread will be used. If the current thread does not contain a token, the token of the current process is used.</param>
/// <param name="outAc... | [
-0.023523816838860512,
-0.27721601724624634,
0.24078767001628876,
0.15981356799602509,
0.16525228321552277,
0.10512946546077728,
0.1572558581829071,
-0.8746479749679565,
-0.191254124045372,
-0.4885856509208679,
0.19588275253772736,
0.18307195603847504,
-0.5741336345672607,
-0.1634592115879... | |
[DllImport("advapi32", SetLastError = true, CallingConvention = CallingConvention.StdCall)]
public static extern bool SaferComputeTokenFromLevel(IntPtr levelHandle, IntPtr inAccessToken,
out IntPtr outAccessToken, SaferTokenBehaviour flags, IntPtr lpReserved);
/// <summary>
/// The SaferC... | [
-0.008719400502741337,
-0.18269068002700806,
0.5843275189399719,
0.02808154560625553,
0.18734024465084076,
-0.20963478088378906,
0.12027224153280258,
-0.7900856137275696,
0.11137592792510986,
-0.39982303977012634,
-0.19304834306240082,
0.6495394706726074,
-0.369867205619812,
0.066915668547... | |
call GetLastWin32Error.</returns>
[DllImport("advapi32", SetLastError = true, CallingConvention = CallingConvention.StdCall)]
public static extern bool SaferCloseLevel(IntPtr levelHandle);
} //class WinSafer
/// <summary>
/// Specifies the behaviour of the SaferComputeTokenFromLevel method
/// ... | [
-0.07695043832063675,
-0.41246628761291504,
0.2589385509490967,
0.01958610489964485,
0.33952024579048157,
-0.3597956895828247,
0.3436271846294403,
-0.7383658289909363,
0.12733854353427887,
-0.3100138008594513,
-0.11009638756513596,
0.7851763963699341,
-0.3091706931591034,
0.078289516270160... | |
NullIfEqual = 0x1,
/// <summary></summary>
CompareOnly = 0x2,
/// <summary></summary>
MakeInert = 0x4,
/// <summary></summary>
WantFlags = 0x8
}
/// <summary>
/// The level of the handle to be opened.
/// </summary>
public enum SaferLevel : uint
{
/// <summar... | [
0.2963516414165497,
-0.12040655314922333,
0.4999876320362091,
0.09397608786821365,
0.04765243083238602,
-0.23491662740707397,
0.4523344039916992,
-0.4851350784301758,
0.10681107640266418,
-0.4124099314212799,
0.10003495961427689,
0.3675759732723236,
-0.3535041809082031,
0.0795973613858223,... | |
Disallowed = 0,
/// <summary>Allows programs to execute with access only to resources granted to open well-known groups, blocking access to Administrator and Power User privileges and personally granted rights.</summary>
Untrusted = 0x1000,
/// <summary>Software cannot access certain resources, such a... | [
0.013654453679919243,
-0.05660642683506012,
0.09617720544338226,
0.10391314327716827,
0.28513264656066895,
-0.2098630964756012,
0.148980975151062,
-0.3444746732711792,
-0.25429123640060425,
-0.20648418366909027,
-0.5990825891494751,
0.25183337926864624,
-0.35220423340797424,
0.410673379898... | |
User user rights. Software can access resources accessible by normal users.</summary>
NormalUser = 0x20000,
/// <summary>Software user rights are determined by the user rights of the user.</summary>
FullyTrusted = 0x40000
}
/// <summary>
/// The scope of the level to be created.
/// </sum... | [
0.39263996481895447,
0.01829717308282852,
0.5574030876159668,
0.3281131684780121,
0.3655875027179718,
-0.38648486137390137,
0.021135656163096428,
-0.4630739390850067,
0.12634748220443726,
-0.36383524537086487,
-0.13811784982681274,
0.6426556706428528,
-0.27622151374816895,
0.11039984226226... | |
/// <summary>The created level is scoped by user.</summary>
User = 2
}
public enum SaferOpen : uint
{
Open = 1
}
} //namespace PInvoke
``` | [
0.2096671313047409,
-0.10383260250091553,
0.21420057117938995,
0.03370676562190056,
0.17587408423423767,
-0.28791698813438416,
0.16628605127334595,
-0.4481252133846283,
0.08856450021266937,
-0.6139188408851624,
-0.19922001659870148,
0.387554407119751,
-0.3226228654384613,
0.016991116106510... | |
Now that `shared_ptr` is in tr1, what do you think should happen to the use of `std::auto_ptr`? They both have different use cases, but all use cases of `auto_ptr` can be solved with `shared_ptr`, too. Will you abandon `auto_ptr` or continue to use it in cases where you want to express explicitly that only one class ha... | [
0.24417932331562042,
-0.006977589800953865,
-0.17276686429977417,
0.22219400107860565,
-0.03377806767821312,
-0.405900239944458,
-0.06648530066013336,
0.10009007900953293,
-0.2727029621601105,
-0.31421777606010437,
-0.06553522497415543,
0.7629591822624207,
-0.17539840936660767,
0.133060842... | |
they need to understand smart pointers and the fine details of how they work. When you use only one smart pointer everywhere, you can just lay down a rule 'wrap all pointers in `shared_ptr`' and be done with it.
What's your take on this?
To provide a little more ammunition to the 'avoid `std::auto_ptr`' camp: `auto_pt... | [
0.11031077057123184,
0.3166657090187073,
0.08809299021959305,
-0.060809895396232605,
0.03870588541030884,
-0.2471540868282318,
0.21056824922561646,
-0.13198421895503998,
-0.37883326411247253,
-0.21320539712905884,
-0.43679943680763245,
0.9112792611122131,
-0.4937888979911804,
-0.3396527767... | |
and it is intended for similar uses. The next C++09 standard will have something similar called unique\_ptr.
However, using `shared_ptr` anywhere that `scoped_ptr` should be used will not break anything, it'll just add a very slight bit of inefficiency to deal with the reference count if the object is never actually g... | [
0.3281702995300293,
-0.014788483269512653,
0.15622714161872864,
0.01832459308207035,
-0.17696557939052582,
-0.3506166338920593,
-0.09265480190515518,
-0.08286458253860474,
-0.32986167073249817,
-0.35678139328956604,
0.07954507321119308,
0.2720840573310852,
-0.4857598543167114,
0.1442712992... | |
or share it) - use `shared_ptr`. | [
0.24812185764312744,
-0.15707844495773315,
-0.023484691977500916,
0.25466808676719666,
-0.007305372040718794,
-0.09831751883029938,
0.09125002473592758,
0.273711234331131,
0.08715905994176865,
-0.4873093068599701,
-0.5527204275131226,
0.3035818040370941,
-0.24668961763381958,
0.33263102173... | |
Is it possible to access the Abstract Syntax Tree(AST) inside the javac.exe programmatically? Could you provide an example?
Yes, it is possible, but only since Java 6. [Peter von der Ahé](http://java.sun.com/developer/Meet-Eng/vonderahe/) talks about the two JSRs in [this interview](http://www.artima.com/lejava/article... | [
0.20433108508586884,
0.1603102684020996,
-0.01895548775792122,
-0.16607923805713654,
-0.3501482307910919,
-0.11754445731639862,
0.26686015725135803,
-0.44998809695243835,
-0.24093669652938843,
-0.5988746285438538,
-0.23542369902133942,
0.4058423638343811,
-0.5897047519683838,
-0.3880133330... | |
199's file abstraction allows you to have files in a database, and to generate output directly to memory, for example. Finally, the JSR 199 API lets you collect diagnostics from the compiler in a structured way so that you can easily transform error messages, for instance, into lines in an IDE's editor.
JSR 269 is the... | [
0.10736247152090073,
0.1452329009771347,
0.285334974527359,
-0.10156754404306412,
-0.39642322063446045,
-0.1906362771987915,
0.14769241213798523,
-0.48260095715522766,
-0.2608736753463745,
-0.2981230616569519,
-0.21903079748153687,
0.39715978503227234,
-0.30842745304107666,
-0.537534892559... | |
Language](http://jackpot.netbeans.org/docs/rule-language.html), which is a standalone refactoring engine that plugins into the Compiler Tree. | [
0.23359078168869019,
-0.07711085677146912,
0.04782792180776596,
-0.19764085114002228,
0.20227575302124023,
-0.024258604273200035,
0.26472389698028564,
-0.38932034373283386,
-0.0763964056968689,
-0.11920206248760223,
-0.20839233696460724,
0.5166783928871155,
-0.9455929398536682,
-0.34032985... | |
Could you provide an example of accessing the Eclipse Abstract Syntax Tree programmatically for a given piece of code?
eg getting the AST for:
---
Class1.java
-----------
```
package parseable;
public class Class1 {
/**
* @param args
*/
public static void main(String[] args) {
System.out.println("Hello worl... | [
0.1674218475818634,
-0.19590099155902863,
0.2992250323295593,
0.0393194779753685,
-0.00876470748335123,
0.014293387532234192,
0.288859486579895,
-0.11979939788579941,
-0.34179559350013733,
-0.47206926345825195,
-0.31305551528930664,
0.1442868858575821,
-0.09035608917474747,
0.1839442998170... | |
In WPF, there are two ways to set the focus to an element.
You can either call the .Focus() method of the input element, or call Keyboard.Focus() with the input element as parameter.
```
// first way:
item.Focus();
// alternate way:
Keyboard.Focus(item);
```
What is the difference between these two? Are there spe... | [
0.14906728267669678,
-0.4537801742553711,
0.6520708203315735,
-0.1957228034734726,
-0.16398507356643677,
0.09000788629055023,
-0.2182348221540451,
-0.4434778094291687,
-0.24720261991024017,
-0.6308351755142212,
-0.047340668737888336,
0.5961441397666931,
-0.30056232213974,
-0.08408229798078... | |
it makes calls to `FocusManager`, as decasteljau has answered.
The following are copied from disassambler view in [Reflector](http://reflector.red-gate.com/).
This is from `UIElement` (`UIElement3D` is the same):
```
public bool Focus()
{
if (Keyboard.Focus(this) == this)
{
return true;
}
if ... | [
0.44494596123695374,
-0.49330151081085205,
0.720684826374054,
-0.3756335973739624,
0.007607541047036648,
-0.07782056927680969,
0.10911884903907776,
-0.05198046565055847,
-0.13339470326900482,
-0.5396844148635864,
-0.3439490497112274,
0.9262862801551819,
-0.5529049634933472,
0.0813958123326... | |
FocusManager.SetFocusedElement(focusScope, this);
}
}
return false;
}
```
This is from `ContentElement`:
```
public bool Focus()
{
return (Keyboard.Focus(this) == this);
}
``` | [
0.4860174059867859,
-0.3840656876564026,
0.6059779524803162,
-0.39224404096603394,
0.1323963701725006,
-0.2580420970916748,
-0.06903856247663498,
0.11088448017835617,
-0.09010220319032669,
-0.5578401684761047,
-0.5634875893592834,
0.9898440837860107,
-0.5555967688560486,
-0.061612170189619... | |
The following code has a simple binding which binds the Text of the TextBlock named MyTextBlock to TextBox's Text and ToolTip property using the exact same Binding notation:
```
<StackPanel>
<TextBlock x:Name="MyTextBlock">Foo Bar</TextBlock>
<TextBox Text="{Binding ElementName=MyTextBlock, Path=Text, Strin... | [
-0.22424107789993286,
0.21769098937511444,
0.8205538988113403,
-0.36982807517051697,
-0.2836759686470032,
-0.2058832049369812,
0.29280537366867065,
-0.4642515480518341,
-0.08952723443508148,
-0.694634199142456,
-0.13077884912490845,
0.3698706030845642,
-0.17958912253379822,
0.1907225251197... | |
Foo Bar" but when you hover over the TextBox, the ToolTip shows only the binding value, not the string formatted value. Any ideas?
The following is a wordy solution but it works.
```
<StackPanel>
<TextBox Text="{Binding Path=., StringFormat='The answer is: {0}'}">
<TextBox.DataContext>
<sys:Int32>42</sys:... | [
0.002084042178466916,
0.3802565336227417,
0.8148419857025146,
-0.6256082653999329,
-0.21273206174373627,
0.03449767082929611,
0.24611981213092804,
-0.33753907680511475,
0.04505449905991554,
-0.3273855447769165,
0.12867480516433716,
0.6770205497741699,
-0.6225055456161499,
-0.27165192365646... | |
I'm trying to select data from a table defined similar to the following :
```
Column | Data Type
-------------------------
Id | Int
DataType | Int
LoggedData | XML
```
but I only want to select those rows with a specific DataType value, and that contain a string (or evaluates a piece of XPa... | [
0.4768259525299072,
0.4317721724510193,
0.48400700092315674,
-0.035900142043828964,
0.09404166787862778,
0.07705194503068924,
0.0210159532725811,
-0.0671953558921814,
-0.11641795933246613,
-0.5706421732902527,
0.004902889486402273,
0.4108961820602417,
-0.16526789963245392,
0.17158220708370... | |
but if anyone can help me out on this in the mean time, I'd really appreciate it.
**EDIT** \_ Clarification
So, what I'm after is something like this, but in the correct format...
```
select Id, LoggedData from myTable where DataType = 29 and LoggedData.query('RootNode/ns1:ChildNode[@value="searchterm"]');
```
Sti... | [
0.11671387404203415,
0.014674234203994274,
0.2091115415096283,
0.10192292183637619,
0.05163159966468811,
-0.08524581789970398,
-0.2357020527124405,
0.13658957183361053,
-0.18227559328079224,
-0.8493766188621521,
0.06936800479888916,
0.37768039107322693,
-0.24582645297050476,
0.310647100210... | |
What is an example of a fast SQL to get duplicates in datasets with hundreds of thousands of records. I typically use something like:
```
SELECT afield1, afield2 FROM afile a
WHERE 1 < (SELECT count(afield1) FROM afile b WHERE a.afield1 = b.afield1);
```
But this is quite slow.
This is the more direct way:
```
sel... | [
0.2011476457118988,
0.05163109302520752,
0.057589396834373474,
0.23120920360088348,
0.27609983086586,
0.07012946158647537,
-0.32131245732307434,
-0.30676621198654175,
-0.3276631832122803,
-0.19341082870960236,
0.32027485966682434,
0.3957592844963074,
-0.42460593581199646,
0.243258476257324... | |
Is there any good bug tracker based on .NET which is free?
Two bug trackers I know:
* [BugTracker.NET](http://www.ifdefined.com/bugtrackernet.html)
> BugTracker.NET is a free, open-source,
> web-based bug tracker or customer
> support issue tracker written using
> ASP.NET, C#, and Microsoft SQL Server
> (or its f... | [
0.38858625292778015,
-0.06102943420410156,
-0.06846609711647034,
0.28312432765960693,
-0.01563381403684616,
0.08446837216615677,
0.062043480575084686,
0.16907045245170593,
-0.3165903091430664,
-0.6747150421142578,
0.21998053789138794,
0.5030731558799744,
-0.4828450083732605,
-0.28574451804... | |
any scale. | [
-0.12248432636260986,
-0.1399015635251999,
-0.034445621073246,
0.4263502061367035,
-0.41843166947364807,
-0.09533573687076569,
0.01361787412315607,
0.08691389113664627,
-0.31894567608833313,
-0.4554256796836853,
0.2302488088607788,
0.11856450885534286,
-0.07917005568742752,
0.3026449382305... | |
My application is implemented as a service (running under services.exe).
I am adding a new feature which requires being notified when the user sends an SMS.
I have tried using `IMAPIAdviseSink`, registering with both `IMAPISession` and `IMsgStore`, but I do not get any notifications.
The other options I can see are t... | [
0.330073744058609,
0.12673348188400269,
0.4239485561847687,
-0.1524597555398941,
-0.08030784130096436,
-0.030113158747553825,
0.7268096804618835,
0.12194197624921799,
-0.3092271685600281,
-0.7105492949485779,
-0.10797849297523499,
0.516919732093811,
-0.4246646761894226,
0.09683995693922043... | |
written in native C++. I've looked into RIL and several other APIs, but I can only find information about getting notified of incoming SMSs.
OK, some more information: The same code for registering my `IMAPIAdviseSink` works in a stand alone app. It's only failing to get notifications in the service.
Is there anyway ... | [
0.19254828989505768,
0.15480637550354004,
0.16550272703170776,
-0.04972336068749428,
-0.18947984278202057,
-0.030293816700577736,
0.7107715606689453,
0.1223590075969696,
-0.10718752443790436,
-0.456132709980011,
0.09149323403835297,
0.42999669909477234,
-0.4617830216884613,
-0.046850662678... | |
Not too long ago, I had a problem which required me to [set WinDbg.exe as the default post-mortem debugger](https://stackoverflow.com/questions/186237/program-only-crashes-as-release-build-how-to-debug). Now that I've fixed that and am back doing normal work, it would be really nice if I could set VS to be my default p... | [
0.289014995098114,
0.015177556313574314,
0.38178303837776184,
-0.017282351851463318,
-0.1599103808403015,
-0.19622379541397095,
0.23413439095020294,
-0.15363846719264984,
-0.34441229701042175,
-0.6252226829528809,
-0.20445607602596283,
0.6050055623054504,
-0.02391236461699009,
0.3341504335... | |
the debugger to the active line in the project that's already open?
from the [Microsoft support page](http://support.microsoft.com/kb/121434):
```
1. Start Registry Editor and locate the following Registry subkey in the HKEY_LOCAL_MACHINE subtree:
\SOFTWARE\MICROSOFT\WINDOWS NT\CURRENTVERSION\AEDEBUG
2. Select the ... | [
-0.05914280191063881,
0.12357506155967712,
0.4681989252567291,
0.05911927670240402,
0.04380729794502258,
-0.1572072058916092,
0.5439355373382568,
-0.09173022955656052,
0.03675302863121033,
-0.5800466537475586,
-0.6482653617858887,
0.557417631149292,
-0.3893809914588928,
0.19344939291477203... | |
also make Dr. Watson the default debugger by running this command:drwtsn32.exe -i.
4. Choose OK and exit Registry Editor.
``` | [
-0.16758203506469727,
0.14830106496810913,
0.5060622692108154,
-0.007268177345395088,
0.6688351035118103,
-0.26664403080940247,
0.4015835225582123,
0.35401105880737305,
-0.25453680753707886,
-0.5469591617584229,
-0.3409179151058197,
0.644319474697113,
-0.549410343170166,
0.5013189315795898... | |
I'm looking for a very specific eclipse plugin that will tell me if a class in my project is not implementing hashCode or/and equals methods.
Does anyone know of such a plugin?
Thanks
Can you not use the [Checkstyle plugin](http://eclipse-cs.sourceforge.net/) and write your own Checkstyle rule? (There's a Checkstyle ... | [
0.36560168862342834,
0.08336438983678818,
-0.3704982101917267,
0.19679822027683258,
-0.31032171845436096,
-0.34446048736572266,
0.338348388671875,
0.2731259763240814,
-0.07927077263593674,
-0.59330153465271,
0.18241575360298157,
0.6156811118125916,
-0.32764187455177307,
-0.2185392230749130... | |
Is there any way to use C# to build a container application where each tab is actually its own process like with Google chrome?
You can use the [SetParent](http://pinvoke.net/default.aspx/user32/SetParent.html) Win32 call to do this, but it's really fraught with problems. I had enough troubles getting it all to work ni... | [
0.3731591999530792,
-0.09762569516897202,
0.39513710141181946,
0.1382792592048645,
0.0017299865139648318,
0.21695199608802795,
0.051786839962005615,
-0.12228286266326904,
-0.2023504078388214,
-0.5163838863372803,
0.0910307914018631,
0.5298094749450684,
-0.44230419397354126,
0.1712216585874... | |
I'd think very carefully before doing it. For a browser it makes a lot of sense (disclaimer: I work for Google) but for most other apps it's really not worth the effort.
(Are the "tabs" you want to create actual .NET apps? If so, as I say this becomes significantly easier - and I can give you a big hint which is that ... | [
0.6740914583206177,
-0.06785927712917328,
0.39619508385658264,
0.11221843957901001,
-0.05091927945613861,
-0.11228451132774353,
0.4206189811229706,
0.2209370881319046,
-0.36942216753959656,
-0.6347171664237976,
0.017298981547355652,
0.3445008397102356,
-0.25727131962776184,
-0.115286514163... | |
We're running a Rails site at <http://hansard.millbanksystems.com>, on a dedicated Accelerator. We currently have Apache setup with mod-proxy-balancer, proxying to four mongrels running the application.
Some requests are rather slow and in order to prevent the situation where other requests get queued up behind them, ... | [
0.4044840335845947,
-0.02664020098745823,
0.1235302984714508,
0.1296803057193756,
-0.13376395404338837,
-0.06036979332566261,
0.06699495017528534,
-0.14387920498847961,
-0.33451592922210693,
-0.5631251335144043,
0.060442764312028885,
0.4040074348449707,
-0.20542044937610626,
-0.06146110221... | |
anything obvious? We'd be very grateful for your advice.
Apache is a bit of a strange beast to use for your balancing. It's certainly capable but it's like using a tank to do the shopping.
Haproxy/Nginx are more specifically tailored for the job. You should get higher throughput and use fewer resources at the same ti... | [
0.6718616485595703,
-0.1599031537771225,
-0.21248747408390045,
0.3557768166065216,
-0.4199398159980774,
-0.15630808472633362,
0.046074312180280685,
0.11368132382631302,
0.1831313818693161,
-0.40317755937576294,
0.2807098627090454,
0.6620482206344604,
0.10345139354467392,
-0.186574801802635... | |
what is the best way to put a container class or a some other class inside a class as private or a public member?
Requirements:
1.Vector< someclass> inside my class
2.Add and count of vector is needed interface
If the container's state is part of the class's invariant, then it should, if possible, be private.
For e... | [
0.05926860123872757,
-0.21643918752670288,
0.14913339912891388,
0.2537021040916443,
-0.10847368836402893,
-0.02427343837916851,
0.1649206280708313,
-0.38463321328163147,
-0.3384284973144531,
-0.6347571015357971,
0.18886379897594452,
0.37155136466026306,
-0.3875264823436737,
0.2597057223320... | |
routine which requires the container's size to be constant. Keeping the container private limits the places in your software where the container's size can be modified to the class's member functions. | [
0.4732899069786072,
-0.34588977694511414,
-0.18146970868110657,
0.1491183489561081,
0.27866649627685547,
-0.1817329078912735,
0.33743274211883545,
-0.13825242221355438,
-0.4552636444568634,
-0.20952598750591278,
-0.011589722707867622,
0.6051144599914551,
-0.40197035670280457,
0.18457292020... | |
I wanted to edit a log comment in the repository browser and received an error message that no pre-revprop-change hook exists for the repository. Besides having a scary name, what is a pre-revprop-change hook, and how do I create it?
Basically it's a script that is launched before unversioned property is modified on th... | [
0.5495301485061646,
-0.13498777151107788,
0.17378641664981842,
-0.033734772354364395,
0.13685570657253265,
-0.008842493407428265,
0.190828338265419,
-0.08359295129776001,
-0.1551925092935562,
-0.35480669140815735,
-0.03495827317237854,
0.5241684913635254,
-0.20637314021587372,
0.1366589814... | |
I'm using the jquery library to load the content of an html file. Something like this:
$("#Main").load("login.html")
If the file (in this case 'login.html') does not exist, I would like to detect it so that I can redirect the user to an error page for example. Any ideas how I can detect if the file to load exists or ... | [
0.30521440505981445,
-0.05822434276342392,
0.051299434155225754,
0.0976412370800972,
-0.23098289966583252,
-0.43909117579460144,
0.19530704617500305,
0.24524159729480743,
-0.1511605679988861,
-0.8603188991546631,
0.08287283778190613,
0.6615768074989319,
-0.11760177463293076,
-0.10243177413... | |
if (settings.status===404){
//redirect here
}
});
``` | [
-0.06583026796579361,
-0.11203452944755554,
0.4554843604564667,
-0.2858502268791199,
0.6430048942565918,
-0.11564081162214279,
0.20601624250411987,
-0.012548808008432388,
0.07257165014743805,
-0.47125548124313354,
-0.5467750430107117,
0.7827823162078857,
-0.23170912265777588,
0.30992630124... | |
I have a self-hosted service that I want to add transport security to.
I've set WSHttpBinding.SecurityMode to Transport and the ClientCredentialType to HttpClientCredentialType.None.
I've created a certificate and set it to my host with
ServiceHost.Credentials.ServiceCertificate.SetCertificate()
I've also registered it... | [
0.10449902713298798,
0.2759321928024292,
0.7057103514671326,
-0.11393473297357559,
-0.02352929301559925,
-0.17735639214515686,
0.6934078335762024,
-0.27446356415748596,
-0.11119174212217331,
-0.7521880269050598,
0.053551893681287766,
0.4345855116844177,
-0.27051329612731934,
0.396447390317... | |
looking for any authentication atm, just securing the messages content, if that's even possible.
I assume you are complaining about the minimal height of the middle row (the one containing only rowspanned cells), and the enlarged height of the adjacent rows to compensate, leaving gaps between the divs.
IE cannot calcu... | [
0.15849976241588593,
0.16337670385837555,
0.3713565170764923,
0.12526975572109222,
0.1709694117307663,
-0.06577913463115692,
0.4093165993690491,
-0.147833913564682,
-0.32016807794570923,
-0.30545276403427124,
-0.0036459804978221655,
0.27958372235298157,
-0.3360745310783386,
-0.465113341808... | |
should be.
But yes, depending on what you're planning to do with this, a CSS layout may well be more appropriate. If it's really a fixed-pixels-for-everything layout like this example, absolute positioning for each div will be a lot, lot easier.
Other bits: CSS width/height values require units (presumably 'px'); val... | [
0.34499242901802063,
-0.2088215947151184,
0.3958211839199066,
0.30906230211257935,
0.03931448236107826,
-0.0921253114938736,
0.012581401504576206,
-0.19685854017734528,
-0.11268056184053421,
-0.842719554901123,
-0.20204968750476837,
0.4613083302974701,
-0.16239142417907715,
-0.371454536914... | |
I'm writing code that looks similar to this:
```
public IEnumerable<T> Unfold<T>(this T seed)
{
while (true)
{
yield return [next (T)object in custom sequence];
}
}
```
Obviously, this method is never going to return. (The C# compiler silently allows this, while R# gives me the warning *"Function... | [
0.21453015506267548,
-0.007147671654820442,
0.08974272012710571,
-0.08309450000524521,
0.06760448217391968,
-0.06988944858312607,
0.38927769660949707,
-0.0700000748038292,
-0.12967953085899353,
-0.5470992922782898,
-0.0565250962972641,
0.36256924271583557,
-0.3754771947860718,
0.2368111312... | |
condition, which are the options? E.g:
* an object of type T that represents the inclusive or exclusive boundary
* a `Predicate<T> continue` (as `TakeWhile` does)
* a count (as `Take` does)
* ...
Should we rely on users calling `Take(...)` / `TakeWhile(...)` after `Unfold(...)`? (Maybe the preferred option, since it ... | [
0.16908207535743713,
-0.39439257979393005,
0.22036905586719513,
-0.16086533665657043,
0.2075224071741104,
-0.08271262049674988,
0.21950818598270416,
-0.16043482720851898,
0.011398261412978172,
-0.45008009672164917,
-0.2808840274810791,
0.5343027710914612,
-0.15854665637016296,
-0.043551344... | |
I think it's fine. Indeed, it can make some algorithms much neater. I don't believe there are any significant memory/perf implications - although if you refer to an "expensive" object within your iterator, that reference will be captured.
There are always ways of abusing APIs: so long as your docs are clear, I think i... | [
0.564688503742218,
0.1290152370929718,
0.12944258749485016,
0.2589288651943207,
0.1668366938829422,
-0.11663755774497986,
0.24150730669498444,
0.132083460688591,
-0.2849266231060028,
-0.2592534124851227,
0.2066662758588791,
0.9740994572639465,
-0.060256000608205795,
0.03561050444841385,
... | |
I want to do this (no particular language):
```
print(foo.objects.bookdb.books[12].title);
```
or this:
```
book = foo.objects.bookdb.book.new();
book.title = 'RPC for Dummies';
book.save();
```
Where foo actually is a service connected to my program via some IPC, and to access its methods and objects, some layer... | [
0.5083456039428711,
0.37101513147354126,
0.5262399315834045,
-0.2586250305175781,
-0.07157135009765625,
-0.09146581590175629,
0.14003829658031464,
-0.14910636842250824,
-0.2851145267486572,
-0.3531078100204468,
-0.1204121932387352,
0.4400165379047394,
-0.4022050201892853,
0.200825691223144... | |
words, how can I have OOP that maps transparently over process boundaries?
Not that this is a design question and I'm still working at a pretty high level of the overall architecture. So I'm pretty agnostic yet about which language this is going to be in. C#, Java and Python are all likely to get used, though.
You sho... | [
0.3982836604118347,
0.4020048975944519,
0.016409091651439667,
0.11904187500476837,
-0.11432290077209473,
-0.07101421058177948,
0.4435538947582245,
0.34537526965141296,
-0.27559301257133484,
-0.604793906211853,
0.07930751144886017,
0.46898186206817627,
-0.15414682030677795,
0.15965320169925... | |
and that will lead to very poorly performing code.
Think of:
```
foreach o, o.isGreen in someList {
o.makeBlue;
}
```
The programmer assumes that the loops takes a few nanoseconds to complete, instead it takes close to a second if someList happens to be remote. | [
0.2488887906074524,
-0.08603458106517792,
0.1906011700630188,
-0.11274100840091705,
0.3368494510650635,
-0.28417378664016724,
0.4980660676956177,
-0.23887783288955688,
0.00957381073385477,
-0.5613676309585571,
-0.2775970995426178,
0.07536418735980988,
-0.21582448482513428,
0.20645178854465... | |
Does anyone know where I can find a library of common but difficult (out of the ordinary) SQL script examples. I am talking about those examples you cannot find in the documentation but do need very often to accomplish tasks such as finding duplicates etc.
It would be a big time saver to have something like that handy... | [
0.4911670982837677,
0.4358863830566406,
-0.1147042065858841,
0.49596521258354187,
-0.1002904549241066,
-0.45092475414276123,
0.47923940420150757,
0.5527518391609192,
-0.1819295734167099,
-0.6827629804611206,
0.2733897268772125,
0.41293102502822876,
0.33324211835861206,
0.21953709423542023,... | |
to those that have already done so!
You may find [this wiki on LessThanDot](http://wiki.lessthandot.com/index.php/Category:Microsoft_SQL_Server) useful, for the most part, it is by Denis Gobo, Microsoft SQL MVP.
EDIT:
The wiki includes **100+ SQL Server Programming Hacks**, the list is, I think, too long to include he... | [
0.7203469276428223,
0.25264161825180054,
-0.3369244337081909,
0.03710852190852165,
-0.3135426640510559,
-0.1897909790277481,
0.36212611198425293,
-0.08519359678030014,
-0.03021175041794777,
-0.3870942294597626,
-0.11464221030473709,
0.273668497800827,
-0.12913966178894043,
0.11628987640142... | |
I have a JUnit 3.x TestCase which I would like to be able to parameterize. I'd like to parametrize the entire `TestCase` (including the fixture). However, the `TestSuite.addTestSuite()` method does not allow be to pass a `TestCase` object, just a class:
```
TestSuite suite = new TestSuite("suite");
suite.addTest... | [
0.32837268710136414,
-0.001491984468884766,
0.41043969988822937,
-0.038343049585819244,
-0.0029981699772179127,
-0.20670270919799805,
0.16261938214302063,
-0.1815255582332611,
0.436519056558609,
-0.883632242679596,
0.14169137179851532,
0.5728142261505127,
-0.39748328924179077,
0.1450598090... | |
MyTestCase() {
String getOption() {
return "some value";
}
}
suite.addTestSuite(testCase.getClass());
```
However, this fails with the assertion:
```
... MyTestSuite$1 has no public constructor TestCase(String name) or TestCase()`
```
Any ideas? Am I attacking the problem the wro... | [
0.24621228873729706,
-0.02207355387508869,
0.27241966128349304,
-0.04798351973295212,
0.0014123634900897741,
-0.22258588671684265,
0.3726527988910675,
-0.0825267881155014,
0.4663463234901428,
-0.7447108030319214,
-0.11399395018815994,
0.8187430500984192,
-0.3814740777015686,
-0.07737059891... | |
I only just recently discovered that Visual C++ 2008 (and perhaps earlier versions as well?) supports `for each` syntax on stl lists et al to facilitate iteration.
For example:
```
list<Object> myList;
for each (Object o in myList)
{
o.foo();
}
```
I was very happy to discover it, but I'm concerned about portabil... | [
0.023289993405342102,
0.4571598172187805,
0.3500170409679413,
-0.3297039568424225,
-0.3649848401546478,
0.02361256815493107,
0.21840660274028778,
0.07590395957231522,
-0.4520753026008606,
-0.6103927493095398,
0.05900220945477486,
0.5090364217758179,
-0.3686014711856842,
-0.0488043539226055... | |
compile this code in gcc or g++, you will need to create an iterator and use a standard for loop.
QuantumPete
[edit]
This seems to be a new feature introduced into MS Visual C++, so this is definitely not portable. Ref: <http://msdn.microsoft.com/en-us/library/xey702bw%28VS.80%29.aspx> [/edit] | [
0.27806979417800903,
-0.08044459670782089,
0.27178946137428284,
-0.02063947729766369,
-0.11706994473934174,
-0.37477418780326843,
0.3990146219730377,
-0.006170385982841253,
-0.10688623040914536,
-0.4485296905040741,
-0.1041417345404625,
0.26588010787963867,
-0.5624465346336365,
0.009307042... | |
Is there a way to describe the module's data in a similar way that a docstring describes a module or a funcion?
```
class MyClass(object):
def my_function():
"""This docstring works!"""
return True
my_list = []
"""This docstring does not work!"""
```
To my knowledge, it is not possible to ... | [
0.3320958912372589,
0.06296076625585556,
0.4403191804885864,
-0.14912503957748413,
-0.030463341623544693,
-0.18744279444217682,
0.24354153871536255,
-0.4056010842323303,
-0.21154601871967316,
-0.2694566547870636,
-0.29203346371650696,
0.7169216275215149,
-0.4312340021133423,
-0.11952622234... | |
the word "spam"
"""
data = "spam"
``` | [
0.2370159775018692,
0.3537510931491852,
0.23169143497943878,
-0.2608412504196167,
-0.18943269550800323,
-0.48823192715644836,
0.5067163705825806,
0.5228122472763062,
-0.2798878252506256,
-0.021385233849287033,
-0.4858011305332184,
0.2774696946144104,
-0.4122762680053711,
0.3900865912437439... | |
So I need to generate a code that can be tied to a specific user/prospect with a dollar amount built into it. It needs to be reversible so that client application can confirm the validity of the code and apply the discount a manager intends.
I'd like to make the code as short as possible but it needs to be well obfusc... | [
0.9577804803848267,
0.200136199593544,
0.12528832256793976,
0.2290959358215332,
0.17557081580162048,
0.24883219599723816,
0.05559622496366501,
0.03346160426735878,
-0.0673571452498436,
-0.22501811385154724,
0.3240715265274048,
0.45582115650177,
0.17521804571151733,
-0.12570449709892273,
... | |
practices from the community.
I'm doing this in C# but I expect that methods from any language can be translated.
edit:
to clarify. I can't store this stuff ahead of time, the codes have to be built on the fly and carry all the information with them.
eg. Salesman 14 calls in about client 773 and wants to give them ... | [
0.8999675512313843,
0.26408299803733826,
0.5346131920814514,
-0.0020402439404278994,
0.2805638015270233,
0.14555825293064117,
0.1647118330001831,
-0.48131924867630005,
-0.0013513718731701374,
-0.53413325548172,
0.03202778100967407,
0.7261015176773071,
0.006431805435568094,
-0.3092679977416... | |
and coupon value using the private key. Publish the coupon value + signature as the coupon code, encoded, for example, using letters and numbers. The client application would verify the code by recreating the combination of data that was originally signed (e.g., prepend the user ID to the coupon value) and then verifyi... | [
0.43235155940055847,
0.2918665409088135,
0.3033076822757721,
0.28350764513015747,
0.11991288512945175,
0.1575060486793518,
-0.3022761642932892,
-0.44292712211608887,
-0.06190173700451851,
-0.11268628388643265,
-0.2887418270111084,
0.4458312392234802,
-0.03440059348940849,
-0.19409810006618... | |
I'm using libcurl in a Win32 C++ application.
I have the curllib.vcproj project added to my solution and set my other projects to depend on it.
How do I build it with SSL support enabled?
Well, since this post failed badly, I had to dig into the matter myself.
***Also check out the other answers and comments for ad... | [
-0.027437981218099594,
0.2529926598072052,
0.7085298895835876,
-0.3255610167980194,
-0.10607387125492096,
-0.2651585340499878,
0.3755628764629364,
0.002595211612060666,
0.004896569065749645,
-0.769923210144043,
-0.1642547994852066,
0.14949513971805573,
-0.48944130539894104,
-0.041260678321... | |
OpenSSL for SSL support)
Alternatively the symbols can be added directly to a file called setup.h in libcurl, but I'm not too happy about modifying code in 3rd party distributions unless I really have to.
Rebuilding the libcurl library, I now got some errors about OpenSSL include files not being found. Naturally, sin... | [
0.41147997975349426,
0.0667976513504982,
0.3243229389190674,
-0.06633134186267853,
-0.1735260784626007,
-0.5220852494239807,
0.430855393409729,
-0.14580608904361725,
0.02098902128636837,
-0.912722647190094,
-0.21838828921318054,
0.6056613326072693,
-0.46968337893486023,
-0.0956291332840919... | |
version of ActivePerl.
I had some trouble with the build, which might not be applicable to all systems, but I'll go through it here in case somebody experiences the same.
According to INSTALL.W32:
Run the following commandline tasks with current directory set to the source distribution root:
```
1> perl Configure V... | [
-0.059008367359638214,
-0.3206019699573517,
0.7868927717208862,
-0.37127500772476196,
-0.06997320055961609,
-0.13956184685230255,
0.48474082350730896,
-0.0931294858455658,
0.032782647758722305,
-0.6390803456306458,
-0.2069985568523407,
0.8304457664489746,
-0.6871298551559448,
0.11783437430... | |
You may get complaint about OSVERSION being "insane", but look closer, this error is for WinCE and doesn't affect the Win32 setup. To get hold of your OS version, run the 'ver' command from a command prompt or run winver.exe.
```
3> nmake -f ms\nt.mak (for static library)
```
or
```
3> nmake -f ms\ntdll.mak (for DL... | [
0.39237675070762634,
0.2607268691062927,
0.4277089536190033,
-0.18938274681568146,
0.06584084033966064,
-0.15367001295089722,
0.5845978260040283,
-0.2393733561038971,
-0.09768705815076828,
-0.9236543774604797,
-0.32532742619514465,
0.8075880408287048,
-0.5147619247436523,
-0.04586603119969... | |
are located in **distroot/inc32/openssl**.
Remember to add *libeay32.lib* and *ssleay32.lib* as linker input.
Rebuild the libcurl project.
**Error!**
Well at least for me with this version of OpenSSL.
it complained about a struct typedef in one of the OpenSSL headers. I couldn't find any info on this. After an h... | [
0.07971205562353134,
0.3096837103366852,
0.45448964834213257,
0.01862264983355999,
-0.2228281944990158,
-0.3685818612575531,
0.6147872805595398,
0.21697857975959778,
-0.2568170130252838,
-0.9634817838668823,
-0.21515601873397827,
0.526859700679779,
-0.5012154579162598,
0.17284820973873138,... | |
the following code:
```
curl_version_info_data * vinfo = curl_version_info( CURLVERSION_NOW );
if( vinfo->features & CURL_VERSION_SSL )
// SSL support enabled
else
// No SSL
```
---
Simple as that. | [
0.1149117648601532,
-0.026566281914711,
0.8216509222984314,
-0.3560996949672699,
-0.08585914224386215,
-0.4743357002735138,
0.13225892186164856,
-0.013544578105211258,
-0.13535819947719574,
-0.5063886046409607,
-0.4287339448928833,
0.5120058059692383,
-0.19485120475292206,
-0.0789005905389... | |
Basically, what I need is something like [Dependecy Walker](http://www.dependencywalker.com/), but it should work with .NET applications. Is there anywhere such tool?
[Reflector](http://www.red-gate.com/products/reflector/index.htm) - previously from Lutz Roeder, now from Red-Gate software. | [
0.6036837100982666,
-0.10574343800544739,
0.2539081573486328,
-0.3101080060005188,
-0.17206716537475586,
0.20183128118515015,
-0.08858460187911987,
-0.505926251411438,
0.07318620383739471,
-0.46019256114959717,
-0.03655466064810753,
0.5230236053466797,
-0.3487298786640167,
-0.0799008607864... | |
Someone asked me how familiar I am with VC++ and how familiar I am with C++. What is the difference?
C++ is the actual language, VC++ is Microsoft's Visual C++, an IDE for C++ development.
From [stason.org](http://stason.org/TULARC/webmaster/lang/c-cpp-faq/20-What-is-the-difference-between-C-and-Visual-C.html):
> C++... | [
0.4313041865825653,
0.22404946386814117,
0.39575791358947754,
-0.11427576839923859,
-0.4219813644886017,
0.005529207643121481,
-0.22083288431167603,
-0.06376209855079651,
-0.2581520974636078,
-0.36796391010284424,
-0.052052151411771774,
0.7040113210678101,
0.17444312572479248,
0.1254530102... | |
I'm just starting up a new ATL/WTL project and I was wondering if the global \_Module variable is still required?
Back a few years when I started working with WTL it was required (at least for ATL 3.0) that you define a global variable such as:
```
CAppModule _Module;
```
To get ATL to work correctly. But recently... | [
0.27389195561408997,
-0.05484551936388016,
0.37900587916374207,
-0.011869081296026707,
-0.1475611925125122,
-0.2715471088886261,
0.09248730540275574,
0.24432232975959778,
-0.5010859966278076,
-0.3403073251247406,
-0.029250897467136383,
0.7841423749923706,
-0.45450112223625183,
0.1132180392... | |
stuff.
So do I still need to define a global variable to use ATL these days?
Technically you do not need a global `_Module` instance since ATL/WTL version 7. Earlier ATL/WTL code referenced `_Module` by this specific name and expected you to declare a single instance of this object. This has since been replaced by a s... | [
0.42519432306289673,
-0.083648681640625,
0.6646578907966614,
0.07722851634025574,
-0.13887031376361847,
-0.5686792731285095,
0.28785479068756104,
0.2785375118255615,
-0.6027985215187073,
-0.5633817315101624,
-0.08423733711242676,
0.625953197479248,
-0.524976909160614,
0.39648500084877014,
... | |
want a singleton instance of a CComModule base class. However, it doesn't need to be named `_Module`. | [
0.23824159801006317,
0.036863669753074646,
-0.15044882893562317,
0.2895784080028534,
0.24657738208770752,
-0.5075138211250305,
0.0075350599363446236,
0.07266486436128616,
-0.29910042881965637,
-0.47389692068099976,
-0.17312034964561462,
0.42053571343421936,
-0.3745253086090088,
0.255140036... | |
What are the pros and cons of using [Criteria](http://docs.jboss.org/hibernate/orm/4.1/manual/en-US/html/ch17.html) or [HQL](http://docs.jboss.org/hibernate/orm/4.1/manual/en-US/html/ch16.html)? The Criteria API is a nice object-oriented way to express queries in Hibernate, but sometimes Criteria Queries are more diffi... | [
0.2786779999732971,
-0.0376354344189167,
0.3989561200141907,
0.028226174414157867,
-0.3524555265903473,
-0.00014329087571240962,
0.05959921330213547,
-0.3604888319969177,
-0.11157318204641342,
-0.6033860445022583,
-0.05342487618327141,
0.6851379871368408,
-0.24906258285045624,
-0.074470929... | |
because it's much easier to understand/read HQL. Also, HQL is a bit more powerful, I think, e.g. for different join types. | [
0.10152959078550339,
-0.012182937003672123,
0.21286289393901825,
-0.08847206085920334,
-0.2899228036403656,
-0.5684375762939453,
0.06681505590677261,
0.036491069942712784,
-0.27308282256126404,
-0.5987029075622559,
-0.22966714203357697,
0.09029137343168259,
-0.323446661233902,
-0.123358406... | |
What is the best way to determine how many window handles an application is using? Is there a tool or a WMI performance counter that I could use?
I would like to run up an app and watch a counter of some sort and see that the number of window handles is increasing.
```
for (int i=0; i < 1000; i++)
{
System.Threa... | [
0.09902164340019226,
0.12312950938940048,
0.7134777903556824,
-0.1423906534910202,
0.0601247176527977,
0.08468993008136749,
0.33795294165611267,
-0.5971134305000305,
-0.2494838535785675,
-1.0298073291778564,
-0.005724839400500059,
0.7955888509750366,
-0.30118727684020996,
0.056408870965242... | |
to be increasing. Is there something I am looking at incorrectly?
Perfmon, which comes with your computer can do it. You can also add a column to your task manager processes tab (Handle Count).
Instructions for Perfmon
1. Add a counter (click the +)
2. Choose Process under Performance object
3. Choose Handle Count un... | [
0.0582612045109272,
-0.12448766082525253,
0.8254317045211792,
0.057620298117399216,
-0.22041165828704834,
0.3673323094844818,
0.313827782869339,
-0.542110025882721,
-0.3994653820991516,
-0.5150931477546692,
0.21930789947509766,
0.5751138925552368,
-0.25650256872177124,
0.0897233635187149,
... | |
just proved that creating RichTextBoxes doesn't result in Handles being allocated. I don't think it really needs one until you are editing the control and it might be smart enough to do that, since allocating too many resources for a control that isn't active would make it hard to have a lot of controls on a form (thin... | [
0.00387563556432724,
-0.038100577890872955,
-0.04724377021193504,
0.44800299406051636,
-0.027584709227085114,
-0.2707638442516327,
-0.04289284721016884,
0.16105997562408447,
-0.15290668606758118,
-0.7295440435409546,
0.11577530950307846,
0.18438731133937836,
-0.18415233492851257,
-0.072519... | |
I have inherited a load of VB6 code which has tons of individual OCX files, each of which contain a single control. I have two questions:
Firstly, Is it possible to refactor them so that I can have a single OCX file with all the OCX's in it?
Secondly, if it is possible, how do I do this?
TIA
Yes this is possible.
... | [
0.4897744357585907,
0.0573771595954895,
-0.18992678821086884,
0.3060672879219055,
0.25437140464782715,
-0.09279367327690125,
-0.04076915234327316,
-0.3176816999912262,
-0.24216412007808685,
-0.5304004549980164,
0.044751234352588654,
0.5301612019538879,
-0.24430277943611145,
0.2973982691764... | |
sense to group related controls together into a single project, as long as you group controls according to some kind of logic. For example, the Forms 2.0 library groups "commonly-used" controls together (Textbox, Checkbox, Combobox, Label, etc.) into a single library. | [
0.2528025805950165,
-0.26757097244262695,
0.23394523561000824,
0.3029397428035736,
-0.12671196460723877,
-0.3685908913612366,
-0.0037104689981788397,
-0.6366100311279297,
-0.05426229536533356,
-0.6875930428504944,
-0.09293489903211594,
0.1642005294561386,
-0.6023067831993103,
-0.0452812723... | |
I must implement a web service which expose a list of values (integers, custom classes etc).
My working solution returns a `List<T>`, and according to FxCop it is better to return a `Collection<T>` or `ReadOnlyCollection<T>`.
If I choose to return a `ReadOnlyCollection<T>`, the web service shows an error like:
> To b... | [
0.3021279573440552,
0.1713619828224182,
0.2928019165992737,
0.024591661989688873,
-0.005042731296271086,
-0.02918897196650505,
0.12932094931602478,
-0.3573164939880371,
-0.23228919506072998,
-0.6627018451690674,
-0.10940951853990555,
0.6030845642089844,
-0.21784330904483795,
0.322718560695... | |
2.0 only)
List<T> or Collection<T> are fine in this case.
In terms of the original question, you can wrap a List<T> in a Collection<T> very simply:
```
List<Foo> list = new List<Foo>();
// ...
Collection<Foo> col = new Collection<Foo>(list);
```
This is a true wrapper; add an item to the wrapper (col), and it gets ... | [
0.10059858858585358,
-0.2659849226474762,
0.18530458211898804,
-0.09761437773704529,
-0.039638105779886246,
-0.031642403453588486,
-0.05998878553509712,
-0.38483861088752747,
-0.2764981985092163,
-0.5425999760627747,
-0.3281347155570984,
0.3452655076980591,
-0.691498339176178,
0.0889623612... | |
blog](http://blogs.msdn.com/ericlippert/archive/2008/09/22/arrays-considered-somewhat-harmful.aspx)) to prevent a caller stomping over the callee's memory - but in a web-service distributed scenario that simply doesn't apply. In fact, since web-services have a few well documented issues with certain generic scenarios, ... | [
0.15696369111537933,
0.07108815014362335,
0.4601193368434906,
0.06698182225227356,
-0.3604634702205658,
-0.41535401344299316,
0.2917676568031311,
-0.47445622086524963,
-0.5518839955329895,
-0.18238741159439087,
0.05235902965068817,
0.5355880260467529,
-0.3899894654750824,
0.010292939841747... | |
is most convenient. | [
0.11427178233861923,
0.11656097322702408,
0.4040999114513397,
0.27337533235549927,
0.3233968913555145,
0.12196995317935944,
-0.18814077973365784,
0.41718488931655884,
0.27286577224731445,
-0.5418709516525269,
-0.19118671119213104,
0.15106435120105743,
0.23496758937835693,
0.028773654252290... | |
I have a .Net 2.0/3.5 WebApplication.
I want to be able to take money over the internet for my service.
Each of my customers will have an AccountNo.
I wish to offer several products each of which will have fixed price.
I need for my customer to login to my system and elect to pay me money for a product of their cho... | [
0.7888394594192505,
-0.09766747057437897,
0.2576749920845032,
0.09252727031707764,
0.17112521827220917,
0.28330036997795105,
-0.05718807131052017,
0.21008646488189697,
-0.09993612766265869,
-0.8093699812889099,
0.2888491451740265,
0.4191160798072815,
0.05478547140955925,
0.0153205990791320... | |
years and found it to be a good solution.
I eventually switched to regnow but only because I wanted to take advantage of their affiliate network.
Here are some options:
* [2checkout.com](http://2checkout.com)
* [regnow](http://regnow.com) (also has affiliate network)
* [paypal](https://www.paypal.com/) - In contrast ... | [
0.6146596074104309,
-0.4040606915950775,
0.44532713294029236,
0.2152976542711258,
0.07361909002065659,
0.19534485042095184,
0.2318332940340042,
0.618541419506073,
-0.3267257809638977,
-0.6504061222076416,
0.2339857816696167,
0.28510531783103943,
-0.004205439705401659,
0.38010796904563904,
... | |
When I am developing a bunch of designers/tools, what are some of the best fit patterns that go with a VSX Package and/or VSX Isolated Shell Package?
Any samples, links would be great.
Take a look at the Windows version of truecrypt. It is one of the best organized open source projects I've ever seen. You can almost t... | [
0.5924276113510132,
-0.208852618932724,
-0.19169208407402039,
0.2688850462436676,
0.06954753398895264,
-0.32933509349823,
0.23365026712417603,
0.336426317691803,
0.04437895491719246,
-0.6387931704521179,
0.10006226599216461,
0.614575207233429,
-0.24161335825920105,
-0.05768471583724022,
... | |
As a follow up to [an earlier question](https://stackoverflow.com/questions/186900/tool-for-web-server-redirect-management) that attracted a whole zero answers, I'm wondering about the possibilities of allowing a web server (apache) to write to its own document root (Linux), in order to dynamically create meta-redirect... | [
0.11469876766204834,
0.049452830106019974,
0.30880439281463623,
0.12060409784317017,
-0.03528888523578644,
-0.22988146543502808,
0.3071676790714264,
-0.16769656538963318,
-0.2260233759880066,
-0.5240780115127563,
0.09412917494773865,
0.4574018716812134,
-0.2561172842979431,
0.2509858906269... | |
a set of [RewriteMap](http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html#rewritemap) directives to do your dynamic redirection, there's no need to write files in the document root to accomplish that.
I answered similarly in the [other question](https://stackoverflow.com/questions/186900/tool-for-web-server-redirect... | [
0.028905773535370827,
-0.2243339568376541,
0.6540332436561584,
-0.02616090327501297,
-0.10612213611602783,
-0.11428198218345642,
0.6633914709091187,
-0.4191785752773285,
-0.4700382351875305,
-0.2137138545513153,
-0.2502933144569397,
0.6168093085289001,
-0.2657548785209656,
-0.2452131509780... | |
With ASP.NET's view engine/template aspx/ashx pages the way to spit to screen seems to be:
```
<%= Person.Name %>
```
Which was fine with webforms as alot of model data was bound to controls programatically. But with MVC we are now using this syntax more oftern.
The issue I have with it is quite trivial, but anno... | [
0.14000177383422852,
-0.0024763033725321293,
0.388619065284729,
-0.1550716906785965,
-0.6643489003181458,
-0.16319836676120758,
0.3344099819660187,
-0.1633259803056717,
-0.11219384521245956,
-0.6669904589653015,
0.05183633044362068,
0.1724139302968979,
-0.40653592348098755,
0.1782296746969... | |
means of spitting to screen with out opening and closing the script tags using standard keyword such as "print, out, echo" i.e. (brail example):
```
<%
for element in list:
output "<li>${element}</li>"
end
%>
```
Now, I said this may seem trivial, but it just seems more readable this way. So what are the adv... | [
0.3161713778972626,
0.38890305161476135,
-0.004021534230560064,
-0.38092559576034546,
-0.7025015950202942,
0.23392775654792786,
0.7623494267463684,
-0.16619549691677094,
0.005279583390802145,
-0.4279091954231262,
0.31072771549224854,
0.5899671912193298,
-0.28731676936149597,
-0.15579368174... | |
the toolset here at the office.)
EDIT: I apparently missed the actual question ... :)
Microsoft does provide an output method, but didn't provide a syntax like the one you describe. The output method is `Response.Write()`. I can't answer this directly (I believe you'll need to check with Scott Hanselmann over at MS :... | [
0.0754714235663414,
0.21204836666584015,
0.10740760713815689,
-0.01829543709754944,
-0.1451389342546463,
-0.18014688789844513,
0.21919973194599152,
-0.016079934313893318,
-0.12404321134090424,
-0.5651634931564331,
-0.11509300768375397,
0.7331108450889587,
-0.2776431739330292,
-0.2004508078... | |
of the answer.
If you head over to the [Learn MVC site on ASP.NET](http://www.asp.net/learn/mvc/tutorial-04-cs.aspx), in the view tutorial (that's the link), you'll see the following paragraph:
> Since you call `Response.Write()` so
> often, Microsoft provides you with a
> shortcut for calling the
> `Response.Writ... | [
-0.1719212681055069,
-0.1447383165359497,
0.5187995433807373,
-0.26033127307891846,
-0.26058608293533325,
0.23688380420207977,
0.1461593508720398,
-0.3180018961429596,
-0.21132239699363708,
-0.4565138518810272,
-0.515141487121582,
0.6375628113746643,
-0.09393662214279175,
0.062484875321388... | |
I'd like to use Rich Text Editing in place on forms in order to let admins change instructions. What are the best options for doing this?
[To be more clear - the admins are non-technical but may want to control some formatting without using markup or with as little markup as possible. What I'd like is for them to be a... | [
0.468048095703125,
0.2759661078453064,
0.15320400893688202,
0.21876245737075806,
-0.14542829990386963,
-0.280194491147995,
0.10719747841358185,
0.08209367096424103,
-0.09922119975090027,
-0.79222571849823,
-0.04885030537843704,
0.7474967837333679,
-0.25080880522727966,
-0.6078919172286987,... | |
to know is which Rich Test Editing plugins are the best for use in Rails. Easiest to implement, clearest API, easiest to use inline, etc... ]
We started with [TinyMCE](http://tinymce.moxiecode.com/) but we are switching to Yahoo's [Rich Text Editor](http://developer.yahoo.com/yui/editor/) because there were some weird ... | [
0.41671690344810486,
-0.1753220409154892,
0.1235855221748352,
0.34146589040756226,
-0.08736886084079742,
-0.2604467570781708,
0.024081798270344734,
0.014098702929913998,
0.07153172791004181,
-0.5226855278015137,
0.25433680415153503,
0.5396338701248169,
-0.22500692307949066,
-0.204036444425... | |
I wonder what the best way to make an entire tr clickable would be?
The most common (and only?) solution seems to be using JavaScript, by using onclick="javascript:document.location.href('bla.htm');" (not to forget: Setting a proper cursor with onmouseover/onmouseout).
While that works, it is a pity that the target U... | [
-0.2902250289916992,
-0.05956241860985756,
0.8989505171775818,
0.24235424399375916,
0.03168569505214691,
-0.08388309180736542,
0.16345591843128204,
0.30465978384017944,
-0.3929719924926758,
-0.6578714847564697,
-0.20840802788734436,
0.6732314825057983,
-0.2094932496547699,
0.05397631973028... | |
or unfortunately, most modern browsers do not let you control the status bar anymore (it was possible and popular back in the day) because of fraudulent intentions.
Your better bet would be a title attribute or a [javascript tooltip](http://www.google.com/search?q=javascript+tooltip). | [
0.43125587701797485,
-0.02588355541229248,
0.2830677628517151,
0.251217246055603,
0.3414565324783325,
-0.31775474548339844,
0.2838283181190491,
0.22081945836544037,
-0.40693047642707825,
-0.16116398572921753,
-0.07625369727611542,
0.5366708636283875,
0.0931987389922142,
0.10537780821323395... | |
Looking for a c# library that interfaces to multiple merchant gateways.
Should at minimum be able to handle PayPal and authorize.
I've used [dotnetcharge](http://www.dotnetcharge.com/) with success. They have support for something like 50 payment processors, plus (most importantly), data storage encryption for credit c... | [
0.4470091462135315,
-0.09268593043088913,
0.5134589672088623,
0.13806356489658356,
0.10892853140830994,
0.09210215508937836,
-0.05323633924126625,
0.2782819867134094,
-0.2717460095882416,
-0.9941235780715942,
0.23193588852882385,
0.4129331409931183,
-0.028056301176548004,
-0.18007831275463... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.