我真的不明白为什么它没有突破循环.这是我的计划:
public static void main(String[] args) {
Scanner input = new Scanner (System.in);
double tution, rate, r, t, realpay, multiply, start;
start = 0;
while(start != -1)
{
System.out.print("Press 1 to start, -1 to end: ");
start = input.nextDouble();
System.out.print("Please enter the current tution fee for the year: ");
tution = input.nextDouble();
System.out.print("Enter in the amount of interest: ");
rate = input.nextDouble();
r = 1 + rate;
System.out.print("Please enter the number of years: ");
t = input.nextDouble();
multiply = Math.pow(r,t); …Run Code Online (Sandbox Code Playgroud) 我正在使用Liquibase 2.0.5.我有以下过程:
ALTER TABLE ...)我的问题是,我该如何做第3步?我使用以下脚本来执行第1步...
/opt/liquibase/liquibase --driver=com.mysql.jdbc.Driver \
--classpath=~/.m2/repository//mysql/mysql-connector-java/5.1.15/mysql-connector-java-5.1.15.jar \
--changeLogFile=~/db.changelog.xml \
--url="jdbc:mysql://localhost:3306/db" \
--username=user \
--password=pass \
generateChangeLog
Run Code Online (Sandbox Code Playgroud) 我明天早上必须提交我的WPF项目; 它在VS 2010中运行得很好,但是在使用C#的VS 2008(两种情况下都是.NET 3.5)中出错了.
我正在使用计时器,Dispatcher.Invoke但在VS 2008中它给出错误:
错误163
最佳重载方法匹配System.Windows.Threading.Dispatcher.Invoke(System.Windows.Threading.DispatcherPriority, System.Delegate)包含一些无效参数.
以下代码给出错误:
Dispatcher.Invoke(new Action(() =>
{
// ANY ACTIONS HERE
.. some task
}), null);
Run Code Online (Sandbox Code Playgroud)
代码必须在VS 2008中运行.
我一直在我的项目中使用ArrayLists,我需要创建一个默认的ArrayList,这样我就可以随时重置原始的ArrayList.因此,我复制原始的ArrayList以创建默认的ArrayList.但是,每当我修改原始内容时,它也会更改默认值.如何使副本"静态"且不可更改?
这是我的代码:(用葡萄牙语)
private ArrayList<Compartimento> listaCompartimentos;
private ArrayList<Compartimento> listaCompartimentosDEFAULT;
public Simulador() {
this.listaCompartimentos = new ArrayList<>();
this.listaCompartimentosDEFAULT=new ArrayList<>();
}
//Copy of the array
public void gravarListaDefault(){
this.listaCompartimentosDEFAULT=(ArrayList<Compartimento>)listaCompartimentos.clone();
}
Run Code Online (Sandbox Code Playgroud)
注意:我不知道它背后的原因是否可能,但ArrayList listaCompartimentos有一个listaEquipamentos.对于每个"Compartimento",都有一个ArrayList"listaEquipamentos".
如何在Notepad ++中查看我的代码输出作为网页或类似的东西?
我已经构建了一些东西,但我在记事本中找不到按钮或类似的东西,将其视为网页或类似的东西.