Skip to content

Instantly share code, notes, and snippets.

View SaBenBurra's full-sized avatar

Buğra SaBenBurra

  • Mersin, Turkey
View GitHub Profile
public class Main {
public static void main(String[] args) {
int number1 = 5;
int number2 = 10;
number1 = number2;
number2 = 15;
System.out.println(number1);
}
}
public class SampleClass {
int number;
public SampleClass(int number) {
this.number = number;
}
}
public class Main {
public void main(String[] args) {
SampleClass myObject1 = new SampleClass(5);
SampleClass myObject2 = myObject1;
myObject2.number = 20;
System.out.println(myObject1.number);
}
}
public class FirebasePushNotification {
public boolean sendNotificationToSingleUser(String data, String clientId) {
//işlemler
}
public boolean sendNotificationToAllUsers(String data) {
//işlemler
}
}
public class Main {
public static void main(String[] args) {
FirebasePushNotification notificationService = new FirebasePushNotification();
notificationService.sendNotificationToSingleUser("Hello", "123456");
notificationService.sendNotificationToAllUsers("Hello world");
//...
notificationService.sendNotificationToSingleUser("Hello", "123456");
notificationService.sendNotificationToAllUsers("Hello world");
public interface IPushNotificationService {
public boolean sendNotificationToSingleUser(String data, String clientId);
public boolean sendNotificationToAllUsers(String data);
}
public class OnesignalPushNotification implements IPushNotificationService {
public boolean sendNotificationToSingleUser(String data, String clientId) {
//işlemler
}
public boolean sendNotificationToAllUsers(String data) {
//işlemler
}
}
public class FirebasePushNotification implements IPushNotificationService {
public boolean sendNotificationToSingleUser(String data, String clientId) {
//işlemler
}
public boolean sendNotificationToAllUsers(String data) {
//işlemler
}
}
public class Main {
public static void main(String[] args) {
IPushNotificationService notificationService = new OnesignalPushNotification();
// veya
//IPushNotificationService notificationService = new FirebasePushNotification();
notificationService.sendNotificationToSingleUser("Hello", "123456");
notificationService.sendNotificationToAllUsers("Hello world");
//...
@SaBenBurra
SaBenBurra / i3config
Last active February 25, 2024 14:03
my i3wm config file
set $mod Mod1
#default_border none font pango:monospace 8
exec --no-startup-id dex-autostart --autostart --environment i3
exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock --nofork
exec --no-startup-id nm-applet
set $refresh_i3status killall -SIGUSR1 i3status