Skip to content

Instantly share code, notes, and snippets.

@Climber24
Climber24 / SVG_CSS_animation.html
Created January 3, 2021 07:39
An example of SVG animated with CSS.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Пример зацикленной SVG-анимации, заданной в CSS</title>
</head>
<body>
<style>
* {
List list = new ArrayList();
try {
list = Files.readAllLines(Paths.get(this.fullFileName), StandardCharsets.UTF_8);
} catch (IOException e) {}
public class Singleton
{
private static Singleton singletone = new Singleton();
private static int counter = 0;
private Singleton() {}
static Singleton getInstance() {
return singletone;
}
}
@Climber24
Climber24 / JAVA Cyrillic file reading.java
Last active January 24, 2017 16:01
JAVA Reading cyrillic file with BufferedReader and FileInputStream
public class FileCyrillic
{
public static void main(String[] args) throws IOException
{
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
String fileName = reader.readLine();
final BufferedReader br = new BufferedReader( new InputStreamReader(new FileInputStream(fileName),
"UTF8"));
String nextString;
while ((nextString = br.readLine()) != null) {
@Climber24
Climber24 / JAVA File BufferedReader.java
Last active January 24, 2017 16:01
JAVA BufferedReader for files with encoding
final BufferedReader br = new BufferedReader(
new InputStreamReader(
new FileInputStream(fileName), "UTF8"));
@Climber24
Climber24 / JAVA Bubble sorting with do-while.java
Last active January 24, 2017 16:01
JAVA Alternative bubble sorting with do-while cycle and boolean variable
public static void sort(int[] array)
{
boolean thereIsBubbling;
int temp;
do {
thereIsBubbling = false;
for (int i = 0; i < array.length - 1; i++)
{
if (array[i] > array[i + 1])
{
@Climber24
Climber24 / HTML technique for solving spaces in inline blocks.html
Created January 16, 2017 11:55
HTML technique for solving spaces in inline blocks
<ul>
<li>
Один</li><li>
Два</li><li>
Три</li>
</ul>
@Climber24
Climber24 / PHP file reading.php
Created January 6, 2017 14:38
PHP file reading
<?php
$fh = fopen("read.php","r");
if (!$fh) die("Cannot open file");
while (!feof ($fh))
{
$line = fgets($fh);
echo $line,"<br>";
}
fclose($fh);
@Climber24
Climber24 / JAVA defining and printing out StackTrace.java
Created January 5, 2017 19:11
JAVA defining and printing out StackTrace
StackTraceElement[] stackTraceElements = Thread.currentThread().getStackTrace();
for (StackTraceElement element : stackTraceElements)
{
System.out.println(element.getMethodName());
}
@Climber24
Climber24 / HTML5 video tag.html
Created January 4, 2017 17:18
HTML5 video tag
<video
controls
preload="metadata"
width="777" height="777">
poster=
<source src="video.mp4" type="video/mp4">
<source src="video.ogv" type="video/ogg">
<source src="video.webm" type="video/webm">
</video>