Okay, for all nerds and computer programming enthusiasts, hence forth, I will be sharing with you my challenges day to day and what I did to resolve them! Happy coding
I've always loved how Whatsapp, Facebook, Twitter and all the major social network platforms maintained sanity of uploaded profile pictures through the use of instant resize at upload time. Of course not only profile pictures need to be made to conform to a specific dimension, if you find other scenarios during development when you need to ensure that your images are of a specific height and width, or aspect ratio then this article will help you do just that. You may also just want to give the user ability to resize before final upload, this article will help you do just that. Step 1: Download CropperJs Plugin There are lots of plugins that could help to achieve our objective, and I've tried a few. I find this one very robust and easier to use. Here's the github link Step 2: Import the CropperJs Plugin Using your script tag, import the downloaded plugin's Javascript file and link the CSS file too. Note, that for speedy loading, CSS files should be loaded in t...
Background: I use CorelDraw a lot to lay out my reports before writing the iTextSharp code to generate them. It gives me a fair idea of how to position report elements and keeps me from doing guesses or trial and error. This was the case when I worked on the ID Card project for Delta State University: I had the ID card neatly laid out and the school loved the design. Issue: Now, everyone knows we normally have long names in Nigeria. My design template had a name that was 10 characters long and I used 28pt points for this text. What I wanted to achieve however is that, for names that will not be able to fit into the maximum space allowed for the name text at the 28pt used in the design template, the system should use the maximum font size that will permit the name to fit in the space available. Its a simple problem, but wasn't so easy to resolve. Solution: public Font GetSafeFont ( string DisplayText, Font FontToUse, float SafeLength, float StartingSize) {...
Isnt it frustrating sometimes, when for whatever reason, you had to update your DNS records for your domain and it takes forever to propagate. I had to go through this recently. One of the domains I manage expired, and we renewed after two days. Unfortunately, the registrar had parked the domain, pointing it to another location temporarily. This meant that after the renewal, we had to wait for 24 to 48 hours for the domain to fully propagate. I then had to do a fix that ensured that some other servers who talked to that domain could still access the server it pointed to, even though the domain was not fully propagated to them. It involves a simple fix for windows systems. Open notepad as administrator Open C:\Windows\System32\Drivers\etc\hosts (assuming that windows is installed on the C drive) Scroll to the end of file and add two new lines (press Enter twice) Enter the IP Address, leave a space then the domain name Do the same for necessary subdomains where needed, e.g...
Comments
Post a Comment