This file contains hidden or 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
Какие могут быть проблемы при параллельной работе транзакций: | |
1) Потерянное обновление - когда две транзакции читают и обновляют одну и ту же ячейку (поле в строке) параллельно. Например на счет начисляют проценты параллельно несколько транзакций. Одна пытается увеличить на 0,3%, вторая на 0,2%. Так как обе прочитали начальное значение одновременно, то в результате счет будет увеличен один раз. | |
2) Грязное чтение - когда одна транзакция меняет данные, а другая их читает, после чего первая откатывается. Например идут две транзакции, пытающиеся снять деньги со счета. На счету 100 рублей, первая пытается снять 30, но откатывается. Вторая пытается снять еще 50, но успевает прочитать значение счета после измененияи до коммита, то есть 70 рублей. В итоге на счету будет 20 рублей. | |
3) Неповторяемое чтение - когда одна транзакция читает данные несколько раз, а вторая успевает их обновить. | |
Две транзакции работают параллельно, она начисляет процент, вторая снимает сумму со скидкой в зависимости от состояния счета. Начи |
This file contains hidden or 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 or modify /etc/docker/daemon.json on the client machine | |
# { "insecure-registries":["192.168.100.141:5000"] } | |
# DOCKER_OPTS="$DOCKER_OPTS --insecure-registry 192.168.100.141:5000" | |
#sudo service docker restart | |
# DOCKER REGISTRY | |
# sudo docker run -d -p 5000:5000 --restart=always --name registry registry:2 | |
sudo docker pull postgres:10 | |
sudo docker pull nginx:latest |
This file contains hidden or 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
https://www.youtube.com/watch?v=wHyRnO4UI5E | |
https://www.youtube.com/watch?v=6xJwQgDnMFE | |
https://blog.alexellis.io/kubernetes-in-10-minutes/ | |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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
from pydub import AudioSegment | |
from_file_patch = "file1" | |
to_file_patch = "file_out" | |
flac_audio = AudioSegment.from_file(from_file_patch, "flac") | |
flac_audio.export(to_file_patch, format="mp3") |
This file contains hidden or 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
def _convert_java_millis(java_time_millis): | |
"""Provided a java timestamp convert it into python date time object""" | |
ds = datetime.datetime.fromtimestamp( | |
int(str(java_time_millis)[:10])) if java_time_millis else None | |
ds = ds.replace(hour=ds.hour,minute=ds.minute,second=ds.second,microsecond=int(str(java_time_millis)[10:]) * 1000) | |
return ds | |
def _convert_datetime_java_millis(st): | |
"""Provided a python datetime object convert it into java millis""" |
This file contains hidden or 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 ru.serce.gctest; | |
import java.lang.reflect.Method; | |
import javassist.ClassPool; | |
import javassist.CtClass; | |
import javassist.CtMethod; | |
public class GcPermgenTest { | |
This file contains hidden or 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
rest/api/2/search?jql=assignee="Юдинцев Владимир"&fields=*none | |
rest/api/2/search?jql=status was "Resolved" by currentUser()&fields=*none | |
/rest/api/2/search?jql=status was resolved by "Vyudintsev"&fields=*none | |
/rest/api/2/search?jql=status changed to "REVIEW" by "VYudintsev"&fields=*none | |
/rest/api/2/search?jql=status changed to "In Progress" by "VYudintsev"&fields=*none | |
/rest/api/2/search?jql=fixVersion="XXX" AND assignee="Юдинцев Владимир"&fields=*none | |
/rest/api/2/search?jql=status changed to "REVIEW" by "VYudintsev" AND project = XXX &fields=*none | |
/rest/api/2/search?jql=filter = "My XYZ" AND filter = "My" OR filter = "My TTT" |
This file contains hidden or 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
require(["dojo/_base/connect"], function(connect){ | |
connect.subscribe("handleFieldChange", function(event, message){ | |
console.log("dojo_subscribe->" + event.x); | |
debugger; | |
}); | |
}); | |
YAHOO.Bubbling.on("handleFieldChange", function(e, param) { | |
console.log("YAHOO_on->" + e + param[1].x); | |
debugger; |
This file contains hidden or 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
var RunAsUtil = { | |
execute: function(workFunction, runAsUser) { | |
Packages.org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(new Packages.org.alfresco.repo.security.authentication.AuthenticationUtil.RunAsWork() | |
{ | |
doWork: workFunction | |
}, runAsUser); | |
}, | |
doInTransaction: function(workFunction) { | |
var txs = Packages.org.springframework.web.context.ContextLoader.getCurrentWebApplicationContext().getBean("TransactionService"); | |
var th = txs.getRetryingTransactionHelper(); |