Skip to content

Instantly share code, notes, and snippets.

{"lastUpload":"2020-06-19T06:36:25.778Z","extensionVersion":"v3.4.3"}
// clicked on question on test menu
JSONObject eventProperties = new JSONObject();
try
{
eventProperties.put("question number", "10");
} catch (JSONException exception) {
}
Amplitude.getInstance().logEvent("clicked on question on test menu", eventProperties);

Docker configuration for mac

Docker on mac does work without any modification but it does really slowly (because it uses virutal disk drive rather than physical one on linux)

Make docker fast again (docker-sync)

  1. Install docker-sync: http://docker-sync.io/
  2. If you are the first one that uses docker-sync on your project, you need to configure docker-compose.yml file
  • Change every volume root to docker-sync. For example: - ./:/var/www/html:cached to - docker-sync:/var/www/html
  1. Start the docker sync Before starting docker containers with docker-sync start
  2. Start your docker containers as normal for example docker-composer start
import time #laiko biblioteka
start_time = time.time() #pradedama skaičiuoti laiką
#aprašoma rekursinė poaibių sumos skaičiavimo funkcija
def poaibiai(dabsuma,gal,mas,iras,n):
if gal==suma :
for i in range(0,n):
if iras[i]:
print (mas[i])
public static void main(String[] args) {
Objektas labas = new Objektas();
System.out.println(labas.a); // atspausdinamas objekto kintamasis
}
public class Main {
public static void main(String[] args) {
Objektas labas = new Objektas(""); //sukuriamas objektas
labas.get(); // objekto metodas
}
}
public class Objektas {
void get(){
System.out.println("sveiki");
public class Animal {
public static void hide() {
System.out.println("The hide method in Animal.");
}
public void override() {
System.out.println("The override method in Animal.");
}
}
class GrandParent {
//klasė kuri yra paveldima parent klasės
int a;
//šie du metodai nėra panaudojami nes perrašomi parent konstruktoriumi
GrandParent(int a) {
this.a = a;
}
GrandParent(String a) {
this.a = a;
}
package com.company;
public class Language {
String name; // Apsirašomas globalus kintamasis
Language() { //konstruktoriaus funkcija
System.out.println("Dėmesio: \t Kviečiamas konstruktorius!");
}
Language(String t) {
name = t;
}
section.image-header span {
text-shadow: 0 0 5px rgba(0,0,0,.5);
font-size: 33px;
position: absolute;
text-transform: uppercase;
top: calc(50% - 34px);
left: 30px;
}
section.image-header {
position: relative;