0
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
#define MAKE(a1, a2, m1, m2) if(arg1s == a1 && arg2s == a2)\
sprintf_s(opcode_buffer, format.c_str(), opcodeToString((Opcode)opcode.opcode).c_str(), m1, m2)
MAKE(I, I, iarg1 , iarg2 );
MAKE(S, I, arg1.c_str(), iarg2 );
MAKE(I, S, iarg1 , arg2.c_str());
MAKE(S, S, arg1.c_str(), arg2.c_str());
#undef MAKE
да что вы знаете о форматировании.
digitalEugene,
09 Мая 2021
0
- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
- 61
- 62
- 63
- 64
// Define the man site module
define(function(require) {
// Require function that runs when button is clicked
var run = require('./run').run;
// Where the application starts its work
var genTextButton = document.getElementById("button-gen-text");
genTextButton.onclick = run;
});
define(function(require) {
// Require value error
var ValueError = require('./errors/value_errors').ValueError;
// Require EmptyListError
var EmptyListError = require('./errors/property_errors').EmptyListError;
// Require functions that returns data for text generation
var getData = require('./utils/get_data');
var getTextLength = getData.getTextLength;
var getTemplateList = getData.getTemplateList;
var getWordList = getData.getWordList;
var getStyleOption = getData.getStyleOption;
// Require function for setting output text
var makeText = require('./utils/set_text');
// Require function for validating form and validate form
var validateForm = require('./utils/validateForm');
validateForm({
formId : 'form-text-gen',
inputErrorClass : 'input-error',
formInvalidClass : 'form-invalid'
});
// Runs tasks for text generation
var run = function() {
try {
var textLength = getTextLength();
var templateList = getTemplateList();
var wordList = getWordList();
var styleOption = getStyleOption();
makeText({
styleOption : styleOption,
textLength : textLength,
templateList : templateList,
wordList : wordList
});
} catch (error) {
if (error instanceof ValueError) {
console.log(error.stack);
} else if (error instanceof EmptyListError) {
console.log(error.stack);
} else {
throw error;
}
}
}
return {
run : run
}
});
Божественная кнопка
JaneBurt,
08 Мая 2021
+1
- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
private List<CellControl[]> ComposeLines(List<CellControl[]> vertical, List<CellControl[]> horizontal)
{
List<CellControl[]> result = new List<CellControl[]>();
foreach (var vLine in vertical)
{
var cellsCount = vLine.Length;
List<CellControl[]> linesToCompose = new List<CellControl[]>();
foreach (var vCell in vLine)
{
foreach (var hLine in horizontal)
{
foreach (var hCell in hLine)
{
if (hCell.X == vCell.X && hCell.Y == vCell.Y)
{
linesToCompose.Add(hLine);
cellsCount += hLine.Length;
break;
}
}
if (linesToCompose.Count == 0)
{
result.Add(hLine);
}
}
}
if (linesToCompose.Count == 0)
{
result.Add(vLine);
}
else
{
linesToCompose.Add(vLine);
var newLine = new CellControl[cellsCount];
var i = 0;
foreach (var line in linesToCompose)
{
foreach (var cellControl in line)
{
newLine[i] = cellControl;
cellControl.Selected = true;
i++;
}
}
result.Add(newLine);
}
}
return result;
}
mdd-inbox,
20 Апреля 2021
+1
- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
using System;
namespace MainNamespace
{
class MainClass
{
static string str, sep;
static void Sep()
{
int k = 0;
while (k < str.Length * 2 - 5)
{
if (sep.Length * (k + 1) > str.Length * 2 - 5)
break;
Console.Write(sep);
k++;
}
for (int l = 0; l < ((str.Length * 2 - 5) - (k * sep.Length)) ; l++)
Console.Write(sep[l]);
}
static void Main(string[] args)
{
Console.Write("str: ");
str = Console.ReadLine();
Console.Write("sep: ");
sep = Console.ReadLine();
for (int i = 0; i < str.Length-1; i++)
Console.Write(str[i] + " ");
Console.Write(str[str.Length-1] + "\n\n");
for (int j = 0; j < str.Length - 2; j++)
{
Console.Write(str[j + 1] + " ");
Sep();
Console.WriteLine(" " + str[str.Length - j - 2]);
Console.Write(" ");
if(j < str.Length - 3)
{
Sep();
Console.WriteLine(" ");
continue;
}
Console.WriteLine();
}
for (int m = str.Length-1; m >= 1; m--)
Console.Write(str[m] + " ");
Console.WriteLine(str[0]);
Console.ReadKey();
}
}
}
Переписал код http://govnokod.ru/27324 на Шарп с небольшими улучшениями.
BelCodeMonkey,
10 Апреля 2021
0
- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
-define(snk_int_match_arg(ARG),
fun(__SnkArg) ->
case __SnkArg of
ARG -> true;
_ -> false
end
end).
-define(snk_int_match_arg2(M1, M2, GUARD),
fun(__SnkArg1, __SnkArg2) ->
case __SnkArg1 of
M1 ->
case __SnkArg2 of
M2 -> (GUARD);
_ -> false
end;
_ -> false
end
end).
....
-spec maybe_delay(map()) -> ok.
maybe_delay(Event) ->
[{_, Delays}] = ets:lookup(?DELAY_TAB, ?SINGLETON_KEY),
[snabbkaffe_collector:block_until( fun(WU) -> ContP(Event, WU) end
, infinity
, infinity
)
|| #delay{ continue_predicate = ContP
, delay_predicate = DelayP
} <- Delays, DelayP(Event)],
ok.
Наметушил.
CHayT,
02 Марта 2021
0
- 1
- 2
- 3
if @OWNER_PHONE <> @OLD_PHONE set @PHONE = @OWNER_PHONE
if @PHONE <> @OLD_PHONE set @OWNER_PHONE = @PHONE
set @PHONE = @OWNER_PHONE
tucvbif,
05 Февраля 2021
−1
- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
<?php
header ('Access-Control-Allow-Origin: *');//Разрешили кроссдоменные запросы
$mysql_host = "хост";
$mysql_database = "Бд";
$mysql_user = "Юзернейм";
$mysql_password = "пОроль";
$link = mysql_connect($mysql_host, $mysql_user, $mysql_password) or die("Ошибка при подключении MySQL" );
mysql_select_db($mysql_database, $link) or die ('Ошибка при подключении к БД');
if (isset($_POST['login'])) { $login = $_POST['login']; if ($login == '') { unset($login);} }
if (isset($_POST['password'])) { $password=$_POST['password']; if ($password =='') { unset($password);} }
if (isset($_POST['email'])) { $email=$_POST['email']; if ($email =='') { unset($email);} }
if (isset($_POST['silvercoin'])) { $silvercoin=$_POST['silvercoin']; if ($silvercoin =='') { unset($silvercoin);} }
if (isset($_POST['goldcoin'])) { $goldcoin=$_POST['goldcoin']; if ($goldcoin =='') { unset($goldcoin);} }
if (empty($login) or empty($password) or empty($email))
{
echo ("Вы ввели не всю информацию, заполните все поля!");
exit();
}
$login = stripslashes($login);
$login = htmlspecialchars($login);
$password = stripslashes($password);
$password = htmlspecialchars($password);
$email = stripslashes($email);
$email = htmlspecialchars($email);
$silvercoin = stripslashes($silvercoin);
$silvercoin = htmlspecialchars($silvercoin);
$goldcoin = stripslashes($goldcoin);
$goldcoin = htmlspecialchars($goldcoin);
$login = trim($login);
$password = trim($password);
$email = trim($email);
$silvercoin = trim($silvercoin);
$goldcoin = trim($goldcoin);
$q1 = mysql_query("SELECT login FROM `accounts` WHERE `login`='".$login."'");
$loginb = mysql_fetch_array($q1);
$loginbd=$loginb['login'];
if($loginbd == $login){
echo("Извините, введённый вами логин уже зарегистрирован.");
exit();
}
else
$result2 = mysql_query ("INSERT INTO accounts (login,password,email) VALUES('$login','$password','$email')");
if ($result2=='TRUE')
{
echo "Вы успешно зарегистрированы!";
}
else {
echo "Ошибка! Вы не зарегистрированы.";
}
?>
Использование бредо-заголовок в 2 строке
Использование Инструмента в 2к21, который в PHP5.5.0 20 июня 2013 Объявлен как устаревший, а в PHP 7.0.0 удален
Нет задающей кодировки подключения к БД
Глупая, дешевая валидация данных начиная с 12 и заканчивая 46 строкой
SQL-injection привет!
46 строка - невероятно проверять boolean тип
37 - 39 строка - юзер не найден - лови ошибку!
Чуть не забыл... скрипт не в кодировке UTF-8 no BOM
https://php.ru/forum/threads/pomogite-ispravit-oshibku-cannot-modify-header-information-headers-already-sent-by.90359/
Привет 2010 году !
MouseZver,
25 Января 2021
−1
- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
includelib C:\Irvine\User32.Lib
includelib C:\Irvine\Kernel32.Lib
includelib D:\masm32\lib\Irvine32.lib
include \masm32\include\Irvine32.inc
.data
data_1 dword 45
data_2 dword 29
msg byte ?
.code
main PROC
xor ebx, ebx
xor eax, eax
xor edx, edx
xor esi, esi
mov cl ,31
mov eax, data_1
mov esi , data_2
lm:
shl esi, 1
jnc one
cmp msg, 1
je two
shl eax, cl
mov msg, 1
mov ebx, data_1
jmp one
two:
shl ebx, cl
mov msg, 0
add eax, ebx
add edx , eax
mov eax, data_1
one:
loop lm
mov eax , edx
call WriteInt
Call CrLf
exit
main ENDP
END main
Hey, Mr. Tambourine Man, play a song for me
I'm not sleepy and there is no place I'm going to
Hey, Mr. Tambourine Man, play a song for me
In the jingle jangle morning I'll come following you
Though I know that evening's empire has returned into sand
Vanished from my hand
Left me blindly here to stand, but still not sleeping
My weariness amazes me, I'm branded on my feet
I have no one to meet
And the ancient empty street's too dead for dreaming
Hey, Mr. Tambourine Man, play a song for me
I'm not sleepy and there is no place I'm going to
Hey, Mr. Tambourine Man, play a song for me
In the jingle jangle morning I'll come following you
Take me on a trip upon your magic swirling ship
My senses have been stripped
My hands can't feel to grip
My toes too numb to step
Wait only for my boot heels to be wandering
I'm ready to go anywhere, I'm ready for to fade
Into my own parade
Cast your dancing spell my way, I promise to go under it
Hey, Mr. Tambourine Man, play a song for me
I'm not sleepy and there is no place I'm going to
Hey, Mr. Tambourine Man, play a song for me
In the jingle jangle morning I'll come following you
Madhouse_camomile,
14 Января 2021
−3
- 001
- 002
- 003
- 004
- 005
- 006
- 007
- 008
- 009
- 010
- 011
- 012
- 013
- 014
- 015
- 016
- 017
- 018
- 019
- 020
- 021
- 022
- 023
- 024
- 025
- 026
- 027
- 028
- 029
- 030
- 031
- 032
- 033
- 034
- 035
- 036
- 037
- 038
- 039
- 040
- 041
- 042
- 043
- 044
- 045
- 046
- 047
- 048
- 049
- 050
- 051
- 052
- 053
- 054
- 055
- 056
- 057
- 058
- 059
- 060
- 061
- 062
- 063
- 064
- 065
- 066
- 067
- 068
- 069
- 070
- 071
- 072
- 073
- 074
- 075
- 076
- 077
- 078
- 079
- 080
- 081
- 082
- 083
- 084
- 085
- 086
- 087
- 088
- 089
- 090
- 091
- 092
- 093
- 094
- 095
- 096
- 097
- 098
- 099
- 100
int hlp_fix(char data[] , char dump_alpha[] ){
int run = 0;
char prev = '0';
int count_bracket = 0 ;
puts(dump_alpha);
if(my_isdigit(data[0]) || my_isalpha(data[0]) ){
prev = data[0];
}
else if (data[0] == '('){
count_bracket++;
prev = data[0];
}
else{
puts("!!! first error !!!");
exit(1);
}
for(run = 1;data[run] != '\0' ;run++){
if ( data[run + 1] == '\0' && isOperator(prev ) ){
puts("!!! error isOperator !!!");
exit(1);
}
if(isgraph(data[run] )){
if( secure_1(data[run], dump_alpha ) ) {
printf("!!! error this no list = %c !!!", data[run] );
exit(1);
}
if(prev == '.' ){
if( data[run - 1 ] == '.' && my_isdigit(data[run]) ) {
prev = data[run];
}
else{
puts(" !!! error point !!!");
exit(1);
}
}
else if(my_isdigit(prev) ){
if( data[run] == ')' ) {
prev = data[run];
--count_bracket;
}
else if( ( my_isdigit(data[ run - 1 ]) || data[run - 1 ] == '.' ||
isOperator(data[run]) ) ){
prev = data[run];
}
else{
puts("error isdigit");
exit(1);
}
}
else if(isOperator(prev)){
if( (my_isdigit(data[run]) || my_isalpha(data[run] ) ) ){
prev = data[run];
}
else if ( data[run] == '(' ){
prev = data[run];
count_bracket++;
}
else{
puts("error isOperator");
exit(1);
}
}
else if(prev == '(' ){
if( (my_isdigit(data[run] ) || my_isalpha(data[run] ) ) ){
prev = data[run];
}
else if ( data[run] == '('){
count_bracket++;
prev = data[run];
}
else{
Ни что так не вдохновляет на бейсджампинг без парашюта как "отлов ошибок" который не работает ))))
https://ideone.com/rjrwMQ
Oh-my-God-my-leg,
07 Января 2021
0
- 1
jQuery( this ).parent().parent().parent().parent().parent().parent().parent().parent().find(".crate_bottle").html(product_crate_price_final);
arkasha,
13 Октября 2020