`
qingshou117
  • 浏览: 46902 次
  • 性别: Icon_minigender_1
  • 来自: 杭州
社区版块
存档分类
最新评论
文章列表
  分享一个mapreduce程序,作用:将hdfs文件数据批量加载进redis内存数据库: 1.源代码:   /** * Program: * The program is used to batch load data to redis by Jedis. * History: * Created by Qingshou Chen on 15/11/13. */package com.asiainfo.bdcenter;import org.apache.hadoop.conf.Configuration;import org.apache.hadoop.conf.Conf ...
好的开发工具可以显著提高效率,这里推荐一款IntelliJ IDEA。 下载地址:https://www.jetbrains.com/idea/download/ 一般开发Community版就够用了。 下面用java写个简单的HelloWorld。 1.新建项目HelloWorld:  
Hadoop 伪分布式安装,可以在单节点上模拟分布式的各个进程,本地开发环境建议采用这种方式: #配置免密钥登陆   ssh-keygen -t dsa -P '' -f ~/.ssh/id_dsa cat ~/.ssh/id_dsa.pub>>~/.ssh/authorized_key    #创建目录 cd /Users/Administrator/hadoop mkdir tmp mkdir -p hdfs/name
  Hadoop的安装,hadoop有三种安装方式: 1)Standalone 单机模式,仅用于调试 2)Pseudo-Distributed 伪分布模式,单节点上同时启动NameNode、DataNode、ResourceManager、NodeManager、Secondary Namenode等进程,模拟分布式运行的各个节点。 3)Fully-Distributed 完全分布式模式,真正的hadoop集群,由各司其职的多个节点组成。  
(一)JDK的安装 hadoop是java语言写的,依赖jdk,所以要部署hadoop首先要安装jdk, 操作系统环境:     MAC下jdk的安装步骤如下: 1. 下载jdk 1.7(1.8) ,官网地址:http://www.oracle.com/technetwork/java/javase/downloads/index.html   我选的版本是
You can install various fonts in Ubuntu 9.04, 9.10, 10.04 and 10.10 following the next easy tutorials. If you want to install Microsoft Windows fonts, open your terminal (Applications/Accessories/Terminal) and enter:     sudo apt-get install ttf-mscorefonts-installer For Red Hat Liberation fonts u ...
When I type rails console, I get this error: [root@trebek2 readline]# /usr/local/bin/myapp/script/console Loading development environment. /usr/local/lib/ruby/1.8/irb/completion.rb:10:in `require': no such file to load -- readline (LoadError)         from /usr/local/lib/ruby/1.8/irb/completion.rb:10 ...
https://github.com/kares/simple_captcha rails plugin install git://github.com/kares/simple_captcha.git --这个版本已经支持rails3.x Installation ruby script/plugin install git://github.com/kares/simple_captcha.git Setup After installation, follow these simple steps to setup the plugin. The setup will dep ...
1,安装必要的LIB sudo apt-get install libmagick9-dev 在用户目录(比如root)下建立文件夹.fonts 把windwos的字体 windows/fonts下的文件拷到.fonts下 2,安装 ImageMagick tar xvfz ImageMagick.tar.gz cd ImageMagick-6.6.5-8/ ./configure --disable-static --with-modules --with ...
每次下载都很慢,备份下,有需要的朋友可以直接下载
开发工具用gedit 下载附件,里面的文件解压缩到root目录, 终端执行下面语句,或者执行SH(sh ./install.sh) #!/bin/sh killall gedit # Register rails-related mime types sudo cp rails.xml /usr/share/mime/packages sudo update-mime-database /usr/share/mime # Install syntaxt definitions for erb and yaml sudo cp erb.lang /usr/share/gtksourcevie ...

will_paginate

    博客分类:
  • ROR
#will_paginat 中文化 application_helper增加以下代码          def will_paginate(collection, options = {}) options.merge!({ :previous_label => t( 'previous'), :next_label => (t 'next') }) super(collection, options) end zh_CN #will_paginat 中文化   previous: '前一页'   next: '下一页'
rake db:create:all --建立test,development,product三个数据库 rake db:test:prepare --将development数据库表建到test数据库,这一步必须执行,不然执行rake test 会报表不存在错误。 ActiveRecord::StatementInvalid: Mysql::Error: Table 'depot_test.products' doesn't exist: DELETE FROM `products` rake test  --集成测试 rake test:units --单元测试 rake test:func ...
ubuntu10.10 ruby1.9.2 rails3.0 mysql 架设过程 文章分类:Ruby编程 sudo apt-get install build-essential sudo wget ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.2-p0.tar.bz2 sudo tar jxvf ruby-1.9.2-p0.tar.bz2 sudo cd ruby-1.9.2-p0 sudo ./configure -prefix=/usr/local/ruby  #指定安装路径 sudo make && make instal ...
今天解决实际问题找到一个很适合的方法,欣喜之余赶紧标记下。感谢作者帮了我大忙。 注:第一种方法是新标签页打开网页,第二种是当前标签页打开网页。 第二种:window.location.href=url;在IE不起作用,是IE的一个bug,使用时在后面加个语句window.event.returnValue = false;即可 --firefox会报window.event未定义错误,所以加个判断,最后写法如下: if(window.event)    window.event.returnValue = false; 第一种:window.open(url); 例如:直接在body元素里面 ...
Global site tag (gtag.js) - Google Analytics