All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
Here we write upgrading notes for brands. It's a team effort to make them as
package main | |
import ( | |
"runtime" | |
"fmt" | |
"time" | |
) | |
func main() { | |
// Print our starting memory usage (should be around 0mb) |
type Set struct { | |
list map[int]struct{} //empty structs occupy 0 memory | |
} | |
func (s *Set) Has(v int) bool { | |
_, ok := s.list[v] | |
return ok | |
} |
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
Here we write upgrading notes for brands. It's a team effort to make them as
from | to | description |
---|---|---|
0 | 10,000 | System items (including junkyards and other special purpose items |
500,000 | 1,000,000 | Factions |
1,000,000 | 2,000,000 | NPC corporations |
3,000,000 | 4,000,000 | NPC characters (agents and NPC corporation CEO's) |
9,000,000 | 10,000,000 | Universes |
10,000,000 | 11,000,000 | NEW-EDEN Regions |
11,000,000 | 12,000,000 | Wormhole Regions |
12,000,000 | 13,000,000 | Abyssal regions |
Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.
package main | |
import ( | |
"context" | |
"fmt" | |
"log" | |
"net/http" | |
"time" | |
) |
How to generate graphic model Django with PyGraphViz?
sudo apt-get install -y graphviz libgraphviz-dev pkg-config
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
pip install pygraphviz
pip uninstall pyparsing
pip install -Iv https://pypi.python.org/packages/source/p/pyparsing/pyparsing-1.5.7.tar.gz#md5=9be0fcdcc595199c646ab317c1d9a709
# Based on post from: https://snipt.net/chrisdpratt/symmetrical-manytomany-filter-horizontal-in-django-admin/#L-26 | |
# Only reposting to avoid loosing it. | |
""" | |
When adding a many-to-many (m2m) relationship in Django, you can use a nice filter-style multiple select widget to manage entries. However, Django only lets you edit the m2m relationship this way on the forward model. The only built-in method in Django to edit the reverse relationship in the admin is through an InlineModelAdmin. | |
Below is an example of how to create a filtered multiple select for the reverse relationship, so that editing entries is as easy as in the forward direction. | |
IMPORTANT: I have no idea for what exact versions of Django this will work for, is compatible with or was intended for. |
IMAGETYPE_UNKNOWN 0 | |
IMAGETYPE_GIF 1 | |
IMAGETYPE_JPEG 2 | |
IMAGETYPE_PNG 3 | |
IMAGETYPE_SWF 4 | |
IMAGETYPE_PSD 5 | |
IMAGETYPE_BMP 6 | |
IMAGETYPE_TIFF_II 7 | |
IMAGETYPE_TIFF_MM 8 | |
IMAGETYPE_JPEG2000 9 |
<?php | |
/** | |
* Draw a rectangle with rounded corners. | |
* @param ressource &$img An image resource | |
* @param int $x1 Upper left x coordinate | |
* @param int $y1 Upper left y coordinate | |
* @param int $x2 Bottom right x coordinate | |
* @param int $y2 Bottom right y coordinate | |
* @param int $r Corners radius | |
* @param int $color A color identifier created with imagecolorallocate() |