Skip to content

Instantly share code, notes, and snippets.

from django.core.management.base import BaseCommand
from django.contrib.auth.models import Permission
from django.contrib.contenttypes.models import ContentType
import re
VERB_MAP = {
'add': 'Ekleyebilir',
'change': 'Düzenleyebilir',
'delete': 'Silebilir',
'view': 'Görüntüleyebilir',
@mcihad
mcihad / build.gradle
Created August 26, 2025 05:29
KPS Servislerini java ile sorgulama, Kimlik Doğrulama Servisi için geçerli sadece
plugins {
id 'java'
id 'org.springframework.boot' version '3.5.5'
id 'io.spring.dependency-management' version '1.1.7'
id "com.github.bjornvester.wsdl2java" version "2.0.2"
}
dependencies {
[package]
name = "deneme"
version = "0.1.0"
edition = "2024"
[dependencies]
handlebars = "6.3.2"
rocket = "0.5.1"
# Build profile tweaks to speed up iteration and improve release build throughput.
<!DOCTYPE html>
<html lang="tr">
<head>
<meta charset="utf-8" />
<title>{{name}} template</title>
</head>
<body>
<h1>Merhaba, bu {{name}} şablonu</h1>
use rocket::http::Status;
use rocket::response::content::RawHtml;
use rocket::tokio::time::{Duration, sleep};
#[macro_use]
extern crate rocket;
use std::collections::HashMap;
#[get("/")]
using Microsoft.AspNetCore.Authentication;
using Microsoft.AspNetCore.Authentication.Cookies;
using Microsoft.AspNetCore.Authentication.OpenIdConnect;
using Microsoft.IdentityModel.Protocols.OpenIdConnect;
using Microsoft.IdentityModel.Tokens;
using System.Reflection;
using System.Security.Claims;
using Microsoft.EntityFrameworkCore;
using Sivasbeltr.WorkCollab.Web.Data;
from qgis.core import *
from qgis.gui import *
@qgsfunction(group='Custom', referenced_columns=[])
def get_park_id(geometry):
layer = QgsProject.instance().mapLayersByName('Parklar')[0] # "Parklar" katmanını al
for feature in layer.getFeatures():
if feature.geometry().intersects(geometry): # Kesişen parkı bul
return feature['id'] # Parkın id'sini döndür
return None # Kesişen park yoksa NULL döndür
object NumberExtension {
private val birler = arrayOf("", "Bir", "İki", "Üç", "Dört", "Beş", "Altı", "Yedi", "Sekiz", "Dokuz")
private val onlar = arrayOf("", "On", "Yirmi", "Otuz", "Kırk", "Elli", "Altmış", "Yetmiş", "Seksen", "Doksan")
private val gruplar = arrayOf("", "Bin", "Milyon", "Milyar", "Trilyon", "Katrilyon")
@JvmStatic
fun Long.humanize(): String {
if (this == 0L) return "Sıfır"
package com.example.demo.services;
import io.jsonwebtoken.Claims;
import io.jsonwebtoken.Jws;
import io.jsonwebtoken.Jwts;
import io.jsonwebtoken.SignatureAlgorithm;
import io.jsonwebtoken.security.Keys;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
public class BirthDay
{
private const string Template =
"""
Hey,
{name}'s birthday is on {dob}, which is in {month}.
Let's plan a party!