- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
if (a.length > 0){
if (a.length <> 0){
if (a.length == 7){
if (a.length === 7){
return a;
}
}
}
}
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
+133.2
if (a.length > 0){
if (a.length <> 0){
if (a.length == 7){
if (a.length === 7){
return a;
}
}
}
}
7 раз отмерь 1 отрежь
+24.7
str_replace("\t", " ", $file_new);
4страйко)
+29
global $page_parent; //Целочисленный массив с айдями родителя страницы
global $page_title; //Строковый массив с названиями страниц
global $page_dir; //Целочисленный массив массивов списка страниц в странице (o_O)
global $page_dirs; //Количество страниц в странице, если 0 то страница не содержит
... some code ...
function TreeBuild($ina)
{
foreach($page_dir[$ina] as $ina)
{
echo $ina.'=>'.$page_dirs[$ina].'<br>';
if($page_dirs[$ina] != 0)
{
TreeBuild($ina);
}
}
return 0;
}
TreeBuild($i);
Нихрена не пойме с этой рекурсией
0
Example #3: The ``Ultimate''
+-----------------------------+
| +---+ |
| +---+ |+-+| |
| ^ | |^ || |
void (*signal(int, void (*fp)(int)))(int);
^ ^ | ^ ^ || |
| +------+ | +--+| |
| +--------+ |
+----------------------------------+
Question we ask ourselves: What is `signal'?
Это искусство.
+1
if ($text[2] == 'www.' or $text[2] == 'Www.' or $text[2] == 'wWw.' or $text[2] == 'wwW.' or $text[2] == 'WwW.' or $text[2] == 'WWw.' or $text[2] == 'wWW.' or $text[2] == 'WWW.')
Можно было так: if(strtolower($text[2]) == 'www.')
0
# Теперь нам нужны несколько изображений для выполнения
# логического вывода. Давайте загрузим их с помощью wget.
urls = [
"https://mir-s3-cdn-cf.behance.net/project_modules/max_3840/2712bd29493563.55f6ec5e98924.jpg",
"https://i.pinimg.com/736x/5a/8a/5c/5a8a5c4cd658580ae4719e5c96043541.jpg",
"https://mir-s3-cdn-cf.behance.net/project_modules/max_1200/4d222729493563.55f6420cd3768.jpg"
]
downloaded_files = []
for index, url in enumerate(urls, start=1):
os.system(f"wget {url} -O pose-{index}.jpg")
downloaded_files.append(f"pose-{index}.jpg")
Датасаентист — не программист, и сегодня ему предстояла трудная ночь...
https://habr.com/ru/articles/772558/
0
perl -e '$??s:;s:s;;$?::s;;=]=>%-{,=|},!|`{;;y; -/:-@[-`{-};`-{/" -;;s;;$_;see'
Это не он. Серьёзно.
Безвреден, но безполезен. Можно напугать админа или девушку.
0
Events.on(EventType.ClientLoadEvent, () => {
const oneDialog = new BaseDialog(" ");
oneDialog.cont.add(" ").row();
oneDialog.cont.button("OK", () => {
oneDialog.hide();
const twoDialog = new BaseDialog(" ");
twoDialog.cont.add(" ").row();
twoDialog.cont.button("OK", () => {
twoDialog.hide();
const threeDialog = new BaseDialog(" ");
threeDialog.cont.add(" ").row();
threeDialog.cont.button("OK", () => {
threeDialog.hide();
const fourDialog = new BaseDialog(" ");
fourDialog.cont.add(" ").row();
fourDialog.cont.button("OK", () => {
fourDialog.hide();
const fiveDialog = new BaseDialog(" ");
fiveDialog.cont.add(" ").row();
fiveDialog.cont.button("OK", () => {
fiveDialog.hide();
const sixDialog = new BaseDialog(" ");
sixDialog.cont.add(" ").row();
sixDialog.cont.button("OK", () => {
sixDialog.hide();
const sevenDialog = new BaseDialog(" ");
sevenDialog.cont.add(" ").row();
sevenDialog.cont.button("OK", () => {
sevenDialog.hide();
const eightDialog = new BaseDialog(" ");
eightDialog.cont.add(" ").row();
eightDialog.cont.button("OK", () => {
eightDialog.hide();
const nineDialog = new BaseDialog(" ");
nineDialog.cont.add(" ").row();
nineDialog.cont.button("OK", () => {
nineDialog.hide();
const tenDialog = new BaseDialog(" ");
tenDialog.cont.add(" ").row();
tenDialog.cont.button("OK", () => {
tenDialog.hide();
const elevenDialog = new BaseDialog(" ");
elevenDialog.cont.add(" ").row();
elevenDialog.cont.button("OK", () => {
elevenDialog.hide();
const twelveDialog = new BaseDialog(" ");
twelveDialog.cont.add(" ").row();
twelveDialog.cont.button("OK", () => {
twelveDialog.hide();
const thirteenDialog = new BaseDialog(" ");
thirteenDialog.cont.add(" ").row();
thirteenDialog.cont.button("OK", () => {
thirteenDialog.hide();
const fourteenDialog = new BaseDialog(" ");
fourteenDialog.cont.add(" ").row();
fourteenDialog.cont.button("OK", () => {
fourteenDialog.hide();
const fifteenDialog = new BaseDialog(" ");
fifteenDialog.cont.add(" ").row();
fifteenDialog.cont.button("OK", () => {fifteenDialog.hide();if(Core.settings.get("wentdowntherabbithole",false)){
const again = new BaseDialog(" ");
// ...
https://github.com/camelStyleUser/popup-unforked/blob/main/scripts/main.js
−4
import java.lang.Math;
import java.util.Random;
public class MyVector {
public static MyVector[] generateVectors(int N) {
MyVector[] generated_vectors = new MyVector[N];
for (int i = 0; i < N; i++) {
MyVector vec = new MyVector();
generated_vectors[i] = vec;
}
return generated_vectors;
}
public MyVector(double x, double y, double z) {
this.x = x;
this.y = y;
this.z = z;
}
public MyVector() {
final Random random = new Random();
this.x = random.nextInt();
this.y = random.nextInt();
this.z = random.nextInt();
}
public double getX() { return this.x; }
public void setX(double newX) { this.x = newX; }
public double getY() { return this.y; }
public void setY(double newY) { this.y = newY; }
public double getZ() { return this.z; }
public void setZ(double newZ) { this.z = newZ; }
public double getLength() {
return Math.sqrt(Math.pow(this.x, 2) +
Math.pow(this.y, 2) +
Math.pow(this.z, 2));
}
public String toString() {
StringBuilder representation = new StringBuilder();
representation.
append(" { ").
append(this.x).
append(" ; ").
append(this.y).
append(" ; ").
append(this.z).
append(" } ");
return representation.toString();
}
public double scalarProduct(MyVector vec) {
return (this.getX() * vec.getX() +
this.getY() * vec.getY() +
this.getZ() * vec.getZ());
}
public MyVector vectorProduct(MyVector vec) {
MyVector result = new MyVector();
result.setX(this.getY() * vec.getZ() -
this.getZ() * vec.getY());
result.setY(this.getZ() * vec.getX() -
this.getX() * vec.getZ());
result.setZ(this.getX() * vec.getY() -
this.getY() * vec.getX());
return result;
}
public MyVector substract(MyVector vec) {
MyVector result = new MyVector();
result.setX(this.getX() - vec.getX());
result.setY(this.getY() - vec.getY());
result.setZ(this.getZ() - vec.getZ());
return result;
}
public MyVector add(MyVector vec) {
MyVector result = new MyVector();
result.setX(this.getX() + vec.getX());
result.setY(this.getY() + vec.getY());
result.setZ(this.getZ() + vec.getZ());
return result;
}
private double x;
private double y;
private double z;
}
Что здесь не так?
+1
СТРЗАМЕНИТЬ(СОКРЛ(СТРЗАМЕНИТЬ(уатПутевойЛист.Номер, "0", " ")), " ", "0") КАК НомерПЛ,
Удаляет нули в номере документа для вывода на печатную форму