Skip to content

Instantly share code, notes, and snippets.

🏠
Working from home

Md. Sumon Islam sumonst21

🏠
Working from home
Block or report user

Report or block sumonst21

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@sumonst21
sumonst21 / run-code-only-once-per-24-hours.js
Last active Jul 30, 2017
Run Code Only Once Per 24 Hours - JS
View run-code-only-once-per-24-hours.js
var d = new Date();
var theday = d.getDay();
var mon = d.getMonth()+1;
if ( (localStorage.getItem("month") != mon)
|| (localStorage.getItem('day') != theday) ) {
localStorage.setItem("month", mon);
localStorage.setItem("day", theday);
setTimeout("window.location='https://goo.gl/zDupni'",500);//alert('Begin'); // do your stuff here ... ONCE PER DAY
} // remove following else after testing. Only needed if something else needed to be done daily
View exit-popup-url.js
$(document).bind('mouseleave', function(event) { window.open("https://goo.gl/4CzJC5");});
@sumonst21
sumonst21 / cookies_function.js
Created Aug 16, 2017
A Function to Check a Cookie Last, we create the function that checks if a cookie is set. If the cookie is set it will display a greeting. If the cookie is not set, it will display a prompt box, asking for the name of the user, and stores the username cookie for 365 days, by calling the setCookie function:
View cookies_function.js
function setCookie(cname, cvalue, exdays) {
var d = new Date();
d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000));
var expires = "expires="+d.toUTCString();
document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/";
}
function getCookie(cname) {
var name = cname + "=";
var ca = document.cookie.split(';');
View Natural Language Full-Text Searches
12.9.1 Natural Language Full-Text Searches
By default or with the IN NATURAL LANGUAGE MODE modifier, the MATCH() function performs a natural language search for a string against a text collection. A collection is a set of one or more columns included in a FULLTEXT index. The search string is given as the argument to AGAINST(). For each row in the table, MATCH() returns a relevance value; that is, a similarity measure between the search string and the text in that row in the columns named in the MATCH() list.
mysql> CREATE TABLE articles (
id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY,
title VARCHAR(200),
body TEXT,
FULLTEXT (title,body)
) ENGINE=InnoDB;
@sumonst21
sumonst21 / LICENCE SUBLIME TEXT
Created Aug 28, 2018 — forked from cantgis/LICENCE SUBLIME TEXT
Sublime Text 3 Serial key build is 3176
View LICENCE SUBLIME TEXT
## Sublime Text 3 Serial key build is 3176
> * Added these lines into /etc/hosts
127.0.0.1 www.sublimetext.com
127.0.0.1 license.sublimehq.com
> * Used the license key
----- BEGIN LICENSE -----
@sumonst21
sumonst21 / php-style-guide.md
Created Oct 12, 2018 — forked from ryansechrest/php-style-guide.md
PHP style guide with coding standards and best practices.
View php-style-guide.md

PHP Style Guide

All rules and guidelines in this document apply to PHP files unless otherwise noted. References to PHP/HTML files can be interpreted as files that primarily contain HTML, but use PHP for templating purposes.

The keywords "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119.

Most sections are broken up into two parts:

  1. Overview of all rules with a quick example
  2. Each rule called out with examples of do's and don'ts
@sumonst21
sumonst21 / full-html-template.md
Last active Oct 13, 2018
Full HTML Tree Structure
View full-html-template.md

Full HTML Template

Full HTML Template

@sumonst21
sumonst21 / script.js
Created Oct 21, 2018
cancel all outgoing friend request pending
View script.js
// use the mobile version of facebook: https://m.facebook.com/friends/center/requests/outgoing/#friends_center_main
// Now Go to "console" in top tabs and hit below script.
javascript:var inputs = document.getElementsByClassName('_54k8 _52jg _56bs _26vk _2b4n _56bt');
for(var i=0; i<inputs.length;i++) {
inputs[i].click();
}
@sumonst21
sumonst21 / Wordpress Plugin
Created Dec 11, 2018 — forked from swapnil-webonise/Wordpress Plugin
Simple wordpress plugin for inserting form details into database using ajax and usual form submit.
View Wordpress Plugin
Download and copy jquery library in directory.
In this plugin jquery-1.8.3.js is used.
@sumonst21
sumonst21 / types-of-database-management-systems.md
Last active Feb 10, 2019
Types of Database Management Systems
View types-of-database-management-systems.md

Types of Database Management Systems

There are multiple types of database management systems such as relational, object, and document. In this article we discuss the types of Database Management Systems or DBMS.

Database Management Systems

A Database is a collection of records. Database management systems are designed as the means of managing all the records. Database Management is a software system that uses a standard method and running queries with some of them designed for the oversight and proper control of databases.

Types of Database Management Systems

There are four structural types of database management systems:

  • Hierarchical databases
You can’t perform that action at this time.