Skip to content

Instantly share code, notes, and snippets.

Инструкция как собрать JDK + JavaFX

Зачем это нужно

Для 1С:EDT, но текущие JDK не подходят:

  • Azul Zulu - работает нестабильно
  • Liberica - без впн не скачать, на работе это проблема
  • AxiomJDK - бесплатной версии для коммерческой разработки нет (есть версия для тестирования и версия для дома и собственных проектов)

Сборка JDK + JavaFX

Все пути и версии меняйте на свое усмотрение

use std::{
fs::File,
io::Write,
os::fd::{FromRawFd, IntoRawFd},
};
fn main() {
let mut f = unsafe { File::from_raw_fd(0) };
f.write_all(b"Hello, world!\n").unwrap();
//std::mem::forget(f);
# source: https://t.me/rustlang_ru/368839
FROM debian:buster-slim AS base
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
libpq5 \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
EXPOSE 8081
open System
type SocketMessage =
| Fake
module Testt =
let sendMb = MailboxProcessor<SocketMessage>.Start(fun inbox ->
let rec loop () =
async {
do! Async.Sleep(0) // !!! required
using System;
using System.Threading.Tasks;
namespace System.Collections.Concurrent
{
public static class ConcurrentDictionaryExtensions
{
/// <summary>
/// Provides an alternative to <see cref="ConcurrentDictionary{TKey, TValue}.GetOrAdd(TKey, Func{TKey, TValue})"/> that disposes values that implement <see cref="IDisposable"/>.
/// </summary>
#nowarn "9"
open System
open System.Runtime.CompilerServices
open System.Runtime.InteropServices
open Microsoft.FSharp.NativeInterop
let readGuid(bytes: byte []): Guid =
use ptr = fixed bytes
ptr
#nowarn "9"
open System
open System.Globalization
open Microsoft.FSharp.NativeInterop
open BenchmarkDotNet.Attributes
open BenchmarkDotNet.Running
let inline private stackalloc<'a when 'a: unmanaged> size =
let p = NativePtr.stackalloc<'a> size |> NativePtr.toVoidPtr
#!/bin/sh
echo "Temp:" $(($(cat /sys/class/thermal/thermal_zone0/temp)/1000))C
echo "CPU 0 Freq:" $(($(cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq)/1000))MHz
echo "CPU 1 Freq:" $(($(cat /sys/devices/system/cpu/cpu1/cpufreq/scaling_cur_freq)/1000))MHz
echo "CPU 2 Freq:" $(($(cat /sys/devices/system/cpu/cpu2/cpufreq/scaling_cur_freq)/1000))MHz
echo "CPU 3 Freq:" $(($(cat /sys/devices/system/cpu/cpu3/cpufreq/scaling_cur_freq)/1000))MHz
open System
open System.IO
open System.Text.Json
open System.Threading.Tasks
open FSharp.Control.Tasks.V2
type MyRecord = {
Name: string
Age: int
let rec loop () =
async {
// do! loop () // memory leak
return! loop ()
}