Skip to content

Instantly share code, notes, and snippets.

View musoftware's full-sized avatar
🌏
Working from home

Musoftware musoftware

🌏
Working from home
View GitHub Profile
@musoftware
musoftware / bigHash.cs
Created May 20, 2017 21:20
BigHashSet for x86
public class BigHashSet<T>
{
int count = 0;
private List<HashSet<T>> hashes = new List<HashSet<T>>();
public void Add(T item)
{
int pos = count / 10000000;
if (pos >= hashes.Count)
{
hashes.Add(new HashSet<T>());
@musoftware
musoftware / readonly.cs
Created June 10, 2017 15:40
ReadOnly ReAssign
using System;
class Program
{
class _class
{
public readonly int readOnly = 1;
public _class() { }
public _class(int newValue)
{
@musoftware
musoftware / program1.java
Created June 10, 2017 21:45
The first Java program
import java.lang.*;
public class First {
public static void main(String[] args) {
System.out.println("This is my first Java program.");
}
}
/*
@musoftware
musoftware / bkg.cs
Last active July 4, 2017 19:48
My Background Worker in Button Fast
public class BkGround
{
public class ResultCls
{
public Exception ex { get; set; }
public object output { get; set; }
public ResultCls()
{
}
@musoftware
musoftware / gist:114af452665309c7070aba4aa82447c1
Last active August 16, 2017 17:33
C# BigHashSet Class Greater than 2Gb.
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{
@musoftware
musoftware / threads.cs
Last active July 19, 2017 02:37
Thread Pool
class MyThreadPool
{
private volatile int _inQueue;
private volatile int _outQueue;
private volatile int _total;
CancellationTokenSource cts = new CancellationTokenSource();
public float Percentage
{
get
@musoftware
musoftware / php.ini
Last active July 12, 2020 12:12
Php Config for wordpress
memory_limit = 2048M
upload_max_filesize = 64M
post_max_size = 64M
max_execution_time = 50000
max_input_vars = 3000
@musoftware
musoftware / .htaccess
Created August 5, 2017 00:26
.htaccess for wordpress
# change the <USR> with your cpanel username
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
@musoftware
musoftware / gist:6373f219e4fbfd9f68bb7ae18e1554ff
Created August 16, 2017 17:32
C# Big Array Class One Dimensional Array Greater than 2Gb.
[Serializable]
public class BigArray<T> : IEnumerable<T>
{
private readonly T[][] _arrays;
public ulong Length { get; private set;}
public T this[ulong index]
{
get
{
@musoftware
musoftware / AverageValues
Last active October 26, 2017 21:42
AverageValues Calc Best Result
public class AverageValues
{
public int intialValue { get; private set; }
public int currentValue = 0;
double oldResult = 0;
bool StopIncrease = false;
int incrementValue = 0;
public AverageValues(int intialValue = 100, int incrementValue = 10)
{
this.intialValue = intialValue;