Skip to content

Instantly share code, notes, and snippets.

View Scankiran's full-sized avatar
🏠
Working from home

Said Çankıran Scankiran

🏠
Working from home
View GitHub Profile
@Scankiran
Scankiran / exampleNotification
Created April 5, 2020 11:13
exampleNotification
{
"aps": {
"alert": "Push Notifications Test",
"sound": "default",
"badge": 1
}
}
@Scankiran
Scankiran / registerPushNotification()
Last active March 28, 2020 12:34
registerPushNotification function.
func registerPushNotifications() {
UNUserNotificationCenter.current()
.requestAuthorization(options: [.alert, .sound, .badge]) {(granted, error) in
print("Permission granted: \(granted)")
}
}
@Scankiran
Scankiran / application(_:didFinishLaunchingWithOptions:)
Created March 28, 2020 12:33
application(_:didFinishLaunchingWithOptions:)
import UIKit
import UserNotifications
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
func registerPushNotifications() {
UNUserNotificationCenter.current()
.requestAuthorization(options: [.alert, .sound, .badge]) {
(granted, error) in
@Scankiran
Scankiran / sophie_germen.java
Last active December 30, 2018 07:14
Sophie Germen Number With Java
import java.util.ArrayList;
import java.util.List;
//Çözüldü-Solved
public class Sophie_Germen {
//A bir asal sayi iken 2.a+1 sayısıda asal sayı oluyorsa a sayısına Sophie Germen asalı denir.
public static void main(String[] args) {
List<Integer> list = new ArrayList<Integer>();
for (int i = 2; i < 100; i++) {
boolean divide = false;