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 javax.script.ScriptEngine; | |
import javax.script.ScriptEngineManager; | |
import javax.script.ScriptException; | |
import java.io.IOException; | |
import java.io.PrintWriter; | |
import java.net.ServerSocket; | |
import java.net.UnknownHostException; | |
import java.util.Arrays; |
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
using System; | |
using System.Linq; | |
using System.Net; | |
using System.Net.Http; | |
using System.Runtime.CompilerServices; | |
using System.Text.Json; | |
using System.Threading.Tasks; | |
namespace JsonPlay | |
{ |
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
using System; | |
using System.Data.SqlClient; | |
using System.Drawing; | |
using System.Linq; | |
using HashcodeToColor; | |
namespace HashcodeToColor | |
{ |
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
using System; | |
using System.Collections.Generic; | |
using ServiceStack; | |
using ServiceStack.Text; | |
using ServiceStack.OrmLite; | |
using ServiceStack.OrmLite.Sqlite; | |
using ServiceStack.DataAnnotations; | |
public class User | |
{ |
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
const clienti = [ | |
{ idClient: 121, idJudet: 1 }, | |
{ idClient: 221, idJudet: 1 }, | |
{ idClient: 343, idJudet: 2 }]; | |
let dupes = {}; | |
let rez = []; | |
clienti.forEach(count => { |
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
CREATE TABLE `cases` ( | |
`id` bigint(20) NOT NULL, | |
`cases` bigint(20) DEFAULT NULL, | |
`date` date DEFAULT NULL, | |
PRIMARY KEY (`id`), | |
CONSTRAINT date_cases UNIQUE (cases , date) | |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci |
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
static Runnable task = Main::socketPlay; | |
private static void socketPlay() { | |
int count = 0; | |
try (var serverSocket = new ServerSocket(80)){ | |
var socket = serverSocket.accept(); | |
try (var output = new PrintWriter(socket.getOutputStream(), true)) { | |
while (count <=10) { | |
output.println(generateRandomStrings()); |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
int[][][] threeDimArr = { { { 1, 2 }, { 3, 4 } }, { { 5, 6 }, { 7, 8 } } }; | |
var flattenedArray = Arrays.stream(threeDimArr) | |
.flatMap(Arrays::stream) | |
.flatMapToInt(Arrays::stream); | |
flattenedArray.forEach(System.out::println); |