- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
class ListEl{
public:
int val;
ListEl *head;
ListEl *tail;
}
class MyList{
public:
ListEl *head, *tail;
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
+152
class ListEl{
public:
int val;
ListEl *head;
ListEl *tail;
}
class MyList{
public:
ListEl *head, *tail;
0
Объясните, зачем нужен docker-compose
Есть же Dockerfile, туда можно поставить всё, что нужно сразу, а не плодить кучу контейнеров, которые нужно связать
−1
stwu r1, -0x18(r1)
PPC как бы говорит нам
+1
var btn_checkAll = document.getElementById('checkAll');
if (btn_checkAll) {
btn_checkAll.addEventListener('click', checkAll);
}
var inputTagsArray = [];
function getInputTags() {
inputTagsArray = document.getElementsByTagName('input');
inputTagsArray = Array.prototype.slice.call(inputTagsArray);
}
function getArray(action) {
getInputTags();
var checkedInputTagsArray = [];
inputTagsArray.forEach(function(element) {
if (element.getAttribute('id')) {
if (element.checked) {
checkedInputTagsArray.push(element.getAttribute('id'));
}
}
});
if (!checkedInputTagsArray[0]) {
alert("Не было выбрано ни одного изображения");
return false;
}
else {
if (confirm("Вы уверены что хотите совершить данное действие?")) {
//в пхп есть гет-метод, который удаляет картиночки по ид.
//надо передавать ид, но я неосилятор и не осили аякс, поэтому
//вместо нормального метода, принимающего массивом ид картиночек постом
//я делаю это:
location.href = "/products/" + action + "/?id=" + checkedInputTagsArray.join("_");
}
else {
return false;
}
}
}
function checkAll() {
getInputTags();
inputTagsArray.forEach(function(element){
if (element.getAttribute('id')) {
if (element.checked) {
element.checked = false;
}
else {
element.checked = true;
}
}
});
}
function deleteChecked() {
getArray("imagedelete");
}
function showHideChecked() {
getArray("show-hide");
}
в пхп есть гет-метод, который удаляет картиночки по ид.
надо передавать ид, но я неосилятор и не осили аякс, поэтому
вместо нормального метода, принимающего массивом ид картиночек постом
я делаю это:
−1
Поисковиков станут банить за выдачу ссылок на запрещённые ресурсы. Штраф огромен: 700 000 р.
Вот блядь и дожили...
Скоро чинуши-цензурочники будут ходить по домам и слухать под окнами, кто о чём базарит.
Открываешь холодилу, чтобы пивка взять - а там сидит чинуша, открываешь стиралу - а там тётенька в очках, с диктофоном.
Засовываешь палец в очко, чтобы каловый камень выковырнуть - а вместо копролита выковыриваешь следящее устройство....
−3
NSString* bodyParams = [NSString stringWithFormat:@"username=%@&password=%@&client_secret=very_secret", username, password];
// Ниже по коду
[request setHTTPMethod:@"POST"];
[request setHTTPBody:[bodyParams dataUsingEncoding:NSUTF8StringEncoding]];
И ведь имя переменной не врёт
0
Whether or not you check in your Pods folder is up to you, as workflows vary from project to project. We recommend that you keep the Pods directory under source control, and don't add it to your .gitignore
Benefits of checking in the Pods directory
After cloning the repo, the project can immediately build and run, even without having CocoaPods installed on the machine. There is no need to run pod install, and no Internet connection is necessary.
The Pod artifacts (code/libraries) are always available, even if the source of a Pod (e.g. GitHub) were to go down.
The Pod artifacts are guaranteed to be identical to those in the original installation after cloning the repo.
https://guides.cocoapods.org/using/using-cocoapods.html
+161
# coffee script
d = 1 - Math.pow(d,n) * Math.pow((1/d -1),n)
// java script
d = 1 - Math.pow(d, n) * Math.pow(1 / d(-1), n);
почему не любят кофескрипт, выпуск -дцатьпервый. потому что нельзя просто скопипастить формулу и не поймать Uncaught TypeError: number is not a function
+1002
string Daumants::getReverse()
{
string message = this->data();
char *reverseMessage = new char[this->length()];
for (int i = this->length() - 1, j = 0; i >= 0; i--, j++)
{
reverseMessage[j] = message[i];
}
for (int i = 0; i < this->length(); i++)
{
message[i] = reverseMessage[i];
}
return message;
}
Даумант ХУЙ!
+142
for(int i=0; i<16; i++) servoPos[i] = 64;
for(int i=0; i<16; i++) servoOnOff[i] = SV_OFF;
for(int i=0; i<16; i++) servoDirection[i] = SV_FOR;
for(int i=0; i<16; i++) servoRange[i] = 15;
for(int i=0; i<16; i++) servoCenter[i] = 3000;
for(int i=0; i<16; i++) servoSpeed[i] = 127;
кусочек кетайского дзена.
Программа управления серво-приводами (хоть бы не аэс, хоть бы не аэс)