Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Search - "|| 0"
-
┏┓
┃┃╱╲ in
┃╱╱╲╲ this
╱╱╭╮╲╲house
▔▏┗┛▕▔ we
╱▔▔▔▔▔▔▔▔▔▔╲
start arrays at 0
╱╱┏┳┓╭╮┏┳┓ ╲╲
▔▏┗┻┛┃┃┗┻┛▕▔4 -
What is the point of having a progress bar if ..
beginning
0 %
after ~2hrs
0%
next minute:
~~~~~~~~~~~~~~ 100 %
installation complete
??6 -
public boolean even( int num ) {
if ( num < 0 )
num = -1 * num;
while ( num > 1 )
num = num - 2;
if ( num == 0 )
return true;
else
return false;
}19 -
How to secure yourself from flash 0-day attacks:
1. Uninstall flash
2. Don't reinstall flash
3. Seriously, you don't need flash8 -
So, when counting physical objects, my 4 year old daughter keeps starting at "zero." 🤓
It's the weirdest thing, and I've even tried to discourage it. But, hey, she uses it correctly...so, I'll just roll with it.3 -
My company just made a nice design on the first door you see after entering the building.
Im so happy they started counting dev rooms from 034 -
Trying to concentrate. Co-worker from another room standing there, BLA BLA BLA, and she's fucking LOUD. But she hates coldness, and it's below 0 °C outside.
So I open two windows, and guess who instantly leaves! Now it's cold, but SILENT. HAR HAR!6 -
New phone, after using double-tap to upvote a rant devRant told me that I can upvote rants by double-tapping. No shit sherlock4
-
For my fellow javascript devs:
var floored = 12.68 | 0;
Is much faster than:
var floored = Math.floor(12.68);
And in both cases floored === 12
#JustJavascriptThings ¯\_(ツ)_/¯
Source: http://stackoverflow.com/questions/...
Performance test: https://measurethat.net/Benchmarks/...5 -
After Windows/Linux and atom/sublime and vim/emacs and all those other reasons we fight...
for(i = 0 ; i < 10 ; i++)
or
for(i =0 ; i <= 9 ; i++)
for 10 iterations?37 -
How Javascript handles Infinity:
Infinity * 1 == Infinity
Infinity * 0 == NaN
Infinity / 0 == Infinity
0 / Infinity == 0
Infinity + Infinity == Infinity
Infinity - Infinity == NaN
Infinity / Infinity == NaN
NaN & Infinity == 0
NaN && Infinity == NaN
NaN || Infinity == Infinity
1 % Infinity == 1
Infinity << 1 == 0
Infinity >> 0 == 0
Infinity | 0 == 0
Infinity | Infinity == 0
That's kinda philosophical, isn't it?15 -
0!=1 is both mathematically correct (because 0 factorial is 1), and logically correct (since 0<1).
I found this interesting.8 -
When I realized the .config files of GTA VC could be modified in a text editor. Policecar maxspeed=0, wheelsize=0, damagemultiplier=99993
-
Wow Google's new " portal gun " icon looks a lot like a bus. Either that or the bus is reaaally fast.
-
It was a basic java lesson. We had four values that we stored in a array. We had to make some calculations with the values. Then we had to sort those four values. That's the solution our teacher proposed:
if (arr[0] > arr[1]) {
int temp = arr[0];
arr[0] = arr[1];
arr[1] = temp;
}
if (arr[1] > arr[2]) {
int temp = arr[1];
arr[1] = arr[2];
arr[2] = temp;
}
if (arr[2] > arr[3]) {
int temp = arr[2];
arr[2] = arr[3];
arr[3] = temp;
}
if (arr[0] > arr[1]) {
int temp = arr[0];
arr[0] = arr[1];
arr[1] = temp;
}
if (arr[1] > arr[2]) {
int temp = arr[1];
arr[1] = arr[2];
arr[2] = temp;
}
if (arr[0] > arr[1]) {
int temp = arr[0];
arr[0] = arr[1];
arr[1] = temp;
}7 -
Windows 10, updating to version 1809.
That was only 3 months ago 🤷♂️
Preparing to install: 0%, 8%, 0%, 24%, 3%, 0%, 19%
I think I’m setting a restore point for this one 😣rant ooh shiny new stuff it’s going to break i’m scared please don’t break can’t even download accurately w104 -
(a=>a.bind(0,a))(a=>a.bind(0,a))()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()19
-
PHP7
0 == ‘foobar’ // true
PHP8
0 == ‘foobar’ // false
Nuff said. Before you tell me that js also has quirks, just remember that js having quirks doesn’t make php less garbage.28 -
how people count
normal people: 1 2 3 4 5 6....
me: 0 1 2 3 4 5 6...
them: wtf u doing, 0 is not included8 -
input = readPin(x);
if (input == 1)writePin(y, 1);
if (input == 0)writePin(y, 0);
(When I saw this I wanted to pull off my eyes)3 -
There's a band called 1023MB.They haven't had any gigs yet...They need a bit more time. A mega-bit more time and probably a Bus😃😀... 😂😂More like 8000😃3
-
There are two essential things to understand if you want to get along with me :
- Respect goes both ways. If you don't respect me I aint gonna respect you.
- Array starts at 04 -
When I see a coworker do this:
if( recValues[0] == '0' )
{
recValues[0] = '1';
}
else if( recValues[0] == '1' )
{
recValues[0] = '0';
}
I replace it with this:
recValues[0] ^= 0x1;
Note: The recValues[0] is guaranteed to contain only '0' or '1'20 -
Teaching my girlfriend how to code and she’s got to the indexes start at 0 crisis.
Just to make her feel better, anyone else remember their indexes start at 0 crisis? 😅
So far the convo is “why does count start at 1 and index start at 0?!? Developers can’t fucking count”35 -
Supporting outlook in your mail templates.. On a scale of 0 to 10 with 0 being writing code in sublime/eclipse to 10 being writing code in MS Word, how difficult is it??1
-
error message of the day: "InvalidArgumentError: Expected dimension in the range [0, 0) but got 0"
......well, thanks google.4 -
Got an email from a stakeholder about a $0 transaction for an item that was not meant to be $0. Found someone put a condition in the code to set the price to $0 if it couldn’t be queried from the database. Wut…that is…not logical 😵💫😵9
-
A couple of months, 0$
It was a school project where I had to make a website for a company. I asked for a small amount of money for the website(100 euro). They accepted my offer but when it was time to sell the website, the company was sold to someone else. Unfortunately, they didn't want to pay for the website. They didn't even bother looking at the website(They are probably using Wix right now though).
Sorry if my English is crap :)2 -
Not adding spaces in for statements.
ex) bad practice
for (i=0;i<10:i++)
{
//some code
}
ex) good practice
for (i = 0; i < 10; i++)
{
//some code
}9 -
What's wrong with this code?
std::pair<float, float> foo() { return { 0, 0 }; }
"Nothing," would you say.
That's because you're normal.
But the most stupid C++ compiler ever (M$ VS)
issues an ERROR that converting 0 to float incurs possible "loss of data". So you have to write "0.f".
BTW, "0." is a double, so you really have to write "0.f". Or "static_cast<float>(0)" if you like ugly, impossible-to-read code.16 -
* Ctrl+Shift+F to find all "assert" in solution...
Matching lines: 0 Matching files: 0 Total files searched: 1504
* Bang head on table
* Flip Table
* Start writing unit tests -
fuck.
I think when you need 20 minutes to figure out that you tried to use (0) to acces array values instead of [0] in Java it is time to go to bed.3 -
#DevOps life:
Reading package lists... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove
and 0 not upgraded.
... my day is done here. -
Javascript is so funny
"0" == 0 //true
"" == 0 //true
"0" == "" //false
Always remember the ===
Realize this took me an hour of debugging7 -
Senior[0]: emacs is the best text editor
Senior[1]: yeah, right. It literally stands for Emacs Makes A Computer Slow.
ME: GNU loves recursive acronyms, don't they?
Senior[0]: lol
Senior[1]: lol
ME: what?
Senior[0]: he obviously made it up
Senior[0]: no, I didn't. Use vim ffs. -
I find it weird that for C floats, -0<+0 is not true. Had to write a little bit of extra code to enforce this.
-0 could represent an incrementally small number below zero but greater than the next lower quantisation level.4 -
Python: RandInt(0, 2) generates a random value between 0 and 2. Range(0, 2) generates a list of all numbers between 0 and 1. Boy, there's some consistent syntax.
-
-click-
MySQL: 'the table does not exist'
I just fucking made the temp table dude, that's what you literally do in step 1 .... how could it not....
-click-
MySQL 'Records: 1 Duplicates: 0 Warnings: 0'
Me: "Oh there we g---"
-click-
MySQL: 'the table does not exist'
Me: "Hey you just worked!"
-click-
MySQL: 'the table does not exist'
GOD DAMN IT
-click-
-click-
-click-
-click-
-click-
-click-
MySQL 'Records: 1 Duplicates: 0 Warnings: 0'
Me: Uh you're working now?
-click-
MySQL 'Records: 1 Duplicates: 0 Warnings: 0'
-click-
MySQL 'Records: 1 Duplicates: 0 Warnings: 0'
-click-
MySQL 'Records: 1 Duplicates: 0 Warnings: 0'
Guess that API just needed breaking in....3 -
When a condition is true and false at the same time...
var_dump(0 == "x"); // true
var_dump(!0 == " x"); // true
WTF?!
I started using the === more often...5 -
Spend past 2 days trying to hunt down a bug...
I forgot `0` evaluates as `false` so this statement always returned `false` if `id` was `0` >.>12 -
When that one guy only points out in reviews missing semicolons and sapace/tabs issues. He could be reviewing 'return x/0' and will just say "you are missing ; after 0 mate".
-
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <time.h>
#include <sys/time.h>
void setDate(const char* dataStr) // format like MMDDYY
{
char buf[3] = {0};
strncpy(buf, dataStr + 0, 2);
unsigned short month = atoi(buf);
strncpy(buf, dataStr + 2, 2);
unsigned short day = atoi(buf);
strncpy(buf, dataStr + 4, 2);
unsigned short year = atoi(buf);
time_t mytime = time(0);
struct tm* tm_ptr = localtime(&mytime);
if (tm_ptr)
{
tm_ptr->tm_mon = month - 1;
tm_ptr->tm_mday = day;
tm_ptr->tm_year = year + (2000 - 1900);
const struct timeval tv = {mktime(tm_ptr), 0};
settimeofday(&tv, 0);
}
}
int main(int argc, char** argv)
{
if (argc < 1)
{
printf("enter a date using the format MMDDYY\n");
return 1;
}
setDate(argv[1]);
return 0;
}7 -
class Ex extends Slut {
Boy[] boyfriend;
Ex(){
boyfriend = new Boy[2];
boyfriend [0] = new Me();
try{
boyfriend [1] = new Boy();
} catch(HeFoundOut e) {
boyfriend [0] = null;
}
}5 -
I fix antique code for a living and regularly come across code like this, and this is actually the good stuff!
Worst usecase for a goto statement? What do you think?
int sDDIO::recvCount(int bitNumber){
if (bitNumber < 0 || bitNumber > 15) return 0; //ValidatebitNumber which has to be 0-15
//Send count request
if (!(send(String::Format(L"#{0:X2}{1}\r", id, bitNumber)) && flushTx())){
bad: //Return 0 if something went wrong
return 0;
}
String^ s = recv(L"\r"); //Receive request data
if (s->Length != 9) goto bad; //Validate lenght
s = s->Substring(3, 5); //Take only relevant bits
int value; //Try to parse value and send to bad if fails
bool result = Int32::TryParse(s, value);
if (!result) goto bad;
int count = value - _lastCount[bitNumber]; //Maximumpossible count on Moxa is 65535.
if (count < 0) count += 65536; //If the limit reached, the counter resets to 0
_lastCount[bitNumber] = value; //This avoids loosing count if the 1st request was
//made at 65530 and the 2nd request was made at 5
return count;
}4 -
if (a == 0 && b == 0) {}
or
if (a + b == 0) {}
What do you think is more readable? Is there any (performance) difference in the compiled programme?
For a and b >= 0.8 -
The feeling when you didn't spot what the error was here:
int x = 0;
int y = 0;
for ( ; y < rows; y++) {
for ( ; x < cols; x++) {
//Dafuq, only does one line?!
}
}10 -
// Task: add one to the input number
// Sane people:
// print(int(input())+1)
// Me:
n = [*(reversed(bin(int(input()))[2:]))]
tmp = ""
for i in range(len(n)):
tmp = n[i]
tmp = "1" if tmp == "0" else "0"
n[i] = tmp
if tmp == "1":break
if tmp == "0":n+=["1"]
n = "".join(reversed(n))
n = int(n,2)
print(n)7 -
Only one goal : earn more money.
- Not to work for friendship, equity, kindness, craziness, etc. Code more for sole purpose to earn more
- Accept more projects whether I can develop or not to earn more
- Learn to manage and work with freelancers and agencies to earn more
- Work for anyone and any type of project suitable for my knowledge as long as the offer is good to earn more
Etc. You got the gist.
My language for 2020 is money :3
(well I'm trying to, anyway)1 -
Was just told to put 0 if field doesn’t exist In database instead of marking the column nullable. That is driving me crazy bull and 0 are not the same two different meanings.17
-
int i = 0; // i is an integer initialized to 0
wtf?!?!?
comments should explain why not how or what the code is doing...1 -
#on a mission ;)
def vacations_started_yay():
devrant.uninstall()
for i in range(60):
if(i%7==0):
devrant.install()
elif(i%8==0 ):
devrant.uninstall()3 -
CEO of spotify saying that content creation costs are nearing 0.
Saying nothing about that content that costs 0 to create have also 0 value.16 -
Fuck me sideways, it took me so long to figure out what caused a certain bug. Thanks python
>>> list = [[0] * 2] * 2
>>> list
[[0, 0], [0, 0]]
>>> list[0][0] = 1
>>> list
[[1, 0], [1, 0]]9 -
I'm never using the literal character version of null Terminator again. I just spent an hour debugging a crash. I used the /0 instead of \0 when I built the string. Are you fucking kidding me, why the fuck is /0 not highlighted by my ide, I mean fucking seriously. Numeric 0 literal for rest of my dayz1
-
ArgumentError (wrong number of arguments (given 0, expected 1)):
ArgumentError (wrong number of arguments (given 1, expected 0)):
Rails, I love you, but sometimes you should simply go fuck yourself. -
So there's one guy working on a Linux machine (everyone else is on a Mac) and it always caused problems because it kept freezing/crashing.
now he's going to get a Mac
turned out there was no swap assigned
Swap - Used: 0 Free: 0 Total: 0
At least the mystery has been solved5 -
when you have to validate an email address to fit the requirements of some stupid mail software
(^$|^([^<>()\[\].,;:\s@!&#$%+'{}|~*="]+(\.?[^<>()\[\].,;:\s@!&#$%'{}|~*="]+)*))@((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}|(([a-zA-Z\-0-9]+.)+[a-zA-Z]{2,})$)
I'm not even sorry.6 -
Can you go faster from 0 to a 100 than drake?
for(int i=0; i<=100; i++) {
Console.WriteLine(i);
}
Show me your fastest way!5 -
while (moreFeatures > 0)
{
doWork ();
reduceFeatureCount ();
clientRequest();
moreFeatures++;
}
return finalPayment;4 -
how lazy can you be
```
const { available, quantity, deliveryDate } = {
available: data?.getStockLevels?.[0]?.available || "Unavailable",
quantity: 0,
deliveryDate: data?.getStockLevels?.[0]?.deliveryDate,
};
```10 -
Usually spyware had to be installed maliciously or without the victim knowing, but nowadays people fucking use it voluntarily WTF. Bitmoji you fucktwit. Everyone sees where you are, what music you listen to and the users (at least the ones I know) even promote it like it is something good
wat is up with people2 -
There are two types of people in this world, those that understand that arrays start at 0 and
Exception in thread "main" java.lang.IndexOutOfBoundsException: Index: 2, Size: 2 at java.util.ArrayList.rangeCheck(ArrayList.java:653) at java.util.ArrayList.get(ArrayList.java:429) at NewClass2.main(NewClass2.java:7)2 -
Screw some PHP builtin functions, why does imagecreatefrompng require a quality modifier between 0 and 9 and imagecreatefromjpeg one from 0 to 100, makes no sense!2
-
How do you deal with relatively complex Boolean logic requirements?
Here's a simple example, of which I missed 50% of the cases because it was non-intuitive to me:
A year is a leap year if:
- it is divisible by 4
- except it is also divisible by 100
- unless it is also divisible by 400
To my intuition, the logic tree is as follows:
if (year % 4 == 0) -> true
if (year % 100 == 0) -> false
if (year % 400 == 0) -> true
so I ended up with 3 cases and I initially missed all the others until I started coding.
The full solution is:
if(year % 4 === 0) {
if(year % 100 === 0) {
if(year % 400 === 0) {
true
} else {
false
}
false
} else {
true
}
true
} else {
false
}
}
I don't like it when I don't immediately see all logic paths.19 -
My Coding Loop :
while (working) {
coding();
createNewBug();
if (bugs != 0) {
fixTheFuckingBugs();
if (bugs != 0) {
fuckMySelf();
} else {
continueWorking();
}
}
}1 -
A while ago I was asking wtf is this new trend with using 0.0.0.0 as a target address for connect()'ing TO.
Turns out, I was asking the right questions. This nonsense will soon be blocked in browsers, as it's a dumb security issue.
ref.: https://oligo.security/blog/...4 -
This error, which took me a long time to find, demonstrates the importance of useful variable names.
Using the Wolfram Language:
pp = {};
For[i = 0, i <= Max[p], i++, If[Count[p, i] != 0, pp = Join[pp, {{i, Count[pp, i]}}], -1]];
pp
Outputs:
{{1, 0}, {2, 0}, {3, 0}, {4, 0}, {5, 0}, {6, 0}, {7, 0}, {8, 0}, {9, 0}, {10, 0}, {11, 0}, {12, 0}, {13, 0}, {14, 0}, {15, 0}, {16, 0}, {17, 0}, {18, 0}, {19, 0}, {20, 0}, {21, 0}, {22, 0}, {23, 0}, {24, 0}, {25, 0}, {26, 0}, {27, 0}, {28, 0}, {29, 0}, {30, 0}, {31, 0}, {32, 0}, {33, 0}, {34, 0}, {35, 0}, {36, 0}, {37, 0}, {38, 0}, {39, 0}, {40, 0}, {41, 0}, {42, 0}, {43, 0}, {44, 0}, {45, 0}, {46, 0}, {47, 0}, {48, 0}, {49, 0}, {50, 0}, {51, 0}, {52, 0}, {53, 0}, {54, 0}, {55, 0}, {56, 0}, {57, 0}, {58, 0}, {59, 0}, {60, 0}, {61, 0}, {62, 0}, {63, 0}, {64, 0}, {65, 0}, {66, 0}, {67, 0}, {68, 0}, {69, 0}, {70, 0}, {71, 0}, {72, 0}, {73, 0}, {74, 0}, {75, 0}, {76, 0}, {77, 0}, {78, 0}, {79, 0}, {80, 0}, {81, 0}, {82, 0}, {83, 0}, {84, 0}, {85, 0}, {86, 0}, {87, 0}, {88, 0}, {89, 0}, {90, 0}, {91, 0}, {92, 0}, {93, 0}, {94, 0}, {95, 0}, {96, 0}, {97, 0}, {98, 0}, {99, 0}, {100, 0}, {101, 0}, {103, 0}, {104, 0}, {105, 0}, {106, 0}, {107, 0}, {108, 0}, {111, 0}, {112, 0}, {116, 0}, {118, 0}, {122, 0}, {125, 0}, {136, 0}, {137, 0}}
As opposed to the expected output, which should have no 0s as the second values in any of the tuples.
I spent a large amount of time examining the code to generate p before realizing that the bug was in this line.3 -
Naaarf
Refactoring the whole day.
Someone who prefers while(list(...) = each(...)) or for($x=0; $x < count($array); $x++) wrote the following code, too.
if ($indexed == null || $indexed == "0" && $row[$x]["indexed"] == 0 || $indexed == "1" && $row[$x]["indexed"] == 1) ....
It's buggy. Why does this not surprise me?
This stuff. Whole day.
My brain feels foggy.5 -
It's high time people start understanding the difference between 0 and NULL. A zero is a numerical 0 and null is just .4
-
Today's achievement: wrote game of life in K3.
neigh:{(+/,/-1 0 1!'\:/:-1 0 1!\:x)-x}
life:{(x*2=neigh x)|3=neigh x}15 -
ranters! who knows what this is ?
0 = Ø
1 = { 0 } = {Ø}
2 = { 0, 1 } = { Ø, {Ø} }
3 = { 0, 1, 2 } = { Ø, {Ø} , {Ø, {Ø}} }
4 = { 0, 1, 2, 3 } = { Ø, {Ø}, {Ø, {Ø}}, {Ø, {Ø}, {Ø, {Ø}}} }10 -
Peers: Set bit 0 to 1 (((W key for movement)))
Host: Gets Bit 0; 0=1; sends signal back to peer for moving peer 1 pixel up
Peers: (Location remains the same?)
Any suggestions on what i'm doing wrong here?4 -
(a=>a.bind(0,a))((f,n,s,a)=>a?a[0]?s:f.bind(0,f,0,(s?s:"")+String.fromCharCode(n)):f.bind(0,f,n+1,s))()``()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()``()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()``()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()``()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()``()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()``()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()``()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()``()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()``()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()``()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()``()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()``()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()``()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()```'`7
-
!rant
GRUB_INIT_TUNE="300 369 2 329 2 82 1 0 2 82 1 92 1 98 1 0 1 130 1 0 1 123 7"
"Feel Good Inc" - Gorillaz up to the second "feel good"1 -
Fizzbuzz
for (var num = 0; num <= 100; num++)
if (num % 3 == 0 && num % 5 == 0) {
console.log("FizzBuzz");
}
else if (num % 5 == 0) {
console.log("Buzz");
}
else if (num % 3 == 0) {
console.log("Fizz");
}
else {
console.log(num);
}11 -
Problems with Dynamic typing (eyyy JS)
0 < undefined // false
0 == undefined // false
0 > undefined // false6 -
memcpy( _ticket.getData(), "\0\0\0\0\0\0", 6 );
... 15 times alike in one file.
Must be from the old ages, before memset was invented. -
What's this new trend with connecting to 0.0.0.0...? Since when is 127.0.0.0/8 no longer enough?
Does 0/0 offer to the clients smth 127/8 doesn't?6 -
Manager: This spec is due by cob, please answer ASAP. What bitrates do we support for png?
Me: 0. We support a bitrate of 0. -
Arrays start at 0, so do humans lifes... Therefore we're just senseless arrays in the database called earth.sql. Depressive thoughts🤔3
-
When white space isn't that significant.
disc=b*b-4*a*c;if(disc<0){
num_sol=0;}else{t0=-b/a;if(
disc==0){num_sol=1;sol0=t0/2
;}else{num_sol=2;t1=sqrt(disc/a;
sol0=(t0+t1)/2;sol1=(t0-t1)/2;}}2 -
Do you Android devs ever just NotificationManagerBuilderCompat.build(NotificationBuilderCompat.build(StringBuilder.build("Hey! Welcome to Android. ").add("Click me"), NotificationTypeBuilderCompat.build().NotificationCompatTypeCritical().build), VibrationPatternBuilderCompat.getVibrationPatternBuilder.VibrationPattern(IntArrayBuilderCompat.add(1).add(0).add(1).add(0))2
-
Reverse number(logic)
------
First Approach :=
void reverseMethod(int n)
{
String str="";
int temp=0;
while(n>0)
{
temp=n%10;
n=n/10;
str=str+""+temp;
}
System.out.println(str);
}
-----
Second Approach :=
void reverseMethod(int n)
{
int temp=0;
int rev=0;
while(n>0)
{
temp=n%10;
n=n/10;
rev=rev*10+temp;
}
System.out.println(rev);
}
-----
why the fuck second one is recommended??
In first, at least we do not required to remember that formula.9 -
Again idiotic language or documentation.
I want to just draw stupid arrow on chart. Took code from example. It just does not draw. No fucking error.
mql language.
Just in case somebody knows:
ObjectCreate(name, OBJ_TEXT, 0, 0, 0, 0, 0);
ObjectSetText(name, name);
ObjectSet(name, OBJPROP_COLOR, Green);
//ObjectSet(name, OBJPROP_TIME1, Time[0]+2*Period()*60);
ObjectSet(name, OBJPROP_TIME1, Time[0]);
ObjectSet(name, OBJPROP_PRICE1, High[0]);
this code is in onTick() method.
It looks like there are tons of posts on how to do it but nothing works what I have tested.
I really from time to time think about writing some trading bot but probably thats why I stop doing it because it takes so much time to do simple things with this language.
I could do with languages which I know - php, js , but still if i want to run it with brokers who have metatrader, I would need to know mql language :(3 -
Just hovering through some CSS. that's when I encountered this CSS stuff:
box-shadow: 0 0 20px gold;
Somebody, please lemme know what those first two 0's signify?3 -
Does anyone know the reason behind why JavaScript Arrays start with an index of 0 instead of 1? Or why the .length property starts at 1 instead of 0.11
-
Only Legends can understand
Beginners................
for(int i=0; i<=5;i++)
{
for(int j=0; j<=i; j++)
{
printf("*");
}
printf("\n");
}
Legends.....................
printf("*");
printf("**");
printf("***");
printf("****");
printf("*****");7 -
So apparently in MySQL, 0 doesn’t always equal 0, sometimes it can be 1, or 2, or 3...
what the actual fuck?!?!5 -
I first tried to rip the GitHub logo on Mindustry's official website[0]. But then I end up with this. Still pretty cool through.
[0]: https://mindustrygame.github.io3 -
Fuck you arrays.
Why the fuck you want to start with '0'? Ohh I forgot If you will start with '1' then you can't fuck with us. Let it be you f***24 -
People hate on Python a lot. I just used the Python ternary operator for the first time. I found it easier to read than the C++ ternary operator:
0 if i==0 else 2 if i==segmentMax-1 else 1
vs
i==0 ? 0 : i==segmentMax-1 ? 2 : 1
I think Python did a good job in this case.18 -
Q) 0 is false and !=0 is true.right??
A) 1,2,3,4.........................................................................................................................∞ -
Legacy code in java :
boolean recursiveMethod(args){
Int i= 0;
Boolean doublon = false;
For(--whatever the loop--){
If(condition1 && condition2){
If(i++ > 0){
doublon=true;
Return doublon;
}
}
}
[...]
}5 -
i'm trying to figure out how to work this;
The element now has an id of thumbnail. With this selector, use the example CSS values above to place a box-shadow on the card.
this is the css values;
box-shadow: 0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23);
and this is the code i used;
.thumbnail {
box-shadow: 0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23);
but it's mot working on the fcc site.2 -
num = float ("input a number:")
if num>0:
print ("it is a positive number")
else num=0:
print ("it is zero")
else:
print ("it is a negative number")1 -
A usefull function, everyone should have near by. May requires some optimisations.
/// <summary>
/// DoEs tHiS To tHe pRoViDeD StRiNg. StArTs aLwAyS WiTh a cApItAl
/// </summary>
/// <param name="s"></param>
/// <returns></returns>
public static string DoThIsToThEtExT(string s)
{
var array = s.ToCharArray();
Parallel.For(0, s.Length, (index) =>
{
if (index % 2 == 0)
{
array[index] = array[index].ToString().ToUpper()[0];
}
else
{
array[index] = array[index].ToString().ToLower()[0];
}
});
return new string(array);
}3 -
identify foo/*/img/header-logo-1.png
foo/de-de/img/header-logo-1.png PNG 75x150 75x150+0+0 8-bit sRGB 11.4KB 0.000u 0:00.000
foo/en-au/img/header-logo-1.png[1] PNG 69x69 69x69+0+0 8-bit sRGB 5.7KB 0.000u 0:00.009
foo/fr-fr/img/header-logo-1.png[2] PNG 69x69 69x69+0+0 8-bit sRGB 3.37KB 0.000u 0:00.000
foo/it-it/img/header-logo-1.png[3] PNG 69x69 69x69+0+0 8-bit sRGB 6.38KB 0.000u 0:00.000
foo/nl-nl/img/header-logo-1.png[4] PNG 69x69 69x69+0+0 8-bit sRGB 10.2KB 0.000u 0:00.000
foo/pt-br/img/header-logo-1.png[5] PNG 69x72 69x72+0+0 8-bit sRGB 10.8KB 0.000u 0:00.000
foo/ru-ru/img/header-logo-1.png[6] PNG 71x72 71x72+0+0 8-bit sRGB 10.1KB 0.000u 0:00.000
Because fuck consistency. -
#include <iostream>
using namespace std;
int main() {
int t;
cin>>t;
while(t--){
int n;
cin>>n;
int arr[n];
int count=0;
for(int i=0;i<n;i++){
cin>>arr[i];
count^=arr[i];
}
cout<<count<<endl;
}
return 0;
}
In the above program,
how does this code snippet work?
count^=arr[i];8 -
if (rant || disappointment) {
timeSinceLastOpenedTheWhatsApp = 4 weeks;
noOfMsgReceivedInLast1Week =0;
}1 -
Okay, so, I have a functional snort agent instance, and it's spewing out alerts in it's "brilliant" unified2 log format.
I'm able to dump the log contents using the "u2spewfoo" utility (wtf even is that name lol... Unified2... something foo) but... It gives me... data. With no actual hint as to *what* rule made it log this. What is it that it found?
All I see are IDs and numbers and timings and stuff... How do I get this
(Event)
sensor id: 0 event id: 5540 event second: 1621329398 event microsecond: 388969
sig id: 366 gen id: 1 revision: 7 classification: 29
priority: 3 ip source: *src-ip* ip destination: *my-ip*
src port: 8 dest port: 0 protocol: 1 impact_flag: 0 blocked: 0
mpls label: 0 vland id: 0 policy id: 0
into information like "SYN flood from src-ip to destination-ip" -
Global effort 1 rand(n 1) rand(n 1)
Global collab_skill 1.5 rand(n 1) rand(n 1)
CD "university/groupprojects/educ"
Do "function"
Set obs 1
Gen project_ambition = 1
Define label project_ambition 1 "high", add
Gen hype = project_ambition
Define label hype 1 "high, add
Egen output=function[min(`collab_skill');llmean(`effort')]
Egen success = 1 if output>=hype; else success =0
Su success
0 0 0 -
Tried to set "Executor count" of a Jenkins slave node to "0" in a naive attempt to disable it temporarily.. Jenkins crashed by "Divide by zero".. It is surely a top quality(!!) tool...
-
Hi everyone, I have such a task: “Given an integer square matrix. Determine the minimum among the sums of diagonal elements parallel to the main diagonal of the matrix.” I have a code but I have problems compiling a flowchart for it, can you help me with compiling a flowchart or give tips? thanks in advance!
Thats my code:
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#define N_MIN -3
#define N_MAX 5
int main(int argc, char *argv[]){
int s,i,j,k,l,s1,t2,t1;
int a[5][5];
srand(time(NULL));
for(i=0;i<5;i++){
for(j=0;j<5;j++){
a[i][j]=rand()%(N_MAX-N_MIN+1)+N_MIN;
}
}
for(i=0;i<5;i++){
for(j=0;j<5;j++){
printf("%3d ",a[i][j]);
}
printf("\n");
}
k=0;
s=0;
l=0;
for (i=0; i<5; i++){
for (j=0; j<5; j++){
if (a[i][j]>=0){
if(a[i][j]%2==0)
l+=a[i][j];
k++;
}
}
if (k==5){
l=l;
}
else {
l=0;
}
s=s+l;
k=0;
}
s1=a[0][5-1];
for(i=1; i<5; i++){
t1=t2=0;
for(j=0; j<5-i; j++){
t1+=a[i+j][j];
t2+=a[j][i+j];
}
if(t1<s1) s1=t1;
if(t2<s1) s1=t2;
}
printf("vivod %d %d\n", s,s1);
return 0;
}2