Skip to content

Instantly share code, notes, and snippets.

View Ionizing's full-sized avatar
😵
Being defeated by DALAOs

Ionizing Ionizing

😵
Being defeated by DALAOs
  • Mars
View GitHub Profile
@Ionizing
Ionizing / Queue.cpp
Last active February 15, 2017 14:10
Queue template
#include <iostream>
#define MAXSIZE 20
using namespace std;
template<typename Element>
class Queue
{
private:
Element Data[MAXSIZE];
@Ionizing
Ionizing / Merge_iterative.c
Created February 28, 2017 12:07
Merge sort. Iterative
/* Iterative C program for merge sort */
#include<stdlib.h>
#include<stdio.h>
/* Function to merge the two haves arr[l..m] and arr[m+1..r] of array arr[] */
void merge(int arr[], int l, int m, int r);
// Utility function to find minimum of two integers
int min(int x, int y) { return (x<y)? x :y; }
@Ionizing
Ionizing / ex6-16.tex
Last active September 30, 2017 03:46
arced coil drawing in tikz. Zhaokaihua ``Mechanics'' ex 6-16.
\documentclass[tikz]{standalone}
\usepackage{newtxmath}
\usepackage{tikz}
\usetikzlibrary{decorations.pathmorphing}
\usetikzlibrary{shapes.geometric,positioning}
\begin{document}
\begin{tikzpicture}
[defsty/.style={circle ,fill=blue!50, minimum size=1cm},
import numpy as np
import matplotlib.pyplot as plt
import scipy.stats as ss
# Background Electric Potential, mV
Phi_0 = 318
# Concentration of typical solution, mg/L
C = [0.2, 0.4, 0.8, 1.2, 1.6, 2.0]
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.cm as cm
import scipy.ndimage
# import matplotlib.mlab as mlab
def plot_fun(filename, strech):
# x, y, z = np.loadtxt(filename,
# dtype={'names': ('Type', 'Num1', 'Atom', 'Num2', 'x', 'y', 'z'),
# 'formats': ('|S4', np.float, '|S1', np.float, np.float, np.float, np.float)},
/*
https://www.patest.cn/contests/pat-b-practise/1072
*/
#include <iostream>
#include <set>
#include <string>
#include <vector>
using std::cin;
@Ionizing
Ionizing / HAc_pKa.py
Created November 22, 2017 08:57
醋酸解离常数的数据处理
import numpy as np
import xlrd
import matplotlib.pyplot as plt
from scipy.interpolate import interp1d
path = 'Workbook1.xlsx'
workbook = xlrd.open_workbook(path)
sheet = workbook.sheet_by_index(0)
V_NaOH = []
@Ionizing
Ionizing / assem_exp7.asm
Created January 10, 2018 12:59
王爽《汇编语言》实验七,p172
assume cs:code
data segment
db '1975','1976','1977','1978','1979','1980', '1981'
db '1982', '1983','1984', '1985','1986', '1987','1988'
db '1989','1990','1991','1992','1993','1994','1995'
;以上是表示21年的21个字符串
dd 16,22,382,1356,2390,8000,16000,24486,50065,97479
dd 140417,197514,345980,590827,803530,118300,1843000
@Ionizing
Ionizing / assem_exp10_2.asm
Created January 16, 2018 14:18
王爽《汇编语言》实验10 不会产生溢出的除法
;返回结果 dx=结果高16位,ax=结果低16位,cx=余数
assume cs:code, ss:stack
stack segment
dd 10h dup(0)
stack ends
code segment
start:
mov ax, stack
@Ionizing
Ionizing / assem_exp10_3.asm
Created January 18, 2018 14:38
王爽《汇编语言》实验十(3)
assume cs:code, ss:stack, ds:data
data segment
dd 10h dup (0)
data ends
stack segment
dd 10h dup (0)
stack ends