Rust Traits

What is a trait? A trait is a way to enable reuse methods. We can think about traits that have some of the features of interfaces and abstract classes, and also have other features that these don’t have. We will cover all of these in this blog post. Rust doesn’t have fully Devamı…

Rust iterators

What are iterators in Rust? Anything which implements IntoIterator trait called as an iterator. Vec struct is implements iterator and all vectors are actually an iterator. And for loops are uses iterators in background. let v = vec![1, 2, 3, 4]; for num in v { println!(“num: {}”, num); } for loops are Devamı…

Rust’ta Asenkronluk Mevzusu

Bu makale bir eğitim içeriğinden ziyade Rust‘ta asenkronluk mevzusuyla ilgili ulaştığım kanıları ihtiva edecektir. İnternette zibilyon tane eğitim içeriği mevcut olduğundan dolayı bir eğitim serisi başlatmayı planlamıyorum şimdilik ama açıkçası bunu yapmayı düşünmüyor da değilim. Çünkü internetteki eğitim serileri benim mevzuya bakış açıma ve bilgi birikimime uyum sağlamıyorlar genellikle. Birçok Devamı…

Rust question mark operator

Rust is awesome language, blazingly fast, low level but of course it can be used in high level targets wery well. Now I will be talk about an interesting operator in Rust: Question Mark Operator. Everything is about error handling. As you know Rust doesn’t have any try-catch syntax. Instead Devamı…

önce , admin tarafından

Ethereum Fee Hesaplama (Gas Limit, Gas Price)

Ethereum’da bir transaction oluşturduğumuzda bunun işlenebilmesi için bir fee belirlememiz gerekiyor. Bu fee ne yazıkki tek bir rakamdan oluşmuyor. Bu yüzden gerçekte harcanan fee miktarını küçük bir matematiksel hesaplama neticesinde bulup transaction datasına eklememiz gerekiyor. Bu işleme geçmeden önce Ethereum’un çalışma mantığından bahsetmemiz gerekiyor. Bunu anladığımızda neden fee’yi tek bir Devamı…

Convert print_r result to JSON

As you know json_encode is encoding only array or public properties of an object. But print_r can expose the protected and private properties in an object. Sometimes we need to these hidden properties. For this purpose we can convert print_r result to JSON result. Here is the function we need: if (!function_exists(‘pr2json’)) Devamı…

PHPStorm Auto Import in File Scope

For example you’re developing an app in Laravel. You want to add a new Route to routes/web.phpfile. Route::get(‘payment’, ‘App\\Http\\Controllers\[email protected]’); As you can see you must write class and method name as string. But you can make this better way: Route::get(‘payment’, [App\Http\Controller\PaymentController::class, ‘pay’]); This is better then other becouse you can open Devamı…