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 - "retrieve"
-
So I wrote a code in HTML and js that puts an alert on the screen that says "all of your info is mine now, goodbye" and then redirects you to the nyam cat site
I sent it to some of my friends to have a little laugh but they have sent it to other people and eventually the school principle called me and told me to go to her office and retrieve all the data I stole
I went there and explaind her the prank but she didn't believe me
So she called the programming teacher to check the file
She laughed as hard as I've ever seen anyone laughing and told me to go back to class
It was scary and funny but the thing I've learnt is that it's stupid to prank ignorant people.15 -
Meeting with asshole partner company CEO at restaurant.
Me: "I'm a bit worried about the bugs in your API. There are some ways to retrieve privacy sensitive info from public endpoints"
CEO: "Well, we're a rapidly growing startup!"
Me: "Uh... so?"
CEO: "So... Move Fast and Break Things! Priority is to improve our API further, and we'll fix bugs as they show up"
Me: "Maybe you should stop trying to emulate Zuckerberg in your management style. You know that even Facebook themselves admitted that their slogan was a retarded mistake"
Waiter shows up at table. CEO orders some overly expensive fish salad.
CEO: "Well, they have done something right... they're worth billions"
Waiter asks me: "And you sir, have you made your choice?"
Me: "Do you serve popcorn?"
CEO: "Popcorn for lunch?"
Me: "No, for your congressional hearing"16 -
*creates table in database*
*writes query to retrieve data*
*gets error and Google's problem for 2 hours but no luck*
*in frustration, takes a half hour break*
*checks database for set up issues*
*realizes that the database is the wrong fucking database*
*face palm & quits fucking life*
I make dumb fucking mistakes like this way too much5 -
Had a job interview recently that went well besides one little disagreement... and it has made me question my sanity. Tell me if I'm wrong.
They asked the difference between a GET and POST request.
Wow, that's an easy one, they're giving me a break, I thought to myself.
I said "GET is used to retrieve data from a server, whereas POST is used to add data to a server, via it's body, which a GET lacks" or something like that.
They were like "ya mostly, but GET can be used to enter data into the server too. We were just looking for the body thing."
And I'm like.... yeah, you could do that, but that's not what it's meant for.
They mention stuff about query parameters and I hold steady that GET and POST are different because GET has a specific purpose. Otherwise, we wouldn't need the "method" part of an HTTP request at all. We could just either include a body or not include a body.
I ended it with "Well, POST implies that you are adding data to a server, and GET implies you are querying data from the server. When I'm reading documentation, that's how I quickly determine what an endpoint does."
My confidence was a little shaken at this point. Crazy what two people with (I assume at least) 10+ years of experience telling you you're wrong will do to your confidence.21 -
I recalled a seemingly simple task I took on.
We were building a booking system, and I had to figure out how to retrieve bookings by a certain date range.
Upfront, the tasked seemed simple until I realised I had to both figure out the logic and the SQL statements needed to retrieve all bookings within a certain date range in one query.
I ended up drawing a model to help me visualise the various date-range criteria to be satisfied. And used unit tests to help me think through each date range criterion and make sure they were accurate. Some were obviously from paranoia, but better to be safe than sorry...
After that, I had wrote down raw SQL directly into Sequel Pro first to make sure my query logic was accurate too, before translating into something the ORM equivalent. This was when I learned how to define and use variables in SQL. The variables were throw-away code; I just didn't want to have to hard-code the test date-ranges over and over again; minimise chances of spelling errors.
Needless to say, felt my problem-solving skills went up one level after this task. Saw my coding style and unit tests improve. And also the thought processes that go into how to maintain code quality...4 -
I have been strongly considering writing a small fb app today named something along the lines of "Hack your fb friends - for realz". Then add basic oauth (You have to login to pick the friend to hack duh), retrieve their friends list and then publicly post to their own timeline and the friends they chose humorously stating they attempted to hack the persons account "for realz". You know just enough to alert people that the "hacker" is a idiot with bad intentions but with just humour enough to fall under "satire" so fb doesn't remove it.
If your bored please feel free steal and implement my idea, it's hereby open sourced and I will even fund this shit on kickstarter 😂6 -
One of our existing clients who used to pay for two of our products but now only pays for one just called us. The one he canceled is a loss prevention product that tracks internal theft in stores. He canceled it because he didn't feel it was worth it.
Now, he's calling us from a police station because he's trying to press charges against one of his managers because they were presumably stealing from him.
"Hey I need to know how many times this person stole from me over the last few months and I need to know it now because I'm at the police station."
With just a few clicks that would be an easy figure to retrieve for him had he not canceled our product.
My stance is he can get lost. I don't even think he sees the irony of canceling because "it isn't worth it" and then "asap" needing the data that the "worthless" product provides. Of course, he wants it without reactivating the subscription.
Unbelievable.5 -
We don't know what one-to-many is! Instead, we convert all associated IDs to a string and join the list into a string separated by commas! Only after this absolute clownery do we save this new nice clean string to the database column! Then, when we want all associated entities, we serialize this list back into an array of IDs and retrieve them! It's clown-genius!
🤡🤡🤡🤡🤡🤡🤡🤡🤡🤡🤡🤡🤡🤡🤡🤡🤡🤡🤡🤡🤡🤡🤡🤡🤡🤡🤡🤡🤡🤡🤡🤡🤡🤡🤡🤡🤡🤡🤡🤡🤡🤡🤡🤡16 -
Where I work, the password needed to retrieve your paycheck in the system is your birthday. (Like November 3rd = 0311).
Guess it's no secrete how much money everyone makes?!
Oh... it's the passcode on our keycards as well!
The company has 2000+ employees and and makes more than $35 mil a year6 -
The other day, I customer of ours asked me to try to improve the performance of an application of his in a particular method. The method in question taking more than 5 minutes.
I took a look at what it did in the profiler, and it shocked me. More than 100k selects to the database, to retrieve 116 records...
I took a look at the code... Scores of selects in nested loops inside other nested loops inside of... That seemed normal to them...
At the end after we improved it's performance it took 3 seconds...
What shocks me the most is that the customer is a developer himself, really knowledgeable and has an order of magnitude more experience than I do. Am I too anti "worthless database round-trips"? Is that normal? :S1 -
At work, an idiot who has never worked on machine learning before and understands nothing about it: "You know what, machine learning isn't actually hard. It is just basic statistics and then you download the model online and that's it! There's nothing else you are doing!"
STFU, you moron! Do you think just any model can work for your use case? Do you fucking think it is easy to come up with new architecture for a very specific use case and test it accurately? Do you think it's easy to effectively train a model and do hyper-parameter optimization?Do you fucking think it is easy to retrieve the right data for your use case? Do you think it's easy to keep up with research papers on arXiv being released daily? Do you think this is fucking javascript and there's a framework for everything? Stfu!
Honestly, i hate ignorant morons who generalize stuff they don't clearly understand.5 -
ABC 80.
It was a Swedish computer in the 80s.
Used basic as main shell like c64 but its editor was worse than edlin if any one remembers that.
You could not use arrow keys to go to a line to change it but had to type a command like edit 80 to retrieve the line in an editor prompt.
It also lacked a lot of common basic commands.6 -
Diary of an insane lead dev: day 447
pdf thumbnails that the app generates are now in S3 instead of saved on disk.
when they were on disk, we would read them from disk into a stream and then create a stream response to the client that would then render the stream in the UI (hey, I didn't write it, I just had to support it)
one of my lazy ass junior devs jumps on modifying it before I can; his solution is to retrieve the file from the cloud now, convert the stream into a base64 encoded string, and then shove that string into an already bloated viewmodel coming from the server to be rendered in the UI.
i'm like "why on earth are you doing that? did you even test the result of this and notice that rendering those thumbnails now takes 3 times as long???"
jr: "I mean, it works doesn't it?"
seriously, if the image file is already hosted on the cloud, and you can programmatically determine its URL, why wouldn't you just throw that in the src attribute in your html tag and call it a day? why would you possibly think that the extra overhead of retrieving and converting the file before passing it off to the UI in an even larger payload than before would result in a good user experience for the client???
it took me all of 30 seconds to google and find out that AWS SDK has a method to GetPreSignedURL on a private file uploaded to s3 and you can set when it expires, and the application is dead at the end of the year.
JFC. I hate trying to reason with these fuckheads by saying "you are paid for you brain, fucking USE IT" because, clearly these code monkeys do not have brains.3 -
Not a Story about an actual hack, but a story about people being dumb and using hacks as an excuse.
A few weeks ago my little cousin would reach out to me because "his Account was hacked...". Supposedly his League of Legends account was hacked by a guy of his own age (14) and this guy was boasting about it.
So i asked the usual things: "Has the email account been hijacked? Did anyone know about details to your acvount access? Etc..."
Turns out that one if his "friends" knew his password and username, but suppsedly erased these Informationen. And that was the part i didn't buy.
This was the point where he lost. Just because i am a programmer does not mean i can retrieve an account he lost because of a dumb mistake that could have easily been avoided. And that guy who was boasting about hacking LoL Account was coincidentally freinds with the friend who had the user credentials and password.
Moral of the Story? The biggest security weakness is almost always the user or a human in between... -
While I work on my devRant client, I always end up thinking, "how would dfox do it for the backend".
Some of the functions I have include:
-fetching new rants, 250 at a time
-remembering the ones I've read and filtering those out (kinda similar to Algo)
-checking for updates from followed users and new notifications
My implementions are kinda spammy though part of it is because I need to use the existing API.
But even so, how would/does he implement these so all the users' requests don't end up bringing down the server, and efficiently store and retrieve everyone's view history?
My problems are small compared to his... How do you think and deal with problems at that scale though? -
An undetectable ML-based aimbot that visually recognizes enemies and your crosshairs in images copied from the GPU head, and produces emulated mouse movements on the OS-level to aim for you.
Undetectable because it uses the same api to retrieve images as gameplay streaming software, whereas almost all existing aimbots must somehow directly access the memory of the running game.12 -
I JUST HAD ONE OF THOSE DAYS THAT MAKES ONE WANT TO BANG TWO BRICKS ON HEAD SND END THE PAIN THE STORY STARTS YESTETDAY WITH ISSUES AFTER A MIGRSTION AND THEY ASK ME TO HELP TROUBLESHOOT EVEN THOUGH I'M A DEV DBA AND THE ISSUE IS IN QA/SAT AND I HELP ANYWAY AND THEY CAN'T FIND A VIEW AND SO I LOOK EVERYWHERE AND CAN'T DOING IT EITHER AND IT DIDN'T EXIST IN PROD OR DEV SO I TELL THEM IT'S NOT THERE, AND THEY ARE LIKE, CAN YOU RETRIEVE IT FOR US AND I'M LIKE FROM WHERE? I DON'T KEEP VIEWS IN MY BUTT AND YOU GUYS ARE SMOKING CRACK AND THE GIVE ME THEIR QUERY WHICH CONTAIN THE VIEE ANYWAY AND THEY SAY CAN YOU RUN IT AND IT RUNS AND WORKS AND THEY CAN'T MAKE IT WORK AND IT WORKS BECAUSE IT DOESN'T CALL THE VIEW THEY HAVE ME SO NO PROBLEM THERE SO I FINALLY ASK THEM ARE YOU POINTING TO THE CORRECT DATABASE AND THEY'RE LIKE OH MAN WE TOLD YOU THE WRONG DATABASE AND SO I LOOK AT THE RIGHT DATABASE AND FIND THAT THE GRANTS ARE MISSING AND YEAH THANK YOU FOR TAKING EIGHT HOURS OF MY LIFE BECAUSE WE WERE IN THE WRONG DB YOU GAVE ME AND I HOPE THE FLAG OF A THOUSAND CAMELS INVEST YOUR ARMPITS AND THE CHIGGERS OF A THOUSAND SOUTHERN LAWNS INGEST YOUR SOCKS AND UNDERWEAR. YAAAAAA!!!!9
-
Today I spent 25 minutes explaining to this dev that there’s no way that a http request can access directly to an ftp server and retrieve a file.
A dev with 4 years of experience...17 -
My friend: I built a 3D printer and coded it to self calibrate at startup and connect to my encrypted remote server through VPN to securely retrieve Cad files I constructed and start itself printing when everything is ready or alert if theres an issue
Me: aren't you less than a year older than me?
This was when we were underclassmen in college a few years ago 😂 turns out the dudes just a savant5 -
We did retrieve the whole list 20 lines ago, didn't we?
Well, who cares... Let's retrieve it again IN A LOOP, im EACH ITERATION.
and then for good measure lets make another query for each item, each time we retrieve the list. Why not?
I have to make an effort not to swear right now. I have been asked to optimize a particular oiece of code...
Ffs3 -
-- This is my first rant so sorry if it's bad--
We have a nice project that I am working on that needs to store and interact with location data. It is a .NET Core API using Entity Framework Core to interact with the database. All good and well. Until today when I started working on the implementation of storing location data we retrieve from mobile devices.
SQL has a nice data type named: "Geography" which can store a location and do calculations on it with queries. Such as proximity and distance which is what we need.
But then it turns out that EntityFramework Core does not have support for the Spatial data types. even though version 6 did have Spatial support.
Then i found the following issue on GitHub: https://github.com/aspnet/...
Turns out this feature has been requested since 2014 and is even on the "High-priority" list and is still not implemented to this day. Even though in the issue many people are asking to have this implemented.
WHY IS THIS TAKING SO LONG MICROSOFT!!
So now i have to figure out how to work around this. But that is an issue for tomorrow.1 -
Ranting to the wife about 3rd party API authors and how they have broken them from time to time.
On any given URI, it should give me a certain image, some give me a simple error string "Error downloading file" - nothing I can do to fix on my side, the error indicates they were not able to retrieve from their sources.
W: you should check the settings! *... series of unusual suggestions follow*.
Me: Yes, dear. Good ideas. -
I would like to know if anyone has created a CSV file which has 10,000,000 objects ?
1) The data is received via an API call.
2) The maximum data received is 1000 objects at once. So it needs to be in some loop to retrieve and insert the data.11 -
At the age of 50 I have learned what FICA is.
FInancial Customer Account
It'a a SAP module but I suppose It was the name of a Penthouse department.
P.S.
FICA in Italian are female genitals, "recupero" is retrieve.
It sounds like "pussy retrieve".
This document was made by a staff of 4 men and 4 women.1 -
We need an open-source alternative to stack overflow. They have fucking monopolizing pieces of ratshit admins there and lame ass bots.
I HAD A FUCKING 450 REP :/ and now i have "reached my question limit"
I mean its okay of you want to keep stackoverflow clean , but straight out rejecting the new queries should be against your god damn principles, if those mofos have any!
If it is so easy to downvote and delete a question for the mods, why can't they create a trash site called dump.stackoverflow.com ? whenever a question is not following their stupid guidelines , downvote it to oblivion. After a certain limit, that question goes to dump space where it will be automatically removed after 30 days. Atleast give us 30 fucking days to gather attention of audience !
And how does a question defines someone's character that you downright ban the person from asking new questions? Is there a phd that we should be doing in our mother's womb to get qualified as legitimate question author?
"No questions are stupid" is what we usually hear in our school/college life. And that's a stretch, i agree. Some questions are definitely stupid. But "Your questions are so stupid we are removing you from the site" is the worst possible way to deal with a question asker.
Bloody assholes.
Now, can anyone tell me that if am passing a parcelable list of objects in an intent before starting a new activity, how can i retrieve it in the new activity without getting any kotlin warnings?
The compiler is saying that the data coming via intent is that of list<Type!> aka list of platform type, so how to deal with this warning?15 -
It was more of "Hate story" with a guy whose mere presence would irritate me very much. He was also close to the girl I liked a bit (not very huge crush or something).
So he was very active on two of his social networks one being fb and second directly connected to fb so basically getting hold of fb would mean that I could control his other one too.
It was Oct 2016 and that time you could easily hack an account using social hacking (not asking OTP out something mere details did it for few accounts).
I hacked his account and wrote curse words and all. As I had already changed the email and password, he couldn't till date retrieve it.
However as he reported to fb, his account was held and I could no longer access it but till then everything was over.
I couldn't still spot him on FB or the other social network.
And this was one of the most evil act I have performed in my life.1 -
Fuck the feelings of powerlessness and helplessness. when a friend comes crying for you for help with their hacked account and you keep asking them about what they did to protect it in the first place and they reply with nothing, no recovery email, no recover phone, no secondary verification, NOTHING. and you can do nothing but stand there and watch them cry while you can literally do nothing because there literally nothing you can do to retrieve their stolen accounts. FUCK BLACK HAT HACKERS.3
-
I have a few questions for the people having a 3D printer and/or are interested in 3D printing.
1. Where do you retrieve your models from? Or do you make them yourself?
2. What is your thingiverse name (if you have it)
3. Personally I'm missing a single good information source where questions can be asked, models can be shared etc. Thingiverse doesn't have a mobile UI and is pretty limited in my opinion. I'm thinking of creating a "social media" platform where people can share their creations, collection of information sources about 3D printing. Would you like to help or is there a good alternative for Thingiverse that I have not found yet?21 -
One fucking week I was trying to solve a bug where I could save data to neo4j but not retrieve it.
I thought there has to be a bug within the library. But it turns out, I referenced the wrong class.
I need ducks...2 -
Last year in my job, I was temporarily assigned to another team to help out in their project as they were short-staffed. It was a massive project and of course there was a lot of code review to be done. But since I was only temporarily assigned, I still have to do code reviews for my base team, this other team I was assigned to, and for some reason, code review for another team that I barely know what their project is about.
There were times where all I was doing was code reviews that took anywhere between a few minutes to upto 3 days. The amount of mistakes and bugs I kept finding was phenomenal. But I think the one thing that got to me was finding the same bugs/mistakes that I kept pointing out to people to stop doing or to fix e.g DB queries inside a loop just to retrieve data.
To this end I still have to deal with the same issue, but thankfully now it's only to one team.1 -
Let's say you're working on a web application, and you notice that one of the pages is not displaying the correct data. You investigate further and realize that the data is being retrieved from an API endpoint, but for some reason, the API is returning the wrong data.
You start looking into the code that calls the API and notice that it's passing in the correct parameters, so you dig deeper into the API code itself. After hours of poring over the code, you finally discover that the bug is caused by a typo in the database query that the API is using to retrieve the data.
You fix the typo and think the problem is solved, but then you realize that the data is still not displaying correctly on the page. After even more investigation, you discover that the bug is actually being caused by a caching issue on the client side.
At this point, you're feeling incredibly frustrated and overwhelmed. You've spent hours trying to track down this bug, and it feels like every time you think you've found the root cause, another issue pops up. This is just one example of the many challenges that developers face on a daily basis.6 -
Using a brute force dictionary algorithm to retrieve every employees password. Access got blocked for a day because they didn't know what my algorithm did, I deleted the main file moments ago. They only saw the curl scripts.3
-
Sometimes lack of confidence in one area reveals oversight cockyness in stronger areas:
Set up a simple login system from Unity engine to php to mysql db, using android device ID as the login id. Set up database column to accept 32 length varchar for MD5 hashed strings, as I knew the method I was getting the android device ID was automatically being hashed that way and more or less was what I wanted anyway.
Spend 2 days wondering why it would insert the logins with 0 issue, but could never retrieve them. Due to lack of web development and PHP skills, I assumed I was screwing up the handling of mysqli_num_rows() (to check whether I was inserting or selecting in the query) or simply screwing up my SQL queries.
Rewrite the code a few times, even went back to a method I had used in the past.
Today it dawned on me that my testing machines deviceID had been getting trimmed to the 32 character limit. Turns out I didn't account for my workstations device ID to be automatically hashed like the android device id is.
For 2 days I was obtaining and sending a 40 character string to a 32 character limit varchar and blaming my lack of PHP skills........
Back to my niche I go!1 -
So, I move house with my amazing, already configured and stable router with built in VPN, DDNS, Port forwarding and DHCP addresses.
Received ISP shitty router at new address and want to use as modem only, so I go read the manual.
"Bridge mode requires you to configure your other router with PPPoE and the ISP's credentials"
Landline is not working, so I cannot call the number to retrieve my password. After 2 days of waiting, engineer visits, installs master socket, dial tone yaaay.
Call number to get password, automated voice message has such a bad sound quality that I cannot figure out if it's saying F or S, and there are two of those letters.
Put ISP router in bridge mode, set other router to PPPoE and put credentials, nothing. Try with F and F, S and F, F and S, S and S... Nothing. Put it back to dynamic IP address, it works.
I resign myself and manually configure everything I had on the good router to the ISP one. A few issues with my server and DDNS, but hey, internet works.
Start missing the other functionality, try the password idiocy again. Nothing.
Next day, go to work, talk to a colleague that lives close and has the same provider: "I just put it into bridge mode and it worked".
Go back home, bridge mode on ISP router, Dynamic IP on good router, no credentials. It works.
Why do I always overcomplicate stuff?4 -
About 2/3 weeks ago had to deliver a college project where we were supposed to create a snake multilayer game on win32 API.
Just to discover how to create a simple dialogue box with sliders and retrieve the values it took 1 entire day. Just handle a simple dialogue box!
And I found the solution on a forum post from the last millennium. Literally!
That's the kind of job you don't wish even to your worst enemies. -
Coolest bug is less of a bug and more of a feature. I've been working on a medical app and I used an open source backend which had almost everything I needed. To be hipaa compliant you have to encrypt all sensitive data - full db encryption was not something this backend was capable of.
So my solution was to encrypt the data on the client side and create a secondary server - that can only be accessed on my app server - to store and retrieve the keys.
If anyone's thinking of working on a HIPAA project - you're welcome -
Looked up at the clock... 2 AM... Thought about giving up and going to sleep, but something kept me there...
Rewrote my encoder and decoder for my steganography program, which are used to insert and retrieve data respectively from images. Compiled, ran, and output was as expected!
Tried to write actual data, instead of just headers, to the image, and it broke... Of course it wouldn't work first try, it's me writing the code after all.
But then, after debugging for a while and changing a couple lines, the encoder looked like it had done its work properly. Then I decoded it, and voila, data completely recovered! It almost felt too magical to be true, usually I have to modify a lot more to get it working.
So now I'm in bed, after literally decimating the memory usage of the program, amongst other optimizations, and I know that the code works perfectly 😎 best part is I refactored each class down to 100 lines each, so now it's clean and dense 😇
Just had to share, feeling so good right now 😄2 -
I'm such a fucking idiot
I'm setting up an api and to prevent unwanted fields or circular dependencies from showing up I define what fields should appear in a few serialization yaml files.
These files define what fields should appear in a given context. The default context for every field is to always show the id, and only a call to /posts will give you all the fields of the posts for example. This means that if you retrieve a comment with a linked post, the post will only show up as an id, but the comment will have all its fields.
I've been struggling with a stupid problem for 2 hours, I could verify that the yaml files were loaded in, all entities had such a file and the configuration was exactly according to the docs.
Guess why my api calls still caused circular errors?
Because I forgot to do the $view->setContext$this->defaultContext); call that determines what context should be used for the response.
FUCK ME WHY DID IT TAKE SO FUCKING LONG TO FIGURE THAT OUT OMG
Google you say? Ofcourse I hunted google results! But I was unknowingly part of an XY problem and was looking for what the problem wasn't >:(
At least it works now, ugh1 -
I've just spent the last hour or so banging my head against a brick wall trying to figure out why I'm unable to retrieve some data via AJAX even though I know data is being returned as I can see it in my error log.
Turns out the permission system I wrote a few days ago actually works and because I didn't specify a permission it automatically denied my user from retrieving the data. One thing I forgot to add was an error message to tell me when I don't have sufficient permission to do something. Adding a message could have just saved me a lot of time :/1 -
I'm doing work during the weekend. Just to parse this line of json.
Argh, what drive me nuts is after discovering that json response wasn't proper.
*sample - from what i seen*
{
head= {
data=value,
data=value,
}
}
This is my first time seeing json response with =. Since my assignment is to retrieve the response.
I cheated by calling replace over and over to correct the string of response to correct json format.
That is actually production stuff. Knowing that makes me sick to the stomach.7 -
DO NOT EXPORT GPG KEYS _TEMPORARILY_ AND ASSUME THAT THEY'LL BE IN THE ORIGINAL LOCATION AFTER EXPORT!
I learnt this lesson the hard way.
I had to use a GPG key from my personal keyring on a different machine ( that I control ). This was a temporary one-time operation so I thought I might be a smart-ass and do the decryption on the fly.
So, the idiotic me directly piped the output : `gpg --export-secret-key | scp ...`. Very cool ( at the time ). Everything worked as expected. I was happy. I went to bed.
In the morning, I had to use the same key on the original machine for the normal purpose I'd use it for and guess what greeted me? - *No secret key*
*me exclaims* : What the actual f**k?!
More than half a day of researching on the internet and various trials-and-errors ( I didn't even do any work for my employer ), I finally gave up trying to retrieve / recover the lost secret key that was never written to a file.
Well, to be fair, it was imported into a temporary keyring on the second machine, but that was deleted immediately after use. Because I *thought* that the original secret key was still in my original keyring.
More idiotic was the fact that I'd been completely ignorant of the option called `--list-secret-keys` even after using GPG for many years now. My test to confirm whether the key was still in place was `--list-keys` which even now lists the user ID. Alas, now without a secret key to do anything meaningful really.
Here I am, with my face in my hands, shaking my head and almost crying.5 -
Freenas update from 11.1 to 11.2 beta 2
They added experimental smb direct / multichannel support, yay.
Me tries to connect to the smb share:
->Connection timed out 🤔
Tries something.
->Connection refused 😐
Google foo ....
->Nope, no connection 😔
"Failed to retrieve list of shares from server"
Reinstalls freenas to be sure it's not some janky install.
->Nope.
Google some more
->Nope 😭
*Like a year later*
Look into /etc/samba/smb.conf
Client max protocol = NTLM1
Motherfucker! 😬
Who thought that to be a good Idea!?
😠
It's the default Manjaro smb conf from the official repository by the way.
Seriously.
Didn't even know there was a setting for max client protocol.
Thought it was a server only config.
😵
Nope, some motherfucker trolled me long and hard this time. 😩
But back to getting smb direct working on my setup.
Thunar gvfs is like it's own completely separate thing.
Smb status, and all the other commands don't see any open connections anywhere.
Gvfs still connects fine to the share even though the smb.conf is deleted and everything else is complaining that there is no config.
On the one hand, it uses samba, on the other it's not actually.
Where the heck can I see the connection properties and wether rdma works or not?
Mother trucking, fracking, leg breaking piece of a dance type.1 -
Absolute best way to get a object of the current User in Symfony?
Yeah, just retrieve the current user.
Oh, we are not yet done, get the username and perform a DB query to get a user object.
Glad this answer has -34 on stack overflow...2 -
In my country there is a huge economy deflation.
Like 1 year ago 1USD used to be 1500 pounds.
Nowadays 1USD is more like 7800 pounds.
Wait a second let me explain more into details the whole flow.
There are 3 to 4 prices we are being dealing with:
* Official Bank price that refuse to change the base price: 1500 pounds
* Bank ATM machines that exchange your dollars on a 3900 pounds per usd
* Black market: 7800 pounds managed by random mobile apps that spread rumors
* Foreigners currency: the only way to grab your reach dollars.
Long story short:
Whenever you want to win extra cash, you ask any of your relatives to lend you money from any bank in the world ( foreigners currency), try to ask in black market who is willing to exchange, you meet, you check on any mobile app what's the current price and you do the exchange.
So in order buy USD dollars on a low price, devs build 2 mobile apps one that send a POST request to change the amount in DB and a second one fo retrieve this value.
So whenever he want to buy dollars he change the value to the lowest. And whenever you want to sell the dev raise the amount slowly. So far the government has no regulations over developers why? Because the one behind the forensic are at least 60 to 70 years old more like their informations are dead.
So we struggle.11 -
Some of our applications use a Java keystore that requires a password. The password is encrypted and stored in a database. The applications retrieve it when needed, decrypts it and uses it. The password is..... password
-
upside I guess, if your website's content is generated by JavaScript I'm too lazy to find an emulator to scrape it off you
granted I'm sure this website's business would've been much better had they made it scrapable since I'm quite literally trying to retrieve their capabilities listed in one of their help pages and give myself alerts when they gain new features
but no, I guess3 -
I've always wanted to do something in IT Support, but I didn't know where to start. I've been helping my co-workers optimize their system and even helped retrieve photos from a tablet that had a broken screen; her service plan said along the lines of "if they weren't there they were lost," I was able to retrieve them in a matter of hours (Really guys! I'm shocked! It was just a broken touchscreen, the storage was just fine. I think I'll remember this moment).
And because my growing impopularity, I started a new business called The Webnician. The company is split into two sections, the Technician, and the Web Developer. Hence, The Web(Tech)nician. I am proud of my name choice.
Then I wanted to become a certified technician, so I did some research on how to become one and found out I need to take the CompTIA A+ 220-901 and 220-902 exam and... I couldn't be more excited!
I've always loved computers, and maybe my late father had some say into it. Nevertheless, I am excited to begin my journey, even though it took awhile to find where I needed to go. I hope you all can follow me on my journey and support my new business.
I don't have anything else to say, so I'll just leave here.1 -
Some interesting keyboard shortcuts that are lesser-known but can be quite useful:
1.Windows Key + . (Period): In Windows 10 and later versions, this shortcut opens the emoji panel, allowing you to quickly insert emojis into your text.
2.Ctrl + Shift + T: This shortcut reopens the last closed tab in most web browsers (Chrome, Firefox, Edge). It's handy if you accidentally close a tab and want to retrieve it quickly.
3.Ctrl + Backtick (`): In some text editors and IDEs (like Visual Studio Code), this shortcut toggles the integrated terminal window, allowing you to quickly switch between editing and running commands.
4.Ctrl + Shift + Esc: This directly opens the Task Manager in Windows, skipping the intermediary step of opening Ctrl + Alt + Delete and selecting Task Manager.
5.Alt + Drag: In many graphics and design applications (like Photoshop), holding down the Alt key while dragging an object duplicates it. This can save time compared to copying and pasting.
6.Ctrl + Alt + D: This shortcut shows the desktop on Windows, minimizing all open windows to quickly access icons and shortcuts on your desktop.
7.Ctrl + Shift + N: In most web browsers, this shortcut opens a new incognito or private browsing window, useful for browsing without saving history or cookies.
8.Alt + Enter: In Excel, this shortcut opens the Format Cells dialog box for the selected cell or range, allowing quick formatting changes without navigating through menus.
9.Shift + F10: This shortcut performs a right-click action on the selected item or text, useful when you can't or don't want to use the mouse.
10.Ctrl + Shift + V: In many applications, including Google Chrome and Microsoft Word, this shortcut pastes text without formatting (paste as plain text). It's useful when copying text from websites or other documents.
++ if you like this6 -
This is my frontend tip of the day.
If you have a frontend that consumes an external API:
1) Retrieve the json responses from devtools
2) Save them in your project as json files (trim the data a bit if it's too long)
3) When starting your app with a special env var like MOCK_DATA, make your app mock the data and use your saved json data instead.
You can associate each response with an url regex.
The package fetch-mock mocks fetch really well, it lets through the urls that don't match anything.
This way you can incrementally add responses.
And voila, you have a mode where you have near instant page loads to test things manually, and you also have mocked data ready for testing eg, cypress. -
Wonderful experience today
I'm scraping data from an old system, saving that data as json and my next step is transforming the data and pushing it to an api (thank god the new system has an api)
Now I stumbled upon an issue, I found it a bit hard to retrieve a file with the scraper library I'm using, it was also quite difficult to set specific headers to download the file I was looking for instead of navigating to the index of the website. Then I tried a built-in language function to retrieve the files that I needed during the scrape, no luck 'cause I had to login to the website first.
I didn't want to use a different library since I worked so hard and got so far.
My quick solution: Perform a get request to the website, borrow the session ID cookie and then use the built-in function's http headers functionality to retrieve the file.
Luckily this is a throwaway script so being dirty for this once is OK, it works now :) -
There were many issues that came about during my entire employment, but I woke up today with some, honestly, quite bizarre questions from my manager that made me open an account here. This is just the latest in many frustrations I have had.
For context, my manager is more of a "tech lead" who maintains a few projects, the number can probably be counted in one hand. So he does have the knowledge to make changes when needed.
A few weeks ago, I was asked to develop a utility tool to retrieve users from Active Directory and insert them into a MSSQL Database, pretty straight forward and there were no other requirements.
I developed it, tested it, pushed it to our repository, then deployed the latest build to the server that had Active Directory, told my manager that I had done so and left it at that.
A few weeks later,
Manager: "Can you update the tool to now support inserting to both MSSQL and MySQL?"
Me: "Sure." (Would've been nice to know that beforehand since I'm already working on something else but I understand that maybe it wasn't in the original scope)
I do that and redeploy it, even wrote documentation explaining what it did and how it worked. And as per his request, a technical documentation as well that explains more in depth how it works. The documents were uploaded as well.
A few days after I have done so,
Manager: "Can you send me the built program with the documentation directly?"
I said nothing and just did as he asked even though I know he could've just retrieved it himself considering I've uploaded and deployed them all.
This morning,
Manager: "When I click on this thing, I receive this error."
Me: "Where are you running the tool?"
Manager: "My own laptop."
Me: "Does your laptop have Active Directory?"
Manager: "Nope, but I am connected to the server with Active Directory."
Me: "Well the tool can only retrieve Active Directory information on a PC with it."
Manager: "Oh you mean it has to run on the PC with Active Directory?"
Me: "Yeah?"
Manager: "Alright. Also, what is the valid value for this configuration? You mentioned it is the Database connection string."
After that I just gave up and stopped responding. Not long after, he sent me a screenshot of the configuration file where he finally figured out what to put in.
A few minutes later,
Manager: "Got this error." And sends a screenshot that tells you what the error is.
Me: "The connection string you set is pointing to the wrong database schema."
Manager: "Oh whoops. Now it works. Anyway, what are these attribute values you retrieve from Active Directory? Also, what is the method you used to connect/query/retrieve the users? I need to document it down for the higher ups."
Me: "The values are the username, name and email? And as mentioned in the technical documentation, it's retrieving using this method."
The 2+ years I have been working with this company has been some of the most frustrating in my entire life. But thankfully, this is the final month I will be working with them.21 -
Hey guys (and girls (and people who dont identify as either of them)),
As some people here might know I am currently in the planning phase of an open source alternative for Thingiverse. After gathering information on multiple platforms Ive heard people really wanting it to be decentralized (a bit like Mastodon).
I really like that idea and thus want to implement it, does any of you have experience or knowledge of decentralized systems programming? I have trouble getting information on how this works. If someone is willing to help me explain a few things like "How does one instance retrieve data from other instances? How does it know a new instance is running somewhere?"
So if anyone knows a great source for information or can and wants to help me via a chat session please respond below6 -
TLDR: I wanted to change email to new one, but I could not remember which one I have
currently. I found out an API in DevRant JS files for email verification and used
it to find it out.
So, I am moving from Gmail to Protonmail Pro, absolutely love their service.
I wanted to do same on Devrant but I could not figure out my current mail for
"I lost my password" form. My Password Manager have only login saved, and profile does
not show email address.
I thought that this user information is stored on server so it have to be some way to retrieve it. I dug
in source code and I've found:
`<div class="signup-title">Verify Your Email</div>`
Which has event assigned to function which uses jQuery.ajax (love it btw :D) to call:
`url: "/api/users/me/resend-confirm",`
This seems like worth a shot. Few copy-pastes and one ajax call later:
*Ding*
From: support@devrant.io
To: dawid@dawidgoslawski.pl
"Welcome to Devrant"
Got it :) So I have already changed in march when DevRant on previous layout.
This is what I love in this profession - problem solving. AI will not replace human
in any way, we will just stop coding array iterations and data manipulation - we will focus
on real problem solving and human touch (like design, convincing management for changes).1 -
Once I found out an unprotected folder in my school which is used to store sensitive data.
It was open to any administrator there.
We copied the Question Papers, Edited the attendance, and Even changed the Marks.
We were able to extract photos of students from the database and retrieve stored passwords -
The last Windows 10 update (10 days ago) has fucked up my dual boot with Elementary OS (Linux distro). I tried many things to retrieve it but with no success !
So I reinstalled it ! So now I would like to know how to prevent this shit happened again. Is there a way to do that ? Maybe a /boot partition or it's unnecessary ?7 -
I want to do some kind of simple note-taking web-app, with a Golang-Backend.
I need to choose a database, but don't have any clue about DBs.
Every note will consist of 3 strings, let's call them content, pubkey and privkey and I want to retrieve a saved note by searching for pubkey.
Can you recommend me any particular DB or at least an all-round solution ?3 -
Hello, Hi! Friendly neighbourhood noob here!
What’s he stuck on today you ask? React and Firebase!
Did he try? Yes he did! Only a little hitch this time.
Really? Little?
...It’s all relative... like the truth!
Anyway PLEASE someone look at my StackOverflow question!!
https://stackoverflow.com/questions...
Firebase and react are awesome tbh. But I cant figure this out!
Thank you!! -
one of the most annoying things about our system at work is that we're constantly updating broken links because we're in the process of updating a lot of legacy code. there's this one service to retrieve links for a module, but half the links in the legacy code are hard-coded strings anyway, so the whole thing is just a huge maintainability disaster. anyone ever come up with any interesting solutions for managing links between modules?1
-
eBay's APIs make me want to cry.
Take the sandbox for example:
- Every time you log into a session, it logs you out.
- When you create an order (eventually!) and want to retrieve it, tough shit it doesn't feel like doing that today.
- Functionality both exists and doesn't exist at the same time on both the LIVE and Sandbox APIs. I don't know how they've managed to get quantum computers in their server room, but their GOD DAMN API LIBRARIES ARE NOT THE BEST USE CASE FOR QUANTUM COMPUTING!!
I don't know if I despise eBay or Magento more...undefined shit apis quantum computing i would like to poke my eyes out with a spoon wtf am i doing with my life ebay -
I'm doing a project for uni in Omnet (C++ framework that should facilitate working with networks of queues, simulating and displaying statistics).
I needed to retrieve a random value from an exponential distribution, and the function to do so requires a random number generator as input. The framework has 2 implementations of the RNG and I picked the first one.
I spent 3 hours trying every possible thing, using both the exponential() function and its class wrapper (both provided by the framework), it was always returning 0 or NaN.
The RNG was spitting out values correctly, so I thought it was okay.
When I was almost ready to give up, I figured I could try and change to the second implementation of RNG, expecting nothing to change. And it fucking worked.
Zero reports on this behavior on Google, no apparent reason why it would work with one and not with the other when the two RNGs literally implement the same abstract class and spit out the same exact numbers... Just black magic...
Oh and cherry on top, it works with the raw function but not with the class wrapper on that same function... IF YOU GOTTA IMPLEMENT SOMETHING IN YOUR DAMN FRAMEWORK THAT DOESN'T WORK, FUCKING DON'T! 1 combination working out of 4 is not good! Or at least document it!
Sorry just had to share my pain -
Getting Back Lost, Hacked or Stolen Crypto - Go to OMEGA CRYPTO RECOVERY SPECIALIST / HACKER
I lost my crypto to an online investment scam, After a successful recovery procedure, OMEGA CRYPTO RECOVERY SPECIALIST was able to retrieve my $125,000 worth of lost cryptocurrency. After my recuperation, I experienced an amazing sense of relief and appreciation. OMEGA CRYPTO RECOVERY SPECIALIST's professionalism and knowledge really impressed me, and I would heartily suggest them to anyone who has been duped by cryptocurrency frauds. But I also want to caution others about investing in cryptocurrencies and advise them to conduct due diligence before making any decisions. Because the cryptocurrency market is still mostly uncontrolled.
Visit; (omegarecoveryspecialist. co m
(Mail; omegaCryptos @ consultant. co m
WhatsAp; +1 (701, 660 (04 759 -
Literally facepalm when seeing my company coding used Email as an identity to retrieve profile data etc. Yet the profile is allow user to interchange their email.
What is this kind sorcery is this? Why don't just plainly use the UID to retrieve profile instead, as simple as that. Is UNIQUE!!!
😒😒😒 F5 -
// new Rant("help")
I am currently writing my first 'real' Ruby project. I want people to be able to contribute through a module class by extending it and implementing the needed methods. This can (if done correctly) provide new commands for the terminal and new features.
But is this a good idea? I would download the code then by using git and keep it that way updated (similar brew does). At the start of the terminal app I would add all files recursively from the folder where I clone the modules into and lookup each class that extends module and then load the new content.
Is there another way of creating such a 'modular' application in Ruby?
They way I load the modules is through the inherited method, I just add the classes (not a concrete object created with new) to a list and retrieve it at runtime.
Would be nice to get some feedback going on here, not sure if my idea is good/bad. -
Check this out: the company that times its Web searches in milliseconds can't retrieve a bunch of rows from their internal database... GTFO.
"Accused of underpaying women, Google says it's too expensive to get wage data."
https://theguardian.com/technology/...1 -
I'm trying to improve my email setup once again and need your advice. My idea is as follows:
- 2-5 users
- 1 (sub)domain per user with a catchall
- users need to be able to also send from <any>@<subdomain>.<domain>
- costs up to 1€ per user (without domain)
- provider & server not hosted in five eyes and reasonably privacy friendly
- supports standard protocols (IMAP, SMTP)
- reliable
- does not depend on me to manage it daily/weekly
- Billing/Payment for all accounts/domains at once would be nice-to-have, but not necessary
I registered a domain with wint.global the other day and I actually managed to get this to work, but unfortunately their hosting has been very underwhelming.. the server was unreachable for a few minutes yesterday not only once, but roughly once an hour, and I'd really rather be able to actually receive (and retrieve) my mail. Also their Plesk is quite slow. To be fair for their price it's more like I pay for the domain and get the hosting for free, but I digress..
I am also considering self hosting, but realistically that means running it on a VPS and keeping at secure and patched, which I'd rather outsource to a company who can afford someone to regularly read CVEs and keep things running. I don't really want to worry about maintaining servers when I'm on holiday for example and while an unpatched game server is an acceptable risk, I'd rather keep my email server on good shape.
So in the end the question is: Which provider can fulfill my email dreams?
My research so far:
1. Tutanota doesn't offer standard protocols. I get their reasons but that also makes me depended on their service/software, which I wouldn't like. Multiple domains only on the business plans.
2.With Migadu I could easily hit their limits of incoming mails if someone signs up for too many newsletters and I can't (and don't want to) micromanage that.
3. Strato: Unclear whether I can create mails for subdomains. Also I don't like the company for multiple reasons. However I can access a domains hosted there and could try...
4. united-domains: Unclear whether I can create mails for subdomains.
5. posteo: No custom domains allowed.
I'm getting tired.. *sigh*21 -
This is not a rant. Rather just a question or an ask for advice, as I have seen a lot of people talk about web development around here. I am planning to create a website for my search engine. I created a Rest API for my VPS so I can do http requests and retrieve some links for certain key words. But I need some good ideas to do this from a website. As I am not sure what would be the best way to do http requests. As far as I know it's possible with Js and PHP, but I am not sure what's better, more secure or convenient? So here I am to ask you guys, especially those who have experience with this, what I should consider to do.
Oh and please forgive me my limited knowledge about Js and PHP 😅😊3 -
Very early on I was putting together my first database-driven web app and decided to use record IDs with leading zeroes - you know, because that would look neater. It was a long, long time before I came to know that a number with a leading zero would be evaluated as octal, which in turn meant that any number with an 8 or a 9 in it was invalid, which then meant it would be a match for any other invalid number and retrieve a seemingly random record.4
-
Logic of my company:
Why have an auto incremental ID for the table when you can have another table where you have to retrieve the last registered id, add 1 to it, then update the register of the last ID, then retrieve the id and finally create the register you intended.
Justification: “It’s a good practice”
FML1 -
Hey all,
I have a soap service delivering products from an ERP. I'm retrieving these products in a loop getting 20/req. The ERP has 5k+ products. Any advice regarding the best way to retrieve them all and quick would be most appreciated. -
I hate when clients think they're always right.
Yesterday this client showed up saying that he had an emergency on computer, because after an update all icons turned white. When we told he the situation and that all data was lost, he begged to retrieve all the info because he needs it to work.
He was affected by ransomware, something like Fantom, and not only all the files are encrypted but also the backups.9 -
Genuine question
You're given a server with the latest Ubuntu. You can't install any deps, and you can't use docker. Your goal is to write a REST API backend that can store/retrieve data persistently, ideally with a SQL-like language. Bonus points if you can figure out a reverse-proxy.
What would you do?
I'm obsessed with an idea of having some kind of codebase that doesn't include binary files and that I can just ssh over to a fresh server, and it would work instantly18 -
I've just learned that our front-end application throws a simple 404 error when trying to retrieve an avatar that does not exists.
But our technicians/support use this error in the console to show the customers that there is indeed a problem with the application functionality but have unsufficient logging from the back-end to troubleshoot with their internal tools.
What a bunch of liars trying to keep the customer satisfied and it works relatively well :D2 -
After not using Intel XDK for a year. I just noticed that they dropped support for this tool in early 2018 and removed all the keystores stored in their system.
Now I'm unable to update my android app because I don't have the key anymore.
And now soon google play will remove my app due to security issue on certain module.
I should've kept the keystore myself...
Oh well mistakes were made and lessons are learned the hard way.
Does anyone have any suggestion to retrieve a keystore file? -
Somewhere in out application backend we generate a simple bullet chart. But in the most complicated way possible.
We call a web service to retrieve it(yes, a simple bullet chart). The service requires some parameters, and the code that generates them is hidden behind a wall of interfaces and abstract methods (the best and apparently only way to get to the actual code is to debug it).
However, one of these parameters is very well visible and it is a string with (uncommented)javascript function that manipulates the resulting chart, adding some final touches. With hardcoded values etc..
Dear programmers, I know we should avoid reinventing the wheel, but sometimes we should stop and consider the possibility, that we are using the wrong wheel and in completely wrong/obscure way. Thank you.
Yours WhoeverWillMaintainTheCode3 -
You Can't Withdraw Your Cryptocurrency Fund? Contact iBolt Cyber Hacker
Be careful of platforms that promise enormous rewards in order to entice individuals into fraudulent programs. There is no shame in speaking up, I was victim of crypto scam 4 weeks ago, While researching how to recover my assets, I came across multiple suggestions of iBolt Cyber Hacker and how they had restored so much joy to scammed victims. With their assistance i was able to retrieve all of my frozen crypto. I'm writing to convey my heartfelt gratitude to iBolt Cyber Hacker. Please contact them if you require their services or want to learn more about them.
More Info:
Email: Support @ iboltcyberhack . com
Contact/Whatsapp: +39 350 929 0318
Website: https : // iboltcyberhack . com /6 -
Lost all of my progress because i checkout to other branch without push it before. Is there anything that i can do to retrieve it back ?
#NoobQuestion2 -
Ugh, retrieving specific data fields nested within several arrays and objects in Javascript/Json jacks me up every fucking time!!!
Anyone ever fuck with the MapQuest geolocation/geoqueries api??
I'm trying to retrieve the lat/lng values out of responses generated from submitted address strings, and it's nested about 8 json layers deep.
I feel like I'm overthinking this?
I can access the values in my web console, and can reach them after using the console to assign them to a temp var, but can't get to the values from my actual js code. Only when I run some business logic from the console.
Here's a shitty example of me explaining the tree:
[{...}]
0:
locations: Array(3)
0:
latLng:
lat: <data here>
lng: <data here)1 -
Trying to find a function I swear I had created to retrieve a set of counts from a database. Couldn’t find it. What I could find is the comment I had written with the function being completely overwritten with something entirely different.
I’m a complete fucking idiot and thank fuck for version control. -
Work email conversation with a COTS app support tech:
Tech: Could you provide me the following from Sql Server? (instructions followed)
Me: I am not the DBA, but I've sent them the request.
Tech: Could you send me the following from Sql Server while we wait? (Instructions followed)
Me: As I said, I don't have permissions to access what you want.
Tech: Oh, I see now, you most likely don't have proper access to be able to retrieve the information.
Me: ..yeah. Thanks. -
Twitter disclosed a bug on its platform that impacted users who accessed their platform using Firefox browsers.
According to the report of ZDNet: Twitter stored private files inside the Firefox browser's cache (a folder where websites store information and files temporarily). Twitter said that once users left their platform or logged off, the files would remain in the browser cache, allowing anyone to retrieve it. The company is now warning users who share systems or used a public computer that some of their private files may still be present in the Firefox cache. Malware could be used to scrape and steal this data.2 -
Just a question about a generic social app. Using mongodb , 3 entities ,like comment and post . how do I display posts in feeds with comment count and like count . since its mongodb I can't do joins . the other way is to maintain a data structure on the server side . or yet another way would be making 2 extra queries to db for retrieving like and comments count . Any other way this is possible or is it possible to form a query in mongo db to retrieve all 3 at the same time???1
-
Alright so I have been trudging around in javascript land for a bit and one thing kind of bothers me (correct me if I am wrong I would love to be wrong on this). It seems like a lot of javascript, or at least frameworks, leave a lot of possibility for memory leaks. Like you can create an anonymous object with a method that just kind of hangs out and acts with no way to retrieve it and turn it off. Am I wrong here? Please tell me I am wrong. And for the record I know I can assign anonymous objects to variables in various ways, but I am not forced to.4
-
For a few days I failed to see that I need to add one string escape instead of re-writing the whole S3 file upload logic to hash file names using md5. :( Context: We were not able to retrieve some files with international letters (like German, Chinese, etc) in their names because of weirdly escaped signed URL to S3.
-
HI all.
I'm a novice in Web Development and I've made simple Web App I've just publish on Github. I just wanted to play a little to learn API manipulation and JavaScript's Fetch. So I decided to build an app based on Discogs' API for my personal use.
ShuffleBum is an app, which after providing a username in the dedicated field, retrieves all items of user's collection then randomize one of them before displaying it. That's help me to find my next listening records (I have 400+ vinyls in my collection and I always listenning too many time the same records ^^).
Because of Discogs' API construction, I must perform two fetch to retrieve all the items (Items are stacked at 50 per page). So, for my collection, there is 10 pages with 50 items. So, I used a foreach and a fetch to scan items and store them into an array.
But, this is really slow (800ms for each request), so for 10 pages, that's a lot. But I can't see how to improve those request. I can't do otherwise. Well, I guess.
Hope I will have so recommandation, hints, tricks.
Thank you.13 -
When i took CS operating system class few years ago there was discussion on layout of memory and how to retrieve things faster. There was a point where we were asked question on locality and i was first to shoot my hand and prof looked at me : i was eager to answer locality of refrences, i knew temporal locality but i forgot the other one. That is when he told me to remeber Einstein and his space time principal. Instantly i remembered spatial locality. Till this date after so many years i remeber the concept! Woohoo to all the awesome teachers!!
-
When the vendor did a search page but retrieve all the records from the database and paginate them with js, and the load test crashes with 20 concurrent users!!!
-
Does anyone know a good way to retrieve back the indexes of elements in the unsorted list after sorting that list in python?
Let's say for example I want to find the largest element in a list, so I sort it and find the last element(as it will be the largest), now I want to retrieve its original position in the unsorted list.9 -
nice read:
https://lukasa.co.uk/2016/12/...
(would love to know what happens to radar/bug report, but could not retrieve it) -
i still dont get how you retrieve webhook payload thru localtunnel. i just took my way around by polling
-
Function in my Dao file is:
@Query("SELECT * from appData WHERE type = :type ORDER BY id DESC")
fun getData(type: String): Flow<List<AppData>>
The database contains a column of automatically generated int primary key 'id', a column of string named 'type', and another string column named 'content'.
A Part of code from my composable function is:
val currentRetrievedDate: Date = Date()
val currentDate: String = SimpleDateFormat("dd-MM-yyyy").format(currentRetrievedDate)
var lastDateObjectList by remember { mutableStateOf(emptyList<AppData>()) }
LaunchedEffect(streakCounterViewModel) {
coroutineScope {
streakCounterViewModel.appDataRepository.getDataStream("lastDate")
.collect { newDataList ->
lastDateObjectList = newDataList as List<AppData>
}
}
}
if (lastDateObjectList.size>1){/*TODO*/
for (i in 1 until lastDateObjectList.size){
LaunchedEffect (Unit){
streakCounterViewModel.deleteData(id = lastDateObjectList[i]!!.id,
type = lastDateObjectList[i]!!.type,
content = lastDateObjectList[i]!!.content)
}
}
}
val lastDateObject: AppData?/* = lastDateObjectList[0] ?: null*/
lastDateObject = if (lastDateObjectList.isNotEmpty())
lastDateObjectList[0]
else null
var lastDate = lastDateObject?.content ?: "00-00-0000"
var currentStreakObjectList by remember { mutableStateOf(emptyList<AppData>()) }
LaunchedEffect(streakCounterViewModel) {
coroutineScope {
streakCounterViewModel.appDataRepository.getDataStream("currentStreak")
.collect { newDataList ->
currentStreakObjectList = newDataList as List<AppData>
}
}
}
if (currentStreakObjectList.size>1){
for (i in 1 until currentStreakObjectList.size){
LaunchedEffect (Unit){
streakCounterViewModel.deleteData(id = currentStreakObjectList[i]!!.id,
type = currentStreakObjectList[i]!!.type,
content = currentStreakObjectList[i]!!.content)
}
}
}
val currentStreakObject: AppData?/* = currentStreakObjectList[0] ?: null*/
currentStreakObject = if (currentStreakObjectList.isNotEmpty())
currentStreakObjectList[0]
else null
var currentStreak = currentStreakObject?.content ?: "0"
In this code, the last login time and last streak of user is already saved, we just have to fetch the data from the local database, make sure that there are not more than 1 occurrences of same data type in the database, and then use that data. But this, instead of using the database values, uses 00-00-0000 as the lastDate, and uses "0" as the currentStreak (which should only be used for the first not, and in some rare situations only), and is not able to retrieve data from the database properly.
The data saving and updating logic is working fine, but only the retrieval part is causing some issue.
The complete project is also uploaded on github: at HealthEase repo of tauqirnizami4 -
There's no official integration (package) for JWT in Java Spring?
I am new to Java Spring and want to create a simple RESTful server with JWT auth. Checked many tutorials, all of them involved creating your own JWT middleware to retrieve JWT token from incoming request and validate it using some 3rd party JWT library like jwtk/jjwt.
I am surprised this is not as simple as including a Spring JWT package and it would work out of box. I used to write a similar site using Python/Django, and for that adding JWT support is quite simple as adding "xxx.middleware.JWTAuthMiddleware".1