text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
(
And so on....
```
Real Example:
```
List
(
[0] => List
(
[0] => 2349
[1] => The Prime Time of Your Life
[2] => Daft Punk
[3] => Human After All | [
0.6487129926681519,
-0.22086966037750244,
0.1115797907114029,
-0.12091420590877533,
0.19314834475517273,
-0.317999929189682,
0.11836829036474228,
0.1950853019952774,
-0.3087475597858429,
-0.7116583585739136,
0.1462675780057907,
0.5888319611549377,
-0.33844679594039917,
0.009069820865988731... | |
[4] => 3
[5] => 2
)
[1] => List
(
```
So yeah, mlist[0][0] would get TrackID from song 1, mlist[1][0] from song 2 etc.
But I am having huge issues creating a multidimensional list.
So far I have come up with
```
List<List<string>> matrix = new List<List<string>>();
```
But I have... | [
0.33216139674186707,
-0.13856177031993866,
0.3842579424381256,
-0.11849252879619598,
0.15337692201137543,
0.16679228842258453,
0.18177463114261627,
-0.14772729575634003,
-0.45644238591194153,
-0.7331980466842651,
0.1937675029039383,
0.44538840651512146,
-0.23382772505283356,
-0.10310088843... | |
why would you do that instead of building your own class to represent a track, with Track ID, Name, Artist, Album, Play Count and Skip Count properties? Then just have a `List<Track>`. | [
0.5092672109603882,
-0.14843593537807465,
-0.4364013373851776,
0.7290214896202087,
-0.02901032380759716,
-0.21182192862033844,
-0.054205313324928284,
-0.11959686130285263,
-0.41113442182540894,
-0.229341059923172,
0.17980855703353882,
0.5269547700881958,
-0.16572275757789612,
0.12671650946... | |
When pressed Once,i want to make the Grid view Button(Time In) invisible until the User press Time Out Button.
Once the user press the Time Out Button,Time in Button must be shown
Well you certainly *can* use a `List<List<string>>` where you'd then write:
```
List<string> track = new List<string>();
track.Add("2349");... | [
0.43791717290878296,
-0.2987096309661865,
0.22418783605098724,
-0.054304346442222595,
0.27546942234039307,
0.08900728076696396,
0.15876448154449463,
-0.09582880884408951,
-0.42998257279396057,
-0.8850849270820618,
0.30075761675834656,
0.4847702085971832,
-0.28666913509368896,
0.22383326292... | |
Whenever I write mouse handling code, the onmousedown/onmouseup/onmousemove model always seemed to force me to produce unnecessarily complex code that would still end up causing all sorts of UI bugs.
The main problem which I see even in major pieces of software these days is the "ghost mouse" event where you drag to ... | [
0.1856173872947693,
0.06547684222459793,
0.43718045949935913,
-0.09816104173660278,
0.041249871253967285,
-0.3476179838180542,
0.4960547089576721,
0.32659950852394104,
-0.5267707109451294,
-0.2956402599811554,
0.06506917625665665,
0.2170301228761673,
-0.1598902940750122,
0.1901603490114212... | |
there a RIGHT way to write mouse code or is the entire model just flawed?
Ordinarily one captures the mouse events on mouse down so the mouse move and mouse up go through your code regardless of the caret moving out of you application window.
More recently this is a problem when running a VM or remote session, its dif... | [
0.23023897409439087,
0.013138721697032452,
0.15841737389564514,
0.18648189306259155,
0.22893527150154114,
-0.047552067786455154,
0.4324754774570465,
-0.13038428127765656,
-0.25655898451805115,
-0.559454619884491,
0.09844974428415298,
0.7878604531288147,
-0.15857423841953278,
-0.03321384266... | |
I have been searching the web for this, but I havent found any decent help.
I have a BufferedImage, which I have read in with ImageIO. Now I would like to make a certain color in that image to transparent, and save the image as PNG.
I know I cannot just "paint" the transparent color for obvious reasons, so I am guess... | [
0.24298308789730072,
-0.07249879091978073,
0.08629528433084488,
-0.05390810966491699,
-0.023759273812174797,
-0.058597296476364136,
-0.029766926541924477,
0.16808953881263733,
-0.19385898113250732,
-0.9600655436515808,
0.11162920296192169,
0.6765158176422119,
-0.2981075644493103,
0.1199345... | |
ImageFilter filter = new RGBImageFilter()
{
public final int filterRGB(int x, int y, int rgb)
{
return (rgb << 8) & 0xFF000000;
}
};
ImageProducer ip = new FilteredImageSource(image.getSource(), filter);
return Toolkit.getDefaultToolkit().createImage(ip);
}
```
Actually, i... | [
0.07201985269784927,
-0.4695190191268921,
0.594948410987854,
-0.2524186670780182,
-0.23099540174007416,
0.009903550148010254,
0.25382310152053833,
-0.43849605321884155,
-0.19720228016376495,
-0.8291944861412048,
-0.17806226015090942,
0.5545979738235474,
-0.7474544644355774,
0.0980760455131... | |
adapt it to filter a specific color, eg. with a test of equality or range, etc.
Of course, the BufferedImage must be of BufferedImage.TYPE\_INT\_ARGB type.
I don't address the question of saving, as it is pretty trivial, but I can add this code page too.
[EDIT] To convert Image to BufferedImage:
```
BufferedImage... | [
0.021733373403549194,
-0.14376407861709595,
0.6785882115364075,
-0.14024917781352997,
-0.2612716853618622,
0.14386510848999023,
0.13910481333732605,
-0.404570609331131,
-0.14773374795913696,
-1.100205421447754,
-0.20377136766910553,
0.5854639410972595,
-0.6101694703102112,
-0.1463887095451... | |
java.awt.*;
import java.awt.image.BufferedImage;
import java.awt.image.FilteredImageSource;
import java.awt.image.ImageFilter;
import java.awt.image.ImageProducer;
import java.awt.image.RGBImageFilter;
import java.io.*;
import javax.imageio.ImageIO;
public class AddTransparency
{
AddTransparency() throws IOExceptio... | [
-0.09750394523143768,
-0.387668639421463,
0.567890465259552,
-0.2019631713628769,
-0.07703498750925064,
0.6429291367530823,
0.33641716837882996,
-0.6652377843856812,
-0.025099053978919983,
-0.7888699173927307,
-0.27811098098754883,
0.654832124710083,
-0.6197478175163269,
-0.056106187403202... | |
new File(imagePath, "map_with_transparency2.png");
ImageIO.write(resultImage2, "PNG", outFile2);
}
private Image TransformGrayToTransparency(BufferedImage image)
{
ImageFilter filter = new RGBImageFilter()
{
public final int filterRGB(int x, int y, int rgb)
{
return (rgb << 8) & 0... | [
-0.1357778012752533,
-0.8265125155448914,
0.712802529335022,
-0.18571117520332336,
-0.14133746922016144,
0.2234695851802826,
0.2439223974943161,
-0.5546432137489319,
-0.2392473816871643,
-0.8286622166633606,
-0.1750156283378601,
0.5923596620559692,
-0.49692651629447937,
-0.0911632925271987... | |
{
// Primitive test, just an example
final int r1 = c1.getRed();
final int g1 = c1.getGreen();
final int b1 = c1.getBlue();
final int r2 = c2.getRed();
final int g2 = c2.getGreen();
final int b2 = c2.getBlue();
ImageFilter filter = new RGBImageFilter()
{
public final int filter... | [
0.2789430022239685,
-0.5490040183067322,
0.4333420991897583,
-0.268855482339859,
-0.17186622321605682,
0.33337461948394775,
0.3604060411453247,
-0.5048267841339111,
-0.2254992425441742,
-0.6151049733161926,
-0.2453223615884781,
0.5560858845710754,
-0.7707567811012268,
-0.023606760427355766... | |
= (rgb & 0xFF0000) >> 16;
int g = (rgb & 0xFF00) >> 8;
int b = rgb & 0xFF;
if (r >= r1 && r <= r2 &&
g >= g1 && g <= g2 &&
b >= b1 && b <= b2)
{ | [
-0.1464664340019226,
0.2836412191390991,
0.4759712815284729,
-0.4160429537296295,
-0.033269040286540985,
0.5070924162864685,
0.4474593997001648,
-0.6798723936080933,
-0.28946441411972046,
-0.18690995872020721,
-0.594778835773468,
0.6224955916404724,
-0.4451225697994232,
-0.0821025818586349... | |
// Set fully transparent but keep color
return rgb & 0xFFFFFF;
}
return rgb;
}
};
ImageProducer ip = new FilteredImageSource(image.getSource(), filter);
return Toolkit.getDefaultToolkit().createImage(ip);
}
private BufferedImage ImageToBufferedImage(Image image, int w... | [
0.02536616288125515,
-0.5486948490142822,
0.5972442030906677,
-0.07198455929756165,
-0.2223166972398758,
0.29580652713775635,
0.3267994225025177,
-0.4190095067024231,
-0.18114113807678223,
-0.7386409640312195,
-0.2502823770046234,
0.6326094269752502,
-0.305070161819458,
0.12149781733751297... | |
Graphics2D g2 = dest.createGraphics();
g2.drawImage(image, 0, 0, null);
g2.dispose();
return dest;
}
public static void main(String[] args) throws IOException
{
AddTransparency at = new AddTransparency();
}
}
``` | [
-0.028592955321073532,
-0.22848393023014069,
0.4910406768321991,
-0.2985687553882599,
-0.3078215718269348,
0.26740574836730957,
0.19259905815124512,
-0.15425243973731995,
-0.1326252818107605,
-0.6942536234855652,
-0.2634887993335724,
0.896344780921936,
-0.582707405090332,
0.027562567964196... | |
We are using one template to render the report in CSV and PDF format. But the problem is we need to have report split into pages in PDF but not in CSV. Is it possible to alter the rendering options based on the format in one template. So that we have CSV without pagination information and PDF divided into page. In such... | [
0.3517877459526062,
-0.01686932146549225,
0.07044275104999542,
0.30128979682922363,
-0.2704554498195648,
-0.13125170767307281,
-0.08575638383626938,
-0.3445001542568207,
-0.28095415234565735,
-0.8160146474838257,
-0.001341266673989594,
0.39419621229171753,
-0.2899736166000366,
0.1027977019... | |
gray to transparency is:
```
private Image TransformGrayToTransparency(BufferedImage image)
{
ImageFilter filter = new RGBImageFilter()
{
public final int filterRGB(int x, int y, int rgb)
{
return (rgb << 8) & 0xFF000000;
}
};
ImageProducer ip = new FilteredImageSource(im... | [
0.15478026866912842,
-0.40983012318611145,
0.4876505136489868,
-0.15768301486968994,
-0.09539969265460968,
-0.17042678594589233,
0.027301479130983353,
-0.5112782120704651,
-0.0367329865694046,
-0.7392159700393677,
-0.17861339449882507,
0.6241401433944702,
-0.5944854617118835,
0.14763794839... | |
discarding the others which are identical in my case.
You can adapt it to filter a specific color, eg. with a test of equality or range, etc.
Of course, the BufferedImage must be of BufferedImage.TYPE\_INT\_ARGB type.
I don't address the question of saving, as it is pretty trivial, but I can add this code page t... | [
0.18496321141719818,
0.06336645036935806,
0.4990042746067047,
-0.10204500705003738,
-0.42804864048957825,
0.23087576031684875,
0.07710838317871094,
-0.4692283272743225,
-0.16504158079624176,
-0.9121412038803101,
-0.16066068410873413,
0.550847053527832,
-0.5142284631729126,
-0.0146402632817... | |
range of colors transparent. Can be improved, eg. using HSB components instead.
```
import java.awt.*;
import java.awt.image.BufferedImage;
import java.awt.image.FilteredImageSource;
import java.awt.image.ImageFilter;
import java.awt.image.ImageProducer;
import java.awt.image.RGBImageFilter;
import java.io.*;
import ... | [
0.05736049637198448,
-0.43816015124320984,
0.5243170261383057,
-0.22981292009353638,
-0.11946753412485123,
0.5418044328689575,
0.3436781167984009,
-0.6868245005607605,
0.06604041159152985,
-0.7602907419204712,
-0.2889552712440491,
0.8164851069450378,
-0.609483003616333,
-0.0223419182002544... | |
BufferedImage resultImage2 = ImageToBufferedImage(transpImg2, image.getWidth(), image.getHeight());
File outFile2 = new File(imagePath, "map_with_transparency2.png");
ImageIO.write(resultImage2, "PNG", outFile2);
}
private Image TransformGrayToTransparency(BufferedImage image)
{
ImageFilter filter =... | [
-0.18769659101963043,
-0.6965312361717224,
0.7909350395202637,
-0.26653042435646057,
-0.24991731345653534,
0.3165852725505829,
0.1837931126356125,
-0.5529944896697998,
-0.15070965886116028,
-0.7348726391792297,
-0.2410999983549118,
0.5366001129150391,
-0.49312323331832886,
-0.0488871969282... | |
Toolkit.getDefaultToolkit().createImage(ip);
}
private Image TransformColorToTransparency(BufferedImage image, Color c1, Color c2)
{
// Primitive test, just an example
final int r1 = c1.getRed();
final int g1 = c1.getGreen();
final int b1 = c1.getBlue();
final int r2 = c2.getRed();
final ... | [
0.12874136865139008,
-0.6613197922706604,
0.5217909812927246,
-0.20138995349407196,
-0.2628752291202545,
0.22015008330345154,
0.3508151173591614,
-0.5568704009056091,
-0.07057777047157288,
-0.6342987418174744,
-0.25832581520080566,
0.6117563843727112,
-0.5888563990592957,
-0.03911715000867... | |
{
int r = (rgb & 0xFF0000) >> 16;
int g = (rgb & 0xFF00) >> 8;
int b = rgb & 0xFF;
if (r >= r1 && r <= r2 &&
g >= g1 && g <= g2 &&
b >= b1 && b <= b2) | [
-0.22049114108085632,
0.1946333348751068,
0.45700520277023315,
-0.3054974377155304,
0.05889403447508812,
0.5320143699645996,
0.4995940923690796,
-0.636970043182373,
-0.3015265464782715,
-0.2025153934955597,
-0.5473676919937134,
0.6553589105606079,
-0.4241902530193329,
-0.1275932341814041,
... | |
{
// Set fully transparent but keep color
return rgb & 0xFFFFFF;
}
return rgb;
}
};
ImageProducer ip = new FilteredImageSource(image.getSource(), filter);
return Toolkit.getDefaultToolkit().createImage(ip);
}
private BufferedImage ImageToBufferedImage(Image ... | [
-0.015345972031354904,
-0.5338504910469055,
0.6312931180000305,
-0.014935152605175972,
-0.18971772491931915,
0.2696225345134735,
0.26234757900238037,
-0.3723783493041992,
-0.23288416862487793,
-0.7374609708786011,
-0.22987261414527893,
0.5498136878013611,
-0.3206856846809387,
0.08592789620... | |
width, height, BufferedImage.TYPE_INT_ARGB);
Graphics2D g2 = dest.createGraphics();
g2.drawImage(image, 0, 0, null);
g2.dispose();
return dest;
}
public static void main(String[] args) throws IOException
{
AddTransparency at = new AddTransparency();
}
}
``` | [
-0.0068171764723956585,
-0.1966485232114792,
0.4215105473995209,
-0.3718821704387665,
-0.17921391129493713,
0.4357963800430298,
0.30903568863868713,
-0.3027750253677368,
-0.2577787935733795,
-0.6046494245529175,
-0.33386608958244324,
0.8417395353317261,
-0.5125911831855774,
0.2931397855281... | |
I just read a [blog post](http://devlicious.com/blogs/tuna_toksoz/archive/2009/03/20/nhibernate-poid-generators-revealed.aspx) about NHibernate's ability to create a GUID from the system time (Guid.Comb), thus avoiding a good amount of database fragmentation. You could call it the client-side equivalent to the SQL Serv... | [
-0.3204970955848694,
0.1695266216993332,
0.334756463766098,
-0.14325615763664246,
-0.4659276306629181,
-0.18834812939167023,
0.15048861503601074,
-0.45224258303642273,
0.03521335870027542,
-0.3871232867240906,
0.16900251805782318,
0.5863001942634583,
-0.5174108743667603,
0.2565662860870361... | |
Guid guid = Guid.NewGuid();
byte[] bytes = guid.ToByteArray();
long ticks = DateTime.Now.Ticks;
fixed( byte* pByte = bytes )
{
int* pFirst = (int *)(pByte + 10);
short* pNext = (short*)(pByte + 14); | [
0.09465179592370987,
-0.61474609375,
0.39667239785194397,
-0.14857828617095947,
0.19976545870304108,
0.4759441018104553,
0.22517690062522888,
0.12162138521671295,
-0.5442395806312561,
-0.47093743085861206,
-0.2826123535633087,
0.4915896952152252,
-0.391806036233902,
0.14040225744247437,
... | |
*pFirst = (int)(ticks & 0xFFFFFF00);
*pNext = (short)ticks;
}
return new Guid( bytes );
}
``` | [
0.29051023721694946,
-0.0903119444847107,
0.4110546410083771,
-0.06720137596130371,
0.09239016473293304,
0.46570301055908203,
-0.05312209576368332,
-0.4188072681427002,
-0.34631285071372986,
-0.5745351910591125,
-0.02266838401556015,
0.43050867319107056,
-0.33394676446914673,
0.22474628686... | |
I'm new to silverlight and I'm porting from asp.net 2.0. I have done many data binding applications in asp.net where I use sql server 2005 and use it's tables and access them via sqlconnection object and perform all kind of database related functions. Can anyone tell does silverlight 2.0 supports such kind of facility.... | [
0.6022878289222717,
0.3538801968097687,
0.28459620475769043,
-0.07569242268800735,
-0.3305947482585907,
-0.4429653286933899,
0.10630936920642853,
-0.09432898461818695,
-0.2762264907360077,
-0.6295993328094482,
0.3938966989517212,
0.3126840889453888,
-0.26866415143013,
0.4168788194656372,
... | |
between, like webservices. For a nice tutorial on how to do that, check <http://weblogs.asp.net/scottgu/pages/silverlight-2-end-to-end-tutorial-building-a-digg-search-client.aspx> | [
0.33521169424057007,
-0.06337753683328629,
-0.1408112794160843,
0.2862068712711334,
-0.10306785255670547,
-0.19696496427059174,
-0.1571204960346222,
0.2939643859863281,
-0.22780176997184753,
-0.5735209584236145,
-0.0007191018667072058,
0.15116934478282928,
0.001354852574877441,
-0.01698669... | |
Lets say I have this extention method:
```
public static bool HasFive<T>(this IEnumerable<T> subjects)
{
if(subjects == null)
throw new ArgumentNullException("subjects");
return subjects.Count() == 5;
}
```
Do you think this null check and exception throwing is really necessary? I mean, when I use t... | [
0.49711382389068604,
0.12119831889867783,
0.3485341966152191,
-0.16466198861598969,
-0.2403608113527298,
-0.253503680229187,
0.428048700094223,
-0.3681321442127228,
-0.21941745281219482,
-0.6329758167266846,
-0.11929962784051895,
0.5516745448112488,
-0.1870538592338562,
0.21952277421951294... | |
kind of think a bunch of null checking and exception throwing kind of clutters up the methods which often end up being twice as long as they really needed to be. Someone should know better than to send null into a method :p
Anyways, what do you guys think?
---
**Note:** `Count()` is an extension method and *will* th... | [
0.5088955760002136,
-0.02188490331172943,
0.2608622908592224,
-0.07222167402505875,
-0.14165277779102325,
-0.2091064453125,
0.515083909034729,
0.13680574297904968,
-0.28235912322998047,
-0.5067093968391418,
0.16090930998325348,
0.4105488061904907,
0.050505056977272034,
0.07081558555364609,... | |
use the `Enforce` class in [Lokad Shared Libraries](http://abdullin.com/shared-libraries/). Can recommend taking a look at it. Instead of my example I can do this instead:
```
public static bool HasFive<T>(this IEnumerable<T> subjects)
{
Enforce.Argument(() => subjects);
return subjects.Count() == 5;
}
```
Ye... | [
0.6407982110977173,
-0.09134166687726974,
0.14724764227867126,
-0.13995353877544403,
-0.2317648082971573,
-0.3227834701538086,
0.6220334768295288,
-0.4263150990009308,
-0.23212593793869019,
-0.5900039076805115,
0.08229956030845642,
0.6333343982696533,
-0.5645248293876648,
0.013605212792754... | |
Currently, the stack trace will show `subjects.Count()` at the top, and probably with a message with the `source` parameter name. This could be confusing to the caller of `HasFive` who can see a `subjects` parameter name.
EDIT: Just to save me having to write it yet again elsewhere:
The call to `subjects.Count()` wil... | [
0.3107646703720093,
-0.07398413866758347,
0.36963388323783875,
-0.03325807303190231,
-0.21657200157642365,
-0.15682603418827057,
0.30731403827667236,
-0.2136254757642746,
-0.41890764236450195,
-0.48175567388534546,
0.03723713010549545,
0.6240141987800598,
-0.3408968448638916,
0.03972241282... | |
to make it simpler to do so. I like the following extension method:
```
internal static void ThrowIfNull<T>(this T argument, string name)
where T : class
{
if (argument == null)
{
throw new ArgumentNullException(name);
}
}
```
The example method in the question can then become:
```
public st... | [
0.528436005115509,
-0.23131243884563446,
0.300327330827713,
-0.2700754404067993,
-0.34617647528648376,
0.01904325559735298,
0.2569137215614319,
-0.45485684275627136,
-0.233112633228302,
-0.6288748979568481,
-0.3160511553287506,
0.5624569058418274,
-0.3368544280529022,
0.19338367879390717,
... | |
argument, string name)
where T : class
{
if (argument == null)
{
throw new ArgumentNullException(name);
}
return argument;
}
```
You can then call it fluently:
```
public static bool HasFive<T>(this IEnumerable<T> subjects)
{
return subjects.NullGuard("subjects").Count() == 5;
}
```
... | [
0.1655416637659073,
-0.014550816267728806,
0.3462407886981964,
-0.2951098084449768,
-0.11114175617694855,
0.11389200389385223,
0.561594545841217,
-0.31072118878364563,
-0.20915256440639496,
-0.5413675904273987,
-0.30016565322875977,
0.7331410646438599,
-0.18797267973423004,
0.2951254844665... | |
I am trying to develop a simple iPhone app. I need to play sound within a loop.
How can Play Audio file in loop without any interruption ?
Take a look at the new AVAudioPlayer class in the 2.2 release:
<http://developer.apple.com/iphone/library/documentation/AVFoundation/Reference/AVAudioPlayerClassReference/Referenc... | [
0.5437551736831665,
-0.13555584847927094,
0.22824722528457642,
-0.053066812455654144,
0.11578405648469925,
-0.03371088206768036,
0.27790403366088867,
-0.15397004783153534,
-0.11831537634134293,
-0.41047370433807373,
0.1250094175338745,
0.5756256580352783,
-0.4247705340385437,
0.04095589742... | |
How can I make sure the form won't submit if one of the validations is false?
```
$('#form').submit(function(){
validateForm1();
validateForm(document.forms['dpart2']);
validateForm(document.forms['dpart3']);
});
```
If the function returns false, form won't be submitted.
```
$('#fo... | [
0.3750702142715454,
-0.09979896992444992,
0.8401569128036499,
-0.1015077456831932,
-0.01362038403749466,
-0.07554364949464798,
0.6208434104919434,
-1.06648850440979,
0.39419832825660706,
-0.49503958225250244,
-0.3445487320423126,
0.6785891652107239,
-0.16106127202510834,
0.200151726603508,... | |
}
});
``` | [
0.05535417050123215,
0.22359678149223328,
0.33292123675346375,
-0.44429904222488403,
0.4482058882713318,
-0.16275274753570557,
0.18889392912387848,
0.2862910032272339,
0.3227475583553314,
-0.38386330008506775,
-0.35699695348739624,
0.9355558753013611,
-0.4717769920825958,
0.204942822456359... | |
This is just a curiosity question I was wondering if anyone had a good answer to:
In the .NET Framework Class Library we have for example these two methods:
```
public static IQueryable<TSource> Where<TSource>(
this IQueryable<TSource> source,
Expression<Func<TSource, bool>> predicate
)
public static IEnumer... | [
0.13585637509822845,
0.10874582827091217,
0.15066947042942047,
0.1742122322320938,
-0.27707943320274353,
-0.42791852355003357,
-0.1035401001572609,
0.27548038959503174,
-0.46705737709999084,
-0.4455516040325165,
-0.21331524848937988,
0.523300051689148,
-0.47294294834136963,
0.1982226371765... | |
introduced at the same time that `List<T>` and `Array<T>`, in .net 2.0, the different `Func` and `Action` variants come from .net 3.5.
So those `Func` predicates are used mainly for consistency in the LINQ operators. As of .net 3.5, about using `Func<T>` and `Action<T>` the [guideline states](https://learn.microsoft.c... | [
0.10775499045848846,
-0.2519126236438751,
0.4380786716938019,
0.099626325070858,
-0.27600759267807007,
-0.22004903852939606,
-0.09007545560598373,
-0.4165439009666443,
-0.36151593923568726,
-0.27900347113609314,
-0.37289196252822876,
0.4867627024650574,
-0.3135983943939209,
-0.018487246707... | |
We will have a source system broadcasting messages over a JMS compliant pub/sub infrastructure. For the majority of messages published the subscribers will be GUI applications updating a screen with the data in the message.
One of the subscribers, however, will be a translation service. For certain messages published ... | [
0.4580453038215637,
0.21777358651161194,
0.6077889800071716,
0.06986384093761444,
-0.13225555419921875,
-0.230109304189682,
0.5687035918235779,
0.0887380838394165,
0.03032257780432701,
-0.5621638894081116,
-0.44383853673934937,
0.5609062314033508,
-0.2593138813972473,
-0.15260125696659088,... | |
infrastructure in order.
* The messages must only be published once onto the secondary messaging infrastructure.
Basically, how do I make sure that only 1 translation service subscriber responds to the messages? Do I need to switch to a queue based system (but my GUIs will still need pub/sub semantics)?
Note that the... | [
0.09407392889261246,
0.14626768231391907,
0.6213000416755676,
0.04002030938863754,
-0.12427637726068497,
-0.1643599569797516,
0.5250450968742371,
0.08439142256975174,
-0.20167109370231628,
-0.7765453457832336,
-0.21570034325122833,
0.7051810622215271,
-0.4116446077823639,
-0.15590189397335... | |
calls, without an intervening "logger" process. Check out
<http://mischasan.wordpress.com/2011/05/25/redirecting-stderr-to-syslog/> | [
-0.273313045501709,
-0.12055733054876328,
0.4041094183921814,
0.07591485232114792,
0.11616463214159012,
0.08511576801538467,
0.6746430397033691,
0.11131636053323746,
-0.2647355794906616,
-0.3460320830345154,
-0.6447962522506714,
0.45833685994148254,
-0.5888471007347107,
0.11669980734586716... | |
What are the pipe symbols for in Ruby?
I'm learning Ruby and RoR, coming from a PHP and Java background, but I keep coming across code like this:
```
def new
@post = Post.new
respond_to do |format|
format.html # new.html.erb
format.xml { render :xml => @post }
end
end
```
What is the `|format|` part... | [
0.37020808458328247,
-0.03235425055027008,
0.4129606783390045,
-0.13609567284584045,
-0.38903653621673584,
-0.1202019527554512,
0.20868568122386932,
-0.461771160364151,
-0.004822845105081797,
-0.3931731879711151,
0.10427810251712799,
0.3131275773048401,
-0.0551142618060112,
0.1346367001533... | |
wtf + 1
end
```
The output is "9". | [
0.05985664203763008,
0.05789358913898468,
0.6067095994949341,
-0.330678790807724,
-0.01553014200180769,
-0.4257073998451233,
0.1963830441236496,
0.1568780243396759,
-0.02494332194328308,
-0.48883235454559326,
-0.3757190704345703,
0.34402430057525635,
-0.6423905491828918,
-0.079388469457626... | |
Does anyone know how i can get the grid to select a row by clicking on any cell in the row?
The only way i can do this at the moment is by setting the AutoGenerateSelectButton property to True, but this adds a column to the grid with a crude "select" hyperlink and only selects the row if the word "Select" is cliked o... | [
0.34762677550315857,
0.14097300171852112,
0.3790792226791382,
0.008535230532288551,
0.13083143532276154,
-0.21627096831798553,
0.13002827763557434,
-0.021843208000063896,
-0.12917083501815796,
-0.7101507186889648,
0.21362243592739105,
0.7201328873634338,
-0.15210729837417603,
0.25464344024... | |
ClientScript.GetPostBackClientHyperlink
(this.GridView1, "Select$" + e.Row.RowIndex);
```
There's a CodeProject article about it [here](http://www.codeproject.com/KB/webforms/JavaRowSelect.aspx), which goes into much more detail. | [
0.0628303661942482,
-0.08445098996162415,
0.36866870522499084,
-0.2500186860561371,
-0.29572391510009766,
-0.03165731579065323,
0.15491171181201935,
0.25267142057418823,
-0.39704787731170654,
-0.6372696161270142,
-0.04115138202905655,
0.27676743268966675,
-0.42337238788604736,
0.1504049152... | |
Often, when I switch branches in git, if the files are open in emacs, then emacs asks if I want to revert them (as it thinks they've changed on disk) even though the contents are identical.
Firstly I'd like to find a way for emacs to not ask me about it at all if the contents on disk are identical to those in the buff... | [
-0.02209600992500782,
0.027218813076615334,
0.3949393033981323,
0.11933967471122742,
-0.1875414401292801,
0.06535666435956955,
0.17376065254211426,
0.22745585441589355,
-0.762339174747467,
-0.4319683909416199,
-0.3991883397102356,
0.37773844599723816,
-0.1069893091917038,
0.433253377676010... | |
of working, etc I could try. I'm fairly happy writing emacs-lisp if people can give me pointers on where to start.
PS I'm using Aquamacs on OSX if that matters.
Edit:
Well, I've found the revbuffs package to be pretty much what I need. Certainly enough to stop me wanting to try and write anything new myself. (I mapp... | [
0.08445753902196884,
-0.03553773835301399,
0.8387598395347595,
0.09281009435653687,
-0.05050806701183319,
0.028215456753969193,
0.42320239543914795,
0.18325136601924896,
-0.3473457992076874,
-0.6794591546058655,
-0.10567227005958557,
0.9571405649185181,
-0.2871150076389313,
-0.367307424545... | |
to be in control of what happens.
I'd kind of guessed that if I accessed git from within emacs, then it could probably be handled easier, but I currently prefer accessing git through the commandline. (I haven't quite been using emacs long enough to make it my operating system). I will investigate magit a little more t... | [
0.3926262855529785,
0.041864339262247086,
0.727824330329895,
0.24213367700576782,
-0.2673574984073639,
-0.296897292137146,
0.3919149935245514,
0.10900887101888657,
-0.3981015086174011,
-0.9011483788490295,
-0.12396594136953354,
0.7041131258010864,
-0.13108202815055847,
-0.01012215483933687... | |
reverts your buffers when you have files being edited both in Emacs and via external tools (e.g., code generators such as [Jomtool](http://www.neilvandyke.org/jomtool/))... | [
0.19768494367599487,
0.07313411682844162,
0.7534423470497131,
-0.05264567211270332,
0.18831764161586761,
0.018800951540470123,
0.4518955647945404,
-0.150389164686203,
-0.5264681577682495,
-0.38338667154312134,
-0.3951406478881836,
0.6797844171524048,
-0.33237653970718384,
0.059434127062559... | |
I have seen examples of how you can use the Groovy AST transformations to extend the language, e.g. to log before and after a method call as shown [here](http://groovy.codehaus.org/Local+AST+Transformations). However, would it also be possible to use this framework to extend the syntax of the language itself? For insta... | [
0.2660837173461914,
-0.10024766623973846,
0.2485245168209076,
-0.09192521125078201,
0.022418485954403877,
0.11524515599012375,
0.08148698508739471,
-0.011672070249915123,
-0.39272063970565796,
-0.41361117362976074,
-0.11782441288232803,
0.8287125825881958,
-0.34640592336654663,
0.094427160... | |
quite flexible, this can get you pretty far. | [
0.4407545328140259,
-0.22173471748828888,
0.2550329864025116,
0.2135167419910431,
0.22144995629787445,
-0.209196537733078,
-0.02288155071437359,
0.2544020414352417,
-0.2891627848148346,
-0.32342100143432617,
0.2769591808319092,
0.6866138577461243,
0.22041195631027222,
-0.18825319409370422,... | |
1. When using an external assembly which comes with an XML documentation file, how do I get visual studio to find it?
2. When having an XML documentation file, is there a program or xml transform file or something I can use to look at it in a nice way? Not necessarily as complex as the msdn documentation viewer thingy,... | [
0.7068881988525391,
-0.36937418580055237,
0.13588063418865204,
0.16719850897789001,
-0.06087750196456909,
-0.40038177371025085,
0.03124028630554676,
-0.35516196489334106,
-0.2681404948234558,
-0.5596818923950195,
0.11396274715662003,
0.900604784488678,
-0.10750696063041687,
-0.258879601955... | |
(against the types/members/etc). There are tools to transform it, but I've never bothered. [Sandcastle](http://www.codeplex.com/Sandcastle/) may be worth a look, but it was never nice to me ;-p | [
0.5493817329406738,
-0.1397421658039093,
0.1327238231897354,
-0.02427845634520054,
-0.14564023911952972,
-0.1446569412946701,
0.36990228295326233,
0.1561344414949417,
-0.15462204813957214,
-0.4189990758895874,
-0.055290594696998596,
0.23006145656108856,
-0.26620975136756897,
0.237366646528... | |
I have a lot of services which query the database. All of them work fine but one service calling a stored procedure gives me following error:
> Could not find server 'dbo' in
> sys.servers. Verify that the correct
> server name was specified. If
> necessary, execute the stored
> procedure sp\_addlinkedserver to ad... | [
0.15645083785057068,
0.07437694817781448,
0.49277326464653015,
0.10948674380779266,
-0.18812906742095947,
-0.2609141170978546,
0.39086684584617615,
-0.1328963190317154,
-0.15424005687236786,
-0.870133638381958,
0.0241452157497406,
0.4726164937019348,
-0.11440198123455048,
0.180149883031845... | |
to find server.database.schema.object. Check your mapping for stray dots / dubious entries. | [
0.25649169087409973,
0.013491068035364151,
0.4083743393421173,
0.3465196490287781,
0.1729208528995514,
-0.28739336133003235,
0.2958792448043823,
-0.0072611174546182156,
-0.19479429721832275,
-0.8846971988677979,
0.1250949651002884,
0.24553680419921875,
-0.07914073765277863,
0.0830450430512... | |
```
<script>
var is_gecko = /gecko/i.test(navigator.userAgent);
var is_ie = /MSIE/.test(navigator.userAgent);
function insertNodeAtSelStart()
{
if(is_gecko)
{
var S = window.getSelection();
if(!S.isCollapsed)
{
var R = | [
-0.08755725622177124,
-0.010479879565536976,
0.5151604413986206,
-0.22672636806964874,
-0.010013497434556484,
0.1195041760802269,
0.6066628098487854,
-0.26131510734558105,
-0.03515483811497688,
-0.8663756847381592,
-0.5932027101516724,
0.6490076780319214,
-0.3040194511413574,
0.10426367074... | |
S.getRangeAt(0);
var R1 = R.cloneRange();
var NN = document.createElement("startMarker");
R1.insertNode(NN);
NN.parentNode.removeChild(NN);
}
}
if(is_ie) | [
-0.22152462601661682,
-0.27925288677215576,
0.35316887497901917,
-0.5209617614746094,
0.4935309588909149,
0.14377321302890778,
0.5617858171463013,
-0.3097011148929596,
-0.034990839660167694,
-0.642720639705658,
-0.5629088878631592,
0.2101544290781021,
-0.28408777713775635,
0.52514839172363... | |
{
// IE-specific code
}
}
</script>
<div>
<span>one two three</span>
</div>
<input type="button" value="Insert node at selection start" onclick="insertNodeAtSelStart();" />
```
The first time I click the button after loading the page and selecting some text, Firefox clears the selection.... | [
-0.08023644238710403,
0.048879291862249374,
0.5735717415809631,
-0.40073132514953613,
0.11559828370809555,
-0.30404046177864075,
0.08393595367670059,
-0.3440830409526825,
-0.3209804594516754,
-0.910696804523468,
-0.29025140404701233,
0.5522652268409729,
-0.33621037006378174,
-0.06998477876... | |
(depending on what range of text is selected) fails with a:
```
Error: uncaught exception: [Exception... "Index or size is negative or greater than the allowed amount" code: "1" nsresult: "0x80530001 (NS_ERROR_DOM_INDEX_SIZE_ERR)" location: "..."]
```
on the insertNode call. Since the insertion is unsuccessful the... | [
-0.28261205554008484,
0.11824505776166916,
0.18162526190280914,
-0.19495783746242523,
0.4262202978134155,
0.01759447157382965,
0.6677222847938538,
-0.16408398747444153,
-0.23724615573883057,
-0.7314280271530151,
-0.3258587718009949,
0.7736448645591736,
-0.4230293333530426,
-0.0613626763224... | |
by calling document.body.normalize() to return the whole span content to a single Text node, after it has been split by the insert/remove cycle. | [
0.11077529937028885,
-0.1823308914899826,
0.6537830829620361,
0.14209085702896118,
0.07091493159532547,
-0.2780704200267792,
0.09972267597913742,
-0.21620868146419525,
-0.1432965248823166,
-0.5881132483482361,
-0.3932434916496277,
0.3289168179035187,
-0.297782301902771,
0.1544989049434662,... | |
I was trying to deploy my project with IExpress. I have the following scenario. I want to extract some files to a location preferably c:\program files\. Then after it copies all the files i want it to run a .cmd file (which is a script). the script is also added in the project itself and it would refer to a file which ... | [
0.1318315714597702,
-0.04137231782078743,
0.27308008074760437,
-0.006731357425451279,
0.12339632958173752,
-0.13277371227741241,
0.02102518267929554,
0.017026375979185104,
-0.06344939023256302,
-0.9773858785629272,
-0.11858276277780533,
0.5320438742637634,
-0.1962181031703949,
0.0177741162... | |
directory when you send your files to, it should start in the same directory.
Test it easy, make a cmd like this:
**cmdsetup.cmd:**
@echo Source path: %~dp0 >> %temp%\%~n0.log
Put this in your package and when it's done, go check the %temp% directory, locate the cmdsetup.log file and look in it. This should be the... | [
0.439184308052063,
0.024103324860334396,
0.5573372840881348,
0.04767942056059837,
0.06917236745357513,
-0.000727279984857887,
0.0785798579454422,
-0.11285126954317093,
-0.1876348853111267,
-0.7439266443252563,
-0.017094064503908157,
0.5955750346183777,
-0.26213955879211426,
0.0248805563896... | |
I want to add a VC++ DLL reference into my C# Visual Studio project. But when I try to add it I see, "It is not a valid assembly or COM component".
Please suggest how I can use the VC++ DLL as a reference in a C# project.
There are two options for using a C++ DLL from C#: either COM interop, or P/Invoke. COM Interop i... | [
0.6774352192878723,
-0.005381966941058636,
0.03632313758134842,
0.07662546634674072,
-0.07618201524019241,
0.2571616470813751,
-0.24961990118026733,
0.009519022889435291,
-0.3767038881778717,
-0.8438637256622314,
-0.01413651928305626,
0.6713055968284607,
-0.4698055684566498,
0.007830603979... | |
call exported functions from C# (think calling standard Win32 API functions from C#). This is likely easier to set up, since all you need to do is export a function, however that could cause you to refactor your code in the C++ DLL, since it's not a very OOP way of doing things. | [
0.21754644811153412,
-0.11495938152074814,
-0.017851991578936577,
-0.010874113067984581,
-0.26409491896629333,
-0.38846534490585327,
0.11842534691095352,
0.16016225516796112,
-0.20194146037101746,
-0.31367525458335876,
-0.2668139934539795,
0.7646631002426147,
-0.6398671269416809,
0.0417464... | |
If I have a class with two constructors as follows:
```
class Foo
{
public Foo(string name)
{...}
public Foo(Bar bar): base(bar.name)
{...}
}
```
is there some way that I can check if bar is null before I get a null reference exception?
You can use a **static** method to do this:
```
class Foo
{
... | [
0.13794448971748352,
0.12758180499076843,
-0.012181365862488747,
-0.22184109687805176,
-0.09998992085456848,
-0.007886343635618687,
0.11254353076219559,
-0.16035982966423035,
-0.01127727422863245,
-0.581765353679657,
-0.010880823247134686,
0.5754815340042114,
-0.3505193889141083,
0.1410512... | |
static string GetName(Bar bar) {
if(bar == null) {
// or whatever you want ...
throw new ArgumentNullException("bar");
}
return bar.Name;
}
}
``` | [
-0.018782583996653557,
-0.060535673052072525,
0.5638548731803894,
-0.44262227416038513,
0.021791167557239532,
0.05790792778134346,
0.2869667112827301,
-0.1691979318857193,
0.06886772066354752,
-0.374004065990448,
-0.6034302711486816,
0.7542116045951843,
-0.5253462791442871,
0.2800981998443... | |
My first attempt of **reverse for loop** that does something n times was something like:
```
for ( unsigned int i = n-1; i >= 0; i-- ) {
...
}
```
This **fails** because in *unsigned arithmetic* `i` is guaranteed to be always greater or equal than zero, hence the loop condition will always be true. Fortunat... | [
-0.022789141163229942,
0.2642967104911804,
0.026429789140820503,
-0.4252265393733978,
-0.21042242646217346,
0.12121545523405075,
0.7520027160644531,
-0.3034334182739258,
0.058464158326387405,
-0.25116974115371704,
0.3973056972026825,
0.5303729772567749,
-0.6233825087547302,
0.1841157078742... | |
The loop index should be unsigned.
3. n is unsigned constant.
4. It should not be based on the 'obscure' ring arithmetics of unsigned integers.
Any ideas? Thanks :)
How about:
```
for (unsigned i = n ; i-- > 0 ; )
{
// do stuff with i
}
``` | [
0.543847382068634,
0.04045586287975311,
0.1770433783531189,
0.02469763718545437,
0.1748492419719696,
-0.30449262261390686,
0.5266814231872559,
-0.24978400766849518,
-0.23727180063724518,
-0.19642192125320435,
0.07190832495689392,
0.2936367988586426,
-0.5059310793876648,
0.287426620721817,
... | |
I have a database in which the main table has a really badly named primary key field which I want to rename. This primary key field is referenced by about 20 other tables and about 15 stored procedures.
What is the easiest way to rename this field everywhere it is referenced throughout the database?
Database refactori... | [
0.5289673805236816,
0.30723538994789124,
0.10410506278276443,
0.04373941943049431,
0.004231145605444908,
-0.05408325791358948,
0.1685308963060379,
-0.14534509181976318,
-0.18832403421401978,
-0.5964307188987732,
0.1449468731880188,
0.3877299726009369,
-0.19777695834636688,
0.35370954871177... | |
do this manually and you werent dealing with a huge database, I would probably make a text export of the database (ddl and data) and then get busy with find & replace.
edit: Additionally Redgate's (<http://www.red-gate.com/>) software is very highly rated but costs money. Personally I think their products are excelle... | [
0.42632368206977844,
0.26884499192237854,
0.33626583218574524,
-0.12403836101293564,
-0.11864811927080154,
-0.15436090528964996,
0.4228944182395935,
-0.10351545363664627,
-0.3052052855491638,
-0.6397584080696106,
0.07098305225372314,
0.6017252206802368,
0.10324502736330032,
-0.031185023486... | |
I have an input field in which a serial number will be typed. The number of characters allowed is set.
Problem is that because of the letter-spacing, on typing a char in firefox, the cursor will jump ahead to where you would type the next char (even with maxlength set), which has the chars break break out of the littl... | [
0.07296037673950195,
0.2723013162612915,
0.5591188669204712,
-0.08070461452007294,
-0.06486467272043228,
0.04328947514295578,
0.35043004155158997,
-0.13958004117012024,
-0.15447556972503662,
-0.5693982243537903,
-0.029056841507554054,
0.5942217111587524,
-0.29174354672431946,
0.04309837892... | |
50%;
border:0 none;
color:#FFFFFF;
font:bold 16px Courier New;
height:22px;
letter-spacing:14px;
line-height:normal;
padding:4px 0 0 6px;
text-transform:uppercase;
width:208px;
}
```
```
<form id="serialForm">
<label for="serial">Serial:</label>
<input id="serial" type="text" name=... | [
-0.15848709642887115,
-0.08425238728523254,
0.8801665902137756,
-0.20152141153812408,
-0.08087363839149475,
0.24665984511375427,
0.41172945499420166,
-0.5313938856124878,
-0.09561284631490707,
-0.7854500412940979,
-0.23606067895889282,
0.5230429768562317,
-0.10293320566415787,
-0.422314643... | |
1.0.154.53, FireFox 3.0.7 and Internext Explorer 8.0.6001. 18372. | [
-0.13172823190689087,
-0.07827003300189972,
0.46903860569000244,
0.0008145770407281816,
0.1666765660047531,
-0.022867465391755104,
0.030907319858670235,
-0.24485279619693756,
0.052115391939878464,
-0.9047642946243286,
-0.2994067370891571,
0.48910611867904663,
-0.6996550559997559,
0.0656471... | |
Suppose I have three **C** static libraries say *libColor.a* which depends on \*libRGB.\*a which in turn depends on *libPixel.a* . The library *libColor.a* is said to depend on library *libRGB.a* since there are some references in *libColor.a* to some of symbols defined in *libRGB.a*. How do I combine all the above lib... | [
0.0477139875292778,
0.09410441666841507,
0.4031868875026703,
-0.03009878285229206,
-0.3033013939857483,
0.2155667096376419,
0.06622400879859924,
-0.256129652261734,
-0.26466014981269836,
-0.7381775379180908,
0.20850758254528046,
0.31718769669532776,
-0.5325391292572021,
0.04511276632547378... | |
*libColor.a* etc.
I tried my luck using various options in **ar** command (used to create and update static libraries/archives).
1/ Extract ALL of the object files from each library (using `ar`) and try to compile your code without the libraries or any of the object files. You'll probably get an absolute bucket-load o... | [
0.02739582769572735,
-0.02051934227347374,
0.4183078110218048,
0.020972082391381264,
0.04999130964279175,
0.14586304128170013,
0.4757002890110016,
-0.5805879235267639,
-0.2902868390083313,
-0.6925716400146484,
-0.1417706459760666,
0.5357584953308105,
-0.31257957220077515,
0.010124509222805... | |
symbols or, if there's none, go to step 5.
4/ Go to step 2.
5/ Combine all the object files in your list (if any) into a single library (again with `ar`).
Bang! There you have it. Try to link your code without any of the objects but *with* the new library.
This whole thing could be relatively easily automated with ... | [
0.3786282539367676,
-0.029297392815351486,
0.22234424948692322,
0.10078145563602448,
-0.05878686532378197,
0.034114837646484375,
0.4010712802410126,
-0.21313409507274628,
-0.26813167333602905,
-0.7397601008415222,
-0.020575812086462975,
0.37381511926651,
-0.09089047461748123,
-0.0985219255... | |
Let T1 and T2 are `DataTable`s with following fields
```
T1(CustID, ColX, ColY)
T2(CustID, ColZ)
```
I need the joint table
```
TJ (CustID, ColX, ColY, ColZ)
```
How this can be done in C# code in a simple way? Thanks.
If you are allowed to use LINQ, take a look at the following example. It creates two DataTable... | [
0.07177601754665375,
0.007962390780448914,
0.5361985564231873,
-0.1968640238046646,
-0.01427514012902975,
0.038202691823244095,
-0.1639312207698822,
-0.2941298484802246,
0.11266562342643738,
-0.5894691944122314,
-0.27717721462249756,
0.6520978808403015,
-0.5883464813232422,
-0.047574926167... | |
dt2.Columns.Add("CustID", typeof(int));
dt2.Columns.Add("ColZ", typeof(int));
for (int i = 1; i <= 5; i++)
{
DataRow row = dt1.NewRow();
row["CustID"] = i;
row["ColX"] = 10 + i;
row["ColY"] = 20 + i;
dt1.Rows.Add(row);
row = dt2.NewRow();
row["CustID... | [
-0.3412017822265625,
-0.23574034869670868,
0.5257558822631836,
-0.514351487159729,
0.026485836133360863,
0.6044806241989136,
0.026544224470853806,
-0.3178490400314331,
-0.24358852207660675,
-0.4398116171360016,
-0.4049937427043915,
0.353525310754776,
-0.3825547397136688,
0.0350488573312759... | |
row["ColZ"] = 30 + i;
dt2.Rows.Add(row);
}
var results = from table1 in dt1.AsEnumerable()
join table2 in dt2.AsEnumerable() on (int)table1["CustID"] equals (int)table2["CustID"]
select new
{ | [
-0.3098481595516205,
-0.18788817524909973,
0.5072700381278992,
-0.40801629424095154,
0.07495041936635971,
0.25401678681373596,
0.1768048107624054,
-0.5792362689971924,
-0.2755068838596344,
-0.5976717472076416,
-0.30808982253074646,
0.5487909317016602,
-0.1443166732788086,
-0.04192550480365... | |
CustID = (int)table1["CustID"],
ColX = (int)table1["ColX"],
ColY = (int)table1["ColY"],
ColZ = (int)table2["ColZ"]
}; | [
-0.6559519171714783,
0.0012260928051546216,
0.3487291932106018,
-0.2715286612510681,
0.20821227133274078,
0.30658212304115295,
-0.042271122336387634,
0.12022675573825836,
-0.10915790498256683,
-0.3618769645690918,
-0.6003562211990356,
0.44633984565734863,
-0.6241967678070068,
-0.0371926389... | |
foreach (var item in results)
{
Console.WriteLine(String.Format("ID = {0}, ColX = {1}, ColY = {2}, ColZ = {3}", item.CustID, item.ColX, item.ColY, item.ColZ));
}
Console.ReadLine();
// Output:
// ID = 1, ColX = 11, ColY = 21, ColZ = 31
// ID = 2, ColX = 12, ColY = 22, ColZ = 32
// ID = 3, ColX = 13... | [
-0.5147994160652161,
0.2145751416683197,
0.6352084875106812,
-0.3152620792388916,
0.2240518182516098,
0.7272017598152161,
-0.052894990891218185,
-0.36862432956695557,
0.1835728883743286,
-0.6165487766265869,
-0.4132353961467743,
0.35866227746009827,
-0.18839123845100403,
-0.128990694880485... | |
ColZ = 35
``` | [
-0.11996922641992569,
0.35112717747688293,
0.6625460982322693,
-0.2776605188846588,
0.10039310157299042,
0.03133643418550491,
-0.1900482475757599,
-0.07451411336660385,
-0.2293175458908081,
-0.2777588665485382,
-0.17497406899929047,
0.38996535539627075,
-0.2623405158519745,
0.1807023584842... | |
I have a XBAP application with the following user control:
```
<UserControl x:Class="XXX.UsersGrid"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Height="Auto" Width="Auto">
<UserControl.Resources>
... | [
-0.3082633316516876,
0.3496778905391693,
0.6378658413887024,
-0.35297882556915283,
-0.058581218123435974,
0.11099501699209213,
-0.0852237194776535,
-0.28296172618865967,
-0.2591724097728729,
-0.4764421582221985,
-0.04252729192376137,
0.2710607945919037,
-0.3304840326309204,
0.2572668790817... | |
<Path x:Name="arrow" StrokeThickness = "1" Fill= "gray" Data= "M 5,10 L 15,10 L 10,5 L 5,10"/>
</DockPanel>
</DataTemplate>
</UserControl>
...
```
Now I want to fetch the string "xxUser" from a resx file which is embed as resource in the application
How do I achieve this?
None of t... | [
0.029824936762452126,
0.10778924077749252,
0.6822293996810913,
0.02390267513692379,
0.09778148680925369,
0.29235056042671204,
0.3275427222251892,
-0.45023828744888306,
-0.16414019465446472,
-0.7993139028549194,
0.07410551607608795,
0.6388864517211914,
-0.05076485127210617,
-0.0526894964277... | |
want. I'd start by reading about Localization in WPF. You'll find that if you are doing localization with WPF you'll want x:Uid defined on every node in your app.
<http://msdn.microsoft.com/en-us/library/ms788718.aspx> | [
0.3057636320590973,
-0.15611422061920166,
0.4207720458507538,
0.11797814816236496,
0.21925152838230133,
-0.06979593634605408,
-0.04512134939432144,
0.24587683379650116,
-0.335213303565979,
-1.1532548666000366,
-0.23368102312088013,
0.1895604431629181,
-0.2784489393234253,
0.167371079325675... | |
I'm trying to create a Firefox plugin and I would like to use some jQuery functions. How to include needed jQuery libraries? Some way to include the libraries to the plugin itself?
I need to show a jQuery Dialog type window on various web sites when user clicks a link injected to the page.
Thank you for your answers!... | [
0.6040923595428467,
0.16868343949317932,
0.23308661580085754,
0.2778080999851227,
-0.033614497631788254,
-0.18742969632148743,
0.08211297541856766,
-0.0781652182340622,
-0.0703398585319519,
-0.5332542061805725,
-0.05987710878252983,
0.6672826409339905,
-0.42132943868637085,
0.0984189286828... | |
as result, then the copy constructor is called. It uses the passed reference to access the locally-defined object and copy what's necessary to the new object. | [
0.09362262487411499,
0.1733933538198471,
0.4017210602760315,
0.22451187670230865,
0.20855019986629486,
-0.10883593559265137,
-0.16923561692237854,
0.06451202183961868,
0.19915039837360382,
-0.5316432118415833,
-0.2972697913646698,
0.42969369888305664,
-0.31929367780685425,
0.57928222417831... | |
What is a decent IDE for developing JavaScript, I'll be writing both client side stuff and writing for Rhino. Ideally It needs to run on Mac OSX, although something that runs on Windows too would be nice.
**ADDITIONAL:**
Having had a play with both js2 and Aptana, I think I'll be continuing to use Aptana. Mainly beca... | [
0.21965448558330536,
0.015016634948551655,
0.23295527696609497,
0.03541860729455948,
-0.27282384037971497,
-0.043058041483163834,
0.16268354654312134,
0.28938165307044983,
-0.1733517348766327,
-0.7541458606719971,
0.08753489702939987,
0.890809178352356,
-0.059643201529979706,
-0.0518377386... | |
Stable, great syntax support for all the major javascript libraries, very good css and html editors. Also good support for php, air, ruby on rails and iPhone app development (I never tested this one).
Aptana can also connect to remote site via ftp (sftp in the pro edition) and to svn and cvs repositories.
It's based ... | [
0.3059301972389221,
-0.056224409490823746,
0.49130985140800476,
-0.14098283648490906,
-0.5204442143440247,
-0.10646664351224899,
0.1706724762916565,
0.026090160012245178,
-0.2089102864265442,
-0.7732012867927551,
0.12261084467172623,
0.297573059797287,
-0.22908733785152435,
-0.106849685311... | |
stable. Much better to use the standalone version. | [
0.14744511246681213,
0.09598567336797714,
0.2550168037414551,
0.0831804946064949,
0.03489755466580391,
-0.49005481600761414,
0.12235918641090393,
-0.20227459073066711,
0.17579932510852814,
-0.4222002625465393,
-0.24380572140216827,
0.669335126876831,
-0.18699178099632263,
-0.18480384349822... | |
No matter how much googling I do, I can't seem to find the Psiphon source code (the download page on psiphon.ca gives me a '404'). Furthermore, linux installation instructions don't seem to exist. Any help would be greatly appreciated.
It's open source and available on project's page, via BitBucket
<https://bitbucket.... | [
0.6197459101676941,
0.13865676522254944,
-0.13583320379257202,
0.11917978525161743,
0.1440816968679428,
-0.0988956093788147,
0.2130344808101654,
0.3258315920829773,
-0.1835336834192276,
-0.4762536287307739,
-0.31921887397766113,
0.5069553256034851,
-0.2833300828933716,
0.23274700343608856,... | |
**DUPLICATE of** [How do I delete a row from a GridView during the RowDeleting event?](https://stackoverflow.com/questions/665751/deletion-from-datatable)
hi,
i have a Datatable in my code in vb.net.I need to delete rows from the datatable.
The namw of my Datatable is "temptable".in my rowdeleting event of a Gridview... | [
-0.20871181786060333,
0.27430540323257446,
0.2247397005558014,
-0.09346050769090652,
0.18594050407409668,
0.20104414224624634,
0.5413575768470764,
-0.12291816622018814,
-0.43194979429244995,
-0.5870022773742676,
-0.003802735358476639,
0.535451352596283,
-0.6793613433837891,
0.3596658408641... | |
I don't use prefix while naming internal variables of a class (I know some do but I am not starting "why do you..." debate). I just prefer it that way. The problem is that sometimes same parameters are passed in contructor and I end up being confused how to name them. For example:
```
public class SampleClass
{
p... | [
0.2844586670398712,
-0.16933129727840424,
-0.21391338109970093,
-0.06640038639307022,
-0.21025924384593964,
0.04086460545659065,
0.3238063454627991,
-0.24917195737361908,
0.1151665672659874,
-0.3456203043460846,
0.09997285902500153,
0.4341908097267151,
-0.3492952287197113,
0.47830358147621... | |
}
}
```
How to name XclassIdX and XclassNameX?
One thing that can probably be done is:
```
public class SampleClass
{
private int classId;
private string className;
public SampleClass (int classId, string className) {
this.classId = classId;
this.className = className;
}
}
```
Ju... | [
0.12467954307794571,
0.0889047160744667,
-0.04110434278845787,
0.04012387990951538,
0.11788804084062576,
-0.06599695235490799,
0.23978658020496368,
-0.26387137174606323,
-0.04433175548911095,
-0.4769633412361145,
0.11330273747444153,
0.7537018060684204,
-0.34744977951049805,
0.241640120744... | |
clear, it's concise, and there is no confusion about what you meant. | [
0.6045970916748047,
0.4618050158023834,
-0.1259084790945053,
-0.19429507851600647,
-0.2516365349292755,
-0.330966591835022,
0.10692770034074783,
0.662623941898346,
0.0789840891957283,
-0.23297099769115448,
-0.209029883146286,
0.49226850271224976,
-0.14634592831134796,
0.02430131286382675,
... | |
Using Informix, I've created a tempory table which I am trying to populate from a select statement. After this, I want to do an update, to populate more fields in the tempory table.
So I'm doing something like;
```
create temp table _results (group_ser int, item_ser int, restype char(4));
insert into _results (group... | [
-0.03835930675268173,
-0.07711439579725266,
0.3996378481388092,
0.08732733875513077,
-0.04923880845308304,
-0.09055532515048981,
-0.02705555595457554,
-0.34073296189308167,
0.06794315576553345,
-0.7783493399620056,
0.11288391798734665,
0.49397215247154236,
-0.6447106003761292,
0.0760696157... | |
specified!)
[This page](http://www.geocities.com/SiliconValley/Bridge/4578/faq.html) says the reason you can't do that is because "NULL" doesn't have a type. So, the workaround is to create a sproc that simply returns NULL in the type you want.
That sounds like a pretty bad solution to me though. Maybe you could creat... | [
0.2752944231033325,
-0.17702193558216095,
0.49211254715919495,
0.08324865996837616,
0.09175305813550949,
-0.0016298892442137003,
-0.011313389986753464,
-0.25652506947517395,
-0.2002299278974533,
-0.3532380163669586,
-0.0072282422333955765,
0.34320521354675293,
-0.6347765922546387,
0.223314... | |
Platform: .NET Framework 3.5 SP1 on x32
Are there any performance issues regarding leaving an empty statement (";", by itself) in code?
And to be marked as an answer would you also teach a man (me? and other people reading this) to fish? Meaning, how to figure out there is a performance issue with it?
1) Use a tool l... | [
0.4216288924217224,
-0.4401637017726898,
-0.179195836186409,
0.19537301361560822,
-0.16513560712337494,
-0.07435585558414459,
0.21445806324481964,
-0.2389579564332962,
-0.3136459290981293,
-0.49715131521224976,
-0.047827307134866714,
0.29784339666366577,
-0.3331696093082428,
-0.25275123119... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.