Skip to content

Instantly share code, notes, and snippets.

View hatefpalizgar's full-sized avatar

Hatef hatefpalizgar

View GitHub Profile

Keybase proof

I hereby claim:

  • I am hatefpalizgar on github.
  • I am hatefpalizgar (https://keybase.io/hatefpalizgar) on keybase.
  • I have a public key ASAYuVdh3g0JCMQH4SDrZIdwxMG7vYz4ZpO6W_n39G0XUgo

To claim this, I am signing this object:

@hatefpalizgar
hatefpalizgar / 1.create Customer.java
Last active January 30, 2020 19:19
SpringMVC & Hibernate Development Steps
package com.luv2code.springdemo.entity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
@Entity
@hatefpalizgar
hatefpalizgar / main.java
Created December 12, 2019 23:21
medium-polymorphism-main-java
Car yaris = new Toyota();
Car focus = new Ford();
Car azera = new Hyundai();
Renault megane = new Renault();
// create manager object
Manager manager = new Manager();
// now manager calls the technician to start repairing
hatef.repair(yaris); // hatef is able to repair any Car instances
hatef.repair(focus); // focus is a Car instance
hatef.repair(azera); // azera is a Car instance
@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){
<script>
$("#btnSearch").on('click',function () {
$("#btnSearch").hide();
});
</script>
@hatefpalizgar
hatefpalizgar / hibernate_quick_guide.htm
Created May 15, 2019 18:59
[Hibernate Quick Guide]
https://www.tutorialspoint.com/hibernate/hibernate_quick_guide.htm
Sr.No. Session Methods & Description
1
Transaction beginTransaction()
Begin a unit of work and return the associated Transaction object.
2
void cancelQuery()

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