Skip to content

Instantly share code, notes, and snippets.

View OlegJakushkin's full-sized avatar
🤩

Oleg Jakushkin OlegJakushkin

🤩
View GitHub Profile
#define _CRT_SECURE_NO_WARNINGS
#define STATIC_LIBMONGOCLIENT
#include <iostream>
#include <string>
#include <mongo/bson/bson.h>
int main(){
{
mongo::BSONObjBuilder builder;
using System;
using System.Threading;
using System.Collections.Generic;
using System.Linq;
public class Animal{
public string Name;
public object Mutex = new object();
}
using System;
using System.Threading;
using System.Collections.Generic;
using System.Linq;
class Box
{
private static readonly Random RandomNumberGenerator = new Random();
public int SomeRandomValue
// icpc -std=c++11 -ltbb -lpthread -lrt -O3 -mtune=native -march=native -test_tbb.cpp -o exec
#include <tbb/concurrent_hash_map.h>
#include <tbb/tick_count.h>
#include <tbb/tbb_thread.h>
#include <mutex>
#include <memory>
#include <map>
#include <atomic>
#include <vector>
@{
var amplitudeRequest = Request.Params["amplitude"];
var amplitudeValue = 1;
var clear = int.TryParse(amplitudeRequest, out amplitudeValue);
var errorMssage = "no amplitude provided, please input http://apmath4oj.azurewebsites.net/mem.cshtml?amplitude=5";
}
<html>
<head>
<meta charset="utf-8">
<script src="https://raw.githubusercontent.com/unconed/mathbox/master/build/mathbox-bundle.min.js"></script>
using System;
using System.Linq;
using Accord.MachineLearning.Structures;
namespace KD_test {
class Program {
public static void Main() {
double[][] points = {
new double[] {5, 5, 4},
new double[] {4, 7, 5},
/* simple mongo 2.6.x client test
mongo server https://goo.gl/x1PJlI
mongo client libraries https://goo.gl/Ggpdcd
requiers packages for x64
Install-Package boost -Version 1.55.0.16
Install-Package boost_system-vc110 -Version 1.55.0.16
Install-Package boost_date_time-vc110 -Version 1.55.0.16
Install-Package boost_thread-vc110 -Version 1.55.0.16
Install-Package boost_chrono-vc110 -Version 1.55.0.16
Install-Package boost_filesystem-vc110 -Version 1.55.0.16
// Simple shaderless Unity 5 Wireframe Renderer (can be used on top of materials)
// OJ2016
using System.Collections.Generic;
using UnityEngine;
// ReSharper disable once UnusedMember.Global
[RequireComponent( typeof( MeshFilter ) )]
public class WireframeRenderer: MonoBehaviour {
private List<Vector3> RenderingQueue;
/* simple mongo 2.6.x client test
mongo server https://goo.gl/x1PJlI
mongo client libraries https://goo.gl/Ggpdcd
requiers packages for x64
Install-Package boost -Version 1.55.0.16
Install-Package boost_system-vc110 -Version 1.55.0.16
Install-Package boost_date_time-vc110 -Version 1.55.0.16
Install-Package boost_thread-vc110 -Version 1.55.0.16
Install-Package boost_chrono-vc110 -Version 1.55.0.16
Install-Package boost_filesystem-vc110 -Version 1.55.0.16
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using Accord.MachineLearning.Structures;
public class Controller : MonoBehaviour {
private readonly Dictionary<Vector3, Informer> map = new Dictionary<Vector3, Informer>();
private readonly KDTree<Informer> tree = new KDTree<Informer> ();