- 1
Ну как вы тут, потомки? Борманд еще живой?
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
0
Ну как вы тут, потомки? Борманд еще живой?
−1
Red [ needs: 'view ]
empty: 4x4
grid: random do [
res: copy[]
repeat i 15 [append res to string! i]
res
]
loop 15 [grid: next insert grid 't]
grid: head grid
loop 3 [grid: insert skip grid 8 'return]
grid: head insert [empty-cell: base 50x50 silver ] head grid
view head insert grid [
title "15 game"
backdrop silver
style t: button 50x50 [
tmp: face/offset
i: tmp/y / face/size/y + 1
j: tmp/x / face/size/x + 1
if (absolute empty/1 - i) + (absolute empty/2 - j) = 1 [
face/offset: empty-cell/offset
empty-cell/offset: tmp
empty: as-pair i j
]
]
across
]
Пятнашки на RED.
0
Пятнахи на Mobile Basic für Android
https://pastebin.com/wVyUdHx9
Попробовал Mobile Basic for Android. Невкусно. Игрушечный язык, по сути дела.
Минусы:
- нельзя объявить именованную константу;
- нельзя нарисовать картинку из файла средствами языка, и спрайтов нет (а в версии для J2ME они были, как помню);
- гуёв тоже нет (в J2ME были);
- рекурсивную функцию нельзя! (процедурину можно).
Спасибо, я кончел.
−2
Сравнение строк в "Java":
if(striker.equals(govno)){
Сравнение строк в "PHP":
if(striker==govno){
−1
POST-запрос на "Java":
import org.apache.http.*;
import org.apache.http.client.HttpClient;
import org.apache.http.client.entity.UrlEncodedFormEntity;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.message.BasicNameValuePair;
import org.apache.http.protocol.HTTP;
import java.util.ArrayList;
import java.util.List;
import java.io.UnsupportedEncodingException;
import java.io.IOException;
Thread thread = new Thread(new Runnable() {
@Override
public void run() {
try {
try {
HttpClient client = new DefaultHttpClient();
HttpPost post = new HttpPost("http://example.com/form/");
List<NameValuePair> pairs = new ArrayList<NameValuePair>();
pairs.add(new BasicNameValuePair("test", "test"));
pairs.add(new BasicNameValuePair("test2", "test2"));
post.setEntity(new UrlEncodedFormEntity(pairs));
try {
HttpResponse response = client.execute(post);
} catch (IOException e) {}
} catch (UnsupportedEncodingException e) {}
} catch (Exception e) {}
}
});
POST-запрос на "PHP":
$postdata = http_build_query(array('test' => 'test', 'test2' => 'test2'));
$opts=array('http'=>array('method'=>'POST', 'header'=>'Content-type: application/x-www-form-urlencoded', 'content'=>$postdata));
$result=file_get_contents('http://mv4gc3lqnrss4y3pnu.cmle.ru/form/', false, stream_context_create($opts));
−1
Давайте ругать "@" в "PHP".
+1
#include <iostream>
#include <string>
#include <cstdlib>
#include <ctime>
#define next ;
#define zero 0
#define one 1
#define two 2
#define three 3
#define four 4
#define five 5
#define six 6
#define seven 7
#define eight 8
#define nine 9
#define dot .
#define begin {
#define end }
#define open (
#define close )
#define sqopen [
#define sqclose ]
#define less <=
#define xless <
#define greater >=
#define xgreater >
#define isnt !=
#define isequal ==
#define mustbe =
#define write cout
#define plus +
#define minus -
#define multi *
#define divby /
#define incr +=
#define decr -=
using namespace std next
string pswdGen open int quantity close begin
srand open time open 0 close close next
char chars sqopen sqclose mustbe "qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM1234567890@\#\$\%\&\-\+\!\/\_" next
string password next
for(int i = zero next i xless quantity next i++) begin
password incr chars sqopen rand open close % open sizeof open chars close divby sizeof open *chars close close sqclose next
end
return password next
end
int main open close begin
int charNo next
write << "How many characters do you want in the password?" << endl next
cin >> charNo next
write << "Your new password is: " << pswdGen open charNo close << endl next
return zero next
end
По сути это тот же крестовый паролегенератор, но из-за дефайнов и от того символов можно отнести в кучу. И да, "Переведи на "зрз"" в сторону. Перевел вам за щеку, проверяйте
0
https://news.mail.ru/video/574647/
В Камеруне произошел самый массовый побег из тюрьмы за последние годы.
Около 160-ти заключенных сбежали из тюрьмы на северо-западе. Они прорвались
через главные ворота, после чего подожгли здание. По предварительным данным,
преступникам помогала вооруженная группа. Сейчас беглецов ищут.
Мне страшно...
0
In 2011, a woman in Georgia pierced a fiber backbone line with a shovel and left the neighboring country of Armenia without Internet access for 12 hours (с) Wikipedia
Давайте что-нить ругать
0
https://hi-tech.mail.ru/news/bezdomnyj-programmist-potryas-internet-i-nashel-sebe-rabotu/
https://htstatic.imgsmail.ru/pic_image/57220a54bde3086383d8e92babd58464/840/1120/1267156/
1. Как бы "знает" все языки программирования, все фреймворки и все операционные системы;
2. Гордится опытом интеграции "MailChimp" и установки SSL-сертификата от "Let'sEncrypt", выставляя это на первое место.