English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
所有分類

程式設計

[Selected]: 所有分類 電腦與網際網路 程式設計

就是某些網站不是都有..流言版..或流言信箱
除了流言之外................................要如何做??才能把我ㄉ網址變成超連結ㄋ??

2007-02-02 20:49:17 · 3 個解答 · 發問者 ㄚ澤 1

class numbers
{
public static void main(String[] arg)
{
System.out.print("請輸入數字:");

java.util.Scanner input;

input=new java.util.Scanner(System.in);

int date;

date=input.nextInt();

System.out.println("你輸入的數字是:"+date+"\n");
}
}

--------------------------------------------------------------------

想請問大大:

date=input.nextInt();

我知道意思是,把date宣告成變數input,後來.nextInt()是指功能。

但nextInt()要如何去解釋?(白話一點 :oops: )

有什麼功能? 有什麼用處?

小弟初學程式語言^^。

謝謝!

2007-02-02 20:10:42 · 1 個解答 · 發問者 ? 2

ORG00H
AJMPSTART
ORG0BH
AJMPTIMER0
START:MOVSP,#60H
MOVTMOD,#2
SETBEA
SETBET0
MOVTH0,#6
MOVTL0,#6
MOVR0,#16
MOVR1,#0
MOVR2,#0
MOVR3,#4
MOVDPTR,#MSG
SETBTR0
CLRP1.4
CLRP1.5
SJMP$

TIMER0:PUSHA
CLRTR0
DJNZR3,EXIT
MOVR3,#4
MOVA,R1
MOVCA,@A+DPTR
MOVP2,A
SETBP1.4
CLRP1.4
INCR1
MOVA,R1
MOVCA,@A+DPTR
MOVP2,A
SETBP1.5
CLRP1.5
INCR1
MOVA,R2
MOVP1,A
INCR2
DJNZR0,EXIT
MOVR0,#16
MOVR1,#0
MOVR2,#0
EXIT:SETBTR0
POPA
RETI
MSGDB11111011B,11111111B;1
DB11111011B,11111011B;2
DB11111011B,11110111B;3
DB10111011B,11101111B;4
DB11001011B,10011111B;5
DB11111000B,01111111B;6
DB11111011B,11111111B;7
DB00000011B,11111111B;8
DB11111011B,11111111B;9
DB11111000B,00000111B;10
DB11101011B,11111011B;11
DB11011011B,11111101B;12
DB10111011B,11111101B;13
DB10111011B,11000001B;14
DB11111011B,11111111B;15
DB11111011B,11111111B;16
END


上面是我用的顯示程式16X16 請問我想要顯示3個字 程是要改哪裡阿@@? 我想到破頭了 請高手解救ˊˇˋ

2007-02-02 12:47:46 · 2 個解答 · 發問者 阿評 1

知識推介裡,一條男女關係的推介也沒有,難道沒有值得我們去學習的知識?

咁為什麼還要有男女關係在知識+?

男女關係,交友人際,婚姻三項都唔見有知識推介,難怪現在香港人際關係咁差啦!

2007-02-02 11:23:56 · 1 個解答 · 發問者 丫發 7

相信大家應該知道李亞搬出無名已經搬出無名一段時間了
不知道有沒有人收藏著李亞在無名的樣式...
我真的非常的喜歡
也都一直套用著
可是無名有時候就很爛
有一天突然變成無名原始樣式了
我真是預哭無淚
之前李亞有說不再分享無名樣式了...
想尋求有收藏的人
謝謝 謝謝 ~ (跪拜)
樣式有例如蘋果咬一口之類的

2007-02-02 09:14:35 · 4 個解答 · 發問者 ? 1

我的程式如下:
#include(iostream.h)
int main(void)
{
char ch;
cin.get(ch);

system("pause");
return 0;
}

但是當我編譯時居然get()函數這行有錯誤訊息如下:
5 C:\Dev-Cpp\59513042\新文件1.cpp `cin' undeclared (first use this function)
(Each undeclared identifier is reported only once for each function it appears in.)

我怎感覺這訊息是說明沒這函數的功能,但它是定義在istream的成員函數之中阿。
我的編輯軟體是dev-c++4.4.9.2

反正好像失去get( )函數功能 ,連getline( )也沒啦,能幫我解決者將選你最佳答案 ,請你要run一遍可以再回答喔@@

2007-02-02 08:39:06 · 3 個解答 · 發問者 eric 7

11. T/F. Given:
struct prs
{
char name[30];
int num;
} ;
it is acceptable to define and initialize a
variable at compile time thus:
struct prs agent = {"James Bond", 007};

12. T/F. C++ string objects can grow larger or smaller
as they are used.

13. T/F. The switch() produces faster-executing
code than several if()'s.

14. When processing array data, you will most often use:
a. while loops
b. for loops
c. do while loops
d. typecasts
e. none of these are related to arrays

15. Given:
int a[10][5] ;
to access the second item in the
3rd row, we would use:
a. a[2][3] ;
b. a[3][2] ;
c. *(*(a+3)+2) ;
d. *(*(a+2)+1) ;
e. none above

16. The #ifdef, #elif, #else, and #endif
constructs are used to:

a. decide what code the compiler includes in the program
b. control program execution at run time
c. pass arguments back to Windows ( or other O/S) during program execution
d. both a and c above
e. all of the above

17. In C standard library I/O, the function
used to close a file after writing it is:

a. fclose()
b. close()
c. unlink()
d. chmod()
e. none above

18. In C++ fstream I/O, the function used
to close a stream after writing to it is:

a. stream.exit()
b. stream.rewind()
c. stream.octet()
d. stream.close()
e. stream.release()

19. T/F. The printf() family of functions can translate
between decimal, Hexadecimal, and Octal.

20. T/F. The main reason to prefer open() /
read() / write() over fopen() fread() /
fwrite() is speed of execution

21. The wchar_t data type is for storing:
a. graphics
b. ASCII
c. Unicode
d. large objects
e. none of these

2007-02-02 02:22:22 · 1 個解答 · 發問者 kenkun 1

過幾天要考期末了,老師跟本沒給這50題練習題的答案,請各位高手幫幫忙, 因為題目會類似.
Cisc 192 Practice questions

1. A pointer is a variable which contains
a. signed float data
b. signed integer data
c. unsigned float data
d. unsigned integer data
e. signed character data

2. T/F. Data inside a class may be hidden from access
by functions outside the class body.

3. Assuming that spread[] is a one-dimensional
array of type int, which of the following
refers to the value of the third element in the array?

a. *(spread+2) b. *(spread+4)
c. spread+4 d. spread+2

4. T/F. A reference variable may be made to point to several
different objects at different times during the run of the
program.

5. T/F. One of the reasons for using classes
is that code may be more easily re-used
instead of re-written.

6. T/F. Polymorphism consistes of having several
methods or functions with the same name
and different argument lists.

7. Which option stores a 0 in int variable ch,
assuming the address of ch has been assigned to
the pointer fingerch?

a. *fingerch = 0 ;
b. int *fingerch = 0 ;
c. *finger = 0 ;
d. &ch = 0 ;
e. *ch = 0 ;

8. T/F. Code for member functions in a class
can be written outside the class' braces with only
their prototypes inside the class declaration.

9. T/F. A union allows several different types of
variable to share the same memory.

10. T/F. It is possible to successfully write a
function yet not know how many parameters will be
passed to it by the calling routine.

2007-02-02 02:20:51 · 1 個解答 · 發問者 kenkun 1

這是我寫的程式:
但是寫出來出現一堆亂碼
為什麼?請大師指點,謝謝!!!
import java.util.Scanner;

public class Divisors {
public static void main (String [] args) {

/* this array will be filled with the divisors of a user-supplied number. */
long number;
long[] divisorArray;
Scanner scan = new Scanner(System.in);

System.out.println(" give me a long int and I'll "
+ "return an array of all its proper divisors > ");
number = scan.nextLong(); /* this is the number whose divisors we want to find and print */

Divisors div = new Divisors(); /* here we make an instance of the Divisors class*/

divisorArray = div.getDivisors(number);/* *** here we call a non-static method getDivisors . This method has as its argument the variable number we just read. getDivisors fills a local array with the divisors of number and returns this array. */;

System.out.println("the divisors of " + number + " are:");
/* *** here we print out all non-zero elements of divisorArray. Try to print at most 10 values per line (see the sample output above). */
System.out.println("\n "+divisorArray);

}// end main

public long[] getDivisors(long num) {
long[] divisorArray=new long[100];
int i=-1;
int j;

for(j=1;j if (num%j==0){
i++;
divisorArray[i]=j;


}
}

return divisorArray;
}
}

2007-02-01 20:55:50 · 1 個解答 · 發問者 小壁虎 1

0

假設我在command1和command2的程式碼內設定一變數X...

當command1的變數X值改變時...

要怎麼使command2裡的X值也跟著改變?

也就是說有辦法讓兩控制元件間有一個共同變數嗎?

2007-02-01 20:05:18 · 2 個解答 · 發問者 KCVO 1

0

Private Sub Form_Unload(Cancel As Integer)
Open App.Path & "\MenuList1.Dat" For Output As #1
For N = 0 To Combo1.ListCount - 1
Print #1, Combo1.List(N)
Next
Close #1
End Sub

我寫上面的程式來儲存紀錄...

但是這樣的話每次儲存都會把之前的檔案蓋掉...

有辦法改善嗎?

2007-02-01 19:59:03 · 1 個解答 · 發問者 KCVO 1

如果我要宣告一個字串陣列,可是我無法預先得知這個陣列將會有多少個字元限制,那我該怎麼打?

例如:如果宣告: char str[10]就代表會有10個字元,那我不能先設定字元的話要怎麼宣告呢?

請問有誰能夠幫幫我呢 >"<

2007-02-01 16:01:42 · 4 個解答 · 發問者 Jaysper 1

1.
{4a+9b=3
{3a+7b=2

2.
{5a+6b=17
{6a+5b=16

3.
{3x+2y=22
{10y+x=(10x+y)+9


4.
{x-y=2y
{x-y-20=2/1x

2007-02-01 15:26:25 · 5 個解答 · 發問者 ★創意達人☆ 5

1+1等於多少,我的老師要我講原因,拜託大家跟我講

還有k+5+64-95+5644-l+gh+9+4jk5642=0


k=?

2007-02-01 10:58:47 · 4 個解答 · 發問者 Anonymous

老師出的題目: 執行時輸入一串數字(可包含運算元,整數,關鍵字),然後按Enter,程式會分析你所輸入的每一個字是屬於整數,運算元,還是關鍵字.
範例:
當我輸入 while (123<456) do 後按 Enter,螢幕要秀出
while 關鍵字
( 一般運算子
123 整數
< 關係運算子
) 一般運算子
do 關鍵字
以上是範例.像這種的程式觀念是什麼,要怎麼寫呢?
以下是老師給的描述:
整數: 例如123
實數: 例如12.34(兩個整數之間有小數點)
關鍵字: 例如 int, float, read, write, if, else, endif, while, do
數學運算子: 例如 + - * / %
關係運算子: 例如 := ; : , # ( ) { }

2007-02-01 10:33:28 · 2 個解答 · 發問者 ? 3

我的資料表結構是這樣的
datamatrix:
spid, chcode, value
001, 0001, yes
001, 0005, yes
001, 0281, yes
002, 0003, yes
...

我想設計一個表單,可以顯示datamatrix裡的資料
用下拉式選單挑選出spid (ex. 001)
表單中有依不同的chcode的核取方塊(check0001~check0281)
依datamatrix資料表中的資料,spid=001有三筆資料,chcode分別為0001, 0005, 0281,想要enable對應的核取方塊
請問這要怎麼寫?
感恩啊~~~

2007-02-01 06:27:12 · 2 個解答 · 發問者 Yeachen 4

我想寫1+3+5+7但 一般回圈內for(int i=0;i<=n; ???)
問號處不知道該如何寫 i加二
還有想問一下for 迴圈的意義 ?

2007-01-31 20:05:53 · 1 個解答 · 發問者 ? 2

C++ 設計一個專案來顯示a,b,c變數內容,且a=100為整數,b=39.88為浮點數,c=23E+2為雙精確,則程式碼該如何設計?

可參考以下程式
#include "stdafx.h"
#include


int main(int argc, char* argv[])
{
int a;
int b[10];
int c;
a=100;
b[0]=200;
c=2.36;
printf("顯示變數a資料%d\n",a);
printf("顯示變數a資料%d\n",b[0]);
printf("顯示變數a資料%d\n",c);
return 0;
}

2007-01-31 18:16:06 · 1 個解答 · 發問者 玉米 2

按左任何連結之後都會出現的虛線,我想問用乜野語法可以整走?
thx~

2007-01-31 17:39:54 · 3 個解答 · 發問者 charlie 2

請問要怎麼設定
讓一個表個左邊不會動右邊可以捲動
上面不會動下面可以捲動
對不起表達的不是很好 所以我也不知從何問起
A B C D E F G H.....AA AB AC AD AE.....
1
2
3
.
大概就是例如讓A~G欄固定 而H後面可以捲動
1.2.3列固定 下面的可以捲動
謝謝

2007-01-31 16:59:27 · 2 個解答 · 發問者 6

想請問各位網頁高手們替我解答

我的網頁解析度設定是1024*768
但是由於每個人所使用的電腦解析度都不相同
常常會有網頁內容跑位的情形

例圖1.(1024*768的情況)
http://cancer7747.myweb.hinet.net/other/sos1.gif

例圖2.(1280*1024的情況)
http://cancer7747.myweb.hinet.net/other/sos1.gif

請問這種情形要使用什麼語法解決??

ps.不是讓整個網頁鎖定在1024*768的框框中
而是網頁內容隨著解析度大小改變,但是不會跑位。

麻煩請各位大大幫個忙哩~這個問題困擾已久...囧

原始網站:http://cancer7747.myweb.hinet.net/home/index.html

2007-01-31 15:30:33 · 1 個解答 · 發問者 *不點* 1

'前言
STUDENT 資料表的欄位為 | SID | VISIT | 兩個欄位資料型別都是文字。

資料分別是
| 1 | NO |
| 2 | NO |
| 3 | NO |
| 4 | NO |
| 5 | NO |
| 6 | NO |
| 7 | NO |
| 8 | NO |
| 9 | NO |



程式一與程式二是分別開來的兩支程式 (@@不同的執行檔@@),他們都連到STUDENT這個資料表。我的問題是,為什麼執行程式一的 cmdOne_Click() 之後,馬上執行程式二的 cmdOne_Click() ,所查到的資料是未更新的。 舉例來說好了,按下程式一更新編號1號的同學的VISIT欄位由NO變為YES,但是 0.5 秒以後按下程式二所查得的資料不是期望的 2 號學生,卻是 1 號學生。這是為什麼呢?
但是如果先執行程式一之後再隔個 2 秒後再執行程式二則可以取得正確所要的資料(2號同學),是不是資料表更新並不是馬上而且立即的呢?

請問各位大大有什麼方法,可以馬上、立即的更新資料庫的資料呢?謝謝。




Program 1(程式一)

Private Sub cmdOne_Click()
Dim nSID as string

'找出學生編號最小的,而且是還沒有拜訪的記錄,
vSQL = " Select Min(SID) as BB from STUDENT Where VISIT = " & "'" & "NO" & "'"

rst.Open vSQL, gCnt, adOpenDynamic, adLockPessimistic
nSID = rst!BB


'將這位學生的 VISIT 欄位由 NO 變為 YES
vSQL = " Select * from STUDENT Where SID = " & "'" & nSID & "'"
rst.Open vSQL, gCnt, adOpenDynamic, adLockPessimistic
rst.Fields("VISIT") = "YES"
rst.Update
Set rst = Nothing

End Sub



Program 2(程式二)
Private Sub cmdOne_Click()
vSQL = " Select Min(SNo) as BB from STUDENT Where VISIT = " & "'" & "NO" & "'"

rst.Open vSQL, gCnt, adOpenDynamic, adLockPessimistic
text1.text = rst.!BB
Set rst = Nothing
End Sub

2007-01-31 15:27:45 · 2 個解答 · 發問者 blueson 2

請問一下有人可以幫我解答以下數列的一般式
1.3.5.9.11.15.17.21.23.27.29.........要怎麼算出此數列的一般式押??
會的人可以請幫我解答嗎??謝謝唷

2007-01-31 12:39:57 · 2 個解答 · 發問者 宏銘 1

在CODE中 IF判斷式的語法是錯誤的 (value=!3)應該是 (value!=3)
Q:

但為何 可以執行 並得到 This value is = 0
這個0 是從哪裡來的??

以下是我推想:
IF判斷式判斷(value=!3)為false 而得到0
但又怎會轉到%d 而給值為0了呢??
(這推想有可能是錯的,麻煩指正了)

#include
int main()
{
int value1;

printf("key in an word:");
scanf("%d",&value1);
if(value1=!3)
{

printf("this value is= %d\n",value1);
}
else
{

printf("this value is= %d\n",value1);
}
return 0;
}

2007-01-31 12:02:39 · 3 個解答 · 發問者 Akaing 1

我知道要怎麼放到網誌了 只差不知道語法 跟音樂網址要去哪找

我要找這首歌Keith Urban-Tonight I Wanna Cry
可以幫我用好整個完整的語法嗎?

音樂網址要去哪找?

2007-01-31 09:18:18 · 2 個解答 · 發問者 Ting 1

我想在無名上面就像這樣...
http://www.wretch.cc/blog/kh56vogue56
右下角在最新引用下面,有一隻熊的動畫,會動~~~
請問大家~~那個要怎麼用阿???還有那些動畫都要去哪裡抓呢??

2007-01-31 09:06:22 · 1 個解答 · 發問者 ? 1

http://luckycat.kshs.kh.edu.tw/homework/q305.htm
此題作法為何?
dfs?

2007-01-31 06:06:13 · 3 個解答 · 發問者 博旭 3

請 問 關 於 Yahoo! 部 落 格 ? ?

請 問 關 於 Yahoo! 部 落 格 的 背 景 ,要 裝 自 己 的 圖 片 要 怎

麼 裝 ? ?

請 問 部 落 格 放 音 樂 要 怎 麼 放 ? ? 時 鐘 種 類 要 怎 麼 換 ? ? 月

曆 可 以 變 更 種 類 嗎 ? ?

2007-01-31 04:33:02 · 3 個解答 · 發問者 5562 1

25.6的10進位 轉成2進位是多少?

書上寫11101.1001 可是在轉回10進位 好像不能25ㄟ

怎麼算 交一下

麻煩大大ㄌ

2007-01-31 03:42:29 · 2 個解答 · 發問者 皮卡丘秋 2

在javascript裡
++ 和 -- 有什麼作用

a 是一個variable
++a
a++
--a
a--
又有什麼分別?

另外想要一d 教javascript既網頁
for 初學就ok
thanks

2007-01-30 18:32:19 · 2 個解答 · 發問者 ? 4

fedest.com, questions and answers