Skip to content

Instantly share code, notes, and snippets.

@xarxziux
xarxziux / memory_leak,rs
Created June 17, 2018 00:40
Rust Memory Leak Demo
#[allow(dead_code)]
struct Entity {
level: u8,
health: u8
}
fn show_vector (next: &Option<Entity>) -> char {
match next {
&Some(_) => '0',
&None => '.'
const React = require ('React');
const DatePickerMain = require ('react-datepicker');
let sendDate = () => {};
class DatePicker extends React.Component {
constructor (props) {
super(props);
@xarxziux
xarxziux / checkRanges.js
Last active May 2, 2017 23:44
Demonstratory JavaScript module for testing for the presence of elements within given ranges in a numeric array.
/*
* The requirement for this module is to accept a number array
* and test for the presence of at least one element in each of
* the following ranges:
*
* 10-20
* 20-30
* 30-40
* 40-50
* 50-60