Kod Örnekleri & Teknik Rehberler
Python, C#, PHP ve JavaScript üzerine profesyonel kod örnekleri ve yapay zeka rehberleri.
Kategoriler
İlgilendiğin konuya hızlıca ulaş
Python & Veri Bilimi
Python ile temel programlamadan veri bilimine, otomasyon scriptlerinden makine öğrenmesine kadar geniş bir yelpazede örnekler.
Tüm Python ÖrnekleriBelirlenen bir haber sitesinden anlık başlıkları çekip listeleyen temel scraping örneği.
import requests
from bs4 import BeautifulSoup
url = "https://news.ycombinator.com/"
page = requests.get(url)
soup = BeautifulSoup(page.content, "html.parser")
for story in soup.find_all("span", class_="titleline")[:10]:
print(story.text)
from bs4 import BeautifulSoup
url = "https://news.ycombinator.com/"
page = requests.get(url)
soup = BeautifulSoup(page.content, "html.parser")
for story in soup.find_all("span", class_="titleline")[:10]:
print(story.text)
C# & .NET Core
C# ile masaüstü uygulamalardan web API'lerine, Entity Framework'ten LINQ sorgularına profesyonel düzeyde kod örnekleri.
Tüm C# ÖrnekleriString Replace İşlemi
CSHARPString içindeki ifadelerin değiştirilmesi için String.Replace ifadesi kullanılmaktadır.
string mystr = "www.kodornekleri.com";
string newstr = mystr.Replace("com", "COM");
MessageBox.Show(newstr, "C# String Replace", MessageBoxButtons.OK, MessageBoxIcon.Information);
string newstr = mystr.Replace("com", "COM");
MessageBox.Show(newstr, "C# String Replace", MessageBoxButtons.OK, MessageBoxIcon.Information);
PHP & Web
PHP ile dinamik web siteleri, form işleme, veritabanı bağlantıları ve modern MVC yapılarına dair pratik örnekler.
Tüm PHP ÖrnekleriIf ....Else ifadesi belirtilen durumun doğru ya da yanlış olmasına göre program akışına yön vermektedir.
<?
$site = "www.ME.com.tr";
if ( $site == "www.ME.com.tr" ) {
echo ("Şu anda bulunduğunuz sitenin adresi: www.ME.com.tr");
}
elseif ($site == "www.ME.com.tr/forums") {
echo ("Şu anda bulunduğunuz sitenin adresi: www.ME.com.tr/forums");
}
else {
echo ("Şu anda ME.com sitesinde değilsiniz.");
}
?>
$site = "www.ME.com.tr";
if ( $site == "www.ME.com.tr" ) {
echo ("Şu anda bulunduğunuz sitenin adresi: www.ME.com.tr");
}
elseif ($site == "www.ME.com.tr/forums") {
echo ("Şu anda bulunduğunuz sitenin adresi: www.ME.com.tr/forums");
}
else {
echo ("Şu anda ME.com sitesinde değilsiniz.");
}
?>
JavaScript (ES6+)
Modern JavaScript ile DOM manipülasyonu, async/await, fetch API, modüller ve interaktif web bileşenleri örnekleri.
Tüm JavaScript ÖrnekleriBu kategoride içerik bulunamadı.