This file contains hidden or 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
[alias] | |
puch = "!f() { \ | |
printf [$1]'\n' && git push $1 $3 && printf '\n'[$2]'\n' && git push $2 $3; \ | |
}; f" |
This file contains hidden or 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
document.querySelectorAll('.commits-row a.commit-row-message').forEach(x => console.log(x.textContent,":\n",x.href)) |
This file contains hidden or 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
for i in `ls`; do echo "--- Pushing $i"; cd $i; for j in `git remote`; do git push $j master; echo "pushed to $j"; done; cd ..; echo "--- Finished $i"; done; |
This file contains hidden or 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
/* Multi color */ | |
* { background-color: rgba(255,0,0,.2); } | |
* * { background-color: rgba(0,255,0,.2); } | |
* * * { background-color: rgba(0,0,255,.2); } | |
* * * * { background-color: rgba(255,0,255,.2); } | |
* * * * * { background-color: rgba(0,255,255,.2); } | |
* * * * * * { background-color: rgba(255,255,0,.2); } | |
* * * * * * * { background-color: rgba(255,0,0,.2); } | |
* * * * * * * * { background-color: rgba(0,255,0,.2); } | |
* * * * * * * * * { background-color: rgba(0,0,255,.2); } |
This file contains hidden or 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
// Using class name | |
[...document.querySelectorAll('img.FFVAD')] | |
// Using alt text | |
[...document.querySelectorAll('img')].filter(img => img.alt.includes('Image may contain') || img.alt.includes.('No photo description available.')) |
This file contains hidden or 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
auto _=[](){ios::sync_with_stdio(0);cin.tie(0);return cout.tie(0);}(); |
This file contains hidden or 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
public static int diagonalDifference(List<List<Integer>> arr) { | |
// Write your code here | |
int n = arr.size(); | |
int dP = 0; | |
int dS = 0; | |
for(int i = 0; i < n; ++i) { | |
int pos = (i*(n+1))%n; | |
dP += arr.get(i).get(pos); | |
dS += arr.get(i).get(n-1-pos); | |
} |
This file contains hidden or 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
def diagonalDifference(arr): | |
# Write your code here | |
n = len(arr) | |
dP = 0 | |
dS = 0 | |
for i in range(n): | |
pos = (i*(n+1))%n | |
dP += arr[i][pos] | |
dS += arr[i][n-1-pos] | |
return abs(dP - dS) |
This file contains hidden or 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
def plusMinus(arr): | |
# | |
# Write your code here. | |
# | |
n = len(arr) | |
pos = 0 | |
neg = 0 | |
nada = 0 | |
for x in arr: | |
if x > 0: |
This file contains hidden or 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
static void plusMinus(int[] arr) { | |
int n = arr.length; | |
float pos = 0; | |
float neg = 0; | |
float nada = 0; | |
for (int x : arr) { | |
if (x>0) ++pos; | |
else if (x<0) ++neg; | |
else ++nada; | |
} |