笔记本电脑的操作系统是Win Xp + Ubuntu12.04, 由于XP实在有点老掉牙了,平时更青睐Ubuntu系统来处理各项工作事情。寒假回家的这几天笔记本电脑连接家里的wifi总是隔几分钟就掉线,重新连接wifi后又可以上网,但是再过几分钟又会掉线,开始以为是Ubuntu内核升级导致的,搜索网络上的解决办法,要重装网卡驱动,但是笔记本年岁已久,Linux网卡驱动已经找不到遂作罢,尝试更改无线网络频道,802.11bgn该为802.11bg模式,等等办法,问题依旧。今天偶然间发现,只有当使用openvpn连接远程服务器时才会出现掉线状况,怀疑是openvpn所导致,并且发现登录openvpn时出现 WARNING: potential route subnet conflict between local LAN and remote VPN 于是尝试更改了无线路由的LAN设置,将原来的LAN IP/掩码改为 110.168.1.0/255.0.0.0 发现使用的openvpn时笔记本wifi掉线的问题消失了!问题应该就是由于本地路由器LAN的IP地址与远程VPN网络IP冲突导致网络掉线。
The internet in China is definitely in its developing stage. I have wasted so much time waiting to get one email out at a time... All these will pass in two days, not that the internet will be developed by then, but I will be out of here for a while.
Accessing MySQL through R Connecting to MySQL is made very easy with the RMySQL package. To connect to a MySQL database simply install the package and load the library. install.packages("RMySQL") library(RMySQL) Connecting to MySQL: Once the RMySQL library is installed create a database connection object. mydb = dbConnect(MySQL(), user='user', password='password', dbname='database_name', host='host') Listing Tables and Fields: Now that a connection has been made we list the tables and fields in the database we connected to. dbListTables(mydb) This will return a list of the tables in our connection. dbListFields(mydb, 'some_table') This will return a list of the fields insome_table. Running Queries: Queries can be run using thedbSendQueryfunction. dbSendQuery(mydb, 'drop table if exists some_table, some_other_table') In my experience with this package any SQL query that will run on MySQL will run using this method. Making tables: We can create tables in the database using R dataframes. dbWriteTable(mydb, name='table_name', value=data.frame.name) Retrieving data from MySQL: To retrieve data from the database we need to save a results set object. rs = dbSendQuery(mydb, "select * from some_table") I believe that the results of this query remain on the MySQL server, to access the results in R we need to use thefetchfunction. data = fetch(rs, n=-1) This saves the results of the query as a data frame object. Thenin the function specifies the number of records to retrieve, usingn=-1retrieves all pending records. zz: http://playingwithr.blogspot.com/2011/05/accessing-mysql-through-r.html