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.
Bạn nghĩ mình ko biết làm thế nào để C/C++ viết cross platform được hay sao, FileZilla, Google Earth, Opera là 1 trong những điển hình chương trình dùng C/C++ và QT4 để viết cross platform.
Chưa bao giờ có hứng thú với Java
.
, vậy cuối cùng ý bạn là muốn gì đây ?Bạn nói được câu này thì tôi xin chịu thuaTrước hết và đầu tiên C/C++ k bao giờ có thể Cross.
Nói thật là bạn đếch hiểu cái QT là gì thì đừng viết ra đây người ta cười cho nhé.
Bạn nói được câu này thì tôi xin chịu thua
Tôi chỉ quote lại câu tôi đã nói
.
, ở các diễn đàn về lập trình, khi có 1 ng nói 1 NNLT ko thể làm gì được là sẽ có chửi hội đồng
, quen thói thế rồi
. Thôi thì mình calm-down...Đơn giản vì bạn viết sai so sánh, ko được viết 50<X<=100 mà phải viết 50<X && X<=100.
Giải thích kĩ thêm 1 tí về lỗi này...
Đối với trường hợp ko có else, cả 2 chỗ so sánh 50<X<=100 và 100<X<=150 đều return là true nên giá được tính 2 lần, kết quả sau ăn may là đúng nên nó đúng.
Với hàm có else thì nó được tính 1 lần ở công thức đầu, do nó sai nên sai.
Nên nhớ là 50<X<=100 thì tức là (50<X)<=100, 50<X luôn là 0 hoặc 1 nên nó luôn <100, vì vậy cái công thức này luôn đúng
Tùy bạn thích làm về cái gì thôi.
Học về Ajax, Javascript, Html, Web2.0 chủ yếu để hướng làm web designer.
Học về PHP/MySql, Asp... hướng làm web programmer.
Học về Java nếu bạn thích làm phần mềm người dùng cuối, phần mềm nhúng.
Học về C# nếu bạn chủ yếu lập trình trên Windows và dùng Windows API, dùng lập trình các phần mềm .Net
Còn rất nhiều NNLT khác, quan điểm mình học C/C++ vì mình thích lập trình cross platform và lập trình phần mềm, ứng dụng nói chung


Cơ bản nó chạy giống nhau, tuy nhiên cả 2 cái đều sai thôiVậy thì mình mới đố bạn chứ, tại vì bạn nói nó chạy ra kết quả giống nhau nên mình lấy 1 vd cho bạn xem thôi,cảm thấy hay hay mới đố

http://www.ezzylearning.com/tutorial.aspx?tid=0068504Cho tớ hỏi bài này chút, 1 bài VB bài nhỏ thôi :
Cho 2 biến sLabel, sDriveLetter đều là string
sLabel được gán giá trị bất kì.
Hãy trả lại sDriveLetter về giá trị là chữ cái của ổ (trong my computer) mà có label là sLabel và trả về giá trị rỗng nếu không tìm thấy ổ nào có label (tên ổ) là sLabel
Ví dụ cho dễ hiểu nhé:
Trong máy có 4 ổ (3 partition của ổ cứng là C:, D:, E: + 1 ổ quang là F:)
ổ C là SYSTEM, ổ D là SETUP, ổ E là STORE, ổ F là WINXP
Nhập giá trị cho biến sLabel, giả sử mình nhập vào là SETUP chẳng hạn. Hãy cho ra giá trị của biến sDriveLetter là chữ cái của ổ (trong My computer) mà có label (tên ổ) là sLabel (ở đây là SETUP), ở đây theo như ví dụ ở trên thì giá trị sDriveLetter ở đây là D vì sLabel mình đã nhập là SETUP
Mình nói thế có khó hiểu quá không nhỉ![]()
Imports System
Imports System.IO
Class Test
Public Shared Sub Main()
Dim allDrives() As DriveInfo = DriveInfo.GetDrives()
Dim d As DriveInfo
For Each d In allDrives
Console.WriteLine("Drive {0}", d.Name)
Console.WriteLine(" File type: {0}", d.DriveType)
If d.IsReady = True Then
Console.WriteLine(" Volume label: {0}", d.VolumeLabel)
Console.WriteLine(" File system: {0}", d.DriveFormat)
Console.WriteLine( _
" Available space to current user:{0, 15} bytes", _
d.AvailableFreeSpace)
Console.WriteLine( _
" Total available space: {0, 15} bytes", _
d.TotalFreeSpace)
Console.WriteLine( _
" Total size of drive: {0, 15} bytes ", _
d.TotalSize)
End If
Next
End Sub
End Class
'This code produces output similar to the following:
'
'Drive A:\
' File type: Removable
'Drive C:\
' File type: Fixed
' Volume label:
' File system: FAT32
' Available space to current user: 4770430976 bytes
' Total available space: 4770430976 bytes
' Total size of drive: 10731683840 bytes
'Drive D:\
' File type: Fixed
' Volume label:
' File system: NTFS
' Available space to current user: 15114977280 bytes
' Total available space: 15114977280 bytes
' Total size of drive: 25958948864 bytes
'Drive E:\
' File type: CDRom
'
'The actual output of this code will vary based on machine and the permissions
'granted to the user executing it.
-- Confirm that the installation executable should be launched.
result = Dialog.Message("Confirm", "Are you sure you would like to install now?", MB_YESNO, MB_ICONINFORMATION, MB_DEFBUTTON1);
-- If the user clicked the Yes button.
if (result == IDYES) then
-- Run the installation file.
File.Run("AutoPlay\\Docs\\setup.exe", "", "", SW_SHOWNORMAL, false);
-- Check to see if an error occurred when launching the file.
error = Application.GetLastError();
-- If an error occurred, display an error message to the user.
if (error ~= 0) then
Dialog.Message("Error", _tblErrorMessages[error], MB_OK, MB_ICONEXCLAMATION, MB_DEFBUTTON1);
end
end
-- Set this value to the expected serial number of the
-- drive that your application will run from.
Expected_Serial = 123456789;
-- Gets the source drive's current serial number
Current_Serial = Drive.GetInformation(_SourceDrive).SerialNumber;
-- Compares the two serials and, if different, terminates the app.
if (Current_Serial ~= Expected_Serial) then
Dialog.Message("ERROR", "This is an unauthorized copy of the original application, and will shut down.", MB_OK, MB_ICONSTOP);
Application.Exit();
end

