Hi,
1) What is difference in thers two statements:
String s1 = "abc";
and
String s1 = new String("abc")
2) as i am not using new in first statement, how string object will be created
Thanks
hello:
i have just created a new empty website from visualstudio 2010, added an new webform and droped a login control into the page.when i click the tag "administer website" then try to open security-Use the security Setup Wizard to configure security step by step, the IE8 shows the error: "Object Expected".
(tried to make a asp.net site with generated code, without any modification, but the error still occered)script type="text/javascript"
Hi,
How can i set an image to a circular slider, which is an object of NSSlider. I have called setImage: method, but does not work out. What could be the alternative approach to do so.
i like to drag this object vertically instead of horizontally, which is doin it now:
(void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event {
UITouch *touch = [[event allTouches] anyObject];
CGPoint location = [touch locationInView:touch.view];
if (CGRectContainsPoint(myObject.frame, location)){
CGPoint xLocation = CGPointMake(location.x, myObject.center.y);
myObject.center = xLocation;
}
}
{"names": [
{"patientName": "Ratna"},
{"patientName": "raju" },
{"patientName": "krishna"},
{"patientName": "kishore"},
{"patientName": "Kishore1"},
{"patientName": "mahesh"}
]}
this is the JSON object i'm getting from Ajax call
so now i want to add all patientName values to select box through jquery
can any one tell me how to accomplish this ??
here i'm using $.ajax() function for ajax call
thanks in advance
How can I get the session from within a command object?
I have tried:
import org.springframework.security.context.SecurityContextHolder as SCH
class MyCommand {
def session = RCH.currentRequestAttributes().getSession()
}
This throws
java.lang.IllegalStateException: No thread-bound request found: Are you referring to request attributes outside of an actual web request, or processing a request outside of the originally receiving thread? If you are actually operating within a web request and still receive this message, your code is probably running outside of DispatcherServlet/DispatcherPortlet: In this case, use RequestContextListener or RequestContextFilter to expose the current request.
when i connect to database by ado.net. As for sqlconnection object, it has a function:BeginTransaction with 3overload. I dont know how to use it and what's its function for? Help me plz!
I would like to be able to add a click event to a entity generated in the code behind. Currently I'm doing it like this:
TableRow row = new TableRow();
row.Attributes.Add("onclick", "clickFunction(this)");
Is there a way to do this using the object initializer? I am doing a lot of control creation/initialization and if it matched the rest of the code it would be nice
Hi Everyone,
I'm specifically using the Google Contacts API at the moment, but this could be true of other scinarios as well.
I have the following code:
Contact newContact = new Contact();
When I let the code run without any breakpoints, I get a NullReferenceException on all of the properties of this object. However, if I put a breakpoint just after this line, I can see all of the properties have been initialises and the rest of my code executes fine.
Any idea's would be greatly appreciated
I like the ease of using @Resource annotation to get a DataSource, but as far as I know, it's not possible to use it in a regular JavaBean. Would it be considered a bad practice if I pass the DataSource object from a servlet to a bean along with the other data to avoid having that lookup code in the bean?
What .NET method has this error message: "Object cannot be cast from DBNull to other types"
The stack traces have been stipped from my logs so I'm looking for a starting point.
i.e. would cause the object to be released immediately and not have to be released by the pool if I did this?
[[NSArray arrayWithCapacity:100] release];
Can't find a clear explanation in the docs about this.
Is it possible to modify the Codec List Object in an ASF file? In particular, I would like to edit the codec name and description. I realize that this won't actually change the content of the video, but it's necessary for the video to be verified by an external tool.
Does anyone know of a tool that will allow me to do this? If not, does anyone have any suggestions about how I might go about doing it using the Windows Media Format 11 SDK?
I have code that looks like this:
public class Polynomial {
List<Term> term = new LinkedList<Term>();
and it seems that whenever I do something like term.add(anotherTerm), with anotherTerm being... another Term object, it seems anotherTerm is referencing the same thing as what I've just inserted into term so that whenever I try to change anotherTerm, term.get(2) (let's say) get's changed too.
How can I prevent this from happening?
Hey,
I want to use a method of an object.
Like $myObject->helloWorld().
However there are a couple of methods so I loop through an array of method names and call the method like this:
my $methodName ="helloWorld";
$myObject->$methodNames;
This works quite nice but some objects don't have all methods.
How can I tell wether $myObject has a method called helloWorld or not?
I got script what read from database and manipulate it so on the end I got $result array...
on one server
is it possible to serialize this object and pass it to other script so this $result array could be available for other script on second server...
I got on first server:
return serialize ( $results );
and on second:
$data = unserialize ( file_get_contents ( 'http://www.......com/reader.php' ) );
...but there is no communication between ....
What I am doing wrong ?
Bensiu
I was trying to execute the below code in my javascript and got some exception
var now3 = new Date();
now3.addDays(-4);
Error throwed is
Microsoft JScript runtime error: Object doesn't support this property or method
I m using jQuery 1.3.2 in my page .
Whats wrong with this? Please help
Hello,
I have the following:
Class 1 (Text, State, Level)
Class 2 (Text, State, Level, Ident)
Is there a way for me to cast an object of Class 2 into into Class 1, and not having to do the usual cast code (Text = c.Text, State = c.State etc.)? Possibly by identifying the property names of each class and copying the value over?
So I've been reading through the book PHP Solutions, Dynamic Web Design Made Easy by David Powers. I read through the short section on Object Oriented PHP, and I am having a hard time grasping the idea of the - operator. Can anyone try to give me a solid explanation on the - operator in OOP PHP?
Example:
$westcost = new DateTimeZone('America/Los_Angeles');
$now->setTimezone($westcoast);
Also,a more general example:
$someObject->propertyName
Thanks
In most MVC based framework I see a router object. If I look at it splits up the uri and decides what controller should be used, and which action should be fired.
Even though this makes a lot of sense, I can not give this a place in the MVC patern. Is splitting up the uri not the job of the controller. And then the controller should just decide which class and function to run.
Hi
I am Serialing an object using
GetObjectData(SerializationInfo info, StreamingContext context)
{
info.AddValue("string1",subobject1);
info.AddValue("string2",subobject2);
}
what will be stored in stream? do the strings also store?
I tried to upload xml file using xmlhttprequest object on Javascript.
It works perfectly well on Firefox.
However, it fails on IE 8.
I tried several machines.
Same result......
any insights?