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 Microsoft.EntityFrameworkCore; | |
using System.Numerics; | |
Console.WriteLine("Hello, World!"); | |
var context = new ApplicationContext(); | |
while (true) { | |
Console.WriteLine("" + |
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
// See https://aka.ms/new-console-template for more information | |
using Microsoft.EntityFrameworkCore; | |
Console.WriteLine("Hello, World!"); | |
var context = new ApplicationContext(); | |
var users = context.Users.ToList(); | |
foreach (var user in users) { | |
Console.WriteLine(user.Name + " " + user.Surname + " => " + user.Email); | |
} |
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
SELECT | |
[STOCKREF] as product_remote_id, | |
SUM([ONHAND]) as quantity, | |
INVENNO as remote_warehouse_id | |
FROM LV_006_02_STINVTOT | |
WHERE STOCKREF in ( 6518,147,148,150,151,156,744,745,746,747,748,751,760,761,762,764,766,776,777,778,779,780,786,787,788,789,790,791,792,793,795,798,800,801,802,803,805,806,807,808,810,811,812,814,816,817,818,819,820,821,822,823,824,825,826,827,828,829,830,834,836,837,838,839,843,845,846,847,848,849,850,851,852,853,854,855,857,859,860,862,866,867,868,869,1333,1337,1340,1341,1343,1344,1345,1346,1347,1348,1349,1350,1351,1352,1353,1354,1373,1358,1359,1360,1361,1362,1363,1364,1365,1366,1367,1368,1369,1370,1371,1372,1374,1375,1376,1377,1378,6534,1380,1381,1382,1383,1384,1385,1386,1388,1390,1394,1396,1397,1398,1399,1400,1401,1403,1404,1405,1406,1407,1408,1409,1410,1411,1412,1414,1415,1416,1417,1418,1419,1420,1421,870,871,872,880,882,884,885,889,890,891,894,895,896,897,898,901 |
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
alert(JSON.stringify(localStorage)) | |
console.log("should work") |
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
$("#admin_basket_check_all").on("change",function(){ | |
if ($(this).is(":checked")){ | |
$("tbody [type='checkbox']").prop("checked",true) | |
}else{ | |
$("tbody [type='checkbox']").prop("checked",false) | |
} | |
}) | |
$(document).on("change","tbody [type='checkbox']",function(){ | |
let isAllChecked = $("tbody input:checked").length === $("table tbody input:not(:checked)").length |
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
|
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 mongoose = require("mongoose") | |
const userSchema = new mongoose.Schema({ | |
username: { type: String, required: true, unique: true, maxLength: 32, }, | |
email: { type: String, required: true, unique: true, maxLength: 255, }, | |
phone: { type: Number, default: null, }, | |
password: { type: String, required: true, }, | |
is_email_verified: { type: Boolean, default: false }, | |
is_phone_verified: { type: Boolean, default: false }, | |
is_private: { type: Boolean, default: false, }, | |
register_info: { type: Object, required: true }, |
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 class ZombieThreadTester { | |
public static void main(String[] args) { | |
Thread[] threads = new Thread[100]; | |
for (int i = 0; i < 100; i++) { | |
threads[i] = new Thread(new MyRunnable(i)); | |
} | |
for (int i = 0; i < 100; i++) { | |
threads[i].start(); |
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 class ZombieThreadTester { | |
public static void main(String[] args) { | |
Thread z1 = new Thread(new ZombieThread("WINDOWS")); | |
Thread z2 = new Thread(new ZombieThread("LINUX")); | |
Thread z3 = new Thread(new ZombieThread("UNIX")); | |
Thread z4 = new Thread(new ZombieThread("UNIX")); | |
System.out.println("Active Count"+Thread.activeCount()); |
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.BufferedReader; | |
import java.io.IOException; | |
import java.io.InputStreamReader; | |
import java.io.OutputStream; | |
import java.net.ServerSocket; | |
import java.net.Socket; | |
import java.nio.charset.StandardCharsets; | |
public class MyServer { |
NewerOlder