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 - "truncate"
-
I had just started my new job and deleted 3 years of data that the client had spent over £450,000 collecting 😱
another developer used my PC to quickly access the clients database while I was out the room as I had sql management studio open. I went back to my PC thinking I was connected to my local database, did a few truncate tables to test my software and :0 minutes later I get a call asking why there was no data on the server!
Thank god for backups 😓7 -
How do people just go about deleting databases when they don't mean to?
"Ah, a database!"
*Flaps hands at the keyboard until something happens*
"Oops, I deleted the database :/"
(*Posts a rant about accidentally deleting the database on devRant*)
🤔6 -
In a world of password managers that can generate complex passwords of any length, please for the love of God include why my chosen password was rejected.
Don't decide to truncate the password without informing the user because, and this is key, they won't be able to use your service.
Looking at you GoDaddy.4 -
So, I just created an account on a premium objective information website. It basically sells access to several articles on laws and general "financial relevant subjects". It is important for my work and they have pretty strict password requirements, with minimum: 18 characters length, 2 HC, 2 LC, 2 special, 2 numbers.
Without thinking twice, openned Keepass and generated a 64 length password, used it, saved it. All's good. They then unlocked my access and... wrong password. I try again... wrong password.
Thinking to myself: "No, it can't be that, maybe I only copied a portion of the password or something, let me check on CopyQ to see what password I actually used."
Nope, the password is indeed correct.
Copy the first 32 characters of the password, try it... it works...
yeah, they limit password length to 32 characters and do not mention it anywhere ... and allow you to use whatever length you want... "Just truncate it, its fine"1 -
Yep, today was a Monday. Had a request to truncate some tables. Set up a script to disable constraints, truncate, and re-enable constraint. It ran flawlessly. Too bad I ran against the wrong schema, though. Ran it against a dev schema instead of the requested itest schema, because the dev schema was stuck in my head. Well, I guess I tested it in dev. Against some developers schema. But, hey, it worked flawlessly. Because, you know, when you are pointing at the wrong place, it will always work. Every time.3
-
Conversations with SQL Server:
Me: TRUNCATE TABLE users;
SQLServer: Okie dokie, Command(s) completed successfully
Me: WTF SQL, u didn't even ask for confirmation
SQLServer: Well, you did type 'TRUNCATE' then 'TABLE' then 'users' didn't you. I mean how much confirmation do you need you prick.2 -
A facebook cover photo inspired by this rant: https://www.devrant.io/rants/375271
!rant
I used this font: http://marksimonson.com/fonts/view/...
and finally, I used this psd (gimp should be able to use it too): http://medialoot.com/item/...6 -
Rant/story
Ok, I've always respected my PM and took everything on me, but since a while I start getting bored at work and realised many wrong things with the company and management in general.
So, brief contextual situation for you guys, I used to be very shy, unconfident and submissive. That was 2 years ago. Now am much more confident and got my own techniques in managing my constant "in the moon"-mind and relational discussions with colleagues. No more stuttering and am now answering on the spot and focussed on the discussion.
So I was having a nice day extinguishing fires on our website, this evening my PM stressly-rushed into my office (which I share with 2 other colleagues), and pressured me into giving a phone call to some developer for a situation clarification: a Json endpoints seems to truncate text after some characters.
Just came back from the loo (not sorry for the details), had my thoughts about something else, as usual, and I was just like "chill, let me get my mind together and prepare myself to be on point for this phone call". Told her I need a few seconds and she was like "now now now" knowing me I'm a bit laid-back.
Grabbed the phone, saw she was laughing (always laughs whatever I do, I must be very funny) and went talking about me to my colleague (not backstabbing but like "I don't get why he needs to get prepped for a phone call"). I managed the phone call like a boss - like usual since I got more confident -, my pm left, I finished the call, went to her to tell her my conclusions on our issue, asked me if I checked the contract with our CMS company.
Told her nope, the Json is compatible with our DB-manager's API.
She coldly answered "right, will do it myself then", I was like ok, I know you won't do it, I'll get it done.
In 15 minutes I found the contract, notified her, analyzed it, and wrote a technical email to support.
Seriously, stop taking me for some retarded person and let me breathe
Huh.2 -
Because the husband doesn't get to finish his sentences after the first anniversary...stay classy Windows 102
-
My friend confused between truncate and append. He opened a file in w+ mode in python. So to solve the issue he called me at midnight disturbing my sleep. So now onwards before going to sleep I always put my phone on flight mode.1
-
It took AWS about a month to figure out why their load balancer was screwing up content length for requests from our site. Multiple times the ticket was closed due to inactivity because they took so long to investigate. Turns out there's a bug with how AWS load balancers scale, and when they are below a certain traffic threshold they truncate extremely long content. Their solution was to edit the balancer behind the scenes to always be scaled up, and then tell us to never delete it.
So then every time we needed to set up a staging environment we had to contact support so they'd edit the balancer. Which always took ages since most of the support agents didn't understand the convoluted issue and had to forward it on to more technically inclined staff, who then had to investigate fresh every time.
This was ridiculously annoying, so I spent months writing an automated solution to spin up staging new environments on the spot, this made use of a haproxy server which had to edit rules on the fly so that the AWS balancer could be circumnavigated. It was a better system then the old way anyway, but all the same an irritating issue to be forced to deal with.
All around a very shitty experience. This was a few years ago now and I'm not employed there any more, but I hope AWS fixed this since then.11 -
Salesforce Lightning Component
I am creating a salesforce lightning component to list the leads of the current logged in user.
I have managed to write the following code, but when i add the component to the page, and preview it, I dont see any leads.
<aura:component implements="forceCommunity:availableForAllPageTypes" access="global" >
<div class="slds">
<table class="slds-table slds-table--bordered slds-table--striped">
<thead>
<tr>
<th scope="col"><span class="slds-truncate">Company</span></th>
<th scope="col"><span class="slds-truncate">Annual Revenue</span></th>
</tr>
</thead>
<tbody>
<aura:iteration items="{!v.leads}" var="lead">
<tr>
<td>{!lead.Company}</td>
<td>{!lead.AnnualRevenue}</td>
</tr>
</aura:iteration>
</tbody>
</table>
</div>
It will be great, if someone could tell me what is that I am doing wrong. Visit here! https://goo.gl/7jNnWu
Thank you3 -
Truncated a database of around 14 million records today... Had 2 minutes of silence after it with my buddies @hahaha1234 and @papierbouwer1
-
Python file truncate instead of actually deleting file contents...
there goes a weekend of log backups.. FML -
Safari's developer console seems to truncate the output when a string longer than 140 characters is provided as a non-first argument to console.log or when it's a value in an object that is provided as any argument. You get ellipses, with no way to view the full string. Hovering doesn't get around it. Neither does copying.4
-
We had a test in class where one of the questions was "What is SQL injection?" and I wrote what it was and even gave a bang on simple example where I showed how you could end up with a truncate statement on your customer db. The last part of it was:
"This will be the SQL that gets executed:
INSERT INTO Customers (Name) VALUES (' ';TRUNCATE Customers;--);
When I got it back after we had a session of "grade each others work" I got the comment: "What makes this an attack against a database?"
I mean, I'm not sure what I could have written. That it truncates the database? And, correct me if I'm wrong, but if a user truncates your DB, is that not an attack? -
Hey guys, I have a question.
If you ever had to deal with parity (Ethereum node software) and ever ran archive node, you perfectly know how long this bastard synchronizes. For our server it took almost month. Well, today or yesterday parity decided to spontaniously blow up (or crash) corruptiong database manifest file which greatly undercut us.
Anyone knows any viable way to rebuild manifest file withoud doing full sync from a scratfch?
If anyone has any suggestions other than what 95% of internet say "well, delete your database and sync from scratch" Im happy to test if it will solve our burning burning issue.
I am sure there is some way to rebuild database, especially where it's manifest file that's corrupt (Ive checked it, for wtf reason parity decided to truncate the file when it crashed).
Database backend is written in rust, and is called rocks db.
EDIT: if helps, its archive fat database (fat db means it should be easier to recover?)4 -
Just wanted to free up some space and separate all of my projects.
First idea ... failed!
mksquashfs /home/tracktraps/Development/myproject1 ~/Squash/myproject1.sfs -info -progress -b 1048576 -comp xz -Xdict-size 100%
mkdir /mnt/myproject1
mount ~/Squash/myproject1.sfs /mnt/myproject1
unionfs -o allow_other,nonempty ~/.unionfs/changes/myproject1=rw:/mnt/myproject1/=ro ~/Development/Project1
Too much cpu overhead, too many folders, can't delete files, all get mixed up ...
Second idea ... failed!
dd if=/dev/zero of=~/Imgs/myproject1.btfs bs=1M count=10240
mkfs.btrfs ~/Imgs/myproject1.btfs
mount -o defaults,noatime,autodefrag,compress,compress-force,inode_cache ~/Imgs/myproject1.btfs ~/Development/Project1
Well ... little overhead, gzip compression, saved a lot of space, but fixed img size.
Third idea ... yay!
truncate -s 200G ~/Imgs/myproject1.btfs
mkfs.btrfs ~/Imgs/myproject1.btfs
mount -o defaults,noatime,autodefrag,compress,compress-force,inode_cache ~/Imgs/myproject1.btfs ~/Development/Project1
Well ... little overhead, gzip compression, saved a lot of space ... but wait ... why do my btfs files consume more and more space?
Hmm ... time for a little bash and my beloved systemd timers.
for f in `find . -type f -name "*.btfs"`
do
project=${$f%.*}
btrfs balance start -v -dusage=100 ~/Development/$project
btrfs balance start -v -musage=100 ~/Development/$project
fstrim ~/Development/$project
fallocate -d -v $f
done1 -
Maybe it's a dumb question, I don't know…
Why "Math.Truncate()" (trunc() in C++) returns a double?
Its only purpose is to return the integer part of a double, which is a fucking integer…
Same for floor() and ceil().
My point is that you can put an int in a double without any problem (so they could have return an int), not the other way around, so you have to convert it if you need it in an int.3