Skip to content

Instantly share code, notes, and snippets.

View wingedpanther's full-sized avatar

Vivek ×͜× wingedpanther

View GitHub Profile
@wingedpanther
wingedpanther / WebDevelopment-Resources.md
Last active July 10, 2019 09:36 — forked from bradtraversy/webdev_online_resources.md
Online Resources For Web Developers (No Downloading)
C:\adb>adb.exe logcat
--------- beginning of system
01-02 09:07:19.735 213 213 I vold : Vold 3.0 (the awakening) firing up
01-02 09:07:19.736 213 213 V vold : Detected support for: exfat ext4 f2fs ntfs vfat
01-02 09:07:20.009 213 225 D vold : e4crypt_init_user0
01-02 09:07:20.009 213 225 D vold : e4crypt_prepare_user_storage for volume null, user 0, serial 0, flags 1
01-02 09:07:20.010 213 225 D vold : Preparing: /data/system/users/0
01-02 09:07:20.012 213 225 D vold : Preparing: /data/misc/profiles/cur/0
01-02 09:07:20.013 213 225 D vold : Preparing: /data/misc/profiles/cur/0/foreign-dex
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<remote name="aosp"
fetch="https://android.googlesource.com/"
review="https://android-review.googlesource.com/" />
<remote name="github"
fetch="https://github.com/" />
<remote name="SimpleAosp"
fetch="https://github.com/SAOSP-N/" />
Try
'con.Open()*/
Query = "INSERT INTO mcs.custormer (custormer_id,first_name,last_name,nic_no,c_address1,c_address2,c_address3,c_telephoneno,membership_date,business_name,g_name,g_nicno,g_address1,g_address2,g_address3,g_telephoneNO)" & _
"VALUES (@custormer_id,@first_name,@last_name,@nic_no,@c_address1,@c_address2,@c_address3,@c_telephoneNO,@membership_date,@business_name,@g_name,@g_nicno,@g_address1,@g_address2,@g_address3,@g_telephoneNO)"
Using cmd = New MySqlCommand(Query, con)
cmd.Parameters.AddWithValue("@custormer_id", Convert.ToInt32(txtcustormerid.Text))
cmd.Parameters.AddWithValue("@first_name", Convert.ToString(txtfirstname.Text))
cmd.Parameters.AddWithValue("@last_name", Convert.ToString(txtlastname.Text))
cmd.Parameters.AddWithValue("@nic_no", Convert.ToString(txtnicno.Text))
Dim obj As Object = If(System.IO.File.Exists("C:\file.txt"), System.IO.File.ReadAllText("C:\file.txt").Length <> 20, False)
If obj Then
MessageBox.Show("Code executed!")
Else
MessageBox.Show("Failed to execute!")
End If
Public Class frm_customer_orderproduct
Dim current_id As String
'NEW CODE IS HERE
Dim dt As New DataTable
Private Sub frm_customer_orderproduct_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
'Dim regDate As Date = Date.Today()
'NEW CODE IS HERE
dt.Columns.Add("Product ID")
dt.Columns.Add("Product Name")
Public Function CALCULATE_AGE(ByVal dob As Date) As Integer
Dim age As Integer
age = Today.Year - dob.Year
If (dob > Today.AddYears(-age)) Then age -= 1
Return age
End Function
@wingedpanther
wingedpanther / GET_STRING_BETWEEN.vb
Created November 19, 2015 11:34
GET_STRING_BETWEEN
Function GET_STRING_BETWEEN(ByVal start As String, ByVal parent As String, ByVal [end] As String)
Dim output As String
output = parent.Substring(parent.IndexOf(start) _
, (parent.IndexOf([end]) _
- parent.IndexOf(start)) _
).Replace(start, "").Replace([end], "")
output = start & output & [end]
Return output
End Function
@wingedpanther
wingedpanther / CountNoValuesInAColumn.vb
Created November 19, 2015 11:32
get counts of values in a column DGV
Dim count = (From row As DataGridViewRow In dgvb.Rows _
Where row.Cells("Name").Value = "Sunshine" And row.Cells("Name").Value IsNot DBNull.Value _
Select row.Cells("Name").Value).Count()
@wingedpanther
wingedpanther / SelRowsToList.vb
Created November 19, 2015 11:31
Get a list of selected Rows in DataGrdiView
Dim selectedRows As List(Of DataGridViewRow) = (From row In dataGridView1.Rows.Cast(Of DataGridViewRow)() _
Where Convert.ToBoolean(row.Cells("checkBoxColumn").Value) = True).ToList()