- perform system update
- if you do it later it will ask for all kind of permissions to override various config files
- change password for root
- default password is user
###Fix trackpad sudo apt-get install git
| from polygenerator import random_polygon | |
| import matplotlib.pyplot as plt | |
| def is_inside(edges, xp, yp): | |
| cnt = 0 | |
| for edge in edges: | |
| (x1, y1), (x2, y2) = edge | |
| if (yp < y1) != (yp < y2) and xp < x1 + ((yp-y1)/(y2-y1))*(x2-x1): | |
| cnt += 1 |
| // see https://eopxd.com/2020/08/30/morris-traversal/ for explaination | |
| #include <iostream> | |
| #include <cassert> | |
| #include <vector> | |
| #include <memory> | |
| using namespace std; | |
| template<class T> | |
| struct Tree { |
| // "License": Public Domain | |
| // I, Mathias Panzenböck, place this file hereby into the public domain. Use it at your own risk for whatever you like. | |
| // In case there are jurisdictions that don't support putting things in the public domain you can also consider it to | |
| // be "dual licensed" under the BSD, MIT and Apache licenses, if you want to. This code is trivial anyway. Consider it | |
| // an example on how to get the endian conversion functions on different platforms. | |
| #ifndef PORTABLE_ENDIAN_H__ | |
| #define PORTABLE_ENDIAN_H__ | |
| #if (defined(_WIN16) || defined(_WIN32) || defined(_WIN64)) && !defined(__WINDOWS__) |
| package com.develer.circularsliderule; | |
| import android.content.Context; | |
| import android.graphics.Canvas; | |
| import android.graphics.drawable.Drawable; | |
| import android.util.AttributeSet; | |
| import android.util.Log; | |
| import android.view.MotionEvent; | |
| import android.view.ScaleGestureDetector; | |
| import android.view.View; |
| #include <errno.h> | |
| #include <fcntl.h> | |
| #include <netdb.h> | |
| #include <netinet/in.h> | |
| #include <netinet/tcp.h> | |
| #include <stdlib.h> | |
| #include <stdio.h> | |
| #include <strings.h> | |
| #include <sys/socket.h> | |
| #include <sys/types.h> |
| """ | |
| Simple Linear Probabilistic Counters | |
| Credit for idea goes to: | |
| http://highscalability.com/blog/2012/4/5/big-data-counting-how-to-count-a-billion-distinct-objects-us.html | |
| http://highlyscalable.wordpress.com/2012/05/01/probabilistic-structures-web-analytics-data-mining/ | |
| Installation: | |
| pip install smhasher | |
| pip install bitarray |
| /* Skip Lists: A Probabilistic Alternative to Balanced Trees */ | |
| #include <stdlib.h> | |
| #include <stdio.h> | |
| #include <limits.h> | |
| #define SKIPLIST_MAX_LEVEL 6 | |
| typedef struct snode { | |
| int key; |
| /* | |
| * Licensed to the Apache Software Foundation (ASF) under one | |
| * or more contributor license agreements. See the NOTICE file | |
| * distributed with this work for additional information | |
| * regarding copyright ownership. The ASF licenses this file | |
| * to you under the Apache License, Version 2.0 (the | |
| * "License"); you may not use this file except in compliance | |
| * with the License. You may obtain a copy of the License at | |
| * | |
| * http://www.apache.org/licenses/LICENSE-2.0 |
| <?php | |
| class base58 | |
| { | |
| static public $alphabet = "123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"; | |
| public static function encode($int) { | |
| $base58_string = ""; | |
| $base = strlen(self::$alphabet); | |
| while($int >= $base) { |