methods

applet communication using post method

I have an applet that is communicating with a servlet. I am communicating with the servlet using POST method. My problem is how do I send parameters to the servlet. Using GET method, this is fairly simple ( I just append the parameters to the URL after a ?). But using POST method how do I send the parameters, so that in the servlet side,...

Proper way to return an array

Hey there, I never seem to get this right. I've got a method that returns a mutable array. What is the proper way to return the array and avoid potential memory leaks? If I plan to store the results locally inside another view controller, does that affect the way the array should be returned? Lastly, what if it's just an non-mutable...

c# Generic List

I m populating data for different entities into set of lists using generic lists as follows : List<Foo> foos .. List<Bar> bars .. I need to write these lists to a file, i do have a util method to get the values of properties etc. using reflection. What i want to do is: using a single method to write these into files such as: void w...

Delphi - RTTI info about methods in records

hello, how to extract RTTI info about methods in Delphi records? is it possible by using new Rtti unit? ...

In Wicket, what is the difference between the different get input methods?

What is the difference between getRawInput, getValue() and getModelValue() etc...? ...

how to add static methods using groovy mixin

hi, I want to use the mixin feature of groovy to import methods as "class(static) methods" instead of instance methods. When i use mixin even though i have a static method in my mixin class it gets converted into a instance method in the destination class.I want the imported method to be a class(static) method.Is there a good way to do...

How do you Read the value of an attribute in a Method

I need to be able to read the value of my attribute from within my Method, how can I do it? [MyAttribute("Hello World")] public int MyMethod() { //Need to read the MyAttribute attribute and get its value } ...

How to pass a class method as an argument for another function in C++ and openGL?

I know this thing works: void myDisplay() { ... } int main() { ... glutDisplayFunc(myDisplay) ... } so I tried to include myDisplay() function to a class that I made. Because I want to overload it in the future with a different class. However, the compiler complains that argument of type 'void (ClassBlah::)()' does not match 'void(*...

Cannot access Class methods from previous windows form - C#

I am writing an app, still, where I need to test some devices every minute for 30 minutes. It made sense to use a timer set to kick off every 60 secs and do whats required in the event handler. However, I need the app to wait for the 30 mins until I have finished with the timer since the following code alters the state of the devices I ...

Why can't I override and new a Property (C#) at the same time?

According to this question it seems like you can do this for Methods. What I want to know is why it doesn't work when I try it with properties. public class Foo { public virtual object Value { get; set; } } public class Foo<T> : Foo { public override object Value { get { r...

Getting a variable into another class through properties or button tags with Iphone SDK?

Hello. I have been pounding my head against a wall trying to figure out what I think is a simple thing to do, but I have, so far, been unable to figure it out with the iPhone SDK. I have a view with 4 buttons. When I push the buttons, I have another view called and come up to take over the screen. I want to have a simple variable pas...

is there an equivalent to a "Focus Listener" in Objective-C or iPhone SDK? (Coming from Java)

Hello. I am a student programmer who has taken up Objective-C on my free time as my college doesn't teach it. We have only used Java and basic C so far. I am in the middle of making a program for the iPod and was wondering if there was any type of way to call a method in a class similar to the way a Focus Listener does in Java? I hav...

Java Finalize method call

I need to find when finalized method called in the JVM. I Created a test Class which write into file when finalized method called by Overriding the protected finalize method It is not executing. Can anybody tell me the reason why it is not executing?? Thanks in Advance ...

java: Close connection after all threads have terminated

The following is my Class code import java.net.*; import java.util.*; import java.sql.*; import org.apache.log4j.*; class Database { private Connection conn; private org.apache.log4j.Logger log ; private static Database dd=new Database(); private Database(){ try{ log= Logger.getLogger(Database.class);...

uitableview delegate methods are not called

hi all i got the problem that the tableview methods are not called the first time the tableview is shown. if i switch back to the previous view and then click the button to show the tableview again, the methods are called this time. i've to say that i show an actionsheet while the tableview is loading. the actionsheet i call in the Vie...

How do i change this method to get strings instead of ints

here is the original code: public static int getInt () { Scanner in = new Scanner (System.in) ; if (in.hasNextInt()) { int a = in.nextInt() ; return a ; } else { System.out.println ("try again:") ; return getInt () ; } } This checks and sees if the input it receives is an int....

Call a c# method from Javascript

Hi i want to call a C# method.. I already tryed with webmethod, but in the c# method i will not have acces to textbox or others controls. this is how i done without success.. http://www.singingeels.com/Articles/Using_Page_Methods_in_ASPNET_AJAX.aspx With static works, but i want without static, so i can access to the controls in the as...

C# newbie problem part 2 - declaring class and method

[AcceptVerbs(HttpVerbs.Post)] public ActionResult Upload(Photo photo) { foreach (string file in Request.Files) { var path = "~/Uploads/Photos/"; HttpPostedFileBase posted = (HttpPostedFileBase)Request.Files[file]; if (posted.ContentLength > 0) { photo.Date = DateTime.Now; ...

Why does this while terminate before receiving a value? (java)

Here's the relevant code snippet. public static Territory[] assignTerri (Territory[] board, String[] colors) { for (int i = 0; i<board.length; i++) { // so a problem is that Territory.translate is void fix this. System.out.print ("What team controls ") ; Territory.translate (i) ; System.out.println (" ?") ;...

Qt undocumented method setSharable

I stumbled about a method which seems to be present in all DataObjects like QList, QQueue, QHash... I even investigated so far i can see the source code of it, which is inline void setSharable(bool sharable) { if (!sharable) detach(); d->sharable = sharable; } in qlist.h (lines 117) but what effect does it have on the QList, QQueue,...