Quantcast
Channel: Programming Rants
Browsing all 204 articles
Browse latest View live

Svelte Tutorial 5: Events (English & Indonesia)

EnglishEventsAs we've briefly seen already, you can listen to any event on an element with the on: directive:<script>let m = { x: 0, y: 0 };function handleMousemove(event) {m.x =...

View Article


Svelte Tutorial 6: Bindings (English & Indonesia)

EnglishBindingsAs a general rule, data flow in Svelte is top down — a parent component can set props on a child component, and a component can set attributes on an element, but not the other way...

View Article


Svelte Tutorial 3: Component Properties (English & Indonesia)

EnglishProps or properties used when we want to pass data or value from one component to its children.Declaring props To declare props we need to use keyword export. For example when we have app like...

View Article

Svelte Tutorial 7: Lifecycle (English & Indonesia)

EnglishLifecycleEvery component has a lifecycle that starts when it is created, and ends when it is destroyed. There are a handful of functions that allow you to run code at key moments during that...

View Article

Svelte Tutorial 8: Stores (English & Indonesia)

EnglishStoresNot all application state belongs inside your application's component hierarchy. Sometimes, you'll have values that need to be accessed by multiple unrelated components, or by a regular...

View Article


Svelte Tutorial 9: Motion (English & Indonesia)

EnglishTweenedTweened is svelte tools to help you build slick user interfaces that use animation to communicate changes. Below is example of progress bar, tweened is used to make transition smoother....

View Article

Svelte Tutorial 10: Transitions (English & Indonesia)

EnglishWe can make more appealing user interfaces by gracefully transitioning elements into and out of the DOM. Svelte makes this very easy with the transition directive.The Transitions DirectiveThis...

View Article

Svelte Tutorial 11: Animations (English & Indonesia)

EnglishThe Animate DirectiveIn the previous example, we used deferred transitions to create the illusion of motion as elements move from one todo list to the other.To complete the illusion, we also...

View Article


Svelte Tutorial 12: Actions (English & Indonesia)

EnglishThe Use DirectiveActions are essentially element-level lifecycle functions. They're useful for things like:interfacing with third-party librarieslazy-loaded imagestooltipsadding custom event...

View Article


Svelte Tutorial 13: Classes (English & Indonesia)

EnglishThe Class DirectiveLike any other attribute, you can specify classes with a JavaScript attribute, seen here:<button  class="{current === 'foo' ? 'active' : ''}"  on:click="{() => current =...

View Article

Svelte Tutorial 14: Component Composition (English & Indonesia)

EnglishSlotsJust like elements can have children...<div>  <p>I'm a child of the div</p></div>...so can components. Before a component can accept children, though, it needs to...

View Article

Svelte Tutorial 15: Context API (English & Indonesia)

EnglishContext APIThe context API provides a mechanism for components to 'talk' to each other without passing around data and functions as props, or dispatching lots of events. It's an advanced...

View Article

Svelte Tutorial 16: Special Elements (English & Indonesia)

English<svelte:self>Svelte provides a variety of built-in elements. The first, <svelte:self>, allows a component to contain itself recursively.It's useful for things like this folder tree...

View Article


Svelte Tutorial 17: Module Context (English & Indonesia)

EnglishSharing CodeIn all the examples we've seen so far, the <script> block contains code that runs when each component instance is initialised. For the vast majority of components, that's all...

View Article

Image may be NSFW.
Clik here to view.

Svelte Native Tutorial (English & Indonesia)

EnglishSvelte Native is a new approach to building mobile applications using NativeScript. NativeScript is an open source framework to build cross-platform, native iOS and Android apps without web...

View Article


Image may be NSFW.
Clik here to view.

Techempower Framework Benchmark Round 19

The result for Techempower framework benchmark round 19 is out, as usual the most important benchmark is the update and multi query benchmark:This time, C++ (drogon), Rust (actix) are the top tier...

View Article

Faster loading googlefonts

Sometimes when you use googlefonts, the external/CDN could be the bottleneck (especially if you live in a country where the hop to next country is slow, like in Indonesia). This article give a good...

View Article


Image may be NSFW.
Clik here to view.

Intermediate Languages to Executable Binary

There's already bunch of alternative of programming languages implementation that compiles to intermediate language/bytecode, such as Java (using javac) and C# (using csc or old mcs) which can be run...

View Article

Javascript ES6 Loops, Map, and Spread Operator

It's been a while (14 years) since I last learn about Javascript, I think at that time still ES5, but since ES6 (=ES2015, released June 2015) and newer ones already out (but most of the browsers...

View Article

Image may be NSFW.
Clik here to view.

Implement CI in Gitlab

In this example we would create a gitlab CI Pipeline to compile and run application and check whether the output of that program is as expected. First let's create a source code that we want to test,...

View Article
Browsing all 204 articles
Browse latest View live