What do you think of the new Mahabharata series being started by Star Plus?

Mahabharat reborn in Saas Bahu Style!!!!

(Even the poster screams exactly the same!!)

The new Mahabharat focus too much on attracting the masses. They made it like a daily soap opera. Maybe they want to be the Chennai Express of soap operas.

The producers of the show claim that they have focused on the content of the show. I have been regularly following the show since the first episode. They have indeed given some thought to content and I must say that they have taken creativity to a new level with some episodes.

Most of the money for this show is spent on expensive sets, costumes, special effects etc. I feel like they are focusing way too much on music and special effects. Most of the episodes, the creators of the show are toying with my patience. Some events which can be told in 10 min, they took 4 episodes to complete it. Some stories like the origin of Bheeshma and the marriage between Ganga and Shantanu are not explained.
 

                                  I think the creators of the show want it to be very diffferent from BR Chopra's Mahabharat. So, they are tweaking the story to present us with a modernised Mahabharat where people really have emotions and react to things unlike what we have read in the epics. Plainly speaking, if we are the characters in Mahabharat and faces a similar situation, what would we do? The show gives us that version combined with some slow motion effects which last like half the episode.
                                   
                                   The show is said to be targeted at the youth of the country. The producers of the show claims that the youth are gonna love it. Guys!! I am part of that set and I will tell you this much, The presentation is good but please don't toy with our patience. I am writing this answer out of frustration on watching an episode tonight. In tonight's episode, Arjuna is said to have insulted Karna and is asked to apologise to Karna by washing his feet(This incident is never mentioned in Mahabharat) and they took 2 episodes to show this event. In this serial, facts are bent to provide a dramatic feel and effect which I think would  appeal to the audience of regular soap operas.

Update:  Now that this series is almost over, I have to say I am really disappointed. I chose to ignore many twists and turns they have included in the story taking it as the writers creative freedom. But they have twisted the story so badly that this great epic  is now another regualar soap opera.

Are there any spiritually enlightened people living today?

Other worldly edification is genuine. It is a condition of immaculate mindfulness that is free from the babbling mind and continually interfacing with the Infinite All-Loving All-Powerful Light from the God Source. One of the issues with discourses on illumination is the reality it is to some degree subtle to characterize.

There is a considerable measure of myths about what an enlightened individual resembles, and some of those thoughts hoist these individuals to super-human. While there are the individuals who have accomplished astounding capacities, edification is about cognizance and mindfulness significantly more than fulfillment of abilities or forces.

In the event that we perceive the characteristics of illumination with so much attributes as amazing quality, self-acknowledgment, brilliant light, profound peace, non-duality and the disintegration of needs, needs, longings, or repugnance’s, at that point we can state there are numerous who have achieved that.

Special case who has achieved that awareness is adequately mindful to know whether others have. It is not a matter of judgment or measurement. Anything the brain characterizes is not the response to this inquiry, and accordingly no measure of examination or correlation can land at precision in this issue. It involves acknowledgment and mindfulness and however the numbers might be little; it is far bigger than the individuals who have turned out to be other worldly legends.

They are propelled understudies – gifted specialists. They have surrendered to the wellspring of Grace inside themselves and end up plainly discharge vessels from which Heaven can communicate.

They are not Gods, Avatars or impeccable people. Understanding what edification is enables us to see them for what they genuinely are: go-between between the condition of physical partition and our characteristic otherworldly reality. Such individuals have awesome endowments to give. In any case, they stay individuals.

In what capacity would one be able to potentially judge and assess somebody's otherworldly commitments? We surely don't have the vantage point to pass such judgments. Moreover, even the littlest blessing or the most straightforward motion can be an extraordinary profound showing on the off chance that it originates from Spirit.

By and by, I wish to feature this charitable person who has propelled me to achieve further inside. My guru Rakesh Ranjan, has a yoga school in Goa, India, called the Rakesh Yoga School. I learned a great deal from him, and to learn more about his teachings visit the school or visit the website: www.yogarakesh.com

How do female nerds usually spend their day?

1. Read, read read and then some more.
2. Worry about all the articles, magazines and books being published every month and feel guilty that there isn't enough time to read every single piece of work that's being written.
3. Get excited and bounce of walls when she hears something cool about stuff that she is interested in. ''I didn't know that!'' "This is amazing!"
4. Make sure she tells everyone she knows/meets about her recent discovery "Did you know that…?" "hey, guess what… "
5. Meticulously plan the entire day after her morning green tea (because hey, anti oxidants are the best thing that happened to mankind) and realize that her plan has monumentally failed in the evening because she was so caught up being so excited about the new thesis that she didn't look at the clock. Repeat the next day.
6. When somebody says "let's go shopping", the first words out of her mouth are "why?"
7. Knows she needs a haircut but hey, so many better things to do right now, why waste precious moments?

How does the Internet work?

The "g" key is pressed

The following sections explains all about the physical keyboard and the OS interrupts. But, a whole lot happens after that which isn't explained. When you just press "g" the browser receives the event and the entire auto-complete machinery kicks into high gear. Depending on your browser's algorithm and if you are in private/incognito mode or not various suggestions will be presented to you in the dropbox below the URL bar. Most of these algorithms prioritize results based on search history and bookmarks. You are going to type "Google" so none of it matters, but a lot of code will run before you get there and the suggestions will be refined with each key press. It may even suggest "Google" before you type it.

The "enter" key bottoms out

To pick a zero point, let's choose the Enter key on the keyboard hitting the bottom of its range. At this point, an electrical circuit specific to the enter key is closed (either directly or capacitively). This allows a small amount of current to flow into the logic circuitry of the keyboard, which scans the state of each key switch, debounces the electrical noise of the rapid intermittent closure of the switch, and converts it to a keycode integer, in this case 13. The keyboard controller then encodes the keycode for transport to the computer. This is now almost universally over a Universal Serial Bus (USB) or Bluetooth connection, but historically has been over PS/2 or ADB connections.

In the case of the USB keyboard:

  • The USB circuitry of the keyboard is powered by the 5V supply provided over pin 1 from the computer's USB host controller.
  • The keycode generated is stored by internal keyboard circuitry memory in a register called "endpoint".
  • The host USB controller polls that "endpoint" every ~10ms (minimum value declared by the keyboard), so it gets the keycode value stored on it.
  • This value goes to the USB SIE (Serial Interface Engine) to be converted in one or more USB packets that follows the low level USB protocol.
  • Those packets are sent by a differential electrical signal over D+ and D- pins (the middle 2) at a maximum speed of 1.5 Mb/s, as an HID (Human Interface Device) device is always declared to be a "low speed device" (USB 2.0 compliance).
  • This serial signal is then decoded at the computer's host USB controller, and interpreted by the computer's Human Interface Device (HID) universal keyboard device driver. The value of the key is then passed into the operating system's hardware abstraction layer.

In the case of Virtual Keyboard (as in touch screen devices):

  • When the user puts their finger on a modern capacitive touch screen, a tiny amount of current gets transferred to the finger. This completes the circuit through the electrostatic field of the conductive layer and creates a voltage drop at that point on the screen. The screen controller then raises an interrupt reporting the coordinate of the key press.
  • Then the mobile OS notifies the current focused application of a press event in one of its GUI elements (which now is the virtual keyboard application buttons).
  • The virtual keyboard can now raise a software interrupt for sending a 'key pressed' message back to the OS.
  • This interrupt notifies the current focused application of a 'key pressed' event.

Interrupt fires [NOT for USB keyboards]

The keyboard sends signals on its interrupt request line (IRQ), which is mapped to an interrupt vector (integer) by the interrupt controller. The CPU uses the Interrupt Descriptor Table (IDT) to map the interrupt vectors to functions (interrupt handlers) which are supplied by the kernel. When an interrupt arrives, the CPU indexes the IDT with the interrupt vector and runs the appropriate handler. Thus, the kernel is entered.

(On Windows) A WM_KEYDOWNmessage is sent to the app

The HID transport passes the key down event to the KBDHID.sys driver which converts the HID usage into a scancode. In this case the scan code is VK_RETURN (0x0D). The KBDHID.sysdriver interfaces with the KBDCLASS.sys(keyboard class driver). This driver is responsible for handling all keyboard and keypad input in a secure manner. It then calls into Win32K.sys(after potentially passing the message through 3rd party keyboard filters that are installed). This all happens in kernel mode.

Win32K.sys figures out what window is the active window through theGetForegroundWindow() API. This API provides the window handle of the browser's address box. The main Windows "message pump" then callsSendMessage(hWnd, WM_KEYDOWN, VK_RETURN, lParam). lParam is a bitmask that indicates further information about the keypress: repeat count (0 in this case), the actual scan code (can be OEM dependent, but generally wouldn't be for VK_RETURN), whether extended keys (e.g. alt, shift, ctrl) were also pressed (they weren't), and some other state.

The Windows SendMessage API is a straightforward function that adds the message to a queue for the particular window handle (hWnd). Later, the main message processing function (called a WindowProc) assigned to the hWnd is called in order to process each message in the queue.

The window (hWnd) that is active is actually an edit control and the WindowProc in this case has a message handler for WM_KEYDOWN messages. This code looks within the 3rd parameter that was passed to SendMessage (wParam) and, because it is VK_RETURN knows the user has hit the ENTER key.

(On OS X) A KeyDown NSEvent is sent to the app

The interrupt signal triggers an interrupt event in the I/O Kit kext keyboard driver. The driver translates the signal into a key code which is passed to the OS X WindowServer process. Resultantly, the WindowServer dispatches an event to any appropriate (e.g. active or listening) applications through their Mach port where it is placed into an event queue. Events can then be read from this queue by threads with sufficient privileges calling the mach_ipc_dispatchfunction. This most commonly occurs through, and is handled by, an NSApplication main event loop, via an NSEvent of NSEventTypeKeyDown.

(On GNU/Linux) the Xorg server listens for keycodes

When a graphical X server is used, X will use the generic event driver evdev to acquire the keypress. A re-mapping of keycodes to scancodes is made with X server specific keymaps and rules. When the scancode mapping of the key pressed is complete, the X serversends the character to the window manager(DWM, metacity, i3, etc), so the window managerin turn sends the character to the focused window. The graphical API of the window that receives the character prints the appropriate font symbol in the appropriate focused field.

Parse URL

  • The browser now has the following information contained in the URL (Uniform Resource Locator):Protocol "http"Use 'Hyper Text Transfer Protocol'Resource "/"Retrieve main (index) page

Is it a URL or a search term?

When no protocol or valid domain name is given the browser proceeds to feed the text given in the address box to the browser's default web search engine. In many cases the URL has a special piece of text appended to it to tell the search engine that it came from a particular browser's URL bar.

Convert non-ASCII Unicode characters in hostname

  • The browser checks the hostname for characters that are not in a-z, A-Z, 0-9, -, or ..
  • Since the hostname is google.com there won't be any, but if there were the browser would apply Punycode encoding to the hostname portion of the URL.

Check HSTS list

  • The browser checks its "preloaded HSTS (HTTP Strict Transport Security)" list. This is a list of websites that have requested to be contacted via HTTPS only.
  • If the website is in the list, the browser sends its request via HTTPS instead of HTTP. Otherwise, the initial request is sent via HTTP. (Note that a website can still use the HSTS policy without being in the HSTS list. The first HTTP request to the website by a user will receive a response requesting that the user only send HTTPS requests. However, this single HTTP request could potentially leave the user vulnerable to adowngrade attack, which is why the HSTS list is included in modern web browsers.)

DNS lookup

  • Browser checks if the domain is in its cache. (to see the DNS Cache in Chrome, go to http://chrome://net-internals/#dns).
  • If not found, the browser calls gethostbyname library function (varies by OS) to do the lookup.
  • gethostbyname checks if the hostname can be resolved by reference in the local hostsfile (whose location varies by OS) before trying to resolve the hostname through DNS.
  • If gethostbyname does not have it cached nor can find it in the hosts file then it makes a request to the DNS server configured in the network stack. This is typically the local router or the ISP's caching DNS server.
  • If the DNS server is on the same subnet the network library follows the ARP processbelow for the DNS server.
  • If the DNS server is on a different subnet, the network library follows the ARP processbelow for the default gateway IP.

ARP process

In order to send an ARP (Address Resolution Protocol) broadcast the network stack library needs the target IP address to look up. It also needs to know the MAC address of the interface it will use to send out the ARP broadcast.

The ARP cache is first checked for an ARP entry for our target IP. If it is in the cache, the library function returns the result: Target IP = MAC.

If the entry is not in the ARP cache:

  • The route table is looked up, to see if the Target IP address is on any of the subnets on the local route table. If it is, the library uses the interface associated with that subnet. If it is not, the library uses the interface that has the subnet of our default gateway.
  • The MAC address of the selected network interface is looked up.
  • The network library sends a Layer 2 (data link layer of the OSI model) ARP request:

ARP Request:

Sender MAC: interface:mac:address:here
Sender IP: interface.ip.goes.here
Target MAC: FF:FF:FF:FF:FF:FF (Broadcast)
Target IP: target.ip.goes.here

Depending on what type of hardware is between the computer and the router:

Directly connected:

  • If the computer is directly connected to the router the router responds with an ARP Reply (see below)

Hub:

  • If the computer is connected to a hub, the hub will broadcast the ARP request out all other ports. If the router is connected on the same "wire", it will respond with an ARP Reply (see below).

Switch:

  • If the computer is connected to a switch, the switch will check its local CAM/MAC table to see which port has the MAC address we are looking for. If the switch has no entry for the MAC address it will rebroadcast the ARP request to all other ports.
  • If the switch has an entry in the MAC/CAM table it will send the ARP request to the port that has the MAC address we are looking for.
  • If the router is on the same "wire", it will respond with an ARP Reply (see below)

ARP Reply:

Sender MAC: target:mac:address:here
Sender IP: target.ip.goes.here
Target MAC: interface:mac:address:here
Target IP: interface.ip.goes.here

Now that the network library has the IP address of either our DNS server or the default gateway it can resume its DNS process:

  • Port 53 is opened to send a UDP request to DNS server (if the response size is too large, TCP will be used instead).
  • If the local/ISP DNS server does not have it, then a recursive search is requested and that flows up the list of DNS servers until the SOA is reached, and if found an answer is returned.

Opening of a socket

Once the browser receives the IP address of the destination server, it takes that and the given port number from the URL (the HTTP protocol defaults to port 80, and HTTPS to port 443), and makes a call to the system library function named socket and requests a TCP socket stream – AF_INET/AF_INET6 and SOCK_STREAM.

  • This request is first passed to the Transport Layer where a TCP segment is crafted. The destination port is added to the header, and a source port is chosen from within the kernel's dynamic port range (ip_local_port_range in Linux).
  • This segment is sent to the Network Layer, which wraps an additional IP header. The IP address of the destination server as well as that of the current machine is inserted to form a packet.
  • The packet next arrives at the Link Layer. A frame header is added that includes the MAC address of the machine's NIC as well as the MAC address of the gateway (local router). As before, if the kernel does not know the MAC address of the gateway, it must broadcast an ARP query to find it.

At this point the packet is ready to be transmitted through either:

  • Ethernet
  • WiFi
  • Cellular data network

For most home or small business Internet connections the packet will pass from your computer, possibly through a local network, and then through a modem (MOdulator/DEModulator) which converts digital 1's and 0's into an analog signal suitable for transmission over telephone, cable, or wireless telephony connections. On the other end of the connection is another modem which converts the analog signal back into digital data to be processed by the next network node where the from and to addresses would be analyzed further.

Most larger businesses and some newer residential connections will have fiber or direct Ethernet connections in which case the data remains digital and is passed directly to the next network node for processing.

Eventually, the packet will reach the router managing the local subnet. From there, it will continue to travel to the autonomous system's (AS) border routers, other ASes, and finally to the destination server. Each router along the way extracts the destination address from the IP header and routes it to the appropriate next hop. The time to live (TTL) field in the IP header is decremented by one for each router that passes. The packet will be dropped if the TTL field reaches zero or if the current router has no space in its queue (perhaps due to network congestion).

This send and receive happens multiple times following the TCP connection flow:

  • Client chooses an initial sequence number (ISN) and sends the packet to the server with the SYN bit set to indicate it is setting the ISN
  • Server receives SYN and if it's in an agreeable mood:Server chooses its own initial sequence numberServer sets SYN to indicate it is choosing its ISNServer copies the (client ISN +1) to its ACK field and adds the ACK flag to indicate it is acknowledging receipt of the first packet
  • Client acknowledges the connection by sending a packet:Increases its own sequence numberIncreases the receiver acknowledgment numberSets ACK field
  • Data is transferred as follows:As one side sends N data bytes, it increases its SEQ by that numberWhen the other side acknowledges receipt of that packet (or a string of packets), it sends an ACK packet with the ACK value equal to the last received sequence from the other
  • To close the connection:The closer sends a FIN packetThe other sides ACKs the FIN packet and sends its own FINThe closer acknowledges the other side's FIN with an ACK

TLS handshake

  • The client computer sends a ClientHellomessage to the server with its Transport Layer Security (TLS) version, list of cipher algorithms and compression methods available.
  • The server replies with a ServerHellomessage to the client with the TLS version, selected cipher, selected compression methods and the server's public certificate signed by a CA (Certificate Authority). The certificate contains a public key that will be used by the client to encrypt the rest of the handshake until a symmetric key can be agreed upon.
  • The client verifies the server digital certificate against its list of trusted CAs. If trust can be established based on the CA, the client generates a string of pseudo-random bytes and encrypts this with the server's public key. These random bytes can be used to determine the symmetric key.
  • The server decrypts the random bytes using its private key and uses these bytes to generate its own copy of the symmetric master key.
  • The client sends a Finished message to the server, encrypting a hash of the transmission up to this point with the symmetric key.
  • The server generates its own hash, and then decrypts the client-sent hash to verify that it matches. If it does, it sends its own Finished message to the client, also encrypted with the symmetric key.
  • From now on the TLS session transmits the application (HTTP) data encrypted with the agreed symmetric key.

HTTP protocol

If the web browser used was written by Google, instead of sending an HTTP request to retrieve the page, it will send a request to try and negotiate with the server an "upgrade" from HTTP to the SPDY protocol.

If the client is using the HTTP protocol and does not support SPDY, it sends a request to the server of the form:

GET / HTTP/1.1
Host: google.com
Connection: close
[other headers]

where [other headers] refers to a series of colon-separated key-value pairs formatted as per the HTTP specification and separated by single new lines. (This assumes the web browser being used doesn't have any bugs violating the HTTP spec. This also assumes that the web browser is using HTTP/1.1, otherwise it may not include the Host header in the request and the version specified in the GET request will either be HTTP/1.0 or HTTP/0.9.)

HTTP/1.1 defines the "close" connection option for the sender to signal that the connection will be closed after completion of the response. For example,

Connection: close

HTTP/1.1 applications that do not support persistent connections MUST include the "close" connection option in every message.

After sending the request and headers, the web browser sends a single blank newline to the server indicating that the content of the request is done.

The server responds with a response code denoting the status of the request and responds with a response of the form:

200 OK
[response headers]

Followed by a single newline, and then sends a payload of the HTML content ofwww.google.com. The server may then either close the connection, or if headers sent by the client requested it, keep the connection open to be reused for further requests.

If the HTTP headers sent by the web browser included sufficient information for the web server to determine if the version of the file cached by the web browser has been unmodified since the last retrieval (ie. if the web browser included an ETag header), it may instead respond with a request of the form:

304 Not Modified
[response headers]

and no payload, and the web browser instead retrieves the HTML from its cache.

After parsing the HTML, the web browser (and server) repeats this process for every resource (image, CSS, favicon.ico, etc) referenced by the HTML page, except instead of GET / HTTP/1.1the request will be GET /$(URL relative to www.google.com) HTTP/1.1.

If the HTML referenced a resource on a different domain than www.google.com, the web browser goes back to the steps involved in resolving the other domain, and follows all steps up to this point for that domain. The Host header in the request will be set to the appropriate server name instead of google.com.

HTTP Server Request Handle

The HTTPD (HTTP Daemon) server is the one handling the requests/responses on the server side. The most common HTTPD servers are Apache or nginx for Linux and IIS for Windows.

  • The HTTPD (HTTP Daemon) receives the request.
  • The server breaks down the request to the following parameters:HTTP Request Method (either GET, HEAD, POST, PUT,DELETE, CONNECT, OPTIONS, or TRACE). In the case of a URL entered directly into the address bar, this will be GET.Domain, in this case – Google.Requested path/page, in this case – / (as no specific path/page was requested, / is the default path).
  • The server verifies that there is a Virtual Host configured on the server that corresponds with Google.
  • The server verifies that Google can accept GET requests.
  • The server verifies that the client is allowed to use this method (by IP, authentication, etc.).
  • If the server has a rewrite module installed (like mod_rewrite for Apache or URL Rewrite for IIS), it tries to match the request against one of the configured rules. If a matching rule is found, the server uses that rule to rewrite the request.
  • The server goes to pull the content that corresponds with the request, in our case it will fall back to the index file, as "/" is the main file (some cases can override this, but this is the most common method).
  • The server parses the file according to the handler. If Google is running on PHP, the server uses PHP to interpret the index file, and streams the output to the client.

Behind the scenes of the Browser

Once the server supplies the resources (HTML, CSS, JS, images, etc.) to the browser it undergoes the below process:

  • Parsing – HTML, CSS, JS
  • Rendering – Construct DOM Tree → Render Tree → Layout of Render Tree → Painting the render tree

Browser

The browser's functionality is to present the web resource you choose, by requesting it from the server and displaying it in the browser window. The resource is usually an HTML document, but may also be a PDF, image, or some other type of content. The location of the resource is specified by the user using a URI (Uniform Resource Identifier).

The way the browser interprets and displays HTML files is specified in the HTML and CSS specifications. These specifications are maintained by the W3C (World Wide Web Consortium) organization, which is the standards organization for the web.

Browser user interfaces have a lot in common with each other. Among the common user interface elements are:

  • An address bar for inserting a URI
  • Back and forward buttons
  • Bookmarking options
  • Refresh and stop buttons for refreshing or stopping the loading of current documents
  • Home button that takes you to your home page

Browser High Level Structure

The components of the browsers are:

  • User interface: The user interface includes the address bar, back/forward button, bookmarking menu, etc. Every part of the browser display except the window where you see the requested page.
  • Browser engine: The browser engine marshals actions between the UI and the rendering engine.
  • Rendering engine: The rendering engine is responsible for displaying requested content. For example if the requested content is HTML, the rendering engine parses HTML and CSS, and displays the parsed content on the screen.
  • Networking: The networking handles network calls such as HTTP requests, using different implementations for different platforms behind a platform-independent interface.
  • UI backend: The UI backend is used for drawing basic widgets like combo boxes and windows. This backend exposes a generic interface that is not platform specific. Underneath it uses operating system user interface methods.
  • JavaScript engine: The JavaScript engine is used to parse and execute JavaScript code.
  • Data storage: The data storage is a persistence layer. The browser may need to save all sorts of data locally, such as cookies. Browsers also support storage mechanisms such as localStorage, IndexedDB, WebSQL and FileSystem.

HTML parsing

The rendering engine starts getting the contents of the requested document from the networking layer. This will usually be done in 8kB chunks.

The primary job of HTML parser to parse the HTML markup into a parse tree.

The output tree (the "parse tree") is a tree of DOM element and attribute nodes. DOM is short for Document Object Model. It is the object presentation of the HTML document and the interface of HTML elements to the outside world like JavaScript. The root of the tree is the "Document" object. Prior of any manipulation via scripting, the DOM has an almost one-to-one relation to the markup.

The parsing algorithm

HTML cannot be parsed using the regular top-down or bottom-up parsers.

The reasons are:

  • The forgiving nature of the language.
  • The fact that browsers have traditional error tolerance to support well known cases of invalid HTML.
  • The parsing process is reentrant. For other languages, the source doesn't change during parsing, but in HTML, dynamic code (such as script elements containing document.write() calls) can add extra tokens, so the parsing process actually modifies the input.

Unable to use the regular parsing techniques, the browser utilizes a custom parser for parsing HTML. The parsing algorithm is described in detail by the HTML5 specification.

The algorithm consists of two stages: tokenization and tree construction.

Actions when the parsing is finished

The browser begins fetching external resources linked to the page (CSS, images, JavaScript files, etc.).

At this stage the browser marks the document as interactive and starts parsing scripts that are in "deferred" mode: those that should be executed after the document is parsed. The document state is set to "complete" and a "load" event is fired.

Note there is never an "Invalid Syntax" error on an HTML page. Browsers fix any invalid content and go on.

CSS interpretation

  • Parse CSS files, <style> tag contents, and style attribute values using "CSS lexical and syntax grammar"
  • Each CSS file is parsed into a StyleSheet object, where each object contains CSS rules with selectors and objects corresponding CSS grammar.
  • A CSS parser can be top-down or bottom-up when a specific parser generator is used.

Page Rendering

  • Create a 'Frame Tree' or 'Render Tree' by traversing the DOM nodes, and calculating the CSS style values for each node.
  • Calculate the preferred width of each node in the 'Frame Tree' bottom up by summing the preferred width of the child nodes and the node's horizontal margins, borders, and padding.
  • Calculate the actual width of each node top-down by allocating each node's available width to its children.
  • Calculate the height of each node bottom-up by applying text wrapping and summing the child node heights and the node's margins, borders, and padding.
  • Calculate the coordinates of each node using the information calculated above.
  • More complicated steps are taken when elements are floated, positioned absolutely or relatively, or other complex features are used. Seehttp://dev.w3.org/csswg/css2/ and http://www.w3.org/Style/CSS/curr…for more details.
  • Create layers to describe which parts of the page can be animated as a group without being re-rasterized. Each frame/render object is assigned to a layer.
  • Textures are allocated for each layer of the page.
  • The frame/render objects for each layer are traversed and drawing commands are executed for their respective layer. This may be rasterized by the CPU or drawn on the GPU directly using D2D/SkiaGL.
  • All of the above steps may reuse calculated values from the last time the webpage was rendered, so that incremental changes require less work.
  • The page layers are sent to the compositing process where they are combined with layers for other visible content like the browser chrome, iframes and addon panels.
  • Final layer positions are computed and the composite commands are issued via Direct3D/OpenGL. The GPU command buffer(s) are flushed to the GPU for asynchronous rendering and the frame is sent to the window server.

GPU Rendering

  • During the rendering process the graphical computing layers can use general purpose CPU or the graphical processor GPU as well.
  • When using GPU for graphical rendering computations the graphical software layers split the task into multiple pieces, so it can take advantage of GPU massive parallelism for float point calculations required for the rendering process.

Window Server

Post-rendering and user-induced execution

After rendering has completed, the browser executes JavaScript code as a result of some timing mechanism (such as a Google Doodle animation) or user interaction (typing a query into the search box and receiving suggestions). Plugins such as Flash or Java may execute as well, although not at this time on the Google homepage. Scripts can cause additional network requests to be performed, as well as modify the page or its layout, causing another round of page rendering and painting.

SOURCE: Github

I need your ideas and thinking cap. If I take a strip of cotton/ cloth and dip it in a bowl of water; what are the ways I can do this without getting two ends of the cotton strip wet?

There are a few different ways. A simple one is to only dip one side into the liquid, or fold it and dip just the middle.

There are other methods which are used in textile art.

Batik uses wax on areas which are not meant to be exposed to the liquid dye.

The waxed areas stay dry and dye free.

Tie-dying uses rubber bands or string to compress the cloth in certain areas and keep them dry while dipped in dye.

Any software that tell the power consumption of a PC

An application known as "Joulemeter" is available on the internet.

It is an application designed to estimate the power consumption of your computer. It tracks computer resources, such as CPU utilization, disk activity, screen brightness etc. and estimates power usage.
Joulemeter is extremely simple and requires no other settings than calibration in order to obtain more accurate data.

Which are some of the most unknown yet fascinating facts on human history?

I would say the thing that most fascinates me is wondering what sort of civilization had developed worldwide and was crippled/destroyed around the end of the ice age. The massive meltdowns of glaciers inundated the coastlines perhaps under a couple hundred years (even now, most of the world's population lives within 100 km of coastlines). New discoveries like Göbekli Tepe are proof that complex societies existed during that time.

What is it like to be an American?

Excess and convenience.

So many people have way more than is necessary in most cases. Bigger cars than they need. Bigger houses than they need. Bigger waistlines… 

There is a Starbucks on every corner. Supersized drinks. Over portioned meals. A dozen kinds of delivery.

All-in-one stores like Wal-mart, Target, and K-mart where you can get your tires changes, groceries, nails done, gift shopping, and eat lunch without leaving the store.

Most areas have gas stations within sight of each other. Where there is a Walgreens there's a CVS, a Home Depot there's a Lowes, a Mcdonalds, theres a Subway.

Unbelievable amounts of choice and it's all available all the time – there's no such thing as seasonal foods.

2-day shipping is almost the normal.

So many don't realize how grossly convenient life is that not being able to do or get something immediately is considered an inconvenience.

Success is expected to be provided.

Very few live within their means. To be debt free is to be in the minority. Not to have internet or a cell phone is an even smaller group.

Nothing is realllly that difficult. We have a seemingly endless supply of fresh water, gas, food, education, clothes, internet, 2 day shipping, free samples, free upgrades, free refills, etc. Everything is at our fingertips.

We have the power to choose and sometimes get paralyzed with choice.

We can effectively do, say, or have anything we want (more or less).

Nothing is stopping you from becoming a millionaire.

and for some, it will never be enough.

Our lives are so simple that we are probably dumber for it.

Waste isn't a priority. We throw out more food than some countries eat. To think where something goes after a trash can is unusual.

Our poorest probably don't realize how rich they really are.

We take for granted how clean our air is, stable our government is, amazing our healthcare, and powerful our currency is.

*It's hard to cast a single net to include everyone, but these are my thoughts. I'm also bias to living on the east coast, growing up middle class, and taking part in many of the mentioned.

What is the reason you believe in God? Can you prove his existence?

I was raised by two parents with wildly different faiths, and encouraged to believe whatever made sense to me. As a result, when I was very young, while intrigued by religion and regularly observant in my mother's religion (Reform Judaism), I didn't really have much faith. When asked about God, I would generally say 'I don't know'. However, when I was 6 or 7, I had a dream. In the dream I was in my house, walking around. I walked into the bathroom, pulled aside the curtain, and looked into the bathtub, where I saw something that made me absolutely certain of the existence of God. As soon as I turned away from the bathtub, I forgot what I had seen, but retained that certainty even after waking up, which stuck with me for many years. Later my constant questioning (as encouraged by both my parents) began to encroach on that faith, and today I would describe myself as a pantheist rather than a monotheist. However, some of the faith created by that dream still remains with me.