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
private int getScreenOrientation() { | |
final WindowManager wm = (WindowManager) getApplicationContext().getSystemService(Context.WINDOW_SERVICE); | |
int rotation = wm.getDefaultDisplay().getRotation(); | |
DisplayMetrics dm = new DisplayMetrics(); | |
wm.getDefaultDisplay().getMetrics(dm); | |
int width = dm.widthPixels; | |
int height = dm.heightPixels; | |
int orientation; | |
// if the device's natural orientation is portrait: |
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 id = setInterval(function () { | |
var val = jQuery(".metadata-display").text(); | |
val++; | |
val--; | |
console.log("Left: " + val); | |
if (val <= 0) { | |
clearInterval(id); | |
return; | |
} |
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
[class^="status"]:first-child{ | |
border-radius: 10px 0px 0px 0px; | |
-moz-border-radius: 10px 0px 0px 10px; | |
-webkit-border-radius: 10px 0px 0px 10px; | |
-ms-border-radius: 10px 0px 0px 10px; | |
} | |
[class="category_totals"]{ | |
border-bottom: 1px solid #B3B3B3; | |
border-right: 1px solid #E5E5E5; |
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
package com.danilov.supermanga.core.repository; | |
import android.support.annotation.NonNull; | |
import android.support.annotation.Nullable; | |
import com.danilov.supermanga.core.http.ExtendedHttpClient; | |
import com.danilov.supermanga.core.util.IoUtils; | |
import org.apache.http.Header; | |
import org.apache.http.HttpResponse; |
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 update(){fpsCount++,bOnSurface&&(sprite.src=hoizontal_motion_direction==MOTION_RIGHT?GRAPHICS.standing_right:GRAPHICS.standing_left),keysDown.indexOf(DOWN)<0&&(bAttemptingToWarp=!1);for(key in keysDown)switch(keysDown[key]){case RIGHT:posX+=current_speed,stage.scrollLeft<WORLD_SIZE&&(stage.scrollLeft=sprite.offsetLeft-stage.offsetWidth/2+sprite.offsetWidth/2),sprite.src=GRAPHICS.running_right,hoizontal_motion_direction=MOTION_RIGHT;break;case JUMP:bOnSurface&&bCanJump&&(bCanJump=!1,setTimeout(function(){bCanJump=!0},GROUNDED_TIMER),gravity_const=-jump_height,posY-=jump_height,bOnSurface=!1,sprite.src=hoizontal_motion_direction==MOTION_RIGHT?GRAPHICS.jumping_right:GRAPHICS.jumping_left);break;case LEFT:sprite.src=GRAPHICS.running_left,posX-=current_speed,stage.scrollLeft=sprite.offsetLeft-stage.offsetWidth/2+sprite.offsetWidth/2,hoizontal_motion_direction=MOTION_LEFT;break;case DOWN:bOnSurface&&(bAttemptingToWarp=!0)}theta++;for(e in elevators)elevators[e].style.top=175+45*Math.sin(theta/80)+"px";coll |
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
#!/bin/bash | |
sudo docker run -v /centrifugo:/centrifugo -p 8001:8000 fzambia/centrifugo centrifugo -w > log.txt & | |
#-v "соединяет" папку на хосте с папкой в контейнере. config.json у меня лежит в /centrifugo | |
#и я хочу, чтобы эта папка так же была доступна в контейнере (по такому же пути) | |
sleep 3 | |
echo $! >/home/semyon/script/centrifugal.pid | |
sudo docker ps -l -q >/home/semyon/script/docker.pid |
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
PackageManager pm = ctx.getPackageManager(); | |
Intent i = new Intent(Intent.ACTION_MAIN); | |
i.addCategory(Intent.CATEGORY_HOME); | |
i.addCategory(Intent.CATEGORY_DEFAULT); | |
List l = pm.queryIntentActivities(i, 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
// | |
// пример базовых морфологических преобразований | |
// cvErode() и cvDilate() | |
// | |
#include <opencv\cv.h> | |
#include <opencv\highgui.h> | |
#include <stdlib.h> | |
#include <stdio.h> | |
#include <stdarg.h> |
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
; Listing generated by Microsoft (R) Optimizing Compiler Version 19.00.23026.0 | |
include listing.inc | |
INCLUDELIB OLDNAMES | |
EXTRN __security_check_cookie:PROC | |
PUBLIC main | |
PUBLIC ?simps@@YANNNN@Z ; simps | |
PUBLIC ?dfx@@YANN@Z ; dfx |
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 %a in (*.png) do convert -negate %a %a_dark.png |