Yahoo 知識+ 將於 2021 年 5 月 4 日 (美國東岸時間) 停止服務,而 Yahoo 知識+ 網站現已轉為僅限瀏覽模式。其他 Yahoo 資產或服務,或你的 Yahoo 帳戶將不會有任何變更。你可以在此服務中心網頁進一步了解 Yahoo 知識+ 停止服務的事宜,以及了解如何下載你的資料。
permeative pedagogy
What keeps gasoline burning?
Let's say you have gasoline. I know it is a complex set of chemicals so for simplicity sake, let's say its just C8H18 (octane). If you provide an initial heat source to light it, it still continues to burn after that heat source has been removed. So what is keeping it burning?
My guess would be that the chemical equation for C8H18 combining with O2 has an output of extra energy (possibly in the form of electrons ionized out of the atoms) that hits other C8H18 atoms and provides them with extra energy, thus raising their temperature and making them able to combine with O2 ad infinitum (or until you run out of gasoline). In essence:
2 C8H18 + 25 O2 --> 16 CO2 + 18 H2O + Energy
Is my thought process correct or am I missing something?
1 個解答Chemistry8 年前A useful clock in Java?
I have a program with an object that moves around the screen. What I need to have happen is, when the program starts, a timer should start. Every time the object's position is updated, it should record at what time it was updated. Then when it is updated again, it will known how long it's been since it was last updated. That way it will know how far to travel in the intervening time since it was last updated.
The only problem is I'm not sure how to implement such a timer. If you cannot tell from my description, I do not want to implement either javax.swing.Timer or java.util.Timer. I believe what I'm looking for is the Thread class but I've never used it before nor do I know if that would accomplish my goal. Can anyone point me in the correct direction?
2 個解答Programming & Design9 年前How can I remotely log in to a Mac?
I have an iMac at an office and a mac laptop at home. I would like to remotely log into my office mac. I've tried looking up tutorials on how to do this but many of them assume a knowledge I do not have. I'm not sure if I should be doing it through file sharing, ssh, or ftp. Nothing I'm trying seems to work. Can anyone give me a detailed step by step process on how to do this?
2 個解答Computer Networking9 年前Question about graphics in Java?
I am trying to learn how to do graphics in java and I've written a simple program which does not work as I wish. I have one class called MyCanvas which extends JPanel and is the "surface" which I am trying to draw on. I have another class which creates a frame and an instance of MyCanvas and adds that object to the frame. I see the red circle which is drawn when paint is called which happens when the object is added to the frame. I do not see the blue circle when i call the drawOval method from MyCanvas though. The graphics object is defined in MyCanvas though. I have tried using both the update method and the repaint method. Neither work. Any help?
import java.awt.*;
import javax.swing.*;
public class Test {
JFrame frame;
MyCanvas canvas;
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
new Test();
}
public Test(){
frame = new JFrame("Test");
canvas = new MyCanvas();
//Sets conditions for frame
frame.add(canvas);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setSize(500,400);
frame.setLocationRelativeTo(null);
frame.setVisible(true);
//Should draw blue circle on screen
canvas.drawOval(10,10,100,100);
}
}
------------------------------------------------------------------------------------------------------
import java.awt.*;
import javax.swing.*;
public class MyCanvas extends JPanel {
public MyCanvas(){
super();
}
public void drawOval(int x, int y, int width, int height){
Graphics g = getGraphics();
g.setColor(Color.blue);
g.fillOval(x,y,width,height);
update(g);
}
public void paint(Graphics g) {
g.setColor(Color.red);
g.fillOval(100, 100, 200, 200);
}
}
2 個解答Programming & Design10 年前