instruction
stringlengths
0
30k
|windows|wmi|
I need to write a function that generates an id that is unique for a given machine running a Windows OS. Currently, I'm using WMI to query various hardware parameters and concatenate them together and hash them to derive the unique id. My question is, what are the suggested parameters I should use? Currently, I'm ...
|windows|winapi|wmi|
Maybe cheating a little, but the MAC Address of a machines Ethernet adapter rarely changes without the motherboard changing these days.
Maven2 and Hudson. Kind Regards
Tags and hierarhical views (like a dictionary structure) are the two main methods for information organization. As dictionary structures are more familiar to most users (many real life analogies exists like looking for a specific art book in a library or looking for milk in a mall), at first they are usually more c...
How do i hotkey directly to File Search tab in eclipse
|eclipse|editor|hotkeys|
When i use ctrl+h I end on the Java Search tab. I would very much like a shortcut to go directly to filesearch instead. Is that possible?
How do I hotkey directly to File Search tab in eclipse
When I use CTRL+h I end up on the Java Search tab. I would very much like a shortcut to go directly to filesearch instead. Is that possible?
When I use CTRL+h I end up on the Java Search tab. I would very much like a shortcut to go directly to filesearch instead. Is that possible? ![alt text][1] [1]: http://seet.dk/~seet/stackoverflow.png
When I use CTRL+h I end up on the Java Search tab. I would very much like a shortcut to go directly to filesearch instead. Is that possible? ![Search dialog][1] EDIT: It turns out that there exists a general preference - "Keys" - where you give "File search" a hot key. Eclipse Ganymede doesnt have any "include unb...
Don't know if this will work for you, but we use the "Use fixed naming and single page assemblies" publish model of VS2005. We test locally, deploy to a dev server to test with the other developer's changes (there are only 2 of us), and then deploy to a temp directory on the live server. Then we RDP into the live ser...
There's Snip-it pro ( http://www.snipitpro.com ), I looked at it a while back, and the interface seemed to be pretty horrible. It's 40 bucks / seat, which is not too bad. Last time I was looking for a tool like that I found nothing at all, and I found that it's very hard to get my co-workers to start using snippet libr...
Newer versions of Excel really don't like running macros automatically. If you really want to generate an Excel file and send that to your users, build the full file on the server using the COM interface to Excel, or some libraries that can read/write XLS files, and then send the completed file.
There are lots of answers here about why a compiler that lets you hide a member function *silently* is a bad idea. But no modern compiler *silently* hides member functions. Even in C++, where it's allowed to do so, there's always a warning about it, and that ought to be enough. So why require "reintroduce"? The m...
Make sure the ASPNET user has permission to write to that folder. Right click on the folder, Properties, Security tab.
Have a look at: http://www.oracle-base.com/articles/misc/ManualOracleUninstall.php Basically, it comes down to: Remove all you can with the installer. Remove Oracle keys from the registry. Remove the Oracle directories from your computer. With (of course) the requisite reboots thrown in as required ;-)
Possibly a macro. There are also addins (like ReSharper, which is great but commercial) capable of doing that quickly.
This is most likely due to [references][1]. Your other projects probably [copy in a reference][2] to your component project. You'll have to rebuild these other projects for them to re-copy in the referenced component project, if it has changed. It is only updated at build time. You can somewhat get around this ...
This is most likely due to **[references][1]**. Your other projects probably **[copy in a reference][2]** to your component project. You'll have to rebuild these other projects for them to re-copy in the referenced component project, if it has changed. It is only updated at build time. You can somewhat get arou...
Yes, there are differences between the two. Both are anonymous functions and execute in the exact same way. But, the difference between the two is that in the second case scope of the variables is restricted to the anonymous function itself. There is no chance of accidentally adding variables to the global scope. ...
It's a "quirk" in the way the JVM looks up the zoneinfo file. See [Bug ID 6456628][1]. The easiest workaround is to make /etc/localtime a symlink to the correct zoneinfo file. For Pacific time, the following commands should work: # sudo cp /etc/localtime /etc/localtime.dist # sudo ln -fs /usr/share/zon...
U: Working file was updated G: Changes on the repo were automatically merged into the working copy M: Working copy is modified C: This file conflicts with the version in the repo ?: This file is not under version control !: This file is under version control but is missing or incomplete A...
U: Working file was updated G: Changes on the repo were automatically merged into the working copy M: Working copy is modified C: This file conflicts with the version in the repo ?: This file is not under version control !: This file is under version control but is missing or incomplete A: This file ...
U: Working file was updated G: Changes on the repo were automatically merged into the working copy M: Working copy is modified C: This file conflicts with the version in the repo ?: This file is not under version control !: This file is under version control but is missing or incomplete A: This file ...
Log4Net: set Max backup files on RollingFileAppender with rolling Date
|log4net|
I have the following configuration, but I have not able to find any documentation on how to set a maximum backup files on date rolling style. I know that you can do this with size rolling style by using the maxSizeRollBackups. <code> <appender name="AppLogFileAppender" type="log4net.Appender.RollingFileAppender"...
I have the following configuration, but I have not able to find any documentation on how to set a maximum backup files on date rolling style. I know that you can do this with size rolling style by using the maxSizeRollBackups. <pre> <appender name="AppLogFileAppender" type="log4net.Appender.RollingFileAppender">...
I have the following configuration, but I have not able to find any documentation on how to set a maximum backup files on date rolling style. I know that you can do this with size rolling style by using the maxSizeRollBackups. <pre><code> <appender name="AppLogFileAppender" type="log4net.Appender.RollingFileAppe...
I have the following configuration, but I have not able to find any documentation on how to set a maximum backup files on date rolling style. I know that you can do this with size rolling style by using the maxSizeRollBackups. <appender name="AppLogFileAppender" type="log4net.Appender.RollingFileAppender"> ...
So here is my (sample) implementation, first let's create a new event: import java.util.EventObject; import com.google.gwt.user.client.ui.Widget; public class NotificationEvent extends EventObject { public NotificationEvent(String data) { super(data); } } ...
I have been using [wush.net][1] for about 9 months and am pretty stoked. Especially considering the fact that you get integrated Trac when you upgrade to pro (which kinda pays for itself if you have a few repo's because you get discounts on the additional). [1]: http://wush.net
I hate to be the guy who says, "you're just doing it wrong" (I always hate that guy ;) but... Does it have to be repeatably generated for the unique machine? Could you just assign the identifier or do a public/private key? Maybe if you could generate and store the value, you could access it from both OS installs on ...
Can you pull some kind of manufacturer serial number or service tag? Our shop is a Dell shop, so we use the service tag which is unique to each machine to identify them. I know it can be queried from the BIOS, at least in Linux, but I don't know offhand how to do it in Windows.
Have you looked at capturing the T-SQL with the DataContext.Log property? If you were able to capure it into an object that also had your tag property you might be able to catalog the SQL your application executes.
Personally I am a huge fan of generics because of all of the code I don't have to write. http://stackoverflow.com/questions/3058/what-is-inversion-of-control#99760
No major pitfalls that I haven't been able to overcome easily. Use hosted mode heavily. As you are using GWT-ext you will almost never need to touch CSS yourself unless you want to tweak the out of the box look. My recommendation is to use a GWT "native" widget over a library one where they are close in features....
Biggest GWT Pitfalls?
|gwt|java|gwt-ext|
I'm at the beginning/middle of a project that we chose to implement using GWT. Has anyone encountered any major pitfalls in using GWT (and GWT-EXT) that were unable to be overcome? How about from a performance perspective? A couple things that we've seen/heard already include: - Google not being able to index c...
|java|ajax|gwt|gwt-ext|
One of your object types could be a factory for the other. When Foo poops out a new Bar, the connection has already been made: foo = new Foo(); bar = Foo.Poop(); function Foo::Poop() { bar = new Bar(this); myChildren.Add(bar); return bar; } bar.SayHiToPare...
If you are creating a custom image processing effect, you may find PythonPixels useful. http://halfhourhacks.blogspot.com/2008/03/pythonpixels.html It is intended for writing and experimenting with image processing.
when you don't really need behavior, but you need more structure than a simple array or dictionary.
when you don't really need behavior, but you need more structure than a simple array or dictionary. **Follow up** This is how I think of structs in general. I know they can have methods, but I like keeping that overall mental distinction.
how to sort a flex datagrid according to multiple columns?
|apache-flex|actionscript-3|datagrid|
I have a datagrid, populated as shown below. When the user clicks on a column header, I would like to sort the rows using a lexicographic sort in which the selected column is used first, then the remaining columns are used in left-to-right order to break any ties. How can I code this? (I have one answer, which I...
I had never tried this until I read your question and then read the article you referenced, so take this with a grain of salt. That said, I am able to get the process to work on my computer using SSMS, and I am also able to duplicate the error you described. To get this to work as expected I created the sproc ...
Either grant that user the level of access to that directory, or change the identity that the application's application pool runs under - in IIS Manager, determine what App Pool is used to run your application, then in the App Pool section of IIS Manager, look at the properties for that pool - the tab you want is "Iden...
I've got around this type of issue in the past by dynamically creating the entire image (with appropriate pin arrangement) as a single image. If you are using ASP.NET, this is pretty easy to do with GDI calls. You just dynamically create the image with pin placement, then serve to the page as a single image. Takes a...
You could create a base form class with common functionality such as remembering the position and size and inherit from that base class. <pre><code>public class myForm : Form { protected override void OnLoad(){ //load the settings and apply them base.OnLoad(); } protected override void OnClose(){ ...
Prepared Statements with IN Clause
|.net|prepared-statements|
We all know that prepared statements are one of the best way of fending of SQL injection attacks. What is the best way of creating a prepared statement with an "IN" clause. Is there an easy way to do this with an unspecified number of values? Take the following query for example. SELECT ID,Column1,Column2 FRO...
Handling the data in an IN clause, with sql parameters?
|.net|prepared-statements|sql-server|sql|
Prepared Statements with IN Clause
|sql|sql-injection|language-features|
Handling the data in an IN clause, with SQL parameters?
|sql|language-features|sql-injection|
It's a trade off. Strings go into the string pool and when you create multiple identical strings they share the same memory. The designers figured this memory saving technique would work well for the common case, since programs tend to grind over the same strings a lot. The downside is that concatenations make a lot...
Using the Apache commons HttpClient I have also found the following to work (removed try/catch for clarity): HostConfiguration hostConfiguration = new HostConfiguration(); byte b[] = new byte[4]; b[0] = new Integer(192).byteValue(); b[1] = new Integer(168).byteValue(); b[2] = new Integer(1).b...
I believe you'd be best off with this: SELECT TRIM(LEADING '0' FROM myField)
I haven't worked with the latest version of Drools (last time I used it was about a year ago), but back then our high-load benchmarks proved it to be utterly slow. A huge disappointment after having based much of our architecture on it. At least something good I remember about drools is that their dev team was avail...
Here's an abridged version of my current code. It's based on approach 2: struct SpanList { struct Span { int s, e; // start and end coordinates }; typedef std::vector<Span> Scanline; typedef std::vector<Scanline> List; List list; }; struct ShapeWid...
Aptana has some simple refactoring tools. I often extract into partials and they have a simple shortcut for pulling things out, creating a file and inserting the right call to the partial. Not the most amazing ever but it's useful
A BSP is better for a smaller, simpler space that you only want to do occlusion with. If you want all intersections for a given ray, you'll need to upgrade to a quad/octree. As for quadtree vs. octree - how many dimensions do you care a lot about? Two dimensions means a quadtree, four an octree. As stated, as quadtr...
OO Javascript : Definitive explanation of variable scope
|javascript|oop|
Can someone provide an explanation of variable scope in JS as it applies to objects, functions and closures?
"automatic" does in fact mean "re-entrant". The term itself is stolen from software languages -- for example, C has the "auto" keyword for declaring variables as being allocated on the stack when the scope it's in is executed, and deallocated afterwards, so that multiple invocations of the same scope do not see persis...
Generate a current datestamp in Java
|java|datestamp|
What is the best way to generate a current datestamp in Java when not using a database? YYYY-MM-DD:hh-mm-ss
What is the best way to generate a current datestamp in Java? YYYY-MM-DD:hh-mm-ss
A few possibilities. 1/ See if you can find the names of the people that worked for the company. They may be helpful. 2/ Open the DAT file in a text editor. The data may be decodable from that. If the basic format can be discerned, quick'n'dirty code can be written to extract it. 3/ Open up the executable i...
Query a Table's Foreign Key relationships
|sql|database|oracle-database|
For a given table 'foo', I need a query to generate a set of tables that have foreign keys that point to foo. I'm using Oracle 10G.
If you were super lazy you could use the SMO (SQL Server Management Objects) or if using SQL Server prior to 2005 the DMO (distributed managmeent objects) to script out all tables/views/stored procedures daily and then compare the script to the script in source control and if there are any changes check the new version...
While not directly a tutorial, here is a blog that you'll find on topic http://its.arubything.com/
You can try to fix it using the automated regiis utility aspnet_regiis.ext available in c:\windows\microsoft.net\framework\v2.0.50727 Otherwise just manually add the needed file permissions as noted in the error.
Thanks everyone who answered! I ended up with [NuGenUnify][1] which provides a GUI wrapper for ilmerge. [1]: http://www.genetibase.com/cforce/nugenunify.php
How to tell if a Javascript function is defined
|javascript|callback|reflection|
How do you tell if a function in Javascript is defined? I want to do something like function something_cool(text, callback){ alert(text); if( callback != null ){ callback(); }; } but that gets me a 'callback is not a function' error when callback is not defined.
How do you tell if a function in Javascript is defined? I want to do something like function something_cool(text, callback){ alert(text); if( callback != null ){ callback(); }; } but that gets me a 'callback is not a function' error when callback is not defined.
|javascript|reflection|
[RESTful Web Services](http://www.crummy.com/writing/RESTful-Web-Services/)
Another approach would to be use views.. CREATE VIEW ActiveUsers as SELECT * FROM Users WHERE IsDeleted = 0 As far as linq to sql is concerned, that is just the same as a table. For any table that you needed the DeletedOn filtering, just create a view that uses the filter and use that in place of the table i...
What kind of issues are there in implementing realtime multiplayer games
|sockets|tcp|udp|multiplayer|
I have some experience making multiplayer **turn-based** games using sockets, but I've never attempted a realtime action game. What kind of extra issues would I have to deal with? Do I need to keep a history of player actions in case lagged players do something in the past? Do I really need to use UDP packets or will T...
![Programmer life][1] [1]: http://amoebarepublic.files.wordpress.com/2008/04/programmer.gif
Is there an ldap C/C++ library that provides fail over?
|ldap|failover|