我需要发送我的网站与MySQL数据库.我在XAMPP中完成了网站和MySQL数据库,但不知道如何发送数据库.
我在这里得到一个代码,当它运行时创建并启动一个新的线程,每秒打印一个单词,5秒后主方法停止线程.所以该程序将打印5个单词,它确实....但不是我的家用电脑只在我的笔记本电脑上.在我的家用电脑上打印6次,为什么?
public class Main {
public static void main (String [] args){
try {
T1 t1 = new T1();
System.out.println("Creating and staring thread 1\n");
Thread.sleep(5000);
t1.stopThread();
} catch(InterruptedException ie) {}
}
}
public class T1 extends Thread{
private boolean alive = true;
public T1(){
start();
}
public void run(){
while(alive){
try {
System.out.println("Tråd T1: Tråd 1");
Thread.sleep(1000);
} catch(InterruptedException ie) {}
}
}
public void stopThread(){
alive = false;
}
}
Run Code Online (Sandbox Code Playgroud) 我想使用ol.genom.lineString在地图上显示线条,我的计划是将来使用multiLineString同时实现3行.我的问题是我无法弄清楚应该如何实现LineString.这就是我现在的地方:
http://jsfiddle.net/6RS2z/125/
(function(){
var map = new ol.Map({
layers: [new ol.layer.Tile({source: new ol.source.OSM()})],
target: document.getElementById('map'),
view: new ol.View({
center: [0, 0],
zoom: 1
})
});
var vectorSource = new ol.source.Vector({
//create empty vector
});
var plyFeature = new ol.Feature({
genometry : new ol.geom.LineString([0,0,18,60], 'EPSG:4326', 'EPSG:3857')
});
vectorSource.addFeature(plyFeature);
var plyLayer = new ol.layer.Vector({
source : vectorSource
})
map.addLayer(plyLayer);
Run Code Online (Sandbox Code Playgroud)
})();