Skip to content

Instantly share code, notes, and snippets.

💭
:)

Cosmin Popescu cosminpopescu14

💭
:)
Block or report user

Report or block cosminpopescu14

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View DateSlotsWorking.js
const neatCsv = require('neat-csv');
const fs = require('fs')
const file = "C:\\Users\\cosmi\\Desktop\\events.csv";
fs.readFile(file, async (err, data) => {
if (err) {
console.error(err)
return
}
View DateSlots.js
const neatCsv = require('neat-csv');
const fs = require('fs')
const file = "events.csv"
fs.readFile(file, async (err, data) => {
if (err) {
console.error(err)
return
}
View Demo.php
<?php
class User {
public int $id;
public string $name;
/**
* @return int
*/
public function getId(): int
View test.cs
using Xunit;
using System.Linq;
using System.Collections.Generic;
using FluentAssertions;
namespace Anabi.InstitutionsImporter.Tests
{
public class InstitutionImporterTest
{
[Fact]
View Bench.java
//this performs horribly. It's a programming error in the file :)
package com.company;
import java.io.IOException;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.OpenOption;
import java.nio.file.Paths;
View ReadFileInParallel.cs
string[] AllLines = File.ReadAllLines(path); // incarca mult memroia procesului.
//Console.WriteLine(AllLines);
Parallel.ForEach(AllLines, line =>
{
float x = float.Parse(line.Split("\t")[0]);
float y = float.Parse(line.Split("\t")[1]);
float res = x / y;
View GenerateRandomPairsAndWriteInFile.cs
using System;
using System.Diagnostics;
using System.IO;
using System.Security.Cryptography;
namespace Bench
{
class Program
{
private static readonly Random random = new Random();
@cosminpopescu14
cosminpopescu14 / InfoAboutJava.java
Created Oct 31, 2019
Get details about JVM using MXBean
View InfoAboutJava.java
package com.company;
import java.lang.management.ManagementFactory;
import java.util.HashMap;
public class Main {
public static void main(String[] args) {
// write your code here
View RedisDemoApp.cs
using System;
using StackExchange.Redis;
namespace RedisDemoApp
{
class Program
{
static void Main(string[] args)
{
View quarkus_errors.log
[INFO] Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO]
[INFO] ---------------------< org.acme:code-with-quarkus >---------------------
[INFO] Building code-with-quarkus 1.0.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ code-with-quarkus ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 2 resources
You can’t perform that action at this time.