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
| echo -e "\e[1;40m" ; clear ; while :; do echo $LINES $COLUMNS $(( $RANDOM % $COLUMNS)) $(( $RANDOM % 72 )) ;sleep 0.05; done|awk '{ letters="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@#$%^&*()"; c=$4; letter=substr(letters,c,1);a[$3]=0;for (x in a) {o=a[x];a[x]=a[x]+1; printf "\033[%s;%sH\033[2;32m%s",o,x,letter; printf "\033[%s;%sH\033[1;37m%s\033[0;0H",a[x],x,letter;if (a[x] >= $1) { a[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
| function updateURL() { | |
| if (history.pushState) { | |
| var newurl = window.location.protocol + "//" + window.location.host + window.location.pathname + '?para=hello'; | |
| window.history.pushState({path:newurl},'',newurl); | |
| } | |
| } |
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
| dependencies { | |
| testImplementation "junit:junit:4.12" | |
| testImplementation "org.mockito:mockito-core:2.15.0" | |
| testImplementation "io.kotlintest:kotlintest:2.0.7" | |
| testImplementation 'org.powermock:powermock-module-junit4-rule:2.0.0-beta.5' | |
| testImplementation 'org.powermock:powermock-core:2.0.0-beta.5' | |
| testImplementation 'org.powermock:powermock-module-junit4:2.0.0-beta.5' | |
| testImplementation 'org.powermock:powermock-api-mockito2:2.0.0-beta.5' | |
| } |
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
| FROM php:7.1.2-apache | |
| RUN docker-php-ext-install mysqli |
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 class RequestRetryingHelper implements InternetConnectionListener, RetryableRequest.OnRetryCalledListener { | |
| private boolean receiverPaused; | |
| private NetworkConnectionBroadcastReceiver networkConnectionBroadcastReceiver; | |
| private final ArrayList<RetryableRequest> retryables = new ArrayList<>(); | |
| private MessageCallback messageCallback; | |
| public void onResume(@Nullable Context context) { | |
| if (networkConnectionBroadcastReceiver != null) { | |
| registerNetworkReceiver(context); | |
| } |
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 class KeyboardUtils { | |
| public static Observable<KeyboardStatus> status(Activity activity) { | |
| Observable<KeyboardStatus> observable = Observable.create(emitter -> { | |
| if (emitter.isDisposed()) { | |
| return; | |
| } | |
| View rootView = activity.findViewById(android.R.id.content); | |
| ViewTreeObserver.OnGlobalLayoutListener globalLayoutListener = () -> { |
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
| var fetchingMore = false | |
| func scrollViewDidScroll(_ scrollView: UIScrollView) { | |
| let offsetY = scrollView.contentOffset.y | |
| let contentHeight = scrollView.contentSize.height | |
| if offsetY > contentHeight - scrollView.frame.height * 4 { | |
| if !fetchingMore { | |
| beginBatchFetch() | |
| } |
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
| {% macro recursiveCategory(category) %} | |
| <li> | |
| <h4><a href="{{ path(category.route, category.routeParams) }}">{{ category }}</a></h4> | |
| {% if category.children|length %} | |
| <ul> | |
| {% for child in category.children %} | |
| {{ _self.recursiveCategory(child) }} | |
| {% endfor %} | |
| </ul> |
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
| <?php | |
| /** | |
| * StatusCodes provides named constants for | |
| * HTTP protocol status codes. Written for the | |
| * Recess Framework (http://www.recessframework.com/) | |
| * | |
| * @author Kris Jordan | |
| * @license MIT | |
| * @package recess.http | |
| * |