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 - "+1d"
-
so um... several of my users access file explorer ONLY via Word.
How?
Well, open Word: File->Open->Computer->Browse (nb. thank you Word 2013 and onwards for making life miserable) and voila, access to documents, downloads, and server shares is gained.
...
Users... they will always find a way7 -
Whatever you do, don't do this.
- a sleep for 300s to avoid full 24 hour rollover (lol)
- sleep 1d instead of cron; so at random times emails will be sent out or they won't at all
- this is a laravel project, there's a thing called task scheduling: https://laravel.com/docs/5.8/...
Git blame: https://github.com/invoiceninja/...
The actual core project docs at least tell you to setup a cron, though not via * * * * * nor task scheduling, which isn't as much of an issue though as their dogshit docker compose: https://invoice-ninja.readthedocs.io/...6 -
Not sure if other programming languages class a Boolean as an integer value buuuuuuut...
The amount of times I've seen people do code such as...
if(value == true) {
variable = "blah blah";
} else if(value == false) {
variable = "blah";
}
Instead of doing a simple 1D array and going...
variable = strings[value];
It drives me crazy, such a small thing that has no real benefit but... Ugh... Whyyyyyyy3 -
!rant
C++ / OOP QUESTION
I have a uni assignment / project (Data Structures class), where I have to implement the ins-n-outs of 1D arrays, by creating a dynamically allocated array class, which can accept any type of data (using templates). But there's a problem.
I'd like to implement sorting the elements of the array. But given the fact, that I'm using templates, I cannot treat the elements as integers, nor as strings, or other types...
Also, let's say that the elements of the array are elements of class T, where T looks like this:
class T {
private:
double height;
int age;
string name;
public:
double getH() { return height; }
int getAge() { return age; }
string getName() { return name; }
};
(It's just a random example, pls don't judge for code quality...)
Let's say that I'd like to sort the T elements based on height, print out, sort by age, print out, then sort by name and print out. How can I do this? Is this possible?5 -
I came to the conclusion that 1D can (as in "It IS, but it being only the case when you apply the following") also be 4D, 3D, ..., nD, if you have e.g. a vector with only one element, which can be any number, inside and add more and more elements into this vector with a bunch of zeros.4
-
I know it's not really related to development, but I got in a discussion on twitter and one dude tweeted "in science, 1 isn't 1"
And so I was like "mate what? science is highly dependent on math and in math, 1 is kinda always worth math"
And this this girl comes in and just says:
"it's not true that 1 is always 1 because there's binary code as well"
And was was like totally astonished, like, have you even studied something? 1b = 1d = 1x and it's always 1 in whatever base!
(she even says she's some sort of engineer in her bio)8 -
Anyone have experience with technical analysis, algo trading?
Was reading an article about how markets are probably going to crash next year based on some technical indicators and it reminded me of the days back in uni when I tried to create (simple) trading algos using all sorts of technical indicators...
Never got anything better than random... And I recall was basically throw some indicators together and backtest using different parameters. I think it's called p-hacking.
But anyway just wondering how is it actually done such that it works... And well how can technical analysis ever work if it's completely subjective to the parameters u use? Like just take Moving Average. You can take a average over any range 1s, 1min, 1d, 1 month, etc.
So many combinations u could use, how can you make any rules that you are confident enough to put lots of money on...7