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 ( | |
| "encoding/json" | |
| "log" | |
| "net/http" | |
| "strconv" | |
| "time" | |
| "github.com/gorilla/mux" |
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 <random> | |
| #include <cmath> | |
| #include <Eigen/Core> | |
| #include "pcg_random.hpp" | |
| using namespace Eigen; | |
| template<unsigned int Size> | |
| struct neuron { |
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
| /* | |
| Sample output: | |
| 12/14/18 07:05:12 | |
| Running neuroevolution.exe | |
| Run on (8 X 3492 MHz CPU s) | |
| CPU Caches: | |
| L1 Data 32K (x4) | |
| L1 Instruction 32K (x4) | |
| L2 Unified 262K (x4) |
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 <chrono> | |
| #include <SQLiteCpp/SQLiteCpp.h> | |
| int main() { | |
| auto start = std::chrono::high_resolution_clock::now(); | |
| SQLite::Database db("example.db3", SQLite::OPEN_READWRITE | SQLite::OPEN_CREATE); | |
| db.exec("create table if not exists test(id integer primary key autoincrement, name text, size integer)"); |
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 <chrono> | |
| #include <pqxx/pqxx> | |
| int main(int, char *argv[]) | |
| { | |
| pqxx::connection c("dbname=arete user=postgres password=postgres"); | |
| { | |
| pqxx::work txn(c); |
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
| /* sample output (on an 8 core machine): | |
| time elapsed (parallel): 732.39394ms | |
| 999: false | |
| time elapsed (serial): 5.857433675s | |
| 999: false | |
| 5.857433675 seconds / 732.39394 ms = 7.99765448 ~= 8 | |
| */ |
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
| <Application x:Class="LoginExample.App" | |
| xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
| xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
| xmlns:local="clr-namespace:LoginExample" | |
| StartupUri="StartingWindow.xaml"> | |
| <Application.Resources></Application.Resources> | |
| </Application> |
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
| namespace MVVMToolkit | |
| { | |
| public abstract class ObservableObject : INotifyPropertyChanged | |
| { | |
| public event PropertyChangedEventHandler PropertyChanged; | |
| protected void OnPropertyChanged(string propertyName) | |
| { | |
| PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); | |
| } |
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
| <Window x:Class="asyncawait.MainWindow" | |
| xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
| xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
| xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | |
| xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | |
| xmlns:local="clr-namespace:asyncawait" | |
| mc:Ignorable="d" | |
| Title="MainWindow" Height="450" Width="450"> | |
| <DockPanel> | |
| <Button Name="buttonAsync" |
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
| <Window x:Class="databinding.MainWindow" | |
| xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
| xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
| xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | |
| xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | |
| xmlns:local="clr-namespace:databinding" | |
| mc:Ignorable="d" | |
| Title="MainWindow" | |
| Height="800" | |
| Width="800"> |