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 - "amish"
-
!rant
Quite the opposite of a Rant actually. Very good day today! Had pancakes to start the day, finally got a second monitor for only 5 bucks - it is so much easier to program with live change monitoring!
And, I finally got my very own server rack :) just wanted to share!10 -
Today, for fun, I wrote prime number generation upto 1000 using pure single MySQL query.
No already created tables, no procedures, no variables. Just pure SQL using derived tables.
So does this mean that pure SQL statements do not have the halting problem?
Putting an EXPLAIN over the query I could see how MySQL guessed that the total number of calculations would be 1000*1000 even before executing the query in itself and this is amazing ♥️
I have attached a screenshot of the query and if you are curious, I have also left below the plain text.
PS this was a SQL problem in Hackerrank.
MySQL query:
select group_concat(primeNumber SEPARATOR '&') from
(select numberTable.number as primeNumber from
(select cast((concat(tens, units, hundreds)+1) as UNSIGNED) as number from
(select 0 as units union select 1 union select 2 union select 3 union select 4 union select 5 union select 6 union select 7 union select 8 union select 9) unitsTable,
(select 0 as tens union select 1 union select 2 union select 3 union select 4 union select 5 union select 6 union select 7 union select 8 union select 9) tensTable,
(select 0 as hundreds union select 1 union select 2 union select 3 union select 4 union select 5 union select 6 union select 7 union select 8 union select 9) hundredsTable order by number) numberTable
inner join
(select cast((concat(tens, units, hundreds)+1) as UNSIGNED) as divisor from
(select 0 as units union select 1 union select 2 union select 3 union select 4 union select 5 union select 6 union select 7 union select 8 union select 9) unitsTable,
(select 0 as tens union select 1 union select 2 union select 3 union select 4 union select 5 union select 6 union select 7 union select 8 union select 9) tensTable,
(select 0 as hundreds union select 1 union select 2 union select 3 union select 4 union select 5 union select 6 union select 7 union select 8 union select 9) hundredsTable order by divisor) divisorTable
on (divisorTable.divisor<=numberTable.number and divisorTable.divisor!=1)
where numberTable.number%divisorTable.divisor=0
group by numberTable.number having count(*)<=1 order by numberTable.number) resultTable;9 -
I like paradoxes, I created one with multiple choice questions.
"Some stupid question" ?
A) answer 1
B) answer 2
C) None of the above
D) All of the above (paradox)
#killingtime6 -
Let's see the coder in you.
If I give input: 1 output: 2
If I give input: 2 output:1
Only these two test cases needed.
You should not use control structures such as if,else,for,while,switch etc. (The answer is simple) (Don't cheat)
int number;
cin>>number; //get number
cout<<??????; //Your code53 -
Thought it was about time I posted a picture of my hackintosh. Been around a month now. Pro power at a quarter of Air’s cost.7
-
Customer: Do you need my computer password?
Me: Yes, I do. Why don't you write it down for me? *fills out work order form while she writes down her password*
Customer: Here you go *slides me sticky note with password on it*
Me: *usual spiel about computer repair stuff*
Customer: *leaves*
Me: *to Coworker* So this lady's password is "AmishForLife* (modified for security purposes).
Coworker: On her iPad?!
Me: And her computer, yes
Coworker: *laughs*
Me: I wonder how well that's working out for her... -
codeCertain - Duolingo styled code learning platform that emphasizes learning by repetition. Be certain of your code.5
-
Can someone explain me AI/ML/DL in traditional algorithmic way without AI jargons?
What I currently understand is that they convert the training data to numbers based on a complex black boxed mathematical algorithm and then when a new data comes in, the same conversion is done and a decision is taken based on where the the new number fits in within the geometry/graph plot of the old numbers from training. The numbers are then updated. Is this what they call AI? Nearest number/decision search?
Kindly try to avoid critic, I am having a difficult time understanding the already trending AI stuff. People say that the algo exists from long back but only now we have the compute power.20 -
Estimate for writing a custom WordPress plugin:
1 hour - Learn the API the plugin will support
1 hour - Review how plugins are written
60 hours - Set up XAMPP only to find that the version with PHP 7 no longer supports MySQL but something called MariaDB which my host doesn't support and then uninstall XAMPP and install MAMP only to get really frustrated setting it up and beat myself for not just buying that $99 Windows Pro upgrade so I can install Kalabox with HyperV which is much easier than all of this and why doesn't Kalabox have a way of supporting Windows Home because not everyone buys Windows Pro or can afford a Mac or has time to screw around with 100 possible Linux distros to figure out which one will work best and then buy gasoline and matches and set it on fire and watch it all buuuuuuurn such pretty fire.8 -
Getting real tired of your crap, Google. How can I be a technology worker in a world where I have to help clients who use your services without destroying my own privacy in the process? If I tried to live off the grid and keep my profession, it would be like an Amish person doing IT by writing code, etc. on paper with a pen and giving it to someone else to type into a computer.
https://cnbc.com/2019/07/...5 -
So I saw this argument between two intellectual titans on Quora about C vs C++. It was pretty amusing lol.
First Guy: “C programmers are the Amish! They’re afraid of change. C++ is a better C because it repairs it insufficiencies like classes and namespaces.”
Second guy: “C is fairly consistent, while C++ is inconsistent in many places. It performs so many allocations without you even knowing it. It’s complexity is very distracting !”10 -
Please repeat after me:
"I will use 'Content-Disposition: attachment' whenever a file is supposed to be downloaded"
Write that sentence 100 times. Then re-read it every morning for at least one month.
Ahh, I don't even have the strength to rant. I'm so fucking tired of these shitty websites and web services. I should probably become an Amish.5 -
Thanks, AfterShip.com, for working flawlessly while the system I was building was in dev/test mode and for the first few days in live mode, then completely crapping the bed the first day I needed you to work with real tracking data with the live system. You were the ONE thing that was working consistently well, and you had to go and ruin it.4
-
Searched an error on Google
Only one result was relevant to my search.
It had the entire error line in it. Yay!
It was the GitHub source page of the compilation code that generates the actual error 💫
GitHub must disallow the programming extensions to web crawlers.1 -
Hey guys, just wondering what you guys feel are the best resources to fully learn JS (looking to get into Node.JS).
Also, first post here! Been reading up, and can't stop!1