instruction
stringlengths
0
30k
Sorry, for spamming this question, but I just really feel like posting **The Real Answer**. If you want your BATCH script to *parse* and *compare* the dates in filenames, then you can use something like this: @echo off rem Enter the ending of the filenames. rem Basically, you must specify everything...
The first thing I do with any editor is try to figure out it's Regex oddities. I use it all the time. Nothing really crazy, but it's handy when you've got to copy/paste stuff between different types of text - SQL <-> PHP is the one I do most often - and you don't want to fart around making the same change 500 times.
I may not be right, but I think Id is a tastier dish. thing.id because if you are going to write any reflective stuff that deals with your objects and needs primary key, its way easier to know it everywhere, then trying to determine it with a formula. As for the other, thats total preference and I don't see an...
How to check if element in groovy array/hash/collection/list?
|arrays|list|groovy|grails|
How do I figure out if an array contains an element? I thought there might be something like [1,2,3].includes(1) which would evaluate as 'true'
Couple feature additions: * Automatically insert page breaks after methods/classes * Keep long lines readable (nearly all current implementations are broken)
Cruise Control.net (ccnet) does everything you are looking for. Its pretty easy to use, just make sure if you are going to run it as a service, you give it an account and don't make it run as network service, that way you can give it rights on intranet boxes and have it do xcopy deploys. It has all kinds of email mo...
TypeLoadException on System.Xml.Linq.XDocument when running T4 template on build server
These are relatively cheap mechanisms for possibly solving the problem: 1. Keep an eye on my [heap corruption question][1] - I'm updating with the answers as they shake out. The first was balancing new[] and delete[], but you're already doing that. 2. Give valgrind more of a go; it's an excellent tool, and I onl...
These are relatively cheap mechanisms for possibly solving the problem: 1. Keep an eye on my [heap corruption question][1] - I'm updating with the answers as they shake out. The first was balancing new[] and delete[], but you're already doing that. 2. Give valgrind more of a go; it's an excellent tool, and I onl...
These are relatively cheap mechanisms for possibly solving the problem: 1. Keep an eye on my [heap corruption question][1] - I'm updating with the answers as they shake out. The first was balancing new[] and delete[], but you're already doing that. 2. Give [valgrind][2] more of a go; it's an excellent tool, and ...
|versioning|subversion|photoshop|
|svn|versioning|photoshop|
Frankly, I can't find a single reason to use MySQL rather than MSSQL. The issue before used to be cost but SQL Server 2005 Express is free and there are lots of web hosting companies which offer full hosting with sql server for less than $5.00 a month. MSSQL is easier to use and has many features which do not exist ...
If you're going to insist on doing this with a regular expression, you'd probably be better off with: ( (0?1|0?3| <...> |10|11|12) / (0?1| <...> |30|31) | 0?2 / (0?1| <...> |28|29) ) / (19|20)[0-9]{2} This *might* make it possible to read and understand.
If you're going to insist on doing this with a regular expression, I'd recommend something like: ( (0?1|0?3| <...> |10|11|12) / (0?1| <...> |30|31) | 0?2 / (0?1| <...> |28|29) ) / (19|20)[0-9]{2} This *might* make it possible to read and understand.
Google Finance - Get Quotes search box - Column Alignment
|ajax|
How does Google manage to properly align the second column (i.e. the ticker name) in the "Get Quotes" search box suggestion dropdown in http://finance.google.com? e.g. if you enter "iii" - the second column is perfectly aligned. It does not use a fixed-width font - so just adding the correct numbers of spaces to ...
|javascript|html|css|ajax|
@Blorgbeard Good response, the MSDN documentation on "WITH ENCRYPTION" seems to agree with your point, now calling it "obfuscated" rather then encrypted. I've met a few developers who were completely unaware of this point however. Hopefully this question/response will inform others too.
What would it take to make OpenID mainstream?
|security|openid|user-interfaces|
OpenID is a great idea in principle, but the UI and the explanation as to why it is good are currently not tailored for general use -- what do you think it would take to make OpenID work for the general public? Can this be solved with technology, or is the problem so intrinsically hard that we are stuck with difficult...
|security|openid|user-interfaces|
This is probably overkill for such a simple task, but if you plan to do more than that, then it's saner to start from these tools (mechanize, BeautifulSoup) because they are much easier to use than the alternatives (urllib to get content and regexen or some other parser to parse html) Links: [BeautifulSoup][1] [m...
Try [![alt text][1]](http://www.sparxsystems.com.au/products/ea/index.html) But, It is NOT free It has amazing features.. Check the [screenshots](http://www.sparxsystems.com.au/products/ea/screenshots.html) here. And they have [![alt text][2]](http://www.sparxsystems.com.au/products/mdg/int/vs/index.html)...
NHibernate vs LINQ
|linq|nhibernate|
As someone wo hasn't used either technology on real-world projects I wonder if anyone knows how these two complement each other and how much their functionalities overlap?
|linq|nhibernate|orm|
NHibernate vs LINQ to SQL
|linq|orm|nhibernate|
|linq|nhibernate|orm|
As someone who hasn't used either technology on real-world projects I wonder if anyone knows how these two complement each other and how much their functionalities overlap?
I guess like a lot of things: it depends. I usually do both. Some content stay fixed width to look good or if it can't benefit form more space. other stuff is set to 100% if it seems like it'd be usefull.
I guess like a lot of things: it depends. I usually do both. Some content stays fixed width to look good or if it can't benefit form more space. other stuff is set to 100% if it seems like it'd be usefull.
c/c++ source code visualization?
|hacking|
Basically I want tools which generate function call graph, dependency graph etc.
|hacking|c|c++|tools|
|c++|c|hacking|visualisation|
A variation is where you use a direct hierarchical representation (ie. parent link in node), but also store a path value. ie. for a directory tree consisting of the following: C:\ Temp Windows System32 You would have the following nodes Key Name Parent Path ...
These are relatively cheap mechanisms for possibly solving the problem: 1. Keep an eye on my [heap corruption question][1] - I'm updating with the answers as they shake out. The first was balancing new[] and delete[], but you're already doing that. 2. Give [valgrind][2] more of a go; it's an excellent tool, and ...
I like [MicroAngelo][1]. [1]: http://www.microangelo.us/
As someone else said, 'what platform'. On Windows I've used 'blat', which is a freebie command line SMTP mailer to do this, along with a post-commit and another batch file. The post commit looks like this: (Just calls another batch file) call d:\subversion\repos\rts\hooks\mail %1 %2 And mail.bat looked...
Is this something that needs to be done often and automatically, or is this just a one time thing for your app? If the latter is correct, MyViewPad will work.
PHP Object Oriented or not?
|php|web-applications|object-oriented-design|
I have a start of a webapp that I wrote without using the Object Oriented features of PHP. I don't really know if it is worth it to go back and rewrite the parts I have finished. Is object oriented PHP worth rewriting all or part of a decent working app?
|php|oop|web-applications|
Something special about Safari for Windows and AJAX?
|ajax|
Some common pitfalls I should keep in mind?
|javascript|windows|ajax|browser|safari|
The SQL Server Books Online's [page on the subject](http://msdn.microsoft.com/en-us/library/ms131089.aspx) lists these benefits: * **A better programming model.** The .NET Framework languages are in many respects richer than Transact-SQL, offering constructs and capabilities previously not available to SQL Server de...
Are CLR stored procedures preferred over TSQL stored procedures in SQL 2005+ ?
|.net|sql-server|t-sql|
My current view is no, prefer Transact SQL stored procedures because they are a lighter weight and (possibly) higher performing option, while CLR procedures allow developers to get up to all sorts of mischief. However recently I have needed to debug some very poorly written TSQL stored procs (yet again). As usual I...
Using stored procedures and/or parameterized queries will go a long way in protecting you from sql injection. Also do *NOT* have your web app access the database as sa or dbo - set a up a standard user account and set the permissions. AS for XSS (cross site scripting) ASP.NET has some built in protections. The best...
Once you _do_ find some good guide, here's something to remember: Django is a bit special with its terminology. It uses "MTV" for Model, Template and View (and can mention also a URL Dispatcher somewhere along the way), whereas a more standard set of terms is "MVC" for Model, View and Controller. Model is the same i...
[MySQL++][1] [1]: http://tangentsoft.net/mysql++/
@Ryan Eastabrook: In my (admittedly limited) experience with SSIS, it is quite good at rapidly getting something up and running, but frusteratingly limited in getting something that "feels" like the most elegant, efficient solution to a programmer. Since the Excel Source Editor seems to take only files as input...
Git is superior to subversion, but it's a little bit out on the bleeding edge. I'd say, if you're just getting started, jump on the edge; setup a free account @ http://github.com They have educational material on site for setting up & using git.
- What do friendly bots see (eg: Google); check using [Google Webmaster Tools][1]; - What form controls aren't validated that lead to a database or system API call; I use the Firefox [Web Developer Toolbar][2] to fiddle with the forms; [OWASP][3] has a few good [security guides][4] as well. [1]: http://w...
- What do friendly bots see (eg: Google); check using [Google Webmaster Tools][1]; [1]: http://www.google.com/webmasters/tools/
I have found the application [IcoFx](http://icofx.ro/) useful, you can import pretty much any image type to use for icon creation, including PNG's.
I stumbled upon Icon Sushi a little while back and love it. It hasn't been updated in about a year, but it still works great, even in Vista. Plus it is free. http://www.towofu.net/soft/e-aicon.php
I also use Gif Movie Gear to create `.ico` files. This online [Favicon Generator][1] tool also seems to work fine. [1]: http://tools.dynamicdrive.com/favicon/
Is this an exception that your code would actually handle if you weren't running in the debugger?
The META-INF.services stuff is known by its class name in the API: [ServiceLoader][1]. A Google search for [ServiceLoader][2] yields some information. I am not really familiar with it, but sometimes it's all about knowing the right search keywords. [1]: http://java.sun.com/javase/6/docs/api/java/util/ServiceLoa...
I agree with Mike, though I'm a Vim die-hard. I've been using GEdit quite frequently lately when I'm doing lightweight Ruby scripting. The standard editor (plus Ruby code snippets) is extremely usable and polished, and can provide a nice reprieve from full-strength, always-on programming editors.
It's now defunct but [phpdbi][1] is possibly worth a look. If you're willing to let go of some of your caveats (the framework one), I've found that [Doctrine][2] is a pretty neat way of accessing DBs in PHP. Worth investigating anyway. [1]: http://phpdbi.sourceforge.net/web/ [2]: http://www.phpdoctrine.org/
Do you really need per-commit back-ups? There are almost certainly better ways of safe-guarding against failures than going down that route. For example, given that most failures are disk failures, move to a RAID array and/or NAS/SAN storage will provide you with better general protection and, if configured correctly, ...
Sounds like what you are looking for is basically federated (synced) servers... I asked the same question recently...and while I didn't find the exact solution I was looking for it came close. See here: [http://stackoverflow.com/questions/1790/federated-synced-subversion-servers][1] [1]: http://stackoverflow.c...
Resolving Session Fixation in JBoss
|java|security|jboss|
I need to prevent [Session Fixation][1], a particular type of session hijacking, in a Java web application running in JBoss. However, it appears that the standard idiom [doesn't work in JBoss][2]. Can this be worked around? [1]: http://www.owasp.org/index.php/Session_Fixation [2]: http://www.owasp.org/index.php...
|.net|t4|texttransform|typeloadexception|
I'm having a problem running a T4 template using TextTransform.exe on my build server. On my dev machine the template works perfectly. The error message is as follows. error : Running transformation: System.TypeLoadException: Could not instantiate type 'System.Xml.Linq.XDocument' The build server has the windows ...
I've used [cc.net][1] with nant and msbuild with great success, would highly recommend it. [1]: http://confluence.public.thoughtworks.org/display/CCNET/Welcome+to+CruiseControl.NET
@Brian Chiasson Unfortunately, it's not an option to create all classes of GIS data because classes are created dynamically in the application. Every GIS data of the same type should be a class, but my user has the possibility to get new set of data and put it in the database. I can't know in front which classes my ...
Gulzar and Ryan Lanciaux make good points in mentioning CodeSmith and ORM. Either of those might reduce or eliminate your current burden when it comes to generating dynamic SQL. Your current approach of using parameterized SQL is wise, simply because it protects well against SQL injection attacks. Without an actua...
I think you are going to have some problems with the granularity. See similar questions [GetLocalTime() API time resolution][1] and Is [gettimeofday() guaranteed to be of microsecond resolution?][2] Also, you may want to take a look at the [Windows Resource Kits Tools][3] which include timeit.exe (similar to `time` ...
This is probably overkill for such a simple task, but if you plan to do more than that, then it's saner to start from these tools (mechanize, BeautifulSoup) because they are much easier to use than the alternatives (urllib to get content and regexen or some other parser to parse html) Links: [BeautifulSoup][1] [m...
For my company, I use svn+ssh and key-based authentication. You can do this with both windows clients and linux clients. This is real easy to use once you get your keys straight as you use an ssh key to login rather than typing a password. Here's an article on setting up svn+ssh with notes on security. If you unders...
For my company, I use svn+ssh and key-based authentication. You can do this with both windows clients and linux clients. This is real easy to use once you get your keys straight as you use an ssh key to login rather than typing a password. Here's an article on setting up svn+ssh with notes on security. If you unders...
|.net|sql-server|t-sql|sqlclr|
WCF, ASP.NET Membership Provider and Authentication Service
|wcf|web-service|.net|
I have written a Silverlight 2 application communicating with a WCF service (BasicHttpBinding). The site hosting the Silverlight content is protected using a ASP.NET Membership Provider. I can access the current user using HttpContext.Current.User.Identity.Name from my WCF service, and I have turned on AspNetCompatibil...
|.net|web-services|wcf|
I have written a Silverlight 2 application communicating with a WCF service (BasicHttpBinding). The site hosting the Silverlight content is protected using a ASP.NET Membership Provider. I can access the current user using HttpContext.Current.User.Identity.Name from my WCF service, and I have turned on AspNetCompatibil...
I have written a Silverlight 2 application communicating with a WCF service (BasicHttpBinding). The site hosting the Silverlight content is protected using a ASP.NET Membership Provider. I can access the current user using HttpContext.Current.User.Identity.Name from my WCF service, and I have turned on AspNetCompatibil...
Unless you want to do something a little complex, using the generic views are the way to go. They are far more powerful than their name implies, and if you are just displaying model data generic views will do the job.
[This defect][1] (found [here][2]) points the way to the solution. The Tomcat instance that runs in JBoss is configured with emptySessionPath="true", rather than "false", which is the default. This can be modified in `.../deploy/jboss-web.deployer/server.xml`; both the HTTP and AJP connectors have this option. The f...
@Dan, > Do I not need msdtc enabled for > transactions to work? Only distributed transactions - Those that involve more than a single connection. Make doubly sure you are only opening a single connection within the transaction and it won't escalate - Performance will be much better too.
You could consider [log4net][1]. It is a robust logging framework that exists in a single DLL. It is also done in a "non demanding" type mode so that if a critical process is going on, it won't log until resources are freed up a bit more. You could easily setup a bunch of INFO level loggers and track all the user in...
I may have misunderstood your question but.... The 'grey bar telling you what type of control it is' only shows up if you are looking at the page in 'design view' in your IDE (are you using Visual Studio?). Once you run the page this label is not visible. It is very common for pages that have dynamic/serve...