Skip to content

Instantly share code, notes, and snippets.

View zhezheng's full-sized avatar

Zhe Zheng zhezheng

View GitHub Profile
@zhezheng
zhezheng / makov.cpp
Created October 11, 2013 04:47
Create a randomized text generator, which creates output based on a source text
/* Please put the tao_te_ching.txt under "D:\\tao_te_ching.txt" */
/* By ZHE ZHENG */
#include<fstream>
#include<iostream>
#include<string>
#include<map>
#include<ctime>
using namespace std;
@zhezheng
zhezheng / robot.cpp
Last active December 25, 2015 06:09
Elderly Fall Detection Using Web Camera and Mobile Robot
#include <stdio.h>
#include <opencv/highgui.h>
#include <opencv/cv.h>
#include <opencv/cxcore.h>
#include <ros/ros.h>
#include <geometry_msgs/Twist.h>
#include <std_msgs/String.h>
IplImage* imgTracking;
@zhezheng
zhezheng / encrypt.cs
Created October 11, 2013 05:00
Privacy Preserving Record Matching Among Multiple Providers
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Security.Cryptography;
using System.Net;
@zhezheng
zhezheng / Calculator.cpp
Last active December 25, 2015 06:09
Spreadsheet Calculator
/***************************
test case format:
3 2
A2
4 5 *
A1
A1 B2 / 2 +
3
39 B1 B2 * /
****************************/
@zhezheng
zhezheng / audio.m
Created October 11, 2013 05:17
A MATLAB Audio Player
function varargout = audio(varargin)
% AUDIO MATLAB code for audio.fig
% AUDIO, by itself, creates a new AUDIO or raises the existing
% singleton*.
%
% H = AUDIO returns the handle to a new AUDIO or the handle to
% the existing singleton*.
%
% AUDIO('CALLBACK',hObject,eventData,handles,...) calls the local
% function named CALLBACK in AUDIO.M with the given input arguments.
@zhezheng
zhezheng / NSGA.m
Last active December 25, 2015 06:09
Vehicle Routing Problem Using NSGA-II Algorithm
clc;
clear;
last = [];
pop = 10;
path = zeros(pop,20);
dis = zeros(20,20);
order1 = zeros(10,26);
c = [0.6606,0.9695,0.5906,0.2124,0.0398,0.1367,0.9536,0.6091,0.8767,0.8148,0.3876,0.7041,0.0213,0.3429,0.7471,0.5449,0.9464,0.1247,0.1636,0.8668;0.9500,0.6740,0.5029,0.8274,0.9697,0.5979,0.2184,0.7148,0.2395,0.2867,0.8200,0.3296,0.1649,0.3025,0.8192,0.9392,0.8191,0.4351,0.8646,0.6768];
f = zeros(10,4);
@zhezheng
zhezheng / Untitled.m
Created October 11, 2013 05:22
Improving the convergence of the Back-Propagation Algorithm
clc;
clear;
nure = 2;
w1 = 2*rand(nure,1)-1;
w2 = 2*rand(1,nure)-1;
b1 = 2*rand(nure,1)-1;
b2 = 2*rand(1,1)-1;
w11 = w1;