How to use log4net in c# console application

  • First , add local log4net.dll to reference
  • In project—>Properties—>AssemblyInfo.cs , add this line

  • change App.config to :

  • in Program.cs , use log4net like this :

build thrift-0.11.0 from source on ubuntu 17

  •  On office 190 ubuntu machine  124.82.4.190 ,  9900

wget  http://mirror.bit.edu.cn/apache/thrift/0.11.0/thrift-0.11.0.tar.gz

  • tar xvzf thrift-0.11.0.tar.gz
  • install pre – requirements modules  , because 190 is ubantu machine , so following these steps

https://thrift.apache.org/docs/install/debian

  • CSharp additonal need following modules :    mono-gmcs mono-devel libmono-system-web2.0-cil nunit nunit-console

Now will install them one by one

 

a)  install mono complete by  https://gist.github.com/carolynvs/4520736f6017ca252a44

only exec first 5 steps

b) install nunit by this command :  sudo apt-get install nunit nunit-console

from  https://zxtech.wordpress.com/2015/01/05/install-nunit-on-ubuntu/

Now all the pre-requirement are installed .


  • Build 

From https://thrift.apache.org/docs/BuildingFromSource

goto /home/liuyang/thrift-0.11.0/

run command one by one :

 

    • Make a test c# project

  A cSharp project which use thrift should add reference to “Thrift.dll”

goto folder :   /home/liuyang/thrift-0.11.0/tutorial

run command :  rm -r csharp    ,   delete  existing csharp folder

then run command :   thrift -r –gen csharp tutorial.thrift

there will be a new folder named  “gen-csharp” ,  and here is the file will be used as server and client ,But no .sln file .  

Thrift will gen both server and client side code  , Now try to make a server side project ,  it need these files :

then change server side ‘s Program.cs to

 

For client side , need same cs files with server ,  only it ‘s Program.cs file content is :

 


Q&A

  • If anyone can call the remote procedure , No any permission limit ?  or any anthentication ?
  • How server know how many client connect to it ?

Thrift script analyze

 

 

short statement

ripe for a correction  —  接近调整, 接近修正

on behalf of   —-  代表 ;   on behalf of the American people

side note :  旁注

feel apart — 土崩瓦解

 

 

My VPS asterisk settings

  • source path :  /usr/src/asterisk-certified-13.18-cert3
  • /etc/init.d/asterisk status

/etc/init.d/asterisk restart

/etc/init.d/asterisk stop

 

 

Personal skill

Skill which can make money
  • mobile app
android app develop
  • web front back
css
jquery
php
  • desktop app
window 32 , 64
java
qt
  • network server client
  • VOIP
ss7
diameter
camel
PSTN
asterisk
  • Hack teck
  • anti asm
  • linux
centos
ubantu
  • database
mysql
sql server
  • OPENGL & OSG

 

 

    • Python

a)   DTW argorithms to 比较曲线相似性

b)  c++ 调用python 模块和函数

c)

  • CTP 系统
company tel :  58950862

centos 6 install vsftpd

  • install

  • change config

 

change following items to  :

 

 

 

  • after config , restart service

 

  • now try to login from remote machine

when type : ftp://IP  in chrome and fill user name and password of user root , got a mistake :  vsftpd your connection to this site is not private 

If type  : ftp://IP  in command line and input user name and password of user root , will get a 503 incorrect login fail .

 

  • check listening port

  • check iptables