原创 IDL/C 二進制數據的讀取和寫入

IDL把一個數組寫入一個二進制文件,sample filename="/home/allen/sample" openw,1,filename,/F77_UNFORMATTED a=[1L,3L,5L,7L,9L,11L,19L]

原创 install ipython & notebook

how to install ipython and notebook install pip(python version>= 2.7.9 include pip by default) pip install "ipytho

原创 微信公衆號所有歷史文章的標題/點贊數/閱讀數統計

下面這段代碼的邏輯起點是頁面滑到底部ajax加載的一個鏈接url_initial(我是在手機微信上在瀏覽某個公衆號的某個頁面時send to Chat到自己賬號,獲得鏈接後在電腦chrome上打開; 或者可以通過關注 “My Ev

原创 Python大作業_計算機&作圖&單純形法

先看代碼 1 # -*- coding: cp936 -*- 2 ''' 3 使用單純形法時,採用現在的這種頭文件,不能出現from __future__ import division 4 使用計算器或畫圖時,務

原创 C++/C The variable in the LOOP STRUCT

1 #include<iostream> 2 using namespace std; 3 void main() 4 { 5 for(int i=0;i<5;i++) 6 cout<<i<<' '; 7

原创 verilog 阻塞賦值和非阻塞賦值

1 module main(); 2 reg clk=0; 3 reg [11:0] a=0; 4 reg [11:0] b=0; 5 always #50 clk=~clk; 6 always@(clk) 7

原创 菜鳥學習C++的引用

#include<iostream> using namespace std; int & f(int & a) //傳入a,產生一個局部變量a(僅在f()中生存) { return a; //要返回a,返回的是

原创 字符數組和int數組的不同

#include<iostream> using namespace std; void main() { char a[]="hello"; char b[]="hello"; cout<<a<<'\n'<<*b<<e

原创 verilog同一個reg變量同時發生多個阻塞賦值的情況分析

1 module main(); 2 reg [5:0] a=0; 3 reg [5:0] b=0; 4 reg clk=0; 5 6 always@(clk) 7 begin 8 a<=a+3;

原创 IDL讀寫F77_UNFORMATTED文件的一個特點

寫文件 filename="/home/allen/sample" openw,1,filename,/F77_UNFORMATTED a=[1L,3L,5L,7L,9L,11L,19L] writeu,1,a writeu,1,

原创 三角形已知兩邊一斜角時求第三邊的公式

已知三角形中的一個角θ 和其對邊b 以及側邊a , 第三條邊長的計算公式爲 c2=a2+b2−2a2sin2θ±(a2sin2θ−a2)(a2sin2θ−b2)−−−−−−−−−−−−−−−−−−−−−−−√ 證明很

原创 C語言在頭文件中用extern架起變量溝通的橋樑

//a.c int foo; int bar; //a.h extern int foo; extern int bar; //b.c int foo=5; //c.c #include <stdio.h> #include "a

原创 "hello world" of MPI version

// file name="hello-mpi.c" #include "mpi.h" #include<stdio.h> #include<math.h> int main(int argc, char *argv[]) {

原创 struct內部無名無綁定對象的union

#include <stdio.h> struct Fuck2 { union { struct { int a; int b; };

原创 jQuery mobile 入門筆記

動畫效果實現方法1:只是給屬相變化加一個過程而不是瞬間完成 純屬個人筆記,雜亂無章,看前三思 <!DOCTYPE html> <html> <head> <style> div { width:100px; height:100