This file contains 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 <vector> | |
#include <set> | |
#include <unordered_map> | |
#include <queue> | |
#include <time.h> | |
#include <bitset> | |
#include <algorithm> | |
#include <functional> |
This file contains 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 <winsock2.h> | |
#include <iphlpapi.h> | |
#include <WS2tcpip.h> | |
#pragma comment(lib, "IPHLPAPI.lib") | |
#pragma comment(lib, "Ws2_32.lib") | |
using namespace std; | |
static char* ConvertLPWSTRToLPSTR(LPWSTR lpwszStrIn) |
This file contains 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
#!/usr/bin/python | |
class Filter: | |
spamWords = ["bad", "giveaway"] | |
def __init__(self): | |
pass | |
def getSpamWordsCount(self, userId, post): | |
count = 0 | |
for s in self.spamWords: |
This file contains 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 <vector> | |
#include <list> | |
#include <algorithm> | |
using namespace std; | |
struct PrimitiveInfo | |
{ | |
list<int> numbers; |
This file contains 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 <thread> | |
using namespace std; | |
void func1() | |
{ | |
cout << "func1 " << endl; | |
} |
This file contains 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
cmake_minimum_required(VERSION 2.6) | |
add_definitions( -DGTEST_HAS_PTHREAD=1 ) | |
set(GMOCK_ROOT /home/miradham/cpp/gtest/googletest-master/googlemock/) | |
set(GTEST_ROOT /home/miradham/cpp/gtest/googletest-master/googlemock/gtest/) | |
# Locate GTest | |
find_package(GTest REQUIRED) | |
find_package(GMock REQUIRED) | |
#add_subdirectory(googletest-master) | |
include_directories(${GTEST_INCLUDE_DIRS}) |
This file contains 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 warmup; | |
public class MyCustomHeap { | |
int[] mHeap; | |
int mSize; | |
public MyCustomHeap(int capacity) { | |
mSize = 0; | |
mHeap = new int[capacity]; | |
} |
This file contains 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
cmake_minimum_required (VERSION 2.4) | |
project (json-glib-demo) | |
find_package(PkgConfig REQUIRED) | |
pkg_search_module(JSONGLIB REQUIRED json-glib-1.0) | |
add_executable (json-glib-demo jsontest.cpp) | |
include_directories(${JSONGLIB_INCLUDE_DIRS}) | |
target_link_libraries(json-glib-demo ${JSONGLIB_LIBRARIES}) |
This file contains 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
cmake_minimum_required (VERSION 3.5) | |
project (curl-demo) | |
set(CURL_LIBRARY "-lcurl") | |
find_package(CURL REQUIRED) | |
add_executable (curl-demo convert.cpp) | |
include_directories(${CURL_INCLUDE_DIR}) | |
target_link_libraries(curl-demo ${CURL_LIBRARIES}) |
This file contains 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
cmake_minimum_required (VERSION 2.4) | |
project (json-glib-demo) | |
find_package(PkgConfig REQUIRED) | |
pkg_search_module(JSONGLIB REQUIRED json-glib-1.0) | |
add_executable (json-glib-demo jsontest.cpp) | |
include_directories(${JSONGLIB_INCLUDE_DIRS}) | |
target_link_libraries(json-glib-demo ${JSONGLIB_LIBRARIES}) |