Skip to content

Instantly share code, notes, and snippets.

View techsharif's full-sized avatar

Md. Sharif Chowdhury techsharif

View GitHub Profile
@techsharif
techsharif / navbar_minimize_on_scroll.html
Last active October 22, 2017 08:39
On Scroll how to change css of an element and how to hide and retrieve an element
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Javascript</title>
<!-- HEAD SECTION -->
<!-- IE Edge Meta Tag -->
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<?php
// for data add
function add_data($id,$name,$phone){
$data = sprintf('%10d%60s%15s',$id,$name,$phone);
$file = fopen('db.txt','a');
fwrite($file,$data);
fclose($file);
}
import subprocess as sp
def add_data(id_,name,phone):
data = "{:10d}{:60s}{:15s}".format(id_,name,phone)
print(data)
file = open('db.txt','a')
file.write(data)
file.close()
def show_data():
file = open('db.txt','r')
<?php
// for data add
function add_data($id, $name, $phone)
{
$data = sprintf('%10d%60s%15s', $id, $name, $phone);
$file = fopen('db.txt', 'a');
fwrite($file, $data);
fclose($file);
}
@techsharif
techsharif / PYTHON_store_and_search_data_for_start_learning.py
Created October 12, 2017 06:00
PYTHON_store_and_search_data_for_start_learning
import subprocess as sp
def add_data(id_,name,phone):
data = "{:10d}{:60s}{:15s}".format(id_,name,phone)
print(data)
file = open('db.txt','a')
file.write(data)
file.close()
def get_data():
students = []
# this is for a simple quiz system using python based on web crolling
# importent link
# request: http://docs.python-requests.org/en/master/
# beautiful soup: https://www.crummy.com/software/BeautifulSoup/bs4/doc/
# digital ocean tutorial: https://www.digitalocean.com/community/tutorials/how-to-scrape-web-pages-with-beautiful-soup-and-python-3
from bs4 import BeautifulSoup
import requests
@techsharif
techsharif / database_basic.py
Created November 19, 2017 05:53
PYTHON3 sqlite basic operation
"""
importent links:
http://sebastianraschka.com/Articles/2014_sqlite_in_python_tutorial.html
http://www.pythoncentral.io/introduction-to-sqlite-in-python/
"""
import sqlite3
@techsharif
techsharif / PYTHON_store_and_search_data_for_start_learning_using_DATABASE.py
Last active May 17, 2023 13:36
Python Database CRUD Sqlite basic using simple student management system
"""
importent links:
http://sebastianraschka.com/Articles/2014_sqlite_in_python_tutorial.html
http://www.pythoncentral.io/introduction-to-sqlite-in-python/
"""
import sqlite3
import datetime
import requests
import xml.etree.ElementTree as ET
POST_URI = 'http://116.212.108.236:802/PaymentServices.asmx?op=PaymentRequestFromECom'
user_id = 'ecomauser'
password = 'itreus#7102'
vendor_code = 'GP'
phone_number = '01989782605'
post_or_pre = 1
@techsharif
techsharif / python_training_and_exercise_on_function.md
Last active July 2, 2018 04:27
python_training_and_exercise_on_function

Python Training and Exercise on Function

Installing

Python 3.6 (The best is to use virtuall environment)

Topics

  • function intro
  • Built in functions