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
""" | |
we tackle the acceptance rejection alogorithm with the beta law | |
It is well established that the rejection method allows to simulate data | |
of the normal law N (0; 1) according to a certain algorithm. | |
""" |
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
Here are two way to delete node modules. | |
# The hard way | |
- cd into your target folder and according to your OS, run the appropriate command | |
- linux based systems: find . -name "node_modules" -type d -prune -exec rm -rf '{}' + | |
- windows: FOR /d /r . %d in (node_modules) DO @IF EXIST "%d" rm -rf "%d" | |
# the easy way |
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
-- From datetime to string | |
-- The third argument of the convert function specifies the datetime format | |
DECLARE @date DATETIME = '2020-10-21 17:38:54.840' | |
BEGIN | |
SELECT CONVERT(varchar, @date, 115) | |
END |
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant.configure("2") do |config| | |
config.vm.box = "generic/debian10" | |
config.vm.box_version = "3.2.2" | |
config.vm.box_url = "https://app.vagrantup.com/generic/boxes/debian10" | |
config.vm.network "forwarded_port", guest: 5433, host: 5433, host_ip: "127.0.0.1" |
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
Workers are just scripts that runs on a separate thread from the main browser thread. Javascipt has 3 categories: | |
- Web workers : general purpose workers | |
- Service workers : proxy between the browser and the network / cache; have custom methods | |
- Worklets: hook into the browser’s rendering pipeline, enabling you to have low-level access to the browser’s rendering processes such as styling and layout | |
Workers: | |
- are registered in the main javascript file of your project | |
- do not have access to the DOM; thus get messages and props via callbacks ( postMessage & onMessage ) |
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
Every browser is backed by a rendering engine to draw the HTML/CSS web page. | |
- Firefox → Gecko | |
- Safari → WebKit | |
- Chrome → Blink (a fork of Webkit). | |
- Opera → Blink (no longer uses Presto since Feb 2013) | |
- IE → Trident (discontinued) | |
- Edge → EdgeHTML (clean-up fork of Trident) (Edge switched to Blink in 2019) | |
css prefixes: |
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
Flexbox layout is most appropriate to the components of an application, and small-scale layouts, | |
while the Grid layout is intended for larger scale layouts. | |
The main idea behind the flex layout is to give the container the ability to alter its items’ width & height (and order) | |
to best fill the available space. | |
shorthand properties: | |
- flex: [flex-grow] [flex-shrink] [flex-basis]; | |
- flex-flow: [flex-direction] [flex-wrap] | |
References: |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<style> | |
.item1 { grid-area: header; } | |
.item2 { grid-area: sidebar; } | |
.item3 { grid-area: main; } | |
.item4 { grid-area: aside; } | |
.item5 { grid-area: footer; } |
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
======================== | |
ODOO building blocs | |
============== | |
I expose Odoo 14 models structure here. Have a look to reference for further informations. | |
1. Models: represents a business object | |
They are built around three main base ORM classes BaseModel, AbstractModel and Model | |
Models are not directly accessible; one should use recordsets to do so. |
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
<!-- https://stackoverflow.com/questions/20801874/how-to-build-an-executable-jar-from-multi-module-maven-project/20802018#20802018 --> | |
<!-- https://stackoverflow.com/questions/574594/how-can-i-create-an-executable-jar-with-dependencies-using-maven?page=1&tab=votes#tab-top --> | |
<build> | |
<plugins> | |
<!-- mvn package --> | |
<plugin> | |
<groupId>org.apache.maven.plugins</groupId> | |
<artifactId>maven-shade-plugin</artifactId> | |
<version>3.2.4</version> |
OlderNewer