03 2016 档案
摘要:查看网站日志 sudo journalctl -u uwsgi@xxxxx.com 或者进入/etc/uwsgi/xxx.com.ini 看日志logto到哪里 取消文件权限 chown username:username xxx.log
阅读全文
摘要:https://github.com/shiyanhui/FileHeader 修改的模板在这个路径下:C:\Users\【USERNAME】\AppData\Roaming\Sublime Text 2\Packages\FileHeader\template\header
阅读全文
摘要:/* Given two binary strings, return their sum (also a binary string). For example, a = "11" b = "1" Return "100 */ class Solution { public: string add
阅读全文
摘要:摘自:《啊哈算法》 我们要用1, 2, 5, 12, 7, 17, 25, 19, 36, 99, 22, 28, 46, 92来建立最小堆,并且删除最小的数,并增加一个数23 如何建立这个堆: //建堆 n = 0; for (int i = 1; i <= m; i++) { n++; h[n]
阅读全文
摘要:筛法计算素数: class Solution { public: int countPrimes(int n) { vector<bool> isprime(n, true); isprime[0] = false; isprime[1] = false; for (int i = 2; i < s
阅读全文
摘要:Sort a linked list in O(n log n) time using constant space complexity. 链表的归并排序。 /** * Definition for singly-linked list. * struct ListNode { * int val
阅读全文
摘要:Write a program to find the node at which the intersection of two singly linked lists begins. For example, the following two linked lists: A: a1 → a2
阅读全文
摘要:题目描述: /*Given an array of numbers nums, in which exactly two elements appear only once and all the other elements appear exactly twice. Find the two e
阅读全文
摘要:class Solution { public: int myAtoi(string str) { if (str == "") return 0; //判断是否为空 int i = 0, sign = 1; long long sum = 0; //用long long来存结果,易于判断是否溢出,
阅读全文

浙公网安备 33010602011771号