chimcanhcuthuydiet
Dragon Quest
- 23/7/03
- 1,450
- 18
12 giờ sáng nó ghi 12 AM mà, 12 PM gọi 12 trưa mới đúng
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
import javax.swing.JOptionPane;
public class Approximation {
public static void main(String[] args) {
String X = JOptionPane.showInputDialog("Enter x:");
String DELT = JOptionPane.showInputDialog("Enter delta:");
double x = Double.parseDouble(X);
double delta = Double.parseDouble(DELT);
int n = 3;
int fact = 1;
double num = x;
double S = x;
while (Math.abs(num)>delta)
{
fact *= (n-1)*n;
num = Math.pow(x,n)/fact;
S -= num;
if (Math.abs(num)<delta)
{
JOptionPane.showMessageDialog(null,"x="+x+"\n"+
"delta="+delta+"\n"+
"sin="+S+"\n"+
"Stop term="+num+"\n"+
"N="+n);
}
else
{
n += 2;
fact *= (n-1)*n;
num = Math.pow(x,n)/fact;
S += num;
if (Math.abs(num)<delta)
{
JOptionPane.showMessageDialog(null,"x="+x+"\n"+
"delta="+delta+"\n"+
"sin="+S+"\n"+
"Stop term="+num+"\n"+
"N="+n);
}
else
{
n += 2;
}
}
}
}
}
chả hiểu luôn
cho mình danh sách các lệnh của lập trình hợp ngữ VXL 8086/88
tất cả các lệnh và công dụng

s = JOptionPane.showInputDialog
("123");
s = (s.trim()).toLowerCase();

int i = s.indexOf(":");
String op = s.substring(0,i);
hỏi trong java cái
ví dụ mình có main method thế này
PHP:s = JOptionPane.showInputDialog ("123"); s = (s.trim()).toLowerCase();
giờ mình muốn tạo thêm method nữa nhưng phải viết thế nào để nó sử dụng s ở main method?
ví dụ ở method mới thì mình muốn nó extract data đi
PHP:int i = s.indexOf(":"); String op = s.substring(0,i);
The request filtering module is configured to deny a request where the query string is too long.
Lỗi do query string vượt quá giới hạn Request Limits của IIS.IIS Error code: 404.15 - The request filtering module is configured to deny a request where the query string is too long.
Tìm đến folder %windir%\System32\inetsrv\config\.
Mở file ApplicationHost.config bằng notepad.
Tìm đến thẻ requestLimits.
Xóa bỏ maxQueryString. Hay thay đổi giá trị của nó lớn hơn giá trị hiện tại.
Giá trị mặc định của maxQueryString là 2048. Đoạn text trên kia gần 3KB rồi...
VD:
<configuration>
<system.webServer>
<security>
<requestFiltering>
<requestLimits
maxAllowedContentLength="30000000"
maxUrl="260"
maxQueryString="4096" />
</requestFiltering>
</security>
</system.webServer>
</configuration>
Lưu file ApplicationHost.config lại.
Dùng %windir%\system32\inetsrv\appcmd để thay đổi.
"appcmd list config /section:requestFiltering -text:requestLimits.maxQueryString" list các giá trị hiện thời của server.
"appcmd set config /section:requestFiltering /requestLimits.maxQueryString:4096" thay đổi giá trị thành 4096.
#include <iostream.h>
#include <stdio.h>
int bintodec(int n)
{
int s = 0;
int pow;
for (int i = 0;n > 0;++i)
{
pow = 1;
for (int j = 0;j < i;++j)
pow *= 2;
s += pow*(n%10);
n /= 10;
}
return s;
}
int main()
{
int n;
cout <<"Nhap n: ";
cin >>n;
cout <<"Chuyen co so: " <<bintodec(n) <<endl;
return 0;
}
