This file contains 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
ValueEventListener postListener = new ValueEventListener() { | |
@Override | |
public void onDataChange(DataSnapshot dataSnapshot) { | |
Iterable<DataSnapshot> snapshot = dataSnapshot.child("book").getChildren(); | |
for (DataSnapshot snapshot1 : snapshot) { | |
Book book = snapshot1.getValue(Book.class); | |
tvData.setText(book.getName()); | |
} | |
//tvData.setText(book.getName()); Textview e datayı bind ettik. | |
} |
This file contains 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
public class FirebaseUtil { | |
public static void saveData(){ | |
List<Author> authorList = new ArrayList<>(); | |
Author author1 = new Author("Robert C. Martin"); | |
authorList.add(author1); | |
Book book = new Book("Clean Code", authorList); | |
DatabaseReference database = FirebaseDatabase.getInstance().getReference(); | |
DatabaseReference databaseBook = database.child("book"); |
This file contains 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
compile 'com.google.firebase:firebase-database:11.8.0' |
This file contains 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
image = imread('image.png'); | |
image = rgb2gray(image); | |
disp(max_find(image)) | |
figure; | |
imshow(image); | |
function x = max_find(image) % Max fonksiyonunu kullanmadan resim de ki en yüksek piksel değerini bulma. | |
[w,h] = size(image); | |
x = image(1,1); |
This file contains 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
I = imread('image.PNG'); | |
%I = rgb2gray(I); | |
[r c] = size(I); | |
result = zeros(r,c); | |
sub = I; | |
figure; | |
imshow(I) | |
title('Original Image'); | |
for i=2:r-1 | |
for j=2:c-1 |
This file contains 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
<uses-permission android:name="android.permission.INTERNET" /> | |
<uses-permission android:name="android.permission.VIBRATE" /> |
This file contains 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
public class MyFirebaseMessagingService extends FirebaseMessagingService { | |
private static final String TAG = "MyFirebaseMsgService"; | |
@Override | |
public void onMessageReceived(RemoteMessage remoteMessage) { | |
super.onMessageReceived(remoteMessage); | |
Log.d(TAG, "From: " + remoteMessage.getFrom()); | |
if (remoteMessage.getData().size() > 0) { |
This file contains 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
package yusufcakal.com.cloudmessagging; | |
/** | |
* Created by Yusuf on 19.12.2017. | |
*/ | |
import android.app.NotificationManager; | |
import android.app.PendingIntent; | |
import android.content.Context; | |
import android.content.Intent; |
This file contains 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
<meta-data | |
android:name="com.google.firebase.messaging.default_notification_icon" | |
android:resource="@drawable/ic_stat_ic_notification" /> | |
<meta-data | |
android:name="com.google.firebase.messaging.default_notification_color" | |
android:resource="@color/colorAccent" /> |
This file contains 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
<service | |
android:name=".MyFirebaseInstanceIDService"> | |
<intent-filter> | |
<action android:name="com.google.firebase.INSTANCE_ID_EVENT"/> | |
</intent-filter> | |
</service> |