Другие интересные штуки тут: https://t.me/notes_of_programmer
select pid, user, client_addr, query_start, backend_type, substr(query, 0, 256) as query
from pg_stat_activity
where query_start is not null
and client_addr is not null;
Другие интересные штуки тут: https://t.me/notes_of_programmer
select pid, user, client_addr, query_start, backend_type, substr(query, 0, 256) as query
from pg_stat_activity
where query_start is not null
and client_addr is not null;
For years, people have been using jemalloc with ruby. There are various benchmarks and discussions. Legend had it that Jemalloc 5 doesn't work as well as Jemalloc 3.
Then, one day, hope appeared on the horizon. Someone offered a config for Jemalloc 5.
The recipe would be something like this (shown with official docker ruby image).
FROM ruby:3.1.2-bullseye
First off, I'm not a docker expert by any means. I just wanted my CI pipeline to work and went down the habbit hole. The solution I present can cause some security implications, be aware.
The problem is caused by a seccomp policy and a glibc >= 2.34 update that returns an EPERM (operation not permitted) insted of ENOSYS (function not implemented).
** 由于此文年事已久,可能某些URL Schemes已失效,可在评论区留言指出!(最后更新于 2024.4.16)
由于苹果的各应用都是在沙盒中,不能够互相之间访问或共享数据。但是苹果还是给出了一个可以在APP之间跳转的方法:URL Scheme。简单的说,URL Scheme就是一个可以让 APP 相互之间可以跳转的协议。每个 APP 的URL Scheme都是不一样的,如果存在一样的URL Scheme,那么系统就会响应先安装那个 APP 的URL Scheme,因为后安装的 APP 的URL Scheme被覆盖掉了,是不能被调用的。
<?php | |
define('MODX_API_MODE', true); | |
define('MODX_BASE_PATH', __DIR__."/"); | |
define('MODX_BASE_URL', '/'); | |
define('MODX_SITE_URL', 'http://sitename.tld/'); | |
include_once(MODX_BASE_PATH."index.php"); | |
$modx->db->connect(); | |
if (empty ($modx->config)) { |
I had trouble getting my i7-8700 65W to work in my m720q with a 65W PSU. It was working fine in Windows, but was throttling down first to 20 Watt, then to 15, 10, and finally to 7 Watt, which resulted in a maximum clock speed of 800 MHz.
The main problem seems to be a mix of crappy firmware settings from Lenovo/Intel (Reddit Post) and the weak power supply.
To fix this problem, we have to install some tools, and for them to work, you have to make sure that secure boot is OFF; otherwise, the kernel doesn't allow you to set the CPU power limits. The easiest way is to install in legacy mode; therefore, you need to disable secure boot and enable CSM in the BIOS, select legacy boot preferred.
rebase
vs merge
).rebase
vs merge
)reset
vs checkout
vs revert
)git rev-parse
)pull
vs fetch
)stash
vs branch
)reset
vs checkout
vs revert
)<?php | |
/** | |
* This is free and unencumbered software released into the public domain. | |
* | |
* Anyone is free to copy, modify, publish, use, compile, sell, or | |
* distribute this software, either in source code form or as a compiled | |
* binary, for any purpose, commercial or non-commercial, and by any | |
* means. | |
* |
[gd_scene load_steps=6 format=2] | |
[sub_resource type="GDScript" id=1] | |
script/source = "extends Control | |
class DragDataColor: | |
var sender: Object | |
var color: Color" | |
[sub_resource type="GDScript" id=3] |
function sortObject(object) { | |
//Thanks > http://whitfin.io/sorting-object-recursively-node-jsjavascript/ | |
if (!object) { | |
return object; | |
} | |
const isArray = object instanceof Array; | |
var sortedObj = {}; | |
if (isArray) { | |
sortedObj = object.map((item) => sortObject(item)); |