How can I get ContextMenu that a ToolStripDropDownItem belongs to? This is for the purpose of using the ContextMenu.SourceControl as the logical sender to an event.
I have a situation in my code, where I cannot clean up my classes objects without first calling [super dealloc]. It is something like this:
// Baseclass.m
@implmentation Baseclass
...
-(void) dealloc
{
[self _removeAllData];
[aVariableThatBelongsToMe release];
[anotherVariableThatBelongsToMe release];
[super dealloc];
}
...
…
I'm fairly new to reflection and I was wonder what I would use a (second) AppDomain for? What practical application would one have in a business application?
Here is what i'm trying to do:
Delete the project from projects table and all the images associated with that project in the images table
Lets say $del_id = 10
DELETE FROM projects, images WHERE projects.p_id = '$del_id' AND images.p_id = '$del_id'
What is wrong with this query
Hey,
I need to implement a ruby on rails project using XML-RPC. I have no idea where to get started but I've used ruby on rails before (just never with XML-RPC). Can someone help me out on get started with this?
A classmate printed out a diagram of a database for class, the kind with lines representing relationships between tables. However, his lines crossed all over the place and it looked ugly.
So I got to thinking about a way to move the tables to minimize the total line distance, and I couldn't think of a way to do it, other than just moving them…
If I am in some library code, how do I determine the path to the file of the code that is currently executing? I know how to get the path of the top perl file by looking at ARGV, but if I load a library, how can that library know which path it is at?
With the new Zend_Application/Zend_Application_Bootstrap classes I'm confused as to where I should be applying my custom routes. For example, at the moment I have one route:
protected function _initRouter() {
$router = new Zend_Controller_Router_Rewrite;
$route = new Zend_Controller_Router_Route('news/:id',
array('controller'…
When debugging my django apps I use pdb for interactive debugging with pdb.set_trace().
However, when I amend a file the local django webserver restarts and then I cant see what I type in the terminal, until I type reset.
Is there anyway for this to happen automatically? It can be real annoying, having to cancel the runserver and reset and…
I have a function that is called 3 times, I want times to assign it a name. How can I assign dynamic variable names to movieclips or do reference them by name or instancename?
var loadedMovie:MovieClip = new MovieClip();
loadedMovie.name = "mymovie";
loadedMovie = loadEvent.currentTarget.content;
loadedMovie.x = 0;
loadedMovie.y = 0;
…
I'm creating a CSS editor and am trying to create a regular expression that can get data from a CSS document. This regex works if I have one property but I can't get it to work for all properties. I'm using preg/perl syntax in PHP.
Regex
…
This question is about etiquette and open source projects.
I have forked an application from github and added two new features.
The first feature has been request frequently elsewhere. I have added it. Code & implementation are…
Hi,
I am creating a pdf form in acrobat 9 pro, I would like to add a button so the user can insert an image from their machine. I have been give a pdf where this is possible. How can I create an insert image field in my form?
Is this…
hi
<?php
class myClass {
var $input;
var $output;
function myClass($input) {
$output = 'You entered: ' . $input;
return $output;
}
}
$test = new myClass;
echo $test->myClass(123);
?>
this works, but returns this…
Am I being blind, or does the .NET framework not provide any kind of ranged integer class? That is, a type that would prevent you setting a value outside some given bounds that are not the full range of the basic data type. For…
I'm looking for some good tools that help to share tips, best practices, company standards, etc. amongs developers in my company. Two tools I'm currently considering are a wiki (screwturn wiki) or Sharepoint 2010. I'm…
I'm using the following code to read a SQL XML Variable into a table variable. I am getting the following error. " Incorrect syntax near '.'. " Can't quite Figure it out
DECLARE @LOBS Table
(
LineGUID varchar(40)
)
…
I'm really not confident with Regex, I know some basic syntax but not enough to keep me happy.
I'm trying to build a regular expression to check if an email is valid. So far here's what I've got:
…
I'm writing an IEnumerator<T> class to iterate over a COM collection I'm wrappering. I've noticed that IEnumerator<T> extends IDisposable, so I'm required to implement the Dispose…
I'm currently trying to create a ControlTemplate for the Button class in WPF, replacing the usual visual tree with something that makes the button look similar to the little (X) close icon on…
Is there any kind of PHP script that has a user database with custom tables that I can access through a RESTful API? I am wanting to create an iPhone app that interacts with the user…
Is there a way in java to create a string with a specified number of a specified character? In my case I would need to create a string with 10 spaces. My current code is:
…
Hello,
I'm using a linux server that display directories in a bold font, and files in a normal font.
e.g. $ ls produces
afile.txt afolder anotherfile.txt …