This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| std::vector<std::string> InverseIndex::getWords(std::string line) | |
| { | |
| std::vector<std::string> words; | |
| char* str = (char*)line.c_str(); | |
| char* end = str + strlen(str) + 1; | |
| unsigned char symbol[5] = {0,0,0,0,0}; | |
| while( str < end ){ | |
| utf8::uint32_t code = utf8::next(str, end); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| #include <opencv2/opencv.hpp> // for highgui, core etc. | |
| using namespace cv; | |
| // cascade : classifier using to detect haar objects. | |
| // storage : memory to store detected objects. | |
| void DetectAndDraw(CvHaarClassifierCascade* cascade, | |
| CvMemStorage* storage, | |
| IplImage* img, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Global variables: | |
| * bgVertexBuffer | |
| * trianglesVertexBuffer | |
| * cubeVertexBuffer | |
| * cubeIndexBuffer | |
| */ | |
| function initBuffers() { | |
| // bg | |
| bgVertexBuffer = gl.createBuffer(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.util.ArrayList; | |
| import java.util.Iterator; | |
| import java.util.List; | |
| public class BufferTest { | |
| private static volatile List<String> list = new ArrayList<String>(); | |
| public static void init() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package controllers.oa; | |
| import java.util.ArrayList; | |
| import java.util.HashMap; | |
| import java.util.List; | |
| import java.util.Map; | |
| import models.oa.Leave; | |
| import models.oa.Vacation; | |
| import models.system.User; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main; | |
| import java.util.concurrent.atomic.AtomicReference; | |
| public class CASCalculator extends CalculatorBase { | |
| private enum Status { | |
| NOT_STARTED, | |
| STARTED, | |
| DISPOSED |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| #include <terark/db/db_table.hpp> | |
| #include <terark/io/MemStream.hpp> | |
| #include <terark/io/DataIO.hpp> | |
| #include <terark/io/RangeStream.hpp> | |
| #include <terark/lcast.hpp> | |
| #include "user.hpp" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| jstests/aggregation/mongos_slaveok.js | |
| jstests/aggregation/testshard1.js | |
| jstests/aggregation/testSlave.js | |
| jstests/aggregation/bugs/match.js | |
| jstests/aggregation/bugs/server19095.js | |
| jstests/aggregation/bugs/server21632.js | |
| jstests/aggregation/bugs/server6118.js | |
| jstests/aggregation/bugs/server6125.js | |
| jstests/aggregation/bugs/server6179.js | |
| jstests/aggregation/bugs/server6556.js |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- SQL to create the initial tables for the MediaWiki database. | |
| -- This is read and executed by the install script; you should | |
| -- not have to run it by itself unless doing a manual install. | |
| -- This is a shared schema file used for both MySQL and SQLite installs. | |
| -- | |
| -- For more documentation on the database schema, see | |
| -- https://www.mediawiki.org/wiki/Manual:Database_layout | |
| -- | |
| -- General notes: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // https://www.lintcode.com/problem/map-sum-pairs/description | |
| class MapSum { | |
| class TrieNode { | |
| public: | |
| unordered_map<char, TrieNode*> children; | |
| int val = 0; | |
| TrieNode() {} | |
| TrieNode(const int& val) : val(val) { |