Sign Up Now!

Sign up and get personalized intelligence briefing delivered daily.


Sign Up

Articles related to "method"


Meijer: Your Mouse Is a Database

  • There are many ways to derive Rx, some involving category theory and appealing to mathematical duality, but this article shows how every developer could have invented Rx by crossing the standard JDK (Java Development Kit) Future<T> interface with the GWT (Google Web Toolkit) AsyncCallBack<T> interface to create the pair of interfaces IObservable<T> and IObserver<T> that model asynchronous data streams with values of type T.
  • Every time the changedUpdate event fires, the corresponding asynchronous data stream of type Observable<string> pushes a new string to its subscribers, representing the current content of the text field.
  • Asynchronous data streams represented by the IObservable<T> interface (or Observable<T> in Java) behave as regular collections of values of type T, except that they are push-based or streaming instead of the usual pull-based collections such as arrays and lists that implement the IEnumerable<T> interface (or in Java iterable<T>).

save | comments | report | share on


Typescript Dependency Injection in 200 LOC

  • Like Anders mentions in his talk, Typescript at the time was missing two crucial features which AtScript was meant to address; Decorators and Reflection.
  • Traditional pure javascript containers would use hacks like casting the function or class to a string and manually parsing that string to get the names of each parameter/property.
  • To combat this, Typescript uses a library called reflect-metadata to store additional type information.
  • Tokens can either refer to a class or, in cases where the parameter type doesn't give enough context about what to inject, a constant attached to a parameter with a decorator.
  • We use the assertInjectableIfClassProvider method to make sure all the classes which are provided to the container have been marked as Injectable, and therefore have metadata.
  • We invoke the reflect-metadata API in order to get a list of types for each parameter of the constructor.

save | comments | report | share on


Modern dining philosophers

  • The problem is to design a concurrent algorithm that will make the philosophers alternate eating and thinking, following the above constraints, without deadlocking, and without starving.
  • This diagram provides a good approximation of the problem, but it leaves one important detail out: what happens if a philosopher cannot pick up the forks to start eating?
  • That’s the only framework implementation needed to start solving complex concurrency problems using tasks (well, dining philosophers is not exactly a complex problem, but still…).
  • One simple way of solving this problem is to add a waiter: this is one actor that is responsible for distributing the forks among the philosophers (see arbitrator solution).

save | comments | report | share on


DiffEqFlux.jl – A Julia Library for Neural Differential Equations

  • In this blog post we will show you how to easily, efficiently, and robustly add differential equation (DiffEq) solvers to neural networks in Julia.
  • Recently, these native Julia differential equation solvers have successfully been embedded into the Flux deep learning package, to allow the use of a full suite of highly tested and optimized DiffEq methods within neural networks.
  • There are three common ways to define a nonlinear transform: direct modeling, machine learning, and differential equations.
  • So as our machine learning models grow and are hungry for larger and larger amounts of data, differential equations have become an attractive option for specifying nonlinearities in a learnable (via the parameters) but constrained form.
  • Turns out that differential equations solvers fit this framework, too: A solve takes in some vector p (which might include parameters like the initial starting point), and outputs some new vector, the solution.

save | comments | report | share on


Behold, a smartphone devoid of buttons and ports

  • Meizu calls it, fitting, the “Zero.” It’s equal parts fascinating and maddening.
  • So good on Meizu for getting there first, I suppose.
  • So, no Sim card slot, and no charging port — thank goodness for eSIM tech and wireless charging.
  • As for the speaker grilles, those have been replaced by something the company calls “mSound 2.0,” which appears to utilize the screen for sound.
  • Honestly,  it sound like a phone created on a dare, but an impressive feat nonetheless.
  • The rest of the relevant info, like price and if/when it’s coming to the States are still very much up in the air.
  • Mobile World Congress next month seems as good a time as any to announce all of that.

save | comments | report | share on


Neural ODE's: Understanding how they model data

  • However most interesting ODE problems can’t be solved analytically and require numerical methods.
  • When we can’t find the solution to an ODE analytically, and this is often the case in practical situations, we need to resort to numerical methods which approximate a solution at discrete evaluation points.
  • In summary, by using Euler’s method in the context of a machine learning optimisation problem, we treat \(a\) as a free parameter.
  • However in more complex regression (and classification) problems we use gradient descent to solve for the parameters.
  • Even if we use stochastic gradient descent, we still require several epochs, passing through the whole dataset, in order to find the optimal parameters.
  • We then need to only evaluate the loss function at a handful of data points, before deciding how to update the free parameters.

save | comments | report | share on


Typescript Dependency Injection in 200 LOC

  • Like Anders mentions in his talk, Typescript at the time was missing two crucial features which AtScript was meant to address; Decorators and Reflection.
  • Traditional pure javascript containers would use hacks like casting the function or class to a string and manually parsing that string to get the names of each parameter/property.
  • To combat this, Typescript uses a library called reflect-metadata to store additional type information.
  • Tokens can either refer to a class or, in cases where the parameter type doesn't give enough context about what to inject, a constant attached to a parameter with a decorator.
  • We use the assertInjectableIfClassProvider method to make sure all the classes which are provided to the container have been marked as Injectable, and therefore have metadata.
  • We invoke the reflect-metadata API in order to get a list of types for each parameter of the constructor.

save | comments | report | share on


What's New in JavaScript for 2019

  • However, JavaScript engine implementations, such as V8 (used by Chrome and Node.js) and Firefox’s SpiderMonkey, may add experimental support for proposed features before reaching Stage 4, so that developers can test and provide feedback.
  • Disclaimer: Because these are Stage 3 candidates, the final ES2019 language specification may not include all of these proposals.
  • The interesting trivia about this language feature is that it is already implemented in a number of JavaScript engines.
  • For the past few years, TC39 has consistently released new editions of the ECMA-262 ECMAScript Language Specification in June.
  • Some of the proposed language features are already available in JavaScript engines and utilities.
  • Babel is a JavaScript utility that allows you to use the latest language features that may not yet be supported in all browsers and environments.

save | comments | report | share on


Flutter - Futures - Isolates - Event Loop

  • During the whole life of the thread, a single internal and invisible process, called the “Event Loop”, will drive the way your code will be executed and in which sequence order, depending on the content of both MicroTask and Event Queues.
  • In other words, it is advisable to try to use as much as possible the notion of Futures (directly or indirectly via async methods) as the code of these Futures will be run as soon as the Event Loop has some time.
  • Another factor that could help you decide whether to use a Future or an Isolate is the average time it takes to run some code.
  • It is also important to keep in mind that Flutter (Dart) is Single-Thread therefore, in order to please the users, developers must make sure that the application will run as smoothly as possible.

save | comments | report | share on


Researchers use Samsung data and AI to predict mobile game churn

  • But, as the coauthors note, previous approaches could only forecast churn of a single game or a few mobile games, and they didn’t consider user-app interaction data, such as Wi-Fi connection status, screen brightness, and audio volume.
  • Moreover, the team’s method models the relationships between users and games with graphs (databases that depict the relationships connecting various entities), and it uses deep neural networks to capture both contextual information and the “dynamic” ways users interact with games.
  • To build the datasets used to train the machine learning models, the researchers collected four months’ worth of data — consisting of tens of thousands of mobile games and hundreds of millions of users — from the Samsung Game Launcher.
  • Specifically, the team recorded play history, game profiles (including features like genre, developer, number of downloads, rating values, and number of ratings), and user information (i.e., device model and region).

save | comments | report | share on