If I want to have multiple forms in an appication, can I do it with only
one main? I am working with Visual Studio C# (Windows Application).
Thank you.
I am having trouble believing the following code is the most efficient way to move a value from the stack to ST(0):
.data
var dd 4.2
tmp dd ?
.code
mov EAX, var
push EAX
; top of stack now contains a value
; move it to ST(0)
pop EAX
mov tmp, EAX
fld tmp
Is the temporary variable really necessary? Further, is there an easier way to get a value…
Hello guys,
I have a generic list.
Some elements of this list belong to a parent element. I retrieved all these elements from a database and i want to recursively build a tree with them.
So, here's what i'm thinking:
Here is my predicate:
public static bool FindChildren(Int32 parentId,CategoryMapping catMapping)
{
if (catMapping.parentId…
Yes, I know the title sounds a little suspicious. I will try to explain this the best I can...
The code below is supposed to have the blue div slide down beside the red div. The first time you hit the Show the div button, it works. Also, the Hide the div works.
Then when I click to show the div again, it appears to the right of where it is…
So I am making a game on Visual Studio C# and I want the form to
be automatically maximized to any user's computer screen when compiled?
How can I do that?
Thank you.
Note: This question uses jQuery but the question has nothing to do with jQuery!
Okay so I have this object:
var box = new BigBox();
This object has a method named Serialize():
box.AddToPage();
Here is the method AddToPage():
function AddToPage()
{
$('#some_item').html("<div id='box' onclick='this.OnClick()'></div>");…
I set up subversion on my Windows 2008 server and it works fine locally, but when on a remote machine, I would like to be able to access my repository by using the URL of a website hosted on my server. Any idea how I can set that up?
Okay, I am really stuck here.
I have a table of tr's that have id's: #tr_xx
where xx is a number.
item is a number.
The if(... part makes sure that what follows is only executed once at the end of all the animations.
$('#tr_' + item + '>td').fadeOut('slow', function() {
if($('#tr_' + item +…
I need to assign a custom property to a jQuery object. Here is the object:
var object = $("<div id='item'></div>");
I need object to have a custom data member. How can I add this?
I am using Qt Builder to create a simple window.
I used the menu editor to add a menu.
Now, I figured out how to connect one of the menu items to the close() method of the main window. My problem is how to add a slot to the main window. Here is what I have:
private slots:
void OnAbout();
However, I can't get…
How can I change the current selection in a wxListbook from another thread?
When I pass the listbook's pointer to the thread and try to change the selection, the app crashes. What is a safe way of doing this? Is there some message I can send to it?
I have the following set of controls.
Scenario 1:
If you select one of the first 3 radio buttons and click enter, focus will jump to the Passport Number text box. If the user selects "Other", the "Other, Please Specify" textbox is enabled and, for convenience, screen focus (the cursor is moved) to that textbox.
…
Hello all.
I have a tree structure that can be n-levels deep, without restriction. That means that each node can have another n nodes.
What is the best way to retrieve a tree like that without issuing thousands of queries to the database?
I looked at a few other models, like flat table model, Preorder Tree…
I have a Gnome applet written in Python. In order to save configuration data/settings, it creates a file ~/.appname.
However, this prevents multiple instances of the applet from being added to the panel because each cannot have its own settings.
How can I store the settings in a way that allows each…
I have this code and the problem I have is that I want to stop the loop and then replace the text 'Done!' that comes from the sms-loader.php script with the "textnew" string. Problem is that the loop occurs one more time so the text in the div.checkstatus field is again replaced by the calling php…
This is a little tricky so bear with me:
I have a PHP script a.php that is launched from the command line and data is provided to it via STDIN
I have another PHP script b.php
I want to have a.php launch b.php and capture its output.
Also, a.php has to forward the STDIN to b.php
Is there an…
Here's a test that should, in my opinion be passing but is not.
[TestMethod]
public void can_get_open_generic_interface_off_of_implementor()
{
typeof(OpenGenericWithOpenService<>).GetInterfaces().First()
.ShouldEqual(typeof(IGenericService<>));
}
public interface…
Hi All,
I am dealing with a "large" measurement data, approximately 30K key-value
pairs. The measurements have number of iterations. After each iteration a
datafile (non-csv) with 30K kay-value pairs is created. I want to somehow
creata a csv file of form:
Key1,value of…
This is a follow up from a question of mine that was just answered concerning parsing numbers in an array.
I have an array, data[], with numbers that I'd like to use in a calculation and then put the resulting values into another array.
So say data[0] = 100. I'd like…
Public Class Orders
Inherits System.ComponentModel.BindingList(Of Order)
End Class
Public Sub DataBind(ByVal Orders() As Orders)
End Sub
Dim MyOrders() As Order = Orders.ToArray
SuperListBinder.DataBind(MyOrders) '<<Error occurs on this line
I don't…
I struggle with finding a good medium on communication. In our jobs, it seems like it's very easy to get lost in code and lose track of time. It also seems kind of ridiculous to send out updates for every tiny task. Even though I am working very hard on…
I'd like to take a snapshot of my database, make some changes and then use the db compare functionality to identify the changes, and who knows, maybe even generate scripts to make the change.
I'd like to avoid having to backup the current db and restore…
I am trying to create a script to detect whether a directory exists, and if it does, to create it.
How can I do that?
I did some digging and found a clue:
test -d directory
...will return true or false depending on whether the directory exists or…
Whenever I use print_r or var_dump they come out all sloppy and in one line instead of formatted like I see so many people and the actual php.net site being able to achieve. What do I do to get them like this -
Array
(
[a] => apple
[b]…