Go Back   CodingForums.com > Search Forums

Before you post, read our: Rules & Posting Guidelines

Showing results 1 to 25 of 163
Search took 0.68 seconds.
Search: Posts Made By: gizmo1650
Forum: Java and JSP 01-02-2012, 06:22 AM
Replies: 0
Views: 329
Posted By gizmo1650
File paths inconsistent after changing working directory

I am trying to change my working directory. To that end I created the following test program
import java.io.File;
public class foo {
public static void main(String[] args) {...
Forum: JavaScript programming 07-31-2011, 06:25 AM
Replies: 6
Views: 648
Posted By gizmo1650
Linked List

I am trying to implement a linked list in javascript. So far i have:
function linkedList(){
var llNode=function(value){
this.next=null;
...
Forum: Java and JSP 06-13-2011, 10:42 PM
Replies: 1
Views: 800
Posted By gizmo1650
illegal start of type

I'm getting errors on the following code segment:

static Prime primes=new Prime(10000);
static int lowestPrimeIndex=0;
while (primes.getPrime(lowestPrimeIndex)<1000){...
Forum: JavaScript programming 06-02-2011, 10:56 PM
Replies: 6
Views: 2,609
Posted By gizmo1650
try something like frames[0].parent=frames[0] ...

try something like
frames[0].parent=frames[0]
frames[0].top=frames[0];

If you have multiple iframes, you will need to change the 0.
Forum: JavaScript programming 05-31-2011, 10:28 PM
Replies: 1
Views: 247
Posted By gizmo1650
Regular expression help

I want to find in all occurrences of #(...) in a string (what is between the parentheses is unknown. At the moment I have

str.match(/#\(.*\)/)


The problem is, I want to be able to have...
Forum: JavaScript programming 05-29-2011, 03:47 AM
Replies: 1
Views: 461
Posted By gizmo1650
the eval function parses the code within it, and...

the eval function parses the code within it, and returns the result. In your code, that result is "pStretch1.obj =", which make the line equivilent to typing "pStretch1.obj =" = obj Which returns an...
Forum: JavaScript programming 05-26-2011, 09:34 PM
Replies: 10
Views: 680
Posted By gizmo1650
location.href="www.google.com"

location.href="www.google.com"
Forum: JavaScript programming 05-25-2011, 11:04 PM
Replies: 11
Views: 1,173
Posted By gizmo1650
d=document.getElementById.bind(document)

d=document.getElementById.bind(document)
Forum: JavaScript programming 05-18-2011, 01:12 AM
Replies: 2
Views: 820
Posted By gizmo1650
function init(){ SanitizeLinks(); } ...

function init(){
SanitizeLinks();
}
function SanitizeLinks()//this was your init, but my code will call it multiple times
{
// Grab the appropriate div
theDiv =...
Forum: JavaScript programming 05-16-2011, 12:07 AM
Replies: 3
Views: 716
Posted By gizmo1650
var password; do{ password =...

var password;
do{
password = window.prompt('Enter password - 7 characters','');
}while(password.length != 7)
Forum: JavaScript programming 05-13-2011, 12:26 AM
Replies: 8
Views: 913
Posted By gizmo1650
How to make an alert message? The instructions...

How to make an alert message? The instructions are in your post:

For example:alert("hello world");
Forum: JavaScript programming 05-12-2011, 09:51 PM
Replies: 2
Views: 266
Posted By gizmo1650
password=password.split("");//make an array of...

password=password.split("");//make an array of characters
for (var i=0; i<3; i++){cylcle through values of i 0 -> 2
if (password[i]=='1'){
password[i]='L';
}
}
var tmp='';
for (i=0;...
Forum: JavaScript programming 05-11-2011, 10:40 PM
Replies: 8
Views: 555
Posted By gizmo1650
Yield Thread

Is their anyway to have a tight loop of code long for a long period of time without freezing the page? I want to be able to do:


for (i=0;i<9999999999;i++){
//some code
if (i%100==0){
yield();...
Forum: JavaScript programming 05-11-2011, 04:07 AM
Replies: 1
Views: 529
Posted By gizmo1650
var foo="id1" window[foo]="value" ...

var foo="id1"
window[foo]="value"
alert(window.id1)//will work the same as alert(window['id1']) or alert(window[foo])
Forum: JavaScript programming 05-08-2011, 03:08 PM
Replies: 8
Views: 376
Posted By gizmo1650
What's the error?

What's the error?
Forum: JavaScript programming 05-05-2011, 11:23 PM
Replies: 11
Views: 520
Posted By gizmo1650
Yes. Depending on how fluid you want the movement...

Yes. Depending on how fluid you want the movement to be, you might want to get an animation software to generate the images. Once you have the images you can just preload them into an array, then...
Forum: JavaScript programming 05-05-2011, 10:48 PM
Replies: 11
Views: 520
Posted By gizmo1650
If your animation is moving a ball, I would make...

If your animation is moving a ball, I would make a function that moves it a little bit, than use setTimeout or setInterval to move it at a consistent rate.

If you want to move serveral things, or...
Forum: JavaScript programming 05-05-2011, 10:41 PM
Replies: 9
Views: 511
Posted By gizmo1650
Try stepping through your code by hand, it should...

Try stepping through your code by hand, it should become clear why the alerts went up instead of down.
Forum: JavaScript programming 05-05-2011, 04:00 AM
Replies: 9
Views: 511
Posted By gizmo1650
function factorial(currentNumber) { ...

function factorial(currentNumber) {

if(currentNumber > 1) {
//temp = temp + (currentNumber);
factorial(currentNumber - 1);
alert(currentNumber);
}
else {
...
Forum: JavaScript programming 05-01-2011, 04:47 AM
Replies: 4
Views: 857
Posted By gizmo1650
Look at the logic of your code. If it doesn't...

Look at the logic of your code. If it doesn't make sense then you have a logic error.

Otherwise, run individual aspects of the code, eventually you will find what doesn't work the way you expect....
Forum: JavaScript programming 04-27-2011, 01:08 AM
Replies: 5
Views: 486
Posted By gizmo1650
You could also turn it into an HTML element, and...

You could also turn it into an HTML element, and use the browser DOM functions.
Forum: JavaScript programming 04-27-2011, 01:07 AM
Replies: 5
Views: 486
Posted By gizmo1650
Start by seperating the individual font tags....

Start by seperating the individual font tags. Seeing as they are already split by <br>, I would do:

var arr=str.split('<br>');//str is the string

Now we will go through each element...
Forum: JavaScript programming 04-12-2011, 10:09 PM
Replies: 6
Views: 573
Posted By gizmo1650
Make it a function. var willow =...

Make it a function.

var willow = setTimeout(function(){clearInterval(empress)},210000)
Forum: JavaScript programming 04-10-2011, 01:24 AM
Replies: 6
Views: 1,204
Posted By gizmo1650
what you would want is to declare saved once when...

what you would want is to declare saved once when the page loads.



var saved = new Array(); // make this line outside of any function, or you onload function (if you have one)

function...
Forum: JavaScript programming 04-07-2011, 04:51 AM
Replies: 9
Views: 1,836
Posted By gizmo1650
You could request the page using javascript ...

You could request the page using javascript

X = !window.XMLHttpRequest ? new ActiveXObject('Microsoft.XMLHTTP') : new XMLHttpRequest;
X.open('GET', "http://url.com", false);
X.send('');
page =...
Showing results 1 to 25 of 163

 
Forum Jump

All times are GMT +1. The time now is 08:18 AM.