开发环境:

hadoop: hadoop-1.1.2

hbase: hbase-0.94.11-security

eclipse:Juno Service Release 2

配置Eclipse

通过 Eclipse 创建一个新 Java 工程,右击项目根目录,选择“Properties> Java Build Path> Library>  Add  External  JARs”,将 HBase 安装文件解压后根目录下的hbase-0.94.11-security.jar、hbase-0.94.11-security-tests.jar 和 lib 子目录下所有的 jar 包添加到本工程的 Build Path下。

示例一:输出表“users”的列族名称

import java.io.IOException;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.hbase.HBaseConfiguration;
import org.apache.hadoop.hbase.HColumnDescriptor;
import org.apache.hadoop.hbase.HTableDescriptor;
import org.apache.hadoop.hbase.client.HBaseAdmin;
import org.apache.hadoop.hbase.util.Bytes; public class ExampleClient {
public static void main(String[] args) throws IOException { Configuration conf = HBaseConfiguration.create();
conf.set("hbase.zookeeper.quorum", "master");
conf.set("hbase.zookeeper.property.clientPort", "2181");
HBaseAdmin admin = new HBaseAdmin(conf);
HTableDescriptor tableDescriptor = admin.getTableDescriptor(Bytes.toBytes("users"));
byte[] name = tableDescriptor.getName();
System.out.println("result:"); System.out.println("table name: "+ new String(name));
HColumnDescriptor[] columnFamilies = tableDescriptor
.getColumnFamilies();
for(HColumnDescriptor d : columnFamilies){
System.out.println("column Families: "+ d.getNameAsString());
}
}
}

结果:

2013-09-09 15:58:51,890 WARN  conf.Configuration (Configuration.java:<clinit>(195)) - DEPRECATED: hadoop-site.xml found in the classpath. Usage of hadoop-site.xml is deprecated. Instead use core-site.xml, mapred-site.xml and hdfs-site.xml to override properties of core-default.xml, mapred-default.xml and hdfs-default.xml respectively
2013-09-09 15:58:55,031 INFO zookeeper.ZooKeeper (Environment.java:logEnv(100)) - Client environment:zookeeper.version=3.4.5-1392090, built on 09/30/2012 17:52 GMT
2013-09-09 15:58:55,031 INFO zookeeper.ZooKeeper (Environment.java:logEnv(100)) - Client environment:host.name=w253245.ppp.asahi-net.or.jp
2013-09-09 15:58:55,031 INFO zookeeper.ZooKeeper (Environment.java:logEnv(100)) - Client environment:java.version=1.6.0_10-rc2
2013-09-09 15:58:55,031 INFO zookeeper.ZooKeeper (Environment.java:logEnv(100)) - Client environment:java.vendor=Sun Microsystems Inc.
2013-09-09 15:58:55,031 INFO zookeeper.ZooKeeper (Environment.java:logEnv(100)) - Client environment:java.home=C:\Java\jre6
2013-09-09 15:58:55,031 INFO zookeeper.ZooKeeper (Environment.java:logEnv(100)) - Client environment:java.class.path=D:\workspace\Eclipse-jee\Hadoop_APPs_U_tht\bin;D:\workspace\Eclipse-jee\hadoop-1.1.2\build\eclipse\classes-main;D:\workspace\Eclipse-jee\hadoop-1.1.2\build\eclipse\classes-test;D:\workspace\Eclipse-jee\hadoop-1.1.2\build\eclipse\classes-test-generated;D:\workspace\Eclipse-jee\hadoop-1.1.2\build\eclipse\classes-tools;D:\workspace\Eclipse-jee\hadoop-1.1.2\build\eclipse\classes-example;C:\apache-ant-1.9.2\lib\ant.jar;D:\workspace\Eclipse-jee\hadoop-1.1.2\lib\asm-3.2.jar;D:\workspace\Eclipse-jee\hadoop-1.1.2\lib\aspectjrt-1.6.11.jar;D:\workspace\Eclipse-jee\hadoop-1.1.2\lib\aspectjtools-1.6.11.jar;D:\workspace\Eclipse-jee\hadoop-1.1.2\lib\commons-beanutils-1.7.0.jar;D:\workspace\Eclipse-jee\hadoop-1.1.2\lib\commons-beanutils-core-1.8.0.jar;D:\workspace\Eclipse-jee\hadoop-1.1.2\lib\commons-cli-1.2.jar;D:\workspace\Eclipse-jee\hadoop-1.1.2\lib\commons-codec-1.4.jar;D:\workspace\Eclipse-jee\hadoop-1.1.2\lib\commons-collections-3.2.1.jar;D:\workspace\Eclipse-jee\hadoop-1.1.2\lib\commons-configuration-1.6.jar;D:\workspace\Eclipse-jee\hadoop-1.1.2\lib\commons-daemon-1.0.1.jar;D:\workspace\Eclipse-jee\hadoop-1.1.2\lib\commons-digester-1.8.jar;D:\workspace\Eclipse-jee\hadoop-1.1.2\lib\commons-el-1.0.jar;D:\workspace\Eclipse-jee\hadoop-1.1.2\lib\commons-httpclient-3.0.1.jar;D:\workspace\Eclipse-jee\hadoop-1.1.2\lib\commons-io-2.1.jar;D:\workspace\Eclipse-jee\hadoop-1.1.2\lib\commons-lang-2.4.jar;D:\workspace\Eclipse-jee\hadoop-1.1.2\lib\commons-logging-1.1.1.jar;D:\workspace\Eclipse-jee\hadoop-1.1.2\lib\commons-logging-api-1.0.4.jar;D:\workspace\Eclipse-jee\hadoop-1.1.2\lib\commons-math-2.1.jar;D:\workspace\Eclipse-jee\hadoop-1.1.2\lib\commons-net-3.1.jar;D:\workspace\Eclipse-jee\hadoop-1.1.2\lib\core-3.1.1.jar;D:\workspace\Eclipse-jee\hadoop-1.1.2\lib\hadoop-capacity-scheduler-1.1.2.jar;D:\workspace\Eclipse-jee\hadoop-1.1.2\lib\hadoop-fairscheduler-1.1.2.jar;D:\workspace\Eclipse-jee\hadoop-1.1.2\lib\hadoop-thriftfs-1.1.2.jar;D:\workspace\Eclipse-jee\hadoop-1.1.2\lib\hsqldb-1.8.0.10.jar;D:\workspace\Eclipse-jee\hadoop-1.1.2\lib\jackson-core-asl-1.8.8.jar;D:\workspace\Eclipse-jee\hadoop-1.1.2\lib\jackson-mapper-asl-1.8.8.jar;D:\workspace\Eclipse-jee\hadoop-1.1.2\lib\jasper-compiler-5.5.12.jar;D:\workspace\Eclipse-jee\hadoop-1.1.2\lib\jasper-runtime-5.5.12.jar;D:\workspace\Eclipse-jee\hadoop-1.1.2\lib\jdeb-0.8.jar;D:\workspace\Eclipse-jee\hadoop-1.1.2\lib\jersey-core-1.8.jar;D:\workspace\Eclipse-jee\hadoop-1.1.2\lib\jersey-json-1.8.jar;D:\workspace\Eclipse-jee\hadoop-1.1.2\lib\jersey-server-1.8.jar;D:\workspace\Eclipse-jee\hadoop-1.1.2\lib\jets3t-0.6.1.jar;D:\workspace\Eclipse-jee\hadoop-1.1.2\lib\jetty-6.1.26.jar;D:\workspace\Eclipse-jee\hadoop-1.1.2\lib\jetty-util-6.1.26.jar;D:\workspace\Eclipse-jee\hadoop-1.1.2\lib\jsch-0.1.42.jar;D:\workspace\Eclipse-jee\hadoop-1.1.2\lib\jsp-2.1\jsp-2.1.jar;D:\workspace\Eclipse-jee\hadoop-1.1.2\lib\jsp-2.1\jsp-api-2.1.jar;D:\workspace\Eclipse-jee\hadoop-1.1.2\lib\junit-4.5.jar;D:\workspace\Eclipse-jee\hadoop-1.1.2\lib\kfs-0.2.2.jar;D:\workspace\Eclipse-jee\hadoop-1.1.2\lib\log4j-1.2.15.jar;D:\workspace\Eclipse-jee\hadoop-1.1.2\lib\mockito-all-1.8.5.jar;D:\workspace\Eclipse-jee\hadoop-1.1.2\lib\oro-2.0.8.jar;D:\workspace\Eclipse-jee\hadoop-1.1.2\lib\servlet-api-2.5-20081211.jar;D:\workspace\Eclipse-jee\hadoop-1.1.2\lib\slf4j-api-1.4.3.jar;D:\workspace\Eclipse-jee\hadoop-1.1.2\lib\slf4j-log4j12-1.4.3.jar;D:\workspace\Eclipse-jee\hadoop-1.1.2\lib\xmlenc-0.52.jar;D:\workspace\Eclipse-jee\hadoop-1.1.2\src\test\lib\ftplet-api-1.0.0-SNAPSHOT.jar;D:\workspace\Eclipse-jee\hadoop-1.1.2\src\test\lib\ftpserver-core-1.0.0-SNAPSHOT.jar;D:\workspace\Eclipse-jee\hadoop-1.1.2\src\test\lib\ftpserver-server-1.0.0-SNAPSHOT.jar;D:\workspace\Eclipse-jee\hadoop-1.1.2\src\test\lib\mina-core-2.0.0-M2-20080407.124109-12.jar;D:\workspace\Eclipse-jee\hadoop-1.1.2\conf;D:\workspace\Eclipse-jee\hadoop-1.1.2\build\eclipse\test-resources;D:\workspace\Eclipse-jee\Hadoop_APPs_U_tht\build\activation-1.1.jar;D:\workspace\Eclipse-jee\Hadoop_APPs_U_tht\build\asm-3.1.jar;D:\workspace\Eclipse-jee\Hadoop_APPs_U_tht\build\avro-1.5.3.jar;D:\workspace\Eclipse-jee\Hadoop_APPs_U_tht\build\avro-1.7.4.jar;D:\workspace\Eclipse-jee\Hadoop_APPs_U_tht\build\avro-ipc-1.5.3.jar;D:\workspace\Eclipse-jee\Hadoop_APPs_U_tht\build\commons-beanutils-1.7.0.jar;D:\workspace\Eclipse-jee\Hadoop_APPs_U_tht\build\commons-beanutils-core-1.8.0.jar;D:\workspace\Eclipse-jee\Hadoop_APPs_U_tht\build\commons-cli-1.2.jar;D:\workspace\Eclipse-jee\Hadoop_APPs_U_tht\build\commons-codec-1.4.jar;D:\workspace\Eclipse-jee\Hadoop_APPs_U_tht\build\commons-collections-3.2.1.jar;D:\workspace\Eclipse-jee\Hadoop_APPs_U_tht\build\commons-configuration-1.6.jar;D:\workspace\Eclipse-jee\Hadoop_APPs_U_tht\build\commons-digester-1.8.jar;D:\workspace\Eclipse-jee\Hadoop_APPs_U_tht\build\commons-el-1.0.jar;D:\workspace\Eclipse-jee\Hadoop_APPs_U_tht\build\commons-httpclient-3.1.jar;D:\workspace\Eclipse-jee\Hadoop_APPs_U_tht\build\commons-io-2.1.jar;D:\workspace\Eclipse-jee\Hadoop_APPs_U_tht\build\commons-lang-2.5.jar;D:\workspace\Eclipse-jee\Hadoop_APPs_U_tht\build\commons-logging-1.1.1.jar;D:\workspace\Eclipse-jee\Hadoop_APPs_U_tht\build\commons-math-2.1.jar;D:\workspace\Eclipse-jee\Hadoop_APPs_U_tht\build\commons-net-1.4.1.jar;D:\workspace\Eclipse-jee\Hadoop_APPs_U_tht\build\core-3.1.1.jar;D:\workspace\Eclipse-jee\Hadoop_APPs_U_tht\build\guava-11.0.2.jar;D:\workspace\Eclipse-jee\Hadoop_APPs_U_tht\build\hadoop-common-0.23.9-javadoc.jar;D:\workspace\Eclipse-jee\Hadoop_APPs_U_tht\build\hamcrest-all-1.3.jar;D:\workspace\Eclipse-jee\Hadoop_APPs_U_tht\build\hamcrest-core-1.3.jar;D:\workspace\Eclipse-jee\Hadoop_APPs_U_tht\build\hbase-0.94.11-security.jar;D:\workspace\Eclipse-jee\Hadoop_APPs_U_tht\build\hbase-0.94.11-security-tests.jar;D:\workspace\Eclipse-jee\Hadoop_APPs_U_tht\build\high-scale-lib-1.1.1.jar;D:\workspace\Eclipse-jee\Hadoop_APPs_U_tht\build\httpclient-4.1.2.jar;D:\workspace\Eclipse-jee\Hadoop_APPs_U_tht\build\httpcore-4.1.3.jar;D:\workspace\Eclipse-jee\Hadoop_APPs_U_tht\build\jackson-core-asl-1.8.8.jar;D:\workspace\Eclipse-jee\Hadoop_APPs_U_tht\build\jackson-jaxrs-1.8.8.jar;D:\workspace\Eclipse-jee\Hadoop_APPs_U_tht\build\jackson-mapper-asl-1.8.8.jar;D:\workspace\Eclipse-jee\Hadoop_APPs_U_tht\build\jackson-xc-1.8.8.jar;D:\workspace\Eclipse-jee\Hadoop_APPs_U_tht\build\jamon-runtime-2.3.1.jar;D:\workspace\Eclipse-jee\Hadoop_APPs_U_tht\build\jasper-compiler-5.5.23.jar;D:\workspace\Eclipse-jee\Hadoop_APPs_U_tht\build\jasper-runtime-5.5.23.jar;D:\workspace\Eclipse-jee\Hadoop_APPs_U_tht\build\jaxb-api-2.1.jar;D:\workspace\Eclipse-jee\Hadoop_APPs_U_tht\build\jaxb-impl-2.2.3-1.jar;D:\workspace\Eclipse-jee\Hadoop_APPs_U_tht\build\jersey-core-1.8.jar;D:\workspace\Eclipse-jee\Hadoop_APPs_U_tht\build\jersey-json-1.8.jar;D:\workspace\Eclipse-jee\Hadoop_APPs_U_tht\build\jersey-server-1.8.jar;D:\workspace\Eclipse-jee\Hadoop_APPs_U_tht\build\jettison-1.1.jar;D:\workspace\Eclipse-jee\Hadoop_APPs_U_tht\build\jetty-6.1.26.jar;D:\workspace\Eclipse-jee\Hadoop_APPs_U_tht\build\jetty-util-6.1.26.jar;D:\workspace\Eclipse-jee\Hadoop_APPs_U_tht\build\jruby-complete-1.6.5.jar;D:\workspace\Eclipse-jee\Hadoop_APPs_U_tht\build\jsp-2.1-6.1.14.jar;D:\workspace\Eclipse-jee\Hadoop_APPs_U_tht\build\jsp-api-2.1-6.1.14.jar;D:\workspace\Eclipse-jee\Hadoop_APPs_U_tht\build\jsr305-1.3.9.jar;D:\workspace\Eclipse-jee\Hadoop_APPs_U_tht\build\junit-4.10-HBASE-1.jar;D:\workspace\Eclipse-jee\Hadoop_APPs_U_tht\build\libthrift-0.8.0.jar;D:\workspace\Eclipse-jee\Hadoop_APPs_U_tht\build\log4j-1.2.16.jar;D:\workspace\Eclipse-jee\Hadoop_APPs_U_tht\build\metrics-core-2.1.2.jar;D:\workspace\Eclipse-jee\Hadoop_APPs_U_tht\build\mrunit-1.0.0-hadoop2.jar;D:\workspace\Eclipse-jee\Hadoop_APPs_U_tht\build\mrunit-1.0.0-javadoc.jar;D:\workspace\Eclipse-jee\Hadoop_APPs_U_tht\build\netty-3.2.4.Final.jar;D:\workspace\Eclipse-jee\Hadoop_APPs_U_tht\build\protobuf-java-2.4.0a.jar;D:\workspace\Eclipse-jee\Hadoop_APPs_U_tht\build\servlet-api-2.5-6.1.14.jar;D:\workspace\Eclipse-jee\Hadoop_APPs_U_tht\build\slf4j-api-1.4.3.jar;D:\workspace\Eclipse-jee\Hadoop_APPs_U_tht\build\slf4j-log4j12-1.4.3.jar;D:\workspace\Eclipse-jee\Hadoop_APPs_U_tht\build\snappy-java-1.0.3.2.jar;D:\workspace\Eclipse-jee\Hadoop_APPs_U_tht\build\stax-api-1.0.1.jar;D:\workspace\Eclipse-jee\Hadoop_APPs_U_tht\build\velocity-1.7.jar;D:\workspace\Eclipse-jee\Hadoop_APPs_U_tht\build\xmlenc-0.52.jar;D:\workspace\Eclipse-jee\Hadoop_APPs_U_tht\build\zookeeper-3.4.5.jar
2013-09-09 15:58:55,031 INFO zookeeper.ZooKeeper (Environment.java:logEnv(100)) - Client environment:java.library.path=D:\workspace\Eclipse-jee\hadoop-1.1.21\lib\native;D:\workspace\Eclipse-jee\hadoop-1.1.21\lib\native
2013-09-09 15:58:55,031 INFO zookeeper.ZooKeeper (Environment.java:logEnv(100)) - Client environment:java.io.tmpdir=C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\
2013-09-09 15:58:55,031 INFO zookeeper.ZooKeeper (Environment.java:logEnv(100)) - Client environment:java.compiler=<NA>
2013-09-09 15:58:55,031 INFO zookeeper.ZooKeeper (Environment.java:logEnv(100)) - Client environment:os.name=Windows XP
2013-09-09 15:58:55,031 INFO zookeeper.ZooKeeper (Environment.java:logEnv(100)) - Client environment:os.arch=x86
2013-09-09 15:58:55,031 INFO zookeeper.ZooKeeper (Environment.java:logEnv(100)) - Client environment:os.version=5.1
2013-09-09 15:58:55,031 INFO zookeeper.ZooKeeper (Environment.java:logEnv(100)) - Client environment:user.name=hadoop
2013-09-09 15:58:55,031 INFO zookeeper.ZooKeeper (Environment.java:logEnv(100)) - Client environment:user.home=C:\Documents and Settings\Administrator
2013-09-09 15:58:55,031 INFO zookeeper.ZooKeeper (Environment.java:logEnv(100)) - Client environment:user.dir=D:\workspace\Eclipse-jee\Hadoop_APPs_U_tht
2013-09-09 15:58:55,031 INFO zookeeper.ZooKeeper (ZooKeeper.java:<init>(438)) - Initiating client connection, connectString=master:2181 sessionTimeout=180000 watcher=hconnection
2013-09-09 15:58:56,171 INFO zookeeper.RecoverableZooKeeper (RecoverableZooKeeper.java:<init>(104)) - The identifier of this process is 6032@tht
2013-09-09 15:58:56,234 INFO zookeeper.ClientCnxn (ClientCnxn.java:logStartConnect(966)) - Opening socket connection to server master/121.1.253.251:2181. Will not attempt to authenticate using SASL (无法定位登录配置)
2013-09-09 15:58:56,296 INFO zookeeper.ClientCnxn (ClientCnxn.java:primeConnection(849)) - Socket connection established to master/121.1.253.251:2181, initiating session
2013-09-09 15:58:56,484 INFO zookeeper.ClientCnxn (ClientCnxn.java:onConnected(1207)) - Session establishment complete on server master/121.1.253.251:2181, sessionid = 0x141011ad7db000e, negotiated timeout = 180000
result:
table name: users
column Families: address
column Families: info
column Families: user_id

hbase:应用开发的更多相关文章

  1. HBase应用开发回顾与总结系列之四:HBase配置管理类接口设计

      利用Eclipse进行HBase应用开发时,至少需要确定三个配置信息,如下表所示: #hbase config #HMaster服务部署主机及端口号 hbase.master=hdp-wuyong ...

  2. HBase应用开发回顾与总结系列之一:概述HBase设计规范

      概述 笔者本人接触研究HBase也有半年之久了,虽说不上深入和系统,但至少算是比较沉迷.作为部门里大数据技术的探路者,笔者还要承担起技术传播的职责,所以在摸索研究的过程中总是不断地进行总结和测试, ...

  3. FusionInsight大数据开发--HBase应用开发

    HBase应用开发 HBase的定义 HBase是一个高可靠.高性能.面向列.可伸缩的分布式存储系统. 适合于存储大表数据,可以达到实时级别. 利用Hadoop HDFS 作为其文件存储系统,提供实时 ...

  4. HBase应用开发回顾与总结系列之三:RowKey行键生成器工具

      所谓RowKey行键生成器,是指通过软件工具制定行键生成策略,并可将策略信息保存成本地策略文件,待需要时再将本地策略文件序列化成行键生成策略对象,传入数据行信息后可自动生成RowKey行键. 那么 ...

  5. HBase应用开发回顾与总结系列之二:RowKey行键设计规范

    2. RowKey行键设计规范 2.1. RowKey四大特性 2.1.1 字符串类型 虽然行键在HBase中是以byte[]字节数组的形式存储的,但是建议在系统开发过程中将其数据类型设置为Strin ...

  6. HBase(一): c#访问hbase组件开发

    HDP2.4安装系列介绍了通过ambari创建hbase集群的过程,但工作中一直采用.net的技术路线,如何去访问基于Java搞的Hbase呢? Hbase提供基于Java的本地API访问,同时扩展了 ...

  7. HBase eclipse开发环境搭建

    伪分布式环境安装 事先本机必须部署好了伪分布式hadoop开发环境将Hbase/lib下的 hadoop-core-*.jar 与 hadoop保持一致. 将hadoop下的复制到hbase下将had ...

  8. hbase 快速开发

    hbase是一个分布式的NoSQL,部署起来配置很多东西,开发起来太慢,可以使用docker快速搭建环境 gs@gs-virtual-machine:~$ sudo docker run -ti ha ...

  9. 运行HBase应用开发程序产生异常,提示信息包含org.apache.hadoop.hbase.ipc.controller.ServerRpcControllerFactory的解决办法

    Using Spark's default log4j profile: org/apache/spark/log4j-defaults.properties Exception in thread ...

  10. HBase学习----windows10下使用eclipse搭建HBase的开发环境

    以下是我搭建HBase开发环境的一些心得(windows10) 0.安装JDK和eclipse和一个可用的HBase. 这步是最基础的,在此就不赘述了 1.创建一个java项目: 基础问题,不赘述. ...

随机推荐

  1. 【课程分享】深入浅出嵌入式linux系统移植开发 (环境搭建、uboot的移植、嵌入式内核的配置与编译)

    深入浅出嵌入式linux系统移植开发 (环境搭建.uboot的移植.嵌入式内核的配置与编译) 亲爱的网友,我这里有套课程想和大家分享,假设对这个课程有兴趣的,能够加我的QQ2059055336和我联系 ...

  2. UINavigationController具体解释(二)

    @UINavigationBar-----(是一个View)基本介绍 1.导航栏,和导航控制器一样,是一个容器用来显示提供的其它对象的内容 2.导航栏显示的内容,通过设置UINavigationIte ...

  3. 我的cocos2d-x集成sharesdk之旅(转)

    链接地址:http://blog.csdn.net/yeungxuguang/article/details/18227153 本文出自:http://www.iteye.com/topic/1130 ...

  4. 树莓派变成一个Web服务器: nginx + php + sqlite

    将树莓派变成一个Web服务器,通过访问网页,就可以控制树莓派,比如:查看摄像头\开灯等等. 一想到Linux Web服务器,我们首先想到的是,Apache + MySql + Php. 树莓派可以安装 ...

  5. Ural 1149 - Sinus Dances

    Let An = sin(1–sin(2+sin(3–sin(4+…sin(n))…)Let Sn = (…(A1+n)A2+n–1)A3+…+2)An+1For given N print SN I ...

  6. 转:git教程 ~~非常好的入门教程

    --------------------------------------- notes: cdmkdir dirnametouchls > filenamelsecho "this ...

  7. Qt学习:线程间共享数据(使用信号槽传递数据,必须提前使用qRegisterMetaType来注册参数的类型)

    Qt线程间共享数据主要有两种方式: 使用共享内存.即使用一个两个线程都能够共享的变量(如全局变量),这样两个线程都能够访问和修改该变量,从而达到共享数据的目的: 使用singal/slot机制,把数据 ...

  8. shell脚本中每次读取文件的一行

    写法一: #!/bin/bash while read linedo      echo $line     #这里可根据实际用途变化 done < file          #需要读取的文件 ...

  9. 基于visual Studio2013解决算法导论之047赫夫曼编码

     题目 赫夫曼编码 解决代码及点评 // 赫夫曼编码.cpp : 定义控制台应用程序的入口点. // #include <iostream> #include <stdio.h ...

  10. C# ignoring letter case for if statement(Stackoverflow)

    Question: I have this if statement: if (input == 'day') Console.Write({0}, dayData); When the user t ...