首页 > 编程语言
LeetCode-557 Reverse Words in a String III Solution (with Java)
1. Description: 2.Solutions: 1 /** 2 * Created by sheepcore on 2019-02-24 3 */ 4 class Solution { 5 public String reverseWords(String s) { 6 String[] ...
分类:编程语言   时间:2020-03-02 17:10:21    收藏:0  评论:0  赞:0  阅读:46
C++调用外部文件中的函数
方法一、 dev_cpp中建一项目,把下列文件添中到项目中 主函数main001.cpp,其中添加 #include "lx.h", 方法二: 在主函数main001.cpp中直接中添加 #include "add.cpp",#include " sub.cpp",把这三个文件放在同一目录下。 1 ...
分类:编程语言   时间:2020-03-02 17:07:57    收藏:0  评论:0  赞:0  阅读:190
LeetCode-922 Sort Array By Parity II Solution (with Java)
1. Description: Notes: 2. Examples: 3.Solutions: 1 /** 2 * Created by sheepcore on 2019-02-24 3 */ 4 class Solution { 5 public int[] sortArrayByParity ...
分类:编程语言   时间:2020-03-02 17:07:03    收藏:0  评论:0  赞:0  阅读:59
C\C++ 中的绝对值函数:abs()、cabs()、fabs()、labs()
不同类型的数据使用不同类型的绝对值函数: 整型: int abs(int i) //返回整型参数i的绝对值 复数: double cabs(struct complex znum) //返回复数znum的绝对值 双精度浮点型: double fabs(double x) //返回双精度参数x的绝对值 ...
分类:编程语言   时间:2020-03-02 17:06:47    收藏:0  评论:0  赞:0  阅读:95
python的logging使用
python的logging使用run.py```pythonfrom logger import get_loggerimport timeif __name__ == "__main__": logger = get_logger() print(id(logger)) logger.info(... ...
分类:编程语言   时间:2020-03-02 17:05:35    收藏:0  评论:0  赞:0  阅读:61
项目签名验证原理、签 名验证算法 时间差问题
1、Flutter Md5 加密 import 'dart:convert'; import 'package:crypto/crypto.dart'; main() { print(md5.convert(utf8.encode("Hello"))); } 2、为什么要签名验证 我们通过 http ...
分类:编程语言   时间:2020-03-02 17:04:45    收藏:0  评论:0  赞:0  阅读:112
LeetCode-344 Reverse String Solution (with Java)
1. Description: 2. Examples: 3.Solutions: 1 /** 2 * Created by sheepcore on 2019-02-24 3 */ 4 class Solution { 5 public void reverseString(char[] s) { ...
分类:编程语言   时间:2020-03-02 17:04:14    收藏:0  评论:0  赞:0  阅读:54
进程、线程、协程的关系和区别
进程、线程、协程的关系和区别: 进程拥有自己独立的堆和栈,既不共享堆,亦不共享栈,进程由操作系统调度。 线程拥有自己独立的栈和共享的堆,共享堆,不共享栈,线程亦由操作系统调度(标准线程是的)。 协程和线程一样共享堆,不共享栈,协程由程序员在协程的代码里显示调度。启动一个线程消耗8M左右的内存,启动一 ...
分类:编程语言   时间:2020-03-02 17:02:40    收藏:0  评论:0  赞:0  阅读:51
【Brackets Matching】带有等级顺序的括号匹配问题 ——C++实现
写在前面:为了使得代码简洁使用了goto语句,后续将尝试重写以进一步简化代码,删除goto语句,并在闲时加入算法的JAVA实现。 题目描述 The input string contains only 4 types of brackets, (), [], <> and {}. The goal ...
分类:编程语言   时间:2020-03-02 17:01:45    收藏:0  评论:0  赞:0  阅读:87
Intellij IDEA配置javaweb项目
虽然配置过很多次web项目,但是好久没有写过web,很容易忘记步骤,所以今天专门记录一下。 1.创建maven项目(也可以用其他方式创建项目,个人喜好) 2.设置项目名称 3.项目创建好后,File>Project Structure 进入项目环境配置界面 4.设置web.xml 文件的位置 5.w ...
分类:编程语言   时间:2020-03-02 17:00:26    收藏:0  评论:0  赞:0  阅读:256
Java包名
平常用的就是com.*.*.*这样的结构来写项目的,但是每次一想到com是公司的意思就觉得怪怪的,于是就查了下面其他单词命名的缩写,以后自己的项目就还是别用com开头了... 、、、 indi (individual): 个体项目,指个人发起,但非自己独自完成的项目,可公开或私有项目,copyrig ...
分类:编程语言   时间:2020-03-02 16:59:41    收藏:0  评论:0  赞:0  阅读:63
LeetCode-561 Array Partition I Solution (with Java)
1. Description: Notes: 2. Examples: 3.Solutions: 1 /** 2 * Created by sheepcore on 2019-02-24 3 */ 4 class Solution { 5 public int arrayPairSum(int[] ...
分类:编程语言   时间:2020-03-02 16:58:23    收藏:0  评论:0  赞:0  阅读:51
LeetCode-804 Unique Morse Code Words Solution (with Java)
1. Description: Notes: 2. Examples: 3.Solutions: 1 /** 2 * Created by sheepcore on 2019-02-24 3 */ 4 class Solution { 5 public int uniqueMorseRepresen ...
分类:编程语言   时间:2020-03-02 16:56:46    收藏:0  评论:0  赞:0  阅读:75
LeetCode-657 Robot Return to Origin Solution (with Java)
1. Description: 2. Examples: 3.Solutions: 1 /** 2 * Created by sheepcore on 2019-02-24 3 * best time complexity: O(n) 4 * average time complexity: O(n ...
分类:编程语言   时间:2020-03-02 16:55:29    收藏:0  评论:0  赞:0  阅读:57
python 看函数被谁调用
在一个函数中def fun(): pass这个函数如何知道是谁调用了它呢?import tracebackdef fun(): s = traceback.extract_stack() print '%s Invoked me!'%s[-2][2] 这个 fun 函数就可以知道是谁调用了它,并打印 ...
分类:编程语言   时间:2020-03-02 16:55:10    收藏:0  评论:0  赞:0  阅读:271
C语言-printf使用
/* printf */ #include <stdio.h> int main() { char string[] = "abc"; printf("%d\n", 2); //单个字符输入 printf("%d %d\n", 2, 2); //使用多个占位符 printf("%c %hhd\n", ...
分类:编程语言   时间:2020-03-02 16:51:57    收藏:0  评论:0  赞:0  阅读:57
R语言 save与saveRDS
Rda与Rdata,前者是后者格式的缩写,在R里加载同样使用load()。 save与saveRDS的区别在于,前者保存的数据文件格式为.Rda或Rdata,读入R使用load(),载入的数据名称为原数据名称,不可指定。 后者保存的数据文件格式为.rds,读入使用readRDS,读入的数据名称可指定 ...
分类:编程语言   时间:2020-03-02 16:51:28    收藏:0  评论:0  赞:0  阅读:431
Hello World! — 用 Groovy 编写的 Java 程序
Hello World! — 用 Groovy 编写的 Java 程序 https://www.ibm.com/developerworks/cn/education/java/j-groovy/j-groovy.html 单击 Finish 按钮,应该会看到如下所示的代码段: 1 2 3 4 5 ...
分类:编程语言   时间:2020-03-02 16:48:47    收藏:0  评论:0  赞:0  阅读:67
LeetCode-832 Flipping an Image Solution (with Java)
1. Description: Notes: 2. Examples: 3.Solutions: 1 /** 2 * Created by sheepcore on 2019-02-24 3 */ 4 class Solution { 5 public int[][] flipAndInvertIm ...
分类:编程语言   时间:2020-03-02 16:46:03    收藏:0  评论:0  赞:0  阅读:48
LeetCode-973 K Closest Points to Origin Solution (with Java)
1. Description: Notes: 2. Examples: 3.Solutions: 1 /** 2 * Created by sheepcore on 2019-02-24 3 */ 4 class Solution { 5 public int[][] kClosest(int[][ ...
分类:编程语言   时间:2020-03-02 16:42:46    收藏:0  评论:0  赞:0  阅读:60
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!