row.names(x)row.names(x) <- value rownames(x, do.NULL = TRUE, prefix = "row") rownames(x) <- value colnames(x, do.NULL = TRUE, prefix = "col") colnames(x) <- value ####################################results <- data.frame(m…
stringsAsFactors=F   以前在r里读数据,经常把character读成factor,还得费半天劲把它转回来,尤其是把factor转成numeric还没有那么直接.例如: dat<-read.csv("D:/chengjun/digg/digg_votes_threshold_ForOnStageTimeAnalysis.csv",                header=T, stringsAsFactors = F)     存数据时,经常多出一列id,很…
今天下午,我们的一个开发来找我,说线上有个环境报了"Warning(1265)Data truncated for column 'column_name' at row 1",定义的字段长度decimal(32,4),实际的小数点有超过4位的,但是大部分的账户登录查询的时候都没有问题,已知的就一个账户进行查询的时候会出现这个问题,看数据没有什么特别异常的. 于是,过去协助排查,临时拷贝了个存储过程,还真蹊跷,查询其他数据都没有问题,但是一到这一条记录就报错,在update报错的语句前…
本文转自:http://www.xinotes.org/notes/note/1087/ <!DOCTYPE html><html><head> <title>jQuery Table</title> <style type="text/css"> body { font-family: sans-serif; } table { border-collapse: collapse; margin-bottom:…
mainAxisSize: MainAxisSize.min…
In NetSuite SuiteScript, We usually do/implement export data to CSV, that's straight forward: Collect 'encoded' string to Array for column, join them with comma ',' to be a string. Collect each line's data same as column to push to the Array. Join al…
seq(from = 1, to = 1, by = ((to - from)/(length.out - 1)),     length.out = NULL, along.with = NULL, ...) 举例----------Examples---------- seq(0, 1, length.out=11) seq(stats::rnorm(20)) #  seq(1, 9, by = 2)     #  seq(1, 9, by = pi)    #  seq(1, 6, by…
data.frame 动态确定列名称 var <- "mpg" #Doesn't work mtcars$var #These both work, but note that what they return is different # the first is a vector, the second is a data.frame mtcars[[var]] mtcars[var] data.frame 列命名 Use the colnames() function: R…
引第三方的phpexcel类库放到 ThinkPHP\Library\Vendor\demo下,自己建的文件夹demo 再将Excel.class放到ThinkPHP\Library\Org\class下,自己建的文件夹class 控制器: <?php namespace Admin\Controller; use Think\Controller; class ExcelController extends Controller { public function excelList(){ $…
use app\models\execl; use \PHPExcel; /*execl导入数据*/ public function Execlupload(){ if(Yii::$app->request->isPost){ $tmp_file = $_FILES ['execl'] ['tmp_name']; $file_types = explode ( ".", $_FILES ['execl'] ['name'] ); $file_type = $file_typ…