#How to create a .file
or .folder
on Windows
There are several ways
- Create
file.txt
- Rename to
.file.
, the last dot will be dropped, you'll have.file
Works the same with a file or a directory.
// This works on Rhino. | |
var counter = (function () { | |
var i = 1; | |
return function () { | |
return i++; | |
}; | |
})(); | |
print(counter()); // 1 |
<?php | |
/** | |
* Real properties PHP trait | |
* Requirements: PHP 5.4 or later | |
*/ | |
trait Properties | |
{ | |
protected $properties; | |
public function __get($name) |
string VERSION = "TL BO 1.0"; | |
// external global variables | |
extern int EXT_SWINGS = 2; // swing level, 0 is lowest, 2 is most common | |
extern int EXT_NO_SWING_LMT = 12; // don't consider the latest X bars as swing points to draw trend lines | |
extern int EXT_ATR = 300; // ATR(x) | |
extern double EXT_ATR_MAX_SLOPE = 0.05; // multiple of ATR that would be considered maximum slope | |
extern double EXT_ATR_BUFFER = 0.05; // multiple of ATR to add to low/high for it to be considered a "touch" | |
extern int EXT_NULL_CLOSES = 0; // number of closes beyond trend line to nullify it as a valid trend line | |
extern int EXT_NUM_TOUCHES = 3; // (inclusive) number of touches needed to be considered a valid trend line |
<?php | |
/** | |
* Get the file size of any remote resource (using get_headers()), | |
* either in bytes or - default - as human-readable formatted string. | |
* | |
* @author Stephan Schmitz <eyecatchup@gmail.com> | |
* @license MIT <http://eyecatchup.mit-license.org/> | |
* @url <https://gist.github.com/eyecatchup/f26300ffd7e50a92bc4d> | |
* | |
* @param string $url Takes the remote object's URL. |
These steps walk through installing a static binary of any ffmpeg version on to your linux machine. If you want to compile from source, there are several ways to do so. Here's the official guide. Tested and works on an AWS EC2 Ubuntu instance, but should work on any Linux machine.
<?php | |
if(!function_exists('config_path')) | |
{ | |
/** | |
* Return the path to config files | |
* @param null $path | |
* @return string | |
*/ | |
function config_path($path=null) |
function mime2ext($mime){ | |
$all_mimes = '{"png":["image\/png","image\/x-png"],"bmp":["image\/bmp","image\/x-bmp","image\/x-bitmap","image\/x-xbitmap","image\/x-win-bitmap","image\/x-windows-bmp","image\/ms-bmp","image\/x-ms-bmp","application\/bmp","application\/x-bmp","application\/x-win-bitmap"],"gif":["image\/gif"],"jpeg":["image\/jpeg","image\/pjpeg"],"xspf":["application\/xspf+xml"],"vlc":["application\/videolan"],"wmv":["video\/x-ms-wmv","video\/x-ms-asf"],"au":["audio\/x-au"],"ac3":["audio\/ac3"],"flac":["audio\/x-flac"],"ogg":["audio\/ogg","video\/ogg","application\/ogg"],"kmz":["application\/vnd.google-earth.kmz"],"kml":["application\/vnd.google-earth.kml+xml"],"rtx":["text\/richtext"],"rtf":["text\/rtf"],"jar":["application\/java-archive","application\/x-java-application","application\/x-jar"],"zip":["application\/x-zip","application\/zip","application\/x-zip-compressed","application\/s-compressed","multipart\/x-zip"],"7zip":["application\/x-compressed"],"xml":["application\/xml","text\/xml"],"svg": |
// $Id: hash.mqh 125 2014-03-03 08:38:32Z ydrol $ | |
#ifndef YDROL_HASH_MQH | |
#define YDROL_HASH_MQH | |
//#property strict | |
/* | |
This is losely ported from a C version I have which was in turn modified from hashtable.c by Christopher Clark. | |
Copyright (C) 2014, Andrew Lord (NICKNAME=lordy) <forex@NICKNAME.org.uk> | |
Copyright (C) 2002, 2004 Christopher Clark <firstname.lastname@cl.cam.ac.uk> |