Hi all,
I am already familiar with python and socket usage and can send strings of text over these. But how would i go about sending, say, an MP3 file?
Is there any way in a Rails STI situation to through an error when the base class is Instantiated? Overriding initialize will do it but then that gets trickled down to the subclasses.
Thanks
Hi all, I'm at my wit's end here with virtual hosting. I'm trying to install redmine and it works with the webrick test server, but when I tried to use passenger (mod_rails) to host and go to the address I specified when in the virtualhost part of my apache config file nothing happens. Here is the relavent section of /etc/httpd/conf/httpd.conf…
Let's say I have programmers and artists working on a project. The artists have some folders they care about:
/Doodles
/Images/Jpgs
And maybe the programmers have a folder like this:
/Code/View/Jpgs
What is the best process in Mercurial to keep the 2 Jpgs folders synced? I have used Vault, where you can have 2 or more files/folders…
I am so frustrated right now after several hours trying to find where shared_ptr is located. None of the examples I see show complete code to include the headers for shared_ptr (and working). Simply stating "std" "tr1" and "" is not helping at all! I have downloaded boosts and all but still it doesn't show up! Can someone help me by…
Hi, for some reason I can't get my tableview to enter editing mode. It's a little harder than it might seem because I'm using some open source code to make a calendar (iCal esque) with a tableview under it, and it's not quite as straightforward as just using a regular tableview.
Basically, I have two classes. One (let's say Class…
I've got a regex pattern which I am using to match files having particular extensions. However I do NOT want it to match any .Designer.cs files; how would I implement such into my pattern?
\.(bat|cs|java|html|etc)$
int value = 5; // this type of assignment is called an explicit assignment
int value(5); // this type of assignment is called an implicit assignment
What is the difference between those, if any, and in what cases do explicit and implicit assignment differ and how?
I am trying to replace character (decimal value 197) in a UTF-8 file with character (decimal value 65)
I can load the file and put it in a string (may not need to do that though)
SS := TStringStream.Create(ParamStr1, TEncoding.UTF8);
SS.LoadFromFile(ParamStr1);
//S:= SS.DataString;
//ShowMessage(S);
However, how do i replace…
I'm trying to use reflection to automatically test that all my linq2sql entities match the test database. I thought I'd do this by getting all the classes that inherit from DataContext from my assembly:
var contexttypes = Assembly.GetAssembly(typeof (BaseRepository<,>)).GetTypes().Where(
t =>…
I am trying to code a function for a camera that orbits a point. Assume a 3d coordinate plane where Z is up. Ignore Z.
Let's say the camera's position starts at (0, 0, z). The object to orbit is at, say (50, 50, z). So we have a distance of ~70 units. Calling the function with {(50, 50, z), 70, x} where x is the…
Is it possible to work with an encrypted SQLite database directly in Qt? Or, do I have to read it entirely into memory, decrypt in memory, do work, encrypt in memory, write to disk?
I've been pondering this question awhile now... many 3d engines support advanced terrain rendering using quadtrees, LOD... all the features you expect. But every engine I've seen loads height data from heightmaps... grayscale bitmaps. I just can't understand how this is useful - each point in a heightmap can have…
I have some proprietary.jar that I need to include in my project, but I don't wish to install it to the local repository.
What I did initially was to put the jar into version control in my project's lib/ folder, and then specify the Maven dependency as:
<!-- LOCAL DEPENDENCY -->
<dependency>
…
I know there's a way to capture a bitmap of a window in Windows without anything that may be obscuring it (e.g. you have a window with a dialog in front, but the dialog is not captured as it would be if you did a simple pixel grab), but I can't remember how to do so.
Also I believe…
This is simply for fun. This will not be used for any actual encryption. I'm only first year comp sci student and love cryptography.
This took a long time to get working. At approximately N = 18, it begins breaking down. It won't encrypt messages properly after that point. I'm not…
In the following script, I get the "stop message received" output but the process never ends. Why is that? Is there another way to end a process besides terminate or os.kill that is along these lines?
from multiprocessing import Process
from time import sleep
class Test(Process):…
Hi,
I have the following:
class Thing
{
static Thing PREDEFINED;
type _private;
Thing() { _private = initial_val; }
}
Thing Thing::PREDEFINED = redefined_val;
in global scope, i have this
Thing mything = Thing::PREDEFINED;
but it does not have the desired effect.…