上一页 1 2 3 4 5 6 7 8 9 ··· 57 下一页

2018年9月25日

随机算法

摘要: class Solution { private: vector<int> vc; public: Solution(vector<int> nums) { vc = nums; } int pick(int target) { vector<int> tmp; int size = 0; for 阅读全文

posted @ 2018-09-25 23:51 stupid_one 阅读(154) 评论(0) 推荐(0) 编辑

24点游戏

摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1427 不传引用会TLE #include <bits/stdc++.h> using namespace std; double epx = 1e-10; int cmp = 24; bool judge(vec 阅读全文

posted @ 2018-09-25 19:47 stupid_one 阅读(218) 评论(0) 推荐(0) 编辑

2018年9月14日

链表排序

摘要: https://leetcode.com/problems/insertion-sort-list/description/ 1、归并排序: #include <bits/stdc++.h> #include "table.h" using namespace std; typedef long l 阅读全文

posted @ 2018-09-14 23:59 stupid_one 阅读(177) 评论(0) 推荐(0) 编辑

2018年9月7日

前端

摘要: 在JavaScript的世界中,所有代码都是单线程执行的。 1、点击按钮,响应 <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title> javaScript </title> </meta> </head> <bo 阅读全文

posted @ 2018-09-07 10:06 stupid_one 阅读(191) 评论(0) 推荐(0) 编辑

2018年9月1日

一些常量

摘要: 1、acm中1s --> 1e8 2、acm中1e6的字符串题目不能用nlogn 3、nginx管方说并发 5w/s,实际可能2w/s,然后1w个keep-alive仅需要消耗2.5MB内存 4、单位ms 5、关于为什么需要struct的字节对齐 因为:(可以用预编译命令#pragma pack(n 阅读全文

posted @ 2018-09-01 00:15 stupid_one 阅读(346) 评论(0) 推荐(0) 编辑

2018年8月20日

2018-8-20 21:32:39 面试

摘要: 2020-08-02 21:36:52 准备的面试题: 1. new和malloc的区别 malloc是一个函数,new是一个关键字,需要编译器的支持。 new出来的东西放在自由存取区上, malloc放在堆上。 new返回的是对象指针,malloc返回的是void* new可以重载 2. 左值引用 阅读全文

posted @ 2018-08-20 21:36 stupid_one 阅读(255) 评论(6) 推荐(1) 编辑

2018年8月19日

386. Lexicographical Numbers 把1--n按字典序排序

摘要: https://leetcode.com/problems/lexicographical-numbers/description/ 前20个是 1, 10, 11, 12, 13, 14, .....19 2, 20, 3, 4, 5, 6, ....9 阅读全文

posted @ 2018-08-19 20:47 stupid_one 阅读(358) 评论(0) 推荐(0) 编辑

2018年8月14日

mysql

摘要: 一些命令: show create teble table_name \G; MYSQL压力测试之mysqlslap create table user2(userid int(4) primary key not null auto_increment, id int); package main 阅读全文

posted @ 2018-08-14 12:58 stupid_one 阅读(144) 评论(0) 推荐(0) 编辑

2018年8月13日

nginx

摘要: ※:docker中跑nginx,即使volume了,还是需要进去nginx哪里reload,才能使配置文件生效,语法是:nginx -s reload,用service nginx reload也可以,但是这样不会检查nginx语法,就是dafault.conf有错误也不能被识别出来。 nginx配 阅读全文

posted @ 2018-08-13 16:31 stupid_one 阅读(106) 评论(0) 推荐(0) 编辑

2018年7月9日

tencent intern learning

摘要: gslb全局负载均衡 (负载均衡的问题就是某些session保存在某台服务器中,这个用户就只能用那台服务器服务了) jwt vs 传统cookies & session (jwt类似于公钥秘钥加密,这样就没必要保存cookies和session,达到用不同服务器都可以相应用户请求,再配合分布式。。全 阅读全文

posted @ 2018-07-09 12:24 stupid_one 阅读(217) 评论(0) 推荐(0) 编辑

上一页 1 2 3 4 5 6 7 8 9 ··· 57 下一页

导航