Monday, July 3, 2017

How can I copy/paste files via RDP in Ubuntu?

https://github.com/FreeRDP/Remmina/issues/243 says that shares show up using Remmina when you also enable sound redirection. To recap, here is what you have to do:
  1. Create a Remmina RDP connection to the windows machine
  2. Choose a share folder
  3. In Advanced tab, change sound to local. Save it and connect
Then the shared folder appears in My computer in windows.
(If it does not appear, trying clicking Refresh).

4. Try restart Remmina if it doesn't work.

Crack Matlab 2016b in Ubuntu 16.04

http://www.linuxdiyf.com/linux/27432.html
http://www.linuxdiyf.com/linux/26858.html

挂载映像文件
在安装前,把所需文件都拷贝到了home目录,用完就删,反正硬盘有备份。那么使用下列命令挂先行载R2016b_glnxa64_dvd1.iso:
cd ~
mkdir matlab
sudo mount -t auto -o loop Linux/R2016b_glnxa64_dvd1.iso matlab/
 
安装Matlab
挂载iso之后,会发现文件系统多了一个盘,说明挂载成功,然后进行安装:
cd matlab/
sudo ./install
安装进行到82%的时候,会弹出一个提示框,说请插入dvd2,这时候我们需要重新开一个终端,把dvd2挂载到matlab文件夹中:
sudo mount -t auto -o loop Linux/R2016b_glnxa64_dvd2.iso matlab/
然后在对话框中点击OK,继续安装。完成安装后取消iso挂载:
umount matlab/

激活Matlab
安装完成后,可以在终端中输入matlab打开软件,如果失败,只能去安装位置打开:
cd /usr/local/MATLAB/R2016b/bin
./matlab
第一步,先载入激活文件license_standalone.lic:
第二步,把Crack文件夹中R2016b/Linux/R2016b/bin/glnxa64四个文件,复制到/usr/local/MATLAB/R2016b/bin/glnxa64目录下:

Friday, June 30, 2017

Bug summary when building caffe in Ubuntu 16.04

## pycaffe installation problems
# bug1
>>> import caffe
ImportError: /home/../anaconda2/lib/python2.7/site-packages/zmq/backend/cython/../../../../.././libstdc++.so.6: versionGLIBCXX_3.4.21' not found (required by ../python/caffe/_caffe.so)`
>>> quit()
# solution
$ conda install libgcc

# bug2
ImportError: No module named google.protobuf.internal
# solution
$ pip install protobuf
$ /home/username/anaconda2/bin/pip install protobuf

Thursday, June 29, 2017

Bug summary when building caffe in windows

Caffe installation bugs
Though following the official guidelines, there are also some problems related to different version of compilers or libraries.
The official guidelines are in
https://github.com/BVLC/caffe/tree/windows

I use the compiler vs2015 (MSVC=14), while the official one support vs2013, and ninja instead of cmake.

##
# bug 1
Error 'fatal error: pyconfig.h: No such file or directory'

# Solution
Add python path to system path

# bug 2
.\caffe/export.hpp(7): fatal error C1083: Cannot open include file: 'caffe/include_symbols.hpp'
# Solution
It seems the problem with vs2015. I didn't find the internal problem, but had a tricky solution. We may build with vs2013 first and then copy the include_symbols.hpp in the same path, finally the building will be successful.

Saturday, March 4, 2017

Presentation Phases

From http://englishplusplus.jcj.uj.edu.pl/presentation/phrases/

Part one – introduction

  1. Signaling the start
    OK, then, shall we start?
    OK, then, I’d like to begin.
    Let’s start ...
  2. Greeting
    Good morning/afternoon, ladies and gentlemen/everyone.
    Thank you for coming.
    I’m very happy that you’ve come here today.
  3. Self-introduction
    First of all, I’d like to introduce myself.
    My name is ...
    Let me start with just a few words about myself/my own background.
    I’m ................(name) from ...............(country/city).
    I’m from ...........(organisation).
    I work as a ..............(job) for ................(organisation).
    I study .........(subject) at ................(university). I’m in my third year.
    I represent ............/ I’m a representative of ...
  4. Introducing the subject
    Today, I’m going to talk about...
    I’d like to talk to you today about ...
    I’m going to present the recent .../inform you about .../describe ...
    The subject/focus/topic of my talk/presentation/speech is ...
  5. Stating the purpose
    We are here today to decide/learn about/discuss ...
    The aim/objective/purpose today is to update you on .../give you the background to ...
    In my presentation today I’ll be discussing .../I’m going to explain ...
    What I’d like to do today is to present ...
  6. Outline (main points/sequencing/length)
    I’ve divided my presentation into four parts/sections. They are ...
    My presentation will consist of ...
    Right, I’d like to begin with my first point.
    Firstly/First of all ....................I will ...
    Secondly/then/next ................I would like to ...
    Thirdly / and then we come to ...
    After that/later........................I’m going to talk about / look at ...
    Finally/lastly/last of all I’d like to analyze/discuss/look at/consider/explain/tell you about/ show you how/speak to you about ...
  7. Inviting questions
    I’d be glad to answer any questions at the end of my talk.
    If you have any questions, please feel free to interrupt.

Part two – main body

  1. Ordering
    1. reaching the end of one point
      Right, I’ve talked about/ mentioned...
      We’ve looked at ...
      That’s all I have to say about ...
      That covers ...
    2. moving on to the next point
      Now we come to ...
      That brings us to ...
      I’d like to move on/draw your attention to my next point.
      Let’s move on to ...
      Let’s look now at ...The next thing I’d like to talk about is ...
  2. Giving reasons
    The main explanation for this is ...
    There are two reasons/explanations for this. First,... Second,...
    This can be explained by two factors. Firstly, ... Secondly, ...
    This is due to ...
    One reason for this is ...
    Another reason is ...
  3. Developing the point
    Where does that take us?
    Let’s look at this in more detail.
    What does that mean for us?
  4. Giving examples
    A good example of this is ...
    To illustrate this point, ...
    To support what I’ve said ...
    I’d like to give you some examples ...
    for instance ...
    for example ...
    such as ...
    like...
  5. Referring to visuals
    Take/Have a...
    Let’s...
    I’d like you to look at this transparency/graph/table/pie chart/flow chart/bar chart/ diagram/chart
    I’d like to draw your attention to ...
    This shows/represents ...
    As you can see ...
    If you look at ...you can see from the transparency, etc. that ...
    Let me show you ...
    Could you look at your handouts ...
    The next slide/picture/graph shows ...
  6. Relating ideas
    1. showing consequence
      therefore ...
      so ...
      consequently ...
      because of this ...
      as a result ....
    2. comparing
      similarly ...
      in the same way ...
      one similarity/difference between ......... is that ...
    3. contrasting
      but ...
      however ...
      although ...
      nevertheless...
      even though ...
      despite / in spite (of the fact that) ...
      whereas/while...
      in contrast to ...
      by contrast with ...
      on the other hand...
    4. highlighting
      in particular ...
      especially ...
      • changing the word order, e.g.: ‘What was important was the final conclusion.’ (instead of: ‘The final conclusion was important.’)
      • repeating key words, e.g.: ‘We need to compare past achievements and present achievements.’ (instead of ‘We need to compare past and present achieve- ments.’)
    5. showing an additional argument
      moreover ...
      in addition to this ...
      not only ... but also
      furthermore...

Part three – ending

  1. Signaling the end
    That brings me to the end of my presentation.
    That completes my presentation.
    That covers all I want/wanted to say today.
    Before I stop/finish, let me just say ...
  2. Summarizing
    Let me just run over the key points again.
    I’ll briefly summarize the main issues.
    To sum up...
    Let’s recap, shall we?
    If I can just sum up the main points ...
    Finally, I’d like to go over/review ...
    Firstly, I talked about ......... Secondly, I discussed......Thirdly, I looked at ......
  3. Concluding
    In conclusion ...
    I’d like to conclude by saying ...
    As a conclusion, I’d like to ...
    I’d like to leave you with the following thought/idea.
  4. Closing
    Thank you for your attention / being so attentive/listening.
    It was pleasure talking to you ...
    I will be giving you handouts.
    You will find handouts at the entrance.
    There are copies on the table.
  5. Inviting questions
    Are there any questions?
    Have you got any questions?
  6. Asking questions
    Could I go back to the point you made about...?
    I was interested in your comment on ...
    You said that ...
    Could you say a little more about that?
    Could you clarify what you said about ...?
    I‘d like to ask about ...
    May I ask you a question?
    I’m interested in your opinion about ...
    Do you mind if I ask you...
    I’m interested to know ...
  7. Handling questions
    1. clarifying
      If I understand you correctly, you are saying/asking ...
      I didn’t quite catch that.
      Could you go over that again?
      I’m not sure what you’re getting at.
      Sorry, I’m not sure what you mean.
    2. playing for time
      That’s a good/interesting/difficult point/question/comment.
      I’m glad you raised that point.
    3. saying you don’t know
      I’m sorry I don’t have that information at this moment.
      I’m afraid I don’t know at the moment.
    4. avoiding giving answers
      Perhaps we could deal with that later.
      Can we talk about that on another occasion?
      I’m afraid that’s not my field.
      I don’t have the figures with me.
      I’m sure Mr/Ms ... could answer this question.
      I’ll get back to you if time permits.
    5. checking if the questioner is satisfied
      Does that answer your question?
      Is that clear?
      Can we go on?
    6. concluding the questions
      Right, if nobody wants to ask anything else, I think we can finish here.
      Right, if there are no more questions ...
      Thank you.

Thursday, January 5, 2017

Upgrade node via npm

Original post http://tecadmin.net/upgrade-nodejs-via-npm/#
I tested on Cent OS 7
  • rent NodeJs Version – First check current nodejs version on your system using following command. In my case it is v0.10.37.
    rahul@tecadmin:~$ node -v 
    
    v0.10.37
    
  • Clean Cache Forcefully – Now clean all npm cache from your system forcefully.
    rahul@tecadmin:~$ sudo npm cache clean -f 
    
    npm WARN using --force I sure hope you know what you are doing.
    
  • Install n Module – After cleaning all cache from your system, now install n modules using npm command.
    rahul@tecadmin:~$ sudo npm install -g n 
    
    /usr/local/bin/n -> /usr/local/lib/node_modules/n/bin/n
    n@2.0.2 /usr/local/lib/node_modules/n
    
  • Install Nodejs – Let’s install or update latest nodejs version on your system using n module.
    rahul@tecadmin:~$ sudo n stable 
    
    
  • Setup Binary Link – Now link your node binary with latest nodejs installed binary file using following command.
    rahul@tecadmin:~$ sudo ln -sf /usr/local/n/versions/node/$${version}(e.g. 7.4.0)/bin/node /usr/bin/node  
    
  • Check Nodejs Version – Finally recheck your nodejs version. You will find that it showing latest version on your system.
    rahul@tecadmin:~$ node -v 

Thursday, September 22, 2016

Linux (CentOS) cannot connect to the Internet

The original post is from
http://ahhafree.blogspot.hk/2013/08/linux-mint-ubuntu.html
I just adjusted it to CentOS, only wired connection is tested.

1.先變身為 root -- 在 debian 系列 (例如 ubuntu) 的版本裡, sudo bash 然後打自己的密碼
2.Linux 有沒有抓到網卡?
  (1)按 Ctrl-Alt-T 開啟終端機,輸入 ifconfig -a 如果只出現 lo 一項, 就是沒偵測到網卡。正常應該至少偵測到 lo, eth0 (有線網卡)……
In centos system "enp3s0"

  (2) 如果沒有偵測到硬體, 就無法往下做了 -- 這時請用您的 linux 版本名稱及網卡晶片名稱上網搜尋。(原來可上網,當然這部分沒問題)
3.如果有偵測到網卡, 但網路卻不通, 請下 route -n 應該要看到至少兩列數字, 類似這樣:
    Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
    192.168.3.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0
       0.0.0.0         192.168.3.254   0.0.0.0         UG    0      0        0 eth0
  (1)如果有, 表示網路其實已正常連線; 可能只是沒設定 DNS。 請跳到下一節 「設定 DNS」。
  (2)如果沒有出現上方的兩列數字, 那麼請按照您的連線環境, 挑一個方法設定連線:
      ( 結果沒有出現兩列數字)
4.有線網卡, 自動取得 ip---因為租屋的網路,所以挑這個
若您的網路環境是自動取得 ip, 請下 dhclient 網卡名稱
有些版本的指令是 dhcpd 而不是 dhclient; 總之先按 dhc 然後按一兩次 Tab 鍵, 系統會提示。
 (結果出現了 dhclient)
5.在 dhclient 後輸入 eth0 ,按 [Enter]果然網路就通了 ☺
Centos: $ sudo dhclient enp3s0

dhclient is used to get an IP address from a DHCP server.

6. If still not work
Or come out the output:
dhclient is already runing -exiting

# ifdown enp3s0
# ifup enp3s0
### RHEL/CentOS/Fedora specific command ###
# /etc/init.d/network restart

★若您有網路問題,可連結到[網路基本指令(洪朝貴教授的網頁)]查看,加以解決。本文即轉貼自此網頁。
==========
2015補充:
Ⓞ搬新家後,設定了新的光纖網路,結果筆電剛開始有線可以上網,無線都不能;過幾天連有線也不能上網了^^|||。要去設定,發現都無法設定,只好到網路上搜尋解決方法如下:

一、無線網路:
1.如上述檢查網路卡情況
2.用root權限打開 etc/network/interfaces
3.將其他各列都以#註記,只留下以下兩行:
auto lo
iface lo inet loopback