instruction
stringlengths
0
30k
How do I get my 2008 Team Build to be triggered by developer check in's
|tfs|msbuild|visual-studio-team-system|build-automation|
I have a Team Foundation Server 2008 Installation and a separate machine with the Team Build service. I can create team builds and trigger them manually in Visual Studio or via the command line (where they complete successfully). However check ins to the source tree do not cause a build to trigger despite the option...
You could use reflection to look at the publisher of the assembly, and coordinate that with the assembly's path. If you find an assembly whose publisher is Microsoft, and which exists somewhere below c:\Windows\Microsoft.NET\Framework it's a safe bet it's part of the runtime. Edit: On second though, the publisher ma...
I put my unit tests in the same assembly as the code that it's testing. This makes sense to me, because I think of "test yourself" as a feature of a class, along with things like "initialize yourself" and "describe yourself". I've heard some objections to this approach, but few of them have been convincing. **It...
Basic Algebra and Statistics are good starting points, and the foundation for a lot of other fields.
I played with some DI Frameworks for PHP, but I haven't used one in production. Have some links: 1. [http://www.stubbles.net/][1] which I think is the oldest I tried 2. [http://php.xjconf.net/][2] 3. [FLOW3][3] - I belive this one will become a very nice framework (its beta right now) You ...
"Proof by induction" is a core mathematical concept for programmers to know.
One benefit of Flash is that it has a few facilities to help do cross domain type operations safely, which can be helpful. Flash also has (limited) support for some hardware, which is not possible with Javascript. Personally, I'd try to use as much Ajax as possible before turning to something like Flash. From the U...
ASP.Net Web Application Build Output - How do I include all deployment files
|asp.net|build-process|deployment|
When I build my ASP.net web application I get a .dll file with the code for the website in it (which is great) but the website also needs all the .aspx files and friends, and these need to be placed in the correct directory structure. How can I get this all in one directory as the result of each build? Trying to pick t...
|asp.net|deployment|build-process|
When I build my ASP.net web application I get a .dll file with the code for the website in it (which is great) but the website also needs all the .aspx files and friends, and these need to be placed in the correct directory structure. How can I get this all in one directory as the result of each build? Trying to pick t...
|asp.net|deployment|build-process|build-automation|
For the automated building you describe in the update, I would recommend you look into [MSBuild][1] and [CruiseControl.NET][2] [1]: http://msdn.microsoft.com/en-us/library/0k6kkbsd.aspx [2]: http://confluence.public.thoughtworks.org/display/CCNET/Welcome+to+CruiseControl.NET
I think this should do the trick using the Collections API: //assume oldList exists and has data in it. List newList = new ArrayList(); Collections.addAll(oldList, newList);
I think this should do the trick using the Collections API: **Note**: the copy method runs in linear time. //assume oldList exists and has data in it. List<String> newList = new ArrayList<String>(); Collections.copy(newList, oldList);
If you have asp.net generating an RSS feed, it will sometimes put an extra line at the top of the page. This won't validate with common RSS validators. You can workaround it by putting the page directive <@Page> at the bottom of the page.
This is not really an answer, but wouldn't it make more sense to target your software at the .NET framework compact edition if you're developing for WinMo?
What's your application domain? It depends. Since you used the word "Agile", I'm guessing it's a web app. I have a nice easy answer for you. Go buy a copy of Burp Suite (it's the #1 Google result for "burp" --- a sure endorsement!); it'll cost you 99EU, or ~$180USD, or $98 Obama Dollars if you wait until Novemb...
|css|layout|
What steps should be necessary to optimize a poorly performing query?
|sql-server|optimization|
I know this is a broad question, but I've inherited several poor performers and need to optimize them badly. I was wondering what are the most common steps involved to optimize. So, what steps do some of you guys take when faced with the same situation?
I know this is a broad question, but I've inherited several poor performers and need to optimize them badly. I was wondering what are the most common steps involved to optimize. So, what steps do some of you guys take when faced with the same situation? > Related Question: http://stackoverflow.com/questions/39331...
You can also **extend (inherit) classes and override properties/methods** using the prototype chain **spoon16** alluded to. In the following example we create a class Pet and define some properties. We also override the .toString() method inherited from Object. After this we create a Dog class which **extends Pet...
I'd go with 2 but use some salt. Some pseudocode: SetPassword(user, password) salt = RandomString() hash = Hashfunction(salt+password) StoreInDatabase(user, salt, hash) CheckPassword(user, password) (salt, hash) = GetFromDatabase(user) if Hashfunction(salt+pass...
How do I get my 2008 Team Build to be triggered by developer check-ins
Why won't my 2008 Team Build trigger on developer check-ins despite CI being enabled
I have a Team Foundation Server 2008 Installation and a separate machine with the Team Build service. I can create team builds and trigger them manually in Visual Studio or via the command line (where they complete successfully). However check ins to the source tree do not cause a build to trigger despite the option...
There are also issues with COM visibility - COM interop can't be used with generics
YAML files are based on tabs. Once you actually have correct indentation it will read everything at the same level as siblings. <pre><code> two: name: test path: test: 4 </code></pre>
A `Nullable<T>` is a structure consisting of a T and a bit flag indicating whether or not the T is valid. A `Nullable<bool>` has three possible values: true, false and null. **Edit:** Ah, I missed the fact that the question mark after "bool" was actually part of the type name and not an indicator that you were aski...
Windows Forms Designer upset by a control with a nullable property
|c#|winforms|nullable|
I have a "numeric textbox" in C# .NET which is nothing more than a derivation of Textbox, with some added logic to prevent the user entering anything non-numeric. As part of this, I have added a Value property of type `double?` (or `Nullable<double>`). It's nullable to support the case where the user doesn't enter anyt...
* Adobe Actionscript is a statically typed language, Javascript is dynamically typed. Depending on your point of view, this may be a good thing or a bad thing. * With Javascript/HTML/CSS you're going to be heading into cross-browser compatibility hell, especially if you want to support older browsers. This can be mi...
Contig might serve your purpose http://technet.microsoft.com/en-us/sysinternals/bb897428.aspx I'm relatively certain I ran across some methods/attributes you could access programatically to do exactly what you want. This was back in NT4 days though and my memory isn't that good.
I suppose the ugly way is to have an application boot on startup, check every few seconds if defrag is running and if so open the file in exclusive mode. This is really ugly and I don't recommend it unless there is no cleaner solution.
Terry, the answers all mention ways to prevent files from becoming unmovable during defragmentation. From your question it appears that you are in fact wanting to *make* your personal files unmovable. Can you please clarify what is appealing about making your files unmovable.
I wonder, if you set the page not to be cached through meta tags, will that fix the problem? http://lists.evolt.org/archive/Week-of-Mon-20030106/131984.html If it does, it'll have the benefit of working on browser's with Javascript disabled.
How do you navigate out of a ComboBox on a Windows Mobile Device without a TAB key?
|windows-mobile|
I'm developing an application for Windows Mobile Devices using Visual Studio .NET 2008 whose UI requires the use of a ComboBox control. Unfortunately, for devices with neither a hardware fullsize keyboard nor a touchscreen interface, there is no way to move (tab) from the ComboBox control to another control on the same...
What's the difference between the inner workings of Java's JVM and .NET's CLR? Perhaps a starting point would be, are they basically the same thing in their respective environments (Java > JVM > Machine code) (C# > CLR > IL). **Update:** Several people have alluded to the points I was trying to cover: 1. Gar...
|c#|.net|java|clr|jvm|
What's the difference between the inner workings of Java's JVM and .NET's CLR? Perhaps a starting point would be, are they basically the same thing in their respective environments (Java > JVM > Machine code) (C# > CLR > IL). ---------- **Update:** Several people have alluded to the points I was trying to cov...
If your XML conforms to a particular XSD schema, you can look into using the "xsd.exe" command line tool to generate C# object classes that you can bind the XML to, and then form your insert statements using the properties of those objects: <a href="http://msdn.microsoft.com/en-us/library/x6c1kb0s(VS.71).aspx">MSDN XSD...
I don't know that they are faster. I like using ORM for data access (to not re-invent the wheel) but I realize that's not always a viable option. Frans Bouma has a good article on this subject : http://weblogs.asp.net/fbouma/archive/2003/11/18/38178.aspx
Stored procs are great for cases where the SQL code is run frequently because the database stores it tokenized in memory. If you repeatedly ran the same code outside of a stored proc, you will likey incur a performance hit from the database reparsing the same code over and over. I typically frequently called code a...
Read Frans Bouma's [excellent post][1] (if a bit biased) on that. [1]: http://weblogs.asp.net/fbouma/archive/2003/11/18/38178.aspx
There is the concept of PSObject and Add-Member that you could use. $contact = New-Object PSObject $contact | Add-Member -memberType NoteProperty -name "First" -value "John" $contact | Add-Member -memberType NoteProperty -name "Last" -value "Doe" $contact | Add-Member -memberType NotePropert...
I use Netbeans with XDebug. Check it out at its website for docs on how to configure it. http://php.netbeans.org/
If you have 2 users hitting it at the same time they will get the same id. Why didn't you use an id table with an identity instead, insert into that and use that as the unique (which is guaranteed) id, this will also perform much faster >>sp_getNextID never ever prefix procs with sp_, this has performance impl...
Javascript: declaring a variable before the conditional result?
|javascript|
My javascript is pretty nominal, so when I saw this construction, I was kind of baffled: var shareProxiesPref = document.getElementById("network.proxy.share_proxy_settings"); shareProxiesPref.disabled = proxyTypePref.value != 1; Isn't it better to do an if on proxyTypePref.value, and then declare the var...
My javascript is pretty nominal, so when I saw this construction, I was kind of baffled: var shareProxiesPref = document.getElementById("network.proxy.share_proxy_settings"); shareProxiesPref.disabled = proxyTypePref.value != 1; Isn't it better to do an if on proxyTypePref.value, and then declare the var...
It depends on how "general" you want it to be. If you want it to be really really general such as be able to parse mathematical functions as well like sin(4+5)*cos(7^3) you will probably need a **parse tree.** In which, I do not think that a complete implementation is proper to be pasted here. I'd suggest that yo...
I'd go with 2 but use some salt. Some pseudocode: SetPassword(user, password) salt = RandomString() hash = Hashfunction(salt+password) StoreInDatabase(user, salt, hash) CheckPassword(user, password) (salt, hash) = GetFromDatabase(user) if Hashfunction(salt+pass...
I agree with the already given advice of: - Planning a minimal implementation that does something useful as a first complete release. - Have concrete goals about what you want to achieve to have something to compare your progress with. I would also recommend beginning with a lightweight design of you overall **a...
I see a lot of excellent suggestions so far. However, I think there's something missing, assembler. **Why learn assembly language?** - **It's not as difficult as you may think**. Assembly language is a lot smaller in scope than many modern languages, there are a few tricks you need to understand for it to make ...
Null primitives are just regular primitives wrapped in Nullable. Any appearances to the contrary are just the compiler and syntactical sugar.
A `bool` is a value type, therefore it can't contain a NULL value. If you wrap any value type with `Nullable<>`, it will give it that ability. Moreover, access methods to the value change by additional properties `HasValue` and `Value`. But to the question: `Nullable<bool>` and `bool?` are aliases.
There is no difference between `bool? b = null` and `Nullable<bool> b = null`. The `?` is just C# compiler syntax sugar.
C#: Is there any difference between bool? and Nullable<bool> ?
|c#|nullable|
In C# are the nullable primitive types (i.e. `bool?`) just aliases for their corresponding `Nullable<T>` type or is there a difference between the two?
|c#|.net|nullable|
To access the value of the bool? you need to do the following: bool? myValue = true; bool hasValue = false; if (myValue.HasValue && myValue.Value) { hasValue = true; } Note you can't just do: if (myValue) { hasValue = true; }
The best info I have seen on interacting with Windows Media Player is this [article][1] written by Stephen Toub. He lists a whole load of different ways to play dvr-ms files (doesn't really matter what format they are for this though). The bit that is possibly of interest to you is about using a Media Player Active...
The best info I have seen on interacting with Windows Media Player is this [article][1] written by Stephen Toub. He lists a whole load of different ways to play dvr-ms files (doesn't really matter what format they are for this though). The bit that is possibly of interest to you is about using a Media Player Active...
Could it help to setting the [DefaultValue attribute][1] on that property to new Nullable<double>(1)? [DefaultValue(new Nullable<double>(1))] public double? Value ... [1]: http://msdn.microsoft.com/en-us/library/system.componentmodel.defaultvalueattribute(VS.80).aspx
In many cases, stored procedures are actually slower because they're more genaralized. While stored procedures can be highly tuned, in my experience there's enough development and institutional friction that they're left in place once they work, so stored procedures often tend to return a lot of columns "just in case" ...
Best method to obfuscate or secure .Net assemblies
|c#|.net|.net-2.0|
I'm looking for a technique or tool which we can use to obfuscate or somehow secure our compiled c# code. The goal is not for user/data security but to hinder reverse engineering of some of the technology in our software. This is not for use on the web, but for a desktop application. So, do you know of any tools...
All I can speak to is SQL server. In that platform, stored procedures are lovely because the server stores the execution plan, which in most cases speeds up performance a good bit. I say "in most cases", because if the SP has widely varying paths of execution you might get suboptimal performance. However, even in those...
Can a Bash script tell what directory it's in?
|bash|
How do I get the path of the directory in which a bash script is located FROM that bash script. For instance, lets say I want to use a bash script as a launcher for another application. I want to change working directory to the one where the bash script is located so I can operate on the files in that directory like...
What online brokers offer APIs?
|api|stocks|trading|
So I'm getting really sick of E*TRADE and, being a developer, would love to find an online broker that offers an API. It would be great to be able to write my own trading tools, and maybe even modify existing ones. Based on my research so far, I've only found one option. Interactive Brokers offers a multi-language A...
|api|stocks|trading|
So I'm getting really sick of E*TRADE and, being a developer, would love to find an online broker that offers an API. It would be great to be able to write my own trading tools, and maybe even modify existing ones. Based on my research so far, I've only found one option. Interactive Brokers offers a multi-language A...
`float` is indeed the right property to achieve this. However, the example given by [bmatthews68](#61167) can be improved. The most important thing about floating boxes is that they *must* specify an explicit width. This can be rather inconvenient but this is the way CSS works. However, notice that `px` is a unit of me...
`float` is indeed the right property to achieve this. However, the example given by [bmatthews68](#61167) can be improved. The most important thing about floating boxes is that they *must* specify an explicit width. This can be rather inconvenient but this is the way CSS works. However, notice that `px` is a unit of me...
|windows-mobile|mobile|
<input autocomplete="off">
That was an abstract-podcast indeed! But I see what they're getting at - they just dazzled by Ruby Sparkle. Ruby allows you to do things that C-based and Java programmers wouldn't even think of + combinations of those things let you achieve undreamt of possibilities. Adding new methods to a built-in String class c...
This should do the trick: <body onload="document.FormName.reset();"> Replace FormName with the name of your form and then all the fields will be reset when the user clicks refresh in his browser. Or if you only want to reset some fields, add this to the bottom of your page: <script type="text/javasc...
A lot of system files cannot be moved after the system boots, such as the page file and registry database files. [This utility][1] runs before Windows boots to defragment those files. I have it set to run at every boot, and it works well for me on several machines. Note that the very first time you boot up with ...
A lot of system files cannot be moved after the system boots, such as the page file and registry database files. [This utility][1] runs before Windows boots to defragment those files. I have it set to run at every boot, and it works well for me on several machines. Note that the very first time you boot up with ...
A lot of system files cannot be moved after the system boots, such as the page file and registry database files. [This utility][1] runs before Windows boots to defragment those files. I have it set to run at every boot, and it works well for me on several machines. Note that the very first time you boot up with ...
Yes, you can open URL connections to the host you ran your applet from. You can either create a classloader with HTTP urls, or download the classes (as jars) to the user's machine and create a classloader with those jars in the classpath. The applet won't stop and you don't need to load another page. Regarding the s...
Jeff Atwood has some good posts concerning hashing, if you decide to go that route: - [Rainbow Hash Cracking][1] - [You're Probably Storing Passwords Incorrectly][2] [1]: http://www.codinghorror.com/blog/archives/000949.html [2]: http://www.codinghorror.com/blog/archives/000953.html
@[aku](#61162)'s links show the proper solution. A simple alternative is to “go back in time” to the antics of C and C++: declaration before definition. Try the following: Func<int, int> fact = null; fact = x => (x == 0) ? 1 : x * fact(x - 1); Works like a charm.
How do you remove untracked files from your git working copy?