- 1
Петух иньо забыл продлить домен
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
+1
Петух иньо забыл продлить домен
+1
mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT);
$mysql = new mysqli($host, $db_user, $db_pass, $db_name);
mysqli_set_charset($mysql, "utf8");
$region = mysqli_query($mysql, "SELECT * FROM `rubric_subsection`");
while ($rows_rubriki = mysqli_fetch_array($region))
{
// $razdel = mysqli_query($mysql, "SELECT * FROM `city_region` LIMIT 1");
//while ($raz = mysqli_fetch_array($razdel)) {
$rubriki = mysqli_query($mysql, "SELECT `region`, `subsection`, COUNT(region) as count FROM `big_baza` where `region` = 'Республика Бурятия' AND `subsection` = '".$rows_rubriki['name']."'");
$data = mysqli_fetch_assoc($rubriki);
echo ''.$rows_rubriki['name'].' / '.$data['count'].'<br>';
//mysqli_query($mysql, "INSERT INTO `calculator_region`(`id`, `region_id`, `subsection_id`, `count`) VALUES ('','".$raz['id']."','".$rows_rubriki['id']."','".$data['count']."')");
// }
}
+1
https://habr.com/ru/post/655085/
эксель быстрее шарпов, шах и мат дотнетчики...
+1
#pragma aux __cdecl "_*" \
parm caller [ ] \
value struct float struct routine [eax] \
modify [eax ecx edx]
+1
#include <stdio.h>
int main(void)
{
(
*********************
** ** ** ***** *
* ** * **** ** *** **
* ** * **** *** * ***
* ** * **** **** ****
* ** * **** *** * ***
* ** ** *** *** **
*********************
printf)("pidor");
}
+1
static char *cast_table[][11] = {
// i8 i16 i32 i64 u8 u16 u32 u64 f32 f64 f80
{NULL, NULL, NULL, i32i64, i32u8, i32u16, NULL, i32i64, i32f32, i32f64, i32f80}, // i8
{i32i8, NULL, NULL, i32i64, i32u8, i32u16, NULL, i32i64, i32f32, i32f64, i32f80}, // i16
{i32i8, i32i16, NULL, i32i64, i32u8, i32u16, NULL, i32i64, i32f32, i32f64, i32f80}, // i32
{i32i8, i32i16, NULL, NULL, i32u8, i32u16, NULL, NULL, i64f32, i64f64, i64f80}, // i64
{i32i8, NULL, NULL, i32i64, NULL, NULL, NULL, i32i64, i32f32, i32f64, i32f80}, // u8
{i32i8, i32i16, NULL, i32i64, i32u8, NULL, NULL, i32i64, i32f32, i32f64, i32f80}, // u16
{i32i8, i32i16, NULL, u32i64, i32u8, i32u16, NULL, u32i64, u32f32, u32f64, u32f80}, // u32
{i32i8, i32i16, NULL, NULL, i32u8, i32u16, NULL, NULL, u64f32, u64f64, u64f80}, // u64
{f32i8, f32i16, f32i32, f32i64, f32u8, f32u16, f32u32, f32u64, NULL, f32f64, f32f80}, // f32
{f64i8, f64i16, f64i32, f64i64, f64u8, f64u16, f64u32, f64u64, f64f32, NULL, f64f80}, // f64
{f80i8, f80i16, f80i32, f80i64, f80u8, f80u16, f80u32, f80u64, f80f32, f80f64, NULL}, // f80
};
красивое
+1
if x == 2 or 3: # если x равен 2 или 3
print('Пыщь.')
Вот уже не впервый раз натыкаюсь на подобный "машинный перевод с русского на питон".
+1
constexpr int add(int a, int b)
{
return a + b;
}
static_assert(1 |> add(2) == and(1, 2));
FILE* file = fopen( “a.txt”, “wb” );
if (file) {
fputs(“Hello world”, file);
file |> fseek(9, SEEK_SET);
file |> fclose();
}
auto dangerous_teams(std::string const& s) -> bool {
return s
|> views::group_by(std::equal_to{})
|> views::transform(ranges::distance)
|> ranges::any_of([](std::size_t s){
return s >= 7;
});
}
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2020/p2011r0.html
какой C++)))
+1
#include <stdio.h>
#include <stdint.h>
int main(void)
{
bool a = 0;
*((uint8_t*)&a) = 2;
if(!a)
printf("a false\n");
else
printf("a true\n");
return 0;
}
------
.LC1:
.string "a true"
main:
push rax
mov edi, OFFSET FLAT:.LC1
call puts
xor eax, eax
pop rdx
ret
какой ID)))
+1
public class ExampleW{
public static void main(){
Scanner input = new Scanner(System.in);
System.out.println("Give mark: ");
int mark = input.nextInt();
String Grade;
switch (mark){
case 100:
case 99:
case 98:
case 97:
case 96:
case 95:
case 94:
case 93:
case 92:
case 91:
case 90:{
Grade = "A+";
break;
}case 89:
case 88:
case 87:
case 86:
case 85:
case 84:
case 83:
case 82:
case 81:
case 80: {
Grade = "A";
break;
}case 75:
case 76:
case 77:
case 78:
case 79:{
Grade = "A-";
break;
}case 70:
case 71:
case 72:
case 73:
case 74:{
Grade ="B+";
break;
} case 69:
case 68:
case 67:
case 66:
case 65:{
Grade ="B";
break;
}
case 64:
case 63:
case 62:
case 61:
case 60:{
Grade = "C+";
break;
}case 50:
case 51:
case 52:
case 53:
case 54:
case 55:
case 56:
case 57:
case 58:
case 59: {
Grade = "C";
break;
}case 45:
case 46:
case 47:
case 48:
case 49:{
Grade = "D";
break;
}case 40:
case 41:
case 42:
case 43:
case 44:{
Grade = "E";
break;
}case 0:
case 1:
case 2:
case 3:
...
...
}default: {
Grade = "null";
break;
}}
}