Showing posts with label learn. Show all posts
Showing posts with label learn. Show all posts

Friday, December 14, 2018

Get a sub item of an Item on a ListView

LEARN 3 : ABOUT IT [VB6]



LESSON 12 : Get a sub item of an Item on a ListView



For column one (first column):
ListView1.ListItems(ItemNumber).text

For others (except first column):
ListView1.ListItems(ItemNumber).ListSubItems(ColumnNumber).text




Example :


  1. ListView.ListItems(1).Text = "1"
  2. ListView.ListItems(2).Text = "2"
  3. ListView.ListItems(3).Text = "3"
  4.  
  5. ListView.ListItems(1).ListSubItems(1).Text = "1,1"
  6. ListView.ListItems(1).ListSubItems(2).Text = "1,2"
  7. ListView.ListItems(1).ListSubItems(3).Text = "1,3"
  8.  
  9. ListViewListItems(2).ListSubItems(1).Text = "2,1"
  10. ListView.ListItems(2).ListSubItems(2).Text = "2,2"
  11. ListView.ListItems(2).ListSubItems(3).Text = "2,3"


Source : My previous study

Tuesday, October 2, 2018

Different Between CursorType and LockType

LEARN 3 : ABOUT IT [VB.NET]


LESSON 11 : DIFFERENT BETWEEN CursorType AND LockType




CursorType specifies the type of cursor used in a Recordset object:

adOpenDynamic
- Uses a dynamic cursor. Additions, changes, and deletions by other users are visible, and all types of movement through the Recordset are allowed, except for bookmarks, if the provider doesn't support them. 

adOpenForwardOnly 
- Uses a forward-only cursor. Identical to a static cursor, except that you can only scroll forward through records. This improves performance when you need to make only one pass through a Recordset. 

adOpenKeyset 
- Uses a keyset cursor. Like a dynamic cursor, except that you can't see records that other users add, although records that other users delete are inaccessible from your Recordset. Data changes by other users are still visible. 

adOpenStatic 
- Uses a static cursor. A static copy of a set of records that you can use to find data or generate reports. Additions, changes, or deletions by other users are not visible. 

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

LockType specifies the type of lock placed on records during editing:

adLockBatchOptimistic 
- Indicates optimistic batch updates. Required for batch update mode. 

adLockOptimistic 
- Indicates optimistic locking, record by record. The provider uses optimistic locking, locking records only when you call the Update method. 

adLockPessimistic 
- Indicates pessimistic locking, record by record. The provider does what is necessary to ensure successful editing of the records, usually by locking records at the data source immediately after editing. 

adLockReadOnly 
- Indicates read-only records. You cannot alter the data. 



Source : My previous study

Friday, September 28, 2018

TextBox UpperCase Only

LEARN 3 : ABOUT IT [VB.NET]

LESSON 10 : UPPERCASE TEXT IN VB6 TEXTBOX



Codes that I used to make the text(s) automatically in UPPERCASE :

Private Sub txtstk_Change()
    Dim selSt As Long
    selSt = txtstk.SelStart
    txtstk.Text = UCase(txtstk.Text)    
    txtstk.SelStart = selSt
End Sub


Source : My previous study

Thursday, September 20, 2018

Session State VS View State (ASP.NET)

LEARN 3 : ABOUT IT [ASP.NET]


LESSON 9 : SESSION STATE VS VIEW STATE



Session State
View State
Session state is maintained in session level
View state is maintained in page level only         
Session state value is available in all pages within a user session
View state of one page is not visible in another page
Session state information stored in server
View state information stored in client only


Source : My previous study

Client Side State Management VS Server Side State Management

LEARN 3 : ABOUT IT [ASP.NET]


LESSON 8 : CLIENT SLIDE STATE MANAGEMENT VS SERVER SIDE STATE MANAGEMENT



Client Side State Management:

When we use client side state management:
  • The state related information will be stored on client side.
  • This information will travel back and forth with every request and response.
  • Techniques to manage the state on client and server:
    • View State
    • Query String
    • Hidden Fields
    • Cookies


Advantage:
  • Relieve the server from the burden of keeping the state related information


Disadvantage:
  • Makes the information travel back and forth
    • Information can be intercepted by anyone in between
    • Sensitive information (credit card number, password)?




Server Side State Management:

When we use server side state management:
  • The state related information will be stored on server memory.
  • Techniques to manage the state on client and server:
    • Application State
    • Session State


Advantage:
  • Sensitive information is secure


Disadvantage:
  • More memory usage on server



Source : My previous study

Literal VS Label (ASP.NET)

LEARN 3 : ABOUT IT [ASP.NET]


LESSON 7 : LITERAL VS LABEL



Literal

  • To display plain text without any styling (we can’t apply CSS styles for a Literal Control as it does not use any HTML tag).
  • To display HTML content



Label

  • To set labels for the form fields
  • Can change the font color, background color, etc (CSS styles can be applied to Label control)- can easily be changed


Source : My previous study

Web Server Controls (ASP.NET)

LEARN 3 : ABOUT IT [ASP.NET]


LESSON 6 : WEB SERVER CONTROLS


Categories of Web controls:


  • Web controls that are used to display text
  • Web controls that are used to collect user input
  • Web controls that are used to display data from database




Web Server Controls

Three types: 


  • Simple 
    • Textbox, Button, Checkbox, DropDownList, Label, etc. 
  • Validation Controls 
    • Validate user inputs 
  • Rich Controls 
    • Calendar, navigation, ad-rotator …


Source : My previous study

Wednesday, September 12, 2018

ASP.NET ADVANTAGEOUS

LEARN 3 : ABOUT IT 

LESSON 5 : 
ASP.NET ADVANTAGEOUS

  • Testing can be done offline
  • It’s fast
  • It’s secure 


Source : My previous study

ASP.NET VS VB.NET

LEARN 3 : ABOUT IT 

LESSON 4 : ASP.NET VS VB.NET


ASP.NET
VB.NET
Is a web technology that is used in building web applications and websites
Is a language that is used in writing programs that are utilizing the Asp.NET framework
Is a server side technology that is language independent. Any .NET languages such as C#, VB.NET can be used to develop web applications through ASP.NET
Is a .NET programming language.

Source : My previous study

What Is ASP.NET File?

LEARN 3 : ABOUT IT 

LESSON 3 : WHAT IS ASP.NET FILE?


  • An ASP file is just the same as an HTML file
  • An ASP file can contain text, HTML, XML, and scripts
  • Scripts in an ASP file are executed on the server
  • An ASP file has the file extension ".asp"



Source : My previous study

Basic Elements of Web

LEARN 3 : ABOUT IT 

LESSON 2 : BASIC ELEMENTS OF WEB


Tim Berners-Lee proposed the basic elements of web including:

Elements
Description
Client
He created the first client browser “WorldWideWeb”, it was a web editor as well.
URL
Uniform Resource Locator
HTTP
Hypertext Transfer Protocol
HTML
Hypertext Markup Language

Source : My previous study

Differentiate Between Internet And WWW

LEARN 3 : ABOUT IT 

LESSON 1 : DIFFERENT BETWEEN INTERNET AND WWW



Features
Internet
WWW
Comprises
Network of computers, copper wires, fiber-optic cables and wireless networks
Files, folders and documents stored in various computers
Governed by
Internet protocol
Hypertext transfer protocol
Dependency
This is the base, independent of the WWW
It depends on internet to work

Source : My previous study


Thursday, September 6, 2018

Decrypt The Secret Messages

LEARN 2 : ABOUT MATHEMATICS 

LESSON 1 : FUNDAMENTAL DISCRETE STRUCTURE


Mr Jacky was caught by KGB, a secret Russian intelligence service during spy mission in Moscow. He knew something big that are about to happen in this country. While he was in interrogation, he writes a secret message hoping that his friend could take further action. This is his message:

SURWHFW WKH NLQJ

Hint: Use Caesar Cipher to decrypt the secret messages.

Answer:

f(p) = (p-3) mod 26


S
U
R
W
H
F
W
W
K
H
N
L
Q
J
18
20
17
22
7
5
22
22
10
7
13
11
16
9
15
17
14
19
4
2
19
19
7
4
10
8
13
6
P
R
O
T
E
C
T
T
H
E
K
I
N
G

Source : My previous study

Sunday, July 8, 2018

Learn 1 : About Android Studio [Lesson 5&6 : Run the application on handphone]

LEARN 1 : ABOUT ANDROID STUDIO 

LESSON 5 : RUN THE APPLICATION ON HANDPHONE (1) / CARA 5 : MELIHAT HASIL APLIKASI DI TELEFON BIMBIT (CARA PERTAMA)

1.       Firstly, you need to connect your phone in laptop/PC via USB cable. After the connection success, click Run button (green color) as shown in Figure 1. || Pertama sekali, anda perlu sambungkan telefon anda dengan laptop/PC anda dengan menggunakan kabel USB. Selepas berjaya menghubungkan telefon dengan PC anda, klik butang Run yang berwarna hijau seperti di Gambar 1.


Figure 1 || Gambar 1

2.       Then, Connected Devices, choose your phone name and click OK. If something error, you can try Lesson 6. || Kemudian, pada bahagian Connected Devices, pilih nama telefon anda dan klik OK. Jika tidak berjaya, anda boleh cuba Cara 6.


 Figure 2 || Gambar 2

LESSON 6 : RUN THE APPLICATION ON HANDPHONE (2) / CARA 6 : MELIHAT HASIL APLIKASI DI TELEFON BIMBIT (CARA PERTAMA)

1.       Choose tab Build -> Build APK(s).  Wait for a minutes during processing. || Pilih tab Build -> Build APK(s). Anda perlu tunggu seketika sementara ia sedang proses.

Figure 1 || Gambar 1

2.       After the process finished, you can see the popup message at the right corner, as shown in Figure 2. Click on locate (blue font color). || Apabila siap proses, anda akan melihat mesej popup pada sebelah kanan bawah, seperti yang ditunjukkan pada Gambar 2. Klik locate.

Figure 2 || Gambar 2

3.       One folder will appear that contains apk and json file. Put the both file inside your phone. After that, install the apk in your phone. Now, you can use your application in your phone. || Satu folder akan muncul, yang mengandungi fail apk dan json. Masukkan kedua-dua fail ini ke dalam telefon anda. Kemudian, install apk tersebut di dalam telefon anda. Selesai install, kini anda boleh menggunakan aplikasi tersebut di dalam telefon anda.

Figure 3 || Gambar 3

Friday, July 6, 2018

Learn 1 : About Android Studio [Lesson 4 : Run the application on Windows]

LEARN 1 : ABOUT ANDROID STUDIO 

LESSON 4 : RUN THE APPLICATION ON WINDOWS / CARA 4 : MELIHAT HASIL APLIKASI DI WINDOWS



1.       Firstly, you need to click Run button (green color) as shown in Figure 1. || Pertama sekali, anda perlu klik butang Run yang berwarna hijau seperti di Gambar 1.

Figure 1 || Gambar 1

2.       Then, choose Available Virtual Device and click OK . If your Available Virtual Device field is none, click Create New Virtual Device as shown in Figure 2. || Kemudian, anda pilih Available Virtual Device dan klik OK. Jika pada bahagian Available Virtual Device kosong(none), klik Create New Virtual Device seperti di Gambar 2.

Figure 2 || Gambar 2

3.       After that, choose Phone -> Nexus 5X.  You can choose the device you want, but for me, I would like to use Nexus 5X because has Play Store. Refer Figure 3. || Kemudian, pilih Phone -> Nexus 5X. Anda boleh pilih mana-mana device yang dikehendaki, tetapi saya lebih suka menggunakan Nexus 5X kerana terdapat Play Store. Anda boleh rujuk di Gambar 3.

Figure 3 || Gambar 3

4.       After you click Next button, Figure 4 will appear. Choose Nougat 25 and click Download(blue font color).Wait for a minutes until the download is finish. After the download done, click Finish and it will back to the Figure 4. Click Next to the next step. || Selepas tekan Next, Gambar 4 akan muncul. Pilih Nougat 25 dan klik Download(warna biru). Tunggu seketika sehingga download selesai. Apabila selesai download, klik Finish dan ia akan kembali semula ke Gambar 4. Klik Next untuk ke langkah seterusnya.

Figure 4 || Gambar 4

5.       At the Figure 5, click Finish. It will back to Figure 2. || Pada bahagian yang ditunjukkan di Gambar 5, klik Finish. Ia akan kembali ke Gambar 2.

Figure 5 || Gambar 5