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 - "file"
-
Me: "Delete this file."
Windows: "Someone is using it."
Me: "Who?"
Windows: "I can't say."
Me: "I checked using a utility. It says your file explorer is the one using it!"
Windows: "Well, I had to show a preview."
Me: "Why?"
Windows: "Because you selected the file to delete it!"
Credit: https://twitter.com/cmuratori/...9 -
Dev: what do I call this file ?
Me: just name it something meaningful so other dev's know what it is
Two days pass
Me: time to do code review .. oh look a new file ..
Git comment : new file for sax parsing , architecture gave the ok.
File name : SomethingMeaningful.java11 -
Tired is the day when waiting for a file to load, only to realize it has loaded long ago and the file is the spinner.4
-
Compilation completed. Output file size: 15KB
*Adds a JSON library*
Compilation completed. Output file size: 1.4MB
SON OF A BITCH10 -
Just wrote a Python script to generate me a JSON file.
I forgot the 0th command line argument is the file you're running...
On first test it overwrote itself.15 -
So I leave about 300 GB of files to transfer overnight. Come back in the morning and the entire fucking transfer has been paused because there was one duplicate file and it wanted to know whether to replace it or not. WHY CAN'T YOU JUST KEEP TRANSFERRING THE REST OF THE FILES?8
-
We've password protected a file and forgot the password we need it cracking asap.
Sorry we can't crack passwords on files.
If we don't get access to the file it'll cost the company up to 250k.
Well you should've thought about that before encrypting the fucking file with 256 bit encryption.8 -
Found this gem on GitHub:
// At this point, I'd like to take a moment to speak to you about the Adobe PSD format.
// PSD is not a good format. PSD is not even a bad format. Calling it such would be an
// insult to other bad formats, such as PCX or JPEG. No, PSD is an abysmal format. Having
// worked on this code for several weeks now, my hate for PSD has grown to a raging fire
// that burns with the fierce passion of a million suns.
// If there are two different ways of doing something, PSD will do both, in different
// places. It will then make up three more ways no sane human would think of, and do those
// too. PSD makes inconsistency an art form. Why, for instance, did it suddenly decide
// that *these* particular chunks should be aligned to four bytes, and that this alignement
// should *not* be included in the size? Other chunks in other places are either unaligned,
// or aligned with the alignment included in the size. Here, though, it is not included.
// Either one of these three behaviours would be fine. A sane format would pick one. PSD,
// of course, uses all three, and more.
// Trying to get data out of a PSD file is like trying to find something in the attic of
// your eccentric old uncle who died in a freak freshwater shark attack on his 58th
// birthday. That last detail may not be important for the purposes of the simile, but
// at this point I am spending a lot of time imagining amusing fates for the people
// responsible for this Rube Goldberg of a file format.
// Earlier, I tried to get a hold of the latest specs for the PSD file format. To do this,
// I had to apply to them for permission to apply to them to have them consider sending
// me this sacred tome. This would have involved faxing them a copy of some document or
// other, probably signed in blood. I can only imagine that they make this process so
// difficult because they are intensely ashamed of having created this abomination. I
// was naturally not gullible enough to go through with this procedure, but if I had done
// so, I would have printed out every single page of the spec, and set them all on fire.
// Were it within my power, I would gather every single copy of those specs, and launch
// them on a spaceship directly into the sun.
//
// PSD is not my favourite file format.
Ref : https://github.com/zepouet/...16 -
Client: Let me send you the files needed.
*client sends link to their own Dropbox folder page, not actually sending a shared link*
Me: Uuuhm, the link you've just send is only viewable by your account.
Client: Oh, hold....
Client a bit later: *sends actual Dropbox credentials over email in plain text*
Why.26 -
I don't use Google/Facebook for privacy reasons (and their sub-services etc). Haven't used them for ages but noticed that google still loads a lot of domains like analytics etc. This goes for facebook as well.
I now blocked a lot of google/facebook domains through my hosts file.
It's funny to see the amount of DNS requests to those fb/google connected domains nearly go to zero and also the fact that I literally can't load google/facebook anymore!126 -
Translating things:
ME: "Hey dev, can you send me a xml file of strings to translate so you can impleme..."
DEV: "yea yea tomorrow"
He sent a .docx file.
i'm crying9 -
In the project management system we use with our clients I see file named, 'instructions for backup.'
I open the file and all it contains is my name and phone number.😑4 -
Yes I am a Linux user and yes I don't like windows and this is NOT a windows hate post but I've been a windows user intil the age of 15 and this is the one thing I still cannot wrap my head around. Fun fact is that I also talked about this with my examinator guy who is a 'hardcore' windows user and he fully agreed 😆
Whenever I was either at the start menu or within for example the downloads folder, when I'd put something in there or downloaded something and later on wanted to search for it through the start menu or the folder viewer itself, IT ALWAYS RETURNED AS 'NOT FOUND'.
Whenever I search for that fucking file, it always said that it couldn't find the damn fucking file.
AND THEN WHEN YOU SCROLL THROUGH THE FUCKING FOLDER IT IS RIGHT FUCKING THERE RIGHT IN FUCKING FRONT OF YOU.
I've used many linux distro's and even OSX for a very little and it always works perfectly on there but windows ALWAYS fucked this one up for me and appearantly (according to them though) I am not the only one who this doesn't work for!
I still find this one very weird.19 -
Add functions inside of jquery.min.js file just because im too lazy to add script source to html file6
-
"Tabs create smaller file sizes. I run a compression company, trust me, I've devoted my life to minimalizing file sizes."
- Richard Hendricks10 -
It triggers me when Mac users commit .DS_store file on GitHub.
Its even more annoying when they dont merge my PR which deletes the .DS_store file8 -
Website A = Website B
Script to import CSV file on Website A = works
Script to import CSV file on Website B = !works
Clock = 4am
Me = null9 -
There are two types of dumb people in our office:
1.Those who try to open a .exe file with Word.
2.Those who ask me why the file is not opening.1 -
// family tech support
Dad: *Opens Microsoft Word*
Dad: *Writes stuff*
Dad: *Saves the file as "Doc1.docx" (every time)*
Dad: Son, where did I save my file? I can't find it.2 -
Overheard this today.
Client: I've tried running it but the batch file isn't working.
Tech: You're a batch file.3 -
Noob mistake, forgot the rename an HTML file to a .php file; was wondering why things weren't working at all.2
-
Lead: "We write SOLID code"
Me: *opens a controller file*
Controller: "I'm 8000 lines long and hell yeah I'll access the database and file system directly!"5 -
I just mistyped a keyboard shortcut that caused my computer to say «I AM FILO AND EVERYONE LOVES ME» at full volume.
I have no memory of leaving a script attached to some random shortcut, and I can't find the setting anywhere.
Young me was a narcissistic asshole1 -
Pulling my hairs off because a file is not being executed in the server.
Later realized I didn't even upload the file :(1 -
FUCK Windows File locks! I want to fucking delete a file, I don't care if anybody uses it right now! I'm the admin of this system! Fuck you windows6
-
Today a colleague of mine asked me to help with some javascript. So I said sure, it will be done in 5 minutes. Im a fullstack developer with a focus on backend in this project.
So I opened the frontend part and was amazed how shit the javascript file was. Yes you read it right FILE...
One big file with a lot of variables in the window scope.
Because she was in “charge” of the frontenders because she works there a bit longer then me I never checked the frontend code.
I said I wont/cant help unless I see better code. I explained to a trainee what could be done to change it and Im impressed that the trainee did a better job then the employee and quick as well.
Got the whole code in seperate files with each part of the code in seperate scopes within 2 hours.
What Im saying here is that even as student, intern or trainee you can know things better thsn someone with experience, dont be afraid to speak up. Because everyone can learn from eachother.7 -
All front end written in one file. File has over 6000 lines, mix of a php, javascript and extjs. It kills my IDE.5
-
hi 👋🏻 everyone. Recently I created a file system UI in react. Would love to have some feedback on https://github.com/imshubhamsingh/...9
-
Max file size allowed is 10 MB, and this is what I get when I try to upload a 5 MB file. Do I really want to apply here?15
-
My typical development workflow:
$ ssh user@devserver
$ cd /appdir
$ git clone/pull
$ vim file
$ vim another file
$ tail -f /var/log/applog
$ vim file
$ git commit -am 'fixed the glitch'
$ git push origin dev
^D3 -
Oh, nice. Now Windows 11 doesn't just fuck up AMD CPUs with lack of performance, but also SSDs. NTFS at its finest, but see the tags.17
-
// to understand infinite loop, see the bottom of this file.
At the bottom of the file:
// to understand infinite loop, see the top of this file.2 -
Friend : I know how to program!
Me : Cool! What language do you program in?
Friend opens notepad and names file program.bat
You have disappointed me8 -
I got the following question from the client:
After last batch of changes the name of the downloaded file is now `<file name > (2).pdf`, can it be like before, without `(2)`4 -
Accidentally Click on .doc file in File Manager
Microsoft word starts to open it
I press cancel.
Word- Attempting to cancel ....
And then opens it anyway.
Me - Wut?5 -
Support elevates a ticket.
Ticket: customer is getting a weird error uploading photo.
Can’t recreate. Tell support to call them back. I’ll sit in on the call.
Watch the process. Noting extraordinary...
Hmm.
Me: can you get the customer to open the pic in photo viewer?
Support asks as much.
Support: uh, he says he gets a similar error opening this photo in the photo viewer.
Me: 🤦♂️ that is a corrupt file! -
😐ctrl/cmd + s to sacrifice file.😑
Teacher: always save your file or else data will be lost. ctrl + s
Me: in word
__________
| |
| |
| |
| page 1 |
__________
ctrl + s ( 10 times)💾
Next day I open this file, my data is lost.
I sware to god i hit ctrl + s 10 times.15 -
Hah!
I just broke my record and generated (not exported or imported) the biggest SQL file!
A massive 15.7GB SQL file monster.
I hope the import will go well.6 -
my co-worker raged-flipped her keyboard cause she accidentally deleted the file she has been working on for 2 hours. when we looked in the recycle bin and tried to restore it, it shows an error saying "unknown file extension". she had to start all over because for some reason, we couldnt bring the file back.11
-
By the time windows was extracting the file, I downloaded 7zip, installed it and extracted the file and started editing the files
-
Long time ago, back in a day of Microsoft Office 95 and 97, I was contracted to integrate a simple API for a payment service provider.
They've sent me the spec, I read it, it was simple enough: 1. payment OK, 2. payment FAILED. Few hours later the test environment was up and happy crediting and debiting fake accounts. Then came the push to prod.
I worked with two other guys, we shut down the servers, made a backup, connected new provider. All looked perfectly fine. First customers were paying, first shops were sending their products... Until two days later it turned out the money isn't coming through even though all we are getting from the API is "1" after "1"! I shut it off. We had 7 conference calls, 2 meetings, 3 days of trying and failing. Finally, by a mere luck, I found out what's what.
You see, Microsoft, when you invent your own file format, it's really nice to make it consistent between versions... So that the punctuation made in Microsoft Word 97 that was supposed to start from "0" didn't start from "1" when you open the file in Microsoft Word 95.
Also, if you're a moron who edits documentation in Microsoft Word, at least export it to a fucking PDF before sending out. Please. -
personalproject C++ codebase:
- Clean code,
- 1 class per file,
- naming conventions
- comments .
- No more than 10 files per folder
Work C++ codebase:
- 22 classes per file.
- Classname not the same as file name
- weird variable names CmdStng
- All files in one source folder.
- Source control from 20 years ago
Me every time I cannot find anything I wondering why it is in a different file on line 3574 inside another class with an unrelated filename6 -
— Filezilla *open prod ftp*
— right click a file *edit*
— edit the file, save,
— filezilla *save new file*1 -
Have you ever thought that even today, if you had a very large "file", say 10 petabytes, that it would take 74 hours on a 300 Mb/s connection to transfer it anywhere in the world , therefore it would still be much faster to fly it physically anywhere, even with the ~5 hour time to transfer it to some sort of drive(s) at 5 gigabits a second.9
-
Ok so everyone knows the "error after file end" BUT I JUST GOT AN ERROR IN A FILE THAT DOESNT EXIST.
WHAT THE FUCK UNITY. WHAT THE ACTUAL FUCK.1 -
Nav bar is not placed at the top....
Spend an hour debugging. Finally....
Ctrl+a, Copy, paste into new file.
Save and overwrite old file.
Works.2 -
Okay, first rant here.
Spend most of my morning searching for a js file that was supposed to build some graphs in a report page in this legacy system (still in active development) just to find it embedded inside a random .php file being included inside a wall of if-elses (that shit has around 100 lines) on the index.php (that somehow manages to route all the nonsense that's going on there).. was it really that difficult to make it a proper .js file? and actually import it on the page that is using it? c'mon...4 -
I spent a *very* long time trying to work out why my README file wasn't formatting....
It didn't have a .md extension.
:/1 -
Java dev here. I rewrote an app and replaced a system call to ssh with a modern jaxrs post for uploading a file and (new) some additional data.
I even used a stream.
1 hour in production, first client doesn't get his file. Log says OutOfMemoryError: heap.
Me: wtf? I already use streams.
Looking at the Jersey library. Docs say nothing. An issue from 2013 says: oh if you silly don't use the Apache httpclient addon, we disable chunking and buffer the whole body, because our tests fail with the jdk included http client otherwise.
Me: meh.
No warning in the logs. Thank you soooooo much! Who could have known?4 -
I had to demonstrate file uploading, clicked “Select file…”, it opened a file dialog, and there were photos of me posing with cum on my face.8
-
/* A normal day at office */
// A non tech guy sitting next to me
// Wants to save a file on his system.
Him: Moves Cursor. Clicks File->Save.
Me: *facepalm*
<!-- moments later -->
// Time to save a file
Me: Ctrl-SSS
Runs code.
<!-- insert picture here -->
Me: Alt-TAB. Ctrl-Z. Ctrl-S.
Him: *sigh* -
Why do they send flat colour logos as fucking jpegs? Indexed png or gif unless you like the artifacting on your shit logo, dickbrain.4
-
My friend left his project work and I undertook it. Contained a mysterious folder named " open only when you get frustrated".
When the time came, I opened it and saw a text file along with a folder. The text file says, "Blame the predecessor for the code", and the folder was named, "open only when you get frustrated next time".
When the time came, it contained yet another text file along with a folder. The text file says, "Blame the project owner", and the folder says, "open only when you seriously get frustrated".
Finally, the time came, the folder contained only one text file, and to my surprise, there wasn't any folder. The text file says, "TIME TO MAKE THREE NESTED FOLDERS".1 -
Can we please stop using a file structure (YAML, JSON, XML etc) and just changing the file extension and calling it a new file type?
Stop trying to make your software/framework sound more complicated by saying this shit, if you use something, own it and don't try to mask it...
And mini rant over...11 -
Compiled a small style change in LESS file. Whole page is broken. Realized holiday replacement made all changes in main CSS file which is generated through LESS compiling.3
-
Does anyone else get intensely frustrated and stressed trying to explain something to someone who repeatedly fails to understand?
"ok so you click decrypt password and then you give it your private key"
"ok I clicked on download rdp file"
"no you want decrypt password"
"and then it will download a file"
"no you need to give it a file"
"which file?"
"THE FUCKING FILE IT SAYS RIGHT THERE STEVE"
Keep in mind this is the fifth time I've walked him through this12 -
Is it just me, or is there no simple way to create a new file on Mac OS?
Every time I need to create a text file or something, I have to either touch a file via the console or copy & paste another file and rename the extension and erase the content.
Why isn't there a "New File" option on right click?23 -
So I've got a few stories, but the first one goes like this:
>> Spring semester last year
>> Likely have the best grade in a front end web dev class
>> Has a file on a server that we used for this class.
>> Copies HTML file to desktop from server
>> Opens desktop file in VS (or VSCode, I forgot lol)
>> Opens server HTML file in chrome
>> Edits the file
>> Browser doesn't change.
>> "What to fuck?"
>> Clears cache
>> Doesn't change anything
>> Closes and reopens Chrome
>> Still no change
>> 'Yo what the fuck???"
>> Calls professor over to get help
>> Explains problem
>> Instantly realize I'm a dip shit and open the desktop HTML file in Chrome and see the changes I made2 -
Telling my mom how to do computer stuff is like programming, I need to outline every fucking step. Yes this includes file management.1
-
Instructions on how to become suicidal:
- Create an API controller for the /file/ path
- Add an empty endpoint for POST /file/upload (will write it later!)
- Forget about this endpoint at some point
- Later, create a page for /file/upload
- GET /file/upload returns page
- POST /file/upload returns empty 200
Pure psychological horror for like an hour Googling why the fuck my razor page is returning empty responses and my breakpoint on OnPost is not fucking hitting even if I copy and paste example code from the ms website
Oh yeah, that controller.5 -
I have come across the most frustrating error i have ever dealt with.
Im trying to parse an XML doc and I keep getting UnauthorizedAccessException when trying to load the doc. I have full permissions to the directory and file, its not read only, i cant see anything immediately wrong as to why i wouldnt be able to access the file.
I searched around for hours yesterday trying a bunch of different solutions that helped other people, none of them working for me.
I post my issue on StackOverflow yesterday with some details, hoping for some help or a "youre an idiot, Its because of this" type of comment but NO.
No answers.
This is the first time Ive really needed help with something, and the first time i havent gotten any response to a post.
Do i keep trying to fix this before the deadline on Sunday? Do i say fuck it and rewrite the xml in C# to meet my needs? Is there another option that i dont even know about yet?
I need a dev duck of some sort :/39 -
Server configuration file formats...
some use custom text file
some use ini files,
some use xml..
some use json..
some use yaml..
some use toml..
How many file formats I need to learn!!!9 -
Code languages should stay within their designated file extensions! I'm having to work with SQL in .resx files at the moment! Then there's HTML which is like a skitty little travelling monkey that I've found blundering about in SQL strings before, let alone people trying to sneak it into .js files, which is one reason I chose Angular over React btw (and don't give me that bullshit of separations of concerns vs separation of technologies).
It is mostly trivial to work with separate files across languages and doing so gives you the benefits of that languages support in the text editor or IDE you are using. It becomes easier to work with, the behaviour is predictable and it is formatted in a readable manner, ultimately reducing the potential for mistakes. Stop trying to make me put everything in strings!!1 -
MTP is utter garbage and belongs to the technological hall of shame.
MTP (media transfer protocol, or, more accurately, MOST TERRIBLE PROTOCOL) sometimes spontaneously stops responding, causing Windows Explorer to show its green placebo progress bar inside the file path bar which never reaches the end, and sometimes to whiningly show "(not responding)" with that white layer of mist fading in. Sometimes lists files' dates as 1970-01-01 (which is the Unix epoch), sometimes shows former names of folders prior to being renamed, even after refreshing. I refer to them as "ghost folders". As well known, large directories load extremely slowly in MTP. A directory listing with one thousand files could take well over a minute to load. On mass storage and FTP? Three seconds at most. Sometimes, new files are not even listed until rebooting the smartphone!
Arguably, MTP "has" no bugs. It IS a bug. There is so much more wrong with it that it does not even fit into one post. Therefore it has to be expanded into the comments.
When moving files within an MTP device, MTP does not directly move the selected files, but creates a copy and then deletes the source file, causing both needless wear on the mobile device' flash memory and the loss of files' original date and time attribute. Sometimes, the simple act of renaming a file causes Windows Explorer to stop responding until unplugging the MTP device. It actually once unfreezed after more than half an hour where I did something else in the meantime, but come on, who likes to wait that long? Thankfully, this has not happened to me on Linux file managers such as Nemo yet.
When moving files out using MTP, Windows Explorer does not move and delete each selected file individually, but only deletes the whole selection after finishing the transfer. This means that if the process crashes, no space has been freed on the MTP device (usually a smartphone), and one will have to carefully sort out a mess of duplicates. Linux file managers thankfully delete the source files individually.
Also, for each file transferred from an MTP device onto a mass storage device, Windows has the strange behaviour of briefly creating a file on the target device with the size of the entire selection. It does not actually write that amount of data for each file, since it couldn't do so in this short time, but the current file is listed with that size in Windows Explorer. You can test this by refreshing the target directory shortly after starting a file transfer of multiple selected files originating from an MTP device. For example, when copying or moving out 01.MP4 to 10.MP4, while 01.MP4 is being written, it is listed with the file size of all 01.MP4 to 10.MP4 combined, on the target device, and the file actually exists with that size on the file system for a brief moment. The same happens with each file of the selection. This means that the target device needs almost twice the free space as the selection of files on the source MTP device to be able to accept the incoming files, since the last file, 10.MP4 in this example, temporarily has the total size of 01.MP4 to 10.MP4. This strange behaviour has been on Windows since at least Windows 7, presumably since Microsoft implemented MTP, and has still not been changed. Perhaps the goal is to reserve space on the target device? However, it reserves far too much space.
When transfering from MTP to a UDF file system, sometimes it fails to transfer ZIP files, and only copies the first few bytes. 208 or 74 bytes in my testing.
When transfering several thousand files, Windows Explorer also sometimes decides to quit and restart in midst of the transfer. Also, I sometimes move files out by loading a part of the directory listing in Windows Explorer and then hitting "Esc" because it would take too long to load the entire directory listing. It actually once assigned the wrong file names, which I noticed since file naming conflicts would occur where the source and target files with the same names would have different sizes and time stamps. Both files were intact, but the target file had the name of a different file. You'd think they would figure something like this out after two decades, but no. On Linux, the MTP directory listing is only shown after it is loaded in entirety. However, if the directory has too many files, it fails with an "libmtp: couldn't get object handles" error without listing anything.
Sometimes, a folder appears empty until refreshing one more time. Sometimes, copying a folder out causes a blank folder to be copied to the target. This is why on MTP, only a selection of files and never folders should be moved out, due to the risk of the folder being deleted without everything having been transferred completely.
(continued below)29 -
Does anyone else use:
cat /path/to/file | grep "blah"
Rather than:
grep "blah" /path/to/file
...when grepping? Or is it just me? Mainly asking because in my half asleep state I just wrote `tail -f | grep "blah"` by mistake and wondered why it was taking way to long to read the file...10 -
I'm not a programmer by trade, so the only language I know well is bash. But as sysadmins we do use bash often.
Looking at other sysadmins' scripts though, there are interesting things in it every so often. Like for example `touch file` which creates a file. I've seen some sysadmins just do this instead `> file`. Genius! Or perhaps a `cat file >> elsewhere`. You can do that with `< file >> elsewhere`. It's something that if I hadn't seen it elsewhere, I wouldn't have thought about. But yeah, it saves a program call and it works!10 -
We found a binary string on our Loggly server. It's a PDF file .. the entire PDF file, being sent, to our logging service.3
-
A question arose in our office today and I can't stop thinking about it:
If you imagine your life as a file lying somewhere, being steadily changed and expanded - of which filetype would it be and why?8 -
Firefox and Chrome removing FTP support in 2021 was a terrible decision.
Web browsers were simply the more convenient FTP browsers, more than file managers, due to browsers' built-in multimedia capabilities like photo viewing and opening documents, distinct purple highlighting of already opened directories and files, browsing history, familiar mouse shortcuts like middle click for new tab, and no possibility of accidental writes due to a botched drag-and-drop operation or similar.
If I wanted to browse an FTP server in "read-only mode", web browsers used to be the preferred choice.12 -
When an analysts opens a ticket about a wrong result csv file but instead of putting the actual file there , he puts a screen shot of it
-
I kinda started programming back in the day, by breaking 2 school servers using a simple batch "virus"... it effectively opened tons of porn videos, threw the mouse cursor to the top right corner of the screen and shut down the PC after 15 seconds.
I masked the file and made sure it looked like internet explorer (since my school, back in the day, didn't use chrome and didn't allow the installation of chrome)
It was meant to troll my friend but all computers shared files with each other which meant even the private PC's of my teachers got my "virus"
Eventually it landed in the startup folder and messed everything up. I got snitched out, and I had to fix it
(I literally just wrote another batch file to delete my so called virus... because of the 15 seconds time limit I had)1 -
A few weeks ago, I was kept up until the wee hours of the morning trying to figure out how in the hell the Monty Hall problem works. After finally getting it (I'm slow, okay?), I decided to write a program to run simulations of it.
First incarnation of program took user input. User enters what door they choose (1, 2, or 3), then is told what door Monty opens, then given the decision of staying with the door they originally chose or switching, then informed how that worked out for them.
Second incarnation of program ran on a loop. At the start of each loop, a random door is picked for the user guess. Then the door Monty opens is calculated from the remaining doors (excludes user guess and prize door). Then user switches doors (choosing the door that was not their original door or the door Monty opened). At the end of each loop, if the door they switched to was the prize door, it would increment a win counter, else increment a loss counter. After running the loop 1000000000 times, it printed to console `You always switched doors, resulting in ${wins} wins and ${losses} losses`.
THEN I decided to write a variation to run a while loop on the outside of the loop to increase the number of total doors until the point where the decision to switch doors hurt more often than it helped. At this point, I decided to incorporate file I/O and write to a file rather than a console. And that was neat!
And then I decided it would be cool to go back to the three door variation, printing on each loop the original door, the door Monty opened, the door that was switched too, the result of the switch (win or lose) and what the prize door was.
But for the life of me, I couldn't seem to get the file to write properly. It would, like, always crash my terminal. I tried open + append, I tried append. I tried createWriteStream. Still just failure.
And then I changed it to an appendFileSync and happened to look at one of the files that I was writing to. "Huh, over a gig seems a lot."
"Well, how much are you writing each loop? Did you forget to keep in mind how many bytes that would be?"
TLDR: If you're going to write a program that's going to write data to a file on a loop, you might want to figure out how much it's going to end up writing .... before trying to run it. And running a loop 1000000000 times may be a little excessive.
*face palm*2 -
PSA: If you use jQuery and BlueImp's jQuery File Upload there is a big potential vulnerability you need to be aware of. If you use NPM to pull the repo into your public folder, the "server" folder will be available for people to take advantage of. "Hackers" may be able to upload malicious code and replace parts of your site.
I had a site hacked and later saw on Google Analytics that people were posting to random URLs in that folder. The fix is to simply delete that folder, but if you use NPM, you need to be extra careful it doesn't come back.
Also, I didn't investigate further. So I'm not sure what (if anything) is vulnerable in there, or if it was just the specific version I had. To be safe, if you use this plugin (as MANY people do), just delete the folder.
Link to the repo for your reference: https://github.com/blueimp/...4 -
Now my client does not want to rely on Amazon S3 because of the One Outage that it ever had a couple what weeks ago I forgot already. So my dumbass blurts out well we could always just back up to some other image or file storing website. But now I'm expected to implement this right away when I really haven't thought about it at all I mean I would have to write some sort of failover and some sort of daily or syncing mechanism. I guess I should forget about any direct upload to S3 code that I have written. Really I guess I have to wrap all of the image and file handling stuff with my own solution. Which actually that will be very nice when it is done and I could use this on other projects but it's quite a lot of work for something that I don't feel we really need at this stage in development. Just because you're using stuff on production that has am enormous red TEST label in the way of the ui doesn't mean i can code bullet proof software any faster4
-
Windows File Explorer is the epitome of everything bad about Microsoft. It's shitty proprietary software that treats the user like a baby and hides to complex parts of the system for them, while also managing to be so hideously designed that there are entire books about using it.
Thankfully, I have enough technical knowledge to be able to use PowerShell, even though that's shitty too3 -
Meet Android, years of development by thousands of developers and still can't open a PDF file downloaded via chrome
'Can't open file'3 -
Okay ... Windows, I really tried to be nice, but that's it. You get off my ssd right now ...
Just got the error: "filename is too long - unable to delete file" (full name incl. path)
Seriously, WHY?
I mean, sure ... Long file paths/names are a thing and this is why there are limitations. I am totally fine with it!
But Why the hell allows windows you to create those files if it is unable to delete these files later ...
I don't get it. Maybe I am just hit my head to hard as a child and someone may enlighten me ...
PS: windows was running in a VM to give it a real serious try after years on Linux4 -
Your Thunderbird inbox file is 8GB and you complain about the speed but still, when I fucking ask you if you want me to archive for you the fucking mails, I get a "Hell no, I don't like them archived because then they are difficult to find"... go to fuck off.
-
File hosting like GitHub?
Basically.. I want to let my Patreons download major updates to my game before I upload them to Github. Now, I will get a GitHub Developer upgrade once I get $7+ per month from Patreon, and host the updates on a private repository for a few days before uploading it to my main dev repository, but I something until then. Some place I can host the loose files, or a .zip at a static link for free. (that can only be accessed by that link) ^~^12 -
This happened a few years ago, and not only once.
Me to coworker: Could you send me that file?
5 minutes later in email: file://c/documents%20and%20settings.......1 -
Trying to learn C and thought a easy file copy was a good start. The program read the size of the file, reserved that size in memory, can copied data there and then to the new file. For some reason I never thought that the file might be bigger then available memory... Took a couple of BSOD to find that "bug".3
-
FUCK YOU AMAZON! Stop telling me my configuration yaml file contains a tab... THE FUCKING FILE DOES NOT EVEN EXIST!
-
With the billions of dollars Google has, they can't even build a proper file manager for their Android operating system.
The pre-installed file manager on Android OS, codenamed "DocumentsUI", is functionally crippled and lacks the most basic functionality.
First of all, there is no range selection or A-to-B selection of items. If many items need to be selected, each item has to be tapped individually. Meanwhile, ES File Manager had A-to-B selection since at least 2012, back when Android OS was an operating system of freedom, before Android OS got cucked.
As any low-tier mobile app, the file manager by Google also lacks a draggable scroll bar, so long lists have to be scrolled through manually. Even the file manager of Windows Mobile 6.5 Professional has a draggable scroll bar! And Windows Mobile 6.5 Professional was released in 2009! Samsung "My Files" had a draggable scroll bar in 2013 but it was later unexplainably removed.
Its search feature can only search the entire storage, not an individual folder, and lacks filters such as date and file type.
Obviously, as in any terrible Android file manager, after items are selected for copying and moving, tapping "Copy to..." or "Move to..." navigates back to the initial directory rather than staying in the current directory. The user is forced to navigate all the way to the folder with the selected files if the intention was moving files to a sub folder. Any Android file manager that does this automatically qualifies as a low-tier file manager.
The file manager by Google even lacks a "details" feature which shows information such as the exact file size and name and the total size and file count of a folder. Some file managers such as the one by MediaTek are unable to show the details for multiple selected items, which is somewhat forgivable, but the Google file manager does not have a "details" feature to begin with.
Files are always sorted alphabetically after each start. The Google file manager does not memorize if the user selects sorting "by size" or "by last modified". As one might expect, it indeed lacks reverse sorting.
Of course, there is no "open with" feature where the application can be selected manually, and there is no ability to create new blank files, and it lacks tabbed browsing, and does not show the number of files inside folders in list view. ES File Manager (before it became adware in ~2016) has all of these features.
Last but not least, there has been a bug where cancelling a file move operation deletes the source folder without it having been transferred. Presumably it has been patched by now, however, a bug where tapping "cancel" leads to data loss is inexcuseable. It shows the app has not even been properly tested, let alone properly created.
http://archive.today/2020.10.27-160...
Google could have hired a college student who could have built something better than the scrapyard-worthy "file manager" they have built.
But granted, at least Google's ever-so-terrible file manager does not limit file names to fifty (50) characters like Samsung's TouchWiz file manager, also known as "My Files", did until at least 2016. There is no way to know what went through the head of the programmer who implemented this pointless limitation. Google's file manager also correctly handles file name conflicts by renaming the new files.
Microsoft built a better file manager for their operating system decades earlier than what Google threw together. Microsoft spent more of their money building a proper file manager.6 -
Today we had a cryptolocker running through our file servers. The locker came from a mailicious e-mail from a strange address. The email contained a strange pdf file with an embedded docm file. 6 people out of a workplace of 80 opened that file. These people...5
-
When four issues get assigned to four different developers and the analysis and the proposed fix for each is a change to a single class file that has been locked by a fifth developer.1
-
Finished up my first ever pull request for open source, two files (one file just tested the other file), super short, and it got closed. Big sad.1
-
Legit the file name chosen by a client. Honestly haven't renamed it at all.
I did save the cropped version of the screenshot so I can upload this as a GIF though. -
Me: *tries to save a file using inscape to my documents folder*
AVG: OMG OMG I SWEAR INSKAAPE JUST TRIED TO DELETE *literally the file I just tried to save* BE THANKFULL WE MADE SURE YOU CANT BE PRODUCTIVE WITHOUT TURNING OFF YOUR AV3 -
Accidentally moving a file and reverting the change while the file was in use in Bash for Windows. Now I have a file even the sole Administrator (me) does not have access to delete...5
-
!$rant
So I kept running into permission problems last night when trying to use move_uploaded_file() in php to upload images to my virtual server. Maybe today I'll finally figure it out. -
is it me or you also make a new file of a working code just make and see how new way it will work but end up editing the original file 😭1
-
Downloaded my website backup from godaddy
Opened backup file (many folders inside)
Opened folder /va and found 1 file with my website name
Opened the file and inside
*: :blackhole:
I didnt know my website was a blackhole -
FUCK FUCK FUCK Windows share feature
just fuck it !
and fuck the people who made it!!!44
ok calm mode on
I had to copy a 30 gb file from my computer to my sister's one, and since the largest pendrive I have is 8gb, and I'm just lazy to split the file into parts, I thought it would be a great idea to copy it over LAN. (tldr: it's not)
First attempt:
Right click on file and share it with everyone = fail
Enable network discovery in sharing settings = still fail
Ohh, right, I just forgot it, disable firewall, it usually solves everything = still fail (2)
Google the problem and try every possible solution = still fking fail
Second attempt:
Ok, when last time I had the same problem, I made a homegroup and it worked.
Let's enable it on my Win10 = it's missing
After some googling: "We removed the home group feature from Windows 10, because why not and we would be fired if the change log was empty."
Ok, fuck it.
Third attempt:
Download a portable FTP server.
Enable it.
Create an account.
It works.8 -
Why are there no good file managers for Linux?
Come to think of it, why are there no good file managers that aren't Windows Explorer?
All I want is a good breadcrumb bar (editable), customizability, basic functions such as permanent delete, open folder with, etc, and built in zip reading. Is that too much to ask?
Currently I use the elementary OS one (works a bit better than the default nautilus) but it lacks a ton of basic functionality and there's pretty much no customization.
Please someone make a usable file manager for Linux. Ugh18 -
Angular 2+, it's just so elaborate, and over the top complicated. On larger projects it easily becomes a mess. I started a new job where I inherited a angular 2+ project, that is terribly made, it's so frustrating. I now use Vue.js 2, and it's just so beautiful, especially single file components :D1
-
Malwares are nasty applications, that can spy on you, use your computer as an attacker or encrypt your files and hold them on ransom.
The reason that malware exists, is because how the file system works. On Windows, everything can access everything. Of course, there are security measures, like needing administrator permissions to edit/delete a file, but they are exploitable.
If the malware is not using an exploit, nothing is there to stop a user from unknowingly clicking the yes button, when an application requests admin rights.
If we want to stop viruses, in the first place, we need to create a new file-sharing system.
Imagine, that every app has a partition, and only that app can access it.
Currently, when you download a Word document, you would go ahead, start up Word, go into the Downloads folder and open the file.
In the new file-sharing system, you would need to click "Send file to Word" in your browser, and the browser would create a copy of the file in a transfer-partition. Then, it would signal to Word, saying "Hey! Here's a file that I sent to you, copy it to your partition please!". After that, Word just copies the file to its own partition, signals "Ok! I'm done!", and then the browser deletes the file from the shared partition.
A little change in the interface, but a huge change in security.
The permission system would be a better UAC. The best way I can describe it is when you install an app on Android. It shows what permission the app wants, and you could choose to install it, or not to.
Replace "install" with "grant" and that's what I imagined.
Of course, there would be blacklisted permissions, that only kernel-level processes have access to, like accessing all of the partitions, modifying applications, etc.
What do you think?7 -
Why does Visual Studio feel so special that if I add a file using File Explorer instead of through Visual Studio, it doesn't detect the file? Why does Visual Studio feel it's more important than the operating system itself?6
-
Error. File not found: C:\somedirectory\file.txt
*opens C:\somedirectory\ * *looks at file.txt*
*runs program again*
Error. File not found: C:\somedirectory\file.txt
*changes directory it is looking in, copies file to new directory*
Error. File blank: D:\somedirectory\file.txt
*cry... no it isn't*
I just need to deploy this contractors code... supposedly it ran on another system, but the endless Spring configs hate me... :(9 -
Ugh... some people...
Just left the office early because of the toxic climate. That one infamous collegue is basically unable to communicate without being a narcissistic 5-year-old and was arguing whether we should write a test (I was going to write the test) that would need a single additional branch in the build system.
(The test was for a parser and it should test whether it can handle absolute paths. A simple regression test with a file and an expected output. Because absolute paths are different for every platform and user, the files to be parsed would have to be generated with appropriate paths before the tests were run. Well that would require one single python script and a single line in the script that runs the script and DONE)
Well that guy was unable to focus on his own work and started an argument about whether that test was necessary.
Even though I still think it is necessary, it might have been a reasonable argument if he would have acted more agreeable. But he was saying the feature was useless anyways "everyone will use relative paths only anyways" and "because noone here cares a ratass about maintaining the tests it will all fall on me again" ..
Wtf was this guys problem, I (CAPS) was going to write the stupid test and since when do we not write tests in order to better maintain our product? I get that he worries that the test environment will get more messy, but thats better than having the product code go messy or unfunctional! And c'mon guys, how are absolute paths a redundant feature... -
Hi,
I have created my own C# application that burns .hex file in atmega8 microcontroller using avrdude.
Or users can burn .hex file by using avrdude alone.
Is there any way I can stop this. I mean that user cannot burn hex file without my application.7 -
Sharing a first look at a prototype Web Components library I am working on for "fun"
TL;DR left side is pivot (grouped) table, right side is declarative code for it (Everything except the custom formatting is done declaratively, but has the option to be imperative as well).
====
TL;DR (Too long, did read):
I'm challenging myself to be creative with the cool new things that browsers offer us. Lani so far has a focus on extreme extensibility, abstraction from dependencies, and optional declarative style.
It's also going to be a micro CSS framework, but that's taking the back-seat.
I wanted to highlight my design here with this table, and the code that is written to produce this result.
First, you can see that the <lani-table> element is reading template, data, and layout information from its child elements. Besides the custom highlighting code (Yellow background in the "Tags" column, and green gradient in the "Score" column), everything can be done without opening even a single script tag.
The <lani-data-source> element is rather special. It's an abstraction of any data source, and you, as a developer can add custom data sources and hook up the handlers to your whim (the element itself uses the "type" attribute to choose a handler. In this case, the handler is "download" which simply sends a fetch request to the server once and downloads the result to memory).
Templates are stored in an html file, not string literals (Which I think really fucks the code) and loaded async, then cached into an object (so that the network tab doesn't get crowded, even if we can count on the HTTP cache). This also has the benefit of allowing me to parse the HTML templates once and then caching the parsed result in memory, so templates are never re-parsed from string no matter how many custom elements are created.
Everything is "compiled" into a single, minified .js file that you include on your page.
I know it's nothing extraordinary, but for something that doesn't need to be compiled, transpiled, packaged, shipped, and kissed goodnight, I think it's a really nice design and I hope to continue work on it and improve it over time1 -
Is Google trying to win a "who can create the shittiest file picker" award?
The file picker of Android OS can not even remember the last selected sorting options, and its default sorting is alphabetical. Does anyone really use alphabetical sorting? Sorting by the last modified time or by size is far more useful than alphabetical sorting can ever hope being.
The only use for alphabetical sorting is sorting files with incorrect time stamp attribute but a correct time stamp or number in the file name.
The file picker of Android OS also features pull-to-refresh. As already said, pull-to-refresh is not a helpful shortcut but a useless anti-feature. ( https://devrant.com/rants/9831669/... ) Why would anyone need to refresh in a file picker? How likely is a file to not exist before opening the file picker and then appear while browsing for the file? All pull-to-refresh does here is draining the phone battery by reloading the thumbnails.
The file search feature of the Google file picker can only search the entire storage. A search can not be limited to the currently viewed directory. Even the file picker of Windows Vista from 2007 could search only the viewed directory.
Obviously, it lacks any kind of range selection. No A-to-B selection that is like shift-click selection on desktop, and not even the inferior drag-to-select that Samsung has implemented, which would still be better than annoying individual selection.
Microsoft could build a better file picker at a time some of us were in primary school than Google can build today. Come on, Google, just scrap your garbage software and go copycat Microsoft. Useful plagiarized software is better than useless self-made garbage.
At least the Google file picker does one thing right: It remembers the last directory the user picked a file from and opens it next time.8 -
well that's curious... Apparently, when uploading a csv file via bot, Slack now appends a .py suffix to it.
I wonder what's the logic behind it. Trick as many users as possible into executing potentially malicious code?21 -
Hell is working on a file 4000 lines long file containing html css php and sql with inconsistent coding conventions2
-
My coworker (who didn't study cs but has been with the company for 2 years now) was given the task to write a script that uses a csv file as input. The file name? "csv.properties"
Everyone still calls it a csv file and I'm the only one who cringes.1 -
I just created a new file in Android Studio called Auth.js and then wondered why I have a folder Auth with a file js.java inside.
Sometimes I forget what framework I'm in. -
Tried really hard to get the external css file working and after an hour found that I had not specified href in the main html file.
fml -
Come into work after a 3-day weekend, see a file isn't saved, think it's probably just a random space or something I accidentally added after modifying the crap out of the file and saved for the weekend so I compare the file from the disk to the file in memory. Turns out, I didn't save a single time since I started working on it.
I guess Friday me likes to live dangerously.4 -
YAML: "The error appears to have been in [file] : line 47, column 7, but may be elsewhere in the file depending on the exact syntax problem." Shoot me.1
-
Why the fuck would you want to use a .tt on a web.config file?!
What about they keys you don't want to be mandatory? And you want to set some defaults for them if they're not present in the web.config file?!
I mean WTF?! Am I missing something here?!
Or is it really just that you wanted to be cool and have a file that writes some more code in another file in your project?!
Fuck!!1 -
I remember on my first project which was Angular 1.* there was a file in the frontends repo called ShimOfShame.
The first few lines of that file was a comment apologising for its existence.
"My soul cries everytime i add a line to this file"5 -
So I decided to download OS X iso from a third party website as I don't have a mac. After downloading I couldn't extract the iso file as it showed the zip file was corrupted.
From the comment I found out that the zip file can be only extracted in a mac :/
How is that even possible :/3 -
When file managers copy and delete files within the same partition instead of moving or renaming them…
When Google's Storage Access Framework was introduced, it did not feature a move command, so file managers just resorted to copying and deleting files within the same storage. Not only does this cause needless wear and is much slower, but it also destroys the date/time attribute (it gets changed to current).
When moving files through MTP (miserable transfer protocol, used for connecting smartphones to PC), they are also copy-deleted. This makes moving a 20-Gigabyte DCIM folder impractical. Also, if one cancels the operation, it might end up whoopsie-daisy deleting some files from the source before they have been transferred.
MTP is so bogus that it is incapable of a simple operation that would JustWork™ on mass storage devices. Not to mention, MTP lacks parallelism and its directory listing loading it S-L-O-W. Upwards of a minute for just 1000 files. Sometimes, it fails loading at all.
Also, trying to rename a file through MTP using the terminal through GVFS, even if just within the same folder, it copy-deletes it. If I want to rename a 1 GB 2160p 4K video in a highly populated DCIM folder, I can not do so through the terminal. At least, the 4K video has a time stamp in its internal metadata, but it still renames slowly and adds needless wear to the smartphone's flash memory.14 -
When someone specifies file path of file as below
File fileToRead=new File("C:\Users\You\Desktop\testfiles.Zip\test.txt");
Compiler be like1 -
I uninstalled ES File explorer couple months ago when reports emerged of them misusing data. Was unable to find other explorer until I came across Solid Explorer.
Amazing app. Had to pay something around 0.5$ or so but it's totally worth it.
Feature packed with uncluttered UI. Many themes to choose from. Really awesome. Hats off to devs
https://play.google.com/store/apps/...11 -
Professional Home File Server Setup.
Using an old laptop and drive I made this. But I had nowhere to store. I have to use Team Viewer to even access it now for maintenance. -
Why did Microsoft lock down TTF files?
https://support.microsoft.com/en-us...
None of their links work anymore.4 -
Patching a legacy project: all logic inside an 8000-line file called class.cms.php, on frontend, one js file with about the same file size...
-
Python file truncate instead of actually deleting file contents...
there goes a weekend of log backups.. FML -
Moving files is emotionally easier than copying and deleting files, and moving eliminates the risk of selecting the wrong files at the deletion part.
I have read that it is safer to manually copy and manually delete files rather than to move it, but copying and deleting has a hidden risk that was not mentioned: selecting the wrong files for deletion.
Moving files feels like moving an obstacle from one room to another. The deletion part of copying and deleting feels like destroying something, which is an added emotional barrier.
Technically, copying and deleting is safer, since there is no risk of source files being deleted without having been transferred as a result of a device disconnecting or the buggy media transfer protocol (MTP) failing to load the entire file list. However, on mass storage devices, this pretty much never happened to me, and on MTP, data loss can be avoided by not moving folders but opening the source folders and selecting all files and moving those out. This prevents a parent folder with incompletely loaded file listing from being deleted.
However, something that is not considered about copying and deleting is that the risk of selecting the wrong files in the deletion step exists. One might end up selecting files that were never copied.
Not only is moving straightforward and time-saving, but it has no emotional barrier and the risk of selecting the wrong files to delete from the source is eliminated, since a proper file manager like Nemo or Windows Explorer (mass storage only, not MTP) only deletes a moved file from the source after it has been properly transferred. The user does not need to pay attention to select the correct files to delete, since the file manager already did it.4 -
The other day I fucked up. I coded a safety measure that saves a file on crash, to keep data safe.
I added two lines of code before loading the file, and they crashed. There goes all my data.
(At least got to fix that bug) -
Both the FAT32 and ISO9660 file systems have a 4 GB file size limitation due to storing file sizes as a 32-bit integer. However, the developers of ISO9660 had an idea that the geniusheads at Microsoft failed to think of.
ISO 9660, the first widely used file system on optical discs, bypasses its own 4 GB file size limit by supporting multiple entries for the same file! So a 12 GB file can be represented as three entries for the same file name.
This is what future-proofing looks like.
If only Microsoft had had (sic.) this idea for FAT32 (and FAT16).2 -
Devrant got my hopes up when I got on and saw the fancy new website.
Of course, the webapp is the same old interface :(
new site looks great though!!3 -
So, our Sales Manager asked us, "what is maximum file size for jpeg banner ad?"
I said, "maximum at 100KB per file"
She asked another question, "what is minimum file size?"
I said, "err... 0 bytes"1 -
*npm run dev*
Why aren't my CSS changes showing up?
*make selector changes*
*npm run dev*
Oh, c'mon!
*make more specific selector changes*
*npm run dev*
It's not even showing up-- wait...
*checks code*
*SASS file not included in the main app.scss*
Oh. I'm stupid.1 -
The Amazon MWS API is so utterly shite! Offers error messages sometimes then others tells you to upload your file to their file checker. Their file checker doesn’t accept XML so why say that?
Who on earth develops and documents their shit APIs?
Fuck you Amazon -
I write a lot of custom code for a program my company sells and there is no good way to run tests on it. I just spent a bunch of time wondering why the change I made didn't work only to find I accidentally clicked paste shortcut instead of paste when copying the file. I really need to take some time to write a program to copy all my code for me instead of relying on a manual process. I guess a new night and weekend project.
-
Once again, I'm late to the party, wondering how in the world I never heard of ranger before yesterday. For me, it's an absolute game changer. It beats mc, the previous only console-based file manager I've seen, handily in terms of features, flexibility, aesthetics, and ease of use.
This will easily replace finder at work, and pcmanfm at home. It's in every major repo, including debian, redhat, arch, gentoo, and suse variants, and is available through homebrew too.2 -
!rant
Struggled for 2 hours now. How the heck can a create a directory on android. My code:
File dir = new File(Environment.getExternalStorageDirectory(), "Directory");
dir.mkdirs();5 -
I have, once again, figured out why I keep dropping C as a language. The answer is because the errors are incredibly unhelpful and actively want to implode your brain.
Examples currently being spat out by gcc for my driver:
`error: conflicting types for ‘block_read’; have ‘ssize_t(struct file *, char *, size_t, loff_t *)’ {aka ‘int(struct file *, char *, unsigned int, long long int *)’}`
`note: previous declaration of ‘block_read’ with type ‘ssize_t(struct file *, char *, size_t, loff_t *)’ {aka ‘int(struct file *, char *, unsigned int, long long int *)’}`
`error: initialization of ‘ssize_t (*)(struct file *, char *, size_t, loff_t *)’ {aka ‘int (*)(struct file *, char *, unsigned int, long long int *)’} from incompatible pointer type ‘ssize_t (*)(struct file *, char *, size_t, loff_t *)’ {aka ‘int (*)(struct file *, char *, unsigned int, long long int *)’}`
Go character by character for those types as listed, and tell me where they differ, because I can't find it.10 -
That feeling you have when you opened a file full of messy shit code and somewhere in there is a reference to another - more "shittier" - file.
-
WordPress File Delete to Code Execution
The vulnerability was reported 7 months ago to the WordPress security team but still remains unpatched.
https://blog.ripstech.com/2018/...1 -
A file that I had copied from the company network drive into my own. VS Code to edit the content according to a tutorial provided. IDE doesn't work with the given file, dependencies not resolvable, so let's troubleshoot. Open the file in question inside the IDE, the file contents are those from the tutorial?? Turns out I didn't edit the file on my own system but on the network drive. At least it wasn't a critical file. 🤦
-
2005 called. It wants its numbered file names back.
While I am mostly satisfied with "celluloid" as a worthy successor to xplayer, the first major disappointment I stumbled upon is `celluloid-shot0001.jpg`. Are we in 2005?
Just like xplayer, Celluloid, the new default media player of Linux Mint, should use proper, i.e. time-stamped names such as `celluloid-2023-04-10T00-47-42.jpg` or `celluloid-video_file_name-2023-04-10T00-47-42.jpg` for screenshots taken from videos, to eliminate the possibility of file name conflicts if files are moved into other directories, to make screenshots searchable by video file name, and to retain the date and time information if the files are moved to a device that does not support date and time stamp retention such as MTP (Media Transfer Protocol), and to allow for date range selection using wildcards in the terminal (e.g. `celluloid-2023-04*` for all screenshots from April 2023). Besides, PNG screenshots should be supported too, but that's out of scope here.
As a reference, the gnome and mate screenshot tools also pre-fill time stamps into the file name field.
Numbered file names were useful in an era when there was no VFAT and file names needed to have 8.3 file names that could impossibly fit a date and a time, and compact cameras used such names, but those times are long over. Just like the useless and annoying pull-to-refresh gesture on mobile apps and the Media Transfer Protocol, numbered file names belong to the technological graveyard.
If numbers are really desirable, at least `celluloid-shot0001.2023-04-10T00-47-42.jpg` should be used, to include both a number and a date. The command to get this date format is `date +"%Y-%m-%dT%H-%M-%S"`. For compatibility across operating systems, dashes instead of colons have to be used to separate hours and minutes and seconds.
Numbered file names are a thing of the past. Use time stamps.2 -
if you were looking at one of my project's source code, you could easily guess what's the first file created: that's the only file with absolutely 0 comments in it.
-
i once explored our codebase and copied every line of commented out code into a text file. that file is over 350 lines long.1
-
Longest java file name I've seen
OSFIListOfEntitiesRegulationsImplementingTheUNResolutionOnTheDemocraticPeoplesRepublicOfKorea.java3 -
I remember I couple years back in school nobody in my class was really tech-savvy except me and friend... Midway through class the teacher was saving a PowerPoint presentation. But when she was editing the name she started to edit the file extension not know what .pptx meant... The look of dismay me and my friend shared as she did this is one of my greatest memories of school.3
-
p r i n t e r s
I was about to print a bigass document. Wanted to save paper, and saw my printer had a two side mode. I try it out. A few pages print, then the driver says PAUSED - RELOAD PAPER. This is normal, as double sided printing is not automatic. Underneath, there is a message:
[Printing - Manual Duplex: Please reinsert pap...]
I try to resize the window to read the message.
THE MOTHERFUCKING WINDOW WAS NOT RESIZEABLE!!!
are these products not fucking tested???
I find a guide saying the paper should be reinserted with no flips, then the "continue" button should be pressed.
The button was not in the driver UI, or on the printer. Further research showed that you are supposed to:
OPEN THE TONER CHANGE DOOR AND CLOSE IT AGAIN TO CONTINUE A PRINT
what fuCKING designer thought this shit through!?#@?#$!
printers
fuckem1 -
Any file manager without range selection is basically crippled.
Desktop PC file managers had the ability to select many files at once since at least the 1990s, yet smartphone file managers typically still lack it as of 2022. This means if I want to select a range of files, I have to tap each file individually. That's OK for - like - 20 files, but not for 1100 files. I'd need more time to select those files than the transfer would take, and if I accidentally hit anything that closes the app, I can start all over again. <sarcasm>That is how I wish to spend my day.</sarcasm>
In the early 2010s, ES File Explorer brought a dragless range selection feature, where only the first and last item had to be highlighted and a button pressed. This means over 5000 items could be selected in 10 seconds: tap item A, drag the scroll bar, tap item B, tap range selection icon, then done! But then Google came and said "sorry, you can't have nice things" (not vocally but through actions), and forcibly disabled write access to the microSD card to third-party applications. The only way to evade this restriction was through rooting.
Then, Google "blessed" us with storage access framework and then iOS-like scoped storage "to protect us". https://xda-developers.com/android-... . Oh, thank you for your protection by taking freedoms away!
The pre-installed file manager of Android still lacks range selection THIRTY YEARS after desktop computers came pre-installed with this feature. Shame on you, Google. This isn't innovative.
If Google will implement range selection, I guess they will make it half-assed by implementing drag-to-select, which is hardly more useful than individual tap selection for thousands of files. Then they tell us "you wanted range selection, here you are! Now don't bug us.". Sorry, but users don't want half-assed drag-to-select, but real tap-A-B-selection and a draggable scroll bar.
Some mobile file managers even lack a draggable scroll bar, meaning if I want to go near the center of the list, I have to swipe up like a dog or cat licks water from a bowl.8 -
I might sound stupid, but why don't solo-developers use things like dropbox for active file history that keeps track of every change and also gives diff options and up to 1 year log - instead of git?
Don't get me wrong, git is amazing when you have to work with a team or multiple people in general, but it's simply a pain in the ass when working alone and having to keep track of every state yourself.6 -
I remember the day I used Linux to enforce size quotas on user directories oh what a day
I was surrounded by horrible monsters wearing manho suits that made them appear superficially human... though the sounds screeching forth from their many toothed mouths in whining jarring tones would suggest otherwise and I used this wonderful feature : you can call most of the file systems commands on files !
did a dd to create a disk image specified to the correct size made an fs inside and mounted it straight into the home directory adding entries to the fstab to auto mount and setting the io permissions
It was so wonderful and the little bastards refused to use the server !5 -
Sometimes I wonder why Skype developers think it is okay to download files to a specific directory without an option to select a location at the point of download. Or is this yet another premium feature?5
-
Hi there, i'm new to AWS. i've running my python code in Lambda. Basically it's calling an http-request and processing the responding JSON to a CSV file. Now, what is the easiest way to transfer that CSV file to a 3rd party FTP Server?7
-
How hard can it be to reference a file on a mounted windows network drive with UNC path to the java command? Seems like everyone uses the same env variable but always different syntax. Sometimes it's
-Dsmth=file://\\net.work.path\sub.xml, then it's -Dsmth=file:///\\net.work.path\\sub.xml, then
-Dsmth="file:///\\\\net...xml"
and none of them work?! 😤4 -
I'm trying to waste time reading rants, but don't get half of them because our work wifi network is too slow to load pictures
fml1 -
Nothing like trying to understand a single 1500-line source file that implements the API usage in the frontend. Without a single comment.
No, wait. There are comments! But it's only commented-out code. Or explicit shit (like "gets the version" before a getAssetVersion function).
Functions with unused parameters? ✅
Weird var names (like "tmpX")? ✅
`console.log(var)` everywhere? ✅
Long-ass lines with 150+ chars? ✅
Duplicate code? ✅✅
Not a single interface was used so everything is var: any? ✅
Random unreadable RegEx? ✅
If-chains of 6+ more levels? ✅
Many `else if` towers instead of a switch? ✅
And did I mention it was written by a fucker who can't speak proper English so shit like visiable, cataloge and isExist is everywhere? Yeah.
Fun day at the office reading spaghetti code 🙃 -
Debug a VBA macro that generates a json file for more than an hour. It always fail, but why? Print json file block by block, debug line by line, all validates. I just discovered that perforce bloqued the output file. Can I go home now please?1
-
Uploading an xslx file to office365 to download it as an ods file only to be able to convert it to a csv file via libre office.
Direct conversion attempts with other tools would either fail converting the xslx file or break cells' values (ssconvert, soffice --headless -c, gnumeric).
One of those things where I fail to understand why it has to be so complicated.4 -
Be me
>run kubeadm join phase control-plane-prepare
>get error: {Large Error} {Missing conf file...}
Please use 'kubeadm join phase control-plane-prepare' to generate {conf file}
>mfw
I called you to generate that file. Could you please do your job -
Here I am wondering why I can't click the image then I realize I forgot to tell the html file where the JS file is.....1
-
Does any one know how Containers (?) like Zip or exe files work? I mean when you open it with a texteditor you can't see much?!15
-
Is there any program that can be used to cut out parts of a video file without re-encoding.
The way I'm thinking is if you already have a video file, you should be able to just copy the data from 1 file to another like a file splitter.3 -
Where do I keep a custom config file?!!!
I have a script in /etc/init.d that runs a program that takes a file as an argument, but I shouldn't keep that file in a user's home directory. Where should it be?6 -
2 hours of pain today, just because I forgot that inside the container 127.0.0.1 is not equal to my host IP !! Grrr
-
Is it possible to continue file upload for android default browser without the browser being open?
I’ve been tasked by a company to make it so video and photo files can continue being uploaded from an app even when that app is closed. Slight issue is that the app is just a web viewer that goes to a web app.
I know this is convoluted but would the only way to do that be to overlay an actual upload button over the web view so that I can use androids built in service to do that and make a whole new way for the file to be uploaded to the server?
Surely there must be an easier way.14 -
Compiling a project (Not BIG but still pretty big)
C# compiler : YOLO, you have 12 Cores ? I'll use 12 cores. BAM : 3 seconds, compiled !
SASS compiler :
Rolf, I'm gonna take file by file, recompile all dependant files to produce a single file. 2 Seconds per file. X 150 files.... 6 Minutes SASS is still running....2 -
Why is deployment such an opaque topic most of the time????
I have an index.js file to create a server in plain node.js and a package.json file. It builds and deploys successfully to Heroku master. But app does not work. I assume I need to add something to json file but what???5 -
VS2015 big cpp - project...
Scroll in file, decide where you wanna write code. Set caret (70s delay).
Ctrl+tab to check previous file for name of something (120s delay)
ctrl+tab to return to file (120s delay)
le me = Jsjsjdhdhxhxuxbfvfvefbd!!!!!
FU Microsoft :(2 -
I have a .json file in Github(public) i would like to write into the json file , How should I do it ?33
-
Part 2 of the .zip file saga. Staff member this morning emails me to say they can't get past the following step of my instructions.
*Screenshot showing them downloading the .zip file and not saving it anywhere, instead trying to open it*
... really starting to think that everyone in this place needs training in basic ICT tasks again. I was taught how to open and extract files from .zip when I was aged 11 in school.1 -
For the love of god developers/programmers, don’t put version numbers to your softwares file paths!
It’s the worst when you have to configure permissions and rules, then the folder path changes in every update!2 -
I guess I'll just trouble shoot this controller for an hour or so before I check the file-tree and find out that I'm editing a stale file of the same name in the root instead of the nested file...
-
"U wanna create new module? Just copy paste this file and several file, then rename it to your new module", but that each of that file is contain thousand LOC, then i realize all of module created use the same way.
-
When you try to do something good with flask and python but Mozilla doesn't want to load the media file.
-
It's 2023 and smartphone vendors' pre-installed file managers are slooooooowly beginning to catch up with the functionality that the third-party ES File Explorer already had in 2012.
Samsung's latest file manager "My Files" finally has a draggable scroll bar, background file transfer (one can browse files while a transfer is running), drag-to-select (which is still not nearly as fast as the instant A-to-B range selection of ES File Explorer which simulates shift+click selection on desktop), and even staying in the current directory after tapping on "Copy" or "Move" rather than going to the starting directory!
And finally, when copying or moving files to a MicroSD card or a USB-OTG device, files' date and time attributes are not discarded and reset to now, but the original date and time of the files are retained! ES File Explorer could do that with root access.
Dear Samsung, couldn't you have thought of these simple things a decade ago and saved your users lots of headaches?4 -
it feels a bit wierd to open a word file that processes an access-filtered excel file to optionally generate an outlook mail.5
-
Just helped a colleague. She wanted a list of all files in all subdirectories of a folder. Easy enough, fired up powershell, ls'd everything into a text file in ~\Desktop, jobs done.
About 5 minutes later, she messaged me, telling me she closed the file without saving. So I went over. The file wasn't on her desktop. Quickly recreated the file - again into ~\Desktop but powershell found the file there.
"nah, doesn't matter I'll just overwrite it and be done with it." I thought.
So I did that, and the bloody file still didn't show up.
I had a look at where ~\Desktop is. It's on partition H:. WHO THE FUCK HAD THE BRILLIANT IDEA TO SET H: AS THE HOME DIRECTORY?!2 -
Open file with Atom on remote server via FTP.
Edit at will, hit save and BOOM. Now you have an empty file. -
I have a question regarding file redirects 2>&1 and 1>&2. I know that file descriptor 1 is std o/p and 2 is std error and that we're redirecting one file descriptor to another.
But why do we do it? What are their use cases? Wouldn't the file to which redirection is setup get too clunky?
Analysis of the file would also become a bit difficult. And wouldn't having errors stored in a separate file make it easier to interpret and fix them?8 -
Made a syntax error in my sudoers file and somehow deleted the .tmp file so I don't have permission to change my sudoers file.3
-
Anybody know of a visual studio extension where you can link a file + line number to another file + line number, all inline in the code so that as the file changes the links still work, so that you can easily jump around the codebase. One example would be linking an html element to a less class so that you dont have to open the less file, then look for the class or ctrl+f or whatever.1
-
Big innovation:
In a manual I changed a paragraph from "add registry values X & Y" to "click the .reg file in network folder Y"
Received big thanks about thinking of reg-files.
uhm... We are an IT company? -
Can someone recommend me a file manager for Windows, that supports:
- tabs
- context menus
- dark theme8 -
Some mobile file managers kick me back to the beginning after selecting items for copying or moving.
When tapping on "copy" or "move" after selecting files/folders, some file managers like ES File Explorer (back when it was popular) conveniently remain in the current directory, whereas the stock Android file manager and many vendors' pre-installed file managers like that of Samsung kick me back to the initial directory. On phones with MicroSD, that's the storage selector, and on phones without, that's /storage/emulated/0/.
If I wanted to move files into a sub folder of the currently viewed directory, I have to navigate all the way back to that current directory, which is, needless to say, annoying.
Who thought it was a smart idea to kick the user back to the initial directory? But vendors' pre-installed file managers tend to be garbage anyway. Samsung's "My Files" file manager does not let me enter file names longer than 50 characters, does not let me change the extensions of files, does not support selecting files from search results or jumping to their parent directory, does obviously lack range selection, hides the status bar while opened (what's the point of that?!), its search feature is slow and sometimes crashes, and it can only search the entire device storage or memory card and not individual directories.
It's almost like Samsung deliberately tried to design a file manager as terrible as they possibly could.5 -
SSL cert problems
realize new pem file has a different name so now after going down a debug rabbit hole I'm updating the places that used the old file name with the new file name
i guess could've just changed the file name, but at this point im committed (might as well leave the file name alone so i can hope to be less confused next year if the new file's name changes again) and just hoping i can fix the fucking config
i just want shit to work2 -
so I have been trying to make migrations on centos 7 for a while now on my virtual env i keep getting this error
## Traceback (most recent call last):
File "manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/srv/switch/env/lib/python2.7/site-packages/django/core/management/__init__.py", line 364, in execute_from_command_line
utility.execute()
File "/srv/switch/env/lib/python2.7/site-packages/django/core/management/__init__.py", line 356, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/srv/switch/env/lib/python2.7/site-packages/django/core/management/base.py", line 283, in run_from_argv
self.execute(*args, **cmd_options)
File "/srv/switch/env/lib/python2.7/site-packages/django/core/management/base.py", line 327, in execute
self.check()
File "/srv/switch/env/lib/python2.7/site-packages/django/core/management/base.py", line 359, in check
include_deployment_checks=include_deployment_checks,
File "/srv/switch/env/lib/python2.7/site-packages/django/core/management/base.py", line 346, in _run_checks
return checks.run_checks(**kwargs)
File "/srv/switch/env/lib/python2.7/site-packages/django/core/checks/registry.py", line 81, in run_checks
new_errors = check(app_configs=app_configs)
File "/srv/switch/env/lib/python2.7/site-packages/django/core/checks/urls.py", line 16, in check_url_config
return check_resolver(resolver)
File "/srv/switch/env/lib/python2.7/site-packages/django/core/checks/urls.py", line 26, in check_resolver
return check_method()
File "/srv/switch/env/lib/python2.7/site-packages/django/urls/resolvers.py", line 254, in check
for pattern in self.url_patterns:
File "/srv/switch/env/lib/python2.7/site-packages/django/utils/functional.py", line 35, in __get__
res = instance.__dict__[self.name] = self.func(instance)
File "/srv/switch/env/lib/python2.7/site-packages/django/urls/resolvers.py", line 405, in url_patterns
patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
File "/srv/switch/env/lib/python2.7/site-packages/django/utils/functional.py", line 35, in __get__
res = instance.__dict__[self.name] = self.func(instance)
File "/srv/switch/env/lib/python2.7/site-packages/django/urls/resolvers.py", line 398, in urlconf_module
return import_module(self.urlconf_name)
File "/usr/lib64/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
File "/srv/switch/app/switch/urls.py", line 10, in <module>
url(r'^administration/', include('primary.core.administration.urls')),
File "/srv/switch/env/lib/python2.7/site-packages/django/conf/urls/__init__.py", line 50, in include
urlconf_module = import_module(urlconf_module)
File "/usr/lib64/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
File "/srv/switch/app/primary/core/administration/urls.py", line 2, in <module>
from primary.core.administration.views import *
File "/srv/switch/app/primary/core/administration/views.py", line 5, in <module>
from primary.core.api.views import *
File "/srv/switch/app/primary/core/api/views.py", line 8, in <module>
from primary.core.bridge.views import *
File "/srv/switch/app/primary/core/bridge/views.py", line 11, in <module>
from primary.core.bridge.backend.loggers import Loggers
File "/srv/switch/app/primary/core/bridge/backend/loggers.py", line 2, in <module>
from primary.core.bridge.backend.wrappers import Wrappers
File "/srv/switch/app/primary/core/bridge/backend/wrappers.py", line 6, in <module>
import pytz, time, json, pycurl
ImportError: pycurl: libcurl link-time ssl backend (nss) is different from compile-time ssl backend (openssl)
even after uninstalling pycurl and exporting the pycurl variable to my environment can I get any help4 -
My first time developing a C# project with a friend. He decided it would be a good idea to put 15 classes into a single .cs file. Ever had a person do that to you?1
-
Does anyone know a good GUI-based file search program similar to "search everything" on windows? That program is fucking awesome! Web search has given me ANGRYSearch, which comes close but has some usability problems. Is there yet a better program I haven't discovered yet?3
-
Web application that you could read a file from UNIX. Problem, I'd you changed the URL, you could view any file, including any password file
-
Another great website error code fail (dumped its full error output to the website):
Traceback (most recent call last):
File "/usr/lib/python2.4/site-packages/trac/web/api.py", line 436, in send_error
data, 'text/html')
File "/usr/lib/python2.4/site-packages/trac/web/chrome.py", line 808, in render_template
template = self.load_template(filename, method=method)
File "/usr/lib/python2.4/site-packages/trac/web/chrome.py", line 768, in load_template
self.templates = TemplateLoader(
File "/usr/lib/python2.4/site-packages/trac/web/chrome.py", line 481, in get_all_templates_dirs
for provider in self.template_providers:
File "/usr/lib/python2.4/site-packages/trac/core.py", line 78, in extensions
return filter(None, [component.compmgr[cls] for cls in extensions])
File "/usr/lib/python2.4/site-packages/trac/core.py", line 213, in __getitem__
component = cls(self)
File "/usr/lib/python2.4/site-packages/trac/core.py", line 119, in maybe_init
init(self)
File "/usr/lib/python2.4/site-packages/authopenid/authopenid.py", line 157, in __init__
db = self.env.get_db_cnx()
File "/usr/lib/python2.4/site-packages/trac/env.py", line 335, in get_db_cnx
return get_read_db(self)
File "/usr/lib/python2.4/site-packages/trac/db/api.py", line 90, in get_read_db
return _transaction_local.db or DatabaseManager(env).get_connection()
File "/usr/lib/python2.4/site-packages/trac/db/api.py", line 152, in get_connection
return self._cnx_pool.get_cnx(self.timeout or None)
File "/usr/lib/python2.4/site-packages/trac/db/pool.py", line 172, in get_cnx
return _backend.get_cnx(self._connector, self._kwargs, timeout)
File "/usr/lib/python2.4/site-packages/trac/db/pool.py", line 105, in get_cnx
cnx = connector.get_connection(**kwargs)
File "/usr/lib/python2.4/site-packages/trac/db/sqlite_backend.py", line 180, in get_connection
return SQLiteConnection(path, log, params)
File "/usr/lib/python2.4/site-packages/trac/db/sqlite_backend.py", line 255, in __init__
user=getuser(), path=path))
TracError: The user apache requires read _and_ write permissions to the database file /home/trac/morituri/db/trac.db and the directory it is located in. -
Can anybody guide me on how to create a web-based application that takes input as a file, and performs extraction of file, and show the content of file in tee structure using javascript?6
-
Is there a file manager which let me manage all my cloud drive , local drive , network drive in one place?3
-
Question. I ran my code and found one of my images rotation out of wack. I had to delete the img file and upload again and then reinsert the file path and ran again. No issues. Any reason why that happen especially since the file path was correct before5
-
You can make your software as good as you want, if its core functionality has one major flaw that cripples its usefulness, users will switch to an alternative.
For example, an imaginary file manager that is otherwise the best in the world becomes far less useful if it imposes an arbitrary fifty-character limit for naming files and folders.
If you developed a file manager better than ES File Explorer was in the golden age of smartphones (before Google excercised their so-called "iron grip" on Android OS by crippling storage access, presumably for some unknown economic incentive such as selling cloud storage, and before ES File Explorer became adware), and if your file manager had all the useful functionality like range selection and tabbed browsing and navigation history, but it limits file names to 50 characters even though the file system supports far longer names, the user will have to rely on a different application for the sole purpose of giving files longer names, since renaming, as a file action, is one of the few core features of a file management software.
Why do I mention a 50-character limit? The pre-installed "My Files" app by Samsung actually did once have a fifty-character limit for renaming files and folders. When entering a longer name, it would show the message "up to 50 characters available". My thought: "Yeah, thank you for being so damn useful (sarcasm). I already use you reluctantly because Google locked out superior third-party file managers likely for some stupid economic incentives, and now you make managing files even more of a headache than it already is, by imposing this pointless limitation on file names' length."
Some one at Samsung's developer department had a brain fart some day that it would be a smart idea to impose an arbitrary limit on file name lengths. It isn't.
The user needs to move files to a directory accessible to a superior third-party file manager just to give it a name longer than fifty characters. Even file management on desktop computers two decades ago was better than this crap!
All of this because Google apparently wants us to pay them instead of SanDisk or some other memory card vendor. This again shows that one only truly owns a device if one has root access. Then these crippling restrictions that were made "for security reasons" (which, in case it isn't clear, is an obvious pretext) can be defeated for selected apps.2 -
I am looking for a file manager to use.
I want to organize my stuff a bit better and I would like to use a file manager so browse through the folders. Important: it should be a cli file manager!
I also would like to use it to organize some photos. I thought about setting up some meta data database to find stuff more quickly later. Some cherry picks from the holidays to show people, or private documents etc.
Any ideas?
I am using ranger atm and I am somewhat happy, but the use of meta data is limited to the cwd only.8 -
i want to find the person who proposed to force mtp in android for file transfers, and bash them in the head with a plush android toy till they're knocked unconscious.
all i want is to make a file transfer between my phone and my computer, and rather than plugging my phone's usb, i find it easier to set up an ftp server over local network. and when that doesn't work, i might as well hexdump the file, and copy it char-by-char manually, than use mtp.6 -
how come an image or text file called a multimedia file? I think they are just media files. But a video is multimedia.
-
Like pull-to-refresh, auto-selecting the file name in "save as" dialogues is a design trend we are perpetuating without questioning its usefulness.
The "rename" feature of file managers and the file name fields in "Save as" dialogues and screenshot tools automatically select file names without the ending, expecting the user to want to replace it.
It would more sense to place the cursor between the file name and the ending ".png".
I can't remember the last time I replaced a file name. I almost always rename files to add a comment or time stamp at the end.
Adding a comment after the time stamp, for example, "Screenshot at 2024-02-04 12-04-37 progress bar.png", makes more sense than replacing the file name. A file name with a time stamp is more easily searched.7 -
I am thinking of how I can make data upload reliable. I am sure that I am making it more complex as it could be and I need some pointer.
My goal is to have a pause/resume feature in file uploading.
Here is how it would work.
In order to start uploading , you give the server
1) File Name
2) Folder path you want to upload it to
3) Checksum of the file
Here the server will check whether you can upload it to a folder, whether the file have been previously uploaded (by file name and checksum)
If you could actually upload to the folder , server will return "unique file token" , "folder path" , "unique byte token". Let call it init_upload().
The client will use "unique file token" (to identify the file) , folder path (to know where to upload it to) , "unique byte token" and byte[] (data which to actually upload). Let call this operation data_upload().
If the operation is actually complete , server will return new "unique byte token"
Internally it will actually work like this.Let say we want to upload "file.mp3", when the client call init_upload() it will create
file.mp3 and unique_byte_token.file.mp3.
When the client upload data first time , it will append data to unique_byte_token.file.mp3.
When the client upload data second time , it will check whether the "byte token" that client put is the same as previous "unique_byte_token". If it is same ,
1) we move the data from unique_byte_token.file.mp3 to file.mp3
2) Delete unique_byte_token.file.mp3
3) Create new unique_byte_token.file.mp3
4) Append data to unique_byte_token.file.mp3
The reason I am using "byte token" is because I want to check whether previous upload is actually success.
Let say we need to call 50 part of data_upload() will put 49 part to file.mp3 and 1 part to byte_token.file.mp3.
Finally the client need to call data_upload_complete() which will
1) Put reminding 1 part to file.mp3
2) Remove byte_token.file.mp3 as cleanup6 -
When you saved a file at the wrong directory, IMMEDIATELY REMOVE IT. I have continuously lost my work by opening a file previously saved in the wrong place, overwrote the new ones, only to realize that it is a file wrongly saved a few days ago.
Also, the hours I spent trying to debug something only to realize I've overwrote a file I saved at the wrong location...2 -
That frustrating moment when you create a source file with random name and later which becomes the final name coz changing the file name and linking it becomes so damn vauge.
-
When you do a search, find the file, start coding your tweaks and then find you're making the changes to the compiled version! GRRR3
-
Lesson learned, never use Vim's 'd' to move a large chunk of code from file to file. Need to move a large chunk of Rust code from one file to another, when I quit the session and edit the file needs to be pasted, the entire content, disappeared, divided into atoms.
Edit: I found that the 'd' command means 'delete command', so that may explain why. But still.2 -
Not sure if it counts but spent the day setting up a pxe boot server for a laptop I have since usb 2 is fucking slow than setting up this file server implementation thing for Git Pages so I could just downloaded an updated mirrorlist without need to add it manually. Just to find out I need to figure out why I have no internet argh!
-
Sort "insert file name here" | uniq -c outputs the same file in a bash script but in a command it works. Any ideas?6
-
The "recycle bin" feature of Samsung "My Files" is amazing for data loss prevention when moving files out of the smartphone.
There used to be two ways to move files out of the smartphone to make space free. One is direct moving, the other is copy-deletion. The first is self-explanatory, the second means first copying the files and then deleting them on the phone.
Thanks to the the recycle bin, which keeps data for a month, files on the phone can be copied out and then put into the recycle bin instead of immediately deleted.
This means that if the copying was incomplete, there is a thirty-day grace period to get the files back from the phone.
The benefit of moving files instead of copy-deleting them is the lack of the deletion step. Moving files out directly does not have the emotional barrier of deleting the files from source like the deletion step of copy-deleting does.
Moving files feels like moving items to a new room, where as the deletion step after copying feels like destroying something.
So why not move files out? Because there is a risk of data loss if the device disconnects while files are moved to an USB OTG device. Due to write buffering, files that are moved out might be deleted on the phone shortly before they are completely written on the USB-OTG.
This is not an issue with MTP (Windows or Linux through USB cable) because the file systems are managed by the computer, so if the phone disconnects while files are moved out of the phone using MTP, the file system is kept intact by Windows or Linux.
Now, thanks to the recycle bin, there is no emotional barrier to deletion because the files on the phone are automatically deleted after 30 days in the absence of the user. The user can press the "delete" button without worries because of knowing "I can get it back until a month from now anyway". -
Internal: a program that takes files (or a zip/7z file with files in it) and loads them into a database/table in file created order per a json-based map file because flat file loading in SSIS is horrible.
Public: ChromeKiosk https://github.com/benjaminkwilliam... -
p4 add <new file>
cp <old file> <new file>
p4 delete <old file>
p4 submit
That how you tell someone “GO TO HELL!” in perforce commands.2 -
A controller action taking a string input and directly accessing the file system with it, returning the file.
-
Need to add a new derived class which inherit from class "lorum" that is in file "lorum.cpp". Other derived classes are inside the file "lorum.cpp"
Should I put the new derive class in file "lorum.cpp" or make a separate file for the new derived class?
Why do I need to ask this question...2 -
So when windows cannot open a png with its standard image viewer without a file system error and while running sfc/scannow a bsod appears, maybe this old tablet shouldn't be used anymore, which already runs slow as hell...1
-
What is your opinion on multiple classes per file?
and having the filename not the same as the class
names?15 -
Log() method blocking caller to
1) Enter a critical section
2) Open the log file
3) Move to the end of the file
4) Write the log
5) Close the log file
6) Exit the critical section
And this was already in production.1 -
Any good recommendations on how to gather user metrics/instrumentation and visualize data?
The program is a WPF application with not internet connection so logging to file and get file is probably the only solution.
I've played a little with Serilog to file and trying to import the log into elastic search and visualize data with Kibana. -
I am loading an ISO file as FileObject in java. How do I write apache.commons.
.vfs.FileObject to a file.. It says ISO is not a file? -
Fucking mql5 - code gives no errors, it should create a file but it does not. Why is that?
https://pastebin.com/nUL47eMf
I have searched all my computer, there is no such file.9 -
I get why people like to split code in multiple files for maintainability but its a fucking nightmare if you want to understand code and you have to go from file to file to file to find the origin of 1 API-Call.1
-
Does anybody knows a command line tool that convert C file (sample.c) to hex file (sample.hex).
I don't need any GUI tool only command line tool.9 -
I want to learn about Linux file system. My searching led me here => https://refspecs.linuxfoundation.org/...
Is this a good place to start with file system?
P.S. I barely know Linux apart from basic commands.3 -
is there any way that the nemo file explorer on linux mint cinnamon is able to highlight the specific file when for example i downloaded a file with a browser and then want to view the file in the file explorer, so the browser redirects to nemo? how is it that I don't find this feature for nemo? doesn't it exist or am i too dumb googling this problem correctly? this feature is very helpful on windows, so what about it on other file managers?10
-
Is this a legit company?
http://www.gleamtech.com/
I'm looking into the file manager and it looks incredible, but after looking around on the internet, I cannot find any good reviews or something that motivates me to buy it. It seems like scam or something.8 -
Working on a Django API where I have to send a request to a PHP file to upload a XML file. Here is what I wrote:
url = 'url.to.php.file'
files = {
name: ('filename', xml_file.xml)
}
response = requests.post(url, files=files)
I am getting Internal server error. Do not know what I did wrong. Am stuck on this for like 3 days and have tried EVERY alternative POSSIBLE. HELP ME
*cries in corner*2 -
My day:
-continue working on a project which i haven't -committed for 3 days
-add 20 lines of code
-mistakenly deleted the route file
-restore the file (thinking I'm saved)
-open the file
-50+ lines of code gone2 -
When downloading 'animate.css', is it wrong to copy the raw file and paste into a file named 'animate.css' and link it in html file? Why doesn't it work??!!4
-
I see some of web framework use .env to store configuration file (eg Laravel, CI). Is there any benefits to store configuration file on .env file? Is it consider a good practice?5
-
Does anyone know if I can take a CSS file and put it into brackets without loading an external file/dropbox19