Post your retard code.
Worst wins
five_xs_str = (('x' * 5)[0] * 5)[::-1]
'xxxxx'
Post your retard code.
Worst wins
five_xs_str = (('x' * 5)[0] * 5)[::-1]
'xxxxx'
...
bool isTrue(const bool& expression)
{
if(expression == true)
{
return true;
}
else
{
isFalse(expression);
}
}
bool isFalse(const bool& expression)
{
if(expression == false)
{
return false;
}
else
{
isTrue(expression);
}
}
>>>/deletThis/
Forgot the return before calling isFalse and isTrue, well, even cringier this way I guess.
Import drool
Def tooEarly() :
While True:
If fuckdisshiet == 1:
Print "kill me"
Else:
drool.drool(drool.GIVE_ME_COFFEE)
Print "thx fag"
tooEarly()
Sadly, I can't post your DNA code, OP
Function isEmpty(arr) {
Try {
Arr[0];
Return false;
}
Catch {
Return true;
}
}
unsigned my_strlen(char *s) {
unsigned i = 0;
start:
i = i + 1;
if(*(s+i)) goto start;
return i;
}
//~+~+~+~+~+~литa кoд являeтcя цвгимиpa
//~+~+~+~opигинaл мaтepиaл дoнaт вopyй~
import.*
public class 133710r|){
public static void main (String[] blazeitdaily){
methodOne();}
public void methodOne(){
System.out.print("H");
System.out.print("E");
System.out.print("L");
System.out.print("L");
System.out.print("O");
System.out.print(" ");
System.out.print("W");
System.out.print("O");
System.out.print("R");
System.out.print("L");
System.out.print("D);
return;}}
I posted this a few months ago
1156 rn = random.randint(1, 100)
1157 if floor 3 and floor 50 and rn 75:
1173 return 30
1174 if rn > 50 and rn 75:
1177 return 10
1178 if floor > 5 and floor 8 and floor 50 and rn 75:
1194 return 70
1195 if rn > 50 and rn 75:
1198 return 50
1199 if floor > 10:
1200 if rn 25 and rn 50 and rn 75 and rn 88:
1210 return 90
Wow
when i was babby programmer i wrote this by hand.
I thought less code = more fast
function doesCollideFull(x,y,w,h,x2,y2,w2,h2){return!(x2>=w+x||x>=w2+x2||y2>=h2+y||y>=h2+y2)}
int crash(int i)
{
i = 0;
crash(i + 1);
return i;
}
long long add (long long a, long long b)
{
long long sum;
sum = a + b;
return sum;
}
onClikc={(e) => {
e.preventDefault();
socket.on('new:message', (message) => {
socket.emit('sent:message', (message) => (
{ ...message, userName = this.state.userName }
)
});
}}
click*
#include
void print(char* s) {
printf("%s\n", s)}
int main() {
print("Hello World!") ;
print("I've accomplished python in C") ;
}
template
T where(const T& list, TyLambda&& lambda)
{
T filtered_list;
for(T::const_iterator it = list.begin(); it != list.end(); it++)
{
if(lambda(*it))
filtered_list.push_back(*it);
}
return filtered_list;
}
print("Hello, World!")
Do I win?
var toString = {}.toString;
module.exports = Array.isArray || function (arr) {
return toString.call(arr) == '[object Array]';
};
#include
#include
int main()
{
malloc(ULONG_MAX);
return 0;
}
Task task = new Task(() => {while(true){return new Task(() =>{Console.Write("&")}}}
bool b = false;
std::cout false
bool isTrue(bool& exp);
bool isFalse(bool& exp);
bool isTrue (bool& exp) {
if (!isFalse(exp))
return true;
else
return false;
}
bool isFalse (bool& exp) {
if (!isTrue(exp))
return true;
else
return false;
}
Looks like DDG wrote some.
Winner:
int main (int argc, char *argv[]) {
}
cd code
cd..
cd..
cd..
cd ..
ls
cd code
cd ..
cd
does this compile? That's fucking awesome!
fuck off karly
Someone post that graduate meme where he writes a program that waits 24 hours to check tomorrow's date
bool isFalse(const bool& expression, bool isFalse = false)
{
if (expression == false)
{
return isFalse(expression, true)
}
else if (isFalse == true) {
return isFalse == true;
}
else
{
if (isTrue(expression)) {
return isFalse(expression,true);
} else {
return isFalse == true;
}
}
}
>return
bool isFalse(const bool& expression, bool isFalse = false)
{
bool result;
if (expression == false)
{
result = isFalse(expression, true)
}
else if (isFalse == true) {
result = isFalse == true;
}
else
{
if (isTrue(expression)) {
result = isFalse(expression,true);
} else {
result = isFalse == true;
}
}
return result;
}
step up nigga
Looks like you're a fucking retard.
> parameters are refs
Doesn't this mean that the parameters have to be lvalues? You can't do isTrue(a == 5) now, right?
If the parameter is a const-reference then it will accept rvalues; so all's fine.
bool rand_bool(void) {
return false; //flipped a fair coin, tails
}
[/code
saw a comic like this somewhere a long time ago. can't find it again
#include
int main(void);
/*
...
*/
xkcd random number
if(someFlag.toString().length() < 5) { ... }
"C++ was a mistake"
t. Bjarne
Float x;
Float xx;
Float xxx;
Float xxxx;
Float xxxxx;
Float xxxxxx;
So on and so forth
def count(n):
a, b = 0, 4
sums = 1
count = 0
if len(n) == 4:
for i in n:
i = int(i)
sums *= i
check.append(sums)
else:
while a < len(n):
for i in n[a:b]:
i = int(i)
sums *= i
count += 1
if count == 4:
check.append(sums)
sums = 1
count = 0
a += 4
b += 4
this felt pretty bad desu
wasn't that from the guy that wrote battleship in 10,000 lines?
Pic related
Comp error
Ironically, I've seen this shit in productioncode. JavaScript mind you, so it was webdev shitters.
I think so.
fuk
/*
*This function returns an int ;D
* an int is a number without a decimal!
*/
int max(int a, int b)
{
if(a < b)
return b;
/*return b if a is less than b*/
else if(a > b && b < a)
return a;
/*return a if a is greather than b*/
else
/*else returns 5 because I'm so random yay :D*/
return 5;
)
/*this is the end of the program! see you guys later XD*/
kek.
Who really wrote this.
game.workspace=nil
int main(void) {
write(1, "Hello World\n", 14);
}
...
See
>comments
...
this is fake stop posting it REEEEEE it triggers me
Nice roblox script
>printf("%s\n", s)
Are you retarded? You can just do printf(s).
float Q_rsqrt( float number )
{
long i;
float x2, y;
const float threehalfs = 1.5F;
x2 = number * 0.5F;
y = number;
i = * ( long * ) &y; // evil floating point bit level hacking
i = 0x5f3759df - ( i >> 1 ); // what the fuck?
y = * ( float * ) &i;
y = y * ( threehalfs - ( x2 * y * y ) ); // 1st iteration
// y = y * ( threehalfs - ( x2 * y * y ) ); // 2nd iteration, this can be removed
return y;
}
t. karlie
KEK
/thread
public class NonClosingSystemOutStream extends FilterOutputStream {
public NonClosingSystemOutStream() {
super(System.out);
}
@Override
public void close() throws IOException {
this.out.flush();
}
}
#code which find the number of different possible binary strings of length n
def num_strings(n, i):
string = ""
if convert_binary(i) == n * "1":
return i
for j in xrange(i + 1, i + 5000):
if num_strings(n, j) > 0:
return num_strings(n, j)
return 0
def convert_binary(n):
string = ""
while n >= 2:
string += str(n % 2)
n /= 2
string += str(n)
return reverse(string)
def reverse(s):
rev = ""
max = len(s) - 1
for char in s:
for i in xrange(max + 1):
if i == max:
rev = rev + s[i]
max -= 1
return rev
def prompt():
print num_strings(input("Enter length of bit string: "), 0)
prompt()
prompt()
That has no newline.
That person was looming for puts.