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 - "p"
-
Double standards :pjoke/meme ide lol buttons ui users updates -.- innovation my ass dev meme double standards everywhere interface2
-
> Open google chrome console (F12)
> Press Ctrl + Shift + P (or Cmd + Shift + P)
> Type "dark theme"
> Press enter
Don't thank me, just my duty10 -
The Power of Autocorrect
Writing an important update email to a very strict senior manager named Denis, with whom the previous encounters were also uncomfortable.
About to click send, but thought to read it once.
Imagine what autocorrect did...
D became P
I conclude it was a lucky day.19 -
Try this line of javascript in a browser:
<pre id=p><script>n=setInterval("for(n+=7,i=k,P='p.\\n';i-=1/k;P+=P[i%2?(i%2*j-j+n/k^j)&1:2])j=k/i;p.innerHTML=P",k=64)</script>8 -
// I can't be the only one...
public static void p(String inpt) {
System.out.println(inpt);
}
...
p("That much typing is unjustified.");13 -
!rant
Boss: You can't start coding without understanding the phrase P. O. O. P.
Me: P. O. O. P.?
Boss: Is a carefully organized code
People
Order
Our
Programs2 -
I hacked a browser game a few years ago for fun and the exploit I found and used was basically this:
<$php
$f = $_GET['f'];
$p = $_GET['p'];
$f($p);
So it was possible to pass a function and it's parameter in the URL to the server. The author used this to include() sub pages. I to highlight_file()s.2 -
Just started learning haskell and if someone wants a 'why' I give you quicksort:
quicksort [] = []
quicksort (p:xs) = (quicksort lesser) ++ [p] ++ (quicksort greater)
where
lesser = filter (< p) xs
greater = filter (>= p) xs12 -
Person: What are you doing for living?
Me: I am a software engineer.
P: what does that mean?
M: we build applications and websites. basically
P: like what?
M: I don't have an example now, but when you open your computer and navigate to a website, we build similar things..
P: ahhaaah, so you make computers
M: no no, *open Facebook on my phone* see this is an application, we made applications that run on devices.
P: so make phones, that's cool
M: nooo!
P: so you do nothing !
M: yes 🙄1 -
!rant
Conversation between [C]oworker and... some kind of customer-side [P]roject manager.
P: Hey, our release 2.0 is ready, but somehow I can't add tag to master. Could you try, please?
C: Yeah, sure.... Done... We are missing tag for 1.2 still, should we add it?
P: Oh, right, I forgot about that.
C: Ok, found merge... Done.
P: *displaying repo in GitBlit* Uh, now the order is wrong. And date is the same. Can we do something about that?
Me: We can just push that tag with replaced date. *just guessing*
P&C: You can do that??
Me: Sure
Me.thinking: Thats git... I would be suprised if we could not.
Me: *pushing tag* Check it now.
P: Whoa, nice!3 -
My friend after five tries:
<p>yeuahhhhh bitchessss</p>
Also my friend:
Whew, that was hard. At least now I'm officially a hacker2 -
The new holy war in C#:
Point p = new Point(5, 3);
vs.
var p = new Point(5, 3);
vs. (new)
Point p = new (5, 3);
and... FIGHT!!43 -
Who wants to buy $77.44 worth of arduino parts (including an UNO, two Pro Micros and a Digispark)
For best offer + SH (Paypal)
Parts consist of two sepperate kits and a few individual parts purchased.
All parts are unused (besides the Digispark) but some have been opened.
Message me on Telegram @thecyaniteproject or Discord @Kianite#3935 for exact parts listing.
US based.
Backstory: (If this is even needed)
I spent a lot of money on parts for a project after everyone told me it was a bad idea. Spoiler: It was a bad idea.19 -
$ mysql -uroot -p > file.sql instead of
$ mysqldump -uroot -p > file.sql
And not checking the result file before reinstalling my server 😭😭2 -
A C++ question. Correct answer will get you a virtual thug glasses & a cigar if you're into that , and upvotes (:
#include <stdio.h>
int main(void) {
int i = 4;
int* p = &i;
i = 8;
printf("i divided by *p is: %d\n", i/*p);
return 0;
}
What is the result of running this code?18 -
Generally happy about being norwegian but...:
<p>Husk: Du kan ikke bruke ��� i filnavn.</p>
Translated from Norwegian:
"Remember: You can't use ��� in filenames."10 -
P=Pull Requester
M=Me
M: Hi, can you update your pull request title ?
P: Sure!
The pull request title: "A pull request title"
M: oh..5 -
How to lose my respect :pjoke/meme love linux random tag js sorry if it's yours jsx dfox iphone regex pichardo for president apple sucks apple
-
More masturbation with numbers.
If you take some product p,
and do
√p**(1/p)
and it's factors
a**(1/p)
and
b**(1/p)
you might find something interesting.
Take for example
a=21977
b=43331
p=a*b=952285387
(√p)**(1/p) = 1.0000000108551363
a**(1/p) = 1.0000000104986928
b**(1/p) = 1.0000000112115799
More often then not, a, b, or both, will share one or two of the most significant digits in the mantissa, as the root of p.
It doesn't always work, but it seems to be true more often than you might expect.
This is probably obvious in hindsight but I still think it's cool.
In some instances if you then do, say
sqrt(log(p, 1.000000010)), it comes pretty close to the original factors, but thats really hit or miss.8 -
I'm soon leaving one of my SysAdmin jobs. Guess how I'll troll everyone then...
Right! I'll apply a Windows 10 total conversion onto all Linux client systems!
MUHAHAHAHA!
*note: some colleagues often ask if we could use windows instead - well, no.*
*note2: we have automatic provisioning and roll-out, so switching a theme is done with 20 lines of config code*
GDM:
https://gnome-look.org/p/1167924/
Icon:
https://gnome-look.org/p/1167936/
Cursor:
https://gnome-look.org/p/999870/
GTK3:
https://gnome-look.org/p/1013482/1 -
My favorate bookmarklet (ES6 only):
javascript:(()=>{var b,c,a=document,f="onreadystatechange",h="https://rawgithub.com/smore-inc/...=(p,q)=>{p.readyState?p[f]=()=>{"loaded"!=p.readyState&&"complete"!=p.readyState||(p[f]=null,q&&q())}:p.onload=function(){q&&q()}},k=()=>{clippy.load("Clippy",p=>{$(".clippy").css("position","fixed"),$(".clippy").css("z-index",1e3),p.show(),p.moveTo(100,100)})},m=()=>{(c=a.createElement("script")).src=h+"clippy.js",a.body.appendChild(c);var p=a.createElement("link");p.rel="stylesheet",p.type="text/css",p.media="all",p.href=h+"clippy.css",a.getElementsByTagName("head")[0].appendChild(p)};"undefined"==typeof jQuery?(b=a.createElement("script"),b.src="https://ajax.googleapis.com/ajax/...,j(b,()=>{m(),j(c,k)})):"undefined"==typeof clippy?(m(),j(c,k)):k()})();14 -
Well, in Google I/O, Android P Beta is announced for Android devices.
I could see it supported by Google, Sony, OnePlus devices. Even rolling out for Oppo, Vivo, MI.
No Samsung? 🤔wondering why??5 -
For all things, for all men, that a man compliments a thing does not imply that this man at least attempts to understand this thing. However, for all men, that a man criticises a thing implies that this man at least attempts to understand this thing.
For all computer programs, that a computer program is terrible implies that scrapping the current implementation of this computer program and beginning anew may be the best method of fixing this computer program.
With few exceptions, for all programming languages $l$, given sufficient effort, $l$ source code can be human-readable.
The UNIX philosophy never became outdated.
For all computer programs $p$, $p$ should be written sufficiently well that the author of $p$ can be prideful of $p$.
For all computer programs $p$, a specification for $p$ should be written before $p$ is created.
For all good computer programs, a good computer program can run on terrible hardware.
Every clock cycle is valuable.8 -
<?php
$currentTime = getCurrentTime();
$asleep = getSleepStatus(); // true
$getUpTime = "9:30am";
while($asleep && ($currentTime >= $getUpTime)){
?>
<p>You're late!! Its <?php echo $currentTime ?>!</p>
<?php
updateStatus();
}
?>2 -
"One small change, just put the locations in GPS order."
Oh god da faq is gps order.
He means, insert a solution to the traveling salesman problem. He thinks, it's as easy as alphabetical ordering.
Fml2 -
"Fast" random-number/sample based estimation of logarithms:
https://pastebin.com/niVB57Ay
The result of rAvg(p) is usually "pretty close" to log(p)/2
rAvg(p, 1000) seems to be the golden number. 100 is a little low, but I've already pasted the code. Eh.
Don't know why it works, or if average results are actually considered "close" for logarithms of e.7 -
Coworker just tried to center an http form using this:
<p text-align: Center"> form here </p>
or
<p margin-right: auto"> form here </p>
The sad thing is, that he is working on websites for more than half a year now...1 -
@PonySlayStation people are hating your fifth sibling based on their looks. Got anything to say in defence?2
-
Writing ! instead of ~ to make a true logic statement negative in Math exam.
Like: ~p=>q —–> !p=>q1 -
Is thinking about P=NP kinda like thinking about "the game"?
At least thinking about P=NP is useful for thinking about the nature of things.
Congrats on winning the game btw.6 -
If only more devs would use short, yet concise, modern constructs instead of archaic ones.
For example in C#: using lambdas, extension methods, LinQ,.. much easier to read through if you know how these work, rather than having to spend all day scanning tedious for-loops and over-engineered classes your colleagues wrote who don't know any better.
Examples:
vs.foreach(v => console.write(v));
initialList = secondList.Where(p => initialList.Contains(p, valueComparer))
.Concat(initialList.Where(p => !secondList.Contains(p, valueComparer))).ToList(); -
Its everyones favorite time again. Wisecrack's 8th grade hoborants about mathematics.
Lets start with the example
a=89
b=223
p=a*b=19847
If
(1/(5/p))/b = 17.8
and naturally
p/5 =3969.4
3969.4/b = 17.8
What I find interesting is that...
p/17.8 = 1115.0
..for any product and factors (given two factors), the result will always be an integer.
Why is this?
You can see that
t= 1115.0*b = 248645.0
And if
17.8*(p/a) = 3969.4
Then
17.8*(t/p) = 223.0 (our factor, b)
a*(t/p)
1115.0
p/1115
17.8
also a*(t/p) = 1115.0
I could be once again misunderstanding but
what it looks like is that theres some real number that always transforms p into an integer on the ring of integers (Z) representing multiples of the factors of p.
Now notice
b/17.8 = 12.52808988764045
We can also get that number like so..
t/p = 12.52808988764045
I think (though I could be mistaken) is that the reason is because t is b*1115 and 12.52808988764045 is the ratio between b and 17.8 as well as the ratio between
p and 1115.
And if we do
t/√p = 1764.9495488858483
1764.9495488858483^2 = 3115046.9101123596
also incidentally
3115046.9101123596/t =12.52808988764045
3115046.9101123596/12.52808988764045 =
t (this is obvious but I want to point it out anyway), or 248645.0
and
1115/b = 5.0
248645.0/5 = 49729.0
and
√49729.0 = b
Why is this last part true, that √(t/5) = b?11 -
Help with C code
int main()
{
int x =10;
void *p = &x;
printf("%d", ((int*)p)* );
return 0;
}
I'm trying to cast p to and int, for dereferencing it and printing the value of x, but Im getting an "expected expression before ) token" in the line for printf.8 -
This is how to find the base needed for any integer value p, where p>=5, such that the logarithm always equals e in python.
log(p, e**(log(p, e**e))) # equals e
Doesn't do anything besides that but this is another identity isn't?24 -
Anyone else with a short pinky finds it uncomfortable to type p while touch typing? Thinking of buying an ortholinear keyboard in the hope it'll be more comfortable.10
-
Hang with me! This is *not* a math shitpost, I repeat, it is NOT a math shitpost, not entirely anyway.
It appears there is for products of two non-trivial factors, a real number n (well a rational number anyway) such that p/n = i (some number in the set of integers), whos factor chain is apparently no greater than floor(log(log(p))**2)-2, and whos largest factor is never greater than p^(1/4).
And that this number is at least derivable, laboriously with the following:
where p=a*b
https://pastebin.com/Z4thebha
And assuming you have the factors of p/z = jkl..
then instead of doing
p/(jkl..) = z
you can do
p-(jkl) to get the value of [result] whos index is a-1
Getting the actual factor tree of p/z is another matter, but its a start.
Edit: you have to provide your own product.
Preferably import Decimal first.3 -
(%{DATE})(.*)(Sent)( ID)(\[)(?<index>(.*))(])( /)(?<m>(?!m0)(?!m1)(m.*))(/)(?<t>(t.*))(/)(?<p>(p.*))(/)(?<r>(r.*))(/S\[)(?<s>(.*))(]/R\[)(?<r>(.*))(])
Heyyyy I am not a grok robot!!!6 -
(define (day p)
(map(lambda(color)
(colorize p color))
(list "red" "orange" "yellow" "green" "blue" "purple")))
>(day(square 5)) -
Okay... Complexity Theory.
Polynomial time
Nondeterministic Polynomial time
If not now, when you first learned of P and NP, it's time for you to share what you thought P and NP were acronyms for.2 -
I need advice. Is there a quick way to get the sum of a series?
for example.
p + p-1 + p-2 + p-3 ...
and so on?12 -
<p class="another silly p">Hello World</p>
(Just found this app.. wanted to say hello world like all the tutors and instructors do so lovely) -
As I look at my other self I can't help but say "told you so"
:P
wanna talk about a content theft scenario :P
I put a few posts up online, they booted me off, and now someone else is claiming to have made the advanced tutorial content teaching you to go fuck yourselves :P2