Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Said Çankıran Scankiran

🏠
Working from home
  • Antalya
View GitHub Profile
View exampleNotification
{
"aps": {
"alert": "Push Notifications Test",
"sound": "default",
"badge": 1
}
}
@Scankiran
Scankiran / registerPushNotification()
Last active Mar 28, 2020
registerPushNotification function.
View registerPushNotification()
func registerPushNotifications() {
UNUserNotificationCenter.current()
.requestAuthorization(options: [.alert, .sound, .badge]) {(granted, error) in
print("Permission granted: \(granted)")
}
}
@Scankiran
Scankiran / application(_:didFinishLaunchingWithOptions:)
Created Mar 28, 2020
application(_:didFinishLaunchingWithOptions:)
View 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 Dec 30, 2018
Sophie Germen Number With Java
View sophie_germen.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;