Let's say we have 2 classes A and B
public class A{
private int member1;
A() {
member1 = 10;
}
public getMember(){
return member1;
}
}
Class B is also on the same lines except that its member variable is named member2 and gets intitialized to say 20 inside the constructor.
My Requirement :
At ...
This is a program that finds the highest common factor of 2 different 3digit number.
If I put 200, 235,312 (low numbers) it works fine, but if I put 500, 550, 654 (i.e. bigger numbers) the program crashes after the second 3-digit number is entered. Can you help me find out what the problem is?
.model small
.stack 400h
.data
message ...
How can we call a method which name is string at runtime. Can anyone show me how to do that in Java and C.
Thanks for replying.
...
After some resent tests I have found my implementation cannot handle very much recursion. Although after I ran a few tests in Firefox I found that this may be more common than I originally thought. I believe the basic problem is that my implementation requires 3 calls to make a function call. The first call is made to a method named Call...
In my Android application, I want to rename the file name at runtime. How can I do it?
This is my code:
String[] command = {" mv", "sun moon.jpg"," sun_moon,jpg"};
try
{
Process process = Runtime.getRuntime().exec(command);
}
catch (IOException e)
{
Toast.makeText(this, ""+e, Toast.LENGTH_LONG).show();
}
I also used renameTo...
I'm working on robot simulation in Java (a Swing application). I have an abstract class "Robot" from which different types of Robots are derived, e.g.
public class StupidRobot extends Robot {
int m_stupidness;
int m_insanityLevel;
...
}
public class AngryRobot extends Robot {
float m_aggression;
...
}
As you can see, ...
I create Label in runtime: Label myLabel = new Label {Text = "somText"};. After that myLabel.Width equals default value 104. How I can know real width of myLabel?
...
Hi, i have a big performance problem in R. I wrote a function that iterates over an data.frame object. It simply adds a new col to a data.frame and accumulate sth. (simple operation). The data.frame has round about 850.000 rows. My PC is still working about 10h now and i have no idea about the runtime.
dayloop2 <- function(temp){
fo...
Is there some language that is NP-complete but for which we know some "quick" algorithm? I don't mean like the ones for knapsack where we can do well on average, I mean that even in the worst case the runtime is something like 2^n^epsilon, where the result holds for any epsilon>0 and so we can allow it to get arbitrarily close to 0.
...
Which one has better performance?
setting image property of one control in design-time or in run-time?
...
I'm starting to read in-depth on the .NET framework, and its Common Language Runtime. I'm reading a .NET overview by Microsoft and I'm not sure what is meant by this statement.
Code that targets the runtime is known
as managed code, while code that does
not target the runtime is known as
unmanaged code.
How do you target the...
Hi,
How do I do this on a php webpage?
I want to get and decode a json string and display the results as html on my page, however, I don't want it hotlinking back to the source.
If I could write the decoded string to a txt file say weather.txt on the server and keep the html formatting and do it so that the page won't fetch the json...
Hi,
Thanks for looking at my question.
I have been trying to look around and I have been playing around with low level IVars to get information from the classes. I am having trouble trying to load the values that come from CGPoint.
CGPoint point;
object_getInstanceVariable(obj, [columnName UTF8String], (void **)&point);
NSLog(@"%@...
I want to load EF metadata from database at runtime. Is that scenario possible? First get the data from database, then write it to .ssdl, .msl and .csdl files sounds ok. But how to tell EF to use what I've loaded? Do I need to compile it or something like that?
...
i want to take data from bluetooth into matlab after every 10 to 15 seconds.. have figured out a way to transfer data to matlab via bluetooth. the problem i am facing is that i want matlab to execute a set of commands after a time interval to take input from bluetooth. if u cld plz help in this matter??
...
Is it possible to convert a Button into a TextView onclick during runtime?
Thanks
Chris
...
Hi!
At my current project(huge enterprise system) I'm faced to scenario when "simple" objects like table, reference list are created at runtime via system info stored in the same DB(special sys tables). Users can create those simple objects and relations between them.
The complicated objects are created by developers. For the first case ...
I am attempting to move all controls on a form down or up by the height of a menubar depending on whether it is visible or not. I have code which I think ought to work well for this, however it seems that Me.Controls is empty at runtime, so my for each loop is never entered. Could someone please offer a suggestion as to how I can move ...
I'm looking at writing monitoring code that runs inside a Java application and periodically takes a snapshot of running threads and displays some call stack information on each.
Ideally this would be extended for profiling and/or monitoring.
I don't want to use an external tool, as this is for self educational purposes.
...
Is there a way in PHP to try to include a file, but if the file contains errors that stop it from compiling to just skip that file from inclusion?
...