Skip to content

Instantly share code, notes, and snippets.

View maksadbek's full-sized avatar
💭
Chilling

Maksadbek maksadbek

💭
Chilling
View GitHub Profile
var mysql = require('mysql');
var ini = require('ini');
var fs = require('fs');
var logger = require("winston");
var config = ini.parse(fs.readFileSync('./config.ini', 'utf-8'))
var serverPort = config.server.port;
var dbUser = config.database.user;
var dbPass = config.database.password;
var dbHost = config.database.host;
drop table employee;
create table employee(
id numeric(7) NOT NULL default 1,
last_name varchar(25),
first_name varchar(25),
DEPT_ID numeric(7),
constraint pk_employee_id
primary key(id)
);
--alter table employee
case "handmade_next_status":
{
$sql = "SELECT status FROM `max_taxi_incoming_orders` WHERE id = {$_REQUEST['id']}";//1,5,6,7
$res = mysql_query($sql);
$status = mysql_result($res, 0, 'status');
$new_status = $status;
switch ($status) {
case "1": {
$new_status = 5;
@maksadbek
maksadbek / anagram.java
Created December 9, 2014 19:00
anagram
import java.util.*;
import java.io.*;
public class Anagrams {
public static void main(String[] args) {
int minGroupSize = Integer.parseInt(args[1]);
// Read words from file and put into a simulated multimap
Map<String, List<String>> m = new HashMap<String, List<String>>();
package datastore
import (
"fmt"
"github.com/mmirolim/hack-project/conf"
ds "github.com/mmirolim/hack-project/datastore"
"log"
"strings"
"testing"
)
@maksadbek
maksadbek / rm.md
Last active August 29, 2015 14:16

##Obstacles preventing the development in uz##

  1. Coverage area
  2. No satellite internet-restricted because of no possibilities to control the date and information flow.
  3. Bad channel penetration speed(low level of bandwidth)
  4. Cultural habits and human factors
  5. No proper technological control( out of rules)
  6. Corruption
  7. Black market, negative influence on progress development
@maksadbek
maksadbek / slicegen.go
Created March 7, 2015 20:58
Generate Slice using reflection
package main
import (
"fmt"
"reflect"
)
type Model interface {
GetHello()
}
@maksadbek
maksadbek / genslice.go
Created March 7, 2015 22:34
Generate Slice using reflection
package main
import (
"fmt"
"reflect"
)
type Model interface {
GetHello()
}
package datastore
import (
"fmt"
"testing"
)
func TestGetStaffFromCache(t *testing.T) {
staff := Staff{Id: 1000}
err := GetFromList(&staff)
describe("A suite", function() {
it("contains spec with an expectation", function() {
expect(true).toBe(true);
});
});
describe("A suite is just a function", function() {
var a;