Skip to content

Instantly share code, notes, and snippets.

View chaonan99's full-sized avatar
🎯
Focusing

Haonan Chen chaonan99

🎯
Focusing
View GitHub Profile
@chaonan99
chaonan99 / 0_reuse_code.js
Last active April 6, 2016 04:00
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@chaonan99
chaonan99 / dual_simplex.m
Created April 6, 2016 03:45
Solve LP problem using Dual Simplex Method and Bland's Law.
%% Dual Simplex Method
% /DAA/dual_simplex.m
% [Description] Solve LP problem using Dual Simplex Method and Bland's Law.
% [Author] chaonan99(R)
% [Last Modify] 2016/04/03
% [Contact Me] [email protected]
% [Note] The input should already have an initial basic solution for the
% original problem and a feasible solution for its dual problem.
@chaonan99
chaonan99 / screen_capture.m
Created April 6, 2016 03:42
A simple demo of screen capture using Matlab and java AWT
robo = java.awt.Robot;
t = java.awt.Toolkit.getDefaultToolkit();
rectangle = java.awt.Rectangle(t.getScreenSize());
image = robo.createScreenCapture(rectangle);
filehandle = java.io.File('capture.png');
javax.imageio.ImageIO.write(image,'png',filehandle);
im = imread('capture.png');
imshow(im);
@chaonan99
chaonan99 / twostage.m
Last active April 6, 2016 03:38
Solve LP problem using Two-Stage Method and Bland's Law.
%% Two-Stage Method
% /DAA/twostage.m
% [Function] Solve LP problem using Two-Stage Method and Bland's Law.
% [Author] chaonan99(R)
% [Last modify] 2016/03/28
% [Contect me] [email protected]
% [Note]
% 1. There are no examination on input size, which the user should ensure
% its correctness.
@chaonan99
chaonan99 / simplex.m
Created April 6, 2016 03:03
Solve LP problem using Simplex Method and Bland's Law.
%% Simplex Method
% /DAA/simplex.m
% Solve LP problem using Simplex Method and Bland's Law.
% chaonan99(R)
% 2016/03/20
% [Note] The input should already have a initial basic feasible solution.
% [Thanks to] http://wenku.baidu.com/link?url=bUal8_VtNYHdIXF97JKo_r6vzYt3lGlSFO2W2Wz6wInLnw-3STZpbyxSoaOIu2XKE3z5O4D5xjErH5_tqXY-j3-DubAapkfCuyraVMxMNNO
%% code