text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
I am writing a deployment script using MSBuild. I want to clean my web directories prior to copying all the new files in. My current "Clean" target looks like this:
```
<Target Name="Clean">
<Exec Command="del %(DeploymentSet.LocalWebRoot)\* /Q /F /S" IgnoreExitCode="true" />
</Target>
```
This takes an consi... | [
0.4652019739151001,
0.12827779352664948,
0.461965948343277,
-0.3422490358352661,
-0.09787146747112274,
-0.23940260708332062,
0.492719441652298,
-0.2818642854690552,
-0.23973211646080017,
-1.023069977760315,
-0.17151318490505219,
0.6958308815956116,
-0.13324490189552307,
0.17158202826976776... | |
target. For example:
```
<Target Name="Clean">
<Exec Command="rmdir %(DeploymentSet.LocalWebRoot)\subdir1 /Q /S" IgnoreExitCode="true" />
<Exec Command="rmdir %(DeploymentSet.LocalWebRoot)\subdir2 /Q /S" IgnoreExitCode="true" />
...
<Exec Command="rmdir %(DeploymentSet.LocalWebRoot)\subdirN /Q /S" Ign... | [
0.21777400374412537,
-0.05285338684916496,
0.3478044271469116,
-0.17899921536445618,
-0.024370795115828514,
-0.01157247181981802,
0.22344481945037842,
-0.36694592237472534,
-0.049640581011772156,
-0.7724133729934692,
-0.28275054693222046,
0.7135144472122192,
-0.19456329941749573,
-0.120987... | |
I wrote a DLL in .NET and I want to access it in VBScript. I don't want to add it to the assembly directory.
Is there a way to point too the DLL and create an instance of it?
You can register that .NET dll with [regasm utility](http://msdn.microsoft.com/en-us/library/tzat5yw6.aspx) by specifying `/codebase` parameter... | [
0.4406948387622833,
0.15479601919651031,
0.25408104062080383,
-0.27662545442581177,
-0.029523774981498718,
-0.2652125656604767,
0.35054850578308105,
0.05802096426486969,
-0.1926492303609848,
-0.8318026661872864,
-0.012248044833540916,
0.41180869936943054,
-0.4120916724205017,
0.38827884197... | |
Check out this test:
```
[TestFixture]
public class Quick_test
{
[Test]
public void Test()
{
Assert.AreEqual(0, GetByYield().Count());
Assert.AreEqual(0, GetByEnumerable().Count());
}
private IEnumerable<string> GetByYield()
{
yield break;
}
private IEnumerable<string> GetBy... | [
0.33104535937309265,
-0.09346452355384827,
-0.03887436166405678,
-0.1974111646413803,
0.009045581333339214,
-0.1976591795682907,
0.6587686538696289,
-0.5698117017745972,
0.28482863306999207,
-0.6262729167938232,
-0.15120302140712738,
0.5947719812393188,
-0.3151574432849884,
0.0352890081703... | |
to wondering:
* Which is more visually appealing to other developers?
* Are there any hidden gotchas that would cause us to prefer one over the other?
Thanks!
I would prefer any method that delivers the clearest meaning to the developer. Personally, I don't even know what the ***yield break;*** line is does, so retur... | [
0.42029017210006714,
0.1554097682237625,
0.18613819777965546,
0.15585780143737793,
-0.3700045645236969,
-0.014307865872979164,
0.41062626242637634,
0.39032432436943054,
-0.003403223818168044,
-0.5106997489929199,
-0.22581009566783905,
0.4425221085548401,
0.03131286799907684,
0.004628072027... | |
In jQuery, is there a function/plugin which I can use to match a given regular expression in a string?
For example, in an email input box, I get an email address, and want to see if it is in the correct format. What jQuery function should I use to see if my validating regular expression matches the input?
I've google... | [
0.29886671900749207,
-0.16337618231773376,
0.15623028576374054,
-0.09651592373847961,
-0.31506651639938354,
-0.30937284231185913,
-0.24157226085662842,
0.20501504838466644,
-0.2979176938533783,
-0.37345090508461,
0.3811526596546173,
0.5496309995651245,
-0.2530191242694855,
-0.2865042090415... | |
I have a case where if a SharePoint site owner decides to break permissions inheritance and directly manage site membership, I'd also like to correspondingly modify view permissions on items in a specific list in the top-level site.
How can I best catch those changes so I know when to apply the appropriate changes to... | [
0.5973436236381531,
0.14334069192409515,
0.14217928051948547,
0.2493465393781662,
0.13280566036701202,
-0.4974592924118042,
0.2299996316432953,
0.14488857984542847,
-0.4286777377128601,
-0.5432271361351013,
0.0649464949965477,
0.5038585662841797,
-0.13858038187026978,
0.41039735078811646,
... | |
see if inheritance is disabled. I had a similar problem and used powershell scripting to create a [report on site security](http://www.mobiusdevelopment.com/dev/Download.asp?ArticleID=7156531513977360024). If you haven't used Powershell before, don't be intimidated. The syntax is VERY similar to C#. | [
0.12788906693458557,
-0.2438933551311493,
-0.1538410186767578,
0.11982890218496323,
-0.17732764780521393,
-0.5065628886222839,
0.2760213613510132,
0.10356131941080093,
-0.20277418196201324,
-0.49132055044174194,
0.0027871490456163883,
0.7767810821533203,
-0.31307142972946167,
-0.1649197041... | |
Hey printing junkies need some pointers to send me in the right direction for this development.
I am developing an epos system for a local shop which we are later going to tie into an ecommerce site.
The front end of the epos system is going to be WinForms so we can handle USB devices easily and we are going to use ... | [
1.02988862991333,
0.3174504339694977,
0.33354300260543823,
0.21727043390274048,
0.13854961097240448,
0.0702042505145073,
-0.3294323682785034,
0.11744172871112823,
-0.3776337802410126,
-0.629325270652771,
0.45418819785118103,
0.4531419277191162,
-0.12865616381168365,
-0.21962542831897736,
... | |
allow us to print directly to a connected printer from the server (IIS) instance of .net from the webforms.
The best way to do this (unfortunately) is to periodically query all of the sites and check to see if inheritance is disabled. I had a similar problem and used powershell scripting to create a [report on site sec... | [
0.35771530866622925,
-0.13399773836135864,
0.15227439999580383,
0.19420219957828522,
-0.09188789874315262,
-0.49201345443725586,
0.24120613932609558,
0.14431023597717285,
-0.21567201614379883,
-0.7443202137947083,
0.042468585073947906,
0.7130195498466492,
-0.3214712142944336,
-0.0978045016... | |
I have a (varchar) field Foo which can only be specified if (bit) Bar is *not* true. I would like the textbox in which Foo is displayed to be *disabled* when Bar is true -- essentially, `FooBox.Enabled = !isBar`. I'm trying to do something like
```
FooBox.DataBindings.Add(new Binding("Enabled", source, "!isBar"));
``... | [
0.3592407703399658,
0.40687236189842224,
0.2996567189693451,
-0.42017629742622375,
-0.19603925943374634,
-0.06159129738807678,
0.48827800154685974,
-0.3291581869125366,
-0.06756222248077393,
-0.30530309677124023,
0.021871164441108704,
0.7344276905059814,
-0.5400820374488831,
0.173039197921... | |
source class to also have a NotBar property and bind to that
b) Make a dumb wrapper class around source that has a NotBar property and bind to that. | [
-0.039859626442193985,
-0.09058952331542969,
-0.32971468567848206,
0.0997566431760788,
-0.01732138730585575,
-0.26966729760169983,
0.19573314487934113,
0.1430332511663437,
0.3532699942588806,
-0.41274207830429077,
-0.2668180763721466,
0.4908897280693054,
-0.4846131503582001,
0.030300065875... | |
I have been using LINQ to SQL for a while, and there is one thing that has always bothered me. Whenever I modify the schema of a table, in order to refresh it in the designer, I have to delete it and then add it back. That's fine, but this means I have to actually *find* the table in the designer. I have about 100+ tab... | [
0.3420868217945099,
0.14738255739212036,
0.3459925651550293,
0.03705219551920891,
0.17672739923000336,
-0.09995947033166885,
0.000929192581679672,
0.2157992273569107,
-0.4993668496608734,
-0.641741156578064,
0.470698744058609,
0.11651525646448135,
-0.04399770870804787,
0.3282436728477478,
... | |
option for refreshing tables that I am unaware of?
Some people use [SqlMetal](http://msdn.microsoft.com/en-us/library/bb386987.aspx "Like to MSDN's explanation of SqlMetal") to 'refresh/update' their Linq2Sql designer. The designer does not have support for refreshing the schema, when the DB changes. You have to manual... | [
0.1072092056274414,
-0.2567248046398163,
0.4948485195636749,
0.2970485985279083,
-0.08707960695028305,
-0.15594735741615295,
0.37950399518013,
0.12907706201076508,
-0.3109942674636841,
-0.6439111232757568,
-0.02553883194923401,
0.6844813227653503,
-0.004326323047280312,
-0.1645013988018036... | |
Is it possible to run a batch file as a menu item in studio 2008?
Yes, go to **Tools | External Tools** in the menus and add your batch file as the Command. You can also pass in any arguments that you want such as the build target, project directories, etc.
Once you do this, your batch file will appear as one of the i... | [
0.18992815911769867,
0.10632126033306122,
0.1335703730583191,
-0.22606591880321503,
-0.1811099797487259,
0.20879805088043213,
0.0032810333650559187,
0.0008038985542953014,
-0.06363134831190109,
-0.4005844295024872,
0.05016379430890083,
0.7099059820175171,
-0.24509941041469574,
0.0714110508... | |
will then want to change it to an icon and select an image for it.
The tools are numbered 1 based in the order they appear in the menu. | [
0.16625872254371643,
0.058729127049446106,
0.6327095627784729,
0.3316599130630493,
0.35886359214782715,
0.3891848921775818,
0.048111576586961746,
-0.06648407876491547,
0.03510439395904541,
-0.8049503564834595,
-0.44163087010383606,
0.5549644827842712,
0.06569351255893707,
-0.15993927419185... | |
I have a control that is created like so:
```
public partial class MYControl : MyControlBase
{
public string InnerText {
get { return textBox1.Text; }
set { textBox1.Text = value; }
}
public MYControl()
{
InitializeComponent();
}
}
partial class MYControl
{
/// <summar... | [
-0.08335452526807785,
-0.2514401972293854,
0.43900349736213684,
0.05245533213019371,
0.148478701710701,
0.1345876157283783,
0.3381901979446411,
-0.16356158256530762,
0.28489354252815247,
-0.7432020902633667,
-0.3250489830970764,
0.3100302815437317,
-0.4565123915672302,
0.26644206047058105,... | |
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.D... | [
0.6381165385246277,
-0.055915895849466324,
0.08244705200195312,
-0.2072223722934723,
0.28887373208999634,
0.0726720467209816,
0.23199144005775452,
-0.7810830473899841,
-0.42344072461128235,
-0.3735930621623993,
-0.363948255777359,
0.3811609148979187,
-0.40809208154678345,
0.400451779365539... | |
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.textBox1 = new System.Windows.Forms.TextBox();
this.l... | [
0.13847503066062927,
-0.6531935930252075,
0.9029658436775208,
-0.04663912206888199,
0.1637694090604782,
-0.2322624772787094,
0.17595426738262177,
-0.450137197971344,
-0.30364879965782166,
-0.4196130633354187,
-0.5428528189659119,
0.3448011875152588,
-0.44023218750953674,
0.4402597844600677... | |
//
// textBox1
//
this.textBox1.Location = new System.Drawing.Point(28, 61);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(100, 20);
this.textBox1.TabIndex = 0;
//
// listBox1
// | [
-0.0921826884150505,
-0.26453426480293274,
0.5684008002281189,
-0.10877333581447601,
-0.04385989159345627,
0.6309290528297424,
0.09389990568161011,
-0.26817503571510315,
-0.5011501908302307,
-0.583178699016571,
-0.14198876917362213,
0.09981577098369598,
-0.4530697762966156,
0.0850172191858... | |
this.listBox1.FormattingEnabled = true;
this.listBox1.Location = new System.Drawing.Point(7, 106);
this.listBox1.Name = "listBox1";
this.listBox1.Size = new System.Drawing.Size(120, 95);
this.listBox1.TabIndex = 1;
//
// label1
//
this.label1.AutoSize = ... | [
-0.20336873829364777,
-0.28832656145095825,
0.6079041361808777,
-0.17931559681892395,
-0.013807342387735844,
0.38278311491012573,
0.142438605427742,
-0.4638354182243347,
-0.5274621844291687,
-0.5817201137542725,
-0.3063589930534363,
0.10939017683267593,
-0.48679879307746887,
0.221029981970... | |
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(35, 13);
this.label1.TabIndex = 2;
this.label1.Text = "label1";
//
// MYControl
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.F... | [
-0.19149784743785858,
-0.18634743988513947,
0.626228928565979,
-0.08192828297615051,
0.22124001383781433,
0.1687057614326477,
0.18677499890327454,
-0.5175971984863281,
-0.4184360206127167,
-0.6057361364364624,
-0.3107679784297943,
0.29081785678863525,
-0.6415901780128479,
0.000837383326143... | |
this.Controls.Add(this.listBox1);
this.Controls.Add(this.textBox1);
this.Name = "MYControl";
this.Size = new System.Drawing.Size(135, 214);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Label label1;
}
```
MyControlBase... | [
-0.135324165225029,
-0.2749641537666321,
0.8601377606391907,
-0.07634411752223969,
0.4302777647972107,
-0.13952583074569702,
0.2645912170410156,
-0.23099954426288605,
-0.1465294063091278,
-0.6841221451759338,
-0.26724773645401,
0.4498387277126312,
-0.5555672645568848,
0.06840837746858597,
... | |
>
> The variable 'textBox1' is either
> undeclared or was never assigned.
This is obviously wrong as they are defined in MyControlBase with public access. Is there any way to massage Form Designer into allowing me to visually edit my control?
I think you'll have to use **base.listBox1** and **base.textBox1**. They ar... | [
0.2262536585330963,
0.006090045906603336,
0.4594758152961731,
0.11431445926427841,
-0.0771428570151329,
-0.0951390191912651,
0.2230859249830246,
-0.0902724340558052,
0.16742150485515594,
-0.6593987345695496,
-0.05693753808736801,
0.335879921913147,
-0.23981383442878723,
0.24649496376514435... | |
Python 2.6 was basically a stepping stone to make converting to Python 3 easier. A lot of the features destined for Python 3 were implemented in 2.6 if they didn't break backward compatibility with syntax and the class libs.
Why weren't set literals (`{1, 2, 3}`), set comprehensions (`{v for v in l}`), or dict compreh... | [
-0.04997340217232704,
-0.04653267562389374,
0.10261591523885727,
-0.06946045905351639,
-0.39630094170570374,
-0.21618135273456573,
0.6147546768188477,
0.06318653374910355,
-0.010806242935359478,
-0.44764620065689087,
-0.03594977781176567,
0.76922607421875,
-0.6414470076560974,
-0.473560273... | |
just a feature that didn't make the cut?
It wasn't done because nobody took the time to do it. There are bugs opened for months, and no one commented on them:
* <http://bugs.python.org/issue2333>
* <http://bugs.python.org/issue2334>
* <http://bugs.python.org/issue2335>
So it wasn't important enough for anybody to car... | [
0.6131599545478821,
-0.03359246626496315,
-0.06389211118221283,
0.09056109189987183,
0.037903763353824615,
-0.06990382820367813,
0.3217763304710388,
0.3522198498249054,
-0.6733905076980591,
-0.07598655670881271,
0.19479046761989594,
0.2503817677497864,
-0.44416239857673645,
0.0027015560772... | |
I've got a couple django models that look like this:
```
from django.contrib.sites.models import Site
class Photo(models.Model):
title = models.CharField(max_length=100)
site = models.ForeignKey(Site)
file = models.ImageField(upload_to=get_site_profile_path)
def __unicode__(self):
return sel... | [
0.1075773537158966,
0.38351893424987793,
0.48609885573387146,
-0.37689581513404846,
-0.07468640804290771,
0.01960833929479122,
0.014770805835723877,
-0.22247762978076935,
-0.37871724367141724,
-0.6094781756401062,
0.20213617384433746,
0.6559566855430603,
-0.1910392791032791,
-0.04694948717... | |
the `limit_choices_to` working on the Gallery model. I only want the Admin to show choices for photos that belong to the same site as this gallery. Is this possible?
I would delete `site` field on my `Photo` model and add a `ForeignKey` to `Gallery`. I would remove `limit_choices_to` from `photos` fields on `Gallery` m... | [
0.21298304200172424,
0.18913497030735016,
0.410425066947937,
0.022445466369390488,
0.21754629909992218,
-0.13480013608932495,
-0.0011323371436446905,
-0.30611148476600647,
-0.1404982954263687,
-0.6090060472488403,
-0.05456159636378288,
0.7314892411231995,
-0.3479019105434418,
0.14767353236... | |
def __unicode__(self):
return self.title
class Gallery(models.Model):
name = models.CharField(max_length=40)
site = models.ForeignKey(Site)
def __unicode__(self):
return self.name
```
Once you set the `site` on a gallery all its photos will inherit this property. And the site will be... | [
0.02300671860575676,
0.19856935739517212,
0.21519893407821655,
-0.16126085817813873,
-0.03280968219041824,
-0.03778256103396416,
0.1560734659433365,
-0.6031915545463562,
-0.3234751522541046,
-0.5008407831192017,
-0.27842092514038086,
0.5448400378227234,
-0.296603798866272,
0.01181132625788... | |
sites. | [
0.44200456142425537,
0.043382465839385986,
-0.004347633570432663,
0.1439952701330185,
0.318123996257782,
-0.42465001344680786,
0.17381325364112854,
0.08539880067110062,
-0.2818939685821533,
-0.8881397247314453,
-0.26148027181625366,
0.11347994953393936,
-0.0901327058672905,
0.4730567932128... | |
I am working on a plugin system that loads .dll's contained in a specified folder. I am then using reflection to load the assemblies, iterate through the types they contain and identify any that implement my `IPlugin` interface.
I am checking this with code similar to the following:
```
foreach(Type t in myTypes )
... | [
0.5475213527679443,
0.23076751828193665,
0.30700162053108215,
-0.254827618598938,
-0.028861068189144135,
-0.03547798469662666,
0.2970566153526306,
-0.19516532123088837,
0.003179034451022744,
-0.701134204864502,
0.13220645487308502,
0.4482799470424652,
-0.3484336733818054,
0.35431969165802,... | |
pass, and it works fine, but for some reason it isn't working with the types that are returned from the loaded assembly. To make things stranger, the code works fine on my co-worker's machine but not on mine.
Does anyone know of anything that might cause this sort of behavior?
Thanks
That typically happens when there... | [
0.4929709732532501,
0.0698200985789299,
0.46945634484291077,
0.04494301229715347,
0.27541929483413696,
0.005453182850033045,
0.4699576199054718,
-0.371038019657135,
-0.016132233664393425,
-0.7282044291496277,
-0.04584198445081711,
0.4082081615924835,
-0.37056222558021545,
-0.04452164098620... | |
Console.WriteLine (type.Module.FullyQualifiedName)
}
```
To see where the mismatch is. | [
-0.1948632448911667,
0.11387207359075546,
0.36980554461479187,
-0.12351071089506149,
0.41607868671417236,
-0.45480605959892273,
0.19929277896881104,
-0.0404142327606678,
0.38191014528274536,
-0.643669605255127,
-0.03969784080982208,
0.7723696231842041,
-0.22828109562397003,
0.0224208328872... | |
Let's say that I'm considering designing a WCF service whose primary purpose is to provide broad services that can be used by three disparate applications: a public-facing Web site, an internal Windows Forms application, and a wireless mobile device. The purpose of the service is twofold: (1) to consolidate code relate... | [
0.24755164980888367,
0.10382252931594849,
0.4908316433429718,
0.056346382945775986,
0.15485872328281403,
-0.028679916635155678,
0.017137818038463593,
-0.23472927510738373,
-0.2015322595834732,
-0.5138393044471741,
-0.28084591031074524,
0.20893257856369019,
-0.2046080380678177,
0.4416088759... | |
same database. Instead of all three applications talking to the database, they would talk to the WCF service, enabling new features from some clients (the mobile picker can't currently trigger processes to send e-mail, obviously) and centralizing notification systems (instead of a scheduled task polling the database ev... | [
0.3262482285499573,
0.05125943943858147,
0.3677428066730499,
0.10051296651363373,
-0.0035525825805962086,
-0.23843568563461304,
0.19968242943286896,
-0.42984306812286377,
-0.11822185665369034,
-0.7873712182044983,
0.08908456563949585,
0.6326271295547485,
-0.3972412645816803,
0.086758732795... | |
principals; employees are stored in Active Directory, and upon application startup, they can login as the current Windows user (in which case no password is required) or they can supply their domain name and password. The mobile client doesn't have any concept of a user; its connection to the database is a hardcoded st... | [
0.18202848732471466,
-0.08098463714122772,
0.6823879480361938,
0.4489862024784088,
0.26729583740234375,
-0.4036974310874939,
0.3217095136642456,
-0.010485724546015263,
-0.23566773533821106,
-0.3260939419269562,
-0.08234009891748428,
0.5097902417182922,
0.0713934376835823,
0.333146840333938... | |
initiated once and can hang around in memory, so I only need the client credentials once (and can prompt for them again if the proxy ever faults). The mobile client can just be special cased and use an X509 certificate for authentication against the WCF service. But what do I do about the Web site?
In the Web site's c... | [
0.2842754125595093,
0.02913428097963333,
0.3583710491657257,
-0.011931455694139004,
-0.09419382363557816,
-0.28572505712509155,
0.28982022404670715,
-0.0805097222328186,
-0.34048107266426086,
-0.35047468543052673,
-0.1545669436454773,
0.3611568212509155,
0.00887579470872879,
0.123408347368... | |
password each time. Storing this pair of information pretty much anywhere--the session, an encrypted cookie, the moon--seems like a bad idea.
* I would have to hit the users table in the database for each request. Ouch.
The only solution that I can come up with is to treat the Web site as a trusted subsystem. The WCF ... | [
0.42467641830444336,
0.2906677722930908,
0.4324459135532379,
0.09281159192323685,
0.015061958692967892,
-0.15074440836906433,
0.5272405743598938,
-0.044487033039331436,
-0.2369495928287506,
-0.4585890769958496,
-0.14583832025527954,
0.6257814168930054,
-0.013763148337602615,
0.097804874181... | |
logged in as a customer." Then somehow a custom IIdentity object and IPrincipal could be constructed on the service with that claim, the WCF service being confident that the Web site has properly authenticated the customer (it will know that the claim hasn't been tampered with, at least, because it'll know the Web site... | [
0.39763545989990234,
-0.16231922805309296,
0.8551155924797058,
0.10380842536687851,
0.2902222275733948,
-0.09257402271032333,
0.1879027783870697,
0.00746535137295723,
-0.43136802315711975,
-0.24919040501117706,
-0.03479159250855446,
0.19596214592456818,
-0.07053853571414948,
0.228433415293... | |
both of them useful for logging and auditing).
In other words, two different endpoints would exist for each service: one that accepted well-known client X509 certificates (for the mobile devices and the Web site), and one that accept Windows users (for the employees).
Sorry this is so long. So the question is: Does a... | [
0.29855167865753174,
0.20312635600566864,
0.4353938698768616,
0.21820443868637085,
0.033302657306194305,
-0.11548437178134918,
0.1600254774093628,
-0.12225538492202759,
-0.1326199173927307,
-0.37328997254371643,
0.14278538525104523,
0.3384893834590912,
-0.07352704554796219,
0.0881070271134... | |
the WCF service and the public-facing Web site (the Web site is a consumer/client of the service). A few test certs generated with `makecert`, plop them into the `Personal`, `Trusted People`, and `Trusted Root Certification Authorities` (because I couldn't be bothered to generate real ones against our domain's certific... | [
0.6289844512939453,
0.18804988265037537,
0.8158271908760071,
-0.11018136888742447,
-0.061198778450489044,
-0.38898965716362,
0.12201236188411713,
-0.4503582715988159,
0.05660424754023552,
-0.5646823644638062,
0.13364610075950623,
0.47285112738609314,
-0.015164749696850777,
0.18494825065135... | |
as an optional `UserNameSecurityToken` in addition to the `X509CertificateSecurityToken` that is actually used to secure the message. If the optional username security token is found, then the WCF service would say "Hey, this trusted subsystem says that this user is properly authenticated, so let me set up a `MyCustomP... | [
0.0536661334335804,
0.1439257264137268,
0.4419841468334198,
0.09348496794700623,
-0.05285574868321419,
-0.11421360075473785,
0.6066973209381104,
-0.12670695781707764,
-0.28945887088775635,
-0.39396700263023376,
0.1776188164949417,
0.4211903214454651,
0.08295194059610367,
-0.113409981131553... | |
do it. (I spent most of my time debugging a problem where I had every single configuration and supporting class correct, and then installed my custom authorizations *after* I started the host, not before, so none of my effort was actually taking effect. Some days I hate computers.) I had a `TrustedSubsystemAuthorizatio... | [
0.3690844476222992,
-0.09899606555700302,
0.03268495574593544,
0.3501335680484772,
-0.012132602743804455,
-0.41877809166908264,
0.3972339332103729,
0.13047654926776886,
-0.2135845124721527,
-0.2530270218849182,
-0.08622871339321136,
0.718753457069397,
-0.2804342210292816,
-0.24304625391960... | |
validation for the other endpoints where X509 certificates aren't being used. It worked, and it was wonderful.
But.
The stab-myself-in-the-eyeballs moment came when I was fiddling with the generated client proxy code that the Web site would use to talk to this service. Specifying the `UserName` on the `ClientCredenti... | [
0.2865149676799774,
0.22968319058418274,
0.5294539928436279,
-0.08077577501535416,
-0.4016243517398834,
-0.23098433017730713,
0.34469592571258545,
-0.3288883566856384,
-0.09103405475616455,
-0.31035304069519043,
0.3503243625164032,
0.47415703535079956,
-0.039205148816108704,
0.077520020306... | |
new proxy and calling a method ten times took about 6 seconds whereas new()ing up a proxy once and calling only the method 10 times cost about 3/5ths of one second. That is just a depressing performance difference.
So I can just implement a pool or a cache for the client proxy, right? Well, no, it's not easily worked ... | [
0.28758904337882996,
-0.0626983791589737,
0.508079469203949,
0.11426657438278198,
-0.06868740171194077,
-0.017198877409100533,
0.17269594967365265,
-0.20727753639221191,
-0.405569851398468,
-0.7993201017379761,
0.35155031085014343,
0.4445320665836334,
-0.0056162187829613686,
0.179817348718... | |
proxy object, this means that I would have to have a unique cached instance for each user currently on the Web site. That's potentially a lot of proxy objects sitting in memory, and pretty @#$@# close to the problem that I was trying to avoid in the first place! And since I have to touch the `Endpoint` property anyway ... | [
0.0014273431152105331,
0.11735740303993225,
0.4599974751472473,
0.014535704627633095,
-0.27719786763191223,
-0.25957363843917847,
0.17213799059391022,
0.18401040136814117,
-0.08947906643152237,
-0.7708984017372131,
0.19612614810466766,
0.37773266434669495,
-0.21814605593681335,
0.260844916... | |
think that I'll end up using for now, is to stick with the X509 certificate security between the client Web site and the WCF service. I'll just send a custom "UserName" SOAP header in my messages, and the WCF service can inspect that SOAP header, determine if it came from a trusted subsystem such as the Web site, and i... | [
0.5266216397285461,
0.0545746348798275,
0.3534165918827057,
0.01255696639418602,
-0.15621617436408997,
-0.12005496770143509,
0.39998960494995117,
0.02065395750105381,
-0.44130799174308777,
-0.5912632942199707,
0.1410413384437561,
0.49296700954437256,
-0.0655493214726448,
-0.081785477697849... | |
comes to custom endpoint behaviors in configuration](http://nayyeri.net/blog/configuration-error-for-custom-behavior-extensions-in-wcf/). By implementing message inspectors on the client side and the service side--one to add the UserName header, and one to read it and install the correct principal--this code is in one ... | [
0.17932376265525818,
-0.1104729101061821,
0.5723947882652283,
-0.029849499464035034,
-0.1426544040441513,
-0.05027196556329727,
0.30344778299331665,
-0.12098640948534012,
-0.22567620873451233,
-0.5295299291610718,
0.04054221883416176,
0.6566979885101318,
-0.3064284026622772,
0.174739748239... | |
proxy caching or a proxy pool is much more trivial.
So that's what I ended up doing. Actual service code in the WCF service can do things like
```
// Scenario 1: X509Cert + custom UserName header yields for a Web site customer ...
Console.WriteLine("{0}", Thread.CurrentPrincipal.Identity.Name); // prints out... | [
-0.003528455039486289,
0.11785481125116348,
0.38634902238845825,
0.02952577918767929,
0.0019276898819953203,
0.01693388819694519,
0.2890072166919708,
-0.320120632648468,
-0.05771177262067795,
-0.5200759172439575,
0.0740746483206749,
0.48812153935432434,
-0.13506996631622314,
0.211825370788... | |
// Scenario 3: Web site doesn't pass in a UserName header ...
Console.WriteLine("{0}", Thread.CurrentPrincipal.Identity.Name); // prints out nothing
Console.WriteLine("{0}", Thread.CurrentPrincipal.IsInRole(MyRoles.Guest)); // prints out "True"
Console.WriteLine("{0}", Thread.CurrentPrincipal.IsInRole(MyRol... | [
-0.12324000149965286,
0.04699693247675896,
0.48204120993614197,
0.04396287351846695,
0.32592231035232544,
-0.2036706954240799,
0.6096336841583252,
-0.02316225692629814,
-0.3844522535800934,
-0.5389030575752258,
-0.15152131021022797,
0.5017698407173157,
-0.10726504027843475,
0.1696628183126... | |
How do I inner join multiple columns from the same tables via Linq?
For example:
I already have this...
```
join c in db.table2 on table2.ID equals table1.ID
```
I need to add this...
```
join d in db.table2 on table2.Country equals table1.Country
```
You can put your query inside a Where clause instead of usin... | [
0.010118133388459682,
0.26598408818244934,
0.5304619073867798,
-0.17530140280723572,
-0.1717982441186905,
0.015008948743343353,
0.23154346644878387,
-0.5273982286453247,
0.0637987032532692,
-0.5547206401824951,
0.16285881400108337,
0.49600133299827576,
-0.3073601722717285,
0.19149698317050... | |
I've just started developing in Silverlight 2 and have not run into any "missing parts" of .Net that I was using in the full version. Have you found anything to be missing from Silverlight 2's version of .Net that (1) you missed, (2) really needed, or (3) had to abandon Silverlight 2 because it was missing?
Do your tab... | [
0.3280278444290161,
0.057235147804021835,
0.22606495022773743,
0.15706421434879303,
0.10868441313505173,
-0.6604617238044739,
0.0009468983043916523,
-0.06369998306035995,
-0.4629727005958557,
-0.4801751673221588,
0.13907764852046967,
0.41593825817108154,
-0.4075191020965576,
0.017903551459... | |
but it's not specifically set up in the database. In those cases, you can just mark the field as primary (in the database) and it should work. Otherwise you may have to add a primary key column just to give LINQ something to use to uniquely identify each row. | [
0.36672243475914,
0.22574980556964874,
0.4616468548774719,
0.12141305953264236,
0.19005335867404938,
-0.1884620189666748,
-0.28574877977371216,
-0.1014300286769867,
-0.2973964810371399,
-0.42113038897514343,
-0.25852668285369873,
0.2266225516796112,
-0.10810089111328125,
0.0410050228238105... | |
How can you [diff](http://en.wikipedia.org/wiki/Diff) two pipelines without using temporary files in Bash? Say you have two command pipelines:
```
foo | bar
baz | quux
```
And you want to find the `diff` in their outputs. One solution would obviously be to:
```
foo | bar > /tmp/a
baz | quux > /tmp/b
diff /tmp/a /tm... | [
0.45908209681510925,
-0.12466356158256531,
0.238743394613266,
-0.004395967349410057,
-0.00009147996752290055,
0.015509488061070442,
0.047334760427474976,
-0.35574090480804443,
-0.3560623526573181,
-0.4473569095134735,
-0.09544377774000168,
0.6517442464828491,
-0.20425498485565186,
-0.01592... | |
at least). Is there some clever trick involving `/dev/fd` to do this without using temporary files?
A one-line with 2 tmp files (not what you want) would be:
```
foo | bar > file1.txt && baz | quux > file2.txt && diff file1.txt file2.txt
```
With **bash**, you might try though:
```
diff <(foo | bar) <(baz | quux)... | [
0.1414923071861267,
-0.14758391678333282,
0.6160855293273926,
-0.10533010959625244,
-0.16471783816814423,
0.19363048672676086,
0.2193453013896942,
-0.10458505153656006,
-0.3638245165348053,
-0.6130110025405884,
-0.29589277505874634,
0.4395216405391693,
-0.46593737602233887,
-0.223549753427... | |
pipe will appear in the filesystem, at least on OSes where bash can implement process substitution by using filenames like `/dev/fd/63` to get a filename that the command can open and read from to actually read from an already-open file descriptor that bash set up before exec'ing the command. (i.e. bash uses `pipe(2)` ... | [
0.031271301209926605,
-0.16233780980110168,
0.2911101281642914,
-0.2050173133611679,
-0.04733511805534363,
0.14224979281425476,
0.08948317170143127,
-0.2693619728088379,
0.10300426930189133,
-0.7424808144569397,
-0.18116645514965057,
0.40961772203445435,
-0.3151840269565582,
0.176051795482... | |
unlike temporary files, and your data wouldn't be written to the filesystem.
You can check how bash implements process substitution with `echo <(true)` to print the filename instead of reading from it. It prints `/dev/fd/63` on a typical Linux system. Or for more details on exactly what system calls bash uses, this co... | [
0.3917405605316162,
0.04101390764117241,
0.3473946452140808,
-0.2124481052160263,
-0.15508243441581726,
0.05567406862974167,
0.2255580574274063,
-0.5773688554763794,
-0.11343757063150406,
-0.6173021197319031,
0.02764883078634739,
0.5580017566680908,
-0.3552184998989105,
0.1446341872215271,... | |
> file1_pipe.txt && baz | quux | diff file1_pipe.txt - && rm file1_pipe.txt
```
---
Note that you can only pipe *one output* to *multiple inputs* with the tee command:
```
ls *.txt | tee /dev/tty txtlist.txt
```
The above command displays the output of ls \*.txt to the terminal and outputs it to the text file tx... | [
0.7106701731681824,
-0.06517093628644943,
0.4425332844257355,
-0.7431405186653137,
0.23961932957172394,
0.4172479808330536,
-0.32432621717453003,
-0.3380240201950073,
-0.08776853233575821,
-1.095888614654541,
0.04820556193590164,
0.502220630645752,
-0.4924694895744324,
-0.19061090052127838... | |
I have a file that has one entry per line. Each line has the following format:
```
"group:permissions:users"
```
Permissions and users could have more than one value separated by comas like this:
```
"grp1:create,delete:yo,el,ella"
```
I want is to return the following:
```
yo
el
ella
```
This is what I ha... | [
-0.016986489295959473,
0.05808880925178528,
0.4982888400554657,
-0.030524075031280518,
-0.06163341924548149,
0.5201765894889832,
0.062184084206819534,
-0.08066423237323761,
-0.07501589506864548,
-0.5033266544342041,
-0.28986161947250366,
0.4092554748058319,
-0.31824052333831787,
0.26466915... | |
users string, separated by commas. Then you can do whatever you want with that string. If you want to literally print each user one per line, you could use tr to replace the commas with newlines:
```
[user@host]$ echo "grp1:create,delete:yo,el,ella" | awk -F ':' '{print $3}' | tr ',' '\n'
yo
el
ella
``` | [
-0.06444001942873001,
-0.07350743561983109,
0.4058932662010193,
0.04111875593662262,
0.2576897144317627,
0.3975874185562134,
0.10014430433511734,
0.34471872448921204,
-0.13640780746936798,
-0.7346867918968201,
-0.16318824887275696,
0.5805480480194092,
-0.5927648544311523,
0.170773759484291... | |
A question mainly for web developers.
When you develop web applications and add an admin area to it, how do you name it? Leaving it 'admin' is a bit out of fashion and insecure.
Mind sharing any other nouns, verbs, adjectives or whatnot, that holds the title of any websites you know/can think of.
If you have real s... | [
0.4456039369106293,
0.23226112127304077,
-0.05309877544641495,
0.28721728920936584,
0.15328900516033173,
-0.10206189006567001,
0.05730773136019707,
-0.06667095422744751,
-0.07805407792329788,
-0.18759028613567352,
-0.20088998973369598,
0.17977309226989746,
-0.01746666245162487,
0.161855772... | |
In windows there is perfmon to monitor various performances aspects (called *counters*) of the system.
**Is there a perfmon-like for Linux?**
especially, in interested in...
* CPU usage (total/per process/in kernel)
* Memory usage (total/per process/in kernel)
...Is it possible to store this information in files fo... | [
-0.2683016061782837,
-0.2644851505756378,
0.3688524067401886,
0.1317838430404663,
-0.4397144317626953,
0.022007973864674568,
0.00572658097371459,
-0.125778466463089,
-0.5986731052398682,
-0.47212716937065125,
-0.03139325603842735,
0.47363340854644775,
-0.21806028485298157,
-0.0142317451536... | |
In Windows for ASP, you can get it perfmon, but...
How to get **"requests per second"** for Apache in Linux?
In realtime, or can you use [mod\_status](http://www.cyberciti.biz/faq/apache-server-status/)?
And apparently, there is a version of [top for apache](http://www.linuxhaxor.net/2008/01/15/real-time-display-of-a... | [
-0.004831349477171898,
-0.34146595001220703,
0.5140538811683655,
0.23708532750606537,
-0.08625595271587372,
-0.42306646704673767,
0.2890774607658386,
0.037626415491104126,
-0.5612284541130066,
-0.3528313636779785,
-0.2980915606021881,
0.5642270445823669,
-0.15911129117012024,
-0.2765415310... | |
What algorithms are good for interactive/realtime graph-drawing for live data and direct-manipulation?
Failing that - what libraries do you use to draw graphs?
Suggestions;
* [Prefuse](http://prefuse.org/) information-visualization toolkit
* any others?
BTW- I mean graphs in the graph-theory sense - points and li... | [
0.3338127136230469,
-0.10561193525791168,
0.01075876597315073,
0.17162784934043884,
-0.3344123661518097,
-0.019399942830204964,
0.04759924113750458,
-0.02587376907467842,
-0.2860674262046814,
-0.9206120371818542,
0.10426068305969238,
0.34510740637779236,
-0.32643935084342957,
-0.4453850686... | |
is that of G. Melançon and I. Herman from their research paper Circular Drawings of Rooted Trees, Reports of the Centre for Mathematics and Computer Sciences, Report Number INS–9817, 1998.
**ForceDirectedLayout.java**: No reference mentioned, but there are lot of comments describing how it works.
**FruchtermanReingo... | [
-0.5772019624710083,
-0.09098639339208603,
0.19304253160953522,
-0.16754308342933655,
-0.31272730231285095,
0.4460906386375427,
0.27228400111198425,
-0.3099486231803894,
-0.7791459560394287,
-0.5666406750679016,
-0.1478843092918396,
-0.3250328600406647,
-0.23248390853405,
-0.01731330342590... | |
method for tidy drawings of trees to support trees with an arbitrary number of children at any given node.
**RadialTreeLayout.java**: The algorithm used is that of Ka-Ping Yee, Danyel Fisher, Rachna Dhamija, and Marti Hearst in their research paper [Animated Exploration of Dynamic Graphs with Radial Layout](http://cit... | [
-0.3858526647090912,
-0.1618339568376541,
0.01781535893678665,
0.2111133635044098,
-0.1170189306139946,
0.5526960492134094,
0.09300258755683899,
-0.2892720401287079,
-0.6719845533370972,
-0.2375430017709732,
0.0993424654006958,
-0.26585134863853455,
-0.24519047141075134,
-0.368201434612274... | |
Joint Eurographics and IEEE TCVG Sumposium on Visualization*, 2000, pp. 33-42. Available online at <http://www.win.tue.nl/~vanwijk/stm.pdf>. For more information on TreeMaps in general, see <http://www.cs.umd.edu/hcil/treemap-history> | [
-0.5225974917411804,
-0.14527525007724762,
0.341137558221817,
0.05421977862715721,
-0.16451340913772583,
0.020453259348869324,
0.018164250999689102,
-0.26647889614105225,
-0.7591996788978577,
-0.27595260739326477,
-0.3636997938156128,
-0.04327383264899254,
-0.06667505204677582,
-0.27080011... | |
I have been assigned a project to develop a set of classes that act as an interface to a storage system. A requirement is that the class support a get method with the following signature:
```
public CustomObject get(String key, Date ifModifiedSince)
```
Basically the method is supposed to return the `CustomObject` a... | [
0.07921035587787628,
-0.04909229651093483,
0.18963560461997986,
0.10444709658622742,
-0.04252864047884941,
-0.23251435160636902,
0.22603128850460052,
-0.0881332978606224,
-0.28397125005722046,
-0.4401937425136566,
-0.0638362467288971,
0.560472309589386,
-0.02352019213140011,
0.411144286394... | |
some applications that use this class will be web services and web applications. Those applications will need to know whether to return a 404 (not found), 304 (not modified), or 200 (OK, here's the data).
The solutions I'm weighing are:
1. Throw a custom exception when the
storage system does not contain the
`key`
2.... | [
-0.025007296353578568,
-0.08812537044286728,
0.3963449001312256,
0.23067417740821838,
0.22338256239891052,
0.015696024522185326,
0.3232046067714691,
-0.3740552067756653,
-0.2093839943408966,
-0.5359728336334229,
0.07082833349704742,
0.6429635286331177,
-0.16060985624790192,
0.1126190572977... | |
when my intent is to indicate that there was **no value**.
Nonetheless, I am leaning towards option 3.
Is there an option I'm not considering? Does anyone have strong feelings about any of these three options?
---
**Answers to this Question, Paraphrased:**
1. Provide a `contains`
method and require caller to call ... | [
0.09564399719238281,
0.010105875320732594,
0.34547632932662964,
0.04105052351951599,
-0.055782172828912735,
0.04228531941771507,
0.5046247243881226,
-0.42206430435180664,
-0.04920986294746399,
-0.6901969313621521,
-0.19626697897911072,
0.4555448293685913,
-0.4339216947555542,
0.03621187061... | |
the ideal solution, but it was one I have already (reluctantly) dismissed. The problem with this approach is that in a majority of the cases in which these classes will be used, the backend storage system will be a third party remote system, like Amazon S3. This means that a `contains` method would require a round trip... | [
0.3066721260547638,
-0.07772371917963028,
-0.0017886258428916335,
0.4461469352245331,
0.1648627072572708,
-0.20767900347709656,
0.41583365201950073,
-0.09749738872051239,
-0.16795524954795837,
-0.7106742262840271,
-0.25215640664100647,
0.1635783165693283,
-0.2589087188243866,
0.33771961927... | |
important element in the question, but I was trying to keep it brief. Obviously it was relevant.)
---
**Conclusion:**
After reading all of the answers I have come to the conclusion that a wrapper is the best approach in this case. Essentially I'll mimic HTTP, with meta data (headers) including a response code, and c... | [
0.2854452133178711,
-0.23283132910728455,
0.18262580037117004,
0.025261737406253815,
-0.3419564962387085,
0.23459689319133759,
0.09367082267999649,
-0.38620734214782715,
0.12881480157375336,
-0.7323079705238342,
-0.19471420347690582,
0.6157462000846863,
-0.3677537739276886,
-0.090252853929... | |
that holds your response code and the data. As a side effect to using generics, you can then reuse this wrapper for whatever pair you actually need.
Also, if the data hasn't expired, you could still return it, but give it a 303 code to let them know that it is unchanged. 4xx series would be paired with `null`. | [
0.5036530494689941,
-0.27219250798225403,
0.23482471704483032,
0.12870262563228607,
-0.24121889472007751,
0.07069505006074905,
0.3246857821941376,
-0.5560856461524963,
0.0010545572731643915,
-0.31220701336860657,
0.022798264399170876,
0.4206101596355438,
-0.4772886037826538,
0.250290274620... | |
So I have an SQL dump file that needs to be loaded using mysql\_query(). Unfortunately, it's not possible to execute multiple queries with it.
-> It cannot be assumed that the **mysql command-line client** (mysql --help) is installed -- for loading the SQL file directly
-> It cannot be assumed that the **mysqli** ext... | [
0.37871915102005005,
0.25034213066101074,
0.40392810106277466,
-0.008015168830752373,
0.048345327377319336,
-0.19242529571056366,
0.2647274434566498,
-0.3564739525318146,
-0.05763495713472366,
-0.4183831214904785,
-0.30942216515541077,
0.6930831670761108,
-0.3785836100578308,
0.19307443499... | |
as $key => $val) {
mysql_query($val);
}
```
What's the best way to load the SQL without modifying the dump file?
You have more problem cases than just semicolons within strings.
* Script [builtin](http://dev.mysql.com/doc/refman/5.1/en/mysql-commands.html) commands that cannot be executed by `mysql_query()`, li... | [
0.28563302755355835,
0.07886161655187607,
0.37828004360198975,
0.022765757516026497,
-0.06510810554027557,
-0.10436253249645233,
0.3670564293861389,
-0.21541786193847656,
-0.1741430014371872,
-0.4585324227809906,
-0.3369310796260834,
0.8126641511917114,
-0.14934654533863068,
0.140547364950... | |
large amount of PHP code to parse the script and execute statements appropriately.
You may be able to find such code inside the [phpMyAdmin](http://www.phpmyadmin.net/home_page/index.php) product. However, that product is licensed under the GPL, so if you use any of the code, you must also license your own project und... | [
0.2012447863817215,
0.29448312520980835,
0.24092039465904236,
0.1519731730222702,
-0.19729821383953094,
-0.14090821146965027,
0.2699301242828369,
-0.414532333612442,
-0.29075106978416443,
-0.2479519546031952,
0.0250263549387455,
0.5356656312942505,
-0.06938041001558304,
0.16938111186027527... | |
When designing a new system or getting your head around someone else's code, what are some tell tale signs that something has gone wrong in the design phase? Are there clues to look for on class diagrams and inheritance hierarchies or even in the code itself that just scream for a design overhaul, particularly early in... | [
1.0546265840530396,
0.43045589327812195,
-0.0455041229724884,
-0.01248521450906992,
-0.07904113829135895,
-0.14402686059474945,
0.7262841463088989,
0.1789904683828354,
-0.1373683363199234,
-0.5142728686332703,
-0.032350942492485046,
0.4124175012111664,
-0.1430528461933136,
0.00917037297040... | |
few extremely long methods (sign of an object wrapper around a procedure)
* Repeated use of switch/case statements on the same enumerated member (sign of sub-classes needing extraction)
* Lots of member variables that are used for processing, not to capture state (might indicate need to extract a method object)
* A cla... | [
0.2315748780965805,
0.032524753361940384,
-0.18153102695941925,
0.3005889654159546,
-0.07162997126579285,
-0.34301990270614624,
0.803851842880249,
-0.12935622036457062,
-0.4265027642250061,
-0.4339582324028015,
-0.13834120333194733,
0.3383353352546692,
0.03416389971971512,
0.24105314910411... | |
elsewhere in the same project)
* Poor spelling (anywhere) and grammar (in comments), or comments that are simply misleading | [
0.22507686913013458,
0.5557528138160706,
-0.16842950880527496,
-0.069982148706913,
-0.18676163256168365,
-0.018718544393777847,
0.7818456292152405,
0.5343591570854187,
-0.16064077615737915,
-0.8095036149024963,
-0.2746659815311432,
0.05387648940086365,
0.07169969379901886,
0.11073512583971... | |
I am working on a rails application (I have some experience with rails). But, this time I am using RESTful to build it. I am wondering how do I validate my models in a RESTful fashion? What I mean by that is when a user enters data into a form, but the model validations prevent the model from being created what is a RE... | [
0.42073291540145874,
0.020197734236717224,
-0.06076950579881668,
0.3007247745990753,
-0.08491665124893188,
-0.2512255907058716,
0.30379220843315125,
0.021521981805562973,
-0.0964929386973381,
-0.5526881217956543,
0.24327611923217773,
0.41050031781196594,
-0.04488734155893326,
0.05691724270... | |
errored out. If you are use to earlier versions of Rails just make sure you are using the form\_for helper rather then the start\_form\_tag from early. Your controller code will look pretty similar to how you might be used to... for example (a Customer model):
```
def create
@customer = Customer.new(params[:customer... | [
-0.15039421617984772,
-0.21135729551315308,
0.40683671832084656,
0.09320465475320816,
-0.028797607868909836,
0.030061587691307068,
0.1988382637500763,
-0.20421981811523438,
-0.4289827048778534,
-0.5325706601142883,
-0.02175445482134819,
0.6098349690437317,
-0.38226500153541565,
0.146417602... | |
:action. | [
0.1502830684185028,
-0.445303350687027,
0.07868751138448715,
0.09643928706645966,
-0.35021063685417175,
0.18465960025787354,
0.365286648273468,
-0.3093706965446472,
-0.42118731141090393,
-0.18035076558589935,
-0.558775007724762,
0.40536072850227356,
-0.23166121542453766,
-0.355891704559326... | |
We were having a debate if enums should have uninitialized values. For example. We have
```
public enum TimeOfDayType
{
Morning
Afternoon
Evening
}
```
or
```
public enum TimeOfDayType
{
None
Morning
Afternoon
Evening
}
```
I think that there shouldn't be any none but then you have to defau... | [
0.013816740363836288,
-0.15796121954917908,
-0.059122614562511444,
0.0181480310857296,
-0.056456390768289566,
0.11048277467489243,
0.15330904722213745,
0.013127816841006279,
-0.15401583909988403,
-0.5966957211494446,
-0.09344364702701569,
0.3183598816394806,
-0.17277298867702484,
0.3677715... | |
of an enum. Say we have
```
enum Color { Red, Blue }
```
And let's say you have a function:
```
void Draw(Color c);
```
That function says that it **requires** a valid `Color`. However, we could also have this function:
```
void Draw(Color? c);
```
That says that the function can handle not being passed a colo... | [
0.3492506146430969,
0.08768678456544876,
0.1503310650587082,
0.013990339823067188,
0.23365668952465057,
-0.09060922265052795,
0.05810639262199402,
-0.0704389363527298,
-0.15596483647823334,
-0.5722593069076538,
-0.48160508275032043,
0.34407511353492737,
-0.5753951668739319,
0.3929792642593... | |
I have some slow internet task to save and load file, I'd like to do those slow tasks in some background thread. I am wondering whether that's doable, and if it is, any sample code?
Then after it is finished, I'd like it to notice back to the main thread, so that I could update the UI.
Ultimately the device you are ru... | [
0.34569668769836426,
0.11810280382633209,
0.19158627092838287,
0.22085583209991455,
0.11978966742753983,
-0.1302500218153,
0.4324183464050293,
0.2598373591899872,
-0.4310711920261383,
-0.8053270578384399,
-0.04563591256737709,
0.4673364460468292,
-0.12354424595832825,
0.2881052494049072,
... | |
cancel and handle error messages. While it isn't technically threaded in the way you probably think you want it to be, it is well integrated with the event loop and is non-blocking. If that is still not enough, I would suggest looking at NSOperation and NSOperationQueue. You can fire off an NSOperation sub-class object... | [
0.2736642360687256,
-0.3194666802883148,
-0.09906701743602753,
0.29824334383010864,
0.05797494575381279,
-0.3181060552597046,
0.29780176281929016,
0.09599955379962921,
-0.3256165087223053,
-0.30449801683425903,
-0.34228387475013733,
0.6948235034942627,
-0.2967260479927063,
0.04522955417633... | |
Below is the command I tried executing, without success:
```
exec('ln -s ' . PLUGIN_DIR . '/.htaccess ' . ABSPATH . '/.htaccess');
```
When you add a die() at the end, it catches that there's an error:
```
exec('ln -s ' . PLUGIN_DIR . '/.htaccess ' . ABSPATH . '/.htaccess') or die('what?!');
```
For the above exe... | [
0.13811931014060974,
0.058372750878334045,
0.4843655526638031,
-0.22463104128837585,
-0.06676507741212845,
0.10684799402952194,
0.07602142542600632,
-0.26702216267585754,
-0.026659876108169556,
-0.30704939365386963,
-0.18997624516487122,
0.5946853160858154,
-0.22058525681495667,
0.03939324... | |
If you had to do without one or the other in a software project, which would you pick?
I've had plenty of projects in which the client or PM thought they could get away without one or the other. We always paid the price.
I'd say you could go without Testing rather than Requirements. If you don't have requirements, how ... | [
0.7970409393310547,
0.11609643697738647,
-0.6165962815284729,
0.43203726410865784,
0.11889289319515228,
0.11452633887529373,
-0.06668160110712051,
0.00877043604850769,
-0.0767078623175621,
-0.13717563450336456,
0.3075004518032074,
0.846053421497345,
0.18903832137584686,
-0.0352831147611141... | |
I'm adding a record like this:
```
Dim pathString As String = HttpContext.Current.Request.MapPath("Banking.mdb")
Dim odbconBanking As New OleDbConnection _
("Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" + pathString)
Dim sql As String
sql = "INSERT INTO tblUsers ( Fir... | [
0.1894301474094391,
-0.07790247350931168,
0.6850844621658325,
0.037115827202796936,
0.18223783373832703,
-0.060363225638866425,
0.014323116280138493,
-0.23000501096248627,
-0.23372457921504974,
-0.5392459034919739,
-0.11227642744779587,
0.3258000612258911,
-0.5997300148010254,
0.2548488080... | |
& "', '" & lastName & "', '" & address & _
"', '" & city & "', '" & province & "', '" & zip & "', '" & phone & "', '" & username & "', '" & password & "');"
odbconBanking.Open()
Dim cmd As New OleDbCommand(sql, odbconBanking)
cmd.ExecuteNonQuery()
odbconBanking.Close()
```
The primary key ... | [
-0.047851208597421646,
0.166073277592659,
0.9174351096153259,
0.1802913248538971,
0.42115047574043274,
-0.34385159611701965,
-0.07157352566719055,
-0.10349912941455841,
-0.20570196211338043,
-0.24280981719493866,
-0.28504398465156555,
0.7398371696472168,
-0.21002650260925293,
0.51163947582... | |
query would look something like this:
```
Dim pathString As String = HttpContext.Current.Request.MapPath("Banking.mdb")
Dim odbconBanking As New OleDbConnection _
("Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" + pathString)
Dim sql As String
sql = "INSERT INTO tblUsers ( FirstName, LastName, Address... | [
-0.09740614891052246,
-0.05567155405879021,
0.8041821718215942,
0.07721522450447083,
-0.12769053876399994,
0.05861799418926239,
0.19712410867214203,
-0.35549983382225037,
-0.1408616453409195,
-0.47229695320129395,
-0.12091490626335144,
0.38073256611824036,
-0.46031033992767334,
0.270229727... | |
to using the Sql Server library and not the Odbc library, but that should get you started. | [
0.38743820786476135,
0.009152245707809925,
0.07853584736585617,
0.37629789113998413,
0.12936396896839142,
-0.5585356950759888,
-0.20284885168075562,
0.13196903467178345,
-0.16879691183567047,
-0.4192829132080078,
0.19499017298221588,
0.4373339116573334,
-0.06303919106721878,
-0.05121182277... | |
The same way DOS morphed into Windows?
We seem to have ended up supporting and developing for three platforms from Microsoft, and I'm not sure where the boundaries are supposed to lie.
Why can't the benefits of the CLR (such as type safety, memory protection, etc.) be built into Windows itself?
Or into the browser? ... | [
0.42636433243751526,
0.0959227979183197,
0.36809319257736206,
0.311300665140152,
-0.017782270908355713,
-0.17798545956611633,
-0.07212749868631363,
0.07425224035978317,
-0.3173006474971771,
-0.3695533871650696,
0.14354902505874634,
0.763644814491272,
0.015242637135088444,
0.273549199104309... | |
be a CLR for workstations talking directly to the hardware (or at least not the whole Windows legacy ball and chain)?
(ooppp - I've got two questions here. Let's make this - why can't .net be built into Windows? I understand about backward compatibility - but the safety of what's in .NET could be at least optionally i... | [
0.3092153072357178,
-0.09950173646211624,
0.4549414813518524,
0.3642207384109497,
-0.06413830071687698,
-0.5844316482543945,
-0.11010153591632843,
0.03893439099192619,
-0.25916391611099243,
-0.2369181513786316,
0.023083241656422615,
0.7598989605903625,
-0.15474893152713776,
-0.025574903935... | |
morph into Windows, at least not the Windows we know and love today. DOS was the operating system, Windows 3.1 a GUI shell resting atop said operating system.
When Windows 95 came out, it is true that there was no more boxed product labeled "Microsoft DOS," but Windows 95, architecturally, was DOS 7.0 with a GUI shell... | [
0.113719142973423,
0.1838226318359375,
0.38341742753982544,
0.052435848861932755,
0.07007519900798798,
0.07544673979282379,
-0.07100650668144226,
0.35873955488204956,
-0.24587565660476685,
-0.4854605793952942,
-0.054301828145980835,
0.5384387969970703,
-0.037119630724191666,
0.462420821189... | |
a near-identical but expanded API.)
DOS no more morphed into the Windows we are familiar with than the original Linux core morphed into KDE.
The two APIs will need to continue to coexist as long as there are products built natively against Windows which are still in a support cycle. Considering that the Windows API ... | [
0.24957692623138428,
0.05321018025279045,
0.4500141739845276,
0.23222289979457855,
0.08040650188922882,
-0.10749483108520508,
0.28341853618621826,
0.035663362592458725,
-0.18346315622329712,
-0.5985024571418762,
-0.10927554219961166,
0.5891823172569275,
-0.13013054430484772,
0.373379230499... | |
than anyone: It's never as easy to do something as it might appear from the outside! | [
0.3347991406917572,
-0.1887863427400589,
-0.23946508765220642,
0.020872142165899277,
-0.1359560787677765,
-0.1099887266755104,
0.4919002056121826,
0.007299295160919428,
-0.33618462085723877,
-0.30333855748176575,
0.047514256089925766,
0.2567603886127472,
0.06697934865951538,
-0.04752835631... | |
This is a subjective question.
I worked in Visual Basic 6.0 before coming into the .NET space.
One thing I see that there are a lot of things, for which there is a need to deal with the Win32 API. As a Visual Basic 6.0 developer, there were a lot of limitations. .NET fixes some of the old problems however the need t... | [
0.425558865070343,
0.18327899277210236,
0.08185029774904251,
-0.2985321581363678,
-0.033175278455019,
0.00008801156945992261,
-0.02353788912296295,
0.17208696901798248,
-0.19593489170074463,
-0.515213131904602,
0.055340759456157684,
0.8642126321792603,
-0.25606343150138855,
-0.029240719974... | |
applications/websites) and C/C++ is different so far.
Can .NET or any other infrastructure really make C/C++ less significant?
Am I expecting too much?
EDIT: Doesn't it look like, building wrapper over another wrapper (and bring in new set of complexities along-with it)?
It can't go away any time soon, but in Windows... | [
0.6519747972488403,
0.4281740188598633,
-0.12922586500644684,
0.09826502948999405,
-0.09121936559677124,
-0.21823278069496155,
0.14478564262390137,
0.2179790884256363,
-0.3572218716144562,
-0.6599448323249817,
-0.06473226100206375,
0.376268208026886,
-0.4810344874858856,
-0.069318808615207... | |
A big reason for this has to do with CAS policies in .NET. Invoking unmanaged code requires FullTrust, so compiling code also requires FullTrust. As they move over to managed code, this limitation goes away.
As more and more developers go to .NET as their development platform, we are seeing Microsoft follow suit.
Ano... | [
0.3014529049396515,
0.16075555980205536,
-0.02535869926214218,
0.2289297729730606,
-0.3823722302913666,
-0.4792671799659729,
0.2736029624938965,
0.0591069757938385,
-0.1818823516368866,
-0.5648746490478516,
0.03115263395011425,
0.5078855752944946,
-0.3672043979167938,
0.10888712853193283,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.