formated time string for file naming
#include <stdio.h>
#include <time.h> int main()
{
time_t rawtime;
struct tm *timeinfo;
char buffer[]; time(&rawtime);
timeinfo = localtime(&rawtime); strftime(buffer, , "result-%Y_%m_%d_%H_%M_%S.jpg", timeinfo);
puts(buffer); return ;
}
formated time string for file naming的更多相关文章
- 30天C#基础巩固------面向鸭子编程,关于string和File的练习
面向对象编程就是面向抽象的父类进行编程,具体的实现不用考虑,由子类决定.<经典的说法--面向鸭子编程> eg:鸭子的编程,<对于多态的理解> 我们都习惯把使用 ...
- Junit 注解 类加载器 .动态代理 jdbc 连接池 DButils 事务 Arraylist Linklist hashset 异常 哈希表的数据结构,存储过程 Map Object String Stringbufere File类 文件过滤器_原理分析 flush方法和close方法 序列号冲突问题
Junit 注解 3).其它注意事项: 1).@Test运行的方法,不能有形参: 2).@Test运行的方法,不能有返回值: 3).@Test运行的方法,不能是静态方法: 4).在一个类中,可以同时定 ...
- string str = File.ReadAllText(@"c:\temp\ascii.txt");
string str = File.ReadAllText(@"c:\temp\ascii.txt");
- how to write string to file in bash
how to write string to file in bash https://stackoverflow.com/questions/22713667/shell-script-how-to ...
- Java运行系统命令并获取值(Process java.lang.Runtime.exec(String[] cmdarray, String[] envp, File dir)
package test; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; ...
- String inputStream file转化
String --> InputStreamByteArrayInputStream stream = new ByteArrayInputStream(str.getBytes()); Inp ...
- File(File f, String child) File(String parent, String child)
(转载)File(File f, String child) 根据f 抽象路径名和 child 路径名字符串创建一个新 File 实例. f抽象路径名用于表示目录,child 路径名字符串用于表示目录 ...
- Java InputStream、String、File相互转化
String --> InputStreamByteArrayInputStream stream = new ByteArrayInputStream(str.getBytes()); Inp ...
- Java InputStream、String、File相互转化 --- good
String --> InputStreamByteArrayInputStream stream = new ByteArrayInputStream(str.getBytes()); Inp ...
随机推荐
- MySQL实现批量检查表并进行repair与optimize的方法
这篇文章主要介绍了MySQL实现批量检查表并进行repair与optimize的方法,结合实例形式分析了MySQL批量修复与优化表的相关技巧,需要的朋友可以参考下 本文实例讲述了MySQL实现批量检查 ...
- os库新建文件夹
file.write()可以自动生成文件但不能生成文件夹. os库生成文件夹 # 判断文件夹是否存在(./xxx/xxx) if not isExists: os.makedirs(path) pri ...
- mysql in 子查询 效率慢,对比
desc SELECT id,detail,groupId from hs_knowledge_point where groupId in ( UNION all ) UNION ALL SELEC ...
- 洛谷P4051 [JSOI2007]字符加密 后缀数组
题目链接:https://www.luogu.org/problemnew/show/P4051 思路:我们联想求后缀数组sa的过程,发现我们在求y数组的时候(第二关键字,下标为第二关键字的排位,值为 ...
- 18. 4Sum (JAVA)
Given an array nums of n integers and an integer target, are there elements a, b, c, and d in nums s ...
- 牛客小白月赛13 小A的最短路(lca+RMQ)
链接:https://ac.nowcoder.com/acm/contest/549/F来源:牛客网 题目描述 小A这次来到一个景区去旅游,景区里面有N个景点,景点之间有N-1条路径.小A从当前的一个 ...
- Swift - 修改导航栏“返回”按钮文字和图标 /手势冲突解决/响应范围
iOS11之前 修改导航栏“返回”按钮文字,图标 https://blog.csdn.net/u012701023/article/details/50264265 iOS11 完美解决导航栏按钮偏移 ...
- C#导入c++ dll报找不到dll文件 masm32调用c++类库
最近需要在C#下调用一个c++ dll库,不管怎样dllimport就是报错找不到该dll文件,路径.函数名称.参数.dllimport参数逐个检查确认无误也无济于事,无奈想用其他语言调用试试,由于是 ...
- 处理ajax数据;数据渲染
当我们用ajax把数据拿到前台,该如何渲染到页面,有以下几种方式: 一:使用字符串拼接的方法 声明一个空变量,然后拼接 var st=""; st+="<div&g ...
- docker 删除所有none的镜像
docker images|grep none|awk '{print $3}'|xargs docker rmi