Jump to content
xisto Community

beeseven

Members
  • Content Count

    628
  • Joined

  • Last visited

Posts posted by beeseven


  1. http://forums.xisto.com/no_longer_exists/

    A fourth-day EMT was playing around with defibrillator paddles and shocked a coworker as a prank. Defibrillator paddles are what are used to restart a person's heart if it stops (when the person shouts "Clear!" and shocks someone). Unfortunately for this guy, they can also stop a beating heart. The coworker he shocked, a mother of two, was unconcious for three days and then died. The maximum possible sentence (for involuntary manslaughter) is 10 years in prison.

  2. http://forums.xisto.com/no_longer_exists/

    Just after giving birth, a woman was transferred to a different hospital- which then took off her arms and legs. They refuse to tell her why, and say she'll have to sue them to get the answer. They say she had some weird disease, won't explain how she caught it. She cites a law that says they have to tell her, they don't because it would supposedly violate someone else's privacy.

  3. Sorry about triple posting, but I think the search is over. After extensive research, I have found the answer to my problem in an official Sun Java tutorial. It uses the java.lang.reflect package and a couple other things. Here are some links related to it in case anybody wants them:

    The reflection (java.lang.reflect) API
    Using no-argument constructors for unknown classes
    Using constructors with arguments for unknown classes
    Getting a Class object knowing the package and name of the class you want

    I guess this topic can be closed now.


  4. I've thought of something else, I doubt it works but I'll test it. I'll put it here in case anybody else is working on this and maybe it will help him or her.

    Since the getClass method is in Object, could I possibly cast an Object to another class and then use getClass on that? Casting is usually done using just parentheses and the class name, but can you use parentheses and a String? Something like:

    Object x = new Object();x = ("String")x;
    So my question is, would that also work as a cast or just give some weird error/do nothing. As I said before, I'll test it, but maybe it helped someone.

  5. The point is that I need an object of the class "Class" (http://forums.xisto.com/no_longer_exists/). I can't use a constructor as you suggested because there aren't any. I just want to be able to take a String and use the class that's name is contained in the String- I won't know what it is, so it has to be able to work without knowing that. There'll be an input, then the program will use whatever class was inputted, but I can't just use an if/else if statement for three thousand classes.


  6. As you may or may not know, there's a java.lang.Class class which handles stuff that's pretty cool. You can use it to get the methods of a class, constructors of a class, etc. Anyway, I'm kind of interested in making a simple Java interpreter, and if I were able to cast a String that contains the name of a class into a Class object, it would make that project infinitely easier. The most obvious thing would be to use a Class object constructor, but there aren't any. So basically, I want to do something like this:

    String s = "System";Class c = (Class)s; //not sure if this worksMethod m = c.getMethod("currentTimeMillis", new Class[0]);long n = m.invoke(null, new Object[0]);//etc.
    I'm not sure if the line (that has been clearly labeled) works, though. If anyone knows if this does or doesn't work and can suggest an alternative if it doesn't, the help would be greatly appreciated.

  7. If you make the form itself in a php file, then you could have something like this:

    <form method="post" action"[the file name]">  ...  <input type="submit" name="submit" value="submit" /></form><?phpif($_POST['submit']){     //process the stuff}?>
    This will make the user come back to the form page. Also, having the if statement to check if the form has been submitted will make it so that the script doesn't process anything the first time the user enters the page.

  8. It's something about the Catholic and/or Christian church, and how they tried to downplay the role of women in society. It's just another thing that they did to try to make men the dominant gender. In some cultures (like Hispanic), the children take both parents names', but I don't remember the order of the parents' names or which of the mom's last names is used.

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.