instruction stringlengths 0 30k ⌀ |
|---|
It may be overkill for what you require but creating a SVN repository on one machine, and then on another setting up an contious integration server. TeamCity is one I would recommend. (you may also be able to use virtual PC for this if hardware is at a premium)
This will allow you to add the custom build steps to de... |
Can I use Terracotta to scale a RAM-intensive application? |
|java|scalability|amazon-ec2|terracotta| |
I'm evaluating Terracotta to help me scale up an application which is currently RAM-bounded. It is a collaborative filter and stores about 2 kilobytes of data per-user. I want to use Amazon's EC2, which means I'm limited to 14GB of RAM, which gives me an effective per-server upper-bound of around 7 million users. I nee... |
|sql|oracle-database|tree|connect-by| |
Given a simple (id, description) table t1, such as
id description
-- -----------
1 Alice
2 Bob
3 Carol
4 David
5 Erica
6 Fred
And a parent-child relationship table t2, such as
parent child
------ -----
1 2
1 3
4 5
... |
I recommend [http://projecteuler.net][1] if you want to train number theory and discrete maths. Lots of fun exercises, though you need to know a bit of programming.
[1]: http://projecteuler.net |
I have always used resource files for multi-language applications.<br>
The are many articles on the web explaining how to use them.<br>
<br>
I have used two different ways:
- A resource file per form
- A global resource file
The resource file / form, is easier to implement, you only need to enter the values ... |
Connectivity of Winform Applications/ASP.NET application with SAP databases |
|asp.net|sap|connectivity| |
How can I fetch data in a Winforms application or ASP.NET form from a SAP database? The .NET framework used is 2.0. , language is C# and SAP version is 7.10. |
Why don't you contact CA and ask them to tell them what they're searching for, for that virus?
Or, you could copy the file and change each individual byte until the warning disappeared (may take a while depending on the size).
It's possible the virus detection may be a lot more complicated than simply looking for... |
Look into the <a href="http://msdn.microsoft.com/en-us/library/ms972976.aspx">View State</a>. Perhaps you'd like to persist the data across post-backs in the ViewState instead of using cookies. Otherwise, you should probably store the XML on the server and a unique identifier to that data in the cookie, instead. |
The cheaper solution than 'dependency tracker' is the data dictionary table sys.sql_dependencies which from which this data can be queried from the data dictionary. Oracle has a data dictionary view with similar functionality called DBA_DEPENDENCIES (plus equivalent USER_ and ALL_ views) . Using the other data dictio... |
The cheaper solution than 'dependency tracker' is the data dictionary table sys.sql_dependencies which from which this data can be queried from the data dictionary. Oracle has a data dictionary view with similar functionality called DBA_DEPENDENCIES (plus equivalent USER_ and ALL_ views) . Using the other data dictio... |
Just making the window transparent is very straight forward:
this.BackColor = Color.Fuchsia;
this.TransparencyKey = Color.Fuchsia;
You can do something like this to make it so you can still interact with the desktop or anything else under your window:
public const int WM_NCHITTEST = 0x84;
pub... |
I work at Little Caesars, and all orders are handled through the computer system. They use a touch screen interface which resembles a blown-up version of normal forms. Buttons are about 20x larger than what you would normally get, and text is enlarged quite a bit as well. It looked rather simple and I doubt they use... |
Is there a OpenID provider in Europe? |
|openid|europe| |
Does anybody know a Europe-based provider for OpenID?
I am not using one of the well-known bigger services (Yahoo,..). |
You cant stop the viewing, but by possibly putting a serial number in each viewers video it will allow you to track copies. E.g. in the top right of the video put a small number that is unique to that user. If they copy the video and upload it you will know who did it. You could also move it around during long videos o... |
Short of supplying specifically tailored hardware (which is what Microsoft is pushing with its Trusted Computing 'Palladium' initiative) the answer is no, you can't stop 'em to get to the bits.
Even in the case of specifically tailored hardware an attacker with enough skills and resources can still get to your cont... |
Short of supplying specifically tailored hardware (which is what Microsoft is pushing with its Trusted Computing 'Palladium' initiative) the answer is no, you can't stop 'em to get to the bits.
Even in the case of specifically tailored hardware an attacker with enough skills and resources can still get to your cont... |
Dare I mention MS Access...? |
I have been abusing the Dictionary class in .NET 2.0 as a set:
private object dummy = "ok";
public void Add(object el) {
dict[el] = dummy;
}
public bool Contains(object el) {
return dict.ContainsKey(el);
} |
From looking at the Collections source, it looks like Unmodifiable does **not** make it synchronized.
static class UnmodifiableSet<E> extends UnmodifiableCollection<E>
implements Set<E>, Serializable;
static class UnmodifiableCollection<E> implements Collection<E>, Serializable;
the synchroni... |
How many game updates per second? |
|untagged| |
What update rate should I run my fixed-rate game logic at?
I've used 60 updates per second in the past, but that's hard because it's not an even number of updates per second (16.666666). My current games uses 100, but that seems like overkill for most things. |
How about [OAuth][1]?
> An open protocol to allow secure API
> authorization in a simple and
> standard method from desktop and web
> applications.
[1]: http://oauth.net/
|
It depends. The wrapper will only prevent changes to the collection it wraps, not to the objects in the collection. If you have an ArrayList of ArrayLists, the global List as well as each of its element Lists need to be wrapped separately, and you may also have to do something for the contents of those lists. Finally, ... |
One interesting option is [stackless-python][1]. This was used in the Eve-Online game.
[1]: http://www.stackless.com/ |
I think you're creating a .Net dll and trying to call it from a COM-oriented environment (VBA), which isn't going to work without help. If I'm guessing right, then you need to investigate the COM Interop elements of .Net: Google throws up lots of promising-looking links, one of which is [this article](http://www.codepr... |
Unless your program must squeeze out 100% performance, do it with a config file. It will keep your code cleaner.
If one option changes many parts of code, don't write many conditionals, write one conditional that picks which class you delegate to. For instance if a preference picks TCP versus UDP, have your condit... |
Perhaps I am assuming too much, but:
switch (setting) {
case "development":
dostuff;
break
case "production":
dootherstuff;
break;
default:
dothebeststuff;
break;
} |
I took a slightly different approach. I figured you really just wanted a string of non-space characters followed by only one dot, but that dot is optional (for the last entry). Then you wanted this repeated.
^([^\s\.]+\.?)+$
Right now, this means you have to have at least one string of characters, e.g. 'smi... |
The cheaper solution than 'dependency tracker' is the data dictionary table sys.sql_dependencies which from which this data can be queried from the data dictionary. Oracle has a data dictionary view with similar functionality called DBA_DEPENDENCIES (plus equivalent USER_ and ALL_ views) . Using the other data dictio... |
The cheaper solution than 'dependency tracker' is the data dictionary table sys.sql_dependencies which from which this data can be queried from the data dictionary. Oracle has a data dictionary view with similar functionality called DBA_DEPENDENCIES (plus equivalent USER_ and ALL_ views) . Using the other data dictio... |
|c++| |
What is the best way to secure the use/loading of a DLL with a license file? |
|c++|dll|licensing| |
@hash{@keys} = 1; |
@hash{@keys} = undef;
|
@hash{@keys} = undef;
The idea here is that you are using the hash as a set. What matters is not the value I am assigning; it's just the existence of the keys. So what you want to do is not something like:
if ($hash{$key} == 1) # then key is in the hash
instead:
if (exists $hash{$key}) # then key is... |
@hash{@keys} = undef;
The syntax here where you are referring to the hash with an @ is a hash slice. We're basically saying $hash{$keys[0]} AND $hash{$keys[1]} AND $hash{$keys[2]} ... is a list on the left hand side of the =, an lvalue, and we're assigning to that list, which actually goes into the hash and set... |
How can I get full string value of variable in VC6 watch window? |
Almost all answers point toward whether or not virtual methods would be slower in the OP's example, but I think the OP is simply asking if having several level of inheritance in and of itself is slow. The answer is of course no since this all happens at compile-time in C++. I suspect the question is driven from experie... |
I think you'd be better off not nesting. If you expect multiple exception types, have multiple catches.
try{
Something();
}
catch( SpecificException se )
{blah();}
catch( AnotherException ae )
{blah();}
|
Your issue is with the namespace (xmlns="http://schemas.microsoft.com/developer/msbuild/2003"). You're receiving zero nodes because you aren't qualifying it with the namespace. If you remove the xmlns attribute, your "//PropertyGroup" XPath will work. How you query with namespace usually involves aliasing a default ... |
I am very interested in F# and some of the other new languages in the CLR/DLR. The DLR languages might be a lot better for your UI, because they don't make you cast a lot of stupid things.
However, I think that it is important to keep in mind tha learning a new language, especially in a new area, like functional pr... |
I really want to jump on and start developing iPhone apps as well. I've done a bit of Motorola, Blackberry and Windows Mobile development, which were all cool and east to get into with good documentation, easy to access and install SDKs. So far, I feel Apple is being a bit elitist in the fact that it seems their deve... |
jQuery Menu and ASP.Net Sitemap |
|asp.net|jquery|superfish| |
Does anyone know if it is possible to use an asp.net web.sitemap with a jQuery [Superfish][1] menu?
If not, are there any standards based browser agnostic plugins available that work with the web.sitemap file?
[1]: http://users.tpg.com.au/j_birch/plugins/superfish/ |
Depending on your needs this could be fine, but I am generally pretty hesitant to catch an exception, wrap the message in a new exception, and rethrow it because you loose the stack trace (and potentially other) information from the original exception in the wrapping exception. If you're **sure** that you don't need th... |
Multithreading in visual basic 6.0 |
|visualbasic| |
How to implement multi-threading in visual basic 6.0. It would be great if someone can give an example. |
|vb| |
VB6 / Crystal Report 8.5 error: A string is required here |
|vb6|crystal-reports|visual-studio| |
|vb6|crystal-reports|visual-studio|visualbasic| |
|visual-studio|vb6|vb|crystal-reports| |
I recently inherited an old visual basic 6/ crystal reports project which connects to a sql server database. The error message I get (Error# -2147191803 A String is required here) when I attempt to run the project seems to be narrowed down to the .Printout command in the following code:
<pre>
'Login to dat... |
I recently inherited an old visual basic 6/ crystal reports project which connects to a sql server database. The error message I get (Error# -2147191803 A String is required here) when I attempt to run the project seems to be narrowed down to the .Printout command in the following code:
<pre>
'Login to d... |
Just use an anonymous function:
$("#myButton").click(function() { myCar.drive(); });
|
Doesn't installing the virutal machine additions (tools) synchronize the clock between the guest and host OS? |
Doesn't installing the virtual machine additions (tools) synchronize the clock between the guest and host OS? |
The following two lines are functionally equivalent:
int foo (int a);
int foo (const int a);
Obviously you won't be able to modify `a` in the body of `foo` if it's defined the second way, but there's no difference from the outside.
Where `const` really comes in handy is with reference or pointer param... |
It might help the compiler a bit to mark "a" and "b" as const. Or unrolling the loop by hand. It would be sad if it helped, though...
Isn't it a patent minefield, by the way ? |
I'm assuming you're talking about [LINQ to SQL][1] specifically.
You would only need v3.5 of the framework installed on your development machine and the server.
The server doesn't run linq; linq will in the end send SQL statements to your server.
The language doesn't matter.
[1]: http://msdn.microsoft... |
It is easy to start using Subversion. Download TortoiseSVN, which integrates SVN into Windows Explorer. Download AnkhSVN for VS integration. Set up svnserve as a Windows Service (it's in the docs).
Then all you do is check out an empty directory from svn and copy all your code files into it. Then add them with Torto... |
I'm more familiar with Perforce than subversion, but putting a project under version control is not at all hard.
Once you've installed and got your version control software running, clean out your code directory of everything that isn't a source (for instance, run 'make clean'). Then use just use the command to add... |
Table-based? [link](http://www.samiam.org/galois.html)
And when you are limited to x*x, it's a sparse matrix. |
Table-based? [link](http://www.samiam.org/galois.html)
And when you are limited to x*x, it's a sparse matrix.
Here's another [good paper (and a library)](http://www.cs.utk.edu/~plank/plank/papers/CS-07-593/) |
A unit test should do the same thing every time that it runs, otherwise you may run into a situation where the unit test only fails occasionally, and that could be a real pain to debug.
Try seeding your pseudo-randomizer with the same seed every time (in the test, that is--not in production code). That way your tes... |
Technically, converting a result set to an XML file is straight forward and doesn't need any tool unless you have a requirement to convert the data structure to fit specific export schema. In general the result set gets the top-level element of an XML file, then you produce a number of record elements containing attrib... |
I would probably switch to using a Script Task and place your logic in there. You may still be able leverage the File Reading and other objects in SSIS to save some code. |
How can I use NAnt to compile WPF controls |
|wpf|nant|baml| |
I have a WPF project and I'm trying to setup a NAnt build script for it. The problem is that when it tries to compile the WPF controls, the .g.cs files are not being generated as they are when building from within Visual Studio. I'm using the csc build task.
From my reading it seems that when Visual Studio builds, i... |
You could seed your random number generator with a constant value in order to get non-random results and test those results. |
Install IIS, then .NET. The .NET installation will automatically register the needed things with IIS.
If you install .NET first, run this:
%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe -i
to run the registration parts, and
%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe... |
An answer to your source control question...
Redesigning an app from the ground up will probably be a time-consuming project, I wouldn't waste time changing source control unless you already know exactly which one you will use and have experience setting it up.
Visual SourceSafe gets the job done, especially in... |
Instanceof is very fast. It boils down to a bytecode that is used for class reference comparison. Try a few million instanceofs in a loop and see for yourself.
|
From a 'purist perspective' the realtional model doesn't differentiate between a view and a table - both are relations. So that use of a view that uses the discriminator is perfectly meaningful and valid provided the entities are correctly named e.g. Person/ActivePerson.
Also, from a 'purist perspective' the table ... |
[mcrypt][1] is linked into most builds of PHP by default. It contains all the primitives you're likely to need. Without knowing more about what you're encrypting, what your threat model is, etc, it's hard to give concrete recommendations on what algorithm, mode of operation, etc to use.
One thing I can say for certa... |
Why does an onclick property set with setAttribute fail to work in IE? |
|javascript|internet-explorer| |
Ran into this problem today, posting in case someone else has the same issue.
var execBtn = document.createElement('input');
execBtn.setAttribute("type", "button");
execBtn.setAttribute("id", "execBtn");
execBtn.setAttribute("value", "Execute");
execBtn.setAttribute("onclick", "runCommand();"... |
Ran into this problem today, posting in case someone else has the same issue.
var execBtn = document.createElement('input');
execBtn.setAttribute("type", "button");
execBtn.setAttribute("id", "execBtn");
execBtn.setAttribute("value", "Execute");
execBtn.setAttribute("onclick", "runCommand();"... |
|javascript|internet-explorer| |
Ran into this problem today, posting in case someone else has the same issue.
var execBtn = document.createElement('input');
execBtn.setAttribute("type", "button");
execBtn.setAttribute("id", "execBtn");
execBtn.setAttribute("value", "Execute");
execBtn.setAttribute("onclick", "runCommand();"... |
|c++|visual-c++-6| |
I'm wanting to get the full value of a char[] variable in the VC6 watch window, but it only shows a truncated version. I can copy the value from a debug memory window, but that contains mixed lines of hex and string values. Surely there is a better way?? |
|c++|debugging|visual-c++-6| |
Related question: http://stackoverflow.com/questions/48475/database-design-for-tagging
And relevant part of answer is [this article](http://www.dbazine.com/ofinterest/oi-articles/celko1)
So in short, no, there is no set division in SQL. |
Ask the item to give them to you.
Reflection is one way... however, since all the properties are known at compile time, each item could have a method that helps this query get what it needs.
Here's some example method signatures:
public XElement ToXElement()
public IEnumerable ToPropertyEnumerable()
... |
xpdf is probably a good reference implementation for this sort of problem. I have successfully used them to open encrypted pdfs before. |
You can use the nice Inflate(int i) method on a rectangle to get the bigger version. |