Quantcast
Channel: Code Theory
Browsing all 229 articles
Browse latest View live

Image may be NSFW.
Clik here to view.

Remove a Mounted React Component with React.unmountComponentAtNode()

While going through the codebase of React Bootstrap (for some reason), I came across an interesting implementation of a “React playground”. The code behind the playground is in ReactPlayground.js. I...

View Article


Image may be NSFW.
Clik here to view.

Passing Data Across Components with Contexts in ReactJS

Using React Contexts we can communicate across a hierarchy of Components. To understand this, think of a widget represented by a View component which has lots of child view components. You might...

View Article


Image may be NSFW.
Clik here to view.

What is Rack and Rack Middlewares (Basis of Ruby Frameworks) ?

Rack is a very thin interface between Ruby frameworks and web servers that support Ruby. What it basically means is that it provides a minimal API for connecting web servers (supporting Ruby) and web...

View Article

Image may be NSFW.
Clik here to view.

Single Sign On (SSO) for Multiple Applications with Devise, OmniAuth and...

Recently I had to implement Single Sign On (SSO) for one of the Rails app I’d been working on. Since Devise is already fairly popular to integrate an authentication system in Rails app, I was more...

View Article

Image may be NSFW.
Clik here to view.

Quick Tip: Rails Escaping Database Values and Storing/Inserting with...

In this quick tip we’ll see how to escape values in Rails before passing them on to an SQL query (preventing injection attacks) and then also look into how to do multi-inserts (at the DB level). Let’s...

View Article


Image may be NSFW.
Clik here to view.

Prevent Touch Panning and Zooming on Mobile Web Pages with CSS touch-action...

The new touch-action property from the CSS Pointer Events spec can help us (as developers) specify what sort of manipulation (panning, zooming, etc.) should be allowed by a user in a particular region...

View Article

Image may be NSFW.
Clik here to view.

JavaScript Fire onSubmit Event Handler Programmatically by Calling form.submit()

Unless you code your web pages in vanilla javascript, you’ll probably not notice this but when you do it’ll quite baffle you that the event listener you attach to a form’s submit event using...

View Article

Image may be NSFW.
Clik here to view.

Trigger HTML5 Form Validation on JavaScript Submission (form.submit())

Most of the time when dealing with web forms, we either have a basic version where the user clicks on the submit button and the form submits to the relevant action with the relevant GET/POST method...

View Article


Image may be NSFW.
Clik here to view.

Custom Validation Messages for HTML5 Form Constraints

Well, we already know that with HTML5 from constraints, client side form validation has become super easy. All we have to do is use attributes like required, maxlength, pattern, step, etc. and/or the...

View Article


Image may be NSFW.
Clik here to view.

CSS Apply Filter Effects (blur, grayscale, hue) to the Area Behind an Element...

We’re well acquainted with the CSS3 filter property that lets us apply various effects like blur, grayscale, sepia, saturation, etc. to a particular element. Now using this property we actually end up...

View Article

Image may be NSFW.
Clik here to view.

Compiling Next Generation JavaScript (ES6, ES7, React) in Browser with Babel...

Babel is an amazing tool for writing ES6 (ES2015), ES7 (ES2016), JSX, etc. code that finally gets compiled (or transpiled) into JavaScript (mostly ES5 as of now) that can be executed by most browsers....

View Article

Image may be NSFW.
Clik here to view.

Getting Started with React – Setting up the Development Environment

React (also React.js or ReactJS) is a JavaScript library for building user interfaces developed by Facebook & Instagram. It is not a full blown framework like Angular or Ember or even Backbone.js....

View Article

Image may be NSFW.
Clik here to view.

Guide (Introduction, Implementation and How it Works) to A/B Testing and...

Recently I’ve been investing a lot of time into A/B (split) testing/experiments and analysing their results. Slowly I’ve started to love this way of rolling out changes on the web (can be surely used...

View Article


Image may be NSFW.
Clik here to view.

HTML5 Fullscreen Background Video with CSS and JS (Plugin/Library)

Fullscreen background videos that autoplay right when the webpage loads (above the fold) has become quite a popular trend these days. Personally I think a fullscreen good quality video that autoplays...

View Article

Image may be NSFW.
Clik here to view.

Two Ways to Create an Animated Hamburger Menu

If you’re a developer or a designer, you’re probably familiar with the trend of using hamburger (or three-line) menus as fully responsive and mobile friendly navigation solutions. The trend has grown...

View Article


Image may be NSFW.
Clik here to view.

Tips for Cross Browser Compatibility

Developing and designing for every browser type can be a very challenging (some might say impossible) task. Every browser has its own unique inherent styling that (even with the use of a reset) can be...

View Article

Image may be NSFW.
Clik here to view.

Guide to Creating Pure CSS Animated Buttons

There are so many different ways to create stylish buttons with HTML and CSS. All you need is an <a> tag or two to get started. It’s also fairly easy to create animated buttons that actually...

View Article


Image may be NSFW.
Clik here to view.

10 Essentials For Using Chrome’s Developer Tools

Google Chrome’s Developer tools makes coding so much easier I’m not sure how developers ever lived without it. For those unfamiliar with it, the tool allows developers to edit their code in real time...

View Article

Image may be NSFW.
Clik here to view.

A Guide to CSS Resets

CSS resets are a great tool that can be used to essentially reset some (or all, depending on the reset you use) of a particular browser’s default styling. Developers use resets to help ensure...

View Article

Image may be NSFW.
Clik here to view.

Best Resources to Learn to Code for Free

If you’ve ever wanted to learn how to code (or maybe you know some basics, but would like to learn more), now’s the time to do it. There are dozens of free code classes and bootcamp-type courses...

View Article
Browsing all 229 articles
Browse latest View live