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
public byte[] generateFile(File file, long size) throws IOException, NoSuchAlgorithmException { | |
Random random = new Random(); | |
byte[] data = new byte[1024]; | |
if (!file.exists()) { | |
file.createNewFile(); | |
} | |
try (FileOutputStream outStream = new FileOutputStream(file)) { | |
for (int j = 0; j < size / 1024; j++) { |
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
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> | |
<body> | |
<input type="file" id="theFile" /> | |
<image id="myimage" /> | |
<script type="text/javascript"> | |
document.getElementById('theFile').addEventListener('change', example); | |
function example(evt) { | |
var files = evt.target.files; |
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
Sub updateFormulsTextSyle() | |
On Error Resume Next | |
Dim F As Word.Field | |
Dim N1 As Long, N2 As Long | |
Application.ScreenUpdating = False | |
N1 = 0: N2 = 0: N3 = ActiveDocument.Fields.Count | |
percent = "" | |
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
Абрамов | |
Авдеев | |
Агафонов | |
Аксёнов | |
Александров | |
Алексеев | |
Андреев | |
Анисимов | |
Антонов | |
Артемьев |
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
//it is app/build.gradle | |
apply plugin: 'com.android.application' | |
apply plugin: 'io.fabric' | |
apply plugin: 'me.tatarka.retrolambda' | |
android { | |
compileSdkVersion 23 | |
buildToolsVersion "23.0.1" | |
defaultConfig { |
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
public static Subscription action() { | |
return Observable.create(new LoadConfig()) | |
.subscribe(new Action1<Config>() { | |
@Override | |
public void call(Config config) { | |
if (config.nedToUpdate()) { | |
//данных нет обновляемся | |
update(); | |
} else { | |
if (config.nedToBeSend()) { |
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
import android.content.Context; | |
import android.content.res.Resources; | |
import android.graphics.Canvas; | |
import android.graphics.Paint; | |
import android.graphics.PorterDuff; | |
import android.graphics.PorterDuffXfermode; | |
import android.util.AttributeSet; | |
import android.view.SurfaceView; | |
public class HoleSurfaceView extends SurfaceView { |