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
# Solution(ruby): Choose as many integers from A as possible so that, when they are put in ascending order, | |
# all of the differences between all pairs of consecutive integers are equal. For example, | |
# for A = [4, 3, 5, 1, 4, 4], you could choose 1, 3 and 5 (with differences equal to 2) or | |
# 4, 4 and 4 (with differences equal to 0). w What is the maximum number of integers that can be chosen? | |
def two_consecutive_integers_differences(ar) | |
diff = [] | |
ar.each do |x| | |
diff << x.sort.each_cons(2).collect{|a,b| b-a}.tally.values.max+1 | |
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
find . -type f -print -exec mv {} . \; |
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
for f in *.mp4; | |
do ffmpeg -i "$f" "${f%mp4}.mp3"; | |
done |
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
@font-face { | |
font-family: 'FuturaBold'; | |
src: url(https://www.if-so.com/wp-content/themes/if-so/fonts/AG_Futura_Bold.woff); | |
} | |
.cw{color: #fff;} | |
.dfx {display: flex;justify-content:center;align-items:center;} | |
.wrapper{background:#fff;} | |
.hdr-content{padding-top:80px;} | |
.hdr-container,.hdr-left-cloud,.hdr-object{-webkit-transform:skew(0,-4.8deg) translateZ(0);transform:skew(0,-4.8deg) translateZ(0);-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-font-smoothing:subpixel-antialiased;} |
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
.container{width:100%;padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}@media (min-width:576px){.container{max-width:540px}}@media (min-width:768px){.container{max-width:720px}}@media (min-width:992px){.container{max-width:960px}}@media (min-width:1200px){.container{max-width:1140px}}.container-fluid{width:100%;padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}.row{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-right:-15px;margin-left:-15px}.no-gutters{margin-right:0;margin-left:0}.no-gutters>.col,.no-gutters>[class*=col-]{padding-right:0;padding-left:0}[class*=lg-],[class*=md-],[class*=sm-],[class*=xl-]{position:relative;width:100%;padding-right:1%;padding-left:1%}@media (min-width:576px){.sm-1{max-width:8.33%}.sm-2{max-width:16.66%}.sm-3{max-width:25%}.sm-4{max-width:33.33%}.sm-5{max-width:41.66%}.sm-6{max-width:50%}.sm-7{max-width:58.33%}.sm-8{max-width:66.66%}.sm-9{max-width:75%}.sm-10{max-width:83.33%}.sm-11{max-width:91.66%}.sm-12{m |
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
function check_page_details() { | |
echo "is_search() : ".is_search(); | |
echo "<br>is_404() : ".is_404(); | |
echo "<br>is_archive() : ".is_archive(); | |
echo "<br>is_category() : ".is_category(); | |
echo "<br>is_tag() : ".is_tag(); | |
echo "<br>is_tax() : ".is_tax(); | |
echo "<br> is_single()".is_single(); | |
echo "<br>get_page_template_slug() : ".get_page_template_slug(); |
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
.noscrollbar::-webkit-scrollbar { | |
width: 0px; | |
background: transparent; | |
} | |
.noscrollbar::-webkit-scrollbar-thumb { | |
background: transparent; | |
} | |
.noscrollbar { | |
-ms-overflow-style: none; | |
scrollbar-width: none; |
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
els=document.getElementsByClassName("type_course depth_3");for(i in els)code=els[i].childNodes[0].childNodes[0].innerHTML.split("_")[0],els[i].childNodes[0].childNodes[0].innerHTML=els[i].childNodes[0].childNodes[0].getAttribute("title")+" "+code; |
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
video_url="$1" | |
exe() { echo "\$ @" ; "$@" ; } | |
title=`youtube-dl --get-filename -o "%(title)s.%(ext)s" $video_url` | |
exe youtube-dl -f 136 $video_url -o tvideo.mp4 | |
exe youtube-dl -f 140 $video_url -o taudio.m4a | |
exe ffmpeg -i tvideo.mp4 -i taudio.m4a -c copy "$title" | |
exe rm tvideo.mp4 | |
exe rm taudio.m4a |
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
<?php | |
$custom_types = array( | |
array( | |
'name' => 'test_winner', | |
'icon' => 'dashicons-awards', | |
), | |
array( | |
'name' => 'product', | |
'icon' => 'dashicons-smartphone', |
NewerOlder