Skip to content

Instantly share code, notes, and snippets.

View facebookegypt's full-sized avatar

Ahmed Samir facebookegypt

View GitHub Profile
@facebookegypt
facebookegypt / gsmarena.txt
Created January 14, 2020 11:38
gsmarena all mobiles list by manufacturers
'[email protected]
'For full database version call me (+201200908486)
Manuf_ID Manuf_Name Manuf_Links
1 Acer https://www.gsmarena.com/acer-phones-59.php
2 alcatel https://www.gsmarena.com/alcatel-phones-5.php
3 Allview https://www.gsmarena.com/allview-phones-88.php
4 Amazon https://www.gsmarena.com/amazon-phones-76.php
5 Amoi https://www.gsmarena.com/amoi-phones-28.php
6 Apple https://www.gsmarena.com/apple-phones-48.php
7 Archos https://www.gsmarena.com/archos-phones-90.php
@facebookegypt
facebookegypt / gist:3a62d3a6618020189a3694a7473fce19
Created October 25, 2019 11:29
Close all OleDB Connections to MS Access Database when exit application
'Close all OleDB Connections to MS Access Database when exit application
'adonetaccess2003.blogspot.com
Public Sub CloseCN()
If Not IsNothing(CN) Then
For Each p As Process In Process.GetProcesses()
If p.ProcessName = "MSACCESS" Then
Try
p.CloseMainWindow()
p.Dispose()
p.Kill()
@facebookegypt
facebookegypt / Module1.vb
Last active May 10, 2025 22:50
VB.NET Google drive api v3 for visual studio 2010 and above
''''''''''''''https://adonetaccess2003.blogspot.com'''''''''''''''''''
Imports Google.Apis.Auth.OAuth2
Imports Google.Apis.Drive.v3
Imports Google.Apis.Drive.v3.Data
Imports Google.Apis.Services
Imports Google.Apis.Util.Store
Imports System.IO
Imports System.Threading
'Save "credentials.json" in your project directory (i.e D:\Google-Drive-example\)
'Refresh 'Solution explorer', show all files, include "credentials.json" into your project
@facebookegypt
facebookegypt / html_grab.vb
Last active August 25, 2016 00:46
Get a spacific link url from a webpahe HTML
Imports System
Imports System.Net
Imports System.Net.WebClient
Public Class Form1
Dim tLINK As String = "http://network.bepress.com/explore/?q=&facet=download_type%3A%22PDF%22&facet=discipline%3A%22Law%22"
Dim Inext30 As Integer = 30
Dim Hlink As String
Public RawHtmlLinks As String
Dim ThisAttrib As String = "fbTooltip"
Dim Link
@facebookegypt
facebookegypt / Module1.vb
Created July 18, 2016 16:35
vb2010 database connection
Imports System
Imports System.Data
Imports CrystalDecisions
Imports CrystalDecisions.CrystalReports.Engine
Imports CrystalDecisions.Shared
Imports System.Data.OleDb
Module Module1
Public CN As New OleDb.OleDbConnection
Public CMD As New OleDb.OleDbCommand
Public DataR As OleDb.OleDbDataReader
'Ahmed Samir - Software developer
Option Explicit
Private Type PointApi
Px As Long
Py As Long
End Type
Private Declare Function GetCursorPos Lib "user32" _
(lpPoint As PointApi) _
As Long
@facebookegypt
facebookegypt / Design-notes-for-VB6-Countdown-timer.txt
Created May 31, 2016 15:59
VB6 Project source code example about How to Create Visual Basic 0.6 count-down timer OCX file.
'You may find more detailed description in the link (evry1falls.freevar.com/VB6/count-down-timer.html) for the Visual Basic 0.6 Project
'Create new Visual Basic Desktop Project
'On the Form [Form1] :
'1) Timer control [Name:Timer1]
'2) CommandButton control [Name:Command1, Caption:GO!]
'3) Label control [Name:Label1]
'4) Label control [Name:Label2]
'5) Textbox control [Name:Text1]
'6) CommandButton control [Name:Command2]
'--------Don't forget to always save your VB6 Project after each step.........
@facebookegypt
facebookegypt / Trans.vb
Created May 2, 2016 14:43
Database Transaction in VB 2010
'Create VB 2010 Project
'Database Name (Info)
'Create Table name (EMP) with structure (ID Counter PRIMARY KEY, FName Varchar (30))
'Create Windows form (Form1)
'Place one TextBox1 on the form which will contain the SQL Commands separated by ;
'TOP OF THE FORM
Imports System.Data.Oledb
Public Class Form1
Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
'Connect to Database
@facebookegypt
facebookegypt / gist:48e2d68f8917a23dc03e46084107056b
Last active August 18, 2019 23:19
Conversion from type 'DBNull' to type 'String' is not valid.
'adonetaccess2003.blogspot.com
'This method uses connected mode
If IsDBNull(DataReader!Field_Name) Then
TextBox1.Text = ("Anything you wish for now")
Exit Sub
End If
'Another method using disconnected mode 'DataSet'
TextBox1.Text = DataTable.Rows(0)("Field_Name").ToString()
'Another method from Database Table.
netsh wlan stop hostednetwork