instruction stringlengths 0 30k ⌀ |
|---|
I've always felt that the only real reason for the prefixes was so you could have things like txtFirstName and lblFirstName on the same form/page. Since, the vast majority of the time, I'm really only working with the actual field control itself, I skip the prefix for that, and only use the prefixes for associated cont... |
We use m_ and then a slightly modified Simonyi notation, just like Rob says in a previous response. So, prefixing seems useful and m_ is not too intrusive and easily searched upon.
Why notation at all? And why not just follow (for .NET) the Microsoft notation recommendations which rely upon casing of names?
Latte... |
LocBaml include previous translations |
|wpf| |
Is there a way to combine a previous translation when extracting the csv file from an application?
Or any other tool that could do this job for me?
I can’t really see how could i use locbaml if i had to translate everything from scratch every time i add a new control in my application. |
If the DNS servers your client is connected to is following rfc1912 then yes, localhost should resolve to 127.0.0.1.
RFC1912
4.1
...
Certain zones should **always be present** in nameserver configurations:
primary localhost localhost
primary... |
I´m looking for publications about the history of the internet browser? Please help! |
|browser|history|publications| |
I´m looking for publications about the history of the internet browser. Papers, articles Blog posts whatever. Cannot find anything on ACM IEEE etc. and my blog search also didn´t reveal anything remarkable. Please help |
You could use a common script, process or web service for generating the file names (depending on your set-up). |
As others have said, no definitive way, but if you manage the ownership well, then the FreeAndNil routine will ensure that your variable is nil if it doesn't point to anything. |
To Martin Meredith, Luke, Marijn: thanks for your quick reply. It is now settled that it's not possible.
I agree with you all about this being an undesirable behavior, but as i stated before, this is for a bank intranet application where all users are running a tightly controlled, centrally-configured, customized a... |
Put simply, it's because it's indexed in a different way.
In this case, enum says "It's one of these 13 values" whereas INT is saying "It could be any integer"
This means that indexing is easier, as it doesn't have to take into account indexing for those integers you don't use, "just in case" you ever use them.
... |
Put simply, it's because it's indexed in a different way.
In this case, enum says "It's one of these 13 values" whereas INT is saying "It could be any integer"
This means that indexing is easier, as it doesn't have to take into account indexing for those integers you don't use, "just in case" you ever use them.
... |
There's an excellent, free package that will AJAX enable the calendar control for use as a date picker.
Here's the video tutorial: http://www.asp.net/LEARN/ajax-videos/video-124.aspx |
What is the best method to detect offline mode in the browser? |
|javascript|ajax|tips-and-tricks|offline-mode| |
I have a web application where there are number of Ajax components which refresh them selves every so often inside a page (its a dashboard of sorts).
Now, I want to add functionality to the page so that when there is no Internet connectivity, the current content of the page doesn't change and a message appears on th... |
@Override on interfaces actually are helpful, because you will get warnings if you change the interface. |
Your best bet is to make your key space big enough that the probability of collisions is extremely low, then don't worry about it. As mentioned, GUIDs will do this for you. Or, you can use a pure random number as long as it has enough bits.
[This page has the formula for calculating the collision probability][1].
... |
Any time you give someone else a copy of some software you have distributed that software. It does not have to be to the public at large to qualify as distribution. |
[RegexBuddy][1] Is a good (non-free) tool for regex stuff
[1]: http://www.regexbuddy.com/ |
Debugging my web app with JSON/Firefox - Firefox handling of JSON? |
|firefox|json| |
I'm attempting to debug my web application with FireFox3. However, when a JSON feed comes from my application, Firefox wants to open up the "application/json" in a new program. Is there a way to configure FireFox3 to handle JSON like regular text files and open up the JSON in the current tab?
Thanks. |
Not sure about a command line version but there is a firefox extension that does Lorem Ipsum: [https://addons.mozilla.org/en-US/firefox/addon/2064][1]
[1]: https://addons.mozilla.org/en-US/firefox/addon/2064 |
I store my TiddlyWiki files on a USB flash drive that I keep with me no matter what computer I might be using. No need to bother synchronizing across other computers. It gets backed up regularly when I back up the flash drive itself on my primary workstation. |
First check if Max(ID) + 1 is not taken and use that.
If Max(ID) + 1 exceeds the maximum then select an ordered chunk at the top and start looping backwards looking for a hole. Repeat the chunks until you run out of numbers (in which case throw a big error).
if the "hole" is found then save the ID in another tab... |
It's a nullable DateTime. ? after a primitive type/structure indicates that it is the nullable version.
DateTime is a structure that can never be null. From MSDN:
> The DateTime value type represents
> dates and times with values ranging
> from 12:00:00 midnight, January 1,
> 0001 Anno Domini (Common Era) to
... |
One advise is to start with a current version of MySQL, otherwise you will not have sub-queries, stored procedures or views. The other obvious different is auto-increment fields. Check out:
[pg2mysql][1]
/Allan
[1]: http://www.lightbox.ca/pg2mysql.php |
One advise is to start with a current version of MySQL, otherwise you will not have sub-queries, stored procedures or views. The other obvious difference is auto-increment fields. Check out:
[pg2mysql][1]
/Allan
[1]: http://www.lightbox.ca/pg2mysql.php |
Where I work we have only a few reasons to catch exceptions. We only do it when...
1. We can do something about it - e.g We know that this can happen sometimes and we can rectify it in code as it happens (very rare).
2. We want to know it happens and where (then we just rethrow the exception).
3. We want to a... |
This really depends on what you are getting from the web service. If they are simple data transfer objects and you are only displaying data, then yes, you can bind. If you plan to edit the objects, it may not be usefull as you will need to track changes.
Do your objects and/or collections on the client track chang... |
I generally find the XmlSerializer to be a poor choice for any POCO that's more than just a DTO. If you require specific XML, you can go the Xml*Attribute and/or IXmlSerializable route - but you're left with an object pretty mangled.
For some purposes, it still an obvious choice - even with it's limitations. But, fo... |
Recursion is used in things like BSP trees for collision detection in game development (and other similar areas). |
I would guess that Shog9 is right, and that IIS 6 i smart enough to ignore your request and send the correct headers, while 5.2 throws an error. |
Matt Dillard's example is good. More generally, any walking of a tree can generally be handled by recursion very easily. For instance, compiling parse trees, walking over XML or HTML, etc. |
OK, I think that I have it figured out. Following is the code, and then I had to create a type library file of the hnetcfg.dll. I did that when I first started but have learned a lot about the firewall objects since then. It didn't work then, but its working now. The wrapping code uses exceptions which I normally don't... |
OK, I think that I have it figured out.
I had to create a type library file of the hnetcfg.dll. I did that when I first started but have learned a lot about the firewall objects since then. It didn't work then, but its working now. You can create your own file from Component|Import Component. And then follow the wi... |
I'd keep it in a migration. While it's recommended to use the schema for initial setups, the reason for that is that it's faster, thus avoiding problems. A single extra migration for the data should be fine.
You could also add the data into the schema file, as it's the same format as migrations. You'd just lose the ... |
I'm always amazed that more people don't know about/use [NDepend][1] - it shows all dependecies at every level of your code, and will even draw pretty box and arrow pictures showing how confused your architecture really is :) Together with TestDriven.Net, I can't imagine working without it any more. Free/cheap.
... |
While I haven't got any practical experiences with CUDA yet, I have been studying the subject and found a number of papers which document positive results using GPGPU APIs (they all include CUDA).
This [paper][1] describes how database joins can be paralellized by creating a number of parallel primitives (map, scatt... |
A bug tracking system can be a great project to start junior developers on. It's a fairly simple system that you can use to train them in your coding conventions and so forth. Getting junior developers to build such a system is relatively cheap and they can make their mistakes on something a customer will not see.
... |
int main(){
int a = 20;
return main();
} |
I guess the best option is number 3, mainly because that way there will be no default user which is a great way to render otherwise good security useless.
|
In english:
recursion = n. See recursion. |
PIC18:
` overflow
PUSH
CALL overflow ` |
PIC18:
> overflow
>> PUSH
>> CALL overflow |
Way too many times. As soon as someone discovers that PHP has OO features they want to wrap everything in classes.
The point to the OO stuff in PHP is so that you can architect your solutions in whichever way you want. But wrapping the existing function in Objects doesn't yield much payoff.
That being said PHP... |
What's a good bit of JS or JQuery for horizontally scrolling news ticker |
|js|jquery|scroll| |
I am looking for a little bit of JQuery or JS that allows me to produce a horizontally scrolling "news ticker" list.
The produced HTML needs to be standards compliant as well.
I have tried [LiScroll][1] but this has a habit of breaking (some content ends up on a second line at the start of the scroll), especially... |
I am looking for a little bit of JQuery or JS that allows me to produce a horizontally scrolling "news ticker" list.
The produced HTML needs to be standards compliant as well.
I have tried [LiScroll][1] but this has a habit of breaking (some content ends up on a second line at the start of the scroll), especially... |
I am looking for a little bit of JQuery or JS that allows me to produce a horizontally scrolling "news ticker" list.
The produced HTML needs to be standards compliant as well.
I have tried [liScroll][1] but this has a habit of breaking (some content ends up on a second line at the start of the scroll), especially... |
|jquery|js|scroll| |
|javascript|jquery|js|scroll| |
|javascript|jquery|client-side|scroll| |
I am looking for a little bit of JQuery or JS that allows me to produce a horizontally scrolling "news ticker" list.
The produced HTML needs to be standards compliant as well.
I have tried [liScroll][1] but this has a habit of breaking (some content ends up on a second line at the start of the scroll), especially... |
What we did at our company is to set up a **tools** repository, and then a **project** repository. The **tools** repository is a Subversion repository, organized as follows:
/svn/tools
vendor1/
too11/
1.0/
1.1/
latest = a copy of vendor1/tool1/1.1
... |
What we did at our company is to set up a **tools** repository, and then a **project** repository. The **tools** repository is a Subversion repository, organized as follows:
/svn/tools/
vendor1/
too11/
1.0/
1.1/
latest = a copy of vendor1/tool1/1.1
... |
Phone and cable companies maintain a model of their wiring topology, which in effect is a large network or graph. Recursion is one way to traverse this model when you want to find all parent or all child elements.
Since recursion is expensive from a processing and memory perspective, this step is commonly only perf... |
There are some nice shots of sign up forms in the flickr set to go along with Luke Wroblewski's "Web Form Design" book
http://www.flickr.com/photos/rosenfeldmedia/sets/72157604272550634/
(which is jolly good - worth picking up if you're interested in this sort of thing).
|
I think you're generally best off having the server send a permanent redirect to the new location, if possible.
That way any rank which is gained from third party links should, in theory, be transferred to the new location. I'm not convinced whether this happens in practice, but it should. |
XML, or traversing anything that is a tree. Although, to be honest, I pretty much never use recursion in my job. |
Surely that many compilers out there use recursion heavily. Computer languages are inherently recursive themselves (i.e., you can embed 'if' statements inside other 'if' statements, etc.). |
The way Stackoverflow seems to be implemented everything after the question number is superfluous as far as linking to the question goes. For instance:
http://stackoverflow.com/questions/105830/this-is-a-good-question
links to this question, despite the fact that I just made up the 'question title' part out of t... |
If you want to use it in plain SQL, I would let the store procedure fill a table or temp table with the resulting rows (or go for @Tony Andrews approach).
If you want to use @Thilo's solution, you have to loop the cursor using PL/SQL.
Here an example: (I used a procedure instead of a function, like @Thilo did)
... |
I think F# has great opportunity to make inroads some of the niche areas of enterprise applications such as mathematical modelling (e.g. for banking/trading applications). Removing side effects from functions also leads to great opportunities for parallelism and memoization. Its hard to say if these languages will ever... |
What we did at our company was to set up a **tools** repository, and then a **project** repository. The **tools** repository is a Subversion repository, organized as follows:
/svn/tools/
vendor1/
too11/
1.0/
1.1/
latest = a copy of vendor1/tool1/1.1
... |
What we did at our company was to set up a **tools** repository, and then a **project** repository. The **tools** repository is a Subversion repository, organized as follows:
/svn/tools/
vendor1/
too11/
1.0/
1.1/
latest = a copy of vendor1/tool1/1.1
... |
We use [Awk][1] and Perl scripts to parse the log files and create summary reports and "databases" (technically databases in that each row corresponds to a unique event with many columns of data about that event, but not stored in a traditional database format. We're moving in that direction). I like Awk because you ... |
Generate a long section online. Save it to a txt file. Refer to txt file when offline. |
If you're new to vim, then run vimtutor
You may also want to start out by reading :help and learning how to use the help system. In particular :help topic<C-D> (control-D) and :help topic<TAB> (more useful if you have :set wildmenu) will help you find topics in vim's built-in help (which is notably superior to tr... |
I'm not sure if this applies to your question, but the latest news on the Gallio site states :
> **Gallio and ReSharper 4.0**
> A few people have asked when Gallio will
> support the final release of ReSharper
> 4.0. Unfortunately there were some last-minute breaking changes between
> ReSharper 4.0 Beta and th... |
What is the most accurate method of estimating peak bandwidth requirement for a web application? |
|asp.net|load|testing-strategies|bandwidth| |
I am working on a client proposal and they will need to upgrade their network infrastructure to support hosting an ASP.NET application. Essentially, I need to estimate peak usage for a system with a known quantity of users (currently 250). A simple answer like "you'll need a dedicated T1 line" would probably suffice, b... |
I downloaded it a while ago and tried it out, but as the documentation is pretty terrible at the moment (consisting of some auto-generated 'documentation' that was useless) I gave up pretty quickly. I think one of the most important things to have in a framework is clear, thorough documentation - if you have to spend t... |
You might want to take a look at [DataTable.WriteXml][1], and it's brother [DataTable.ReadXml][2]. No fuss, no muss saving of a DataTable.
[1]: http://msdn.microsoft.com/en-us/library/system.data.datatable.writexml.aspx
[2]: http://msdn.microsoft.com/en-us/library/system.data.datatable.readxml.aspx |
How to return JSON from a HandleError filter? |
|asp.net-mvc| |
aspnet mvc has the HandleError filter that will return a view if an error occurs, but if an error occurs when calling a JsonResult Action how can I return a JSON object that represents an error?
I don't want to wrap the code in each action method that returns a JsonResult in a try/catch to accomplish it, I'd rather ... |
[![alt text][2]][1]
[1]: http://stuffthathappens.com/blog/2008/03/05/simplicity/ "Stuff that happens"
[2]: http://stuffthathappens.com/blog/wp-content/uploads/2008/03/simplicity.png |
A semaphore is suited cleanly to a producer-consumer model, although it has other uses. Your program logic is responsible for ensuring that the right number of posts are made for the number of waits. If you post a semaphore and nobody is waiting on it yet, then when they do wait they continue immediately. If your probl... |
Unfortunately you are probably out of luck. On Error Resume Next is a legacy option that is generally heavily discouraged, and does not have an equivalent to my knowledge in C#.
I would recommend leaving the code in VB (It sounds like that was the source, given your specific request for OnError ResumeNext) and inter... |
C#: Try-catch every line of code without individual try-catch blocks |
|c#|try-catch| |
I do not currently have this issue, but you never know, and thought experiments are always fun.
Ignoring the obvious problems that you would have to have with your architecture to even be attempting this, let's assume that you had some horribly-written code of someone else's design, and you needed to do a bunch of w... |
**I do not currently have this issue**, but you never know, and thought experiments are always fun.
**Ignoring the obvious problems that you would have to have with your architecture to even be attempting this**, let's assume that you had some horribly-written code of someone else's design, and you needed to do a bu... |
Avoid Deletions of Files using TortoiseSVN |
|delete|administrator-rights| |
Guys, I am seeting up Apache server with TortoiseSVN for local source code repository.
I have observed that if some one delete any file using TortoiseSVN it will get deleted from every ones view and only log will be their in log history. I feel it is dangerous that any user can delete the file if S/He has RW rights (... |
|svn|tortoisesvn| |
I am setting up Apache server with TortoiseSVN for a local source code repository.
I have observed that if someone deletes a file using TortoiseSVN it will get deleted from everyone's view and the only log will be their in log history. I feel it is dangerous that any user can delete a file if they have read/write rig... |
SELECT * FROM (
SELECT * FROM table1
UNION ALL
SELECT * FROM table2
UNION ALL
SELECT * FROM table3
) subQry
WHERE field=value
|
How do I access a char ** through ffi in plt-scheme? |
|lisp|scheme|mysql| |
I'm mocking about with plt-scheme's ffi and I have a C-function that returns a char ** (array of strings). If I declare my function as `(_fun _pointer -> _pointer)`, how do I convert the result to a list of strings in scheme?
Here are the relevant C-declarations:
typedef char **MYSQL_ROW; /* return data as ... |
|c|mysql|lisp|scheme| |
Have your app redirect the old URL via a [301 Redirect][1]. This will tell Google to transfer the pagerank to the new URL.
[1]: http://en.wikipedia.org/wiki/URL_redirection#HTTP_status_codes_3xx |