View Event.xsd
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
<xs:schema targetNamespace="http://schemas.microsoft.com/win/2004/08/events/event" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:evt="http://schemas.microsoft.com/win/2004/08/events/event"> | |
<xs:simpleType name="GUIDType"> | |
<xs:restriction base="xs:string"> | |
<xs:pattern value="\{[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}\}"/> | |
</xs:restriction> | |
</xs:simpleType> | |
<xs:complexType name="DataType"> | |
<xs:simpleContent> | |
<xs:extension base="xs:string"> | |
<xs:attribute name="Name" type="xs:string" use="optional"/> |
View main.rs
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
use std::fs::File; | |
use std::sync::{Arc}; | |
use daemonize::Daemonize; | |
use tokio::net::TcpListener; | |
use tokio::runtime::Builder; | |
use tokio::sync::Mutex; | |
fn setup(listener: Arc<Mutex<Option<TcpListener>>>) { | |
let runtime = Builder::new_multi_thread() |
View concurrent_vector.rs
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
use parking_lot::{RwLock, RwLockReadGuard, RwLockUpgradableReadGuard}; | |
use log::{debug}; | |
use rkyv::{Archive, Archived, Deserialize, out_field, RelPtr, Serialize}; | |
use std::alloc::{alloc, dealloc, Layout}; | |
use std::cmp::max; | |
use std::mem::ManuallyDrop; | |
use std::ops::{Deref, DerefMut}; | |
use std::ptr::{copy_nonoverlapping}; | |
use std::sync::atomic::{AtomicUsize, Ordering}; |
View waterfall.cpp
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 <qwt_color_map.h> | |
#include <qwt_matrix_raster_data.h> | |
#include <boost/circular_buffer.hpp> | |
#include <QtCore/QMutex> | |
#include "waterfall.h" | |
using boost::circular_buffer; | |
using std::make_shared; |
View CMakeLists.txt
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.8.0) | |
# Project info | |
project(sdhr) | |
set(${PROJECT_NAME}_MAJOR "0") | |
set(${PROJECT_NAME}_MINOR "0") | |
set(${PROJECT_NAME}_PATCH "1") | |
set(VERSION "${${PROJECT_NAME}_MAJOR}.${${PROJECT_NAME}_MINOR}.${${PROJECT_NAME}_PATCH}") | |
set(CMAKE_CXX_STANDARD 11) |
View simple shell scripting
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
const x:num = 123.456; // this is a constant that never changes | |
const y:str = "hello world"; // constant string literal | |
var a:str = "hello"; // create a string variable, and assign to string literal | |
var b:num = 23.4; // create a number variable, and assign number | |
var c:str[] = ["hello", "world"]; // create an array variable, assign literal | |
CWD = "/path/to/current/directory"; // CWD is a special variable that can be set or read, and represents the current working directory | |
print(ARG[0]); // ARG is a spcecial variable that can only be read; it is a str[]. The first argument (zero index) is the first argument passed to the script. |
View qt_logging.cpp
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 "mainwindow.h" | |
#include <QApplication> | |
#include <QFile> | |
#include <QDebug> | |
#include <QLoggingCategory> | |
Q_LOGGING_CATEGORY(fcIo, "fc.io") | |
View lib.rs
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
let mut wal_file = try!(OpenOptions::new().read(true).write(true).create(true).open(tree_file_path.to_owned() + ".wal")); | |
// if we have a WAL file, just replay it into the mem_tree | |
if try!(wal_file.metadata()).len() != 0 { | |
let mut buff = vec![0; node_size]; | |
while true { | |
match wal_file.read_exact(&mut buff) { | |
Ok(_) => { | |
let k = try!(decode(&buff[0..max_key_size])); |
View dbutils_ex4.java
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
QueryRunner runner = new QueryRunner(dataSource); | |
// Use the BeanListHandler implementation to convert all | |
// ResultSet rows into a List of Person JavaBeans. | |
ResultSetHandler<List<Person>> handler = new BeanListHandler<Person>(Person.class); | |
// Execute the SQL statement and return the results in a List of | |
// Person objects generated by the BeanListHandler. | |
List<Person> persons = runner.query("SELECT * FROM Person").execute(handler); |
View dbutils_ex3.java
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
AsyncExecutor asyncRun = new AsyncExecutor(Executors.newFixedThreadPool(5)); | |
try | |
{ | |
// Setup the UpdateExecutor | |
UpdateExecutor executor = runner.update("UPDATE Person SET height=:height WHERE name=:name") | |
.bind(":height", 2.05) | |
.bind("name", "John Doe"); | |
// Returns a Future for the update call |
NewerOlder