As part of teaching myself python I've written a script which allows a user to play hangman. At the moment, the hangman word to be guessed is simply entered manually at the start of the script's code.
I want instead for the script to choose randomly from a large list of english words. This I know how to do - my problem is finding that list of…
I have installed MAMP and the PHP it came with wasn't compiled with ncurses. I've tried to use port to install ncurses and it seems that it already exists on my system so now I was wondering if there was a way to get PHP to use it without having to recompile PHP --with-ncurses.
In other words: Can PHP be configured to use ncurses without the…
I just started playing with Clojure, and I wrote a small script to help me understand some of the functions. It begins like this:
(def *exprs-to-test* [
"(filter #(< % 3) '(1 2 3 4 3 2 1))"
"(remove #(< % 3) '(1 2 3 4 3 2 1))"
"(distinct '(1 2 3 4 3 2 1))"
])
Then it goes through *exprs-to-test*, evaluates them all, and…
Both lines of code:
KeyPairGenerator.getInstance("RSA")
KeyPairGenerator.getInstance("RSA", "BC")
works well. So, what's the differecente using BC or not? Is BC completely compatible with the default RSA used? (using sun JDK 6)
We are currently looking into the Agile Platform by Outsystems.
We have went through their courses and did all the examples but from experience these types of things only show part of the picture.
Are there any serious pitfalls that we may not be aware of?
Hi, just going through the registry retrieving values and binary is making my file outputer fall.
I was wondering how could I convert Subkey.getValue(value[i]) into a String if the Value type is binary?
Thank you in advance
I'm following this example to pass an object to a window, but when it as an argument it's with "undefined" value.
This is my first window (obs. dump is the way to print to console when debug options are turned on):
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<!DOCTYPE window SYSTEM…
class Program
{
static String ChannelName = null;
static Form1 f;
static void Main()
{
f = new Form1();
f.Show();
try
{
MY CODE WHICH CALLS INTO ANOTHER CLASS BUT CANNOT PASS THE GUI INSTANCE AS
IT USES REMOTING
}
}
}
I know this isnt the…
I use the following emailing function with Eudora. For some reason the attachment file name is renamed to be something else. How can I make sure the attachment file name remains intact?
function SendMailMAPI(const Subject, Body, FileName, SenderName, SenderEMail,
RecepientName, RecepientEMail: String) : Integer; …
Hi, im traversing through the registry, taking the values of the keys and storing them as strings. I have discovered there are many different types. Some of these types are causing my filestream writer to fail. Is it possible to convert all of the below into a string form. The actual data value is not important, just the ability to…
else if (!registryData.ContainsKey(kyInvolved))
{
keyInvolved = new RegistryKy(kyInvolved);
lock (registryDataLock)
{
registryData.Add(kyInvolved, keyInvolved);
}
processInvolved = new Proces(procInvolved);
keyInvolved.addProcessToDict(processInvolved);
}
kyInvolved is a String which represents a…
Maybe it is not very thematic question in here, but I guess it will be interesting not only to me. I hope.
So, I just want to get some cool tasks to do using programming languages or just pen and sheet of paper. I guess it can lead to improving my ability to do better code (more optimal I mean.)
Do you know any websites where I…
I've modified an object dumping method to avoid circual references causing a StackOverflow error. This is what I ended up with:
//returns all fields of the given object in a string
public static String dumpFields(Object o, int callCount, ArrayList excludeList)
{
//add this object to the exclude list to avoid circual…
Here's my problem: I would like to create two separate instances of the same DLL.
The following doesn't work because Handle1 and Handle2 will get the same address
Handle1 := LoadLibrary('mydll.dll');
Handle2 := LoadLibrary('mydll.dll');
The following works, but I have to make a copy of the DLL and rename it to…
I am a new-comer to OpenGL, and much of it remains mysterious to my feeble brain. I have been studying the NeHe demos as well as the Red Book. I am writing an Android application that displays the Earth in the center of the screen. The user can rotate the Earth about any axis (much like a very simple "Google Earth").
…
This question has been completely edited in hopes that it will be reopened.
The naming of the main Node.js file is something left to the user and and does not seem to be defined by any well established convention. In hopes of finding a good name, I am curious if there are naming conventions in other parts of the…
Hi, I'm trying to update a hidden field based on the a title attribute on a select option, I've tried the code bellow and can't seem to get it to work. Thanks for any help!
<form>
<select id="selectbox">
<option name="test" value="one" title="title" selected="selected">one</option>…
I have defined an object in 3D space with position, rotation and scale values (all defined as 3D vectors). It also has upwards and forwards direction vectors. When I rotate the object, I need these direction vectors to rotate with it.
Assuming my up vector is (0, 1, 0) and my forwards vector is (0, 0, 1)…
Hi,
Does anyone know a library to compare addresses in Java ?
Something that would give equality on addresses, written in different ways.
For example, it should recognize that
"22 Acacia Avenue" and "22 acacia av."
is the same address.
Of course, this can escalate a lot, that's why i'm asking.
…
Hello I would like to write a Python script which allows me to delete files from a FTP Server after they have reached a certain age. I prepared the scipt below but it throws the error message: WindowsError: [Error 3] The system cannot find the path specified: '/test123/*.*' Do someone have an idea how…
I think i know roughly why i'm getting this message. I opened a VS2008 project in VS2010, realised my code wont work with .NET 4, so i re opened it in VS2008 but now it wont build.
Can someone advise me how i can get this back to building? I deleted the debug folder and built again but nothing has…
I'm developping a web application in Eclipse and I'm using maven, spring and tomcat.
Now the problem I have is that debug as = debug on server doesn't work.
I just get exceptions. (and yes I've created the server)
If I use the mvn command to compile it, put the war in my tomcat webapps dir and…