instruction stringlengths 0 30k ⌀ |
|---|
Somehow, and I'm not familiar with the specifics of how .bat files exit, but either JSMin or the batch file execution is exiting with a non-zero return code.
Have you tried running the scripts directly (i.e. not through JSMin.bat) as part of the post-build?
Edit: Looks Hallgrim has it. |
Having used both <a href="http://cruisecontrol.sourceforge.net/">CruiseControl</a> and <a href="https://hudson.dev.java.net/">Hudson </a>, I can recommend Hudson as the easier of the two to config (easily done via the web GUI, though direct configfile editing is also supported). |
How do I open "Find Files" dialog from command-line in Windows XP? |
|windows|command-line|find-files|windows-xp| |
I'd like to create a hotkey to search for files under a certain folder in Windows XP; I'm using AutoHotkey to create this shortcut.
Problem is that I need to know a command-line statement to run in order to open the standard Windows "Find Files/Folders" dialog. I've googled for a while and haven't found any page ind... |
Since I can't edit/comment, here is my addition.
for each is also valid for arrays. e.g.
int[] test = new int[]{1,4,5,7};
for (int intValue : test) {
// do some work here on intValue
}
So, overall summary:<br/>
[nsayer]The following is the longer form of what is happening:
> for(... |
Since I can't edit/comment, here is my addition.
for each is also valid for arrays. e.g.
int[] test = new int[]{1,4,5,7};
for (int intValue : test) {
// do some work here on intValue
}
So, overall summary:<br/>
[nsayer]The following is the longer form of what is happening:
> for(... |
Try this: `Directory.CreateDirectory(TheFolderName)`
(You may need: `Imports System.IO`) |
Try this: `Directory.Exists(TheFolderName)` and `Directory.CreateDirectory(TheFolderName)`
(You may need: `Imports System.IO`) |
Any good recommendations for MP3/Sound libraries for java? |
|java|mp3|sound-api|digital-processing| |
I am writing my masters thesis which is closely related to processing sound files (mp3 and alternative formats such as ogg, aac, ...) and sound in Java. Because Java has so much open source support, I didn't think I would have any problems in finding everything I need already coded, but so far results are very sparse.
... |
Even a qualified or certified compiler can produce undesirable results. Keep your code simple and test, test, test. That or walk through the machine code by hand while not allowing any human error. PLus the operating system or whatever environment you are running on (preferably no operating system, just your program... |
What is the proper way to do a Subversion merge in Eclipse? |
|eclipse|merge|subversive|svn| |
I'm pretty used to how to do CVS merges in Eclipse, and I'm otherwise happy with the way that both Subclipse and Subversive work with the SVN repository, but I'm not quite sure how to do merges properly.
When I do a merge, it seems to want to stick the merged files in a seperate directory in my project rather than ... |
You will probably need to rewrite the file from the point you insert the changes to the end. You might be best always writing to the end of the file and use tools such as sort and grep to get the data out in the desired order. I am assuming you are talking about a text file here, not a binary file.
|
Depends upon the objects.
But, unused code is 'cruft' and will increase the cost of maintenance.
Better to delete the refs and classes. You can always restore from version control if they are needed later. |
Keep in mind as well, that the hardware system clock (i.e. the inaccurate one) is only read when the machine starts up - if you're talking about server machines, you're not going to lose time because of them. |
Generating unique account numbers - recursive call |
|unique|records| |
Hi i need to generate 9 digit unique account numbers. Here is my pseudocode:
function generateAccNo()
generate an account number between 100,000,000 and 999,999,999
if the account number already exists in the DB
call generateAccNo() /* recursive call */
... |
Maptsraction (<http://www.mapstraction.com>) lets you choose between any number of geocoding services. This could be helpful if you need to do large quantities, as I know Google has a limit to how many you can do a day. |
One way is to generate a zip file with the App using for example Ant. In ant you can specify that the file in Contents/MacOS should have execute-permissions using something like filemode="755". |
We have implemented a solution very similar to the solution that Balloon suggests, and that works pretty well for us.
Only difference is that we only store the new value. The old value is after all stored in the previous history row
[ID] [int] IDENTITY(1,1) NOT NULL,
[UserID] [int] NULL,
[EventDate... |
- Indexes
- Statistics
- on microsoft stack, Database Engine Tuning Advisor |
1. Do **not** put it all in one table with an IsCurrent descriminator attribute. This just causes problems down the line, requires surrogate keys and all sorts of other problems.
2. Design 2 does have problems with schema changes. If you change the Employees table you have to change the EmployeeHistories table and... |
You can merge your many DLLs with ILMERGE:
[http://www.microsoft.com/downloads/details.aspx?familyid=22914587-B4AD-4EAE-87CF-B14AE6A939B0&displaylang=en][1]
Haven't tried it myself. Hope it helps.
[1]: http://www.microsoft.com/downloads/details.aspx?familyid=22914587-B4AD-4EAE-87CF-B14AE6A939B0&displaylang=e... |
You can merge your many DLLs with ILMERGE:
[http://www.microsoft.com/downloads/details.aspx?familyid=22914587-B4AD-4EAE-87CF-B14AE6A939B0&displaylang=en][1]
Haven't tried it myself. Hope it helps.
**UPDATE**: From download-page:
**Brief Description**<br />
ILMerge is a utility for merging multiple .NET ass... |
You can merge your many DLLs with ILMERGE:
[http://research.microsoft.com/~mbarnett/ILMerge.aspx][2]
Haven't tried it myself. Hope it helps.
----------
Download here:<br />
[http://www.microsoft.com/downloads/details.aspx?familyid=22914587-B4AD-4EAE-87CF-B14AE6A939B0&displaylang=en][1]
**Brief Descripti... |
Methods must always be complete, compilable code; macros may be code fragments. Thus you can define a foreach macro:
#define foreach(list, index) for(index = 0; index < list.size(); index++)
And use it as thus:
foreach(cookies, i)
printf("Cookie: %s", cookies[i]); |
If I'm understanding your question, just do what I do:
Drop a textbox on the report, then while you are setting up the report, insert the following:
="Parameter1: " + Parameters!Parameter.Label + ", Parameter2: " + Parameters!Parameter2.Label...
Granted, it's not the prettiest thing, but it does work pretty well i... |
An immutable object is by definition thread safe (in
this context), so synchronization is **not** necessary.
Wrapping the outer ArrayList using Collections.unmodifiableList()
prevents the client from changing its contents (and thus makes it thread
safe), but
the inner
ArrayLists are still mutable.
Wrapping... |
Compilers can refuse your request to inline.
Macros will always have their place.
Something I find useful is #define DEBUG for debug tracing -- you can leave it 1 while debugging a problem (or even leave it on during the whole development cycle) then turn it off when it is time to ship. |
Within Visual Studio IDE, right-click on the .rc file (in the Resource View panel), and select "Resource includes" from the shortcut menu. When the dialog opens, use its "Compile-time directives" area to enter whatever you want to include in the .rc file. For example, if you want your 64-bit and 32-bit builds to use d... |
To answer your first question, you only need to include PDBs for a production release if you need line numbers for your exception reports.
To answer your second question, using the "Optimise" flag with PDBs means that those line numbers might be off by a few lines.
To answer your third question, you can have the... |
How do I open "Find Files" dialog from command-line in Windows XP to search a specific folder? |
|windows|command-line|find-files|windows-xp| |
I'd like to create a hotkey to search for files **under a specific folder** in Windows XP; I'm using AutoHotkey to create this shortcut.
Problem is that I need to know a command-line statement to run in order to open the standard Windows "Find Files/Folders" dialog. I've googled for a while and haven't found any pag... |
VB6 lost F1 help function after Install of VS2005, re-install of MSDN2001 did not help. |
|visual-studio|vb6|msdn| |
After installing VS2005 VB6 lost F1 function to MSDN Oct/2001 lib. Suggetions to re-install MSDN did not work. The only thing F1 works on now are ADO statements in VB6. Example ado1.recordset.recordcount If I highlight recordcount and press F1 I do get the ADO help information. If I highlight "recordset", I get "Help ... |
@lark
A slight correction:
$('#objPDF').attr('data','dirToPDF');
The # specifies the objPDF is an ID and not an element name. Though I still don't know if this will work.
@Tristan
Take a look at the [jQuery Media plugin][1]. It mentions support for PDF as well, though I have never used it.
[1]: ht... |
SELECT
table1.*
, table2.*
INNER JOIN table2 ON table2.SomeFkId = table1.SomeId
That gets you a result set where child rows in table2 cause duplication by returning the table1 results for each child row in table2. O/R mappers should differentiate table1 instances based on a unique key field, the... |
[The ChucK API reference](http://chuck.cs.princeton.edu/doc/program/stdlib.html) uses the C `int` type, so the maximum value would depend on your local machine (2^31-1, around two billion on standard 32-bit x86). I don't see any references to retrieving limits, but if ChucK is extensible using C you could add a functio... |
Here is one that I like:
- **Private**; all of the current system deliverables
- **Documentation**; a rollup of all the documentation across the solutions that make up the product, output would be MSDN style documentation from Sandcastle
- **Common**; Visual Studio SLN that contains all the projects that a... |
[Virtual Earth][1] does it. There is also a web service at [geocoder.us][2]
[1]: http://blogs.msdn.com/virtualearth/archive/2008/04/08/geocoding-with-virtual-earth.aspx
[2]: http://geocoder.us |
You can use random access to write to specific locations of a file, but you won't be able to do it in text format, you'll have to work with bytes directly.
|
Having worked on the Mac port of [NITE][1], I can say that jar packages for other platforms should work equally well on Mac. I would still recommend finding a mac for testing (or even announcing mac support was in beta ;-) ) as we discovered a few mac-only quirks during the port (to go with the windows- and linux- only... |
Failed to load Zend/Loader.php. Trying to work out why? |
|php|zend-framework| |
I have inherited a client site which crashes every 3 or 4 days. It is built using the zend-framework with which I have no knowledge.
The following code:
<?php
// Make sure classes are in the include path.
ini_set('include_path', ini_get('include_path') . PATH_SEPARATOR . 'lib' . PATH_SEPARATOR . 'ap... |
Simply define what you are doing in plain English. When you are saying things like "save this", "get this from database", "update", "delete", etc. you are talking about data layer.
When you are saying things businesswise, like "assign this to that", "double the amount of this money", "destroy this portion of earth" ... |
Simply define what you are doing in plain English. When you are saying things like "save this", "get this from database", "update", "delete", etc. you are talking about data layer.
When you are saying things businesswise, like "assign this to that", "double the amount of this money", "destroy this portion of earth" ... |
When you are saying things businesswise, like "make those suffer", "steal that money", "destroy this portion of earth" you are talking about bussiness layer. To make it clear, thinks that get you excited goes here.
When you are saying "show this here", "do not show that", "make it more beautiful" you are talking abo... |
I work often with Flex in my job, and I will be happy to help.. but your questions deserve an article for each one :) I'll try some short answer.
Maintenable code: I think that the same rules of any other OO languages apply. Some flex-specific rules I'm use to follow: use strong typed variables, always consider disp... |
How to find Commit Charge programmatically? |
|c#| |
Title says it all. |
I'm looking for the total [commit charge][1].
[1]: http://en.wikipedia.org/wiki/Commit_charge |
the second link you reference mentions an article that has quite a long description of the issue:
http://www.cygnus-software.com/papers/comparingfloats/comparingfloats.htm
but unless you are tweaking performance I would stick with epsilon so people can debug your code |
What would be the best algorithm to find an ID that is not used from a table that has the capacity to hold a million rows. |
|algorithm|logic| |
To elaborate ..
a) A table (BIGTABLE) has a capacity to hold a million rows with a primary Key as the ID. (random and unique)
b) What algorithm can be used to arrive at an ID that has not been used so far. This number will be used to insert another row into table BIGTABLE.
|
To elaborate ..
a) A table (BIGTABLE) has a capacity to hold a million rows with a primary Key as the ID. (random and unique)
b) What algorithm can be used to arrive at an ID that has not been used so far. This number will be used to insert another row into table BIGTABLE.
Updated the question with more details..
... |
I use "com.mycompany.domain" personally, but that might not be the best answer. |
You do not need to use recursion here. A simple loop would be just as fast and consume less stack space.
|
You could put it in a while loop:
function generateAccNo()
while (true) {
generate an account number between 100,000,000 and 999,999,999
if the account number already exists in the DB
/* do nothing */
else
return new accout nu... |
NHibernate generates pretty fast SQL right out of the box.
I've been using it for a year, and have yet to have to write bare SQL with it.
All of my performance problems have been from [Normalization][1] and lack of indexes.
The easiest fix is to examine the execution plans of your queries and create proper indexes... |
How do I obtain equipment serial numbers programmatically? |
|serial-number| |
I need to run an equipment audit and to do that I need to obtain the Windows PC, monitor etc. serial numbers.
So I faced with going to each PC and manually writing down the numbers.
Is there a way I can get this programmatically so each user can run a small program and email me the results?
|
It seems fine, but I think you need some sort of die condition, how many times are you going to let this run before you give up?
I know this seems unlikely with the huge number range, but something could go wrong that just drops you back to the previous call, which will call itself again, ad-nauseum. |
The latest version of Microsoft SharePoint software is really two different products.
**Windows SharePoint Services** is a free download for Windows Server. In the latest version, known as WSS v3, collaborative web sites templates include basic blog and wiki services along with list templates for Image Libraries, D... |
What is SharePoint?
-------------------
The latest version of Microsoft SharePoint software is really two different products.
**Windows SharePoint Services** is a free download for Windows Server. In the latest version, known as WSS v3, collaborative web sites templates include basic blog and wiki services alon... |
Is there an easy way to change the behavior of a Java/Swing control when it gets focus? |
|java|user-interface|swing| |
For most GUI's I've used, when a control that contains text gets the focus, the entire contents of the control are selected. This means if you just start typing, you completely replace the former contents.
Example: You have spin control that is initialized with the value zero. You tab to it and type "1" The valu... |
For most GUI's I've used, when a control that contains text gets the focus, the entire contents of the control are selected. This means if you just start typing, you completely replace the former contents.
Example: You have spin control that is initialized with the value zero. You tab to it and type "1" The valu... |
Use the command **svn status** on your working copy to show the status of files, files that are not yet under version control (and not ignored) will have a question mark next to them.
As for ignoring files you need to edit the svn:ignore property, read the chapter Ignoring Unversioned Items in the svnbook at [http:/... |
OpenID providers - what stops malicious providers? |
The second one is something related to Hungarian notation which I personally *DON'T* like so I will stick with the **first** method.
I don't like Hungarian notation because it adds redundancy which I usually detest in programming. It is just my opinion. |
You can put the shortcuts in question inside a subfolder, and deny non-Administrator users access to the contents of the folder. They will see an empty folder, Administrator will see a folder full of shortcuts. This is not the ideal solution, but the best that a non-Administrator user can accomplish without privilege... |
Here's a good description of the problem - http://www.realsolve.co.uk/site/tech/hib-tip-pitfall.php?name=why-lazy
Now that you understand the problem it can typically be avoided by doing a join fetch in your query. This basically forces the fetch of the lazy loaded object so the data is retrieved in one query instea... |
I would keep an eye on v8 as it is screaming fast javascript engine, and i'm sure it will develop cross-platform support as it grows to maturity. |
If you are not using Expert Mode, and / or are allowing QTP to do most of the work to create your repository objects, then yes it is referencing everything by pixels.
I create all of my repository objects by hand, viewing the source (in the case of automated web-application testing) and using the Object Spy for as... |
Have you considered making the method an extension method? define it as
public static StaticExecute(this object instance)
{
// reference to 'instance'
}
called like
this.StaticExecute();
I can't think of a way to do what you want to do directly, but can only suggest that if you f... |
There is a really cool programming language called *[Frink][1]*. It supports pretty much every unit ever invented, every physical or mathematical constant, timezones, bla bla bla ...
It even has a [web interface][2] and a [Java Applet][3].
Some of your challenges above:
- find the number of days between two g... |
Simply define what you are doing in plain English. When you are saying things businesswise, like "make those suffer", "steal that money", "destroy this portion of earth" you are talking about bussiness layer. To make it clear, thinks that get you excited goes here.
When you are saying "show this here", "do not show ... |
@cem-catikkas I think it would be more correct to compare the getClass().getName() values. In the case that MyInterfaceImpl1 class is subclassed your test could be broken, as the subclass is instanceof MyInterfaceImpl1. I would rewrite as follow:
IMyInterface fromFactory = factory.create(...);
Assert.asse... |
The fact that it only happens sporadically makes me think this is less of a programming issue, and more of a sysadmin issue - if it were a defect in the implementation, you'd expect it to fail consistently considering the error is "No such file or directory". Two guesses
* There are multiple front-end web servers, a... |
ASP.NET XML ObjectDataSource Wrapper Class Examples |
|asp.net|vb.net|xml| |
I want to use XML instead of SQLServer for a simple website.
Are their any good tutorials, code examples, and/or tools available to make a (prefer VB.NET) wrapper class to handle the basic list, insert, edit, and delete (CRUD) code?
The closest one I found was on a Telerik Trainer video/code for their Scheduler ... |
I want to use XML instead of SQLServer for a simple website.
Are their any good tutorials, code examples, and/or tools available to make a (prefer VB.NET) wrapper class to handle the basic list, insert, edit, and delete (CRUD) code?
The closest one I found was on a Telerik Trainer video/code for their Scheduler ... |
Out of box that is not possible. Lists are limited to one site only.
The only option you have is to use content query web part (available in SharePoint Standard or better).
[Here][1] is how you can use CQWP.
There is also enhanced - community edition [here][2].
You can build these in your subsite template... |
Out of box that is not possible. Lists are limited to one site only.
The only option you have is to use content query web part (available in SharePoint Standard or better).
[Here][1] is how you can use CQWP.
There is also enhanced - community edition [here][2].
You can embed these in your subsite template... |
I'm not sure I understand the problem correctly. I assume there is a complex 'model updating logic'. Don't distribute this through 60 classes, keep it in one place, move it out from the event classes (Mediator pattern, sort of).
Your Mediator will work with event classes (I don't see how could you use the Flyweight ... |
I'd be inclined to store it as a session object. This is because you're not concerned with abandoned carts, and can therefore remove the overhead of storing it in the database as it's not necessary (not to mention that you'd also need some kind of cleanup routine to remove abandoned carts from the database).
Howeve... |
I would not store it in the application folder, because that would override the configuration with a new deployment of the application.
I suggest you have a look at the Preferences API, or write something in the users folder (the user that is running Tomcat). |