instruction
stringlengths
0
30k
I haven't used XNA or DirectX. But, for getting to know the basics of shader programming with Cg, the [Cg Tutorial][1] is the best book I've found. [1]: http://developer.nvidia.com/object/cg_tutorial_home.html
64bit .NET Performance tuning
|.net|performance|optimization|64-bit|jit|
I know that .NET is JIT compiled to the architecture you are running on just before the app runs, but does the JIT compiler optimize for 64bit architecture at all? Is there anything that needs to be done or considered when programming an app that will run on a 64bit system? (i.e. Will using Int64 improve performance a...
Tom says it all really. Lots of open source projects have dedicated developers and few who are interested in documenting. It isn't helped by the fact that goalposts can shift on a daily basis which means documentation not only has to be created, but maintained.
Mostly pen and paper, although I occasionally break out Visio and just do some rough diagrams. Would be nice to have a fancy tool I guess, but it would just be another thing to learn.
I find pen and paper very useful, and I try to get as far away from a computer as possible. If I do it on the compy, I'm always too tempted to start programming the solution. That inevitably leads to me changing things later that I would have spotted in the planning phase had I actually spent a good measure of time on ...
The Subversion book contains two sections on this: * [Repository Layout](http://svnbook.red-bean.com/en/1.4/svn.branchmerge.maint.html#svn.branchmerge.maint.layout) * [Planning Your Repository Organization](http://svnbook.red-bean.com/en/1.4/svn.reposadmin.planning.html#svn.reposadmin.projects.chooselayout) A bl...
Pen and paper for the first draft. Umlet to digitalize it. It's very minimal but it does what I need
Go to Site Actions -> Edit Page You get all the web parts edited. Click on the "Edit" dropdown of the Web Part you want to disable and choose "Close". The web part disappears, but don't fear! It's not gone for good! To have it back:<br> -> click to Add a new Web Part -> Advanced Web Part Gallery and Options. <...
The web hit is the way to go, but make sure you pick a good URL - your app will be hitting it for years to come.
[PyCrash][1]? [1]: http://pycrash.sourceforge.net/
VB.NET? System.IO.Directory.Exists(string path)
If(Not System.IO.Directory.Exists(YourPath)) Then System.IO.Directory.CreateDirectory(YourPath)
What is the best method for storing SASS generated CSS in your application and souce control?
|ruby-on-rails|haml|sass|
If you are using HAML and SASS in your Rails application, then any templates you define in public/stylesheet/*.sass will be compiled into *.css stylesheets. From your code, you use stylesheet\_link\_tag to pull in the asset by name without having to worry about the extension. Many people dislike storing generated c...
Try the [System.IO.DirectoryInfo][1] class. The sample from MSDN: Imports System Imports System.IO Public Class Test Public Shared Sub Main() ' Specify the directories you want to manipulate. Dim di As DirectoryInfo = New DirectoryInfo("c:\MyDir") ...
I found it... for (property in object) { // do stuff } will list all the properties, and therefore all the globally declared variables on the window object..
They are **NOT** the same thing. Mutual Exclusion semaphores are used to protect shared resources (data structure, file, etc..). Binary Semaphore can be used to signal that something has happened. While both types of semaphores have a full/empty state, their usage is very different. Also, a Mutex semaphore is ...
Historically, what made programming possible was the realization that memory locations could hold computer instructions, not just data. Pointers arose from the realization that memory locations could also hold the address of other memory locations, thus giving us indirection. Without pointers (at a low level) mos...
The strength of the SSL connection is negotiated between the browser and the server (or whatever is providing SSL). It might be their browser asking for a weaker cypher. Have they ever seen a 256-AES SSL connection on this browser? AES-128 is still a very secure algorithm, so unless they have something that they want t...
`read` does this: user@host:~$ read [...] user@host:~$
`read` does this: user@host:~$ read -n1 -r -p "Press any key to continue..." key [...] user@host:~$ The `-n1` specifies that it only waits for a single character. The `-r` puts it into raw mode, which is necessary because otherwise, if you press something like backslash, it doesn't register until ...
`read` does this: user@host:~$ read -n1 -r -p "Press any key to continue..." key [...] user@host:~$ The `-n1` specifies that it only waits for a single character. The `-r` puts it into raw mode, which is necessary because otherwise, if you press something like backslash, it doesn't register until ...
Are you given any indication on method? (ie if this is supplemented by course material what are you currently learning?) If this is meant to be a fairly basic system you might find success looking into to [Deterministic Finite State Machine][2] and [Nondeterministic Finite State Machine][3] [2]: http://en.wikiped...
I assume you have profile and measured your code after doing all that creation and verified that create/destroy is actually causing an issue. Else this is what you should do first. If you still want to do the object pooling, as a first step, you should ensure your objects are stateless coz, that would be the prerequ...
What type of application/utilization is YAML best suited for?
|xml|markup|yaml|
Why would one choose YAML over XML or any other formats?
Why would one choose [YAML][1] over XML or any other formats? [1]: http://yaml.org/
I have an account with www.codespaces.com They have svn hosting, wiki, forum, project management, issue tracking and admin all built in. I have been using the service for 6 months and I am happy with the level of service they off.
If you open the DMP file with an editor that can handle big files, you might be able to locate the areas where the schema names are mentioned. Just be sure not to change anything. It would be better if you opened a copy of the original dump.
We use XForms for creating user interfaces for SOAP-based web services. Currently we settled with **Chiba** XForms engine ([http://chiba.sourceforge.net/][1]), but **Orbeon** ([http://www.orbeon.com/][2]) actually seems more mature. Both are server-side engines, which convert XForms into HTML on a fly. The validation i...
You could try the css "nowrap" option in the containing div. {white-space: no-wrap} Not sure how widely that is supported.
Have you tried running in separate processes? A static library should not share memory instances outside of it's own process. This can be a pain to manage, I know. I'm not sure what your other options would be in this case though.
Have you tried running in separate processes? A static library should not share memory instances outside of it's own process. This can be a pain to manage, I know. I'm not sure what your other options would be in this case though. Edit: After a little looking around I think you could do everything you needed to w...
Here's one technique I use ALTER Procedure GetProductsBySearchString @SearchString varchar(1000), as set nocount on declare @sqlstring varchar(6000) select @sqlstring = 'set nocount on select a.productid, count(a.productid) as SumOf, sum(a.relevence) as CountOf from product...
Has anyone found a way to run C# Selenium RC tests in parallel?
|selenium|selenium-grid|c#|acceptance-testing|
**Has anyone found a way to run Selenium RC / Selenium Grid tests, written in C# in parallel?** I've currently got a sizable test suite written using Selenium RC's C# driver. Running the entire test suite takes a little over an hour to complete. I normally don't have to run the entire suite so it hasn't been a conce...
|c#|selenium|acceptance-testing|pnunit|selenium-grid|
You can use TD's option "valign" and it can be top, bottom or center... But as far as I know cell contents are centered vertically by default, so probably your CSS makes them show with bottom or top option.
They probably did it to support negative numbers, since 2's compliment doesn't make sense in base 3. Also to eliminate someone typing a 7 instead of an 8, since the uses for arbitrary bases are few (But not non-existent). Here is an example method that can do arbitrary base conversions. You can use it if you like, n...
How to check if one DateTime is later than another in C#
|c#|
I have 2 DateTimes StartDate and EndDate. I want to make sure StartDate is before EndDate. How is this done in C#
Just use paging and only load a certain number of rows on the page at a time.
`typeof(obj)` would return "object" for an object of a class among other possible values.
if(typeof(o) != 'object') o = loadObject();
ServiceCapture is another option. It decodes the binary AMF for you, if I remember correctly. http://kevinlangdon.com/serviceCapture/
rsync is the best file transferring utility out there. Supports resume, recursion and a variety of encryption including ssh (the default). Like scp on steroids. If you have multiple routers to punch through you can build ssh tunnels. It will only transfer parts of the file that are missing which make it great for...
A lot of the time the documentation and/or tutorial for any technology or project will mention what prior knowledge is assumed or useful. So for example hibernate: [http://www.hibernate.org/hib_docs/v3/reference/en/html_single/#tutorial-intro][1] "This tutorial is intended for new users of Hibernate but requires...
For me, the things that have helped my career and taught me what questions to ask are: 1. Podcasts -- .NET Rocks, etc., which introduce and discuss new technologies and put them in context 2. Join your local users group, and stick around after the presentation to talk shop with the folks there; you can learn a lo...
Find a private field with Reflection?
Sorry, but what could lead for a need to replicated the exact same build in the future? In my experience, either you keep your product installers safe or start a new build from scratch. Also IMO the only way to replicated the exact same build in the future is to run your build machine on a Virtual Machine and kee...
Use an explicit stack instead.
You also have the choice of: function Vector(x, y, z) { function length() { return Math.sqrt(x * x + ...); } } Which is probably just as slow as example two, but it looks more like Java/C# and is a bit more explicit.
Where should I put my log file for an asp.net application?
|asp.net|logging|permissions|
I have a asp.net application that we've written our own logging module for. My question is, where is the standard place to write a log file to? I.e. the website will be running as the anonymous user identity (e.g. IUSR on IIS7) and I need a place where I know it'll have permission to write to. Cheers,
Assigning functions to the prototype is better (for public methods) because all instances of the class will share the same copy of the method. If you assign the function inside the constructor as in the second example, every time you create a new instance, the constructor creates a new copy of the length function and a...
Fortunately I get to use prototype.js, which provides some nice wrappers so you can do this: var Person = Class.create({ initialize: function(name) { this.name = name; }, say: function(message) { return this.name + ': ' + message; } }); [Protype.js Document...
App_Data folder on the root of the project. It isn't served to web requests; so other people can't snoop for it.
> Is there anything about WinForms 3.0 that is so much better than in 1.1 I don't know about 3.0, but you can write code in VS 2008 which runs on the .NET 2.0 framework. (So, you get to use the latest C# language, but you can only use the 2.0 libraries) This gets you Generics (`List<DataRow>` instead of those God...
They both create a closure by executing the code block. As a matter of style I much prefer the second for a couple of reasons: It's not immediately obvious by glancing at the first that the code will actually be executed; the line *looks like* it is *creating* a new function, rather than executing it as a constructo...
I would argue that this question does mix-up the concept of encapsulation with 'information hiding' (this is not a critic, since it does seem to match a common interpretation of the notion of 'encapsulation') However for me, 'encapsulation' is either: - the process of regrouping several items into a container ...
Facebook RSS application
|php|rss|facebook|
How can I make a Facebook RSS application that autoupdates from the provided RSS feeds. Of course doing this is trivial for canvas applications, but I need this for showing on the Facebook Page. All the RSS apps I've taken a look at either dont update or dont work on Facebook Pages. Especially now that infinite s...
There's TPM technology: [tpm on wikipedia][1] It allows you to store the cryptographic check sums of a binary on special chip, which could act as one-way verification. *Note*: TPM has sort of a bad rap because it could be used for DRM. But to experts in the field, that's sort of unfair, and there's even an [open-...
I'm personally a big fan of JW, though I've heard Floplayer is good too. JW has an enormous number of features and has a very clean interface. It takes less than a minute to set up a video online; I host all my videos myself, mostly video game clips and x264 demos. ([Example 1][1] [Example 2][2] [Example 3][3] [Exam...
You can use TD's option "valign" and it can be top, bottom or center... But as far as I know cell contents are centered vertically by default, so probably your CSS makes them show with bottom or top option. <TABLE><TR valign=center> <TD align=center background="some image"> image label </TD> </TR></T...
You can use TD's option "valign" and it can be top, bottom or center... But as far as I know cell contents are centered vertically by default, so probably your CSS makes them show with bottom or top option. <TABLE><TR valign=center> <TD align=center background="some image"> image label </TD> </TR></T...
You can use TD's option "valign" and it can be top, bottom or center... But as far as I know cell contents are centered vertically by default, so probably your CSS makes them show with bottom or top option. <TABLE><TR valign=center> <TD align=center background="some image"> image label </TD> </TR></T...
In COFF file format, what is the significance of relocation info section
|coff|
I am reading about COFF file formats, which is commonly used to create an executable file format( it has some variants also ). While reading, I came across the relocation section of the format. How is this relocation section used to create an executable file. It would be very useful if you point me to some lin...
From the Subclipse manual (Help > Help Contents): > **Get Contents** > > Use this option to update the contents > of the selected file in your working > copy with the contents of the revision > in the repository. The revision number > of your local file is not changed by > this option. > > This option is ...
I can't reproduce what you're seeing. I've created an unmanaged C++ application in both VS 2005 and VS 2008 and I have no problems associating that process to a new job object when starting the process in VS. Are you sure the debugger is doing this?
I think you'll see a dramatic increase in the Silverlight install base after Silverlight 2.0 officially comes out. Right now it's still in beta. Silverlight 1.0 is out and runs quite well from what I've seen in Moonlight on Linux, but it's much harder to create full-scale applications for than version 2.0. According...
|c#|.net|reflection|attributes|
Given this class class Foo { // Want to find _bar with reflection [SomeAttribute] private string _bar; public string BigBar { get { return this._bar; } } } I want to find the private item _bar that I will mark with a attribute....
Find a book on the subject and read it. Then email the author with additional questions. Most of these authors are more than happy to help especially if you've bought and read the materials they worked so hard to produce. If that's still not enough for you, go to a conference covering the subject, if you can make i...
A function call is simply a shift of the stack pointer in memory. When a function call is made, the parameters are shifted onto the stack and the stack pointer and frame pointer are advanced to the beginning of the function call. In comparison with time Function call ~ simple memory access <br /> Function call <...
A function call is simply a shift of the frame pointer in memory onto the stack and addition of a new frame on top of that. The function parameters are shifted into local registers for use and the stack pointer is advanced to the new top of the stack for execution of the function. In comparison with time Function...
How can I detect if my process is running UAC-elevated or not?
|windows-vista|uac|elevation|
My Vista application needs to know whether the user has launched it "as administrator" (elevated) or as a standard user (non-elevated). How can I detect that at run time?
Avoid InProc if you plan to host your website on a cheap-n-cheerful host like webhost4life. I've learnt the hard way that because their systems are over subscribed, they recycle the applications **very** frequently which causes your session to get lost. Very annoying. Their suggestion is to use StateServer which is...
This is a mismatch between assemblies: a DLL referenced from an assembly doesn't have a method signature that's expected. Clean the solution, rebuild everything, and try again. Also, be careful if this is a reference to something that's in the GAC; it could be that something somewhere is pointing to an incorrect...
Whether you use SMTP or HTTP to send the data, you need to have a username/password in the application to prevent just anyone from sending random data to you. With that in mind, I suspect it would be easier to use SMTP rather than HTTP to send the data.
Use [TiddlySpot](http://www.tiddlyspot.com), its online all the time and private
Try [FolderShare][1]. [1]: https://foldershare.com/
Under System.IO, there is a class called Directory. Do the following: If Not Directory.Exists(path) Then Directory.CreateDirectory(path) End If It will ensure that the directory is there.
Rob is correct - I have a SQL 2000 server running on the non-default port on a different instance name and the way I access it is like this: [ip or dns name]\\[instance], [port] example: my.server.com\MSSQLSERVER2, 12345 You don't need \\[instance] if you used the default sql server instance when you instal...
You should try using the File System Object or FSO. There are many methods belonging to this object that check if folders exist as well as creating new folders.
There is a 'Style Organizer' tool within Word which will let you copy styles from one document to another if they are both open at once. In Word 2007: - Open the styles dialog (Home tab -> Styles -> Bottom Right button). - Click the 'manage styles' button. - Click 'Import/Export...'
There is a 'Style Organizer' tool within Word which will let you copy styles from one document to another if they are both open at once. In Word 2007: - Open the styles dialog (Home tab -> Styles -> Bottom Right button). - Click the 'manage styles' button. - Click 'Import/Export...' I can't remember what the...
Use the "Styles" tab in the "Organizer" (menu "Tools" -> "Templates and Add-Ins" -> "Organizer") to copy the styles.