- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 13
- Posts with Upvotes
- 13
- Upvoting Members
- 10
- Downvotes Received
- 1
- Posts with Downvotes
- 1
- Downvoting Members
- 1
66 Posted Topics
to make loops in assembly you need to use something similar to the goto function in c. create a point to "goto". example: move $t0, $zero #set $t0 to 0 for your counter. pos1: beq $t0, 10, pos2 #terminate the loop if $t0 equals 10 addi $t0, $t0, 1 #do …
Let me make sure I understand you. You want to create a boolean variable who's value tells what floor you are on or whether or not you are going up or down. here is how you create a boolean var: [CODE]Boolean [B]down[/B] = [B]true[/B];[/CODE] can change the items in bold …
I'm attempting to write a substitution function but am having trouble figuring out how to fix the Error: operator and operand don't agree [circularity] operator domain: ''Z list * ''Z list * ''Z list operand: ''Z list * ''Z list * ''Z in expression: sub2 (x,y,hd z) Code: fun sub2(x, …
I have this cache latency graph and I am trying to figure out how to find the cache block size for L1, L2 and L3 caches from it but I cant find anything on how to do so I was able to guess the total cache size though.  …
I have built this function which calls a couple other functions to get the oprator and numbers for an arithmetic operation but I get the error `function call: expected a function after the open parenthesis, but received '+`. normaly you invoke addition as (+ 5 6) and multiplication as (\* …
I'm trying to implement a simple recursive list search in SML/NJ but am getting some errors i dont understand. Here is the code: fun find x y = if (null y) then false else if x = hd(y) then true else find(x, tl(y)); Here are the errors: stdIn:130.6-135.22 Error: case …
To reduce the result you need to calculate gcd(numerator, denominator) simply divide the numerator and denominator by that value. gcd = greatest common divisor There are quite a few examples of this in Java available through a simple google search. Here is the first one i found: public static long …
I have been trying to implement a partially Dynamically generated GUI but an having trouble with the layout not rendering properly. Simply resizing the window corrects the issue. Here is the problimatic generation code: public void setupBookTabs() { ArrayList<String> bookTabNames = Record.getBookGroups(); for (int i = 0; i < bookTabNames.size(); …
[Let me google that for you](http://lmgtfy.com/?q=install+windows+xp+from+usb) first two results are tutorials on how to write xp to the usb disk so that you can install from it. Good Luck :)
One way to test if "a" is divisible by "b" simply subtract "b" from "a" until you get a negative number or zero. You can also test divisiblity using bit operations. To test if something is diisible by 2 do: if(a & 1 == 0) //checks if there is a …
PHP and Java are certainly two of the most commonly used languages today but that does not mean they are the most powerful. Java is definately near the top of the list for power in a language but java is restrictive on what you can and cant do. For example …
I need to get the value of the primarykey for the most reciently created entry in an h2 database only problem is i cant figure out how to call scope_identity() which is supposed to return a resultSet with the most reciently created key. Here is the function i am using: …
Your sql string is improperly formatted. There should be spaces between all the commands and names and if you want to load the values of s1, s2, . . . into the database you need to treat them as variable concatenations to a string. Also surrounding each value with ' …
Pull out your calculus book and create a list of different kinds(solved using different methods) of integration problems then teach your app how to identify each one individualy. Now that your app can discern between different "kinds" of problems you can teach it how to solve each of them. I …
I am working on a mapping system to support pathfinding over areas that are too large to hold in memory. The problem i have run into is how to load only a small part of the map when its all linked together and then dynamicaly load more of the map …
Android java shares essentialy the same api as oracle java and follows all the same language rules so learning the core language will help immensely in your quest to program for android also its a lot easier to find books and tutorials on java vs android java. Here are a …
try `java -jar "C:/pathtojar/"` with quotes. If that does not work check and make sure you have a main class selected in netbeans: 1) Right click the project select properties 2) In the left hand pane select "Run" 3) under Main Class: your runnable class should be selected.
Here are a few things you can try: 1)Pull out the battery and leave it out for 5 min then put it back in then try to turn on the phone. 2)Get a battery you know is good(from a phone the currently works) and replace the one in the broken …
code for above post :) int matrix[3][4] = {{3, 4, 5, 6}, {1, 4, 6, 9}, {8, 3, 5, 2}} Printing the array using nested for loops: for(int i = 0; i < 3; i++){ //initialize the for loop. for(counter var; exit condition; incriment the var) for(int j = 0; …
It hard to help when you dont tell us much about the problem and your description is not very clear. You mean that the class is not compiling?
What are the errors codeblocks gives you when the program gets stuck or is it trapped in an infinite loop? Try inserting print statements to find out where its getting stuck if your not getting any errors.
Check out this website http://linuxhomeserverguide.com/ it explains how to do everything you listed.
Java applets are still very powerful but as iamthwee said its a "has-been" there are much better ways to create in browser programs, javascript for example. One thing to realize is that the computer accepts all input and output as strings so not being able to ues just integers is …
When you call a constructor it instances(creates) an object right? When using the `this` keword in the object constructor it refers to the object that is being instanced(created). When using it outside of the constructor such as in a method call like: foo1.addDimension(dim1) where below is the method called: public …
Google is your friend :) first search result: http://www.tutorialspoint.com/jsf/ here is one specificaly for eclipse: http://www.coreservlets.com/JSF-Tutorial/ and of course oracle's offical tutorials: http://docs.oracle.com/javaee/6/tutorial/doc/bnaph.html http://docs.oracle.com/cd/E11035_01/workshop102/webapplications/jsf/jsf-app-tutorial/Introduction.html
Ok so im working on a mapping library for my pathfinding system and im trying to figure out what Data structure would be best to use for rapid calls up to several hundred a second, as low memory usage as possible, and not too difficult to store and load pieces(chunks) …
Ive been working on pathfinding algorithms for a couple weeks now and A Star has me stumped. Right now i am attempting to Pathfind over a maze in a matrix of the form boolean map[x][y][5]; where index 0-3 are the walls on the cells starting on the right with 0, …
I could not get c function calls to work inside of nasm so i wrote my own read integer procedure. Im sure its inefficient and could be greatly imporved but right now I'm interested in where the negative sign went. Any help is greatly apreiciated. ;---------------------------------------------------------; ;reads a 64 bit …
So ive been teaching myself x86 over the last couple days now im trying to call c functions and am getting segmentation faults. if someone could explain how to call them properly that would be great. here is my code: print integer is just he control string %d as i …
For starters your switch statment's syntax is not correct. it follow this format. switch(char){ case 'A': //notice no brackets anround individual cases //call some method break; //notice the semicolon case 'B': //call some other method break; . . . ect. } once you fix that if you still have problems …
have you restarted your computer since you installed. in order to update environment variables you have to reset your system. also did you add the mavin directory to your path? (the directory where all the mavin executables are)
for your second question. A simple customer class that saves the current time would be: public class Customer{ private int time; public Customer(){ //your constructor to create object instances time = System.currentTimeMillis(); //save the current system time if you want a date and hour look up the date class. } …
to read a string without readstring simply use readchar inside of a loop. 0. create a pointer to the end of the stack, (first available location in mem) this will be the begining of the string. 1. read the char 2. check if the char is /n 3. if it …
please dont ask us to do your homework. do as much of the code as you can then post on here with question about, errors you recieve, specific parts of the code your having trouble with ect.
Please describe what you are seeing that is wrong with your program. It is hard to help if we don't know what you need help with.
When you buy the book you should get an access code with it if you bought it new. If not then you need to buy one to get access to the web chapters and video notes.
There are multiple ways to get the computer to find a number between 1 and 100. Try using a third var to increase or decrease the computers guess until it matches the number and use a couple of if statements to determine if it needs to increase or decrease it …
To fix your problem with comparable simply override the parent's compareTo() method by naming a method in the child class the same as the parent's method or call the parents method using the super keyword like this. [CODE]super.compareTo();[/CODE] this may not solve your problem I am only guessing at what …
you could do it like this: [CODE]boolean allChosen = false; while(allChosen == false){ boolean[] chosen = new boolean[4]; //your code chosen[rNum] = true if(chosen[0] == true && chosen[1] == true && chosen[2] == true && chosen[3] == true) allChosen = true; }[/CODE] that should do it. Hope it helps ( …
[QUOTE=mohit girdhar;1510197]how i can implement a java chat server like facebook[/QUOTE] This is an old thread please don't post on it. If you want to get help start a new thread.
If you want to get help please show some effort, write some code and post it or ask very specific questions such as: How do you initialize an array?
Please explain better and show some effort if you want to get help.
You are going to have to show some effort(like as much code as you can do before you can't go any farther) or ask very specific questions in order to get help. No one on here is going to do your homework for you.
1) Here is how you name and initialize an array within a method [CODE][I]ArrayType[/I][] [I]ArrayName[/I] = new [I]ArrayType[/I][number of array slots];[/CODE] Replace arrayType with an: object(like polygon as represented by a class), int, double, long, String, boolean, short, char. Pick any name you like for the array and put it …
I am trying to use the java XOM libraries but I am having trouble getting them to work the way I want them to. I want to get each element and its attributes from an xml file then use that information to create folders and files on the users computer …
I can't find anything wrong with this document. I am using the xom libraries to parse this doc and they keep giving me an error. If someone could point out my errors that would be great. [CODE] <?xml version = "1.0" encoding = "UTF-8"?> <update version = "0" date = …
int choice = Integer.parseInt( input ); This line of your code has an error can you tell what it is? There is one other problem in the code paintComponent is never called so you will never draw anything on the screen. hope this helps. : )
I have an interface built in javafx but it currently does nothing it just looks nice. How do you download files from the web in javafx or java? How do you create files on the users system in java or javafx? How do you place downloaded files in the created …
[QUOTE=asif49;1507211]My question is based on class relationships. I've written code for 2 classes, one of the "public int..." bits in 1 class has a variable which holds the cost of something. In the other class a variable holds the weight of something. I want to multiply the weight with the …
[QUOTE=R'hab;1507047]hi:::: i hope very bady good? how threads are implemented in an operating system of Windows xp?how threads are implemented in the operating system?how user level threads map to kernel threads and threading models used by that operating system ?[/QUOTE] please type in complete sentences easy to understand sentences and …
The End.