Skip to content

Instantly share code, notes, and snippets.

View yorickdewid's full-sized avatar

Yorick de Wid yorickdewid

  • Between two vertices
  • 01:26 (UTC +01:00)
View GitHub Profile
@yorickdewid
yorickdewid / ma_ea.mq5
Created September 15, 2014 17:42
Moving avarage MetaTrader5
//+------------------------------------------------------------------+
//| MA_EA.mq5 |
//| Copyright 2014 |
//+------------------------------------------------------------------+
#property copyright "Copyright 2014"
#property version "1.00"
//--- input parameters
input int StopLoss=30; // Stop Loss
input int TakeProfit=100; // Take Profit
input int ADX_Period=8; // ADX Period
@yorickdewid
yorickdewid / ca.cnf
Last active December 23, 2021 09:55
HOME = .
RANDFILE = .rnd
[ ca ]
default_ca = CA_default # The default ca section
[ CA_default ]
dir = . # Where everything is kept
certs = $dir/cert # Where the issued certs are kept
crl_dir = $dir # Where the issued crl are kept
/**
Handle multiple socket connections with select and fd_set on Linux
*/
#include <stdio.h>
#include <string.h> //strlen
#include <stdlib.h>
#include <errno.h>
#include <unistd.h> //close
#include <arpa/inet.h> //close
@yorickdewid
yorickdewid / circle.c
Last active August 29, 2015 14:07
Coding art
#include <stdio.h>
#define _ -F<00||--F-OO--;
int F=00,OO=00;main(){F_OO();printf("%1.3f\n",4.*-F/OO/OO);}F_OO()
{
_-_-_-_
_-_-_-_-_-_-_-_-_
_-_-_-_-_-_-_-_-_-_-_-_
_-_-_-_-_-_-_-_-_-_-_-_-_-_
_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
@yorickdewid
yorickdewid / lexiorder.c
Created October 12, 2014 18:30
Example of lexicographical ordering in C
#include <stdio.h>
#include <string.h>
int main(int argc, char *argv[]){
int i,j;
char str[10][50], temp[50];
printf("Enter 10 words:\n");
for(i=0;i<10;++i)
gets(str[i]);
@yorickdewid
yorickdewid / LICENSE
Created October 13, 2014 14:03
Simple Quenza Common License
Copyright (c) 2012, Quenza project
Description: Simple Quenza Common License
Date: 15-06-2011
Timestamp: 14-04-2012
Version: Alpha-0.7
QUID: {A82-SK3D82H5-D63JS-6S}
URL: http://dynnos.com/license/qcl/en/
= Simple Quenza Common License 2012 =
@yorickdewid
yorickdewid / md5.c
Created October 20, 2014 18:12
MD5 in c
/*
**********************************************************************
** md5.h -- Header file for implementation of MD5 **
** RSA Data Security, Inc. MD5 Message Digest Algorithm **
** Created: 2/17/90 RLR **
** Revised: 12/27/90 SRD,AJ,BSK,JT Reference C version **
** Revised (for MD5): RLR 4/27/91 **
** -- G modified to have y&~z instead of y&z **
** -- FF, GG, HH modified to add in last register done **
** -- Access pattern: round 2 works mod 5, round 3 works mod 3 **
@yorickdewid
yorickdewid / mbchk.c
Last active December 14, 2019 16:13
Simple checker for the format of a Multiboot kernel
/* mbchk - a simple checker for the format of a Multiboot kernel */
/*
* Copyright (C) 1999,2001,2002 Free Software Foundation, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
/*
* Btree example for DynnOS
*
* Quenza simple license
* 2013, Dinux
*
*
*/
<?php
class YahooFinanceAPI
{
public $api_url = 'http://query.yahooapis.com/v1/public/yql';
/**
* @param array $tickers The array of ticker symbols
* @param array|bool $fields Array of fields to get from the returned XML
* document, or if true use default fields, or if false return XML