start new:
tmux
start new with session name:
tmux new -s myname
# ORACLE/PLSQL - NVL(A, B) EXAMPLES | |
# If A IS NULL substitute with B | |
# Example 1. if table b contains values that over-write values in table a | |
SELECT NVL(b.name, a.name) AS name FROM a left join b on a.id = b.id; | |
# Example 2. to replace NULL values with an alternative placeholder value | |
SELECT NVL(a.name, 'Unnamed') AS name FROM a; |
# Author = Nikhil Venkat Sonti | |
# email = [email protected] | |
# github ID = shadowfax92 | |
import sys | |
from xml.dom.minidom import _get_StringIO | |
from lxml import html | |
import requests | |
import os | |
import re | |
import time |
# | |
# Place this script inside /etc/profile.d/ to set proxy on log in | |
# AND | |
# Copy-paste in to your ~/.bashrc to switch between proxies easily in shells | |
# | |
# | |
# DEFAULTS | |
# | |
# Set default proxy details here. Eg. |
#AnubhavBalodhi, Puzzling.SE, 7804, 23216, 314... | |
N=int(input()) | |
for num in range(N): | |
for X in range(2,N-8): | |
if (8*((num*(num+1)-8*(X+3))))==(825*(num-4)): | |
print(X,num) | |
#BeDaBe(a)st |
$ jupyter notebook
New -> Python (root)
from the right-hand top menu. It will open another tab. In the cell, on that new tab, enter the following command : import pandas as pd
shift+enter
to run it. If it runs fine, you are good to go for the workshop./* https://puzzling.stackexchange.com/questions/60942/biggest-army-on-a-chessboard | |
Reminder | |
Everybody knows that we can place 8 queens in a chessboard without threatening each other (see There). same reasonment can be made for knights, bishops, rooks and kings. Giving respectively 32 knights, 14 bishops, 8 rooks, and 16 kings. | |
Problem | |
If we assign to each type of piece a value invertly proportionnal of the number of this we can place. It means Knights = 1/32. Bishop = 1/14. Rook = 1/8. Queen =1/8 and King = 1/16. | |
What is the best sum value we can achieve mixing these pieces still with none able to take each other?*/ | |
/* |
const express = require('express'); | |
const request = require('request'); | |
const app = express(); | |
app.use((req, res, next) => { | |
res.header('Access-Control-Allow-Origin', '*'); | |
next(); | |
}); |