text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
three errors, then a message that it registered. However when i try to use it i get a 0x80040111 "ClassFactory cannot supply requested class" error.
If anyone has any idea what the problem is here i would greatly appreciate it. I either need to be able to accomplish this (preferred) or prove that it's not possible.
Th... | [
0.07284554839134216,
0.13646957278251648,
-0.0061850654892623425,
-0.2728896737098694,
-0.10314522683620453,
0.054761745035648346,
0.7841931581497192,
-0.1964094191789627,
-0.002519378438591957,
-0.6739048957824707,
-0.003537447890266776,
0.6112270355224609,
-0.41632458567619324,
0.1149687... | |
//Create XML document & load the XML file.
XmlDocument xmlDocument = new XmlDocument();
xmlDocument.Load(nameofFile);
treeView1.Nodes.Clear();
if (xmlDocument.DocumentElement != null)
{
TreeNode treeNodedoc = new TreeNode(xmlDocument.DocumentElement.Name);
... | [
-0.15464790165424347,
-0.3326704502105713,
0.49607300758361816,
-0.0949818342924118,
0.27500367164611816,
-0.130848228931427,
-0.030394205823540688,
-0.2469273954629898,
-0.29349130392074585,
-0.5513716340065002,
-0.6317402124404907,
0.44089168310165405,
-0.12391208112239838,
0.07812602818... | |
(open.ShowDialog(this) == DialogResult.OK)
{
txtFileName.Text = open.FileName;
MytreeNodeClass treenodeClass = new MytreeNodeClass();
treenodeClass.initiatingTree(open.FileName, treeView1);
}
``` | [
0.032659415155649185,
-0.0222514346241951,
0.6706711053848267,
-0.30549830198287964,
0.04715882986783981,
-0.12467332929372787,
0.5731740593910217,
-0.06505150347948074,
-0.24620315432548523,
-0.6272569298744202,
-0.49125704169273376,
0.4307396411895752,
-0.4359872043132782,
0.248308181762... | |
And how do I run it?
[Sphinx website](http://sphinx.pocoo.org/) says:
```
easy_install -U Sphinx
```
If you want that installed in system python you'd probably need elevated permissions with `sudo`:
```
sudo easy_install -U Sphinx
```
If you do not have `easy_install` yet, see <http://peak.telecommunity.com/DevCe... | [
0.2952492833137512,
-0.3091054856777191,
0.1507837325334549,
0.11566812545061111,
0.2276601493358612,
-0.3978061079978943,
0.156420037150383,
0.14786013960838318,
-0.12136754393577576,
-0.5902944207191467,
-0.3018101453781128,
0.7131566405296326,
-0.13936680555343628,
-0.6581976413726807,
... | |
I want to expand on the functionality of NSTextField. AMong the things I want to achieve is:
Changing the look and feel of the caret.
Detecting when the text reaches a certain number of characters and then coloring the text after that limit differently. \*
To my great frustration after spending quite some time googl... | [
0.4814342260360718,
0.007693641819059849,
0.5018811821937561,
-0.4105144143104553,
-0.039868179708719254,
0.15690656006336212,
0.5716578960418701,
-0.026696551591157913,
0.03239653259515762,
-0.8320980072021484,
-0.05462934076786041,
0.5589103698730469,
-0.10916653275489807,
0.200082555413... | |
one of the two things I list above, and instructions\* on how to implement the code so I can try and figure out how it works by looking at some actual live code.
---
### I am extremely apologetic for my late response!
Apologies to all of you. I have a colic infant at home, and as you (or at least those of you that h... | [
0.3580436110496521,
0.22340328991413116,
0.5041390657424927,
0.21260447800159454,
0.06511952728033066,
0.09984946250915527,
0.36608028411865234,
0.23656535148620605,
-0.22983640432357788,
-0.7960485219955444,
-0.06756019592285156,
0.1785186380147934,
0.34720996022224426,
0.1743158400058746... | |
outlets. I have purchased the book recommended here (and many other places. Some sort of "Bible" I gather) and I'm looking into it as we speak in the few silent hours I have these days. :)
But although I can see it's going to be an indispensable tool for me I still gain the most understanding from studying examples r... | [
1.026129126548767,
0.017546383664011955,
0.17301949858665466,
0.5735617876052856,
-0.051189225167036057,
-0.2750661373138428,
-0.05206441134214401,
0.24961985647678375,
-0.0053604841232299805,
-0.9335412383079529,
0.0628102719783783,
0.8192163705825806,
0.0725020170211792,
0.28842934966087... | |
mark Mark Thalmans post as the answer as I'm sure it's a proper "for dummies" response, but I'll hold out for a few days since I'd really love a file to peruse. But I am not ungrateful!
Oh, and; Please believe me guys when I say I'm not quite as useless in languages I actually know. It's just that these concepts with... | [
0.702796220779419,
0.40491798520088196,
0.1471407115459442,
0.11961739510297775,
-0.1620463728904724,
0.07023288309574127,
0.47516077756881714,
0.27741438150405884,
0.012792966328561306,
-0.5137693881988525,
-0.1490449756383896,
0.32983073592185974,
0.32099947333335876,
-0.1190924122929573... | |
that reading the theory hasn't got tremendous value for me as well. I wouldn't be where I am without Colin Moock definitive guide to AS3
Martin,
I started with the "New File" dialog and chose "Cocoa" on the left and then Objective-C class.
That will generate the following code, without the comments. Then all you need... | [
0.3446560204029083,
0.1408374309539795,
0.3238776624202728,
-0.11172186583280563,
-0.3693239390850067,
-0.038318123668432236,
0.3425140678882599,
-0.13058795034885406,
-0.12517736852169037,
-0.6530827879905701,
0.029953105375170708,
0.5737982988357544,
-0.4232861399650574,
-0.1123357862234... | |
"Cocoa Programming for Mac OS X, Third Edition" It has bee updated for Leopard, if you haven't already.
Good Luck.
```
#import <Cocoa/Cocoa.h>
@interface MyTextView : NSTextView {
// Outlets & Members go here
}
// Actions & messages go here
@end
```
```
#import "MyTextView.h"
@implementation MyTextView
@end
... | [
0.04414823278784752,
0.27368810772895813,
0.49862363934516907,
-0.23482775688171387,
-0.19308197498321533,
-0.2944638133049011,
0.4084360897541046,
0.1598447561264038,
-0.4212057888507843,
-0.6453859210014343,
-0.22603294253349304,
0.5512804388999939,
-0.36530816555023193,
-0.3685255646705... | |
I'm running Ubuntu and have snmpd running. I can do an snmpwalk:
```
snmpwalk -c public -v 1 localhost .1
```
and I get back about 20 values (SNMPv2-MIB -- mostly system description/name/uptime stuff).
Where are the memory, disk and network values? I've tried querying specific OIDs that I found Googling and they're... | [
0.16416820883750916,
0.0255001001060009,
0.5908512473106384,
0.06042219325900078,
-0.04258515685796738,
-0.15640583634376526,
0.5882807970046997,
0.1363736242055893,
-0.43184006214141846,
-0.7945200800895691,
-0.010849833488464355,
0.6651179790496826,
-0.285010427236557,
0.0797931477427482... | |
default public
com2sec readonly 127.0.0.1 public
#com2sec readwrite default private
```
Restart snmpd:
```
sudo /etc/init.d/snmpd restart
```
Then try this one:
```
snmpwalk -c public -v 2c 127.0.0.1 .
``` | [
-0.25837254524230957,
-0.18926498293876648,
0.216352641582489,
-0.07184311747550964,
0.2159752994775772,
-0.20085027813911438,
0.41212913393974304,
0.212777242064476,
-0.07438305020332336,
-0.6700944900512695,
-0.22647343575954437,
0.9871172904968262,
-0.19486784934997559,
-0.0086093004792... | |
I have the following variables:
```
string str1 = "1";
string str2 = "asd";
string str3 = "3.5";
string str4 = "a";
```
Now I need to find the data type of each string i.e. the data type to which it can be converted if quotes are removed. Here is what I would like each variable to convert to:
> str1 - integer
>
... | [
0.09685991704463959,
0.38602620363235474,
0.37165001034736633,
-0.3506518304347992,
-0.24350404739379883,
0.54291170835495,
0.27058982849121094,
-0.4915979504585266,
0.1649991273880005,
-0.5986881256103516,
-0.0828249529004097,
0.3717706799507141,
-0.16564667224884033,
0.249955415725708,
... | |
from DataGrid where i manually entered values. So everything is becoming a string.
Is there any way to do this?
**Use meta-data**, if you can
That you have to guess what the data types are, is not a good idea.
Two things
1 Where is the data coming from?
If it's a database, are you sure they're strings?
If it is a d... | [
0.4048684239387512,
-0.4211246073246002,
0.2888180613517761,
0.24701520800590515,
-0.15232525765895844,
-0.18513721227645874,
-0.04512592405080795,
-0.10006320476531982,
-0.34308722615242004,
-0.6212015748023987,
0.15964020788669586,
0.6077578663825989,
-0.49605703353881836,
0.221868604421... | |
have strings that happen to be numbers, but are perfectly valid strings e.g phone numbers, bank acount numbers, that are best expressed as strings.
Also these numbers can have many digits, if you convert them to doubles you may loose some digits to floating point inaccuracies (you should be OK up to 14 or 15 digits)
... | [
0.2853158712387085,
0.1036253571510315,
0.24545207619667053,
0.1465880274772644,
-0.20407238602638245,
-0.06873846799135208,
0.33293771743774414,
-0.1639339178800583,
-0.5005497336387634,
-0.37183454632759094,
0.014917622320353985,
0.2224792242050171,
-0.042826082557439804,
-0.110288970172... | |
were you, I'd try to NOT do that, and see if there's any way you can get, or pass some meta-data that will tell you what type it **IS** and not just what type it *might* be | [
0.6760322451591492,
-0.08615288883447647,
-0.08681535720825195,
0.17091822624206543,
-0.027983753010630608,
0.06901280581951141,
0.050155408680438995,
0.23141509294509888,
-0.28764888644218445,
-0.5477398633956909,
-0.021320844069123268,
0.15786106884479523,
0.028277769684791565,
0.2187388... | |
Okay big brains here's something that's more of a challenge than a requirement. I am a bit stumped. I usually just need a prod in the right direction, so get your prodding sticks ready.
I have a tabcontrol covered in textboxes. I want to perform a check of the contents of all the textboxes during the SelectedIndexChan... | [
0.6607732176780701,
0.2515670359134674,
0.29245638847351074,
0.20185352861881256,
0.03651708364486694,
-0.12398920208215714,
0.10088390856981277,
0.11351750791072845,
-0.30512455105781555,
-0.5499703884124756,
0.3099994361400604,
0.9361276626586914,
0.32983219623565674,
-0.0787172913551330... | |
If nothing has changed I want it to just change the selection.
So obviously I'm comparing the contents of the text boxes against associated columns in the datarow.
I could just brute force the check and do each individual check one at a time. I'd prefer to come up with some clever algorithmic way of cycling through t... | [
0.38692837953567505,
-0.1484341025352478,
0.2875226140022278,
-0.05848076194524765,
-0.02887403406202793,
0.17641183733940125,
0.05940542742609978,
0.1637442409992218,
-0.48040464520454407,
-0.5057163834571838,
0.12343750149011612,
0.44614139199256897,
-0.28077396750450134,
-0.210283130407... | |
pretty simple, though I should learn to read the documentation on the Triggers section of a Project in CC.NET:
> Specifying an empty element (`<triggers />`) means integrations are only ever forced manually (for example using CCTray or the Web Dashboard.) Not including a element at all means the project has a single I... | [
0.27971577644348145,
-0.24067214131355286,
-0.05814198777079582,
0.09150765091180801,
0.2820420563220978,
-0.48418518900871277,
0.2185463309288025,
-0.06214046850800514,
-0.4546038508415222,
-0.20678652822971344,
-0.016792036592960358,
0.3161696493625641,
-0.3790605962276459,
-0.1614136397... | |
Suppose you've got a customer who wants an application that has its data centralized stored and maintained, users can connect to it (but can also have data locally stored) and work with it and not using a browser to view and modify the data. Furthermore the application itself should also be centralized maintained.
So ... | [
0.29950597882270813,
0.17227891087532043,
0.17116804420948029,
0.3292199969291687,
0.25612056255340576,
-0.011581947095692158,
-0.06420668214559555,
0.12486780434846878,
-0.39023107290267944,
-0.5925561785697937,
-0.21626557409763336,
0.4276740550994873,
-0.03948609158396721,
-0.0607728399... | |
UI, my personal choice would be WPF; for data layer - Linq To SQL or EF (though a lot of people complain about EF).
If you want some of the logic running on the server, you can use WCF to expose it to the client.
Of course, this makes it Windows-centric. So, if you need Linux as well, you could look at C#/Mono with x... | [
0.2685694992542267,
-0.13506171107292175,
0.580074667930603,
0.1883605420589447,
-0.37736397981643677,
-0.28377196192741394,
-0.18451090157032013,
-0.0074342405423521996,
-0.20296718180179596,
-0.9347563982009888,
0.003227994544431567,
0.6116874814033508,
-0.16845326125621796,
0.0070224693... | |
I have several forms with many textboxes/comboboxes, and I would like to have the "Save" button disabled while at least one of the fields are invalid. I've been able to setup some custom ValidationRules, like so (textbox example shown):
```
<Binding Path="Name">
<Binding.ValidationRules>
<my:TextFieldNotEm... | [
0.6328787803649902,
0.05134974420070648,
0.5521544814109802,
-0.12701743841171265,
-0.017903417348861694,
-0.22948691248893738,
0.2667863965034485,
-0.4046928882598877,
-0.09749003499746323,
-0.6028750538825989,
0.29129573702812195,
0.43651968240737915,
-0.09112482517957687,
-0.21275119483... | |
this answer your question? [Detecting WPF Validation Errors](https://stackoverflow.com/questions/127477/detecting-wpf-validation-errors) | [
0.2067168802022934,
0.12538817524909973,
0.3934566080570221,
0.3829375207424164,
0.05838615819811821,
-0.3812662959098816,
0.3487951159477234,
-0.34705430269241333,
-0.11061990261077881,
-0.07694791257381439,
-0.018078003078699112,
0.07601359486579895,
-0.27655261754989624,
-0.076736994087... | |
I work in a team of 2 developers and currently we use VSS and have no continuous integration or daily build and few Unit tests.
I'm looking to change our source control to Subversion and at the same time get up and running with a more professional process.
Subversion/cruise control/nant/nunit appears quite a popular ... | [
0.3857380151748657,
-0.27159935235977173,
0.4050445854663849,
0.1738712638616562,
-0.13318213820457458,
-0.26982247829437256,
0.23520314693450928,
0.24175934493541718,
-0.314660906791687,
-0.6907983422279358,
-0.023062780499458313,
0.6880301833152771,
-0.13971489667892456,
0.11683829128742... | |
the wild and then tweak as required and as my familiarity with the tools increases.
Is anyone aware of any book/tutorial/walkthrough that covers just the essentials to get me up and running ASAP with this particular combination of tools?
I've been using subversion for quite some years now and I have to say that the be... | [
0.46336784958839417,
-0.5364448428153992,
0.09029500186443329,
-0.04024212434887886,
0.010926429182291031,
-0.2343047857284546,
0.23995977640151978,
0.2316499799489975,
-0.41914093494415283,
-0.2666754722595215,
-0.01990739069879055,
0.9028802514076233,
-0.011236725375056267,
-0.0927803367... | |
to be my favorite client. In fact, on most machines it is the only subversion component I need. It performs all of the functions I use routinely, including repository creation. While that is no knock to the regular command-line tools, and I do install those as well in most cases, I only find the cli tools necessary for... | [
0.31056466698646545,
-0.013549800030887127,
0.24928973615169525,
-0.17166592180728912,
0.06827132403850555,
0.006125730462372303,
-0.12964844703674316,
0.3610861301422119,
-0.1431746780872345,
-0.45289358496665955,
-0.14369599521160126,
0.8374342322349548,
-0.15364858508110046,
0.084678955... | |
from others:
WinMerge: highly recommended free diff tool, install after TortoiseSVN for the best integration. I use this tool on a daily basis for many purposes, some outside of development.
TeamCity: CI server that seems to be well-polished. I haven't tried this one yet but it's the leading contender over CC.NET giv... | [
0.33543822169303894,
-0.3714481294155121,
0.429519385099411,
0.2768685221672058,
-0.3886507451534271,
-0.26337864995002747,
-0.0007212351774796844,
-0.02615758217871189,
-0.3852916955947876,
-0.6289238333702087,
0.09348761290311813,
0.5369541049003601,
0.09358726441860199,
0.07879026234149... | |
you want remote (IP) check-in/check-out, ssl encryption, repository hook scripts and other server-based features.
VisualSVN: a well-reviewed Visual Studio plug-in for SVN. Haven't tried this one but it is regarded as a no-brainer purchase. [Edit: according to what I've read here on overflow, AnkhSVN is a free option t... | [
0.4030592739582062,
-0.35798946022987366,
0.34694328904151917,
0.2526938319206238,
-0.2453547716140747,
-0.1993725299835205,
0.37793636322021484,
0.06350786238908768,
-0.44146326184272766,
-0.5723695755004883,
-0.052243005484342575,
0.43521153926849365,
-0.15413987636566162,
0.135474145412... | |
a similar feature but we already use this outside of development to track helpdesk issues and it is great for a free package.
I don't have experience with unit testing, coverage, documentation tools for .NET, so I can't comment there.
I am a Pythonista though, so I'll plug one thing Python can be useful for wrt SVN, ... | [
0.5731244087219238,
-0.06126902624964714,
0.02976071462035179,
0.0668024867773056,
-0.35546815395355225,
-0.2884843349456787,
0.09157011657953262,
0.09286412596702576,
-0.255906879901886,
-0.3240300118923187,
0.25497472286224365,
0.8278016448020935,
-0.08367588371038437,
-0.198519036173820... | |
tools and you'll be ahead of the game. Developing processes around them and training personnel, well, that's still a job for you. :) | [
0.6403231024742126,
-0.019286826252937317,
0.020936133340001106,
0.4935735762119293,
0.3767721652984619,
0.1541265994310379,
-0.05175299569964409,
-0.030237704515457153,
-0.20388858020305634,
-0.9162400960922241,
0.13771961629390717,
1.015448808670044,
0.530091404914856,
-0.266805499792099... | |
```
function has_thumbnail_image(&$post) {
$content = $post->post_content;
return preg_match('/<img[^>]+src="(.*?)"[^>]*>/', $content, $results);
}
```
I need a function that goes through a block of dynamically returned text and puts all of the images contained within into an array (or more specifically the i... | [
0.24890626966953278,
0.19678035378456116,
0.6174649596214294,
-0.06763894855976105,
-0.07689608633518219,
-0.24929378926753998,
0.16972661018371582,
-0.24706719815731049,
-0.20986369252204895,
-0.6150012016296387,
-0.2635398507118225,
0.5760243535041809,
-0.4939439296722412,
0.024189120158... | |
the first match and then stops. | [
-0.2534579932689667,
0.05927957221865654,
0.35819706320762634,
-0.26690003275871277,
-0.070797860622406,
-0.35231727361679077,
0.5122981667518616,
-0.05074850097298622,
-0.02747959829866886,
-0.7353807091712952,
-0.02858263999223709,
0.2883893847465515,
-0.012677589431405067,
0.06557649374... | |
Essentially what I am looking for is a good way to build a quick database interface. In my (limited) experience with ASP.net I've used a Gridview control for this task. However for this project I am going to be using Java.
Can anyone recommend a good way to set up a Gridview like control (with editable and sortable ro... | [
0.18448735773563385,
-0.2618655860424042,
0.18299500644207,
0.14096824824810028,
-0.09131359308958054,
-0.06882086396217346,
-0.029924681410193443,
0.10722135752439499,
-0.3060038089752197,
-0.7937703728675842,
0.11510184407234192,
0.3023410439491272,
-0.23636563122272491,
0.10029134154319... | |
great.
Java Server Faces (JSF) has a [dataTable](http://www.roseindia.net/jsf/dataTable.shtml) component. If you combine that with a framework built on top of JSF such as [IceFaces](http://www.icefaces.org/main/home/index.jsp) you will get sorting as well.
But if you're looking for a quick library to drop into a JSP, ... | [
-0.16142867505550385,
-0.060593873262405396,
0.5446823835372925,
-0.27351292967796326,
-0.35979214310646057,
-0.21509668231010437,
0.24634359776973724,
-0.13374260067939758,
-0.5108327865600586,
-0.9709274172782898,
0.04749038815498352,
-0.1915496587753296,
-0.28534945845603943,
-0.2490737... | |
I've got the following code :
```
public class A
{
~A()
{
Console.WriteLine("destructor");
}
}
public static A Aref;
static void Main(string[] args)
{
Aref = new A();
int gen = GC.GetGeneration(Aref);
Aref = null; | [
0.2460007518529892,
-0.1505316197872162,
0.4721064865589142,
-0.4952668249607086,
0.13658645749092102,
0.14591370522975922,
0.5405856966972351,
-0.15120302140712738,
0.1617441028356552,
-0.5142549872398376,
-0.34435972571372986,
0.425741046667099,
-0.34535062313079834,
0.6716710329055786,
... | |
GC.Collect(gen, GCCollectionMode.Forced);
Console.WriteLine("GC done");
}
```
I thought my Finalizer method would be called upon my call to GC.Collect, which is not the case.
Can anyone explain me why ?
Finalizers aren't called before `GC.Collect()` returns. The finalizers are run in a separate thread -... | [
-0.00819397997111082,
-0.09066519141197205,
0.5868247747421265,
-0.08027708530426025,
-0.054664961993694305,
-0.2501678764820099,
0.15363803505897522,
-0.04957324266433716,
-0.27512016892433167,
-0.43308117985725403,
-0.33913877606391907,
0.648777961730957,
-0.4686077833175659,
0.196558922... | |
I see this time and time again. The UAT test manager wants the new build to be ready to test by Friday. The one of the first questions asked, in the pre-testing meeting is, "what version will I be testing, against?" (which is a fair question to ask). The room goes silent, then someone will come back with, "All the asse... | [
0.9571664333343506,
0.23229262232780457,
0.2594480514526367,
-0.1958111971616745,
-0.07871583849191666,
-0.031925853341817856,
0.2823474705219269,
0.000907988753169775,
-0.09226033836603165,
-0.5466910004615784,
0.12766577303409576,
0.6022315621376038,
0.11200409382581711,
0.32382196187973... | |
avaialble.
I have seen solutions where the version of diffierent areas of a system being stored in a datastore, then shown on the main application's about box. Problem is, this needs to be maintained.
What solutions have you seen that gets around this on going problem?
EDIT. The distributed system covers VB6, Classi... | [
0.30193573236465454,
-0.03591263294219971,
0.22346706688404083,
-0.11420285701751709,
0.13156305253505707,
0.13351672887802124,
0.118059903383255,
-0.06446970254182816,
-0.22602929174900055,
-0.5706016421318054,
0.239221453666687,
0.3803824186325073,
-0.4504448175430298,
0.0361836701631546... | |
"system version", if you will. At least that's my read of your post.
What you have to do in such situations is map all of your different component assemblies into a system version. You say something along the lines of "Version 1.5 of the system is composed of Foo.Bar.dll v1.4.6 and Baz.Qux.dll v2.6.7 and (etc.)". Hell... | [
0.345814973115921,
0.15655766427516937,
0.3805351257324219,
-0.3132506012916565,
-0.040305450558662415,
0.04476824030280113,
0.14251300692558289,
0.21696174144744873,
-0.3718525767326355,
-0.5429667234420776,
-0.12933747470378876,
0.3858891725540161,
-0.8070441484451294,
0.3078530132770538... | |
is composed of Foo.dll v1.9.3 and Bar.dll v1.6.9, and the Bar service v1.9, which is composed of Baz.dll v1.8.2 and Qux.dll v1.5.2 and (etc.)".
Doing stuff like this is typically the job of the software architect and/or build manager in your organization.
There are a number of tools that you can use to handle this i... | [
0.2403726875782013,
0.41741839051246643,
0.507361650466919,
-0.23001638054847717,
-0.23692382872104645,
0.18287096917629242,
0.1701439917087555,
0.24195338785648346,
-0.19674575328826904,
-0.4716950058937073,
-0.05801790580153465,
0.3909623324871063,
-0.6505444645881653,
0.0059803305193781... | |
What I am trying to do mimic an HTML Select tag. I want to display text as an option but when selected, I would use its value.
For example, I would have a list of country names. However, when a user selects Japan, I want to get the Locale Code for that country. So the user sees that they selected Japan, but my code wi... | [
0.3735586106777191,
0.08193933963775635,
0.126828134059906,
0.21639415621757507,
-0.20101359486579895,
-0.12558132410049438,
0.2476624995470047,
0.3335345387458801,
-0.26722943782806396,
-0.6841214299201965,
-0.06547550112009048,
0.0236362274736166,
-0.3946862816810608,
0.3924277722835541,... | |
quick and dirty and override toString to show the display name and then just retrieve the code when you need it when the user selects something.
```
public class Country
{
String display;
String code;
@Override
public String toString()
{
return display;
}
public String getCode()
... | [
0.4359591007232666,
0.04856788367033005,
0.5385762453079224,
-0.1442490965127945,
0.15325278043746948,
-0.009228152222931385,
0.4088917374610901,
0.02112814411520958,
-0.15066182613372803,
-0.7642120718955994,
-0.18101631104946136,
0.593544065952301,
-0.2353958934545517,
0.0729369893670082... | |
with overriding toString you could also create your own renderer that deals with Country objects and use the display instead through a new getter. | [
0.285636842250824,
-0.30117708444595337,
0.5458650588989258,
0.27943578362464905,
-0.1576462686061859,
0.18382440507411957,
0.34739553928375244,
-0.21269038319587708,
-0.27588963508605957,
-0.3918861448764801,
-0.2073400616645813,
0.4779509902000427,
-0.37963631749153137,
-0.22829808294773... | |
I have a domain class with a property `IList<string>` that I want to map to a table with a single data value (i.e. it has an ID, a foreign key ID to the domain entity table, and a varchar data column).
I keep getting the error:
> Association references unmapped class: System.String
How can I map a table to a collect... | [
-0.05621889978647232,
0.19584335386753082,
0.16604508459568024,
0.1625692993402481,
-0.06983058899641037,
-0.191336527466774,
0.13424313068389893,
-0.18288908898830414,
-0.3384735584259033,
-0.7455764412879944,
0.012722651474177837,
0.2776460349559784,
-0.4822694659233093,
0.59029752016067... | |
ISet<string> _synonyms = new HashedSet<string>();
public ReadOnlyCollection<string> Synonyms
{
get { return new List<string>(_synonyms).AsReadOnly(); }
}
}
```
Mapping:
```
<class name="Chapter" table="Chapter">
<set name="Synonyms" table="ChapterSynonyms">
<key column="ChapterId" />
... | [
-0.6622857451438904,
-0.3055760860443115,
0.6106142401695251,
0.10825380682945251,
0.21292906999588013,
-0.08803503215312958,
0.21155570447444916,
-0.31150102615356445,
-0.4818091094493866,
-0.9058186411857605,
-0.4341210424900055,
0.3102096617221832,
-0.22537556290626526,
-0.0171907711774... | |
I have a reporting services (SQL 2008) report with two Date/Time parameters - begindate and enddate. I need to constrain enddate to the same month and year as begindate. This seems like it should be an easy thing to do, but I cannot figure it out.
Currently, I am checking the parameters passed to the stored procedure... | [
0.03755803033709526,
0.19797629117965698,
0.33509886264801025,
-0.12756669521331787,
-0.09806746989488602,
-0.19299627840518951,
0.08522163331508636,
-0.015453536063432693,
-0.039548031985759735,
-0.2877926826477051,
0.30954480171203613,
0.1484498381614685,
0.11341288685798645,
0.396713674... | |
StartDate + 1 Month.
Something like:
```
= IIF(DateDiff(DateInterval.Month, Parameters!StartDate.Value, Parameters!EndDate.Value) = 0, Parameters!EndDate.Value, AddDate(DateInterval.Month, 1, Parameters!StartDate.Value))
```
If you just want notify user, you can place some hidden text box with appropriate formatt... | [
0.05521812662482262,
-0.18909217417240143,
0.7448769211769104,
-0.2554738521575928,
-0.18588611483573914,
0.08797461539506912,
0.19819843769073486,
-0.35450777411460876,
-0.16299979388713837,
-0.2570105791091919,
-0.2707870304584503,
0.2721553444862366,
-0.22864437103271484,
0.171338647603... | |
value {0}
was out of range and was changed to {1}", EndDate, ResultDate)
Else
ResultDate = EndDate
End If
End Function
```
Then, in Parameter value expression:
```
= Code.ValidateDate(Parameters!StartDate.Value, Parameters!EndDate.Value)
```
In Value property of tbDateParameterMessage textbox:
```
... | [
0.07468674331903458,
-0.31310606002807617,
0.6500106453895569,
-0.3647603690624237,
-0.03825072571635246,
-0.03539887070655823,
0.2571439743041992,
-0.28732290863990784,
0.1534021943807602,
-0.26851892471313477,
-0.13239845633506775,
0.38231486082077026,
-0.24100837111473083,
0.38786524534... | |
not be later than End Date"
End If
If msg <> "" Then
MsgBox(msg, 16, "Parameter Validation Error")
Err.Raise(6,Report) 'Raise an overflow
End If
End Function
```
It's taken from [SQLServerCentral forum](http://www.sqlservercentral.com/Forums/Topic537763-145-1.aspx). | [
-0.3692714273929596,
0.14375710487365723,
0.6825385093688965,
-0.14515435695648193,
0.11957839131355286,
-0.27058145403862,
0.2638600170612335,
0.06748541444540024,
-0.22230975329875946,
-0.3155292570590973,
-0.49260443449020386,
0.0570404939353466,
-0.25842246413230896,
0.2567299008369446... | |
I have a data object (let's say it's called 'Entry') that has a set of potential states that look something like this:
```
1 - Created
2 - File added
3 - Approved
4 - Invalid
```
This is represented in the database with a 'Status' table with an autonumber primary key, then a 'StatusId' field in the main table, with t... | [
0.1789102405309677,
0.24700842797756195,
0.38657328486442566,
-0.00610404834151268,
0.24349531531333923,
0.03654191642999649,
0.17287594079971313,
-0.15990591049194336,
-0.023013172671198845,
-0.6740342974662781,
-0.18853971362113953,
0.3593001663684845,
-0.07184614986181259,
0.52305662631... | |
cast the instance of the Enum to an integer and pass it to an Update stored procedure.
In my static 'GetEntry()' method I will obviously have an integer passed back from the database. I then use the 'Enum.Parse()' method to extract an object which is an instance of my Enum which corresponds to the returned status inte... | [
0.018890991806983948,
0.04726240411400795,
0.2841547131538391,
-0.042621906846761703,
0.10365936160087585,
0.18224328756332397,
0.16135308146476746,
-0.1333320140838623,
0.08216753602027893,
-0.493455708026886,
-0.06214824691414833,
0.3668448030948639,
-0.3417101800441742,
0.35099798440933... | |
to), is better.
My reason for asking is that this all just seems incredibly messy to me, what with all the casting and maintaining two lists of the same set of values. I accept the benefit lies in a better experience for the consumer of the data object, but even so...
Thanks!
We have something familiar in one of our ... | [
0.5098170638084412,
-0.07830052077770233,
0.05877498909831047,
0.4559370279312134,
0.19085568189620972,
-0.03339309245347977,
-0.06861558556556702,
-0.13115708529949188,
-0.20760859549045563,
-0.5894361138343811,
0.10276912152767181,
0.6868299245834351,
-0.081596739590168,
0.04200410470366... | |
saving our object we just take the id of the enum to save the object.
I also thought this approach was messy but it's not that bad afterall. | [
0.5772947669029236,
0.05135655030608177,
-0.047536928206682205,
0.2968284487724304,
0.03572888299822807,
0.2876160144805908,
0.013968470506370068,
-0.06277399510145187,
0.258020281791687,
-0.45332765579223633,
0.35280540585517883,
0.3830263018608093,
0.18988999724388123,
-0.346126437187194... | |
I created a configuration named Test via Visual Studio which currently just takes all of DEBUG settings, however I employ compiler conditions to determine some specific actions if the build happens to be TEST|DEBUG|RELEASE.
However how can I get my MSBUILD script to detect the TEST configuration??
Currently I build... | [
0.35200169682502747,
0.27099546790122986,
0.1661176085472107,
-0.14739316701889038,
0.17731153964996338,
0.031860385090112686,
0.49167630076408386,
-0.20328901708126068,
0.019715316593647003,
-1.0144182443618774,
0.030135013163089752,
0.3217686414718628,
-0.299638956785202,
0.3633733093738... | |
DEBUG|RELEASE. If so what is the point in allowing the creation of different build configurations?
I haven't done much with defining an MSBUILD configuration file but I have done builds of different configurations using a batch file like this
```
msbuild /v:n /p:Configuration=Release "Capture.sln"
msbuild /v:n /p:Con... | [
0.18998484313488007,
0.032569143921136856,
0.15950022637844086,
-0.2831438481807709,
0.05290461704134941,
-0.06693246215581894,
0.2788406014442444,
-0.19196535646915436,
-0.36769014596939087,
-0.5990565419197083,
-0.03567789867520332,
0.7420962452888489,
-0.5915746092796326,
0.124453522264... | |
solution configuration* pulldown and click **<New...>** to create a new build configuration. | [
-0.2537040114402771,
0.01365725975483656,
0.4329380691051483,
0.12441390007734299,
0.28737378120422363,
0.07421419769525528,
0.2539634704589844,
-0.23163558542728424,
-0.11787410825490952,
-0.9147226810455322,
-0.33459407091140747,
0.3958689570426941,
-0.3468880355358124,
0.149820312857627... | |
Can anyone recomend a good javascript lib for working with Google Maps or Live Maps(virtualearth )?
Is jQuery og Prototype something to consider?
I think I remember that asp.net ajax had some controls and hooks for working with virtual earth back in the day, but cant seem to find it any more.
Cheers
I've used bot... | [
0.3867018520832062,
0.19136789441108704,
0.13730673491954803,
0.07312493771314621,
-0.38722798228263855,
-0.09809405356645584,
0.09705018252134323,
0.5499129891395569,
-0.1773301064968109,
-0.8297077417373657,
0.40137627720832825,
0.5112535357475281,
0.39728844165802,
-0.2255444973707199,
... | |
I'm losing my mind trying to find a table showing all the formats of datetimes for cultures
I've been googling like crazy and all i want is that table! ARG
i.e.
en-CA = DD/MM/YYYY 0.00
en-FR = MM/DD/YYYY 0,00
I'm looking for a link to MSDN or wikipedia - I know I've seen this in the past before
```
foreach (var c... | [
0.6864118576049805,
0.10190832614898682,
0.7061757445335388,
0.1461327224969864,
0.25199776887893677,
-0.10931019484996796,
-0.07705529034137726,
0.34994056820869446,
-0.3037740886211395,
-0.6072701215744019,
-0.028107307851314545,
0.12004421651363373,
-0.17390874028205872,
0.6224572658538... | |
c.DateTimeFormat.FullDateTimePattern);
}
``` | [
0.10816995054483414,
-0.15563234686851501,
0.46883121132850647,
-0.31088021397590637,
0.6941731572151184,
-0.27061551809310913,
0.04502316191792488,
0.1655287742614746,
-0.017900630831718445,
-0.4784398376941681,
-0.4074552655220032,
0.5545086860656738,
-0.33216631412506104,
0.386673688888... | |
How can I set the DataContext on my Grid in XAML, instead of in the constructor?
Here is how I do it in the constructor (LayoutRoot is the XAML Grid defined in the XAML):
```
this.LayoutRoot.DataContext = this.HPVM;
```
I would prefer to do it right in the XAML, but I do not know how to reference the HPVM object in... | [
0.06003914028406143,
0.4265006482601166,
0.5835262537002563,
-0.0823039561510086,
-0.08114320784807205,
-0.15582142770290375,
-0.02230725809931755,
-0.20117604732513428,
-0.20947490632534027,
-0.8112754821777344,
0.030324893072247505,
0.5853350162506104,
-0.22405603528022766,
0.04525357857... | |
code:
```
<UserControl x:Class="SilverlightApplication1.SLHolePattern" x:Name="HolePatternsControl"
xmlns="http://schemas.microsoft.com/client/2007"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
xmlns:controls="clr-namespace:Microsoft.W... | [
-0.2712933123111725,
0.4245868921279907,
0.6925033330917358,
-0.10965430736541748,
-0.062491290271282196,
0.12743885815143585,
-0.07963360100984573,
-0.424293577671051,
-0.36701858043670654,
-0.12453668564558029,
-0.4763369858264923,
0.20343223214149475,
-0.38612616062164307,
0.18665017187... | |
{
InitializeComponent();
this.HPVM=new HolePatternsViewModel();
this.LayoutRoot.DataContext = this.HPVM;
...more code here
}
```
It all works fine, but I just want to learn how to set the DataContext in XAML, not in code.
The answer Chris gave works just fine.
... | [
0.28845787048339844,
0.3402683138847351,
0.5044495463371277,
-0.12092103064060211,
0.22071082890033722,
-0.08258192986249924,
0.20048461854457855,
-0.06842951476573944,
-0.2373194545507431,
-0.7809107899665833,
-0.03380725532770157,
0.4908040463924408,
-0.28025996685028076,
0.0384919345378... | |
XAML (within the UserControl.Resources) and
then bind the datacontext to a static resource.
Follow code:
```
<UserControl ...>
<UserControl.Resources>
**<myNS:MyClass x:Name="TheContext" x:Key="TheContext"></myNS:MyClass>**
</UserControl.Resources>
<Grid x:Name="LayoutRoot" Background="White" **Da... | [
-0.1475592702627182,
0.37074005603790283,
0.5720682740211487,
-0.21221867203712463,
0.23972171545028687,
0.10611085593700409,
-0.007738214451819658,
-0.2613253593444824,
-0.14662694931030273,
-0.6844512224197388,
-0.5599191784858704,
0.23607979714870453,
-0.4945903420448303,
0.186265826225... | |
I would like to implement conversion between two library classes by Convert.ChangeType in C#. I can change neither of the two types. For example converting between Guid and byte[].
```
Guid g = new Guid();
object o1 = g;
byte[] b = (byte[]) Convert.ChangeType(o1, typeof(byte[])); // throws exception
```
I am aware t... | [
0.12570177018642426,
-0.12079598754644394,
0.11110995709896088,
-0.20424018800258636,
0.030436038970947266,
-0.08009926974773407,
0.3555757403373718,
-0.05786819010972977,
0.020372439175844193,
-0.8371526002883911,
0.02400357648730278,
0.746008574962616,
-0.685441255569458,
0.2158791571855... | |
the sourcecode of either of the two classes?
I was experimenting with TypeConverter, but doesn't seem to work either:
```
Guid g = new Guid();
TypeConverter tc = TypeDescriptor.GetConverter(typeof(Guid));
byte[] b2 = (byte[])tc.ConvertTo(g, typeof(byte[])); // throws exception
```
The variable tc gets set to System... | [
0.20491337776184082,
-0.21200133860111237,
0.46068617701530457,
0.039128974080085754,
0.0011717478046193719,
-0.11728314310312271,
0.09704801440238953,
-0.337812215089798,
-0.09158462285995483,
-0.4613163471221924,
-0.0034882677718997,
0.8782706260681152,
-0.7166666984558105,
0.23581995069... | |
static void Main()
{
TypeDescriptor.AddAttributes(typeof(Guid), new TypeConverterAttribute(
typeof(MyGuidConverter)));
Guid guid = Guid.NewGuid();
TypeConverter conv = TypeDescriptor.GetConverter(guid);
byte[] data = (byte[])conv.ConvertTo(guid, typeof(byte[]));
... | [
-0.25530487298965454,
-0.19689951837062836,
0.5010808110237122,
-0.23987583816051483,
0.09931706637144089,
0.07688289880752563,
0.3215879797935486,
-0.22787848114967346,
0.0046888538636267185,
-0.4602966904640198,
-0.3861748278141022,
0.6094372272491455,
-0.6736385226249695,
0.322278708219... | |
return sourceType == typeof(byte[]) || base.CanConvertFrom(context, sourceType);
}
public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType)
{
return destinationType == typeof(byte[]) || base.CanConvertTo(context, destinationType);
}
public override object Conve... | [
0.002971569076180458,
-0.02643144503235817,
0.5516459941864014,
-0.14020156860351562,
0.26072558760643005,
-0.1452329307794571,
0.40185847878456116,
-0.07216846942901611,
0.13824132084846497,
-0.5625335574150085,
-0.3684500753879547,
0.6687442660331726,
-0.4429261088371277,
0.4058731198310... | |
}
return base.ConvertFrom(context, culture, value);
}
public override object ConvertTo(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destinationType)
{
if (destinationType == typeof(byte[]))
{
return ((Guid)value).ToByteArray... | [
0.12738379836082458,
-0.2549258768558502,
0.40865424275398254,
-0.1246396079659462,
0.2937394976615906,
0.08516800403594971,
0.6031939387321472,
0.059787411242723465,
0.054811641573905945,
-0.47605186700820923,
-0.2809779644012451,
0.5182298421859741,
-0.6303856372833252,
0.532530605792999... | |
Like I understand, an Window has a lot of Views. A View is an object that can draw something on the screen, and the Window provides the space for drawing. So where's the point, that I dont have an window? What's the difference here between them?
On the iPhone, a window really is just a special kind of view. If you look... | [
0.5806670188903809,
-0.00525702815502882,
0.29183152318000793,
0.20944130420684814,
-0.23729050159454346,
0.08542704582214355,
0.0026175002567470074,
0.27454227209091187,
-0.2689005136489868,
-0.7615925073623657,
0.31907495856285095,
0.40004023909568787,
-0.022947585210204124,
-0.146819993... | |
useful for is that UIViews have a "window" property that can be used to instantly access the window. If you have many nested views and need to immediately get to the top level from a 3rd or 4th level deep view, that window property can come in handy. | [
0.2557106018066406,
-0.3829607367515564,
0.4773061275482178,
0.5692850947380066,
-0.07771946489810944,
-0.21807235479354858,
0.33442914485931396,
-0.035698067396879196,
-0.14527204632759094,
-0.8504980206489563,
-0.091820128262043,
0.329469233751297,
0.17806914448738098,
0.2594892084598541... | |
I have the following code
```
class Program
{
static void Main(string[] args)
{
List<A> aList = new List<A>();
var aObj = new A();
aObj.Go(aList.Cast<IB>());
}
}
class A : IB
{ | [
-0.011996188201010227,
-0.08616594970226288,
0.3371340036392212,
-0.4726501405239105,
0.12060429155826569,
0.23882663249969482,
0.34726476669311523,
-0.16521872580051422,
0.03811516985297203,
-0.49361947178840637,
-0.26004651188850403,
0.29014161229133606,
-0.6958206295967102,
0.4078419506... | |
public void Go(IEnumerable<IB> interfaceList)
{
foreach (IB ibby in interfaceList)
{
Console.WriteLine("Here");
}
}
}
interface IB
{
void | [
-0.035962652415037155,
0.08448443561792374,
0.46408742666244507,
-0.1495499163866043,
0.2587524652481079,
0.1303938776254654,
0.1883029341697693,
-0.02663455531001091,
0.2401115894317627,
-0.9697643518447876,
-0.3326457142829895,
0.7252097725868225,
-0.47748154401779175,
0.0571713037788867... | |
Go(IEnumerable<IB> interfaceList);
}
```
}
I originally tried passing a List but that [doesn't work](http://blogs.msdn.com/ericlippert/archive/2007/10/17/covariance-and-contravariance-in-c-part-two-array-covariance.aspx).
After a lot of help from [SO](https://stackoverflow.com/questions/504729/how-do-i-cast-a-li... | [
-0.1442301720380783,
-0.13690997660160065,
0.42374199628829956,
-0.194692000746727,
-0.254173219203949,
-0.3579407036304474,
0.4116865396499634,
-0.23771467804908752,
-0.18016745150089264,
-0.7420083284378052,
-0.2553935945034027,
0.48687851428985596,
-0.6153689622879028,
-0.12937800586223... | |
the actual objects. But the reader is only allowed to touch them through the interface.
You should change `Go` to:
```
public void Go<T>(IEnumerable<T> interfaceList)
where T : IB
{
foreach (IB ibby in interfaceList)
{
Console.WriteLine("Here");
}
}
```
Then you'll be fine with no need to cal... | [
0.100558340549469,
0.06683027744293213,
0.5521365404129028,
-0.21849438548088074,
-0.08570258319377899,
0.0559353306889534,
0.22042608261108398,
-0.005315700545907021,
-0.07765381783246994,
-0.9303115010261536,
-0.07827568799257278,
0.6035570502281189,
-0.4794081747531891,
-0.0059394640848... | |
Better to avoid it if possible.
Even though the new method is generic, type inference should usually take care of it for you so you don't need to specify `T` explicitly. | [
0.19721148908138275,
-0.04674040153622627,
-0.17511793971061707,
0.14541101455688477,
-0.27580639719963074,
-0.29691824316978455,
0.2898915112018585,
0.044604238122701645,
-0.09098454564809799,
-0.4559136629104614,
-0.05028532072901726,
0.5663049221038818,
-0.17889492213726044,
-0.17808945... | |
```
function all_images(&$post){
$content = $post->post_content;
if(preg_match_all('/<img[^>]+src="(.*?)"[^>]*>/', $content, $results)){
$i = 0;
$count = count($results);
$count = $count - 1;
while($i < $count)
{
foreach($results as $result){
echo $result[$i];
}
$... | [
0.05954702943563461,
0.19693823158740997,
0.5916052460670471,
-0.3181816339492798,
0.07003248482942581,
-0.007117200177162886,
0.3149869441986084,
-0.5766775608062744,
-0.19439926743507385,
-0.4707537293434143,
-0.4593040943145752,
0.41593804955482483,
-0.6696458458900452,
0.06190978735685... | |
image. I have tried several different combinations of while() and foreach() but it only ever returns one image. Does anyone know what i am doing wrong? Thanks
$results[1] should be an array of all the matches on the first parenthesized subpattern, so something as simple as this should work:
```
if(preg_match_all('/<im... | [
0.16031889617443085,
0.005182804074138403,
0.5806437730789185,
-0.11481771618127823,
-0.23557651042938232,
-0.09159386157989502,
0.2851983606815338,
-0.17215928435325623,
-0.0425693616271019,
-0.751217246055603,
-0.06317777931690216,
0.7256535291671753,
-0.35668396949768066,
-0.11312033236... | |
to supply some sample content you are trying to match against. | [
0.8666431903839111,
-0.0037203244864940643,
-0.20182085037231445,
0.32850170135498047,
0.07056127488613129,
-0.12276400625705719,
-0.19264930486679077,
0.011944709345698357,
0.029151447117328644,
-0.4788050353527069,
0.07415512949228287,
0.26061496138572693,
-0.41901519894599915,
-0.035958... | |
I want to transform an xml file, display its treeview on a html page. I have downloaded an example, it has xslt, js, css and also some images. I used xmlspy to do the transformation, but it didn't work.
Could anyone please tell me how to do the transformation?
If you find it easier (as I do) to do as much in the brow... | [
0.27912476658821106,
-0.09247279912233353,
0.04940570145845413,
-0.03206164762377739,
-0.17585311830043793,
0.20247820019721985,
0.30944281816482544,
-0.1752059906721115,
-0.11261195689439774,
-0.8713997006416321,
-0.021256789565086365,
0.3629160523414612,
-0.2630878686904907,
0.1332424581... | |
I have a super basic form that shoots out an email. The code is contained within a virtual directory like <http://url/emailer/emailer.aspx> on a new server and is working fine.
We are in the process of migrating a few additional sites over to this new server. To test, I'm accessing the files via the ip address so I ca... | [
0.4098219573497772,
0.15458528697490692,
0.2959372401237488,
-0.09259579330682755,
-0.25287848711013794,
0.0206941906362772,
0.4106433093547821,
0.04633931815624237,
0.016475804150104523,
-0.6739248633384705,
0.032581403851509094,
0.38402339816093445,
-0.2643277645111084,
0.150427669286727... | |
pulled into the live site, it works fine.
Why does referencing the IP URL cause this exception?
Is it setup correctly in IIS? If it's not set as an application in the same way as the original server then it will be looking for the bin directory in a different location. For example, if you have /myapp as a directory, b... | [
0.5496469736099243,
-0.2954089045524597,
0.30222055315971375,
0.0890846773982048,
0.08408131450414658,
-0.14144019782543182,
0.17854054272174835,
-0.2084190845489502,
-0.18935458362102509,
-0.8675050735473633,
-0.11965402215719223,
0.5313665866851807,
-0.5515899062156677,
-0.02010041475296... | |
each set to run a different version of the framework. It doesn't sound like this is your problem, but it might be worth checking the app pool identities in case there's something else that's listening on the ip that might be using a different framework version. | [
0.8526065945625305,
-0.0028004455380141735,
0.07971756160259247,
0.3680420517921448,
0.07207956165075302,
-0.0782608836889267,
0.25191178917884827,
-0.30620259046554565,
-0.09460330009460449,
-0.5660939812660217,
0.2178073674440384,
0.6927585601806641,
-0.42641541361808777,
-0.342303842306... | |
In Amazon ec2, how frequently will an instance of a running machine crash?
Has anyone experienced this?
We run our company infrastructure (corporate Web site, JIRA, Confluence and Subversion) on EC2; we've had no outages on any of the machines for about 6 months. Since EC2 came out of Beta last October, they have a pro... | [
0.24561259150505066,
-0.28481054306030273,
0.33437323570251465,
0.11350930482149124,
0.07248302549123764,
-0.3178430199623108,
0.3158837556838989,
-0.08043493330478668,
-0.2812584638595581,
-0.38856929540634155,
-0.025088807567954063,
0.4357905089855194,
-0.05728044733405113,
-0.3520733118... | |
before you need it !)
* Store critical data on [Elastic Block Store](http://aws.amazon.com/ebs/) volumes; these persist even if the EC2 instance goes down, and are more reliable than physical hard drives since their data is replicated. | [
0.3020596206188202,
-0.22729520499706268,
0.4108811318874359,
0.2233717292547226,
0.28464603424072266,
-0.13821591436862946,
0.4549912214279175,
-0.1731899231672287,
-0.19475966691970825,
-0.43751534819602966,
-0.5492063760757446,
0.3874942660331726,
0.01701248623430729,
0.0964953079819679... | |
Is there any equivalent to this when a combo is data bound? I've been through this hundreds of times before, but I'm having a brain freeze moment.
VB
```
Module OrderByExtensions
<System.Runtime.CompilerServices.Extension()> _
Public Function OrderByPropertyName(Of T)(ByVal e As IEnumerable(Of T), ByVal propertyNa... | [
0.1959097534418106,
-0.4909406900405884,
0.5529043078422546,
-0.18982259929180145,
-0.035253431648015976,
-0.10183506458997726,
0.365749329328537,
-0.662700355052948,
-0.2148933857679367,
-0.3305208086967468,
-0.4080154597759247,
0.7488082647323608,
-0.3882381021976471,
0.22220218181610107... | |
Expression.Parameter(itemType, "item")
Dim exp = Expression.Lambda(funcType, Expression.MakeMemberAccess(parameter, prop), parameter)
Dim params = New Object() {e, exp.Compile()}
Return DirectCast(GetType(OrderByExtensions).GetMethod("InvokeOrderBy", Reflection.BindingFlags.Static Or Reflection.BindingFlags... | [
-0.024083362892270088,
-0.420192152261734,
1.0516737699508667,
-0.19984358549118042,
0.1353960484266281,
0.20769256353378296,
0.32584282755851746,
-0.5678534507751465,
-0.06312982738018036,
-0.31918931007385254,
-0.6568109393119812,
0.7376059293746948,
-0.4937830865383148,
0.17436465620994... | |
null) throw new ArgumentException("Object does not have the specified property");
var propType = prop.PropertyType;
var funcType = typeof(Func<,>).MakeGenericType(itemType, propType);
var parameter = Expression.Parameter(itemType, "item");
var memberAccess = Expression.MakeMemberAccess(parameter, prop);... | [
-0.18783600628376007,
-0.0981321781873703,
0.5346162915229797,
-0.18930207192897797,
0.13885372877120972,
0.2073078602552414,
0.4714045822620392,
-0.6922197341918945,
0.021715786308050156,
-0.2600139379501343,
-0.6259085536003113,
0.5043550133705139,
-0.4649571478366852,
0.3445088863372803... | |
I am inside a directory in svn, I want to tell something another developer about a file there over chat.
Is there an easy command to obtain the full URL to that file - let's say something he can send as a parameter to svn export or something like that.
```
svn info «your_file» | grep URL
``` | [
0.4880478084087372,
0.21526876091957092,
0.3768206834793091,
0.14104999601840973,
0.2267356961965561,
-0.1193540170788765,
0.09665627777576447,
0.29211804270744324,
-0.22765277326107025,
-0.45143797993659973,
-0.1630765050649643,
0.5104953050613403,
-0.10903331637382507,
0.2510966956615448... | |
In the [notorious Stack Overflow #38 podcast](https://blog.stackoverflow.com/2009/01/podcast-38/) [Joel Spolsky](http://en.wikipedia.org/wiki/Joel_Spolsky) talked about how difficult it would be to do TDD for something like JPEG compression. Bob Martin [wanted to cover](http://blog.objectmentor.com/articles/2009/02/06/... | [
0.13974906504154205,
-0.05385878309607506,
-0.2321828007698059,
0.18687067925930023,
-0.4790059030056,
-0.156912162899971,
0.005700609181076288,
-0.3025892972946167,
-0.07823685556650162,
-0.09551844745874405,
-0.0960027426481247,
0.2589557468891144,
-0.3552810847759247,
0.0030881881248205... | |
to work? Would you write a test that scraped the screen to show that the image was in low res?
Of course not. You already know that the JPEG library works. You already know that if you call it with the right arguments it will display in low resolution. What you need to test is that the bit you set gets translated int... | [
0.5349698662757874,
0.12435605376958847,
0.2421317994594574,
0.1510896235704422,
-0.25180357694625854,
0.08949507027864456,
0.10237231850624084,
-0.5302364826202393,
-0.015226838178932667,
-0.4752926230430603,
-0.19063162803649902,
0.81550532579422,
-0.44781485199928284,
0.1574800163507461... | |
how it was called, and then the test can check to be sure that it was called correctly.
OK, so how would you test the internals of the JPEG library? I don't know a lot about JPEG rendering, but I presume it's about compression, decompression and bitmaps. Compression and decompression are just algorithms. Algorithms ha... | [
0.3909071981906891,
0.026074348017573357,
-0.07594826072454453,
0.24802081286907196,
-0.1516830176115036,
-0.09095138311386108,
-0.2986597716808319,
-0.25333908200263977,
-0.16717368364334106,
-0.3835410475730896,
-0.017660461366176605,
0.5798472166061401,
-0.301299512386322,
-0.0929044261... | |
don't have to render them on the screen. Simple little bitmaps can be rendered into memory buffers that the tests can examine. By simple, I mean SIMPLE. 3X3, 5X5, 8X8. Simple. Again, you structure your input data to cover the bulk of the code.
None of this is rocket science. None if it is perfect. But a suite of 50 t... | [
0.43735507130622864,
0.131088525056839,
-0.09676726907491684,
0.5125918388366699,
0.0026267312932759523,
0.2767468988895416,
0.40046805143356323,
-0.3729184567928314,
-0.243595689535141,
-0.5204135775566101,
-0.0739792212843895,
0.5001959800720215,
-0.03679891675710678,
-0.1484080106019973... | |
manual testing to a few very strategic tests rather than thousands of painfully tedious test plans. | [
0.44111528992652893,
0.12589550018310547,
-0.5430787801742554,
0.576407253742218,
0.04520874097943306,
-0.0873187705874443,
-0.08385255187749863,
-0.4008065462112427,
0.10061920434236526,
-0.20814871788024902,
0.1225481927394867,
0.6584163308143616,
0.23542124032974243,
-0.2419040501117706... | |
This error just started happening this morning in one particular project. When I try to publish the site it gives me this error and I can't complete the publish! Sometimes restarting Visual Studio magically fixes the problem, but it will just appear again later. Not only that, when I restart VS I lose all my "undo capa... | [
0.33537083864212036,
0.38370180130004883,
0.2536861002445221,
0.15296553075313568,
0.0009176835301332176,
-0.12144296616315842,
0.7666899561882019,
0.11616814881563187,
-0.3122713267803192,
-0.561113715171814,
-0.18504704535007477,
0.5583930611610413,
-0.1614639014005661,
0.225098401308059... | |
a batch file to manually copy the source code files over to the network drive throughout the day (so that they get backed up). | [
0.4500289857387543,
-0.04884881153702736,
0.09476537257432938,
0.2701947093009949,
0.4241492450237274,
-0.14788921177387238,
-0.18419629335403442,
-0.10097048431634903,
-0.09537763148546219,
-0.5538690090179443,
-0.3479484021663666,
0.548133373260498,
0.06312239915132523,
-0.04798464477062... | |
I'm trying to learn the basic jist of a Semaphore in the Dining Philosopher problem. Right now, I have an array of class Chopstick, and each Chopstick has a semaphore with 1 available permit:
```
public class Chopstick
{
Thread holder = null;
private Semaphore lock = new Semaphore(1);
public synchronized ... | [
0.4871898889541626,
0.016617532819509506,
0.35090574622154236,
-0.09037041664123535,
0.2774953544139862,
0.161887988448143,
-0.10249342769384384,
-0.07401661574840546,
-0.30317422747612,
-0.4559718370437622,
-0.05955156311392784,
0.5435426235198975,
-0.3946783244609833,
0.30586597323417664... | |
this.lock.release();
holder = null;
}
}
```
The holder variable is used for a function that I am not sure I need:
```
public synchronized void conditionalRelease()
{
if (holder == Thread.currentThread())
{
holder = null;
this.lock.release();
}
}
```
The program compiles and ... | [
0.10315188020467758,
0.013209194876253605,
0.5389993786811829,
-0.28992223739624023,
0.2888126075267792,
-0.08065155893564224,
-0.023312417790293694,
-0.009147265926003456,
-0.2500326335430145,
-0.22797168791294098,
-0.09321422874927521,
0.5916099548339844,
-0.20880256593227386,
0.36541494... | |
eventually hangs up when all of the chopsticks are taken and one philosopher is hungry.
Here is the code within the Philosopher class to release the chopstick after a random amount of time:
```
System.out.println(this.name + " is eating");
Thread.sleep(this.getRandTime());
System.out.println(this.name + " has finishe... | [
0.35192975401878357,
-0.08748440444469452,
0.4880865216255188,
-0.03637244552373886,
0.10399351269006729,
0.2487037181854248,
-0.16680726408958435,
-0.046486612409353256,
-0.41173332929611206,
-0.49976733326911926,
-0.08697258681058884,
0.2955959439277649,
-0.39662086963653564,
0.247950062... | |
an external locking mechanism (the semaphore, in this case). The 'synchronized' keyword is trying to get locks using the object's own mutex. You are now locking on 2 resources which I suspect might be causing a deadlock. | [
0.40090298652648926,
0.1010894924402237,
0.37962931394577026,
0.366362601518631,
0.1753232628107071,
-0.08557327091693878,
0.4214722216129303,
-0.2892954349517822,
-0.4530318081378937,
-0.2869824171066284,
-0.12479837238788605,
0.6384537816047668,
-0.44295600056648254,
0.4426669776439667,
... | |
I am working on a Windows Form that connects to a ASP.NET membership database and I am trying to use the AJAX Login Service. No matter what I do I keep on getting 404 errors on the Authentication\_JSON\_AppService.axd call.
Web Config Below
```
<?xml version="1.0"?>
<!--
Note: As an alternative to hand editing t... | [
0.5579628348350525,
0.35273557901382446,
0.08790242671966553,
-0.1464744210243225,
-0.055593620985746384,
-0.050280943512916565,
0.39566460251808167,
0.03266001120209694,
-0.09029180556535721,
-0.9724521636962891,
0.12937135994434357,
0.7974227070808411,
0.08762544393539429,
-0.06789920479... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.