上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 49 下一页

2013年7月31日

摘要: 这道题要求按字典序生成字符串的全排列,不可重复(但字符可以重复,且区分大小写)。基本思路是先对输入的字符串按字典序排序,然后从第一位开始递归,从所有输入的字符中选出一个填充,然后再选第二位......具体实现看代码。要注意的是最后的输出方式,不小心的话会莫名其妙的WA,详情见代码。我的解题代码如下:#include #include #include #include #include #include #include using namespace std;char s[15],ss[15];int N;int cmp(const void *a, const void *b){ retu 阅读全文

posted @ 2013-07-31 20:42 冰天雪域 阅读(153) 评论(0) 推荐(0) 编辑

摘要: 下面展示一下上传功能的过程1、上传前上传前选择好要将文件或文件夹上传到远程FTP服务器的哪个目的目录下。2、上传中添加上传任务 上传任务完成进度显示3、上传完成================================================================================================== 作者:欧阳鹏 欢迎转载,与人分享是进步的源泉! 转载请保留原文地址:http://blog.csdn.net/ouyang_peng/article/details/9634971==============================. 阅读全文

posted @ 2013-07-31 20:40 冰天雪域 阅读(222) 评论(0) 推荐(0) 编辑

摘要: pendingIntent字面意义:等待的,未决定的Intent。要得到一个pendingIntent对象,使用方法类的静态方法通过getActivity(Context context, int requestCode, Intent intent, int flags)从系统取得一个用于启动一个Activity的PendingIntent对象,通过getService(Context context, int requestCode, Intent intent, int flags)从系统取得一个启动Service的PendingIntent对象通过getBroadcast(Contex 阅读全文

posted @ 2013-07-31 20:38 冰天雪域 阅读(501) 评论(0) 推荐(0) 编辑

摘要: linux空设备文件和重定向输出/输入重导向 > >> &> 2&> 2>& >&2 文件描述符(File Descriptor),用一个数字(通常为0-9)来表示一个文件。 常用的文件描述符如下: 文件描述符 名称 常用缩写 默认值 0 标准输入 stdin 键盘 1 标准输出 stdout 屏幕 2 标准错误输出 stderr 屏幕 /dev/null代表空文件设备 1表示系统标准输出,系统默认值是1, > /dev/null等同于1 > /dev/null 对于 >dev/null 2>&a 阅读全文

posted @ 2013-07-31 20:36 冰天雪域 阅读(1318) 评论(0) 推荐(0) 编辑

摘要: The ? 1 ? 2 ? ... ? n = k problem The problem Given the following formula, one can set operators '+' or '-' instead of each '?', in order to obtain a given k ? 1 ? 2 ? ... ? n = k For example: to obtaink = 12, the expression to be used will be: - 1 + 2 + 3 + 4 + 5 + 6 - 7 = 1 阅读全文

posted @ 2013-07-31 20:34 冰天雪域 阅读(211) 评论(0) 推荐(0) 编辑

摘要: The Cat in the HatBackground(An homage to Theodore Seuss Geisel) The Cat in the Hat is a nasty creature, But the striped hat he is wearing has a rather nifty feature. With one flick of his wrist he pops his top off. Do you know what's inside that Cat's hat? A bunch of small cats, each with i 阅读全文

posted @ 2013-07-31 20:32 冰天雪域 阅读(194) 评论(0) 推荐(0) 编辑

摘要: 在以前使用hadoop的时候因为mahout里面很多都要求输入文件时序列文件,所以涉及到把文本文件转换为序列文件或者序列文件转为文本文件(因为当时要分析mahout的源码,所以就要看到它的输入文件是什么,文本比较好看其内容)。一般这个有两种做法,其一:按照《hadoop权威指南》上面的方面直接读出序列文件然后写入一个文本;其二,编写一个job任务,直接设置输出文件的格式,这样也可以把序列文件读成文本(个人一般采用这样方法)。时隔好久,今天又重新试了下,居然不行了?,比如,我要编写一个把文本转为序列文件的java程序如下:package mahout.fansy.canopy.transform 阅读全文

posted @ 2013-07-31 20:30 冰天雪域 阅读(192) 评论(0) 推荐(0) 编辑

摘要: 硬件配置:4G内存、CPUi3-2.3数据库SQL2008 package com.pan.test;import org.hibernate.Session;import org.hibernate.Transaction;import com.pan.bean.Student;import com.pan.uitl.HibernateSessionFactory;public class Test { /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method ... 阅读全文

posted @ 2013-07-31 20:28 冰天雪域 阅读(155) 评论(0) 推荐(0) 编辑

摘要: 项目需求需要生成一个PDF文档,使用的是VS2010,ASP.NET。网络上多次搜索没有自己想要的,于是硬着头皮到itextpdf官网看英文文档,按时完成任务,以实用为主,共享一下:使用HTML文件创建PDF模板:使用自定义字体的一种方法: FontFactory.Register(System.Web.HttpContext.Current.Request.PhysicalApplicationPath + "\\Fonts\\RAGE.TTF", "myFont"); Font myFont = FontFactory.GetFo... 阅读全文

posted @ 2013-07-31 20:26 冰天雪域 阅读(740) 评论(0) 推荐(0) 编辑

摘要: 用了几年的CMake,最近想试着琢磨如何将C++应用的动态链接全部改成静态链接,发现还需要研究CMake的用法,进入CMake的文档,http://www.cmake.org/cmake/help/syntax.html看到这句:In many ways writing a CMakeLists file is like a writing a program in a simple language. Like most languages CMake provides flow control structures to help you along your way. CMake pro 阅读全文

posted @ 2013-07-31 20:24 冰天雪域 阅读(287) 评论(0) 推荐(0) 编辑


上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 49 下一页

Copyright © 2024 冰天雪域
Powered by .NET 8.0 on Kubernetes