Sign Up Now!

Sign up and get personalized intelligence briefing delivered daily.


Sign Up

Articles related to "file"


Demystifying Webpack

  • Let's breakdown the concepts of webpack and understand what happens during the bundling process.
  • A bundler is a utility/program that takes a number of files and puts them together in such a way it doesn't change how the code works.
  • And I defined A.js as my entry point for webpack and the output to be a single bundled file.
  • The first thing webpack will do is analyze the modules that are present and form a dependency graph.
  • Likewise it keeps adding content of the modules to the output file till it has finished traversing the dependency graph.
  • While webpack is creating the graph it also marks whether the module is used or not.
  • The code is quite simple to understand it takes in a moduleId and checks whether that module is present in installedModules cache.

save | comments | report | share on


Preact + Typescript + Parcel + Redux Zero: Rebuilding the QMENTA Front-End focusing on Performance and Minimalism.

  • For an application that is rich in data and manages a lot of different metadata and results from APIs, Typescript offers us static type checking that comes very handy when defining the different data structures that our application handles, as well as the structure of the props and state of the different components, so we know what to expect, have it documented and have all the data to be consistent at all different stages.
  • An example of a simplified generic Preact Component our application uses that enforce Typescript.
  • For managing asynchronous behavior we use kaop-TS , which is a decorator library that provides some method interceptors written in Typescript.
  • Also, the state management and routing of our application use decorators to extend functionality to the components to, for example, connect it to the store or listen to be rendered at a specific route.

save | comments | report | share on


Java on Playstation 2

  • Taking large breaks in between to work on other projects, I learned all the other things needed for this demo and started adding support for them in Java Grinder.
  • Definitely not as flexable or easy to use as MAME was for doing Sega Genesis development, for example, MAME made it easier to examine memory, both RAM and video / sound registers, to confirm that Java Grinder was doing the correct thing.
  • One thing I thought was cool about Playstation 2 vector units that I haven't seen other SIMD instruction sets is all the FPU instructions can have a .xyzw attribute which tells the instruction which of the 4 floating point numbers are actually affected.

save | comments | report | share on


Hadoop Architecture: Is the Bloom off the Rose?

  • Use of HDFS, the Java-based file system that has become nearly synonymous with the so-called big data revolution, has been declining over the last few years.
  • Its easy to imagine how many organizations may have found out the hard way that the SQL on Hadoop engine they purchased was not well suited to their big data project.
  • While it is worth noting that Amazon does support Hadoop and Spark through Amazon EMR, EMR is not Amazon’s only solution for organizations that need big data analytic capabilities.
  • Besides, uploading massive amounts of data to the public cloud can be cost prohibitive and may also pose logistical problems.
  • Having said that, it is becoming increasingly common for new big data projects to be born in the cloud, and IT pros are increasingly finding that cloud-native big data tools are easier to use and more effective than Hadoop.

save | comments | report | share on


Cloudflare Goes InterPlanetary – Introducing Cloudflare’s IPFS Gateway

  • Today we’re excited to introduce Cloudflare’s IPFS Gateway, an easy way to access content from the the InterPlanetary File System (IPFS) that doesn’t require installing and running any special software on your computer.
  • With IPFS, every single block of data stored in the system is addressed by a cryptographic hash of its contents, i.e., a long string of letters and numbers that is unique to that block.
  • While SHA-256 is the standard algorithm used today, this multihash format allows the IPFS protocol to support addresses produced by other hashing algorithms.
  • A collision occurs when there are two different files that produce the same hash when run through the SHA-256 algorithm.
  • There are a number of ways to access content that’s been stored in the IPFS network, but we’re going to address two popular ones here.

save | comments | report | share on


Mint vs JavaScript (stack)

  • For that we will use Babel so we need to install some packages to make it work: babel-core babel-preset-react (which includes the Flow preset for some reason) also we install babel-preset-es2015 and babel-preset-stage-0 to make advanced JavaScript features available.
  • To get type checking in JavaScript you need a third party tool, in Mint it's built in.
  • In Mint it's a built in feature, while in JavaScript you need to use a third party package to achieve the same setup.
  • In Mint everything is typed checked even the connection between a component and a store, so for example if we happen to expose something that is not available on the store we get a nice error message.
  • It's equally simple to format our code in both languages the only difference is that in JavaScript it's a third party tool.
  • Using JavaScript third party tools are needed for building the production files, in Mint it's a built in feature.

save | comments | report | share on


Preact + Typescript + Parcel + Redux Zero: Rebuilding the QMENTA Front-End focusing on Performance and Minimalism.

  • For an application that is rich in data and manages a lot of different metadata and results from APIs, Typescript offers us static type checking that comes very handy when defining the different data structures that our application handles, as well as the structure of the props and state of the different components, so we know what to expect, have it documented and have all the data to be consistent at all different stages.
  • An example of a simplified generic Preact Component our application uses that enforce Typescript.
  • For managing asynchronous behavior we use kaop-TS , which is a decorator library that provides some method interceptors written in Typescript.
  • Also, the state management and routing of our application use decorators to extend functionality to the components to, for example, connect it to the store or listen to be rendered at a specific route.

save | comments | report | share on


Building a modal in React.

  • Before creating the components or writing any code, follow the steps below to delete unwanted files and also create the files needed for the project.
  • Delete the following files: app.css, app.test.js, logo.svg and registerServiceWorker.js from the src folder.
  • Open the Modal.js file in the components folder and add the following code.
  • The function is passed as a prop to the modal component.
  • Add the following code to the Modal.css file in order to add styling to the modal component.
  • In the render method, a backdrop div is dynamically added based on the visibility of the modal and also an onClick listener is passed to the div so it can control the opening and closing of the modal.
  • The modal component which was previously is imported and used in the render method with the values of the props passed to it.

save | comments | report | share on


Building a modal in React.

  • Before creating the components or writing any code, follow the steps below to delete unwanted files and also create the files needed for the project.
  • Delete the following files: app.css, app.test.js, logo.svg and registerServiceWorker.js from the src folder.
  • Open the Modal.js file in the components folder and add the following code.
  • The function is passed as a prop to the modal component.
  • Add the following code to the Modal.css file in order to add styling to the modal component.
  • In the render method, a backdrop div is dynamically added based on the visibility of the modal and also an onClick listener is passed to the div so it can control the opening and closing of the modal.
  • The modal component which was previously is imported and used in the render method with the values of the props passed to it.

save | comments | report | share on


Bundle your Node app to a single executable for Windows, Linux and OsX

  • A question I get asked so many times by so many people is how to compile a Node app to a single executable.
  • We will create a Node app that opens a .json input file, add indentation (tabs, spaces) and console log the beautified much more readable JSON.
  • An easy way to create a new Node application with a package.json is to run npm init in an empty directory.
  • On Linux, chmod your binary a+x to make it executable and then run ./prettyprint-linux file.json.
  • If you NPM install after you created your app, it will automatically add the dependency to package.json for you.
  • To include asset files/directories in your executable and/or to build a node app that depends on native Node modules, read the documentation.
  • Now you can use your output executable app.exe as a standalone compiler that does not require Node or NPM anymore.

save | comments | report | share on