instruction stringlengths 0 30k ⌀ |
|---|
I'm setting yup a Greenfield (yeeea!) web application just now was wondering how other people first setup their project with regards to automated/CI build?
I generally follow this:
1. Create SVN Repository with basic layout (trunk, braches, lib, etc.)
2. Create basic solution structure (core, ui, tests)
3. Crea... |
csv api for java |
|java|api|csv| |
Can anyone recommend a simple API that will allow me to use read a csv input file, do some simple transformations, and then write it.
A quick google has found http://flatpack.sourceforge.net/ which looks promising.
I just wanted to check what others are using before I couple myself to this api.
thanks,
... |
I suggest that you create standards for your SQL scripting and stick to them. Also use templates to quickly create different types of stored procedures and functions. Here is a question about templates in SQL Server 2005 Management Studio
[How do you create SQL Server 2005 stored procedure templates in SQL Server 2... |
> Having to configure it to do it doesn't count,
Theres a logic flaw there. Either you configure it, or the installer configures it. It _won't_ just automagically happen all on its own ;) |
Ankh is a open source choice
http://ankhsvn.open.collab.net/
|
How do I change the build directory that MSBuild uses under Team Foundation Build? |
|tfs|tfsbuild|msbuild| |
I'm getting the following error when trying to build my app using Team Foundation Build:
>>C:\WINDOWS\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets(1682,9): error MSB3554: Cannot write to the output file "obj\Release\Company.Redacted.BlahBlah.Localization.Subsystems.Startup_Shutdown_Processing.StartupShutdow... |
I'm getting the following error when trying to build my app using Team Foundation Build:
>>C:\WINDOWS\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets(1682,9): error MSB3554: Cannot write to the output file "obj\Release\Company.Redacted.BlahBlah.Localization.Subsystems.Startup_Shutdown_Processing.StartupShutdow... |
|tfs|msbuild|tfsbuild| |
You could use this to find out who the process owner is, then once you have that you can use Win32_Process to kill the process by the process ID.
[MSDN Win32_Process class details][1]
[MSDN Terminating a process with Win32_Process][2]
[1]: http://msdn.microsoft.com/en-us/library/aa394372.aspx
[2]: ht... |
You could use this to find out who the process owner is, then once you have that you can use Win32_Process to kill the process by the process ID.
[MSDN Win32_Process class details][1]
[MSDN Terminating a process with Win32_Process][2]
[1]: http://msdn.microsoft.com/en-us/library/aa394372.aspx
[2]: ht... |
To remove the sub query in the SELECT statement I suggest the following:
SELECT list_name, app_name, map.fname + ' ' + map.lname as agent_login, input, convert(varchar,dateadd(ss, TAC_BEG_tstamp, '01/01/1970))
FROM dbo.maps_report_list inner join
(dbo.report_tac_agent as tac inner join dbo.d_agent_de... |
|c++|windows|command-line| |
I have several applications that are part of a suite of tools that various developers at our studio use. these applications are mainly command line apps that open a DOS cmd shell. These apps in turn start up a GUI application that tracks output and status (via sockets) of these command line apps.
The command line ... |
You should not be able to do that for any public wiki. If you are hosting it yourself, then you need to ask for a specific wiki system so someone can help you to modify the settings - if at all possible for that system. |
You should not be able to add javascript code for any public wiki. If you are hosting it yourself, then you need to ask for a specific wiki system so someone can help you to modify the settings - if at all possible for that system. |
No, it is not directly editable. MSDN has samples for using the DataGrid, including suggestions for data editing, for both [Pocket PC][1] and [Smartphone][2] devices. Either one would be a reasonable start for a generic CE device, but the general strategy is to determine which cell is active and place a textbox over ... |
How can you make a web page send to the printer something different than what's in the browser window? |
|browser|printing| |
Google Maps used to do this bit where when you hit the "Print" link, what would be sent to the printer wasn't exactly what you had on the screen, but rather a differently-formatted version of mostly the same information.
It appears that they've largely moved away from this concept (I guess people didn't understand ... |
I'm getting the following error when trying to build my app using Team Foundation Build:
>C:\WINDOWS\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets(1682,9): error MSB3554: Cannot write to the output file "obj\Release\Company.Redacted.BlahBlah.Localization.Subsystems.
Startup_Shutdown_Processing.StartupShutdo... |
(a -> b) means "function from a to b". In type annotation, it denotes a function type. For example, f : (int -> String) means that f refers to a function that takes an integer and returns a string. It is also used as a contstructor of such values, as in
val f : (int -> int) = fun n -> n * 2
which creates a va... |
<A href="http://www.finkproject.org/">Fink</a> appears to have a full set of Boost packages... |
<A href="http://www.finkproject.org/">Fink</a> appears to have a full set of Boost packages...
With fink installed and running just do
fink install boost1.35.nopython
at the terminal and accept the dependencies it insists on. Or use
fink list boost
to get a list of different packages that are ava... |
A little more information please; do you want to log IPs or lock access via IP? Both those functions are built into IIS rather than ASP.NET; so are you looking for how to limit access via IP programatically? |
There could be a leak in the JNI code.
Remember to use (*jni)->DeleteLocalRef() for any object references you get once you are done with them. If you use any native C buffers to create new Java objects, make sure you free them off once the object is created. Check the JNI Specification for further guidelines.
D... |
The "good deployment" issue -- for Python -- doesn't have the Deep Significance that it has for Java.
Python deployment for Django is basically "move the files". You can run straight out of the subversion trunk directory if you want to.
You can, without breaking much of a sweat, using the Python [distutils][1] a... |
The account you are running under needs to be part of the developer user group. Otherwise you will not be able to debug correctly. |
What is the best tool to convert common video formats to FLV on a Linux CLI |
|linux|flash|video|flv| |
Part of a new product I have been assigned to work on involves server-side conversion of the 'common' video formats to something that Flash can play.
As far as I know, my only option is to convert to FLV. I have been giving ffmpeg a go around, but I'm finding a few WMV files that come out with garbled sound (I've tr... |
(?:(?<!s)and|\s+|\,)
Might work |
(?:(?<!s)and\s+|\,\s+)
Might work
Don't have a way to test it, but took out the just space matcher. |
Windows shell, one liner:
FOR /F %%I IN ('DIR *.* /B /O:-D') DO COPY %%I <<NewDir>> & EXIT |
Shove them in a [quadtree](http://en.wikipedia.org/wiki/Quadtree). |
If you're getting square blocks, rather than complete garbage, you probably just need to specify a more suitable font in Visual Studio (in Tools | Options | Fonts and Colors). Try MS Gothic or MS Mincho (both Japanese fonts); I am guessing your issue can be resolved by tweaking the settings for [Watch, Locals and Autos... |
Any variations in color are better done in HSL/HSV.
A good test is to interpolate between two equivalent values in RGB space and HSL space. The ramp in HSL space looks like a natural progression. In RGB space it typically looks quite unnatural. HSL maps to our visual color space perception much better than RGB.... |
The snippet above relates to an element (could be a div, span, image or otherwise) with an id of section.
The element has a background image of blah.png which will repeat in both x and y directions.
The top edge of the element will be positioned 0px (or any other units) from the top of it's parent element if the... |
How about the second method without repeated allocation--in other words, allocate your temporary vector once, and never allocate it again? Or, if the input vectors are small enough (But not constant size), just use alloca instead of malloc. |
How about the second method without repeated allocation--in other words, allocate your temporary vector once, and never allocate it again? Or, if the input vectors are small enough (But not constant size), just use alloca instead of malloc.
Also, in terms of speed, you may want to make sure that your code is using ... |
The best course of action for you will depend on how you are approaching your data access. There are three approaches you can take:
- Use stored procedures
- Keep the queries in the code (but put all your queries into functions and fix everything to use PDO for parameters, as mentioned earlier)
- Use an ORM ... |
i don't think a strictly linear solution is possible, because widening the src vector spans may in the worst-case cause all of them to overlap (depending on the magnitude of the constant that you are adding)
the problem may be in the implementation, not in the algorithm; i would suggest profiling the code for your p... |
Some sample code:
public partial class Form1 : Form {
public Form1() {
InitializeComponent();
this.AllowDrop = true;
this.DragEnter += new DragEventHandler(Form1_DragEnter);
this.DragDrop += new DragEventHandler(Form1_DragDrop);
}
voi... |
Unfortunately, you won't find a **good** answer to this; even if you found some hard statistics on browser versions for visitors to your website, that almost certainly doesn't tell you what you need to know.
What you need to know isn't "what percent of my visitors use Browser X", it's "what percent of my revenue com... |
|browser|printing|css| |
Google Maps used to do this bit where when you hit the "Print" link, what would be sent to the printer wasn't exactly what you had on the screen, but rather a differently-formatted version of mostly the same information.
It appears that they've largely moved away from this concept (I guess people didn't understand ... |
|html|css|browser|printing| |
A possible solution is:
- signed-in in the rich client
- a random token is generated by the server and stored againsed the signed-in user
- rich client gets that tocken from the server
- that tocken is used in the url pointing to the website
- going to that url (using a link or a button from the ruch c... |
A possible solution is:
- sign-in to the rich client
- a random token is generated by the server and stored againsed the signed-in user
- rich client gets that tocken from the server
- that tocken is used in the url pointing to the website
- going to that url (using a link or a button from the rich cli... |
Instead of making a format, I'd just decide on a convention. One or more named files within the container have the metadata you need to access the rest of the files, and know what to do with them. The container itself, though, should just be some ubiquitous format, such as zip. No need to reinvent the wheel, here.
|
Advice on handling large data volumes. |
|java|large-data-volumes|loading|data| |
So I have a "large" number of "very large" ASCII files of numerical data (gigabytes altogether), and my program will need to process the entirety of it sequentially at least once.
Any advice on storing/loading the data? I've thought of converting the files to binary to make them smaller and for faster loading.
S... |
|java|data|largefile|loading|large-data-volumes| |
You could convert to binary, but then you have 1+ something copies of the data, if you need to keep the original around.
It may be practical to build some kind of index on top of your original ascii data, so that if you need to go through the data again you can do it faster in subsequent times.
To answer your q... |
Since you already automatically increment the id for each new member, you can order by id. |
Direct Path Load of TimeStamp Data With SQL*LDR |
|oracle-database|sql-loader| |
The SQL-LDR documentation states that you need to do a convetional Path Load:
> When you want to apply SQL functions
> to data fields. SQL functions are not
> available during a direct path load
I have TimeStamp data stored in a CSV file that I'm loading with SQL-LDR by describing the fields as such:
STA... |
Why aren't Java Collections remove methods generic? |
|java|generics|api|collections| |
Why isn't [Collection.remove(Object o)][1] generic?
Seems like `Collection<E>` could have `boolean remove(E o);`
Then, when you accidentally try to remove (for example) `Set<String>` instead of each individual String from a `Collection<String>`, it would be a compile time error instead of a debugging problem l... |
OK, I figured it out. I needed to upgrade the `fedora-release` package. That allowed me to see all of the updated packages. Thanks to ethyreal for pointing me to the Yum upgrade FAQ. |
I am not sure I understand. If each user wants a different order how will you store individual user preferences in one single field in the "members" table?
Usually you just let users to order based on the natural order of the fields. What is the purpose of the order field? |
How do you create automated tests of a Maven plugin using JUnit? |
|java|maven-2|automated-tests|maven2|mvn| |
I've got a (mostly) working plugin developed, but since its function is directly related to the project it processes, how do you develop unit and integration tests for the plugin. The best idea I've had is to create an integration test project for the plugin that uses the plugin during its lifecycle and has tests that... |
You could also have an RSS feed tying into the application that would publish an update as soon as something occurred. Granted that would require you to have an RSS reader constantly pinging the application.
Similarly, if you use the log4j/log4net framework, you can log a "fatal" or other special event for these act... |
Well, stadards are pretty much a myth. Ther is no one true standard. If you don't believe me, then just read [Joel's article][1] on the subject.
[1]: http://www.joelonsoftware.com/items/2008/03/17.html |
[SlickEdit][1] has some feature for that. I am not sure if it counts inline code. Worth giving it a try. If it does not work, let me know so that I can update my post.
The SLOC Report
The SLOC Report tool provides an easy way to count the lines of code. The line count is divided into three categories: code, comment... |
**Be careful with mutable default arguments**
>>> def foo(x=[]):
... x.append(1)
... print x
...
>>> foo()
[1]
>>> foo()
[1, 1]
>>> foo()
[1, 1, 1]
|
Try [HashSet](http://msdn.microsoft.com/en-us/library/bb359438.aspx) in .NET 3.5 |
Try [HashSet](http://msdn.microsoft.com/en-us/library/bb359438.aspx) in .NET 3.5.
[This page](http://blogs.msdn.com/bclteam/archive/2006/11/09/introducing-hashset-t-kim-hamilton.aspx) from a member of the .NET BCL team has some good information on the intent of HashSet |
If you're writing ANSI M code, you shouldn't have types at all. My guess is that this is specific to Intersystems code. |
There is no way to ``block'' signals temporarily from critical sections (since this is not supported by all Unix flavors).
http://docs.python.org/lib/module-signal.html
|
At work a lot of our documents go under Sharepoint or some other document system that really slows down the "release" of a document. This means there are copies of the documents all over the place and getting someone to properly release something is a headache. Due to this I normally received specs in power point or sc... |
I like [GTK+][1] personally but that or any of the ones you mentioned should be OK. I don't know which is the best in terms of least RAM usage.
[1]: http://www.gtk.org/ |
Writing deadlock-proof code is really hard. Even when you access the tables in the same order you may still get deadlocks. I wrote [a post on my blog][1] that elaborates through some approaches that will help you avoid and resolve deadlock situations.
If you want to ensure two statements/transaction will never dead... |
You can force secuential execution by defining "onload" (or similar) events on the scripts and inject the next one in the event function.
It is not trivial, but there are plenty of examples out there, here is one.
<http://www.phpied.com/javascript-include-ready-onload/>
I think popular libraries like jQuery or p... |
Class diagram doesn't always work. I often find it wont display the classes for some reason. Pen & pencil or talking with people who work on the project is what I have to rely on. |
My habit is to use 't' - close to 'r' so it follows easily aftewr typing 'for' |
`i`
if I have a nested loop then also `j`.
This convention is so common that if you manage to come across a variable `i` in a block of code that you can't see the start of you still instantly recognise it for what it is. |
We use [JavaCSV][1], it works pretty well
[1]: http://sourceforge.net/projects/javacsv/ |
Strictly speaking you can't really be sure you got the right value, since the meta tag may be commented out, or the meta tag may be in uppercase etc. It depends on how certain you are that the HTML can be considered as "nice". |
I have found one portable way to predict and/or limit the number of characters returned by sprintf and related functions, but it's inefficient and many consider it inelegant.
What you do is create a temporary file with tmpfile(), fprintf() to that (which reliably returns the number of bytes written), then rewind and... |
I have found one portable way to predict and/or limit the number of characters returned by sprintf and related functions, but it's inefficient and many consider it inelegant.
What you do is create a temporary file with tmpfile(), fprintf() to that (which reliably returns the number of bytes written), then rewind and... |
I have found one portable way to predict and/or limit the number of characters returned by sprintf and related functions, but it's inefficient and many consider it inelegant.
What you do is create a temporary file with tmpfile(), fprintf() to that (which reliably returns the number of bytes written), then rewind and... |
it's good if it's in their password (as alas, financial companies like to deny you this security right [i'm talking to you american express]).
username, i say no, unless they want to. |
To boil down your problem, you want to be able to have a class that has a **ushort[,] pixels** field (16-bits per pixel) sometimes and a **uint32[,] pixels** field (32-bits per pixel) some other times. There are a couple different ways to achieve this.
You could create replacements for ushort / uint32 by making a Pi... |
Visual Studio 2005 says I don't have permission to debug? |
|visual-studio|debugging|asp.net| |
I am new to visual studio/asp.net so please bear with me. Using vs 2005 and asp.net 3.5. I have vs installed on the production server. If I set the start option for the site to "use default web server" when I go to debug my website vs tries to open the site at http://localhost:4579/project and returns 404. If I set ... |
|asp.net|visual-studio|debugging| |
I am new to visual studio/asp.net so please bear with me. Using vs 2005 and asp.net 3.5. I have vs installed on the production server. If I set the start option for the site to "use default web server" when I go to debug my website vs tries to open the site at http://localhost:4579/project and returns 404. If I set ... |
check out the samples included with the SDK. Many of those sample projects are a decent way to learn by example. |
In the old days, I decided to roll my own (using RVG/RMagick), mainly because Gruff didn't have everything I wanted. The downside was that finding and eliminating all the bugs in graphing code is a pain. These days Gruff is my choice as it's really gone forward in terms of customization and flexibility.
The standar... |
Annuity or Angle Operation Symbol in LaTeX |