Skip to content

Instantly share code, notes, and snippets.

View hatefpalizgar's full-sized avatar

Hatef hatefpalizgar

View GitHub Profile
@hatefpalizgar
hatefpalizgar / ajax.md
Created July 28, 2019 16:34 — forked from lamngockhuong/ajax.md
[Ajax JQuery] #ajax #js
<script>		
  $.ajax({
    url: 'URL',
    type: '',
    cache: false,
    data: {
    //Dữ liệu gửi đi
    },
 success: function(data){

MySQL Cheat Sheet

Help with SQL commands to interact with a MySQL database

MySQL Locations

  • Mac /usr/local/mysql/bin
  • Windows /Program Files/MySQL/MySQL version/bin
  • Xampp /xampp/mysql/bin

Add mysql to your PATH

@hatefpalizgar
hatefpalizgar / poodir-notes.md
Created May 15, 2019 14:14 — forked from speric/poodir-notes.md
Notes From "Practical Object-Oriented Design In Ruby" by Sandi Metz

Chapter 1 - Object Oriented Design

The purpose of design is to allow you to do design later, and it's primary goal is to reduce the cost of change.

SOLID Design:

  • Single Responsibility Principle: a class should have only a single responsibility
  • Open-Closed Principle: Software entities should be open for extension, but closed for modification (inherit instead of modifying existing classes).
  • Liskov Substitution: Objects in a program should be replaceable with instances of their subtypes without altering the correctness of that program.
  • Interface Segregation: Many client-specific interfaces are better than one general-purpose interface.
@hatefpalizgar
hatefpalizgar / clean_code.md
Created May 15, 2019 14:11 — forked from wojteklu/clean_code.md
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@hatefpalizgar
hatefpalizgar / The Technical Interview Cheat Sheet.md
Created May 15, 2019 14:09 — forked from tsiege/The Technical Interview Cheat Sheet.md
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

Studying for a Tech Interview Sucks, so Here's a Cheat Sheet to Help

This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.

Data Structure Basics

###Array ####Definition:

  • Stores data elements based on an sequential, most commonly 0 based, index.
  • Based on tuples from set theory.
@hatefpalizgar
hatefpalizgar / Queue.java
Created May 15, 2019 14:04 — forked from tanaykumarbera/Queue.java
Queue - Data Structure
/*
QUEUE using array
0 based indexing
Save File as Queue.java
*/
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
/*
Linked List
dynamic memory allocation
Save File as LinkedMain.java
*/
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
@hatefpalizgar
hatefpalizgar / LinearSearch.java
Created May 15, 2019 14:00 — forked from tanaykumarbera/LinearSearch.java
Linear Search Iterative
/*
LINEAR SEARCH
0 based indexing
array as iterable
iterative method
Save File as LinearSearch.java
*/
import java.io.BufferedReader;
import java.io.IOException;
/*
MAX MIN in array
0 based indexing
Save File as Maxmin.java
*/
class Maxmin_wrapper{
/* Since java's call by reference needs a reference to a object, this class will be used as a wrapper */
public int maximum;
public int minimum;