Im writing a program that creates an array of classes that run separately. I want to create an array of 500 containing a big class.
Whenever i write the loop to create it, it stops at about 30 or so... is there a limit on java or bugging in my program?
...
I'm trying to write some JS replicating jQuery's fadeIn and fadeOut functions. Here's the code I have so far:
function fadeIn(elem, d, callback)
{
var duration = d || 1000;
var steps = Math.floor(duration / 50);
setOpacity(elem,0);
elem.style.display = '';
for (var i = 1; i <= steps; i++)
{
console.log(i...
I have coded some code in VBA my code breaks at this line raising Application defined or object defined error.
.Formula = "=IF(AND(chr(34) & ' & chr(34) & Criterion " & i & "'!" & cellAdress & ">=1;chr(34) & ' & chr(34) & Criterion " & i & "'!" & cellAdress & "<=4);chr(34) & ' & chr(34) & Criterion " & i & "'!" & cellAdress & ";0)"
...
Hi, I would like some help (and I'm new to this site)
I want a typewriter-effect. So that it looks like the code in the string is typed character by character (for an animation). However, I get a #1009 back. It talks about a null object reference (the error is in Dutch).
My dynamic text field is in the same scene, on a different layer...
Hi,
How can I overwrite the def method? But it's strange, cause I don't know from where the def method is defined. It's not Module, not Object, not BasicObject (of Ruby 1.9). And def.class don't say nothing ;)
I would like to use something like:
sub_def hello
puts "Hello!"
super
end
def hello
puts "cruel world."
end
# ...an...
hi,
i'm trying to learn c++, but i can not find if it's possible to extend a class in this way:
main.cc
#include "mWindow.h"
using namespace std;
int main( int argc, char* argv[] ) {
gtk_init( &argc, &argv );
mWindow win = mWindow();
gtk_main();
return 0;
}
mWindow.cc
#include "mWindow.h"
mWindow::mWindow() {
gtk...
Is there a way to check if an object has any fields? For example, I have a soap server I am querying using a soap client and if I call a get method, I am either returned an object containing fields defining the soap query I have made otherwise I am returned object(stdClass)#3 (0) { }.
Is there a way to tell if the object has anything? ...
Hello, i was wondering how could i add .customString to PictureBox object.
Something like:
PictureBox box = new PictureBox();
box.CustomString = "string here";
And then later on i would be access it.
MessageBox.Show(boxname.CustomString);
Thank you.
...
I have several custom Javascript objects and want to do some debugging via the Firebug console inside of them. However, if I try to use console.log(), I get an error about console not being defined. I tried referencing console as window.console and it made no difference. When I run a check to see if console is defined, it returns false:
...
I was wondering how could I select objects which were created during programs runtime.
Each object has its unique name. How could I select that object by its name?
Example names:
"mapPart_0_0"
"mapPart_0_1"
"mapPart_0_2"
etc.
It's a windows form project. In c#.
Creation of those objects:
private void addBoxes()
...
I have a module including definitions for two different classes in Python. How do I use objects of one class as an argument of the other? Say, I have class definitions for Driver and Car, and tuen want to have a Driver object as an argument for a Car object.
...
Hello, how could i sort objects in list by their name?
Example:
mapPart_1_0
mapPart_1_2
mapPart_1_4
mapPart_1_6
mapPart_1_8
mapPart_1_10
mapPart_1_12
mapPart_1_24
mapPart_2_1
mapPart_2_11
Big list continues... (somewhere in that list are missing that aper in sorted one)
Into:
mapPart_1_0
mapPart_1_1
mapPart_1_2
mapPart_1_3
mapPart_1_...
Developers have expressed a desire to deploy a single database object from a Sql Server 2008 project, such as a stored procedure, without having to use the build/deploy or schema comparison functions.
To enable this, developers have created their database object scripts including 'if exists.. drop' checks at the top of the script and ...
I am getting into OOP and I run into the following dilemma. I have the a class:
class Recipe {
var $title;
var $time;
var $ingredients = array();
var $instructions;
var $category;
function __construct($title, $time, $ingredients, $instructions, $category) {
$this->title = $title;
...
}
...
Ok I have some code that boils down to a pattern like this
class Foo(object):
def get_something1(self):
# in the actual code it asks a web server but here I replaced that with "foo_something1" instead of the code from a web server
self.something1 = "foo_something1"
def get_something2(self):
# needs the result of get_someth...
When iterating over an object's properties, is it safe to delete them while in a for-in loop?
For example:
for (var key in obj) {
if (!obj.hasOwnProperty(key)) continue;
if (shouldDelete(obj[key])) {
delete obj[key];
}
}
In many other languages iterating over an array or dictionary and deleting inside that is uns...
In the below shown examples, the former approach instantiates an object of type SearchResult for each iteration whereas the latter one instantiates the object only once and uses it for all the iterations.
using (DbDataReader reader = (DbDataReader)dbObject.ExecuteReader(command))
{
if (reader.HasRows)
{
...
Hi,
I have an object which is initiated in my nib file. I want it to be a singleton but also accessible from code through [myClass sharedInstance];. Right now I have this:
static myClass *singleton = nil;
@implementation myClass
+ (myClass *)sharedInstance
{
if (!singleton) singleton = [[self class] new];
return singleton;
}
...
Say I have the following class...
Class1
{
private ArrayList myList;
private Class1
{
// Here fill myList with a bunch of Foo objects.
}
public ArrayList GetList()
{
return myList;
}
}
Then say in some other class you have the following code...
Class1 myClass = new Class1();
Foo myFavoriteFoo = myClass.GetList...
I am trying to place flash swf into my html through php but when the page loads the flash file is hidden. I can hear the sounds and music but it is not visible.
Here is the code I am using:
'<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js"></script>
<script ty...