Tuesday, April 20

Programming

Programming

Full Form UPSC
Programming

Full Form UPSC

Full Form UPSC Most of us have heard the term UPSC many times from our teachers, colleagues, relatives, family and friends. We know it is responsible for conducting all the government jobs examinations but do you know what the full form of UPSC is. The full form of the prime recruiting firm UPSC is ‘Union Public Service Commission’. This tutorial will cover the definition, history, eligibility criterion, and much other detailed information regarding the Union Public Service Commission or UPSC. What is UPSC? “Union Public Service Commission or UPSC is India’s prime fundamental recruiting firm. It holds the responsibilities for government jobs posts and examinations for All India services, appointments for Central Services Group A and B as well as for the Indian Armed F...
Random polynomials revisited
Programming

Random polynomials revisited

A few days ago I wrote about the expected number of roots in a random polynomial where each coefficient is drawn from a standard normal, i.e. a Gaussian distribution with mean 0 and variance 1. Another class of random polynomials, one that comes up in applications to physics, draws each coefficient from a different distribution. Specifically, the nth coefficient in an Nth degree polynomial is drawn from a normal distribution with mean zero and variance N choose n. As before, our reference is [1]. It turns out that for these random polynomials, the expected number of zeros is √N. This is not an asymptotic formula; unlike the polynomials in the post mentioned above, it does not depend on the size of N. For an example, I created a random 44th degree polynomial. import scipy as sp ...
Centering in CSS
Programming

Centering in CSS

Follow 5 centering techniques as they go through a series of tests to see which one is the most resilient to change. Dec 16, 2020 Centering in CSS is a notorious challenge, fraught with jokes and mockery. 2020 CSS is all grown up and now we can laugh at those jokes honestly, not through clenched teeth. If you prefer video, here's a YouTube version of this post: The challenge # There are difference types of centering. From differing use cases, number of things to center, etc. In order to demonstrate a rationale behind "a winning" centering technique, I created The Resilience Ringer. It's a series of stress tests for each centering str...
10 Best Laptops for Graphic Designers in India 2021
Programming

10 Best Laptops for Graphic Designers in India 2021

Are you looking for a list of best laptops for Graphic Designers? Well, you’re at the right place. In India, the Graphic Designing field has emerged over the last decade, and simultaneously, we have seen various laptop brands coming out with multiple options for each type of requirement.  The best graphics laptops need more than pure power. You will also have to take care of a variety of other items. Besides, a graphically dedicated laptop must be prepared for graphical-intensive applications without breaking their transudation with a lot of memory and one of the essentials, graphics cards, to launch.  One thing is specific, whether you’re a part-time or a full-time graphics designer, you need one of the best laptops to create graphics and work properly. It is not surprising now th...
Thank You (2020 Edition)
Programming

Thank You (2020 Edition)

Heck of a year, eh? Like we do ever year, I’d like to give you a huge thanks for reading CSS-Tricks, and recap the year. More downs than ups, all told. Here at CSS-Tricks, it was more of a wash. Allow me to me share some numbers, milestones, and thoughts with you about our journey of 2020. Let’s do the basic numbers The site saw 94m pageviews this year. Last year we lost a smidge of pageviews (from 91m to 90m), so it’s nice to see that number go back up again, setting a new high record. Now I don’t have to tell myself stories like “jeez usage of browser extensions that block Google Analytics must be up.” Hitting 100m pageviews will be a nice milestone some future year. This number, long term, climbs very slowly. It’s a good reminder to me how much time, money, and energy are required to...
Give your Eleventy Site Superpowers with Environment Variables
Programming

Give your Eleventy Site Superpowers with Environment Variables

Eleventy is increasing in popularity because it allows us to create nice, simple websites, but also — because it’s so developer-friendly. We can build large-scale, complex projects with it, too. In this tutorial we’re going to demonstrate that expansive capability by putting a together a powerful and human-friendly environment variable solution. What are environment variables? Environment variables are handy variables/configuration values that are defined within the environment that your code finds itself in. For example, say you have a WordPress site: you’re probably going to want to connect to one database on your live site and a different one for your staging and local sites. We can hard-code these values in wp-config.php but a good way of keeping the connection details a secret and m...
3 Steps to Enable Client Hints on Your Image CDN
Programming

3 Steps to Enable Client Hints on Your Image CDN

The goal of Client Hints is to provide a framework for a browser when informing the server about the context in which a web experience is provided. HTTP Client Hints are a proposed set of HTTP Header Fields for proactive content negotiation in the Hypertext Transfer Protocol. The client can advertise information about itself through these fields so the server can determine which resources should be included in its response.—Wikipedia With that information (or hints), the server can provide optimizations that help to improve the web experience, also known as Content Negotiation. For images, a better web experience means faster loading, less data payload, and a streamlined codebase.   Client Hints have inherent value, but can be used together with  responsive images syntax to make responsi...
Teaching Kids Programming – Introduction to Heap and Priority Queue
Programming

Teaching Kids Programming – Introduction to Heap and Priority Queue

A Heap is a tree data structure the root of which is the smallest (min heap) or the largest (max heap). The heap tree has to be complete. For example, in a binary heap, the binary tree is a complete binary tree where each level has to contain all nodes except the last level (leaves) which may not be complete. The leaf nodes have to be on the left as much as possible. A perfect binary heap tree is also a complete binary heap tree where all level of nodes including the leaf nodes are all present. A priority queue is a First In Priority Out (ADT = Advance Data Type). We push the elements to a priority queue (just like normal queue First In First Out), however, when an element is popped, the priority queue will choose a highest priority (by default, the minimal element in Python) to dequeue...
One infinity or two?
Programming

One infinity or two?

If you want to add ∞ to the real numbers, should you add one infinity or two? The answer depends on context. This post gives several examples each of when its appropriate to add one or two infinities. Two infinities: relativistic addition A couple days ago I wrote about relativistic addition, where the sum of two numbers x and y is defined by where c is some positive constant. If we restrict x and y to be inside the open interval (-c, c) there are no complications. We could extend this to the closed interval [-c, c] with c acting like ∞ and –c acting like -∞. The addition rule above is based on addition of velocities in relativity, the speed of light acting like an infinity. There are two infinities, corresponding to light traveling in opposite directions. There is one caveat: c ⊕ (-c)...
Intermediate-Code Generator Compiler Design
Programming

Intermediate-Code Generator Compiler Design

Intermediate-Code Generator The process of translating a source language into machine code for a given target machine is done by intermediate-code. It lies between the high-level language and the machine language. See the below image that illustrates the position of the intermediate code generator: If a compiler cannot produce intermediate code while converting the source code into machine code, then a full native compiler is required for each new machine.With the use of intermediate code, we don’t need a new compiler for every new machine because it keeps the analysis portion same for all the compilers.The synthesis phase of the compiler is varying according to the target machine.High-level Representation: It is closer to the source code. It can be easily gener...