Skip to content

Instantly share code, notes, and snippets.

View yxjxx's full-sized avatar
🎯
Focusing

Jing Yang yxjxx

🎯
Focusing
View GitHub Profile
@yxjxx
yxjxx / ruijie.sh
Created April 15, 2015 07:41
ruijie.sh
#!/bin/bash
PASSWD=pw
ruijie_dir="/Applications/Ruijie Supplicant.app/Contents/MacOS"
cmd=Supplicant
cd "$ruijie_dir"
echo "$PASSWD" | sudo -S "./$cmd" &> /dev/null &
@yxjxx
yxjxx / basic.tex
Created March 25, 2015 03:06
basic LaTeX
\documentclass{article}
\title{Hello World}
\author{yangjing}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{graphicx}
\begin{document}
\tableofcontents
\maketitle
@yxjxx
yxjxx / Hello.tex
Last active August 29, 2015 14:17
Subilme3+Skim+MacTex == Latex中文支持
%!TEX program = xelatex
\documentclass{article}
\usepackage{fontspec, xunicode, xltxtra}
\setmainfont{Hiragino Sans GB}
\title{Title}
\author{}
\begin{document}
\maketitle{}
\section{Introduction}
This is where you will write your content. 完成中文支持
@yxjxx
yxjxx / wifi_sharing.applescript
Last active August 29, 2015 14:17
wifi_sharing.applescript
tell application "System Preferences"
quit
end tell
delay 1
tell application "System Preferences"
activate
end tell
tell application "System Events"
tell process "System Preferences"
@yxjxx
yxjxx / switch_usage.cpp
Created March 8, 2015 12:44
C语言Switch case语句用法
#include <iostream>
#include <iomanip>
using namespace std;
int main()
{
int a=0,i;
for(i=1;i<5;i++){
@yxjxx
yxjxx / double_ dimensional_array.cpp
Last active August 29, 2015 14:16
C语言二维数组
#include <iostream>
using namespace std;
int main()
{
char ch[3][5] = {"AAAA", "BBB", "CC"};//C语言中二维数组默认按行存储,ch[3]表示数组有3个元素,ch[3][5]表示ch[3]数组中的每个元素又是一个含有5个元素的数组
cout << ch[1] << endl; //ch[3]数组的第二个元素(数组下标从0开始)
for(int i=0;i<3;i++){
for(int j=0;j<5;j++){
#include <iostream>
#include <iomanip>
using namespace std;
typedef struct BTNode{
char data;
struct BTNode *lchild;
struct BTNode *rchild;
}BTNode, *BinTree;
#include <iostream>
#include <iomanip>
using namespace std;
#define SORT_NUM 4
int my_count=0;//全局变量
void create_array_with_random_numbers(int myArray[], int len){
@yxjxx
yxjxx / sum_to_digit.cpp
Created November 24, 2014 16:51
int sum_to_digit(int a)
#include <iostream>
#include <complex>
using namespace std;
int HowMuchBit(int elem){
int bit = 1;
int p = 10;
while(elem >= p){
p *= 10;
@yxjxx
yxjxx / RSA_Simply.py
Created March 25, 2014 14:44
RSA_simply_python.
#coding=utf-8
import random
# 解密模块
def RSA_Decrypy(d,n,c):
result_m = pow(c,d,n)
return result_m
# 加密模块