Let's say I needed to make a series of String[] objects.
I know that if i wanted to make a string array called "test" to hold 3 Strings I could do
String[] test = new String[3];
But let's say I needed to make a series of these arrays and I wanted them to be named, 1,2, 3, 4, 5... etc. For however many I needed and I didn't know how m...
package Sartre.Connect4;
import javax.swing.*;
public class ChatGUI extends JDialog {
public ChatGUI(){
setTitle("Chat");
}
}
when i do this in another class in the same package:
ChatGUI chatGUI = new ChatGUI();
i end up with a situation: Cannot Find Symbol
please help?
...
Simple question, how do I convert an associative array to variables in a class? I know there is casting to do an (object) $myarray or whatever it is, but that will create a new stdClass and doesn't help me much. Are there any easy one or two line methods to make each $key => $value pair in my array into a $key = $value variable for my cl...
I'm currently writing some code that uses Flee to evaluate a number of rules and I'd like to include an ASP.NET based object inspector in the configuration screen so users can inspect the values of objects that are made available.
I've put together a fairly basic routine to recurse an objects properties and spit it out but before I go a...
I have the following class objects in Google App Engine's dadastore, I can see them from the "Datastore Viewer " :
import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;...
Is there a way in IE Browsers to access the Flash object? In this case it is made with mootools swiff. It´s working fine in all other browsers, because they can wrap this object correctly. But it does not work in IE.
Here is the script:
var swfObj = $('mbImage').getElement('object');
swfObj.get('data'); <--- Thats not working in IE
...
Hi all,
I have an object in PHP with some very odd property names. I just need to know how to access a property when it's name is "//www.w3.org/1999/02/22-rdf-syntax-ns#type".
I found something that suggested
$object->{'//www.w3.org/1999/02/22-rdf-syntax-ns#type'};
but that doesn't seem to work.
Thanks in advance
Rob
...
VB 2008 .NET 3.5
Suppose we have two classes, Order and OrderItem, that represent some type of online ordering system. OrderItem represents a single line item in an Order. One Order can contain multiple OrderItems, in the form of a List(of OrderItem).
Public Class Order
Public Property MyOrderItems() as List(of OrderItem)
End...
I have a flash video loading in a modal window. It works in others browsers but not Firefox. Firefox opens the modal window to the correct width of the object, but with no height. I have come to learn that Firefox does not recognize <param> and instead uses the data attribute. However, when I remove this attribute, the modal opens with c...
I think i am lost with basics itself. What is the difference between these two. String object is an instance of String Class.
var guru:Object = new Object();
var guru:String = new String();
...
Hey, I currently am having trouble trying to get this to work. Here's a sample code of what I am trying. A lot has been taken out, but this should still contain the problem. I have an object, user, and an array, player. I am trying to make an array with the players in it, here:
function user(name, level, job, apparel)
{
this.name = nam...
Assume that I have a class value object defined in php, where each variable in the class is defined. Something like:
class UserVO {
public $id;
public $name;
}
I now have a function in another class, which is expecting an array ($data).
function save_user($data) {
//run code to save the user
}
How do I tell php that the $data p...
Hello Guys,
How will I use an instance of an object that is initially loaded throughout the whole site?
I want $myinstance to be used everywhere.
$myinstance = new TestClass();
Thanks!
...
Sorry for the crappy title I failed to think of a better version for my Java question.
I am right now using Java version: 1.6.0_18 and Netbeans version: 6.8
Now for the question.
What I've done is created a class with only one protected int property and next I made a public method to Set the int property to a given value.
Then I made a...
in Objective-c I have this function prototype:
-(NSString*)formatSQL:(NSString*) sql, ...
I may pass to this function any type of parameters: NSString, NSNumber, integer, float
How can I determine in the function if a parameter is an object (NSString..) or a primitive (integer...)?
thanks
BrochPirate
...
Hi
I am trying to work on sending an object of my "Customer" class from one activity and display on other activity.
the code for the customer class : `package com.kaibuki;
public class Customer {
private String firstName, lastName, Address;
int Age;
public Customer(String fname, String lname, int age, String address) {
firstNam...
I have an object obj and a class name MyClass, i can check whether obj is of the type MyClass using either instanceof or i can say obj.getClass().equals("MyClass").
So i want to know are there any other ways of checking the type of an object.
...
I have a variable in java which return type is Object(java.lang.Object). I want to store this variable value in MySQL database without casting in any other primitive data type. Is there any data type available in MySQL related to Object? If anybody knows, please reply at your earliest time.
Thanks,
...
Getters and Setters are bad
Briefly reading over the above article I find that getters and setters are bad OO design and should be avoided as they go against Encapsulation and Data Hiding. As this is the case how can it be avoided when creating objects and how can one model objects to take this into account.
In cases where a getter or ...
Hi!
I've been having a bit of a problem with jQuery and XHTML.
Basically, I've got an object tag that contains a Web Page in its data attribute. Now, what I want is that when I click a button I get this web page and dynamically change the CSS file it's currently using.
I've tried to get the page by using jquery, but all I get is the ob...