text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
something for myself.
The book [An Introduction to Computational Learning Theory](http://books.google.com/books?id=vCA01wY6iywC&printsec=frontcover) contains an algorithm for learning a finite automaton. As every regular language is equivalent to a finite automaton, it is possible to learn some regular expressions by a... | [
0.2053934782743454,
-0.20091384649276733,
-0.19065791368484497,
0.10126762837171555,
-0.03463638946413994,
0.3515445590019226,
0.5529739260673523,
-0.022283365949988365,
-0.34066271781921387,
-0.18688282370567322,
-0.30387550592422485,
0.15100575983524323,
-0.013689948245882988,
-0.1742613... | |
1. You have a `console.log(o)` in your code.
2. Now in Firebug you can click on the object in the console, which takes you to the DOM inspector.
3. I thought there was a way to then access from the console command line that object you just inspected with `$0`, but it doesn't seem to work.
Maybe something changed in Fi... | [
-0.08177725970745087,
-0.17979472875595093,
0.7286456227302551,
-0.14453038573265076,
-0.11886360496282578,
-0.20763348042964935,
0.37726694345474243,
0.006460884120315313,
-0.13178865611553192,
-0.7683919072151184,
-0.12059322744607925,
0.8245700001716614,
-0.37495994567871094,
0.13262237... | |
from the console with $0. This is extremely convenient. | [
0.056789036840200424,
0.049705684185028076,
0.15738198161125183,
0.27906671166419983,
0.11367278546094894,
-0.10476438701152802,
-0.033514752984046936,
0.13915234804153442,
0.16664564609527588,
-0.5151259303092957,
-0.09986333549022675,
0.6456405520439148,
0.15726302564144135,
0.1520598828... | |
I'm write a Air application that consumes a beta webservice API. Sometimes this APIreturns me a malformed XML node and actionscript will raise an error when I try creating the XML object out of it.
What I've been doing is just try/catching the result and ignore the whole response if the XML is bad, but I could just ig... | [
0.5974899530410767,
0.4444822371006012,
0.3031158149242401,
-0.08797389268875122,
-0.26412874460220337,
0.09711567312479019,
0.12341896444559097,
-0.3671872913837433,
0.1708230972290039,
-0.6770240664482117,
-0.09099218994379044,
0.49291759729385376,
-0.0779561996459961,
-0.158392310142517... | |
that tag? If I fould something like that, I'd like to skip the whole Song and get the next one.
Is there any way I could accomplish this?
This works again in Firebug 1.5: you can access the last active element you looked at in the HTML tab from the console with $0. This is extremely convenient. | [
0.20579999685287476,
-0.14562895894050598,
0.5337567329406738,
0.08525063842535019,
-0.10862135887145996,
-0.10906859487295151,
0.5959200859069824,
0.03264215216040611,
-0.13476167619228363,
-0.5095380544662476,
0.04969117045402527,
0.8808382153511047,
-0.3126465976238251,
-0.1092534586787... | |
So I am still asking questions about this topic :-(
So I create an object, decorate it with the Xml Serialization Attributes, from what I have seen I add an empty namespace to the xml serialization namepsace collections so as not to get the superfluous attributes I did not intend to have.
**Edit:** The attribute I me... | [
-0.15580634772777557,
0.37100109457969666,
0.5606074333190918,
0.0558600127696991,
-0.21456503868103027,
-0.13243556022644043,
0.10827076435089111,
-0.21470318734645844,
-0.5045534372329712,
-0.5700908303260803,
-0.0865909531712532,
0.27341535687446594,
-0.07295118272304535,
0.188143730163... | |
element have `xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"`, i.e.:
```
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
```
But I still get an empty `xmlns=""` attribute in the serialized type.
```
[XmlRoot(ElementName = "url", Namespace="")]
public class SitemapNode
{
[XmlElement(ElementName... | [
0.13418473303318024,
-0.27706199884414673,
0.7112780213356018,
-0.10623370856046677,
0.3609866499900818,
-0.16737818717956543,
-0.060559168457984924,
-0.5377470850944519,
-0.009941657073795795,
-0.6501569747924805,
-0.5764380693435669,
0.34305936098098755,
-0.06034150347113609,
0.248743876... | |
Location = String.Empty;
LastModified = DateTime.Now;
ChangeFrequency = SitemapChangeFrequency.monthly;
Priority = 0.5M;
}
public SitemapNode(string location, DateTime lastModified, SitemapChangeFrequency changeFrequency, decimal priority)
{
Location = location;
Last... | [
-0.07212945073843002,
-0.06347087770700455,
0.7708651423454285,
-0.18682193756103516,
0.7395851016044617,
0.16541114449501038,
0.12027037888765335,
0.31172478199005127,
-0.27750110626220703,
-0.5467570424079895,
-0.4547915756702423,
0.24319134652614594,
0.20383204519748688,
0.5178920626640... | |
the following to append to my XmlWriter:
```
foreach (uk.co.andrewrea.SitemapNode node in List)
{
XmlSerializerNamespaces ns = new XmlSerializerNamespaces();
ns.Add(String.Empty, String.Empty);
Serializer.Serialize(Writer, node, ns);
}
```
This works out fine except I am left with an emtpy xmlns="" like ... | [
0.26407304406166077,
0.17373019456863403,
0.5272396802902222,
-0.0672186091542244,
0.033931948244571686,
-0.11618183553218842,
0.5296900868415833,
-0.3804391920566559,
-0.030857127159833908,
-0.7969321608543396,
-0.012519004754722118,
0.48423489928245544,
-0.15313801169395447,
0.0591725632... | |
new []{new SitemapNode("1", DateTime.Now, 1), new SitemapNode("2", DateTime.Now.AddDays(1), 2)};
var serializer = new XmlSerializer(typeof(SitemapNode));
var st = new MemoryStream();
using (var writer = XmlWriter.Create(st))
{
var ns = new XmlSerializerNamespaces();
ns.Add("", "test");
... | [
-0.016474515199661255,
-0.14215974509716034,
0.9032572507858276,
-0.25119253993034363,
0.14222502708435059,
0.19812151789665222,
0.34424832463264465,
-0.34976130723953247,
-0.29658734798431396,
-1.032832384109497,
-0.3143938183784485,
0.3045535981655121,
-0.12633280456066132,
0.36588111519... | |
ns);
}
writer.WriteEndElement();
}
st.Position = 0;
TestContext.WriteLine(new StreamReader(st).ReadToEnd());
}
[XmlRoot(ElementName = "url", Namespace = "test")]
public class SitemapNode
{
[XmlElement(ElementName = "loc")]
public string Location { get; set; }
[XmlElement(Element... | [
-0.014603912830352783,
-0.5025005340576172,
0.5651766657829285,
-0.10190089046955109,
0.4278008043766022,
0.07140983641147614,
-0.060073256492614746,
0.05438978597521782,
-0.21869231760501862,
-0.6873878836631775,
-0.48512011766433716,
0.08421933650970459,
0.14202500879764557,
0.3317548036... | |
Location = String.Empty;
LastModified = DateTime.Now;
Priority = 0.5M;
}
public SitemapNode(string location, DateTime lastModified, decimal priority)
{
Location = location;
LastModified = lastModified;
Priority = priority;
}
}
```
And the output is (based on yo... | [
-0.1434122622013092,
-0.007950376719236374,
0.5323382616043091,
-0.14506018161773682,
0.3377816081047058,
0.038130417466163635,
0.12583303451538086,
0.21411757171154022,
-0.09981782734394073,
-0.832577109336853,
-0.4136297404766083,
0.04467065632343292,
0.06142912060022354,
0.2969574630260... | |
I am trying to determine if there is a way to check the availability of a potentially large list of urls (> 1000000) without having to send a GET request to every single one.
Is it safe to assume that if <http://www.example.com> is inaccessible (as in unable to connect to server or the DNS request for the domain fails... | [
0.3047216832637787,
0.15986110270023346,
0.3340306580066681,
0.16674558818340302,
-0.18153032660484314,
-0.2726301848888397,
0.3268979489803314,
0.08291147649288177,
-0.3524617850780487,
-0.5186959505081177,
-0.20375095307826996,
0.2950141429901123,
-0.08089278638362885,
0.3336947560310364... | |
<http://subdomain.example.com> and <http://www.example.com> may not direct to the same ip?
I seem to be able to think of a counter example for each shortcut I come up with. Should I just bite the bullet and send out GET requests to every URL?
Unfortunately, no you cannot infer anything from `4xx` or `5xx` or any other... | [
0.4720591902732849,
-0.08659214526414871,
0.49354806542396545,
0.2849121689796448,
-0.2635500431060791,
0.07806422561407089,
0.5348184704780579,
0.11258422583341599,
-0.29405462741851807,
-0.6173698306083679,
-0.09602399915456772,
0.2562754452228546,
-0.12393174320459366,
0.164154425263404... | |
the page but not the page content. This saves time server-side (because it doesn't have to render the page) and for yourself (because you don't have to buffer and then discard content).
Also I suggest you use `keep-alive` to accelerate responses from the same server. Many HTTP client libraries will do this for you. | [
0.38822638988494873,
-0.09710130840539932,
0.3607499599456787,
0.3185162842273712,
-0.36253345012664795,
-0.14119908213615417,
0.40640386939048767,
0.06565072387456894,
-0.2605254352092743,
-0.9006364941596985,
-0.19630174338817596,
0.43493571877479553,
-0.20230118930339813,
-0.07389765232... | |
is there a way to monitor detail of sql calls in express version?
Try [SQL Express Profiler](http://expressprofiler.codeplex.com).
I've used it a bit and it seems to work as advertised. | [
0.41506585478782654,
-0.3603665232658386,
0.12485537678003311,
-0.00954025611281395,
-0.31169894337654114,
-0.13768370449543,
0.4762306809425354,
0.2695966958999634,
-0.19534637033939362,
-0.618319571018219,
0.41684120893478394,
0.381061851978302,
-0.24186347424983978,
-0.18803079426288605... | |
I've read about unit testing and heard a lot of hullabaloo by others touting its usefulness, and would like to see it in action. As such, I've selected this basic class from a simple application that I created. I have no idea how testing would help me, and am hoping one of you will be able to help me see the benefit of... | [
0.37624579668045044,
0.18589641153812408,
-0.40565767884254456,
0.28673022985458374,
0.22864612936973572,
0.13785235583782196,
-0.02304190769791603,
0.10236509889364243,
-0.07638838142156601,
-0.6276302337646484,
-0.004325428046286106,
0.5625825524330139,
-0.13551396131515503,
0.1987929195... | |
#region Field Definitions
private double _AbsX;
private double _AbsY;
private double _CanvasX { get; set; }
private double _CanvasY { get; set; }
private bool _Visible;
private double _HoleDia = 20;
private HoleTypes _HoleType;
private int _HoleNumber;
private double _StrokeThickness... | [
0.11770722270011902,
-0.45970267057418823,
0.6194617748260498,
-0.08016709983348846,
0.3174169361591339,
0.17786893248558044,
0.3443293869495392,
-0.42553821206092834,
-0.10617633163928986,
-0.6489695310592651,
-0.38846269249916077,
0.32792967557907104,
-0.11670069396495819,
0.389921545982... | |
public Ellipse HoleEntity = new Ellipse();
public Ellipse HoleDecorator = new Ellipse();
public TextBlock HoleLabel = new TextBlock();
private static DoubleCollection HiddenLinePattern =
new DoubleCollection(new double[] { 5, 5 });
public int HoleNumber
{
get
{
... | [
-0.06807275861501694,
-0.013242260552942753,
0.7182839512825012,
-0.2285962700843811,
0.18674029409885406,
0.3517741858959198,
0.171041801571846,
-0.20891721546649933,
-0.12740695476531982,
-0.13539785146713257,
-0.3448404371738434,
0.3369216322898865,
-0.36845114827156067,
0.1230697706341... | |
}
set
{
_HoleNumber = value;
HoleLabel.Text = value.ToString();
NotifyPropertyChanged("HoleNumber");
}
}
public double HoleLabelX { get; set; }
public double HoleLabelY { get; set; }
public string AbsXDisplay | [
0.2885057330131531,
-0.1496119350194931,
0.27943286299705505,
-0.47700831294059753,
0.296663373708725,
0.22395330667495728,
0.29655230045318604,
-0.44916480779647827,
0.012460319325327873,
-0.4063672423362732,
-0.27786684036254883,
0.6267490386962891,
-0.516037106513977,
-0.124536529183387... | |
{ get; set; }
public string AbsYDisplay { get; set; }
public event PropertyChangedEventHandler PropertyChanged;
//public event MouseEventHandler MouseActivity;
// Constructor
public Hole()
{
//_HoleDia = 20.0;
_Visible = true;
//this.ParentPattern = WhoIsTheParent;
... | [
0.2719009518623352,
-0.445402592420578,
0.3531232178211212,
-0.2114538550376892,
0.39763015508651733,
0.05271467939019203,
0.21731381118297577,
-0.23404178023338318,
-0.2677128314971924,
-0.4971083104610443,
-0.29055124521255493,
0.5329675078392029,
-0.0549442395567894,
0.3096742331981659,... | |
= _HoleDia;
HoleDecorator.Tag = this;
HoleDecorator.Width = 0;
HoleDecorator.Height = 0;
//HoleLabel.Text = x.ToString();
HoleLabel.TextAlignment = TextAlignment.Center;
HoleLabel.Foreground = new SolidColorBrush(Colors.White);
HoleLabel.FontSize = 12;
... | [
-0.03626926243305206,
-0.03751898184418678,
0.766329288482666,
-0.23944060504436493,
0.20505556464195251,
0.5280311703681946,
0.002481479197740555,
-0.7558634877204895,
-0.22651953995227814,
-0.6460046768188477,
-0.10477020591497421,
0.31638672947883606,
-0.1469879299402237,
0.245796084403... | |
//HoleEntity.Stroke = Brushes.Black;
//HoleDecorator.Stroke = HoleEntity.Stroke;
//HoleDecorator.StrokeThickness = HoleEntity.StrokeThickness;
//HiddenLinePattern=DoubleCollection(new double[]{5, 5});
}
public void NotifyPropertyChanged(String info)
{
if (PropertyChanged != ... | [
0.36675262451171875,
-0.5168111324310303,
0.42712533473968506,
-0.31169599294662476,
0.5254839062690735,
0.43817201256752014,
0.20667585730552673,
-0.5758822560310364,
-0.08835605531930923,
-0.2961173951625824,
0.0558658130466938,
0.6697792410850525,
-0.435534805059433,
0.09354400634765625... | |
new PropertyChangedEventArgs(info));
}
}
#region Properties
public HolePattern ParentPattern
{
get
{
return _ParentPattern;
}
set
{
_ParentPattern = value; | [
-0.17817085981369019,
-0.2725919485092163,
0.6952081918716431,
0.010570907965302467,
0.45171529054641724,
-0.20213866233825684,
0.23285754024982452,
-0.35738712549209595,
-0.10598697513341904,
-0.8758206367492676,
-0.45655566453933716,
0.3338499665260315,
-0.1092439815402031,
0.65112549066... | |
}
}
public bool Visible
{
get { return _Visible; }
set
{
_Visible = value;
HoleEntity.Visibility = value ?
Visibility.Visible : | [
0.13587014377117157,
-0.12194360047578812,
0.09725876897573471,
-0.28202348947525024,
-0.12026135623455048,
0.15442274510860443,
0.3815937042236328,
0.10087878257036209,
-0.06937805563211441,
-0.6468321084976196,
-0.460959255695343,
0.4387023150920868,
-0.5159544944763184,
-0.0435059964656... | |
Visibility.Collapsed;
HoleDecorator.Visibility = HoleEntity.Visibility;
SetCoordDisplayValues();
NotifyPropertyChanged("Visible");
}
}
public double AbsX
{
get { return _AbsX; }
set
{ | [
0.2571764290332794,
-0.3067716956138611,
0.2595899701118469,
-0.40106767416000366,
0.19257532060146332,
0.21949490904808044,
0.7102684378623962,
-0.2428557425737381,
-0.12525415420532227,
-0.6238014101982117,
-0.3351282775402069,
0.3822941780090332,
-0.4740146994590759,
-0.1419391185045242... | |
_AbsX = value;
SetCoordDisplayValues();
NotifyPropertyChanged("AbsX");
}
}
public double AbsY
{
get { return _AbsY; }
set
{
_AbsY = value; | [
0.35462528467178345,
-0.3782309293746948,
0.4883889853954315,
-0.39723819494247437,
0.29575103521347046,
0.047986213117837906,
0.5814428329467773,
-0.2597949802875519,
-0.08266694098711014,
-0.23627491295337677,
-0.3660227656364441,
0.8730654716491699,
-0.5643855333328247,
-0.3160420060157... | |
SetCoordDisplayValues();
NotifyPropertyChanged("AbsY");
}
}
private void SetCoordDisplayValues()
{
AbsXDisplay = HoleEntity.Visibility ==
Visibility.Visible ? String.Format("{0:f4}", _AbsX) : "";
AbsYDisplay = HoleEntity.Visibility ==
Visibility.Visible... | [
0.0509163960814476,
-0.3811499774456024,
0.4728602468967438,
-0.23442694544792175,
0.38334015011787415,
0.04702361300587654,
0.34067949652671814,
-0.3275821805000305,
-0.10801693052053452,
-0.5501133799552917,
-0.36154067516326904,
0.6531663537025452,
-0.6076276302337646,
-0.22318749129772... | |
NotifyPropertyChanged("AbsYDisplay");
}
public double CanvasX
{
get { return _CanvasX; }
set
{
if (value == _CanvasX) { return; }
_CanvasX = value;
UpdateEntities(); | [
0.20585770905017853,
-0.5824970602989197,
0.5029669404029846,
-0.2844090461730957,
0.19730480015277863,
0.09526588767766953,
0.4438505172729492,
-0.4030737280845642,
-0.12972481548786163,
-0.809172511100769,
-0.36562907695770264,
0.6223032474517822,
-0.5249634981155396,
-0.3794425129890442... | |
NotifyPropertyChanged("CanvasX");
}
}
public double CanvasY
{
get { return _CanvasY; }
set
{
if (value == _CanvasY) { return; }
_CanvasY = value;
UpdateEntities(); | [
0.12291041761636734,
-0.5422223806381226,
0.5121542811393738,
-0.3119751811027527,
0.12968535721302032,
0.12634386122226715,
0.3603481650352478,
-0.43062445521354675,
-0.19639833271503448,
-0.7638633847236633,
-0.3396928906440735,
0.6219984889030457,
-0.463759183883667,
-0.3480919599533081... | |
NotifyPropertyChanged("CanvasY");
}
}
public HoleTypes HoleType
{
get { return _HoleType; }
set
{
if (value != _HoleType)
{ | [
0.14802341163158417,
-0.2157270908355713,
0.2015169858932495,
-0.30696436762809753,
0.26188576221466064,
0.17376385629177094,
0.4569946527481079,
-0.4616331458091736,
0.12278492748737335,
-0.8381505608558655,
-0.2932089567184448,
0.5127760767936707,
-0.46655115485191345,
-0.199625521898269... | |
_HoleType = value;
UpdateHoleType();
NotifyPropertyChanged("HoleType");
}
}
}
public double HoleDia
{
get { return _HoleDia; }
set | [
0.2597754895687103,
-0.10727948695421219,
0.08574038743972778,
-0.3917597532272339,
0.13866902887821198,
0.14519640803337097,
0.3370072841644287,
-0.2897462546825409,
0.25967416167259216,
-0.6048787236213684,
-0.3159213066101074,
0.5303727388381958,
-0.527117133140564,
0.19229918718338013,... | |
{
if (value != _HoleDia)
{
_HoleDia = value;
HoleEntity.Width = value;
HoleEntity.Height = value;
UpdateHoleType(); | [
0.10512601584196091,
-0.059389691799879074,
0.5128025412559509,
-0.4663247764110565,
0.4241371154785156,
0.20828279852867126,
0.23670272529125214,
-0.2605119049549103,
0.2893339693546295,
-0.5172224640846252,
-0.4007314443588257,
0.5414774417877197,
-0.19033946096897125,
0.4490710198879242... | |
NotifyPropertyChanged("HoleDia");
}
}
}
public double StrokeThickness
{
get { return _StrokeThickness; }
//Setting this StrokeThickness will also set Decorator
set
{ | [
0.09827116131782532,
-0.32485583424568176,
0.5915498733520508,
-0.19221128523349762,
0.28224560618400574,
0.2340463399887085,
0.18520434200763702,
-0.6347548365592957,
0.0818396657705307,
-0.7247607707977295,
0.0787895917892456,
0.6235164999961853,
-0.3674590289592743,
-0.05655879154801369... | |
_StrokeThickness = value;
this.HoleEntity.StrokeThickness = value;
this.HoleDecorator.StrokeThickness = value;
NotifyPropertyChanged("StrokeThickness");
}
}
public Brush StrokeColor
{
get { return _StrokeColor; }
//Setting this StrokeThickness wil... | [
0.0228037778288126,
-0.2760384976863861,
0.6804768443107605,
-0.028342613950371742,
0.1561320573091507,
0.2057429701089859,
0.1288008689880371,
-0.8429204225540161,
0.0888604074716568,
-0.6828900575637817,
0.357224702835083,
0.630335807800293,
-0.35006004571914673,
0.14956040680408478,
-... | |
set
{
_StrokeColor = value;
this.HoleEntity.Stroke = value;
this.HoleDecorator.Stroke = value;
NotifyPropertyChanged("StrokeColor");
}
}
#endregion
#region Methods
private void UpdateEntities()
{ | [
0.052970290184020996,
-0.589487612247467,
0.8238934278488159,
-0.10828161239624023,
0.38054975867271423,
-0.07138647884130478,
0.17022287845611572,
-0.1865932196378708,
0.13586530089378357,
-0.71494060754776,
-0.3001349866390228,
0.37756702303886414,
-0.46152523159980774,
0.177458047866821... | |
//-- Update Margins for graph positioning
HoleEntity.Margin = new Thickness
(CanvasX - HoleDia / 2, CanvasY - HoleDia / 2, 0, 0);
HoleDecorator.Margin = new Thickness
(CanvasX - HoleDecorator.Width / 2,
CanvasY - HoleDecorator.Width / 2, 0, 0);
HoleLabel.Margin = new Th... | [
-0.11772516369819641,
0.009817523881793022,
0.7666244506835938,
0.006666362285614014,
-0.007017473224550486,
0.6529703140258789,
-0.27832117676734924,
-0.3541276454925537,
-0.3494349420070648,
-0.8797446489334106,
-0.18539959192276,
0.32049834728240967,
0.11759074777364731,
0.0871610864996... | |
.3,
(CanvasY * 1.0) - HoleLabel.FontSize * .6, 0, 0);
}
private void UpdateHoleType()
{
switch (this.HoleType)
{
case HoleTypes.Drilled: //Drilled only
HoleDecorator.Visibility = Visibility.Collapsed;
break; | [
0.47641146183013916,
0.09337014704942703,
0.22870206832885742,
-0.3301384150981903,
0.3089127540588379,
0.2768898904323578,
0.47102728486061096,
-0.22926819324493408,
0.01988007314503193,
-0.6077261567115784,
-0.3121623992919922,
0.5622115731239319,
-0.3004813492298126,
0.29924753308296204... | |
case HoleTypes.Tapped: // Drilled & Tapped
HoleDecorator.Visibility = (this.Visible == true) ?
Visibility.Visible : Visibility.Collapsed;
HoleDecorator.Width = HoleEntity.Width * 1.2;
HoleDecorator.Height = HoleDecorator.Width; | [
0.028782105073332787,
0.24798040091991425,
0.17878657579421997,
-0.499772846698761,
0.2229975312948227,
0.4943698048591614,
0.25857436656951904,
-0.3366478681564331,
0.12076973170042038,
-0.6626509428024292,
-0.1940237134695053,
0.39826369285583496,
-0.10873568058013916,
0.2831864655017853... | |
HoleDecorator.StrokeDashArray =
LinePatterns.HiddenLinePattern(1);
break;
case HoleTypes.CounterBored: // Drilled & CounterBored
HoleDecorator.Visibility = (this.Visible == true) ?
Visibility.Visible : | [
0.3330727219581604,
-0.2016914039850235,
0.4430580139160156,
-0.23517173528671265,
0.2995735704898834,
0.6055625081062317,
0.4961948096752167,
-0.37077102065086365,
-0.13765756785869598,
-0.34292563796043396,
0.008649387396872044,
0.29318350553512573,
-0.106377512216568,
0.1299266964197158... | |
Visibility.Collapsed;
HoleDecorator.Width = HoleEntity.Width * 1.5;
HoleDecorator.Height = HoleDecorator.Width;
HoleDecorator.StrokeDashArray = null;
break;
case HoleTypes.CounterSunk: // Drilled & CounterSunk | [
0.13695652782917023,
0.14191146194934845,
0.15104244649410248,
-0.3375665843486786,
0.2617935836315155,
0.5880999565124512,
0.3902166187763214,
-0.41354310512542725,
-0.19063077867031097,
-0.41430312395095825,
0.004948911257088184,
0.2211252599954605,
0.12795215845108032,
0.263633757829666... | |
HoleDecorator.Visibility = (this.Visible == true) ?
Visibility.Visible : Visibility.Collapsed;
HoleDecorator.Width = HoleEntity.Width * 1.8;
HoleDecorator.Height = HoleDecorator.Width;
HoleDecorator.StrokeDashArray = null; | [
0.005250943824648857,
0.12039784342050552,
0.22831399738788605,
-0.48567596077919006,
0.16036753356456757,
0.6061869263648987,
0.47700756788253784,
-0.23853297531604767,
-0.04129038006067276,
-0.35610586404800415,
-0.04902685433626175,
0.20335684716701508,
-0.12355627119541168,
0.319635182... | |
break;
}
UpdateEntities();
}
#endregion
}
```
Here's an example. Keep in mind your sample code lacked definitions for a number of dependencies:
```
[TestFixture()]
public class TestHole
{
private Hole _unitUnderTest;
[SetUp()]
public void SetUp()
{
_unitUnderTest ... | [
0.5661143064498901,
0.007109072059392929,
-0.07422654330730438,
-0.2240523099899292,
0.31838512420654297,
0.022958682850003242,
0.35839176177978516,
-0.5297616124153137,
-0.07887299358844757,
-0.5941454172134399,
-0.2877150774002075,
0.5595249533653259,
-0.40524038672447205,
0.391988247632... | |
_unitUnderTest = null;
}
[Test]
public void TestConstructorHole()
{
Hole testHole = new Hole();
Assert.IsNotNull(testHole, "Constructor of type, Hole failed to create instance.");
}
[Test]
public void TestNotifyPropertyChanged()
{
string info = null;
_un... | [
0.2493968904018402,
0.13318604230880737,
0.07201531529426575,
-0.10504820197820663,
0.2785622477531433,
0.12274454534053802,
0.555904746055603,
-0.4853191673755646,
0.07832711935043335,
-0.6010075807571411,
-0.11913686245679855,
0.6593199372291565,
-0.22568948566913605,
0.43998560309410095... | |
constructor is producing a valid object (usually not necessary with a full test fixture in place, construction is usually well exercised) and it is also testing the only public method in the class. In this case you would need an event handler delegate and an Assert to check the info parameter's contents.
The goal is t... | [
0.12425583600997925,
-0.1998954564332962,
-0.3977755010128021,
0.5514660477638245,
-0.204062357544899,
-0.27260822057724,
0.23523053526878357,
-0.20694543421268463,
0.17485620081424713,
-0.3845054805278778,
-0.11637819558382034,
0.6852912306785583,
-0.043494343757629395,
-0.002938511781394... | |
As I'm developing unit tests for my django application I find myself running manage.py test over and over and over again. I'm using a MySQL backend and have many models in the project, so the ramp up time to create all of the test databases is about 30 seconds.
How can I use make each unit test faster by keeping the ... | [
0.6043750643730164,
0.23871386051177979,
0.1287842094898224,
0.05690321326255798,
0.15264266729354858,
-0.056011468172073364,
0.2753869295120239,
-0.10148099809885025,
-0.24036593735218048,
-0.6890807151794434,
0.2819490432739258,
0.5514647364616394,
0.04155778884887695,
-0.014720008708536... | |
app by running `manage.py test appname` (or for multiple apps at once with `manage.py test app1 app2 ...`).
My usual workflow is to just run the tests for the app I'm working on as I work, and the run the full suite before I commit my next set of changes. | [
0.4738338887691498,
0.37187308073043823,
0.234065443277359,
-0.0323583260178566,
0.17104123532772064,
0.12563835084438324,
0.4204167425632477,
-0.25003719329833984,
-0.1768086701631546,
-0.8524627089500427,
-0.17861422896385193,
0.7865093350410461,
-0.21782496571540833,
-0.421254962682724,... | |
I downloaded a package installer for Python 2.6.1, but when I use the python command in terminal (bash) Apple's shipped 2.3.5 version loads up. How can I get 2.6.1 to load up instead?
I am running Leopard, 10.5.5. The python binary, `/usr/bin/python`, is merely a symlink to the actual binary in the version specific Pyt... | [
-0.10955306142568588,
0.3054616153240204,
0.25343960523605347,
-0.508977472782135,
-0.13120198249816895,
0.13385263085365295,
0.6452341675758362,
0.004819553345441818,
-0.5169309973716736,
-0.426874041557312,
-0.01269794162362814,
0.5367754697799683,
-0.4043616056442261,
-0.109956584870815... | |
13 root wheel 442 Nov 22 20:40 2.5
lrwxr-xr-x 1 root wheel 3 Aug 31 2008 Current -> 2.5
```
With the help of the `ln` command to create symlinks, you will be able to set the `python` in your path to point to the version of python you want to use. | [
-0.0944395661354065,
0.2030266672372818,
0.5163342356681824,
-0.28011301159858704,
-0.16989827156066895,
-0.23202849924564362,
0.666617214679718,
0.24083589017391205,
-0.21338224411010742,
-0.5631579756736755,
-0.04651563614606857,
0.27860209345817566,
-0.043306123465299606,
0.026569193229... | |
How do I use a `ConcurrentLinkedQueue` in Java?
Using this `LinkedQueue`, do I need to be worried about concurrency in the queue? Or do I just have to define two methods (one to retrive elements from the list and another to add elements to the list)?
Note: obviously these two methods have to be synchronized. Righ... | [
0.12034647166728973,
-0.14340072870254517,
-0.005892164073884487,
0.11894010007381439,
-0.12811456620693207,
-0.1341622918844223,
0.11061927676200867,
0.12825192511081696,
-0.5062075257301331,
-0.5868157744407654,
0.3471238613128662,
0.26116830110549927,
-0.5710873603820801,
0.303699374198... | |
are objects of my own class.
One more question: do I need to do this in the remove method:
```
while (queue.size() == 0){
wait();
queue.poll();
}
```
I only have one consumer and one producer.
No, the methods don't need to be synchronized, and you don't need to define any methods; they are already in Concurr... | [
0.3700990676879883,
-0.20412452518939972,
0.6135428547859192,
0.018812499940395355,
-0.19476400315761566,
0.2632935047149658,
-0.17095300555229187,
0.007174038328230381,
-0.4259639084339142,
-0.6786453127861023,
0.20162957906723022,
0.303189754486084,
-0.4898401200771332,
0.777972102165222... | |
so they have somewhere to put their objects (you could use a setter for this, instead, but I prefer to do this kind of thing in a constructor):
```
YourProducer producer = new YourProducer(queue);
```
and:
```
YourConsumer consumer = new YourConsumer(queue);
```
and add stuff to it in your producer:
```
queue.of... | [
0.14931118488311768,
-0.10249505192041397,
0.5260186195373535,
-0.08837363123893738,
0.04347911477088928,
0.13889293372631073,
-0.07837951928377151,
-0.16872571408748627,
-0.45947039127349854,
-0.559248149394989,
-0.08795290440320969,
0.3581012785434723,
-0.29337039589881897,
0.26168584823... | |
to Integer.MAX\_VALUE, which is over two billion) and thus may or may not be appropriate depending on your circumstances.
If you only have one thread putting stuff into the queue, and another thread taking stuff out of the queue, ConcurrentLinkedQueue is probably overkill. It's more for when you may have hundreds or e... | [
0.20497864484786987,
-0.10733957588672638,
0.39309728145599365,
0.21629634499549866,
0.205128014087677,
0.12980742752552032,
0.10545454919338226,
-0.07990598678588867,
-0.7192429900169373,
-0.6187033653259277,
0.29667168855667114,
0.4730159044265747,
-0.47022005915641785,
0.286078691482543... | |
Jared). You CANNOT do this with a ConcurrentLinkedQueue, as all operations are done WITHOUT locking on the instance (using java.util.concurrent.atomic variables). You will NOT need to do this if you want to block while the queue is empty, because poll() will simply return null while the queue is empty, and poll() is at... | [
0.20956800878047943,
-0.12734900414943695,
0.3374203145503998,
-0.13491801917552948,
-0.1787574291229248,
-0.0030463901348412037,
0.4643954038619995,
-0.09069482237100601,
-0.7235123515129089,
-0.44886472821235657,
0.1785484105348587,
0.7418673038482666,
-0.6646612286567688,
-0.02205882593... | |
something else, and it means you don't have to deal with ANY synchronized stuff:
```
BlockingQueue<YourObject> queue = new LinkedBlockingQueue<YourObject>();
queue.put(myObject); // Blocks until queue isn't full.
YourObject myObject = queue.take(); // Blocks until queue isn't empty.
```
Everything else is the same... | [
0.2872737944126129,
-0.35631200671195984,
0.2388034462928772,
0.03322358801960945,
-0.06689376384019852,
-0.010537251830101013,
0.17437833547592163,
0.2295960634946823,
-0.6373952627182007,
-0.6482581496238708,
0.004074303898960352,
0.2799096405506134,
-0.6569028496742249,
0.34273195266723... | |
Does anyone know the best way to do this? Apache, tomcat, linux
Also the tomcat way: stick in web.xml:
```
<error-page>
<error-code>404</error-code>
<location>/homepage.html</location>
</error-page>
```
Relative to web apps context. | [
0.31972354650497437,
0.10624520480632782,
0.5155038833618164,
0.23373448848724365,
0.0714867115020752,
-0.2587078809738159,
0.26413819193840027,
0.04204479977488518,
-0.2819356918334961,
-0.4062153995037079,
-0.06092364713549614,
0.6255761981010437,
-0.3060797154903412,
-0.2478962838649749... | |
How can I compile java code from an arbitrary string (in memory) in Java 5 and Java 6, load it and run a specific method on it (predefined)?
Before you flame this, I looked over existing implementations:
* Most rely on Java 6 Compiler API.
* Those that don't, rely on tricks.
* Yes, I checked out commons-jci. Either I... | [
0.4116911292076111,
0.1854954957962036,
-0.07971417903900146,
0.014576022513210773,
-0.32227012515068054,
-0.12290993332862854,
0.514812707901001,
-0.3065182864665985,
-0.19720180332660675,
-0.7386274337768555,
0.1463916003704071,
0.5167437195777893,
-0.28394749760627747,
-0.09952539205551... | |
inner classes (or inner anonymous classes).
* I'd quite like it if the entire thing was in-memory, as the thing runs on multiple environments.
I'm sure this has been solved before, but I can't find anything that looks even half-production quality on google (except jci, which, as I've said before, I haven't managed to ... | [
-0.005816034507006407,
-0.078015998005867,
-0.06801387667655945,
-0.014489223249256611,
-0.2310430258512497,
0.35512346029281616,
0.45645636320114136,
0.23621711134910583,
-0.074647918343544,
-0.8309757709503174,
0.1428505778312683,
0.6804893016815186,
0.004050040151923895,
-0.374427020549... | |
to use a file-system based solution (calling javac) but I don't know how to divine the classpath, nor how to later load the files (which are not in my classpath) with a special classloader that can be recycled for multiple invocations. While I do know how to research it, I'd prefer a ready solution.
Edit2:
For now, I'... | [
0.3293986916542053,
0.127268448472023,
-0.12607868015766144,
-0.14194674789905548,
-0.1904715597629547,
-0.32471662759780884,
0.4789752662181854,
-0.16854849457740784,
-0.006406284868717194,
-0.5651256442070007,
0.3077203631401062,
0.6515193581581116,
-0.3867906332015991,
-0.30662161111831... | |
so it should be enough for what I want.
~~I don't want to mark the answer as accepted yet since I do hope for a better solution to come up.~~
Edit3: Accepted the beanshell suggestion - it really works wonderfully.
If you're not completely tied to compiling, solutions like Beanshell, groovy and the other scripting lan... | [
0.22366894781589508,
0.26864752173423767,
0.12038087844848633,
0.14392559230327606,
-0.09565678983926773,
-0.2845376431941986,
0.23018330335617065,
0.1253492832183838,
-0.06562238931655884,
-0.6065401434898376,
0.06917313486337662,
0.7434462308883667,
-0.10534028708934784,
-0.0953368395566... | |
I've got eight commits on a branch that I'd like to email to some people who aren't git enlightened, yet. So far, everything I do either gives me 8 patch files, or starts giving me patch files for every commit in the branch's history, since the beginning of time. I used git rebase --interactive to squash the commits, b... | [
0.7809344530105591,
0.3869885802268982,
0.0167087372392416,
-0.11238154023885727,
0.138184055685997,
0.18671105802059174,
0.38780567049980164,
0.07133032381534576,
-0.7280716300010681,
-0.5547442436218262,
0.06920699775218964,
0.3822827637195587,
-0.33024871349334717,
0.2927396297454834,
... | |
# only one commit since master
```
I'd recommend doing this on a throwaway branch as follows. If your commits are in the "newlines" branch and you have switched back to your "master" branch already, this should do the trick:
```
[adam@mbp2600 example (master)]$ git checkout -b tmpsquash
Switched to a new branch "tmps... | [
-0.06983266025781631,
-0.08978278189897537,
0.18372933566570282,
-0.055231060832738876,
0.17408528923988342,
0.010873042978346348,
0.6400732398033142,
-0.15046772360801697,
-0.7971222996711731,
-0.671932578086853,
-0.08199469745159149,
0.43845537304878235,
-0.41486138105392456,
0.278217107... | |
"My squashed commits"
[tmpsquash]: created 75b0a89: "My squashed commits"
1 files changed, 2 insertions(+), 0 deletions(-)
[adam@mbp2600 example (tmpsquash)]$ git format-patch master
0001-My-squashed-commits.patch
``` | [
0.04956652596592903,
0.13354948163032532,
-0.09797439724206924,
-0.17040574550628662,
0.047300513833761215,
0.4456753432750702,
0.4936772584915161,
0.1438038945198059,
-0.7482122778892517,
-0.6269876956939697,
-0.1694485992193222,
0.45619791746139526,
-0.4512130320072174,
0.140929296612739... | |
I'm preparing to give a talk about some topic I choose from artificial intelligence area (neural networks). I'm looking for something interesting, used in a real life and preferably not too complicated (the simpler it is, the easier it is for students to understand and the more interested they will be). I thought that ... | [
0.6849425435066223,
0.06836284697055817,
0.1894005388021469,
-0.058087900280952454,
0.2056000679731369,
0.12728068232536316,
-0.003833238035440445,
0.2840943932533264,
-0.30317509174346924,
-0.6724824905395508,
0.04424099624156952,
0.6607614159584045,
0.007182265631854534,
-0.2138890773057... | |
I am trying to display a please wait dialog for a long running operation. The problem is since this is single threaded even though I tell the WaitScreen to display it never does. Is there a way I can change the visibility of that screen and make it display immediately? I included the Cursor call as an example. Right af... | [
0.11774198710918427,
-0.13178956508636475,
0.7347349524497986,
-0.4186377227306366,
0.22706760466098785,
0.08509935438632965,
0.3261440694332123,
0.02938290312886238,
-0.15485736727714539,
-0.8285959959030151,
-0.13067138195037842,
0.7278594970703125,
-0.47556567192077637,
0.22928565740585... | |
i < 100000000; i++)
{
String s = i.ToString();
}
WaitScreen.Visibility = Visibility.Collapsed;
this.Cursor = System.Windows.Input.Cursors.Arrow;
}
```
WaitScreen is just a Grid with a Z-index of 99 that I hide and show.
update: I really don't want to use a background worker unless I have to. There are ... | [
0.2041691541671753,
-0.29472073912620544,
0.6885555982589722,
0.0022574469912797213,
0.223378524184227,
0.21919280290603638,
0.6304700970649719,
-0.27260440587997437,
-0.34899941086769104,
-0.766899824142456,
-0.011431201361119747,
0.4903252422809601,
-0.22823622822761536,
0.10133185237646... | |
null;
}), null);
Dispatcher.PushFrame(frame);
}
```
That function needs to be called right before the long running operation. That will then Force the UI thread to update. | [
0.061197683215141296,
-0.25449034571647644,
0.6408920288085938,
-0.4431702196598053,
0.2590966522693634,
-0.1429031789302826,
0.39963987469673157,
0.00644450169056654,
-0.08686953783035278,
-0.6538501977920532,
-0.4416927099227905,
0.4862357974052429,
-0.4262085258960724,
0.479713320732116... | |
Is it possible to copy guide lines from one image to another?
I need this because I have several images that need exactly the same composition, so I want to use the guide lines for this.
There's no option to select & copy a guide line, so I must add them manually.
It would be nice, if there's a little script-fu ... | [
0.3831672966480255,
0.08157452195882797,
0.6278232932090759,
0.4385715126991272,
-0.04152761399745941,
-0.052910275757312775,
-0.12046641111373901,
-0.12963615357875824,
-0.07209312170743942,
-0.6354653835296631,
0.2316853106021881,
0.7644888162612915,
-0.11521314829587936,
-0.431014537811... | |
you edit the question to provide more details?
At a guess (pending more information) are you looking for something like this?
```
guide = 0
while guide = gimp_image_find_next_guide (image_1,guide) != 0
position = gimp_image_get_guide_position (image_1,guide)
if gimp_image_get_guide_orientation (image_1,gui... | [
0.5500172972679138,
0.12254651635885239,
0.6955611705780029,
-0.06528694182634354,
-0.10155368596315384,
-0.22036759555339813,
0.09447094798088074,
-0.46679142117500305,
-0.0948193371295929,
-0.6967302560806274,
-0.0288193728774786,
0.712730884552002,
-0.6167110204696655,
-0.52393126487731... | |
script fu.
But the first question is *what are you trying to accomplish?* -- after that we can worry about the details of how. | [
0.41489407420158386,
0.15449650585651398,
-0.005864831618964672,
0.24508942663669586,
-0.2764783203601837,
-0.2015194147825241,
0.046182822436094284,
0.1812138855457306,
0.20023728907108307,
-0.5173965692520142,
-0.011182768270373344,
0.492810994386673,
-0.06015315279364586,
-0.16693440079... | |
Edit: Since it appears that there's either no solution, or I'm doing something so non-standard that nobody knows - I'll revise my question to also ask: What is the best way to accomplish logging when a python app is making a lot of system calls?
My app has two modes. In interactive mode, I want all output to go to the... | [
0.3974319398403168,
-0.122468963265419,
0.25447410345077515,
-0.0498831570148468,
-0.14682723581790924,
0.024182384833693504,
0.412746787071228,
-0.028258206322789192,
-0.521073579788208,
-0.49344077706336975,
-0.11536037921905518,
0.7708314657211304,
-0.4052036702632904,
-0.26487475633621... | |
log in interactive mode, without modifying each and every system call.
---
In other words, I want the functionality of the command line 'tee' for any output generated by a python app, **including system call output**.
To clarify:
To redirect all output I do something like this, and it works great:
```
# open our ... | [
0.1186087429523468,
0.11908157169818878,
0.5349673628807068,
-0.13015176355838776,
0.013335579074919224,
-0.0015035958494991064,
0.35985276103019714,
-0.06325723230838776,
-0.29186320304870605,
-0.8869568109512329,
-0.26152512431144714,
0.7311697602272034,
-0.370118111371994,
-0.1595120728... | |
also runs some shell commands, so it's nice not having to deal with each of their output individually as well.
Simply, I want to do the same, except *duplicating* instead of redirecting.
At first thought, I thought that simply reversing the `dup2`'s should work. Why doesn't it? Here's my test:
```
import os, sys
#... | [
0.3959432542324066,
0.09607816487550735,
0.3048762381076813,
-0.23900596797466278,
0.1935061365365982,
0.0024322858080267906,
0.11801213026046753,
-0.1809399574995041,
-0.3851167559623718,
-0.7766523957252502,
0.0050292485393583775,
0.7145131230354309,
-0.1659112572669983,
-0.0566886253654... | |
of any Unix system calls that do exactly what `tee` does.
```
# Note this version was written circa Python 2.6, see below for
# an updated 3.3+-compatible version.
import subprocess, os, sys
# Unbuffer output (this ensures the output is in the correct order)
sys.stdout = os.fdopen(sys.stdout.fileno(), 'w', 0)
tee = ... | [
0.1438285857439041,
0.03692787513136864,
0.5517639517784119,
-0.34164872765541077,
-0.13585467636585236,
-0.04378046840429306,
0.1309199035167694,
-0.20132942497730255,
-0.5278960466384888,
-0.8665311932563782,
-0.17310741543769836,
0.48998191952705383,
-0.5566259622573853,
0.0405626967549... | |
as that
# of any child processes we spawn)
os.dup2(tee.stdin.fileno(), sys.stdout.fileno())
os.dup2(tee.stdin.fileno(), sys.stderr.fileno())
# The flush flag is needed to guarantee these lines are written before
# the two spawned /bin/ls processes emit any output
print("\nstdout", flush=True)
print("stderr", file=sys.... | [
0.26940035820007324,
-0.30366605520248413,
0.4626937806606293,
-0.202579528093338,
0.32194072008132935,
0.3134661614894867,
0.04151870682835579,
-0.062275417149066925,
-0.18438026309013367,
-0.777439534664154,
-0.3214404284954071,
0.37218180298805237,
-0.04709066078066826,
0.20851372182369... | |
What event should I be looking for (on the stage:Stage, I suppose) to get changes to the stage.displayState?
this works
```
stage.addEventListener(Event.FULLSCREEN, doThisOnChange);
```
for both full screen and normal changes. In your `doThisOnChange` method, you can figure out which you're in by looking at `if (sta... | [
0.22236031293869019,
-0.33154386281967163,
0.7388936281204224,
-0.2542843520641327,
0.4155965745449066,
0.1504245549440384,
0.03838012367486954,
0.07294821739196777,
-0.1363745480775833,
-0.6712343692779541,
0.2788024842739105,
0.7452713847160339,
-0.07024162262678146,
0.09503347426652908,... | |
I'm trying to send a message to the WCF-WSHttp adapter with a dynamic
send port from an orchestration, but BizTalk seems to always be
reverting back to the HTTP Adapter.
According to the docs that I've been able to find, I should just need
to set the transport type from my expression shape to get BizTalk to
use the WC... | [
0.23515871167182922,
0.251810222864151,
0.7310919761657715,
-0.131328746676445,
-0.01735607348382473,
-0.05298508331179619,
0.302139014005661,
-0.46033036708831787,
-0.1708555519580841,
-0.854253351688385,
-0.4109920859336853,
0.3596900403499603,
-0.12538187205791473,
0.0460587739944458,
... | |
Tool Basket](http://sptoolbasket.codeplex.com/) a try.
> This project allows authenticated users to rate :
>
>
> * custom lists, document libraries, picture libraries, issue lists, calendars, links
> * discussion boards
> * pages.
> * Blog posts
> * Moderator module
> * The system also contains a site definition and... | [
0.4753064513206482,
-0.15217645466327667,
0.2553638219833374,
0.0796758383512497,
-0.24067038297653198,
-0.1552649587392807,
0.2813636064529419,
-0.2924864888191223,
-0.42650577425956726,
-0.5593187212944031,
0.019815705716609955,
0.20953480899333954,
-0.013755825348198414,
-0.438686013221... | |
I'm using Subversion 1.5 and have a single file in a branch that I want to merge into another branch. When I do a `svn merge http://path/to/file` I get an error,
> Cannot replace a directory from with .
Does this just mean that Subversion can't do this?
I think your best best is an svn copy from one branch to the oth... | [
0.5212181210517883,
-0.29778680205345154,
0.006416218355298042,
-0.12571462988853455,
-0.12859421968460083,
-0.40960392355918884,
0.2800792157649994,
0.25221720337867737,
-0.30236318707466125,
-0.6536635160446167,
0.04337276145815849,
0.44993025064468384,
-0.5150160789489746,
0.27008143067... | |
Can any one explain the difference between factory and strategy patterns?
For me both are looking same other than an extra factory class (which create an object of product in factory patterns)
A factory pattern is a creational pattern. A strategy pattern is an operational pattern. Put another way, a factory pattern i... | [
0.6193305850028992,
-0.2108468860387802,
-0.5715151429176331,
0.04874070733785629,
-0.07589568197727203,
0.24524183571338654,
0.3497006595134735,
-0.09028223901987076,
-0.5342033505439758,
-0.7965779304504395,
-0.23687134683132172,
0.1990821361541748,
-0.8873558044433594,
0.273677200078964... | |
for example, Move; using Run, Walk, or Lope strategies.
In fact the two can be used together. For example, you may have a factory that creates your business objects. It may use different strategies based on the persistence medium. If your data is stored locally in XML it would use one strategy. If the data were remote... | [
0.33768147230148315,
-0.33877134323120117,
-0.010860376991331577,
0.20976006984710693,
-0.009658213704824448,
0.19421149790287018,
-0.0029272008687257767,
-0.11049700528383255,
-0.5227979421615601,
-0.7553537487983704,
-0.13801896572113037,
0.26893749833106995,
-0.32653963565826416,
0.1544... | |
Ok, maybe I'm missing something, but I really don't see the point of Selenium. What is the point of opening the browser using code, clicking buttons using code, and checking for text using code? I read the website and I see how in theory it would be good to automatically unit test your web applications, but in the end ... | [
0.8919031023979187,
0.3699953854084015,
-0.2557537257671356,
0.19682767987251282,
-0.06144518032670021,
-0.2834269404411316,
0.3385672867298126,
-0.17746834456920624,
0.16871997714042664,
-0.3829335570335388,
0.3911656439304352,
0.579318106174469,
0.04371057078242302,
0.4147135019302368,
... | |
of the later).
When you are testing your application through the browser you are usually testing the system fully integrated. Consider you already have to test your changes before committing them (smoke tests), you don't want to test it manually over and over.
Something really nice, is that you can automate your smok... | [
0.5491113066673279,
-0.038452811539173126,
0.36151137948036194,
0.10120558738708496,
0.10302349179983139,
-0.1607673615217209,
0.10536983609199524,
-0.25221243500709534,
0.19916214048862457,
-0.7437996864318848,
0.1192544475197792,
0.6971668601036072,
-0.01130035612732172,
-0.3629050850868... | |
the [Page Object](http://code.google.com/p/webdriver/wiki/PageObjects) pattern, it helps on keeping the tests clean.
**Update 1:** Notice that the tests will also run javascript on the pages, which helps testing highly dynamic pages. Also note that you can run it with different browsers, so you can check cross-browser... | [
0.5185247659683228,
0.14792168140411377,
0.3509688079357147,
0.2158445566892624,
-0.38485148549079895,
-0.2123325765132904,
0.5025451183319092,
-0.13314573466777802,
-0.08679299056529999,
-0.8435942530632019,
0.03775174170732498,
0.42102837562561035,
-0.3218611180782318,
-0.227975860238075... | |
.SomeAction()
.AnotherActionWithParams("somevalue")
//... other actions
.AnotherOneThatKeepsYouOnthePage();
// add some asserts using methods that give you info
// on LastPage (or that check the info is there).
// you can of course break the statements to add additional
// asserts on the mul... | [
0.3676113784313202,
0.1390695422887802,
0.16056062281131744,
0.2430446594953537,
-0.03675007075071335,
-0.23932179808616638,
0.29756098985671997,
-0.41369518637657166,
-0.1154080256819725,
-0.5165066719055176,
-0.028059057891368866,
0.5139561295509338,
0.04402431473135948,
0.06149725988507... | |
instead, usually hides what you missed to test, so if you made a change that affects every single page and you will check a subset (as time doesn't allows), you know which ones you actually tested and QA can work from there (hopefully by adding even more tests). | [
0.48244962096214294,
-0.1637193262577057,
0.056556861847639084,
0.15246418118476868,
-0.05071248486638069,
-0.18481221795082092,
0.3350040316581726,
-0.128865584731102,
-0.14767229557037354,
-0.4268588423728943,
0.1353875994682312,
-0.024264369159936905,
-0.13324056565761566,
0.07099816203... | |
I've not used XML too much and I need a little help.
My .NET application gets this XML response from the W3C's public validation server:
```
<?xml version="1.0" encoding="UTF-8" ?>
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope">
<env:Body>
<m:markupvalidationresponse env:encodingStyle=... | [
0.1555667668581009,
0.14731675386428833,
0.4073595404624939,
-0.18544164299964905,
-0.3980354368686676,
0.08847680687904358,
0.07296579331159592,
-0.5959811806678772,
-0.0732099860906601,
-0.7292977571487427,
0.1114409863948822,
0.43069881200790405,
0.04844420775771141,
-0.1582421064376831... | |
<m:validity>true</m:validity>
<m:errors>
<m:errorcount>0</m:errorcount>
<m:errorlist />
</m:errors>
<m:warnings>
<m:warningcount>0</m:warningcount> | [
-0.007163205649703741,
0.3381500244140625,
0.09651419520378113,
-0.041609738022089005,
-0.0009119846508838236,
-0.017658675089478493,
0.3231808543205261,
-0.3438241183757782,
-0.32188886404037476,
-0.16390644013881683,
0.05644061788916588,
0.5430537462234497,
-0.1637512594461441,
-0.189656... | |
<m:warninglist />
</m:warnings>
</m:markupvalidationresponse>
</env:Body>
</env:Envelope>
```
I want to extract from this the following values:
* Uri as String
* Checkedby as String
* Doctype as String
* CharSet as String
* Validity as Boolean
* ErrorList as System.Collections.Generic.List(O... | [
-0.21028870344161987,
-0.005319408606737852,
0.39232197403907776,
-0.12391365319490433,
-0.2653232216835022,
0.11377217620611191,
0.3928738236427307,
-0.44950687885284424,
-0.04019993171095848,
-0.33871638774871826,
-0.06960280984640121,
0.16761788725852966,
-0.5589055418968201,
0.13736195... | |
as String
Here's what I've go so far. But, **this doesn't work**...
```
Dim ResponseReader As Xml.XmlTextReader = New Xml.XmlTextReader(ResponseStream)
Dim ResponseDocument As New Xml.XPath.XPathDocument(ResponseReader)
Dim ResponseNavigator As Xml.XPath.XPathNavigator = ResponseDocument.CreateNavigator()
Dim Respon... | [
-0.043302975594997406,
-0.1386042982339859,
0.9884499907493591,
-0.2854054272174835,
-0.4754790663719177,
0.13197338581085205,
0.2969229221343994,
-1.0411916971206665,
-0.0934855118393898,
-0.18834231793880463,
-0.18626168370246887,
0.8926293253898621,
-0.3266458809375763,
-0.1354338526725... | |
<m:uri>upload://Form Submission</m:uri>
<m:checkedby>http://validator.w3.org/</m:checkedby>
<m:doctype>-//W3C//DTD XHTML 1.1//EN</m:doctype>
<m:charset>utf-8</m:charset>
<m:validity>true</m:validity>
<m:errors>
<m:errorcount>0</m:errorcoun... | [
-0.2118002325296402,
0.21874183416366577,
0.42722785472869873,
-0.0038172975182533264,
-0.2817586064338684,
-0.0770258828997612,
0.14313828945159912,
-0.5567363500595093,
-0.2222786545753479,
-0.34954512119293213,
-0.5745515823364258,
0.3566911816596985,
-0.10991133749485016,
0.12061930447... | |
<m:errorlist />
</m:errors>
<m:warnings>
<m:warningcount>0</m:warningcount>
<m:warninglist />
</m:warnings>
</m:markupvalidationresponse>
</env:Body>
</env:Envelope>
_Uri = doc.Root.<env:Body>.<m:markupvalidationresponse>.<m:uri>.Value
... | [
-0.11647658795118332,
0.26402774453163147,
0.30727648735046387,
-0.3547202944755554,
-0.03460788354277611,
0.10403234511613846,
0.17259977757930756,
-0.5416109561920166,
-0.3062703609466553,
-0.6177119612693787,
-0.19497299194335938,
0.34786880016326904,
-0.23372644186019897,
-0.0657213777... | |
that the following code assumes you have a class named W3CError
_errorList = (From er in doc.Root...<m:errors> _
Select New W3CError With {.Line = CInt(er.<m:line>.Value), .Col = CInt(er.<m:col>.Value), .Message = er.<m:message>.Value, .MessageId = er.<m:messageId>.Value, .Explanation = er.<m:explanation>.... | [
-0.13586686551570892,
-0.19836291670799255,
0.5445367693901062,
-0.09104761481285095,
0.04303464666008949,
0.12522029876708984,
0.5420580506324768,
-0.3151004910469055,
-0.18011420965194702,
-0.4722858965396881,
-0.18503248691558838,
0.6283830404281616,
-0.2872493863105774,
0.0890235304832... | |
Is there a way to get PHPUnit auto-completion to work in Eclipse PDT without including the libraries in your project?
Have you tried putting the PHPUnit code on your project's include path? | [
0.588365375995636,
-0.17559070885181427,
-0.14171098172664642,
0.29457175731658936,
-0.07096133381128311,
-0.3411116898059845,
0.21022579073905945,
-0.10767750442028046,
-0.019475072622299194,
-0.5438405275344849,
0.27284523844718933,
0.6978978514671326,
-0.27942782640457153,
-0.4009721279... | |
How is it possible for F# to examine format strings at compile time to determine that x has type int in the following definition?
```
let foo x = sprintf "%d" x`?
```
Is this hard-coded into the language or could somebody write their own "my\_print" function that uses format strings with a different syntax? For ex... | [
0.316884309053421,
0.07824242115020752,
-0.06566930562257767,
-0.15042369067668915,
-0.26573213934898376,
-0.15175186097621918,
0.3032642602920532,
-0.0611262209713459,
0.02069615013897419,
-0.4210910499095917,
0.09717483818531036,
0.5225143432617188,
-0.471429705619812,
-0.339863866567611... | |
((Answer selected - see Edit 5 below.))
I need to write a simple pink-noise generator in C#. The problem is, I've never done any audio work before, so I don't know how to interact with the sound card, etc. I do know that I want to stay away from using DirectX, mostly because I don't want to download a massive SDK just... | [
0.24450482428073883,
0.13165941834449768,
0.12236988544464111,
0.27340805530548096,
-0.23569148778915405,
-0.14151346683502197,
0.1028071790933609,
-0.03866007924079895,
0.042810916900634766,
-0.4871659576892853,
0.2316514551639557,
0.7261621356010437,
-0.2717030346393585,
0.03761212527751... | |
solve the root problem. =)
**Edit 2**: Our firewall blocks streaming audio and video - otherwise I'd just go to [www.simplynoise.com](http://www.simplynoise.com) as suggested in the comments. :(
**Edit 3**: I've got the generation of white-noise down, as well as sending output to the sound card - now all I need to kn... | [
0.4951980710029602,
0.1863999366760254,
0.3951137065887451,
0.06891248375177383,
0.11734873801469803,
-0.18626148998737335,
0.5886849164962769,
-0.09112077951431274,
-0.298389732837677,
-0.41338714957237244,
-0.11451487243175507,
0.3708151578903198,
-0.32380759716033936,
0.1993065923452377... | |
in the first place...
**Edit 4**: ... I'm surprised so many people have jumped in to very explicitly *not* answer a question. I probably would have gotten a better response if I lied about why I need pink noise... This question is more about how to generate and stream data to the sound card than it is about what sort ... | [
0.6952661275863647,
0.3178504705429077,
0.11806024610996246,
-0.05761865898966789,
-0.04729069024324417,
0.2206317037343979,
-0.05679774656891823,
-0.5767664313316345,
-0.15178970992565155,
-0.4486549496650696,
0.09852886199951172,
0.698915421962738,
-0.08248913288116455,
0.138718158006668... | |
white noise (which is easily generated via the random number generator) into pink noise. In addition to this, I used [Ianier Munoz's CodeProject entry "Programming Audio Effects in C#"](http://www.codeproject.com/KB/audio-video/cswavplayfx.aspx) to learn how to generate, modify, and output sound data to the sound card.... | [
0.4641057848930359,
-0.1793212890625,
-0.03403043374419212,
0.07706175744533539,
-0.3570025861263275,
-0.12298909574747086,
-0.05597955733537674,
-0.3128032982349396,
-0.15887486934661865,
-0.5644802451133728,
0.21810922026634216,
0.622877299785614,
-0.2192782759666443,
0.09908054023981094... | |
I'm working on a web site which contains sections that need to be secured by SSL.
I have the site configured so that it runs fine when it's always in SSL, I see the SSL padlock in IE7/IE8/FireFox/Safari/Chrome
To implement the SSL switching, I created a class that implemented IHTTPModule and wired up HTTPApplication... | [
0.3956882655620575,
-0.08251029253005981,
0.5793237090110779,
0.030594825744628906,
-0.03974875062704086,
-0.34588414430618286,
0.2811300754547119,
-0.32920894026756287,
-0.08881354331970215,
-0.7539181113243103,
-0.08842460811138153,
0.47297176718711853,
-0.3295959234237671,
0.08422466367... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.