This is a simple application that manages a shopping list. It's made with D3js and Bootstrap. Here is a tutorial where I explain how the code works.
Theese files describe my preferences on sublime text
I've included my own theme (a derivative from Eathsong) but most of the time i'm on Tomorrow. Actually the theme I like the most is Solarized Light but as I use f.lux, Solarized is too dark/yellow and Tomorrow is ok.
Ce script contient deux fonctions permettant de changer le typage d'une colonne serial
de Postgres en integer
et vice-versa.
Le type serial
est simplement un integer
couplé à une séquence. Il s'agit donc simplement de créer/supprimer la séquence et de changer la valeur par défaut de la colonne.
Postgres n'empêche pas de spécifier la valeur d'un champ serial sur une requête insert mais des outils comme FME peuvent traiter les colonnes serial différemment. Il est donc utile de pouvoir les désactiver temporairement.
Le nom du champ est id
par défaut ici. À changer si nécessaire.
DECLARE | |
TYPE curs IS REF CURSOR; | |
c curs; | |
q varchar2(200); | |
idx VARCHAR(200); | |
tab VARCHAR(200); | |
col VARCHAR(200); | |
BEGIN | |
q := 'select index_name,table_name,column_name from user_sdo_index_info'; | |
OPEN c FOR q; |
defmodule Day4 do | |
def run(range_str) do | |
[from, to] = | |
range_str | |
|> String.split("-") | |
|> Enum.map(&String.to_integer/1) | |
Range.new(from, to) | |
|> Stream.map(&to_charlist/1) | |
|> Stream.filter(&has_increasing_digits/1) |
--- | |
Disease-it: | |
url: "http://disease-it.jeuweb.org/" | |
image: "https://img.itch.zone/aW1nLzMxMTA5ODQucG5n/original/zO55Li.png" | |
description: | |
email: arnaud.degouy@hotmail.fr | |
id_thread: 12568 | |
"L'ile du coeur": | |
url: http://www.ile-du-coeur.com/ |
defmodule Constants.Compiler do | |
@moduledoc false | |
defmacro __using__(_) do | |
quote do | |
Module.register_attribute(__MODULE__, :const_def, accumulate: true) | |
import unquote(__MODULE__), only: [const: 2] | |
@before_compile unquote(__MODULE__) | |
end | |
end |
defmodule Heater do | |
import Kernel, except: [spawn_link: 1] | |
def spawn_link() do | |
Kernel.spawn_link(fn -> init() end) | |
end | |
defp init() do | |
send(self(), :heat) | |
loop_idle() |
#!/usr/bin/env elixir | |
Mix.install([:jason]) | |
defmodule Heater do | |
import Kernel, except: [spawn_link: 1] | |
def spawn_link() do | |
Kernel.spawn_link(fn -> init() end) | |
end |
defmodule Aoe.Y21.Day16 do | |
alias Aoe.Input, warn: false | |
@type input_path :: binary | |
@type file :: input_path | %Aoe.Input.FakeFile{} | |
@type part :: :part_one | :part_two | |
@type input :: binary | File.Stream.t() | |
@type problem :: any | |
require Record |