instruction
stringlengths
0
30k
Does this include: - International numbers? - Extensions? - Other information besides the actual number (like "ask for bobby")? If all of these are no, I would use a 10 char field and strip out all non-numeric data. If the first is a yes and the other two are no, I'd use two varchar(50) fields, one for th...
Does this include: - International numbers? - Extensions? - Other information besides the actual number (like "ask for bobby")? If all of these are no, I would use a 10 char field and strip out all non-numeric data. If the first is a yes and the other two are no, I'd use two varchar(50) fields, one for th...
[Also Answered Here](http://stackoverflow.com/questions/43019/what-does-vs-2008s-convert-to-website-mean) so go vote that answer up, not this one. **Don't give me credit** >There are two types of web applications in ASP.NET: The Web Site and Web Application Project. The difference between the two are discussed here:...
Everyone seems to starts off with a few greps and perl expressions and you sorta kinda get something that works for your particular dataset but you have no idea if it's imported the data correctly or not. I'm seriously surprised nobody's built a solid library that can convert between the two. Here a list of ALL the ...
Take time to name the concepts of the system well, and find names that are related, this makes the system more familiar. Don't be hesitant to rename concepts, the better the connection to the world you know, the better your brain can work with it. Ask for opinions from people who get their kicks from clean, simple s...
Obviously, you cannot. The whole point of caching is that the 'thing' you cache is not going to change. So you either: - provide a parameter - aviod caching - invalidate the cache when you set a different parameter Or, you rewrite the cache mechanism yourself - to support some dynamic binding.
Instead of learning OO from scratch, I think it'd be easier if you took on a framework that facilitates object-oriented programming. It will "force" you to use the right OOP methods; you will be able to learn from the way the framework is written as to how to do OOP best. I'd recommend the QCodo PHP5 framework <htt...
Well there are apps such as [Tomboy][1] and [Beagle][2] which are available as part of some Linux distros so I'm not sure if they count as high street consumer applications. Come to think of it I'm not really that aware of any other "non-enterprise" applications written in .NET languages. [1]: http://www.gnom...
If you aren't already, using a precompiled header to include everything that you're not going to change (platform headers, external SDK headers, or static already completed pieces of your project) will make a huge difference in build times. http://msdn.microsoft.com/en-us/library/szfdksca(VS.71).aspx Also, althou...
The [Large Attachments][1] and [Binary Attachments (MTOM)][2] examples might help. [1]: https://metro.dev.java.net/guide/Large_Attachments.html [2]: https://metro.dev.java.net/guide/Binary_Attachments__MTOM_.html
It is interesting, but such **generated unit tests can actually be useful.** If you're working on a legacy application, it will be often hard to write correct, state-of-the-art unit tests. Such generated tests (if you have a way of generating them of course) can then make sure that behavior of code stays intact duri...
So the solution for me was to set up the replication publications to allow transformations and create a DTS package for each site that appends the siteid into the tables to keep the ids unique as I can't use guids.
Y-Modem Implementaion for .Net
|c#|.net|
Is there a ready and free Y-Modem Implemantion for .Net, preferrable C#? I found only C/C++ Solutions.
Non-unicode XML representation
|unicode|string|xml|character|
I have xml where some of the element values are unicode characters. Is it possible to represent this in an ANSI encoding? E.g. <?xml version="1.0" encoding="utf-8"?> <xml> <value>受</value> </xml> to <?xml version="1.0" encoding="Windows-1252"?> <xml> <value>&#27544</value> ...
You may find [Zeta Resource Editor][1] useful too. [1]: http://www.codeplex.com/zetaResourceEditor/
- Am I trying something impossible? No, it isn't impossible. - Did I took the wrong approach? Your approach is not working (at least in .net 2) - Do I have mistakes in this approach? I would try "Joel Coehoorn" solution (2nd answers) if it is possible. Otherwise, another option is to send a "st...
- Am I trying something impossible? No, it isn't impossible. - Did I took the wrong approach? Your approach is not working (at least in .net 2) - Do I have mistakes in this approach? I would try "Joel Coehoorn" solution (2nd answers) if it is possible. Otherwise, another option is to send a "st...
Firefox 3 implements node-set (as part of the EXSLT 2.0 namespace improvements) in it's client-side XSLT processing. Maybe not quite the answer you were looking for - but it could be, depending on the context of your problem. ;-)
I implemented [syringe.dll][1] (L-GPL) instead of MS Detours (we did not like the license requirements or huge payment for x64 support) it works fantastically well, I ported it from Win32 to Win64, we have been using in our off-the-self commercial applications for around 2 years now. We use it for very simple reaso...
I have a lot of problems with breakpoints in Xcode (2.4.1). I use a project that just contains other projects (like a Solution in Visual Studio). I find sometimes that breakpoints don't work at all unless there is at least one breakpoint set in the starting project (i.e. the one containing the entry point for my code)....
Select name From sysobjects Where type='U' and name = 'TempTable'
For CE, it's probably a non issue. If you were pushing this app to thousands of users and they were all hitting a centralized DB, you might want to spend some time on optimization. In a single-user instance DB like CE, unless you've got data that says you need to optimize, I wouldn't spend any time worrying about it....
Calculating frames per second in a game
|frame-rate|algorithm|
What's a good algorithm for calculating frames per second in a game? I want to show it as a number in the corner of the screen. If I just look at how long it took to render the last frame the number changes too fast.
What's a good algorithm for calculating frames per second in a game? I want to show it as a number in the corner of the screen. If I just look at how long it took to render the last frame the number changes too fast. Bonus points if your answer updates each frame and doesn't converge differently when the frame rate ...
|algorithm|frame-rate|
What's a good algorithm for calculating frames per second in a game? I want to show it as a number in the corner of the screen. If I just look at how long it took to render the last frame the number changes too fast. Bonus points if your answer updates each frame and doesn't converge differently when the frame rate ...
Excel column names
|excel|ado.net|
What column names cannot be used when creating an Excel spreadsheet with ADO. I have a statement that creates a page in a spreadsheet. CREATE TABLE [TableName] (Column string, Column2 string); I have found that using a column name of Date or Container will generate an error when the statement is executed. D...
Your question seems unclear, but caching pretty much means 'stored so we don't have to calculate it again'. If you want the content to differ, you need to cache more results and pick the correct cached object one to send back. Need more info to give a better answer. What is caching the document, Smarty? And what do ...
My pragmatic answer would be: yes, you always assume a toString() call is cheap, unless you make an enormous amount of them. On the one hand, it is extremely unlikely that a toString() method would be expensive and on the other hand, it is extremely unlikely that you run into trouble if it isn't. I generally don't worr...
I think developers who like that development model will adopt it, but I prefer webforms because the lifecycle provides a great way to create re-usable controls. And you can also maintain an MVC development style with webforms and be able to create unit tests of all your code, so being testable isn't really an argume...
Integrating with Google Docs
|google|
Has anyone integrated an "Open in Google Docs" in their web app yet? Gmail has this for opening attachments. How about any other sightings of this in a *non-google* web app?
It depends on what sort of validation you will be performing and where. I think that each layer of the application can be easily protected from bad data and its too easy to do for it not to be worth it. Consider a multi-tiered application and the validation requirements/facilities of each layer. The middle layer, Ob...
NUnit vs Visual Studio 2008's Test Projects for Unit Testing?
|c#|asp.net|unit-testing|asp.net-mvc|visual-studio-2008|
I am going to be starting up a new project at work and want to get into unit testing. We will be using VS 2008, C#, and the ASP.NET MVC stuff. I am looking at using either NUnit or the built in test projects that VS2008 has, but I am open to researching other suggestions. Is one system better than the other or perha...
MySQL slow query log - how slow is slow?
|mysql|performance|database|sqlserver|
What do you find is the optimal setting for mysql slow query log parameter, and why?
|database|mysql|performance|
There are a few different ways to do <a href="http://stackoverflow.com/questions/7089/what-is-the-best-way-to-create-rounded-corners-using-css">rounded corners in CSS</a> I prefer using CSS to tables whenever possible, just because I find the code to be a lot easier to maintain, and this sounds like a project with t...
I just read a great article on using windows built in typeperf.exe for just this issue. http://www.mssqltips.com/tip.asp?tip=1575
I think Nz is what you're after, syntax is `Nz(variant, [if null value])`. Here's the documentation link: [Nz Function][1] ---Person--- John Steve Richard DECLARE @PersonList nvarchar(1024) SELECT @PersonList = Nz(@PersonList + ',','') + Person FROM PersonTable PRINT @Pers...
Class' members are private by default. Struct's members are public by default. Besides that there are no other differences. Also see [this question][1]. [1]: http://stackoverflow.com/questions/54585/when-should-you-use-a-class-vs-a-struct-in-c
Thinking there must be a pure MAPI solution, I believe I've figured out how OutlookSpy does it. <br><br><br> The following code snippet, inserted after printf("Created MAPI session\n"); in the example from [KB194627][1], will show the "Server DN". LPPROFSECT lpProfSect; hr = lpSess->OpenPro...
Thinking there must be a pure MAPI solution, I believe I've figured out how OutlookSpy does it. <br><br><br> The following code snippet, inserted after printf("Created MAPI session\n"); in the example from [KB194627][1], will show the "Server DN". LPPROFSECT lpProfSect; hr = lpSess->OpenPro...
Whichever has < 1% market share.
You should use a good UI framework that solves most of the compatibility issues among browsers, like YUI!, jQuery, and so on... Personaly, I recommend YUI!
Structure of a PDF file?
|pdf|
For a small project I have to parse pdf files and take a specific part of them (a simple chain of characters). I'd like to use python to do this and I've found several libraries that are capable of doing what I want in some ways. But now after a few researches, I'm wondering what is the real structure of a pdf file,...
I my opinion this is an example where throwing an exception is okay. Your property probably does not have any context by which to correct the problem, as such an exception is in order and the calling code should handle the situation, if possible.
You generally shouldn't use <code>input()</code> in production code. If you want an int and then a float, try this: <code><pre> &gt;&gt;&gt; line = raw_input().split() &gt;&gt;&gt; a = int(line[0]) &gt;&gt;&gt; b = float(line[1]) &gt;&gt;&gt; c = " ".join(line[2:]) </pre></code> It all depends on what exactly ...
C-a C-k C-k C-y C-y
Depending upon what you are doing, something like the [getopt][1] module could be useful, but only in certain situations and I'm not sure if it would apply in yours. [1]: http://docs.python.org/lib/module-getopt.html
Github supports cloning using both the git protocol over port 9418 and HTTP over port 80. Using the later is very slow ([Reference][1]). You should open port 9418 on your firewall. [1]: http://github.com/blog/92-http-cloning
Github supports cloning using both the git protocol over port 9418 and HTTP over port 80. Using the later is very slow ([Reference][1]). You should open port 9418 on your firewall or use HTTP cloning otherwise. [1]: http://github.com/blog/92-http-cloning
Generally I would not use exception specifiers. However, in cases where if any other exception were to come from the function in question that the program would definitively be unable to *correct*, then it can be useful. In all cases, make sure to document clearly what exceptions could be expected from that function....
I can't find a link to one (I did look) but there are keyboards with only 5 keys, allowing you to type with one hand, I assume that you only have one bad wrist. If I find a link I'll try to message you.
ALTER TABLE {TABLENAME} ADD {COLUMNNAME} {TYPE} {NULL|NOT NULL} CONSTRAINT {CONSTRAINT_NAME} DEFAULT {DEFAULT_VALUE}
This should do the trick: URL url = new URL(yourUrlHere); Proxy proxy = new Proxy(Proxy.Type.DIRECT, new InetSocketAddress( InetAddress.getByAddress( new byte[]{your, ip, interface, here}), yourTcpPortHere)); URLConnection conn = url.openConnection(proxy); An...
UNION removes duplicates, whereas UNION ALL does not. In order to remove duplicates the result set must be sorted, and this *may* have an impact on the performance of the UNION, depending on the volume of data being sorted, and the settings of various RDBMS parameters ( For Oracle PGA_AGGREGATE_TARGET with WORKAREA_...
UTF-8 There is a very good article about unicode on JoelOnSoftware: [The Absolute Minimum Every Software Developer Absolutely, Positively Must Know About Unicode and Character Sets (No Excuses!)][1] [1]: http://www.joelonsoftware.com/printerFriendly/articles/Unicode.html
We have written a service that controls a single instance of Excel 2003. We never managed to get Excel instances to close cleanly, so we start one instance when the service is first accessed and use only that, serializing client requests.
How does strategy pattern works?
|design-patterns|
How does it work, what is it used for and when should one use it? **Note:** I know how it works, I just though it will be useful for the answer to be in stackoverflow.
How does the Strategy Pattern work?
How does it work, what is it used for and when should one use it?
Repeat to myself: **My code doesn't exist until it is checked in.** Or if you're not using version control, 'until it is published' or 'until it is launched.' You could also use fear and say that if YOU don't finish and launch it, someone else will.
What is a cairngorm "Comparator"
|apache-flex|actionscript-3|
Can anyone explain this in easy to understand terms?
I'd suggest a few simple rules and standard pairs and triplets would be good. For example, english sounding words tend to follow the pattern of vowel-consonant-vowel, apart from some dipthongs and standard consonant pairs (e.g. th, ie and ei, oo, tr). With a system like that you should strip out almost all words tha...
|xml|string|unicode|character|
I have xml where some of the element values are unicode characters. Is it possible to represent this in an ANSI encoding? E.g. <?xml version="1.0" encoding="utf-8"?> <xml> <value>受</value> </xml> to <?xml version="1.0" encoding="Windows-1252"?> <xml> <value>&#27544;</value> ...
As mentioned, I know of Tomboy, Beagle, and in addition, F-Spot. All come as part of most linux distros. Paint.NET is another app.
ok. then I suggest Colins method.. I use cron to monitor emails (for a particluar domain) and send text messages as alerts!. Similar to what you are asking!
I have / had a similar issue with developers deploying SQL code to MSSQL (in fact to any database on that MSSQL server, so role had to be SysAdmin) using ANT from a Solaris server. Again I did not want to store the username and password in the ANT build.xml files so my solution, which I know is not ideal, is as follows...
OK just got the following reply from the author: http://weblog.ikvm.net/CommentView.aspx?guid=7e91b51d-6f84-4485-b61f-ea9e068a5fcf > If you want to build from cvs, you're on your own. However, you can more easily build from source if you use an official release. >If you download ikvm-0.36.0.11.zip, classpath-0.95...
OK just got the following reply from the author: http://weblog.ikvm.net/CommentView.aspx?guid=7e91b51d-6f84-4485-b61f-ea9e068a5fcf > If you want to build from cvs, you're on your own. However, you can more easily build from source if you use an official release. >If you download ikvm-0.36.0.11.zip, classpath-0.95...
@qui Another thing to consider is that initList is not part of the API. That method could disappear or the behavior could change significantly in future releases of Ext. If you never plan on upgrading, then you don't need to worry.
The language the analytical engine would have used was its own machine code, entered via punch cards indicating the operation to be performed and the columns (effectively registers) to perform it to. See [these notes][1] for some details. [1]: http://www.fourmilab.ch/babbage/sketch.html
What the vcvars32 or vsvars32 batch files do is not rocket science. They simply set the PATH, INCLUDE, LIB, and possibly the LIBPATH environment variables to sensible defaults for the particular compiler version. All you have to do is make sure that those things are set properly for your Ant or makefile (either bef...
You can use the CM_Request_Device_Eject() function as well as possibly some other possibilities. Consult the following projects and articles: DevEject: Straightforward. http://www.withopf.com/tools/deveject/ A useful CodeProject article: http://www.codeproject.com/KB/system/RemoveDriveByLetter.aspx
I would suggest using the [PureText][1] lightweight utility application by Steve Miller for this. PureText runs in your system tray and listens on a global hotkey (which you can define -- I use Win+V) to perform a "paste text sans formatting" -- essentially the same operation as opening up an instance of notepad.exe...
Best way to extract TimeZone object from a String?
|java|timezone|
I have a database field that contains a raw date field (stored as character data), such as >Friday, September 26, 2008 8:30 PM Eastern Daylight Time I can parse this as a Date easily, with SimpleDateFormat DateFormat dbFormatter = new SimpleDateFormat("EEEE, MMMM dd, yyyy hh:mm aa zzzz"); Date schedu...
Is there a way to compile C++ code to Microsoft's CIL "bytecode"?
|.net|c++|browser|cil|