"Enter"a basıp içeriğe geçin

Kategori: Programlama

Enhancing Home Automation: KDE Plasma and Yeelight Bulbs

I purchased a couple of Xiaomi Smart Led Bulbs a few years ago. In the beginning, it was fun to control the bulbs using a mobile application. However, as someone who spends most of his day in front of a computer, I gradually started feeling uncomfortable using my mobile phone to control the bulbs.

After some research, I’ve discovered that the bulbs can also be controlled from other devices in the same network, thanks to the programming interface the bulbs are providing. So, as a dedicated KDE user for years, I started developing a Plasma 5 widget that provided a simple user interface to control the bulbs next to the clock in the system tray. Unfortunately, the code was quite messy (e.g., I was a beginner with QML widgets, the widget was using a Python script for socket communication with the bulb, etc.), so I’ve never published that version on the web 🙂

Yorum Bırak

Introducing kio-ftps for KDE Frameworks 6

I’m one of the few people around the world who has to access some file servers with FTPS (not to be confused with FTP or SFTP) for work 🙂 Unfortunately, KDE Plasma does not directly support the ftps protocol, but a third-party kf5-kio-ftps library served me well for the good part of the last decade. Recently, KDE Plasma 6.0 & Frameworks 6.0 & Gear 24.02 have been released (kudos to the developers!), which resulted in the kio-ftps library becoming outdated and incompatible. So, long story short, I rolled up my sleeves and ported the library to KDE Plasma 6.0 🙂

Yorum Bırak

IPv4 Ağ ve Yayın Adresi Hesaplama

Bundan birkaç yıl önce üniversitede bilgisayar ağları dersi uygulama saatlerinde öğrencilere IPv4 adresleri konusuyla ilgili soru çözmeleri için basit bir program hazırlamıştım. Program her çalıştırıldığında rastgele bir IPv4 adresi ve 255.255.0.0 ile 255.255.255.240 arası bir alt ağ maskesi üretiyor ve bu iki bilgiden yola çıkarak sırayla bu IP adresinin üyesi olduğu ağın ağ adresi ile yayın adresini hesaplayarak girilmesini istiyor.

Yorum Bırak

wait.h

Birden fazla process ile çalışan kod yazarken bazen wait() / waitpid() sistem çağrılarını kullanmak gerekebilir, bu sistem çağrıları child process yaratan parent process’lerin child’ların bitmelerini beklemek için kullanılır. Örneğin bir child process bir dosyaya yazma yapıyorsa ve parent process daha sonra bu dosyadan okuma yapacaksa önce child’ın tamamen sonlanmasını beklemesi gerekir çünkü child henüz daha dosyaya yazmayı bitirmemişken parent’ın bu dosyadan okuması hatalı sonuçlara yol açabilir.

Yorum Bırak

Eclipse CDT’s “Unable to load memory” Bug and Its Solution

Well, I have never written a post in English on my blog before but considering the current lack of resources available on the internet, I believe a little change would not be so bad but helpful instead 🙂

Today I’ll write about a bug (and its solution) I’ve encountered on using CDT plugin on 64-bit Eclipse IDE. For those who don’t know; Eclipse is a multi-platform development environment mainly used for Java but its capabilities can be expanded via using plugins for other languages (C/C++, Python, PHP…) as well. CDT is the plugin which enables developing C and C++ applications on Eclipse.

Yorum Bırak