Posts

  • Install Win10 from USB on Thinkpad-8

  • UEFI system cannot boot from an NTFS formatted USB stick. We need to format it using FAT32. Used a new USB disk creation program (https://rufus.akeo.ie) and set it to FAT32 for UEFI and finnaly the tablet booted to the setup. The Windows 10 was formatting the sticks to NTFS. More infomation about Clean Install of Windows 10 on ThinkPad. Read more
  • Calc Eigenvalues and Eigenvectors of Matrix via Matlab or Python

  • Matlab code % Calc eigenvalues and eigenvectors of Hamiltonian syms Omega1 Omega2 H = zeros(4,'sym'); H(2,3) = Omega1; H(3,2) = Omega1; H(3,4) = Omega2; H(4,3) = Omega2; [V,D] = eig(H); disp(D); disp(V); Python code # coding: utf-8 import sympy as sp Omega1 = sp.symbols('Omega1') Omega2 = sp.symbols('Omega2') M = sp.zeros(4,4) M[1,2] = Omega1 M[2,1] = Omega1 M[2,3] = Omega2 M[3,2] = Omega2 print(M.eigenvals()) print(M.eigenvects()) Read more
  • Judge whether an integer is odd or not

  • # coding: utf-8 ''' file: test.py create on Tue Mar 26 8:00 2019 @author: Xiao Shang email: me@ishxiao.com note: Judge whether an integer is odd or not ''' # ver 0.1 def isOdd_1(i): if(i%2 == 1): return True else: return False # ver 0.2 def isOdd_2(i): return i%2 == 1 # ver 0.3 def isOdd_3(i): return i%2 == 1 or i%2 == -1 # ver 0.4 def isOdd_4(i): return i%2 != 0 # ver 0.5 def isOdd_5(i): return i>>1 << 1 != i # ver 0.6 def isOdd_6(i): return i&1 != 0
  • How to install package in Pythonista

  • 首先,启动Pythonista,然后左滑屏幕,调出console窗口,在底部>处输入 import requests as r; exec(r.get('https://raw.githubusercontent.com/ywangd/stash/master/getstash.py').text) 然后,点击屏幕左上角的,选择“This iPad”,运行“launch_stash.py”,即打开命令窗口,在此窗口中可运行“pip install 库名”等命令 Read more
  • Java基础知识

  • 1. 面向对象和面向过程的区别 面向过程 面向对象 2. Java 语言有哪些特点 3. 关于 JVM JDK 和 JRE 最详细通俗的解答 JVM JDK 和 JRE 4. Oracle JDK 和 OpenJDK 的对比 5. Java和C++的区别 6. 什么是 Java 程序的主类 应用程序和小程序的主类有何不同 7. Java 应用程序与小程序之间有那些差别 8. 字符型常量和字符串常量的区别 9. 构造器 Constructor 是否可被 override 10. 重载和重写的区别 11. Java 面向对象编程三大特性: 封装 继承 多态 封装 继承 多态 12. String StringBuffer 和 StringBuilder 的区别是什么 String 为什么是不可变的 13. 自动装箱与拆箱 14. 在一个静态方法内调用一个非静态成员为什么是非法的 15.... Read more