自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(169)
  • 资源 (4)
  • 收藏
  • 关注

原创 misc LaTeX reference

misc{

2023-09-25 08:33:51 109

原创 import customized lib

import syssys.path.insert(0, '../utils/')from sort_dictionary_by_value import sort_dictionary_by_value

2022-06-25 00:24:07 191 1

原创 Download a file from Google Drive

pip install gdownimport gdownoutput = "data.tar"id = "1srnBQUOho1R8EW8s50A1VKdecnqoOeXZwer"gdown.download(id=id, output=output, quiet=False)

2022-06-14 05:53:58 311 1

原创 install docker and Nvidia-docker on Ubuntu

install docker and Nvidia-docker on Ubuntu

2022-06-08 10:37:55 170

原创 Notes for Creating LaTeX Table using Python

################## in LaTeX, replace :^) by :$\hat{\mkern6mu}$)# replace \ by $\backslash$# replace :{ by :\{# replace $ by \$#################

2021-11-22 08:22:26 716

原创 reset TP-Link

reset the router by pressing the behind deep hole for 10 seconds restart the router go toTrying to configure the Router? | TP-Linkin Firefox (must be Firefox) go tohttp://192.168.0.1and input username and password as admin

2021-09-23 07:57:10 110

原创 Install CUDA and Nvidia-docker on Ubuntu 18.04 GTX2080Ti

Install GPU driverhttps://linuxconfig.org/how-to-install-the-nvidia-drivers-on-ubuntu-18-04-bionic-beaver-linuxhttps://linuxconfig.org/how-to-install-the-nvidia-drivers-on-ubuntu-18-04-bionic-beaver-linuxInstall Dockerhttps://medium.com/@linhlinhle99

2021-09-17 04:35:21 167

原创 Fix ‘Clearing orphaned inodes’ on Ubuntu

Run in terminalsudo apt-get -f updatesudo apt autoremove

2021-07-24 09:16:49 1033

原创 Couldn‘t import the Basemap Python 3.x on Windows

1.conda install -c conda-forge basemap2.copy epsg file and paste it intoC:\Users\xxxx\anaconda3\Lib\site-packages\mpl_toolkits\basemap\

2021-02-20 05:16:39 134

原创 Remove Copyright and Author Address in ACM LaTeX Template

Place the following code just after\documentclass[acmsmall]{acmart}\makeatletter\let\@authorsaddresses\@empty\makeatother\settopmatter{printacmref=false} % Removes citation information below abstract\renewcommand\footnotetextcopyrightpermission[1]{.

2020-10-03 05:04:40 1322

转载 add newline inside a cell in Latex Table (Latex表单元格内换行)

paste directly in Latex:# \vtop{\hbox{\strut top line}\hbox{\strut botline}} generate using Python:# \\vtop{\\hbox{\\strut top line}\\hbox{\\strut botline}}

2019-01-14 00:01:52 798

原创 Detect operating system types (Linux or Windows) using Python

If you use Dropbox to sync files between platforms, you may face the problem of editing Python codes on Windows, but execute the code on Linux. In this case, identifying the OS type inside Python code...

2018-12-06 11:01:12 503

原创 Tensorflow 指定GPU

import osos.environ["CUDA_VISIBLE_DEVICES"]="0"仅仅GPU 0 可见,process在GPU 0 上运行

2018-09-05 06:50:52 355

原创 Change Font size when plotting using Python

import matplotlibmatplotlib.rcParams.update({'font.size': 22})

2017-09-18 01:29:45 878

转载 Simulate a key press on Android

Method 1:import android.app.Instrumentation;new Thread(new Runnable() { @Override public void run() { try { Instrumentation inst = new Instrumentation(); fo

2017-07-18 03:59:41 1134

原创 Android Input Method Sample Code Analysis

Keyboard.xmldefine the Key Label, Key code and the Row of keys.<Keyboard xmlns:android="http://schemas.android.com/apk/res/android" android:horizontalGap="0dp" android:keyHeight="61d

2017-07-17 23:28:42 729

原创 SIGCHI Latex Format display subfigures

\usepackage{graphics} % for EPS, load graphicx instead\usepackage[caption=false]{subfig}\begin{figure}\centering\subfloat[Blur]{\includegraphics[width=0.45\columnwidth]{figures/interface_blur.pdf

2017-07-03 22:57:17 667

原创 IEEEtrans Adding Author Affiliation

\author{\IEEEauthorblockN{authorA, authorB\IEEEauthorrefmark{1}, authorC}\IEEEauthorblockA{% Department of Electrical Engineering and Computer Science\\University of xxxx\\Email: \{xxxx, xxxx, xxx

2017-06-28 02:03:26 1396

原创 disable back button of browsers 禁用浏览器后退键

history.pushState(null, document.title, location.href); window.addEventListener('popstate', function (event) { history.pushState(null, document.title, location.href); }); window.location.ha

2017-06-09 23:40:29 909

转载 remove copyright box on a paper written in LaTex

add the following lines before \beign{document}\makeatletter\def\@copyrightspace{\relax}\makeatother

2017-04-19 22:39:03 893

原创 C++ 读取文件内容到指定类型的变量

#include #include #include #include using namespace std;int main(){ cout << "input the file name: "; string file_name; cin >> file_name; cout << endl; // ifstream infile("1.txt"); ifstre

2017-04-13 00:52:59 5687

原创 C++ 读取文件内容到data 结构体 structure

#include #include #include using namespace std;typedef struct { int n; char *data;} BLOCK;int main () { BLOCK block; ifstream infile ("test.txt", ios::binary); infile.read((char*)&bloc

2017-04-13 00:51:00 4024

原创 PHP connects Hostinger MySQL database

After registering my domain on Hostinger, I tried to connect the Hostinger MySQL database from PHP script. Be careful about the server name:<?php $servername = "localhost"; // work $servername = "

2017-03-31 23:27:27 513

原创 远程连接Hostinger MySQL数据库 setup remote MySQL Workbench connection to Hostinger MySQL database

I tried to use MySQL workbench to connect my Hostinger MySQL database from my local desktop. Following the official tutorials, I setup the connection like this:host: mysql.hostinge.comdatabase nam

2017-03-31 23:18:46 1168

原创 Gyroscope in smartphone 手机中的陀螺仪传感器

首先,陀螺仪有XYZ三个轴,每个轴都有一个角度分量。Z轴角度分量为alpha [0,360],X轴角度分量为beta [-180,180],Y轴角度分量为gamma [-90,90]。

2017-03-11 12:04:37 2279

原创 Matlab 字符串组合

for index_var = 1:num_var prefix = 'condition_'; suffix = '.csv'; file_cond = [prefix int2str(index_var) suffix]; WS = dlmread(file_cond);end

2017-03-08 00:42:57 1909

原创 LaTeX: two figures in one line (两个图片置于同一行)

\begin{figure}\centering\begin{minipage}{.33\textwidth}  \centering  {\includegraphics[width=0.944\linewidth]{./figures/illustrate_cases.pdf}}  \captionof{figure}{Common cases where a single

2017-02-15 04:47:33 4357

原创 Run .bat file every 5 seconds on Windows

:loopecho Welcome to batch scripting!C:\windows\system32\timeout /t 5goto loop

2017-01-06 11:14:00 360

原创 MATLAB R2016b Change the default font size in the command window and .m files

HOME --> Preferences --> MATLAB --> Fonts

2017-01-02 10:47:08 816

转载 Python calculate and plot correlation between multiple variables

import pandas as pdimport numpy as npimport matplotlib.pyplot as pltfrom matplotlib.collections import EllipseCollectiondata = pandas.DataFrame([["A", 4, 0, 1, 27], ["B"

2016-12-30 23:26:55 1415

原创 matplotlib

# basic plot functions import matplotlib.pyplot as pltplt.xlim((0, 1)) plt.xlim((0, 100))plt.xlabel('x', fontsize = 16)plt.ylabel('y', fontsize = 16)plt.suptitle('Title', fontsize = 20)plt.show

2016-12-23 00:56:31 495

转载 Examples of Python Matplotlib to plot bar

Examples of Python Matplotlib to plot barhttps://pythonspot.com/en/matplotlib-bar-chart/

2016-11-24 03:38:09 453

原创 return the index of a 'key' in Python dictionary

my_dict = {'a': 0, 'b': 1, 'c': 2}# python 3.xprint (list(my_dict.keys()).index('c'))# python 2.7print (my_dict.keys().index('c'))

2016-10-23 04:58:10 418

原创 Parallel Python for loop

An example on Windows:from joblib import Parallel, delayedimport multiprocessing data = range(100) def process_task(i): print (i)if __name__ == '__main__': num_cores = multiproces

2016-10-23 01:15:30 2429

原创 Using pip to install Python packages on Anaconda

Windows Platform:cd C:\Users\jack\AppData\Local\Continuum\Anaconda2\pythonw.exe C:\Users\yfeng14\AppData\Local\Continuum\Anaconda2\Scriptspip install package-nameLinux Platform:cd ~/anacon

2016-10-23 00:35:03 441

原创 Tips for writing efficient Python code

Find the difference of keys between two dictionariesSuppose two dictionaries A and B. We would like to find the keys in A but not in B.Bad example:import timeA = {}B = {}for i in range(1000):

2016-10-22 07:59:38 429

原创 [A Weird Bug] caused by the name of Python script

I attempt to run a Python LDA module after 'pip install lda'. But there always occurs a weird bug: lda.py line 3 -- "no module named datasets". First, I thought the package of LDA are not installed co

2016-10-22 00:01:47 356

原创 MACAW (multiple access with collision avoidance fro Wireless)

Compared with MACA, the MACAW mainly optimizes the backoff algorithm and designs RTS-CTS-DS-DATA-ACK message exchange. backoff algorithm In MACA, the binary exponential backoff (EBE) algorithm is

2016-10-20 22:53:09 1691

原创 MACA (Multiple Access with Collision Avoidance)

MACA (Multiple access with collision avoidance) is a slotted media access control protocol with collision avoidance for WLAN data transmission. The basic idea of MACA is that a node makes an announcem

2016-10-20 09:19:58 1472 1

原创 Hidden terminal and Exposed terminal

Exposed terminal[figure from https://en.wikipedia.org/wiki/Exposed_node_problem]S1 is transmitting packages to R1, S2 is prevented from sending packages to R2, because the carrier sense tells R2

2016-10-20 08:17:21 1959

wince 罗技pro5000摄像头驱动

wince pxa270开发板 罗技 Logitech quickcam pro5000摄像头驱动

2010-12-25

QQ聊天程序 Java

此程序简单明了,模拟QQ功能。Java语言编写。

2010-10-17

贪吃蛇小游戏,纯C语言编写

经典的贪吃蛇源代码,代码容易看懂,操作方便。C语言编写,是做课设和练习编写游戏的首选。希望大家评分。

2009-08-25

兔子过河C语言代码小游戏

一款很实用的C语言小游戏,自己编的,对于游戏入门会有很大的帮助。圆圈代表兔子,方块代表木板。兔子借助木板跳过河去。可选择游戏的难易程度,也有输入胜利者名称的功能。

2009-08-25

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除