-
git init
-
git add .
-
git commit -m "initial commit"
-
heroku create fooName
-
git remote -v
-
heroku git:remote -a fooName
-
git push heroku master
-
открываем fooname.herokuapp.com
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 java.io.File; | |
import java.io.IOException; | |
import java.util.*; | |
/** | |
* Created by TEACHER on 22.02.2017. | |
*/ | |
public class Collections { | |
public static void main(String[] args) { | |
Stack<Integer> stack = new Stack<>(); |
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 java.io.File; | |
import java.io.FileInputStream; | |
import java.util.Map; | |
import java.util.Scanner; | |
import java.util.TreeMap; | |
/** | |
* Created by altairlab on 10.04.2017. | |
*/ | |
public class Football { |
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 void sendRequest(View view) { | |
RequestQueue queue = Volley.newRequestQueue(getApplicationContext()); | |
String a = aValue.getText().toString(); | |
String b = bValue.getText().toString(); | |
String url = "https://pteachertest.herokuapp.com/calc/?a="+a+"&b="+b; | |
StringRequest request = new StringRequest(Request.Method.GET, url, | |
new Response.Listener<String>() { | |
@Override | |
public void onResponse(String s) { |
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
<?php | |
require_once '../dbconnect.php'; | |
//pg_query($db, "INSERT INTO klik (kliks) VALUES (0)"); | |
$result = pg_query($db, "UPDATE klik SET kliks = kliks + 1 WHERE id = 1;"); | |
$result = pg_query($db, "select * from klik"); | |
echo pg_fetch_all($result)[0]['kliks']; | |
?> |
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
/* | |
compile 'com.android.volley:volley:1.0.0' | |
compile 'com.google.code.gson:gson:2.2.4' | |
compile 'com.squareup.retrofit2:retrofit:2.3.0' | |
*/ | |
public void sendRequest(View view) { | |
RequestQueue queue = Volley.newRequestQueue(getApplicationContext()); |
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
package com.company; | |
import java.util.Scanner; | |
public class Main { | |
static Scanner in = new Scanner(System.in); | |
private static int sumOfDigits(int num) { | |
return num / 10 + num % 10; | |
} |
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
package com.company; | |
import java.util.Scanner; | |
public class Main { | |
static Scanner in = new Scanner(System.in); | |
public static void main(String[] args) { | |
int n = in.nextInt(); | |
int[][] a = new int[n][n]; | |
for (int i = 0; i < n; i++) { | |
for (int j = 0; j < n; 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
package com.company; | |
import java.util.Arrays; | |
import java.util.Scanner; | |
public class Main { | |
static Scanner in = new Scanner(System.in); | |
public static void main(String[] args) { | |
Point p1 = new Point(); | |
p1.setXY(); | |
p1.getXY(); |
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 javax.swing.*; | |
import java.awt.*; | |
import java.awt.event.ActionEvent; | |
import java.awt.event.ActionListener; | |
public class Draw extends JPanel { | |
static int x = 0; | |
static int delay = 10; | |
static int speed = 5; | |
public static void main(String[] args) { |
OlderNewer