This file contains hidden or 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 static void showSnackbar(Activity activity, View view){ | |
| Snackbar snackbar = Snackbar.make(view, "", Snackbar.LENGTH_SHORT); | |
| Snackbar.SnackbarLayout snackbarLayout = (Snackbar.SnackbarLayout) snackbar.getView(); | |
| snackbar.getView().setBackgroundColor(Color.TRANSPARENT); | |
| View customSnackView = activity.getLayoutInflater().inflate(R.layout.snackbar_rounded, null); | |
| snackbarLayout.addView(customSnackView, 0); | |
| snackbar.show(); | |
| } | |
This file contains hidden or 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
| #include <SoftwareSerial.h> | |
| SoftwareSerial BTSerial(10, 11); // RX | TX | |
| String isim = "OMFAER"; | |
| int parola = 1001; | |
| void setup() | |
| { | |
| Serial.begin(9600); | |
| Serial.println("AT Komutları Çalıştırılıyor.."); |
This file contains hidden or 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
| #include <SoftwareSerial.h> | |
| SoftwareSerial BTSerial(10, 11); // RX | TX | |
| void setup() | |
| { | |
| Serial.begin(9600); | |
| Serial.println("Device is ready. You can type AT command..."); | |
| BTSerial.begin(38400); // HC-05 default baud rate | |
| delay(1000); | |
| } |
This file contains hidden or 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
| void getData() throws IOException { | |
| String msg = "1"; | |
| msg += "\n"; | |
| mBluetoothSocket.getOutputStream().write(msg.toString().getBytes()); | |
| } | |
| void beginListenForData() { | |
| final Handler handler = new Handler(); | |
| final byte delimiter = 10; //This is the ASCII code for a newline character |
This file contains hidden or 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
| int incomingByte; | |
| void setup() { | |
| Serial.begin(9600); | |
| } | |
| void loop() { | |
| if (Serial.available() > 0) { | |
| incomingByte = Serial.read(); | |
| if (incomingByte == '1') { |
This file contains hidden or 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
| // No Security | |
| { | |
| "rules": { | |
| ".read": true, | |
| ".write": true | |
| } | |
| } |
This file contains hidden or 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
| /**GradienTextView Trick | |
| * Cited From Rahul Chowdhury | |
| * https://blog.upcurve.co/how-to-create-a-gradient-textview-in-android-c21331da86ab | |
| **/ | |
| import android.content.Context; | |
| import android.graphics.LinearGradient; | |
| import android.graphics.Shader; | |
| import android.util.AttributeSet; | |
| import androidx.appcompat.widget.AppCompatTextView; |
This file contains hidden or 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
| def fib(n) | |
| if n == 1 | |
| puts 0 | |
| else | |
| fib = [0,1] | |
| (n-2).times do | |
| fib << fib[-1] + fib[-2] | |
| end | |
| puts fib.join(' ') | |
| end |
This file contains hidden or 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
| /* | |
| Created by omfaer for [Pidecik](https://github.com/omfaer/Pidecik) | |
| [Pidecik Generate Script](https://gist.github.com/omfaer/afc664374c674cd2d4295d0a8a79cab6) | |
| */ | |
| USE Pidecik | |
| GO | |
| DELETE FROM CategoryProduct | |
| DELETE FROM CustomerOrder | |
| DELETE FROM OrderPersonel | |
| DELETE FROM OrderProduct |
This file contains hidden or 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
| USE [master] | |
| GO | |
| /****** https://github.com/omfaer/Pidecik | |
| ------------------------------ | |
| How To? | |
| 1.Install SQL Server | |
| 2.You need to change the "YOUR_FILE_PATH" with your database file path. | |
| 3.Execute this script | |
| -That's all | |
| ------------------------------ |
NewerOlder