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
1 : Shutdown or Quit your XAMPP server from Xampp control panel. | |
2 : Download the ZIP version of MariaDB | |
3 : Rename the xampp/mysql folder to mysql_old. | |
4 : Unzip or Extract the contents of the MariaDB ZIP file into your XAMPP folder. | |
5 : Rename the MariaDB folder, called something like mariadb-5.5.37-win32, to mysql. | |
6 : Rename xampp/mysql/data to data_old. | |
7 : Copy the xampp/mysql_old/data folder to xampp/mysql/. | |
8 : Copy the xampp/mysql_old/backup folder to xampp/mysql/. | |
9 : Copy the xampp/mysql_old/scripts folder to xampp/mysql/. |
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
<?php | |
$countries = array | |
( | |
'AF' => 'Afghanistan', | |
'AX' => 'Aland Islands', | |
'AL' => 'Albania', | |
'DZ' => 'Algeria', | |
'AS' => 'American Samoa', | |
'AD' => 'Andorra', |
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
[Serializable] | |
public class BigArray<T> : IEnumerable<T> | |
{ | |
private readonly T[][] _arrays; | |
public ulong Length { get; private set;} | |
public T this[ulong index] | |
{ | |
get | |
{ |
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
public class BigHashSet<T> : IEnumerable<T> | |
{ | |
private const ulong StartSize = 1 << 19; | |
private BigArray<ulong> _hashBuckets; | |
private ulong _hashCode; | |
private BigArray<Slot> _slots; | |
public ulong Count { get; private set; } | |
public ulong Length {get{ |
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 Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
class ShortId | |
{ | |
public static readonly string Alphabet = "abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; | |
private static decimal BcPow(double a, double b) | |
{ | |
return Math.Floor((decimal)Math.Pow(a, b)); | |
} | |
public static ulong Decode(string value, int pad = 0) |
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
<?php | |
/** | |
* Translates a number to a short alhanumeric version | |
* | |
* Translated any number up to 9007199254740992 | |
* to a shorter version in letters e.g.: | |
* 9007199254740989 --> PpQXn7COf | |
* | |
* specifiying the second argument true, it will | |
* translate back e.g.: |