This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<title>Sayfa Ismi</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<link rel="stylesheet" type="text/css" media="screen" href="main.css" /> <!-- CSS Dosyalarımızı tanıtıyoruz. --> | |
<script src="main.js"></script> <!-- Script dosyalarımızı tanıtıyoruz. --> | |
</head> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<title>Sayfa Ismi</title> | |
</head> | |
<body> | |
<h1>Ben Headerim1</h1> <!-- <h1> etiketi yerine <h1 style="color:red"></h1> yazın farkı görün --> | |
<h2>Ben Headerim2</h2> <!-- <h2> etiketi yerine <h2 style="background-color:blue"></h2> yazın farkı görün --> | |
<h3>Ben Headerim3</h3> <!-- <h3> etiketi yerine <h3 style="font-family:arial"></h3> yazın farkı görün --> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var express = require('express'); /* Server anayapımızı kurmamız için gerekli yapıyı çağırıyoruz. */ | |
var app = express(); /* Çağırdığımız express yapımızı ayağa kaldırıyoruz ve onu app adında değişkene eşliyoruz. */ | |
var path = require('path'); /* Ben gelen isteklere html cevap göndreceğim için doyaların path(dizin bilgilerini) çağırabileceğim modülü ekliyorum. */ | |
/* Aşağıdaki kodda eğer app diye çağırdığımız serverimizin "/" dizinine get metodu ile çağırma gerçekleşirse ne yapacağımızı söylüyoruz. */ | |
app.get('/', (req, res) => { | |
res.sendFile(path.join(__dirname, 'index.html')); | |
}); | |
/* Yukarıda req,res çiftini görüyoruz. Bunlardan req: Clienttan gelen isteği, Res: Bizim ona vereceğimiz cevabı temsil ediyor. Bu örnekte res.sendFile ile kullanıcıya response olarak bir index.html dosyası gönderiyoruz. */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var http = require('http'); //Burada binamızın oturacağı zemini söylüyoruz. | |
var express = require('express'); // Ve burada ise zemine dikeceğimiz binayı tanımlıyoruz(express bu binayı tamamen hazır bir şekilde bize veriyor). | |
var app = express(); // Bu tanımladığımız binayı artık çalıştırmaya başlıyoruz. | |
var server = http.createServer(app); // Çalıştırdığımız ve hazır olan binamızı http.create server ile zemine oturdup ikisini birleştiriyoruz ve böylece serverimiz full halde hazır oluyor. | |
var io = require('socket.io').listen(server); // Şimdi ise bu örnekte chat app yapacağımız için binamızın tepesine anten takıyoruz. Bu antenin ismi io(input-output) Socket.io modülü | |
app.get('/', (req, res) => { | |
res.sendFile('./index.html', {root: __dirname}); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="tr"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>Socket.io Sample Page</title> | |
<style> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import json | |
origin_url = "http://api.openweathermap.org/data/2.5/weather?q=Istanbul,tr&APPID=378c60283dcc17cfe37eb295b61c5c37" | |
response = requests.get(origin_url) | |
jsonResponse = json.loads(response.text) | |
print( "Sicaklik: " + str( jsonResponse["main"]["temp"] - 273 ) + " *C" ) | |
print( "Basinc: " + str(jsonResponse["main"]["pressure"]) + " Paskal." ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ekleme , çıkartma | |
users = ["alper","berk","baris","ali","ahmet"] | |
users.append("onur") | |
copyof_users = users.copy() | |
numof_alper = users.count("alper") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
okulnumarasi = 84 | |
okuladi = "İstanbul Atatürk Ortaokulu" | |
# dictionary veri tipi | |
ogrenci = { | |
"okulbilgileri": { | |
"okulno": 84, | |
"okuladi": "İstanbul Atatürk Ortaokulu", | |
"sinav_notu": 71.2 | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3.9" | |
# define network | |
# Before docker-compose up you should create network as: | |
# docker create network wpnet | |
networks: | |
wpnet: | |
external: true | |
# register services | |
services: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Simple Node.js Express Hello World App | |
const express = require('express') | |
const app = express() | |
const port = 3000 | |
app.get('/', (req, res) => { | |
res.send('Hello World!') | |
}) | |
app.listen(port, () => { |
OlderNewer