Как да помогнем?

### Коментари: 23

The code for Step 2 looks good.

You may want to check how many records are in the persons table.

Ok Thanks for the tip ill come back incase i need more help or i have a question :)

Thank You!!!

-Ulr38

edit: i have this right now

Scroll up a little bit.  What I see is the result of the query that starts on line 3.

AD Baker where do ya want me to scroll work space or result space?

here is what i see

i was using this video as a referance

go to the time stamp 2:02 and test it out if it works for ya tell me cause it might be a bug

here is wat i see rn i was in the bath room

Thank you AD Baker i had to delete something i really apreeciate the help i did it i made it to step 3 :DDDDDDDDDDDDDDDDDDDDDD

THANK YOU SOOO MUCH

OK.  Looking at that output, what ID does Daniel Brocker have?  Then, look at your INSERT statement from Step 1.

dear AD Baker i have great news i have now made it to advanced js natural simulations and thanks for the help in the past i look forward to seeing ya again!

-ulr38

Glad to hear it!  Keep up the good work!

Hey AD Baker I'm a little confused on Challenge: Spaceship ride. I'm stuck on the second step. this is my code so far

var Spaceship = function() {
this.angle = new PVector();
this.velocity = new PVector(random(-0.05, 0.05), random(-0.05, 0.05));
this.amplitude = new PVector(random(20, width/2), random(20, width/2));
this.position = new PVector(0, 0);
};

Spaceship.prototype.oscillate = function() {
this.position.set(
sin(this.angle.x) * this.amplitude.x,
sin(this.angle.y) * this.amplitude.y);
};

Spaceship.prototype.display = function() {
pushMatrix();
translate(width/2, height/2);
stroke(181, 63, 0);
strokeWeight(9);
line(0, 0, this.position.x, this.position.y);
imageMode(CENTER);
translate(this.position.x, this.position.y);
rotate(this.a);
image(getImage("space/octopus"),
0,0
80, 100;
popMatrix();
};

var ships = [];
for (var i = 0; i < 10; i++) {
ships.push(new Spaceship());
}

draw = function() {
background(174, 218, 232);
for (var i = 0; i < ships.length; i++) {
ships[i].oscillate();
ships[i].display();
}
};

also long time no see

:)

AD Baker im confused. i really need help on Challenge: Spaceship Ride

never mind, i figured it out what can i say physics are confusing.

Ulr38,

I am sorry.  I had not logged in for a few days.  I am glad you were able to figure out the challenged.

hello, AD Baker I have called you once more because if you can guess I need help. I'm sort of confused on Challenge: Pendulum puppet because I keep getting this error messageand it bothers me cause i watched a youtube video and it didnt work and ill send in my code right now

var Pendulum = function(origin, armLength, angle) {
this.origin = origin;
this.armLength = armLength;
this.position = new PVector();
this.angle = angle;

this.aVelocity = 0.0;
this.aAcceleration = 0.0;
this.damping = 0.995;
this.dragging = false;
};

Pendulum.prototype.go = function() {
this.update();
this.display();
};

Pendulum.prototype.update = function() {
// As long as we aren't dragging the pendulum, let it swing!
if (!this.dragging) {
// Arbitrary constant
var gravity = 0.4;
// Calculate acceleration
this.aAcceleration = (-1 * gravity / this.armLength) * sin(this.angle);
// Increment velocity
this.aVelocity += this.aAcceleration;
// Arbitrary damping
this.aVelocity *= this.damping;
// Increment angle
this.angle += this.aVelocity;
}
};

Pendulum.prototype.display = function() {
if (this.origins instanceof PVector) {
this.currentOrigin = this.origin;
} else {
this.currentOrigin = this.origin.position;
}
this.position = new PVector(
this.armLength * sin(this.angle),
this.armLength * cos(this.angle));
stroke(0, 0, 0);
strokeWeight(3);
line(this.currentOrigin.x, this.currentOrigin.y, this.position.x, this.position.y);
fill(224, 194, 134);
if (this.dragging) {
fill(143, 110, 44);
}
};

Pendulum.prototype.handleClick = function(mx, my) {
var d = dist(mx, my, this.position.x, this.position.y);
this.dragging = true;
}
};

Pendulum.prototype.stopDragging = function() {
this.aVelocity = 0;
this.dragging = false;
};

Pendulum.prototype.handleDrag = function(mx, my) {
if (this.dragging) {
var diff = PVector.sub(this.currentOrigin, new PVector(mx, my));
this.angle = atan2(-1*diff.y, diff.x) - radians(90);
}
};

var limbLength = 75;
var leftArm1 = new Pendulum(new PVector(width/2-50, 110), limbLength
,0);

var leftArm2 = new Pendulum(leftArm1, limbLength, 0);

var rightArm1 = new Pendulum(new PVector(width/2+50, 110), limbLength,0);

var rightArm2 = new Pendulum(leftArm1, limbLength,0);

var leftLeg1 = new Pendulum(new PVector(width/2+40, 230), limbLength,0);

var leftLeg2 = new Pendulum(leftArm1, limbLength,0);

var rightLeg1 = new Pendulum(new PVector(width/2-40, 230), limbLength);

var rightLeg2 = new Pendulum(leftArm1, limbLength,0);

var limbs = [leftLeg1, leftLeg2,
rightLeg1, rightLeg2,
leftArm1, leftArm2,
rightArm1, rightArm2];

draw = function() {
background(255);

// Draw the body
strokeWeight(4);
line(width/2-50, 110, width/2+50, 110);
line(width/2, 110, width/2, 230);
line(width/2-40, 230, width/2+40, 230);
fill(224, 194, 134);
rect(width/2-25, 39, 50, 64, 30);

for (var i = 0; i < limbs.length; i++){
limbs[i].go();
}
};

mousePressed = function() {
for (var i = 0; i < limbs.length; i++){
limbs[i].handleClick(mouseX, mouseY);
}
};
mousePressed = function() {
for (var i = 0; i < limbs.length; i++){
limbs[i].handleClick(mouseX, mouseY);
}
};

mouseDragged = function() {
for (var i = 0; i < limbs.length; i++){
limbs[i].handleDrag(mouseX, mouseY);
}
};

mouseReleased = function()
{for (var i = 0; i < limbs.length; i++){
limbs[i].stopDragging();
}

};

and my code isnt working and i am confused

also once again here is the reference video