text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
on the other thread have an underlying optimization to prevent searching the entire list?**
EDIT: I really didn't get any answers that were all that helpful but I will give credit to the answer that at least confirmed my common sense belief. If I notice a new answer that is better, I will change my vote.
If you're on... | [
0.5518341064453125,
-0.027443138882517815,
0.22431208193302155,
0.47829490900039673,
-0.24978035688400269,
-0.03312104567885399,
0.4283495545387268,
0.05224933475255966,
-0.2078808844089508,
-0.4303281903266907,
0.1744048148393631,
0.5904502272605896,
-0.08781780302524567,
-0.1345068067312... | |
you expect to search through only a subset of the data if it isn't sorted? | [
0.45851901173591614,
0.06159691885113716,
-0.4810609221458435,
0.2549116611480713,
0.1380385160446167,
-0.3018781840801239,
0.13134697079658508,
-0.03157871589064598,
-0.3937116265296936,
-0.19786593317985535,
-0.112400121986866,
0.3810702860355377,
-0.19714540243148804,
-0.170810401439666... | |
I'm trying to use Live Search 2.0 but even a simple example doesn't seem to work. Microsoft only has example code for 1.1 and they're not giving out AppIDs for that version.
Here's what I'm trying with:
```
<?php
$server = new SoapClient('http://soap.search.msn.com/webservices.asmx?wsdl');
class Search {
public ... | [
0.24808984994888306,
-0.01861896552145481,
0.572913646697998,
-0.12019839882850647,
-0.0472688153386116,
0.1113642230629921,
0.4241848289966583,
-0.2774152457714081,
0.11377599835395813,
-0.9110151529312134,
0.025901859626173973,
0.6081801056861877,
-0.494440495967865,
0.14167892932891846,... | |
public $FileType;
public $SortBy;
public $ResultFields;
public $SearchTagFilters;
}
$searchRequest = new SourceRequest();
$searchRequest->Source = 'Web';
$searchRequest->Offset = 0;
$searchRequest->Count = 5;
$searchRequest->ResultFields = 'All SearchTagsArray';
$request = new SearchRequest();
$request->A... | [
0.05710982903838158,
0.15587617456912994,
0.5086560249328613,
0.052869316190481186,
0.20379501581192017,
0.20796507596969604,
0.5037844181060791,
-0.6241950392723083,
-0.2298843264579773,
-0.4256672263145447,
-0.3361669182777405,
0.504488468170166,
-0.720118522644043,
0.2416096180677414,
... | |
line 41
```
You could begin by using the proper soap api url for 2.0.
It's now
"<http://api.search.live.net/search.wsdl?AppID=YourAppId>" taken from (<http://msdn.microsoft.com/en-us/library/dd250965.aspx> )
You can also use the new JSON api with php.
```
$appid = 'Your app id';
$searchitem = 'PHP Manual';
$requ... | [
0.065889373421669,
0.2587035000324249,
0.9154825210571289,
-0.2282690554857254,
0.03978505730628967,
0.33081796765327454,
0.2984510362148285,
-0.3556245267391205,
-0.05119241029024124,
-0.7116972804069519,
-0.4251362383365631,
0.5061118602752686,
-0.26608625054359436,
-0.0817594900727272,
... | |
link as well and it can be fetched essentially the same way as the json you just need to decode it differently. | [
0.15619996190071106,
-0.328926682472229,
0.43868008255958557,
0.5192959904670715,
-0.32712578773498535,
-0.17304149270057678,
-0.04711535945534706,
0.2173731029033661,
-0.07311049848794937,
-0.5769174098968506,
-0.011010102927684784,
0.3242409825325012,
-0.28365668654441833,
0.085670761764... | |
I'm working with an application that logs to Windows Application Log regularly (viewable through the Event Viewer administrative tool), and I'm looking for a way to back it up on a daily basis. This is important because we sometimes discover a problem with the application - and to investigate further we need informatio... | [
0.42574983835220337,
0.07633716613054276,
0.2694159746170044,
0.13512346148490906,
0.27349546551704407,
-0.29576703906059265,
0.015041930601000786,
0.17246133089065552,
-0.5119876265525818,
-0.4822555184364319,
0.026941385120153427,
0.5201827883720398,
0.006960497237741947,
0.0436712540686... | |
would *prefer* a simple solution like batch file + Windows Scheduler, but would also be interested in other approaches.
Thanks
Here is a WMI script that I found a while ago. This could be what you're searching!
```
dim strComputer = "." 'Define here the Remote IP Address or Computername
dim objWMIService
dim colLogFi... | [
-0.08633903414011002,
-0.007835420779883862,
0.7806816697120667,
-0.057934995740652084,
0.15637633204460144,
-0.12238326668739319,
0.5654942393302917,
-0.3616046607494354,
-0.2836299240589142,
-0.6151130199432373,
-0.25997355580329895,
0.4478554427623749,
-0.18004748225212097,
-0.075124241... | |
"The " & logtype &" event log could not be backed up."
Else
objLogFile.ClearEventLog()
Wscript.Echo "The " & logtype &" event log is backed up."
End If
Next
End Function
```
Just set-up this script in a scheduled task and you're good to go! | [
0.20576360821723938,
-0.08301741629838943,
0.6484754681587219,
-0.21151289343833923,
0.4005371630191803,
-0.6379333734512329,
0.6561407446861267,
-0.0831521525979042,
-0.15796920657157898,
-0.3834353983402252,
-0.4672485291957855,
0.8377814888954163,
-0.16020242869853973,
-0.13787969946861... | |
Right now we just use something like this
```
stopWatch.Start();
try
{
method();
}
finally
{
stopWatch.Stop();
}
```
Which | [
0.2968307435512543,
-0.27257993817329407,
0.4643663167953491,
-0.12366850674152374,
0.3541543781757355,
-0.235968679189682,
0.05045115947723389,
0.11605718731880188,
-0.3640255033969879,
-0.6555262804031372,
-0.013330698944628239,
0.6883696913719177,
-0.46767204999923706,
-0.06110587343573... | |
works fine for synchronous methods, but some are executing asynchronously, so the time is skewed when multiple threads are executing. Is there an equivalent to System.Diagnostics.Stopwatch that will measure only time spend in the current thread?
We want to collect data over an extended period of time in our internal b... | [
0.5471276640892029,
-0.33173057436943054,
0.23077189922332764,
-0.02222670055925846,
0.18979167938232422,
-0.08441678434610367,
0.45892682671546936,
-0.19600053131580353,
-0.1910763829946518,
-0.47386711835861206,
0.15910062193870544,
0.1711476445198059,
-0.4065643846988678,
-0.02484644018... | |
mark, I want something that would tell me that Method1 spent about 1 second executing and Method2 spend about 3 seconds executing (Assuming during the first 2 seconds they shared the (assumed single core) processor equally.
Hmm, from Jon Skeet's answer to this question:
[Timing a line of code accurately in a threaded ... | [
0.26070767641067505,
0.26964616775512695,
0.11451373994350433,
0.059229426085948944,
-0.0008987349574454129,
-0.006192298140376806,
0.25268012285232544,
-0.30382466316223145,
-0.3818865716457367,
-0.23681052029132843,
0.42356857657432556,
0.2754119336605072,
0.06118910759687424,
-0.1817276... | |
Hey all, I have something of an interesting requirement for my project. I need a `has_one` relationship where it is either one class or the other, but without inheritance. I could get away with inheritance if it is the only way, but the two associate records have completely different data and aren't related at all.
Wh... | [
0.4479338824748993,
0.46550819277763367,
0.1624726504087448,
0.07481013238430023,
-0.06254372745752335,
-0.3085077404975891,
0.1707664430141449,
0.1225583478808403,
-0.37199538946151733,
-0.17525120079517365,
0.1938992738723755,
0.1953328549861908,
-0.5008418560028076,
0.3904561400413513,
... | |
aren't
# related in either data or implementation.
class Foo < ActiveRecord::Base
# Attributes: id, name, value
has_one :assignment, :foreign_key => 'assigned_to', :readonly => true
# Could really use an :object_type for has_one here...
end
class Bar < ActiveRecord::Base
# Attributes: name,...
end
... | [
0.21839962899684906,
0.2523423731327057,
0.4442336857318878,
-0.047254834324121475,
0.09606026113033295,
-0.18651869893074036,
-0.1347704529762268,
-0.2911277413368225,
-0.25419095158576965,
-0.5302698612213135,
0.1395672708749771,
0.4912009835243225,
-0.6125369071960449,
0.210123345255851... | |
contain really is oranges and apples) must I make a table for the record? Can I perhaps get away with it if the record is an abstract record, but the children aren't?
I suppose by now you can see my difficulty. I'm rather new to RoR but loving it so far. I'm sure there's a way around this, but I'll be darned if I can'... | [
0.4186601936817169,
0.5141921043395996,
0.2062690109014511,
0.2527049481868744,
0.016863299533724785,
-0.04896274954080582,
0.06553705036640167,
0.05798004940152168,
-0.40900692343711853,
-0.35334253311157227,
0.3642723560333252,
0.32245200872421265,
-0.3854171931743622,
0.4160805940628052... | |
this rule. It should be a clue that it's a broken design when the *documentation* says you must forgo a referential integrity constraint to make it work!
**You need Foo to have two `has_one` relationships**: one to Bar and one to Baz. Then implement some class logic to try to ensure only one reference is populated in ... | [
0.34432899951934814,
0.2888856530189514,
0.16683922708034515,
-0.05081002041697502,
0.022463709115982056,
-0.3882867097854614,
0.2960233688354492,
-0.051644645631313324,
-0.3182731568813324,
-0.4602668285369873,
0.0974566638469696,
0.504548192024231,
-0.5518691539764404,
0.1885703057050705... | |
I am trying to use the actual numerical value for the month on a sql query to pull results. Is there any way to do this without having a function to change the numbers to actual month names, then back to month numbers? The following code works for Names, what works for numbers?
> datename(month,(convert(datetime,DTSTA... | [
0.27243781089782715,
0.09083805978298187,
0.4804825484752655,
0.13573111593723297,
-0.12127736210823059,
0.27954035997390747,
0.26147350668907166,
0.1161520779132843,
-0.26265889406204224,
-0.35715270042419434,
0.32531288266181946,
0.17371320724487305,
0.02218535542488098,
0.23271939158439... | |
I'm trying to achieve something google isn't able to give answer. I'm trying to create an asp.net usercontrol that when I put content into it's open close tag will include it for me to be still able to acess it's content by ID from the Parent. Here is an exemple of what I want to achieve.
Usercontrol:
```
<%@ Control... | [
0.13145381212234497,
-0.04125092551112175,
0.6147642731666565,
0.08662224560976028,
-0.03406974673271179,
-0.055085040628910065,
0.3107423782348633,
-0.25578776001930237,
-0.2071739137172699,
-0.6851378083229065,
-0.14454156160354614,
0.4660509526729584,
-0.24769537150859833,
-0.1623872667... | |
<img id="imgOpenClose" src="/images/application/close.jpg" alt="" />
</div>
</asp:Panel>
<asp:PlaceHolder runat="server" ID="pnlContent">
// **HERE I WANT TO INCLUDE THE INSIDE MARKUP**
</asp:PlaceHolder>
<act:CollapsiblePanelExtender runat="server" TargetControlID="pnlContent" ImageControlID="imgOpenClose"
Exp... | [
-0.3955824077129364,
0.144041508436203,
0.5218957662582397,
0.15196636319160461,
0.00951563660055399,
0.07914247363805771,
0.017557255923748016,
-0.6080385446548462,
-0.024716977030038834,
-0.747948408126831,
-0.38450366258621216,
0.3926815092563629,
-0.13569672405719757,
-0.18451659381389... | |
<asp:Literal ID="litText" runat="server" />
</ItemTemplate>
</uc:MyUserControl>
```
But If I do this I wouldn't be able to access the property of litText and the only way I could reach it is with a FindControl, which I want to avoid.
Anyone have a hint on this if I can reach my goal one way or another?
Thank y... | [
-0.06318727135658264,
0.06054837629199028,
0.6578305959701538,
0.11026173830032349,
0.009099584072828293,
-0.11058780550956726,
0.30065444111824036,
-0.012071814388036728,
-0.10388944298028946,
-0.8444759249687195,
-0.17140759527683258,
0.41295719146728516,
-0.21160343289375305,
0.25810998... | |
void RegisterUpdatePanel(UpdatePanel panel)
{
MethodInfo m =
(from methods in typeof (ScriptManager).GetMethods(BindingFlags.NonPublic | BindingFlags.Instance)
where methods.Name.Equals("System.Web.UI.IScriptManagerInternal.RegisterUpdatePanel")
select methods).First();
m.Invoke(Scrip... | [
-0.024038182571530342,
-0.19939713180065155,
0.6082232594490051,
-0.17832033336162567,
0.13408233225345612,
0.34710511565208435,
0.3996787965297699,
-0.6578995585441589,
-0.13106141984462738,
-0.6078216433525085,
-0.19040429592132568,
0.3118686079978943,
-0.15778379142284393,
0.10624408721... | |
{
// In cas there is an updatepanel in the control we are moving
// We are registering an event to register the updatepanel
// to the scriptmanager again
SearchUpdatePanel(Controls[i + 2]); | [
-0.39466825127601624,
-0.23350000381469727,
0.3301815688610077,
-0.06489872932434082,
0.44561266899108887,
0.06525644659996033,
-0.1686926633119583,
0.020776964724063873,
0.012108810245990753,
-0.6630310416221619,
-0.2015226185321808,
0.4168185591697693,
0.01254420354962349,
-0.14055033028... | |
plhContent.Controls.Add(Controls[i + 2]);
}
base.CreateChildControls();
}
private void SearchUpdatePanel(Control control)
{
if (control is UpdatePanel)
control.Unload += updPnl_Unload;
foreach (Control childcontrol in control.Controls)
SearchUpdatePanel(childcontrol);
}
protec... | [
-0.14943765103816986,
-0.18036068975925446,
0.5947735905647278,
-0.08525030314922333,
0.31319454312324524,
0.3823162317276001,
0.10901860892772675,
-0.3139893710613251,
-0.1532846987247467,
-0.49060142040252686,
-0.2161855250597,
0.2799886465072632,
-0.0788586214184761,
0.1437574177980423,... | |
know what I'm receiving. The the procedure basically say loop in the controls in the UserControl, when you will reach the end of UserControl, everything after is innerHTML from parent so take those and move them to the placeholder where I want them.
I hope this will help someone.
Here is some sources I used to achiev... | [
0.22524568438529968,
-0.21813423931598663,
0.7645303606987,
-0.15012463927268982,
-0.103379987180233,
0.10269626975059509,
0.1477663815021515,
0.22725872695446014,
-0.321113258600235,
-0.4150581359863281,
-0.09071372449398041,
0.061861246824264526,
-0.04700790345668793,
0.37594398856163025... | |
I started using NetBeans for Python development, and so far it looks pretty good. One thing that bothers me is that when I highlight a few lines of text and hit the Tab key, it doesn't do what almost every other editor does, but rather just adds four spaces at the end of the block.
I know NetBeans has a block indent a... | [
0.13440369069576263,
-0.06086720526218414,
0.31497815251350403,
-0.18323588371276855,
-0.20194128155708313,
-0.009416185319423676,
0.15689712762832642,
0.18465834856033325,
-0.35168924927711487,
-0.4629402756690979,
-0.023654701188206673,
0.4712129533290863,
-0.28265976905822754,
-0.136704... | |
it work like Eclipse/IntelliJ/Notepad2 and do a block indent on Tab.
Any tips?
**EDIT:** OK, so it seems that this behavior only occurs if I select a bunch of lines and the cursor is positioned on an empty line. This looks like a bug, so I'm going to file a report.
Thanks guys!
**EDIT 2:** In case anyone's interes... | [
0.11833194643259048,
-0.17471738159656525,
0.37983131408691406,
0.1561371088027954,
-0.12899553775787354,
-0.2768206000328064,
0.4101627469062805,
0.4769974648952484,
-0.4380376636981964,
-0.5736339688301086,
0.055920183658599854,
0.5374398827552795,
-0.3778003752231598,
-0.276498109102249... | |
Is there a way to automatically publish a website to multiple locations at once?
Our website is load balanced across multiple servers, so when I want to publish I have to do it to each server individually.
Thx,
Trev
Perhaps with some build scripts, such as MSBuild? Or perhaps you could create a script (PowerShell, VB... | [
0.5587312579154968,
0.032234933227300644,
0.5890821814537048,
0.22929057478904724,
0.055163078010082245,
-0.1703926920890808,
0.22439609467983246,
0.05257387086749077,
-0.28949224948883057,
-0.6942580938339233,
-0.15498603880405426,
0.4203878343105316,
-0.03522981330752373,
-0.005931399762... | |
I came across a problem in my current application that required fiddling with the query string in a base `Page` class (which all my pages inherit from) to solve the problem. Since some of my pages use the query string I was wondering if there is any class that provides clean and simple query string manipulation.
Examp... | [
0.27098554372787476,
0.07157370448112488,
0.41268500685691833,
0.13017454743385315,
-0.053926583379507065,
-0.22516164183616638,
0.3327390253543854,
-0.14784714579582214,
-0.186993807554245,
-0.6837552189826965,
-0.13811789453029633,
0.1778278350830078,
-0.3523795008659363,
0.4094481170177... | |
suggested (and then deleted).
This will work, because the return value from that method is actually an `HttpValueCollection`, which inherits `NameValueCollection` (and is internal, you can't reference it directly). You can then set the names/values in the collection normally (including add/remove), and call `ToString`... | [
-0.11590161919593811,
-0.40313220024108887,
0.5798776745796204,
-0.07267437875270844,
0.0993838757276535,
-0.04796440526843071,
0.08738882094621658,
-0.29708316922187805,
0.05703805387020111,
-0.4828561246395111,
-0.2613341510295868,
0.280188649892807,
-0.2711296081542969,
0.25913929939270... | |
I've implemented my own event handler and added it to the selection model of the table:
```
table.getSelectionModel().addListSelectionListener(event);
```
And implemented the method for "event" (mentioned above):
```
public void valueChanged(ListSelectionEvent e) {
log.debug("value changed");
}
```
Unfortunat... | [
0.11483286321163177,
0.043136514723300934,
0.011565487831830978,
-0.17024217545986176,
-0.16089728474617004,
-0.18903973698616028,
0.2243770807981491,
-0.3981287479400635,
-0.4178471267223358,
-0.6622879505157471,
0.06756773591041565,
0.607987105846405,
-0.3797909915447235,
-0.184629797935... | |
de-selecting the old selection and once for selecting the new selection. If you log the details of the event you should see exactly what's going on. I can't remember the details, so perhaps this is wrong. Either way you should be able to call getValueIsAdjusting() on the event and only use the last one in the chain (ie... | [
0.24025759100914001,
-0.039219893515110016,
0.028655022382736206,
0.024192925542593002,
-0.32976335287094116,
-0.034433476626873016,
0.45239338278770447,
-0.477100133895874,
-0.03027452901005745,
-0.5918956995010376,
-0.00425419257953763,
0.8348631262779236,
-0.1703575700521469,
0.03511272... | |
I am new to threads and in need of help. I have a data entry app that takes an exorbitant amount of time to insert a new record(i.e 50-75 seconds). So my solution was to send an insert statement out via a ThreadPool and allow the user to begin entering the data for the record while that insert which returns a new recor... | [
0.4765251576900482,
-0.018225189298391342,
0.1335902065038681,
-0.06279312074184418,
0.11143975704908371,
-0.07027999311685562,
0.4000781774520874,
0.01933663710951805,
-0.08820374310016632,
-0.5083765387535095,
0.40302199125289917,
0.48337164521217346,
-0.13108056783676147,
0.384941995143... | |
an event from that thread when it is safe to save. I then put in
```
while (safeToSave == false)
{
Thread.Sleep(200)
}
```
I think that is a bad idea. If i run the save method before that tread returns, it gets stuck.
So my questions are:
1. Is there a better way of doing this?
2. What am I doing wro... | [
0.38527441024780273,
-0.0787503719329834,
0.06657906621694565,
0.07486271858215332,
0.3226565420627594,
-0.011504227295517921,
0.41933751106262207,
-0.04532397910952568,
-0.20546653866767883,
-0.6211917400360107,
0.2917136549949646,
0.44841712713241577,
-0.30806389451026917,
0.063137233257... | |
on it.
And before you ask, no I cannot change the structure of it as it was here before I was and there is a ton of legacy code hitting it. The first problem is, in order to get a new ID I must first find the max(id) in the table then increment and checksum it. That takes about 45 seconds. Then the first insert is s... | [
0.7222573757171631,
-0.03980972617864609,
0.05543843284249306,
0.19819609820842743,
0.1797805279493332,
-0.1429561972618103,
0.33884650468826294,
-0.14046066999435425,
-0.15349064767360687,
-0.867596447467804,
0.13320408761501312,
0.593978762626648,
0.1009078100323677,
0.1444695144891739,
... | |
the proccess correct and I think for the short term I will just disable the save button, but I will be looking into your idea of passing it into a queue. Do you have any references to MSMQ that I should take a look at?
Everyone else, including you, addressed the core problems (insert time, why you're doing an insert, t... | [
0.29533785581588745,
-0.14385035634040833,
0.5517300367355347,
0.036065198481082916,
0.1872132122516632,
-0.1339680403470993,
0.08517051488161087,
0.08962033689022064,
-0.45398885011672974,
-0.3908153772354126,
-0.03219887986779213,
0.6644666790962219,
-0.39265409111976624,
0.0399550162255... | |
always enabled,
if user tries to save before Thread
2 completes, you put #1 to sleep for
200 ms?
The simplest, not best, answer is to just have the button disabled, and have that thread make a [callback](http://msdn.microsoft.com/en-us/library/system.threading.waitcallback.aspx "callback") to a delegate that enables t... | [
0.14357492327690125,
-0.28107666969299316,
0.57928866147995,
0.009528412483632565,
0.24831841886043549,
-0.10277239978313446,
0.29447728395462036,
0.1266591101884842,
-0.37694108486175537,
-0.6068806648254395,
-0.30526629090309143,
0.6070869565010071,
-0.39759963750839233,
-0.0267451647669... | |
put into something like MSMQ and they can complete in their own time asynchronously. | [
0.3450332581996918,
-0.0050965952686965466,
0.08235001564025879,
0.2342110574245453,
0.3098698556423187,
-0.005313657224178314,
0.23206686973571777,
0.18336284160614014,
-0.02321496605873108,
-0.8904951214790344,
-0.3196256756782532,
0.1766567975282669,
0.23484095931053162,
-0.090789847075... | |
Okay, so basically I want to be able to retrieve keyboard text. Like entering text into a text field or something. I'm only writing my game for windows.
I've disregarded using Guide.BeginShowKeyboardInput because it breaks the feel of a self contained game, and the fact that the Guide always shows XBOX buttons doesn't ... | [
0.1403857171535492,
-0.032087426632642746,
0.3714030385017395,
0.09640047699213028,
0.1154450997710228,
-0.13338233530521393,
0.04803033545613289,
0.03473890572786331,
-0.12003261595964432,
-0.6032360792160034,
0.20571771264076233,
0.6500785946846008,
-0.18886810541152954,
0.20412263274192... | |
for other messages, WM\_CHAR and WM\_KEYDOWN never did. So I had to abandon that idea, and besides, I was also referencing the whole of Windows forms, which meant unnecessary memory footprint bloat.
So my last idea was to create a Thread level, low level keyboard hook. This has been the most successful so far. I get W... | [
0.01083376631140709,
0.027939774096012115,
0.5736311078071594,
-0.29128026962280273,
0.11527165025472641,
0.26993483304977417,
0.6649612784385681,
0.1907612383365631,
-0.1842040717601776,
-0.7245802879333496,
0.07835321128368378,
0.7880055904388428,
-0.12003882974386215,
0.0668443217873573... | |
key. (Of course it's not however, it's just that there is only one Virtual Key Code per key, so translating it only has one output) and it adds overhead as it attaches itself to the Windows Hook List and isn't as fast as I'd like it to be, but the slowness could be more due to Debug.Write.
Has anyone else approached t... | [
0.11916155368089676,
0.12707757949829102,
0.32757851481437683,
0.23765088617801666,
0.27340206503868103,
-0.0892590880393982,
0.4337529242038727,
0.0572773739695549,
-0.03929390385746956,
-0.5488912463188171,
-0.12081342190504074,
0.7384793162345886,
0.005581967998296022,
-0.10738538205623... | |
XNA Keyboard and KeyboardState classes?
My comment:
> It's because though you can read keystates, you can't get access to typed text as and how it is typed by the user.
So let me further clarify. I want to implement being able to read text input from the user as if they are typing into textbox is windows. The keyboa... | [
0.12020206451416016,
-0.10831501334905624,
0.204143226146698,
-0.28489789366722107,
-0.12130259722471237,
0.01020777691155672,
0.1203562393784523,
-0.24231906235218048,
0.015359826385974884,
-0.5887335538864136,
0.1387508362531662,
0.5288492441177368,
-0.131753072142601,
0.0710080191493034... | |
shift + 2, while american keyboards have theirs somewhere near the return key).
---
it seems my window hook was the way to go, just the reason I wasn't getting WM\_CHAR is because the XNA message pump doesn't do translate message.
Adding TranslateMessage in whenever I received a WM`_`KEYDOWN message meant I got my ... | [
-0.10280988365411758,
-0.0729992538690567,
0.6157897114753723,
-0.553985595703125,
-0.33912983536720276,
0.13984917104244232,
0.2851179540157318,
-0.22659818828105927,
0.09862351417541504,
-0.5042940974235535,
0.05792379751801491,
0.8104382157325745,
-0.4463777244091034,
-0.308956325054168... | |
thanks to Jimmy for a link to a very informative thread.
Maybe I'm not understanding the question, but why can't you use the XNA Keyboard and KeyboardState classes? | [
0.47290557622909546,
0.09548360109329224,
-0.008131260052323341,
0.4980667233467102,
0.13118135929107666,
-0.3118777871131897,
0.18327674269676208,
0.7427834272384644,
-0.3442350924015045,
-0.6147196292877197,
0.2305174320936203,
0.22049155831336975,
0.04082511365413666,
0.0377966649830341... | |
We have been reading and writing Sticky Notes/Annotations/Comments to pdfs via an activex control in our application for a number of years. We have recently upgraded to Delphi2009 with Unicode Support. The following is causing problems.
When we call
CAcroPDAnnot.GetContents
The results seem to be rather strange an... | [
0.035593029111623764,
0.28364434838294983,
0.40923261642456055,
0.15294112265110016,
-0.3647027909755707,
0.12798099219799042,
0.0028805125039070845,
0.14983797073364258,
-0.002225675852969289,
-0.7049926519393921,
0.056566838175058365,
0.4050515294075012,
-0.03682683780789375,
0.111460223... | |
is written to file as something like
0kˆL0Oeå0k˜¨ª0’0r0D0\_0‰
The latter can be export and reimported into an acrobat pdf and will recreate the correct unicode characters. However once I call CAcroPDAnnot.GetContents in my code it is coming back as something else.
1. Is CAcroPDAnnot.GetContents broken?
2. Is there ... | [
-0.08209805935621262,
0.03898895904421806,
0.3453436493873596,
0.275597482919693,
-0.26000431180000305,
0.11155758798122406,
0.2919330298900604,
-0.11218402534723282,
0.10233371704816818,
-0.32245200872421265,
-0.09724800288677216,
0.32237306237220764,
-0.08501026779413223,
0.1917115747928... | |
find a way to detect what encoding the document is in and convert it manually.
I don't know what Delphi provides for reading encodings, but have you got the encodings for Shift-JIS installed in Windows, from the Control Panel -> Regional Options -> "Install files for East Asian languages" option? If not, that might ex... | [
0.1924099177122116,
0.010011354461312294,
0.06268103420734406,
0.42834287881851196,
0.12637561559677124,
-0.013347569853067398,
-0.07693985104560852,
0.07842536270618439,
-0.008721308782696724,
-0.6718709468841553,
-0.11710351705551147,
0.47129330039024353,
0.008917202241718769,
-0.3790040... | |
I am fairly new to using infragistics controls (started yesterday). While they are (very) impressive they do add another layer of complexity, which I am muddeling through. So I am asking what I feel to be a fairly simple issue:
I am trying to get the value from another column besides the one that is displayed in the c... | [
0.26891666650772095,
-0.06773094087839127,
0.1844969093799591,
0.0493776835501194,
-0.01858965866267681,
0.13235776126384735,
0.0065616099163889885,
-0.16424666345119476,
-0.20074109733104706,
-0.6612955331802368,
0.08614014089107513,
0.4898250997066498,
-0.2588091790676117,
0.143757954239... | |
selected and place it in a textbox.
The below code I have so far retruns the header column (LastName) and nothing else no matter which row I select.
```
Private Sub ucboPatientInfo_RowSelected(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinGrid.RowSelectedEventArgs) Handles ucboPatientInfo.RowSelected
... | [
-0.34833624958992004,
0.2486030012369156,
0.7939816117286682,
-0.18454083800315857,
0.030712569132447243,
0.28855445981025696,
0.027622319757938385,
-0.17627446353435516,
-0.04684028401970863,
-0.6232908964157104,
-0.08129774034023285,
0.49538668990135193,
0.1097831279039383,
0.25237941741... | |
I am trying to make one field in a datagrid editable with a numeric stepper. My current attempts look like they are working, but the dataProvider is not actually being changed.
Based on what I have read in a billion different places, the syntax should be
```
< mx:DataGridColumn dataField="a" itemRenderer="mx.control... | [
0.0757562518119812,
0.01645604334771633,
0.608354926109314,
-0.07055310904979706,
-0.114441879093647,
0.315916508436203,
-0.0065187993459403515,
-0.18334811925888062,
-0.2328445315361023,
-0.7919173240661621,
0.03444228693842888,
0.431531697511673,
-0.3997478783130646,
0.1355837881565094,
... | |
$("img.delete").click(function() {
var row = $(this).parents('tr:first');
...
success: function(){
$(row).remove(); //Remove the row containing the image element
...
}
...
});
``` | [
0.07007057219743729,
0.05378514155745506,
0.4581243097782135,
-0.18191055953502655,
0.5488613843917847,
0.17844301462173462,
0.10555875301361084,
-0.08257930725812912,
-0.1157742440700531,
-0.5819921493530273,
-0.3691874146461487,
0.7268866300582886,
-0.5361700057983398,
0.5538657307624817... | |
I'm executing the following query:
```
Select guiPolygonID, dbo.fn_Yval(p1X, p1Y, p2X, p2Y, 4.003318)
From [vPolygonSegments]
Where dbo.fn_Yval(p1X, p1Y, p2X, p2Y, 4.003318) > 0
```
The important parts of function fn\_Yval (all params are of type float):
```
set @m = (@p2Y - @p1Y)/(@p2X - @p1X)
set @b = @p1Y - (@m*... | [
-0.0243979562073946,
0.28918975591659546,
0.6689324975013733,
0.022499769926071167,
-0.08127400279045105,
0.31982406973838806,
0.29977259039878845,
-0.4649747610092163,
-0.3269396722316742,
-0.45838868618011475,
-0.15941393375396729,
0.4724169671535492,
-0.164894238114357,
0.25388237833976... | |
causing this behavior?
**Edit:**
Here is my view:
```
Select P1.guiPolygonID,
P1.decX as p1X, P1.decY as p1Y,
P2.decX as p2X, P2.decY as p2Y
From PolygonPoints P1, PolygonPoints P2
Where P1.guiPolygonID = P2.guiPolygonID
and (
P1.lPointNumber - P2.lPointNumber = 1
or (
-- Some ... | [
-0.5021632313728333,
-0.10014932602643967,
0.2187850922346115,
-0.028653495013713837,
0.0008347569964826107,
0.5411974787712097,
0.1838829666376114,
-0.10132306069135666,
-0.4556622803211212,
-0.6540330648422241,
-0.150287464261055,
0.4904208481311798,
-0.4438473880290985,
-0.0198144875466... | |
the select cause is evaluated before the function in the where clause is evaluated. This condition is very rare, but it is possible, so you need to code against it. I would suggest that you modify the function so that it can safely handle divide by zero circumstances. Change this line:
```
set @m = (@p2Y - @p1Y)/(@p2X... | [
-0.0042695882730185986,
-0.08070910722017288,
0.1849806159734726,
-0.16238941252231598,
0.20228931307792664,
0.040616028010845184,
0.14420464634895325,
-0.3985951840877533,
0.13992524147033691,
-0.5094142556190491,
0.11667590588331223,
0.5570784211158752,
-0.4348863959312439,
0.11250495165... | |
have...
```
Where dbo.fn_Yval(p1X, p1Y, p2X, p2Y, 4.003318) > 0
```
When the function returns NULL, it won't compare to 0 and will end up getting filtered out anyway. | [
0.08544523268938065,
0.11574728041887283,
0.1869468241930008,
-0.2564384639263153,
0.07882394641637802,
-0.1734362542629242,
0.5483323931694031,
-0.3540573716163635,
0.2452312409877777,
-0.7752494215965271,
-0.49055325984954834,
0.45013368129730225,
-0.46020594239234924,
0.1257876306772232... | |
What is the best way to close an ASPX page from the code-behind?
I have a button event handler that I want to close the page after the user has clicked an ASP.NET button on the page. I have tried to programmatically add a JavaScript method that contains a `window.close()` command to the `OnClientClick` event to close... | [
0.011717680841684341,
-0.046439167112112045,
0.7321531772613525,
-0.0608992725610733,
-0.12686419486999512,
-0.011039724573493004,
0.2784944474697113,
-0.2076621651649475,
-0.20812442898750305,
-0.714739978313446,
-0.10421871393918991,
0.5508627891540527,
-0.25028979778289795,
-0.082269407... | |
EventArgs e)
{
Page.ClientScript.RegisterOnSubmitStatement(typeof(Page), "closePage", "window.onunload = CloseWindow();");
}
```
In aspx page:
```
function CloseWindow() {
window.close();
}
``` | [
-0.5088122487068176,
-0.2582833468914032,
0.8084549307823181,
-0.369023859500885,
0.07157202810049057,
-0.003503143787384033,
0.3174591064453125,
-0.22448107600212097,
-0.2340978980064392,
-0.6501392126083374,
-0.47785764932632446,
0.623457133769989,
-0.16436244547367096,
0.048507574945688... | |
I'm in the process of moving an application from PHP to Java and there is heavy use of regular expressions in the code. I've run across something in PHP that doesn't seem to have a java equivalent:
```
preg_replace_callback()
```
For every match in the regex, it calls a function that is passed the match text as a pa... | [
0.02137003280222416,
0.14139018952846527,
0.5203191637992859,
-0.1399100124835968,
-0.18184950947761536,
-0.19550833106040955,
0.00010317134001525119,
-0.2644691467285156,
-0.15170815587043762,
-0.6235225200653076,
0.11995193362236023,
0.5297037959098816,
-0.455414354801178,
0.010893037542... | |
infinite loop bug if the matching regex matches on the replacement string. I'll leave it as an exercise to readers to fix it, if necessary.
---
I don't know of anything similar that's built into Java. You could roll your own without too much difficulty, using the Matcher class:
```
import java.util.regex.*;
public ... | [
-0.03914029151201248,
-0.31033605337142944,
-0.0012531796237453818,
-0.22286762297153473,
0.2749856412410736,
-0.16474205255508423,
0.3859577178955078,
0.12346244603395462,
-0.028580281883478165,
-0.27215775847435,
0.0009480786975473166,
0.5379375219345093,
-1.061142086982727,
0.0701772123... | |
this.pattern = Pattern.compile(regex);
}
public String replaceMatches(String string, Callback callback)
{
final Matcher matcher = this.pattern.matcher(string);
while(matcher.find())
{
final MatchResult matchResult = matcher.toMatchResult();
final String repla... | [
-0.05929676443338394,
-0.37942495942115784,
0.7168810367584229,
-0.3412095308303833,
0.3089390695095062,
-0.05557642877101898,
0.2650949954986572,
-0.4277358055114746,
0.027592893689870834,
-0.49585652351379395,
-0.37757378816604614,
0.5752071738243103,
-0.5687533020973206,
0.1438834369182... | |
replacement + string.substring(matchResult.end());
matcher.reset(string);
}
}
}
```
Then call:
```
final CallbackMatcher.Callback callback = new CallbackMatcher.Callback() {
public String foundMatch(MatchResult matchResult)
{
return "<img src=\"thumbs/" + matchResults.group(1)... | [
-0.33355051279067993,
-0.27255183458328247,
1.0140674114227295,
-0.2832529842853546,
0.1826881617307663,
0.041323769837617874,
0.14132021367549896,
-0.7153622508049011,
-0.013341989368200302,
-0.3695932626724243,
-0.32280054688453674,
0.8248317837715149,
-0.4343706965446472,
0.033903826028... | |
not necessary to pass the callback the current string state.
**EDIT:** Made it look more like the exact functionality of the PHP function.
Here's the original, since the asker liked it:
```
public class CallbackMatcher
{
public static interface Callback
{
public void foundMatch(MatchResult matchResul... | [
-0.027516648173332214,
-0.3985661268234253,
0.5806676745414734,
-0.2670665383338928,
0.034754373133182526,
-0.2353416234254837,
0.1758853644132614,
-0.24573443830013275,
0.08650188893079758,
-0.431602418422699,
0.006902163382619619,
0.5616931915283203,
-0.5681008696556091,
-0.0344708822667... | |
{
final Matcher matcher = this.pattern.matcher(string);
while(matcher.find())
{
callback.foundMatch(matcher.toMatchResult());
}
}
}
```
For this particular use case, it might be best to simply queue each match in the callback, then afterwards run through them backwards.... | [
-0.1860095113515854,
-0.19044604897499084,
0.33994510769844055,
-0.345990389585495,
0.13651902973651886,
-0.1475791335105896,
0.2050507664680481,
-0.3406403958797455,
0.20285944640636444,
-0.5304031372070312,
-0.24082528054714203,
0.5208536386489868,
-0.505958080291748,
0.2856738567352295,... | |
This recent question about [sorting randomly using C#](https://stackoverflow.com/questions/375351/most-efficient-way-to-randomly-sort-shuffle-a-list-of-integers-in-c) got me thinking about the way I've sometimes shuffled my arrays in Perl.
```
@shuffled = sort { rand() <=> rand() } @array;
```
The proposed solution ... | [
-0.04047701880335808,
-0.2795506715774536,
0.14982737600803375,
0.06494978070259094,
-0.1542421579360962,
-0.030633024871349335,
-0.5037892460823059,
-0.32912951707839966,
-0.4941162168979645,
-0.6492708325386047,
0.12274027615785599,
0.02110869437456131,
-0.3323134481906891,
0.13526092469... | |
as randomness, and so I'd have no confidence in your shuffled array. It may tend to put elements in some sort of order, just as a hastily created and complicated recurrence relation may not be random.
Rather than analyze the sort function, I'd suggest going with Fisher-Yates.
As Knuth said, randomness is too importan... | [
0.1086515337228775,
-0.33195263147354126,
-0.4789489209651947,
0.1731906682252884,
-0.3285766541957855,
0.11779411882162094,
-0.2548397481441498,
-0.3166052997112274,
-0.1641678661108017,
-0.5635437369346619,
0.32743212580680847,
0.23990868031978607,
-0.5249810218811035,
0.2929928898811340... | |
I have a custom sharepoint web part that is throwing the following exception:
```
System.Security.SecurityException: Request for the permission of type 'Microsoft.SharePoint.Security.SharePointPermission, Microsoft.SharePoint.Security, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' failed.
at M... | [
0.44591641426086426,
0.2178834080696106,
0.20471110939979553,
-0.050942905247211456,
0.046822551637887955,
-0.07931546866893768,
0.8082962036132812,
-0.4005851745605469,
0.0029166953172534704,
-0.5458335876464844,
-0.11047907173633575,
0.4564085602760315,
-0.3081478178501129,
0.32369181513... | |
into the GAC. It will then get full trust, but you have to install it in the GAC, strong name it, etc. The second option is to go into the web.config and add it to the trusted list. [This article](http://msdn.microsoft.com/en-us/library/ms916855.aspx) and [this one](http://msdn.microsoft.com/en-us/library/ms452873.aspx... | [
0.21368929743766785,
-0.06845506280660629,
0.13674423098564148,
-0.09036334604024887,
-0.10318055003881454,
-0.3340085446834564,
0.6347687244415283,
-0.2587010860443115,
-0.20515316724777222,
-0.726613461971283,
-0.0777428150177002,
0.4432195723056793,
-0.3995339870452881,
0.01662561669945... | |
technically that's an undocumented feature and could be changed)
EDIT: Ok, there's a couple of things you can try. Try bumping up the overall trust level as shown [in this article](http://social.msdn.microsoft.com/Forums/en-US/sharepointdevelopment/thread/752bef14-5ea4-481d-ba37-cf49237f3c4c/). Basically look for:
<t... | [
0.0963972881436348,
-0.29023686051368713,
0.0697288066148758,
0.42182695865631104,
0.0988619327545166,
-0.3141532838344574,
0.3020489811897278,
0.154961496591568,
-0.12558314204216003,
-0.4913519024848938,
0.06810382753610611,
0.5868542194366455,
-0.07245985418558121,
-0.04338386654853821,... | |
I have a ASP.NET page which allows an administrator to change the password for a user. Since the administrator does not know the user's password, I am using the following:
```
MembershipUser member = Membership.GetUser(_usernameTextBox.Text);
member.ChangePassword(member.ResetPassword(), _passNewTextBox.Text);
```
-... | [
0.06086180359125137,
-0.051797885447740555,
0.5603320002555847,
-0.1258779913187027,
0.24207855761051178,
-0.19543831050395966,
0.270297646522522,
-0.19929912686347961,
-0.5357863306999207,
-0.7779852747917175,
-0.019394677132368088,
0.3573477566242218,
-0.192382350564003,
0.24546575546264... | |
requirements?
You can use the following properties to test the password against:
* [Membership.PasswordStrengthRegularExpression](http://msdn.microsoft.com/en-us/library/system.web.security.membership.passwordstrengthregularexpression.aspx)
* [Membership.MinRequiredPasswordLength](http://msdn.microsoft.com/en-us/libra... | [
0.3107088804244995,
0.06346406787633896,
0.49232789874076843,
0.3308376967906952,
0.1763290911912918,
-0.2482677847146988,
0.375429630279541,
-0.7939779162406921,
-0.025813978165388107,
-0.4656146466732025,
-0.12567320466041565,
0.8446487784385681,
-0.011035692878067493,
-0.178374141454696... | |
I have a 3rd party XLL addin I'd like to wrap in my own custom vba function. How would I call the 3rd party function from my code?
**Edit:** There are at least two ways to do this:
---
**Option 1:** `Application.Run(...)`
This looks like the best way to go about it, since your arguments are automatically converted t... | [
0.4302290380001068,
0.10163833200931549,
0.6058684587478638,
-0.3358289897441864,
-0.19727739691734314,
0.11675160378217697,
0.3307402729988098,
-0.32987895607948303,
-0.07720127701759338,
-0.48470789194107056,
-0.21271319687366486,
0.7629925608634949,
-0.533308207988739,
-0.03735091164708... | |
arguments into string format before passing them to the XLL function.
```
Public Function myVBAFunction(A as Integer, B as String, C as Double)
dim macroCall as String
macroCall = "XLLFunction(" & A
macroCall = macroCall & "," & Chr(34) & B & Chr(34)
macroCall = macroCall & "," & C
macroCall = macr... | [
0.14839869737625122,
0.03538326546549797,
0.6620345711708069,
-0.45289096236228943,
0.1534685641527176,
0.3877454996109009,
0.06655272841453552,
-0.18165305256843567,
0.04860996454954147,
-0.2873411476612091,
-0.5492838025093079,
0.7250255942344666,
-0.446106493473053,
-0.10980214923620224... | |
I found two collapsing problems :
* You should use the same language
between domain experts and
development teams (DDD)
* You should
use English for naming in your code
(.Net Design guidelines)
*What if the domain experts don't speak English ?*
* Speaking the same language between the teams will foster understanding.... | [
0.6118692755699158,
0.17951668798923492,
0.008932516910135746,
0.2041609138250351,
-0.21697568893432617,
-0.26310914754867554,
0.4307006001472473,
0.3311278522014618,
0.2932034134864807,
-0.6082845330238342,
-0.1936446726322174,
0.6138173341751099,
-0.08882338553667068,
-0.0279020778834819... | |
What are the dangers of giving the Network Service account read/write permissions to your ASP.NET Web application? I have to do this for any directory that my app needs to write to like App\_Data for my VistaDb database and some random directories to uplaod images and make changes to text files, etc. What is the danger... | [
0.3925856053829193,
0.37840622663497925,
0.3330994248390198,
0.19265247881412506,
0.08651870489120483,
-0.2850891053676605,
0.3198135793209076,
-0.1340460330247879,
-0.41858038306236267,
-0.5775378942489624,
0.028037291020154953,
0.5663866996765137,
-0.18009649217128754,
0.2609491944313049... | |
on the same server.
Basically, if you grant modify permissions then every other ASP.NET application that server configured to run as Network Service (all by default) will also have write permissions to that folder, which could be exploited. | [
0.402442991733551,
-0.2552831470966339,
0.30312013626098633,
0.21713754534721375,
0.17853820323944092,
-0.3073986768722534,
0.23051759600639343,
0.04190122336149216,
-0.4461669623851776,
-0.723439633846283,
-0.275902658700943,
0.3159460425376892,
-0.32500597834587097,
0.1904509961605072,
... | |
I was recently given an older ASP web application to maintain. I haven't touched it much, from what I understand, the actual VB6 project files are gone, so I only have the ASP files themselves to work with. Recently, users began complaining of being logged off, sometimes after a minute or less. I tried myself, and logg... | [
0.5254544019699097,
0.09817677736282349,
0.2671341598033905,
-0.1748325526714325,
-0.012683250941336155,
-0.21494954824447632,
0.229055717587471,
0.3243458569049835,
-0.5440123677253723,
-0.3897572159767151,
0.14517325162887573,
0.26753848791122437,
0.018578872084617615,
0.2584823668003082... | |
it, and it hasn't shown this type of behavior before. Any suggestions on where to begin? Thanks.
As there are many ways to store user session, it's hard to tell what's happening here without more information.
If users are being logged off "randomly" that suggests to me that you are using the Session object to store au... | [
0.1898478865623474,
-0.1752489060163498,
-0.07558576762676239,
0.32390469312667847,
0.006834456697106361,
-0.5069056749343872,
0.33906805515289307,
0.02625521831214428,
-0.36616820096969604,
-0.6009920835494995,
-0.038650013506412506,
0.49689722061157227,
-0.16135911643505096,
0.3152331411... | |
is machine-specific.
Another possibility. This would apply even if you are not using the Session object. I have seen this happen many times.
3. Is your application accessible via multiple URLs? In other words, both <http://www.mysite.com> and <http://mysite.com>. Cookies (and sessions) are domain specific and those c... | [
0.37042558193206787,
0.266613632440567,
0.2951217293739319,
0.30173730850219727,
-0.3116292357444763,
-0.3754275441169739,
0.40838244557380676,
0.1513325572013855,
-0.3933081328868866,
-0.8043268918991089,
0.014960040338337421,
0.174320250749588,
-0.004168504849076271,
0.3993929922580719,
... | |
I have an datetime object that I want to remove one hour to display the corect time in a different time zone. I am using datetime.addhours(-1) with the -1 being a config value. This works in most cases except when I set the time to 12:59 AM today it displays 11:59 AM today. When it should display 11:59 PM. Is it possib... | [
0.3894515931606293,
0.0328562967479229,
0.6944723129272461,
-0.13351760804653168,
0.20497803390026093,
0.10430122911930084,
0.09636352211236954,
0.05395914614200592,
-0.1261352002620697,
-0.6969674229621887,
-0.06888797134160995,
0.5118697881698608,
-0.33330386877059937,
0.1323824226856231... | |
I have an application that uses DataTables to perform grouping, filtering and aggregation of data. I want to replace datatables with my own data structures so we don't have any unnecessary overhead that we get from using datatables. So my question is if Linq can be used to perform the grouping, filtering and aggregatio... | [
0.3839170038700104,
0.22994935512542725,
-0.23341846466064453,
0.46983855962753296,
0.11591938138008118,
-0.13668636977672577,
-0.18456101417541504,
-0.10680849850177765,
-0.226281076669693,
-0.5285755395889282,
0.05564117804169655,
0.46696341037750244,
-0.0625663623213768,
-0.097281776368... | |
as `DataTable`. Personally, I'd look more at using tools like LINQ-to-SQL, Entity Framework, etc. Then you can use either LINQ-to-Objects against local data, or the provider-specific implementation for complex database queries without pulling all the data to the client.
LINQ-to-Objects can *do* all the things you ment... | [
-0.11008571088314056,
-0.013802328146994114,
0.1388542801141739,
0.33603405952453613,
-0.3154475688934326,
-0.3525383770465851,
0.1059461459517479,
-0.06491030752658844,
-0.353225439786911,
-0.5435535907745361,
-0.22097107768058777,
0.5862186551094055,
-0.31271862983703613,
-0.219784319400... | |
LINQ-to-SQL will provide the entire DAL for you, which is a huge time saver, as well as making it possible to get a lot more compile-time safety. But is also allows you to use the same approach to look at your local objects and your database - for example, the following is valid C# 3.0 (except for [someDataSource], see... | [
0.11087050288915634,
-0.03459720313549042,
0.8774644136428833,
-0.06297784298658371,
-0.04299292713403702,
-0.1195501834154129,
-0.28746113181114197,
-0.42020389437675476,
-0.17388179898262024,
0.03821343183517456,
-0.0653746947646141,
0.46517741680145264,
-0.2856786847114563,
-0.066134028... | |
TotalValue = grp.Sum(x=>x.Value) };
foreach(var x in qry) {
Console.WriteLine("{0}, {1}, {2}", x.Category, x.Count, x.TotalValue);
}
```
If [someDataSource] is local data, such as a `List<T>`, this will execute locally; but if this is from your LINQ-to-SQL data-context, it can build the appropriate TSQL at the d... | [
0.06881258636713028,
-0.445972740650177,
0.5879554152488708,
0.08317019790410995,
-0.39458581805229187,
0.18588285148143768,
0.18407845497131348,
-0.10241752862930298,
-0.05027186870574951,
-0.21467939019203186,
-0.11135994642972946,
0.3967491388320923,
-0.07697578519582748,
0.188026800751... | |
What are some good links for diving into Erlang and functional programming in general?
Here's [the first half of Concurrent Programming in Erlang](http://www.erlang.org/download/erlang-book-part1.pdf) [PDF], free. | [
0.14542879164218903,
-0.03575943037867546,
0.05140570178627968,
0.4102015793323517,
-0.03779680281877518,
-0.4155868589878082,
0.3135736584663391,
0.06520842760801315,
-0.500030517578125,
0.03861313685774803,
-0.11196555942296982,
0.5470107793807983,
-0.2372230440378189,
-0.443693399429321... | |
I've been [struggling with the GridSplitter](https://stackoverflow.com/questions/279557/how-do-i-keep-the-wpf-gridsplitter-from-changing-the-size-of-my-grid). It seems to be incompatible with the WPF WebBrowser control.
If I resize my window and move the GridSplitter, then I can make my grid wider than my window and n... | [
-0.12143346667289734,
-0.19478091597557068,
0.7466980218887329,
-0.32821282744407654,
-0.3091564178466797,
0.11643345654010773,
0.17610788345336914,
-0.26281288266181946,
-0.3884510397911072,
-0.774300217628479,
-0.07433642446994781,
0.49709221720695496,
-0.05800778046250343,
0.40246412158... | |
<ColumnDefinition MinWidth="200" Width="*"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition MinWidth="200" Width="*"/>
</Grid.ColumnDefinitions>
<Button Name="Button2"
Grid.Column="0"
Margin="5" | [
-0.3256397843360901,
-0.37602269649505615,
0.6629588007926941,
-0.18058201670646667,
-0.09822135418653488,
0.2793216109275818,
-0.2975335717201233,
-0.5670288801193237,
-0.40422022342681885,
-0.9100356101989746,
0.12034866213798523,
0.5316656827926636,
0.2504139840602875,
-0.13291695713996... | |
Content="Button2"/>
<GridSplitter
Width="2"
Grid.Column="1"
HorizontalAlignment="Center"
Margin="5"
Panel.ZIndex="1"
VerticalAlignment="Stretch"
ResizeBehavior="PreviousAndNext" | [
-0.17433898150920868,
-0.36638393998146057,
0.6392016410827637,
0.08818133920431137,
0.0918845534324646,
0.20883451402187347,
-0.33032238483428955,
-0.20953649282455444,
-0.28302276134490967,
-0.7733272314071655,
-0.17195582389831543,
0.27848169207572937,
0.29198989272117615,
0.11675322055... | |
ResizeDirection="Columns"/>
<WebBrowser
Grid.Column="2"
Margin="5"
Source="http://www.google.com"/>
</Grid>
</Window>
```
Steps to reproduce the problem...
1. Drag the window's right edge to the right to about double its width
2. Drag the splitter to the left as far as... | [
0.27071574330329895,
-0.4285540282726288,
0.39481300115585327,
0.044875673949718475,
-0.07694358378648758,
0.05814633518457413,
0.2518599033355713,
-0.38267186284065247,
-0.4636008143424988,
-0.6887339353561401,
0.003734977450221777,
0.7769013047218323,
-0.2628173232078552,
0.0348272100090... | |
I keep the GridSplitter from changing the size of my Grid beyond what the Window can contain?
Does anyone know more about this problem? ...or have a workaround?
I was able to reproduce this with a Border in a ScrollViewer (but not without a ScrollViewer), so my guess is that the scrolling messes it up somehow.
Settin... | [
0.08047321438789368,
0.1635684072971344,
0.7535684108734131,
-0.14946307241916656,
-0.2271970510482788,
0.0852830708026886,
0.22436010837554932,
-0.14885035157203674,
-0.41009601950645447,
-0.5377421379089355,
0.30436399579048157,
0.4167848825454712,
-0.05018630251288414,
-0.00689445389434... | |
Width="450"
Title="Window3">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition MinWidth="200" Width="*" MaxWidth="10000"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition MinWidth="200" Width="*"/>
</Grid.ColumnDefinitions>
<Button
N... | [
-0.29483675956726074,
-0.38790109753608704,
0.5118908882141113,
-0.25601181387901306,
0.02479887381196022,
0.3803618848323822,
-0.10943630337715149,
-0.43485918641090393,
-0.42616796493530273,
-0.8017276525497437,
-0.10673528164625168,
0.648871660232544,
0.21043936908245087,
-0.06471892446... | |
Grid.Column="0"
Margin="5"
Content="Button2"/>
<GridSplitter
Width="2"
Grid.Column="1"
HorizontalAlignment="Center"
Margin="5" | [
-0.45246636867523193,
-0.2645825147628784,
0.590433657169342,
0.18479876220226288,
-0.03873378410935402,
0.22653231024742126,
-0.35785534977912903,
-0.13401246070861816,
-0.2928016185760498,
-0.9113470315933228,
0.01600714959204197,
0.16139847040176392,
0.15935948491096497,
0.0893804058432... | |
Panel.ZIndex="1"
VerticalAlignment="Stretch"
ResizeBehavior="PreviousAndNext"
ResizeDirection="Columns"/>
<WebBrowser Grid.Column="2" Margin="5" Source="http://www.google.com"/>
</Grid>
</Window>
```
It appears that at some point, the star sizing overrides the fact that... | [
0.11956591159105301,
-0.17380912601947784,
0.811651885509491,
-0.14597828686237335,
0.05959199368953705,
0.1700962334871292,
-0.014596596360206604,
-0.19764865934848785,
-0.5286606550216675,
-0.899627149105072,
0.05036485195159912,
0.5774695873260498,
0.16316230595111847,
0.165969192981719... | |
is space or not. | [
0.1347445547580719,
-0.08482655882835388,
0.0610598623752594,
0.3009156286716461,
0.6062912940979004,
0.004157375078648329,
-0.04360971972346306,
0.30736103653907776,
-0.207148015499115,
-0.5171500444412231,
-0.2518496513366699,
-0.12431183457374573,
-0.0759873017668724,
0.1763391345739364... | |
How can I obtain the .NET Framework directory path inside my C# application?
The folder that I refer is "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727"
The path to the installation directory of the CLR active for the current .NET application can be obtained by using the following method:
```
System.Runtime.InteropSer... | [
0.1905982494354248,
0.3366352319717407,
0.9006865620613098,
0.20761997997760773,
0.3158174753189087,
-0.31825560331344604,
-0.1356814056634903,
-0.0864364430308342,
-0.3351786136627197,
-0.261406809091568,
-0.2362496256828308,
0.6821724772453308,
-0.15697096288204193,
0.06767885386943817,
... | |
"the current CLR" will be "2.0" for .NET 2.0, .NET 3.0 and .NET 3.5 applications. This means that the GetRuntimeDirectory() call will return 2.0 directory even within .NET 3.5 applications (that load some of their assemblies from 3.5 directory). Depending on your interpretation of the term ".NET Framework directory pat... | [
0.09912348538637161,
-0.13795265555381775,
1.023115873336792,
-0.1441383808851242,
0.23548845946788788,
-0.29567551612854004,
-0.01975727267563343,
-0.32075563073158264,
-0.319338858127594,
-0.2576855421066284,
-0.3999791741371155,
0.48196855187416077,
-0.28167709708213806,
0.2012301534414... | |
I haven't got a unique problem, but for the life of me I can't figure out what I'm doing wrong.
I have a page that has a series of sections. Part of the section is a little image. When the image is clicked, I want to show a custom control. Showing the control is trivial, set the z-index a bit higher to ensure the cont... | [
0.36533641815185547,
0.09116298705339432,
0.34560784697532654,
0.23706282675266266,
-0.24770845472812653,
-0.09780125319957733,
0.0819067433476448,
0.040405549108982086,
-0.32304561138153076,
-0.48517856001853943,
0.033538464456796646,
-0.08225284516811371,
-0.32274919748306274,
0.23796252... | |
(in jQuery syntax) -
```
{
position: 'absolute',
top: 0,
left: 0,
width: '100%',
height: $(document).height(),
display: 'none',
zIndex: 1,
backgroundColor: '#FF0000'
};
```
Yeah...the background is red so I can see it for testing. I set opacity to 0.1 (light blur). I then set the z-index of my custo... | [
-0.2581709027290344,
-0.13084928691387177,
0.9596773982048035,
-0.020140942186117172,
0.05476194992661476,
0.026298850774765015,
0.1417025476694107,
-0.3027186691761017,
-0.12294188886880875,
-0.6734170913696289,
-0.2426394671201706,
0.6329231262207031,
-0.16334232687950134,
-0.20620751380... | |
of blanket to interact with it. This is what I get on all browsers except IE. On ie...it goes document with control and both are covered by the blanket.
**Answer**
[scunliffe](https://stackoverflow.com/users/6144/scunliffe) was the closest (answered in a comment I can't link to). The custom control is inside of a rel... | [
0.0939728394150734,
-0.26202449202537537,
0.8195797801017761,
0.19661442935466766,
-0.24892212450504303,
-0.07193070650100708,
-0.049639973789453506,
-0.3802672028541565,
-0.2526088356971741,
-0.45618295669555664,
-0.11893990635871887,
-0.04131612554192543,
-0.13864773511886597,
-0.0317903... | |
be below the blanket.
So I moved the blanket to be the first child inside the relatively positioned div. This isn't 100% complete yet because if you scroll (which I can't stop with this solution), the blanket div is only the height of the visible content. I now have to figure out how to get the complete height of the ... | [
0.15787552297115326,
-0.32187896966934204,
0.8489219546318054,
0.27399688959121704,
0.11465957015752792,
0.2526387870311737,
-0.03740508854389191,
-0.10530389845371246,
-0.17033061385154724,
-0.6569663286209106,
-0.027131808921694756,
-0.14159619808197021,
0.21971061825752258,
-0.016001220... | |
was outside the relatively positioned div and started it's own z-index stack (as documented [here](http://aplus.rs/lab/z-pos/)). Since IE 6/7 are broken in this regard, no matter what I set the z-index to, it would always be below the blanket.
So I moved the blanket to be the first child inside the relatively position... | [
-0.08257587254047394,
-0.19472554326057434,
0.6972845196723938,
0.06406381726264954,
0.017922261729836464,
0.022785168141126633,
-0.06322013586759567,
0.004680910613387823,
-0.09350823611021042,
-0.6165364980697632,
-0.13425345718860626,
-0.07842868566513062,
0.25158029794692993,
0.2211288... | |
When a .Net service crashes, does the ServiceBase.OnStop method get called? Will the service be marked as stopped regardless of whether or not the OnStop method is called?
use try-catch and call OnStop yourself; don't rely on 'auto-stop', even if it was 'guaranteed' it is still not a good idea. Services should be as ro... | [
0.22590012848377228,
-0.18981528282165527,
0.007717803120613098,
0.18834127485752106,
0.018669867888092995,
-0.41644611954689026,
0.631998598575592,
0.054242707788944244,
-0.22936823964118958,
-0.4436038136482239,
-0.33416691422462463,
0.5924469232559204,
-0.3066193461418152,
-0.2153883874... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.