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
| Hey there |
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
| # F = C * 1.8 + 32 | |
| print('The program starts') | |
| import tensorflow as tf | |
| tf.logging.set_verbosity(tf.logging.ERROR) | |
| import numpy as np | |
| import matplotlib.pyplot as plt |
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
| <?xml version="1.0" encoding="utf-8"?> | |
| <androidx.cardview.widget.CardView | |
| xmlns:android="http://schemas.android.com/apk/res/android" | |
| xmlns:app="http://schemas.android.com/apk/res-auto" | |
| android:layout_width="match_parent" | |
| android:layout_height="wrap_content" | |
| android:orientation="vertical" | |
| android:minWidth="280dp" | |
| app:cardCornerRadius="20dp"> |
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
| AnimatorSet animatorSet = new AnimatorSet(); | |
| animatorSet.playTogether( | |
| ObjectAnimator.ofFloat(image,"translationY",-1000,0), | |
| ObjectAnimator.ofFloat(image,"alpha",0,1), | |
| ObjectAnimator.ofFloat(text,"translationX",-200,0) | |
| ); | |
| animatorSet.setInterpolator(new DescelerateInterpolator()); | |
| animatorSet.setDuration(2000); | |
| animatorSet.addListener(new AnimatorListenerAdapter(){ | |
| @Override public void onAnimationEnd(Animator animation) { |
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 int convertDip2Pixels(Context context, int dip) { | |
| return (int)TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, dip, context.getResources().getDisplayMetrics()); | |
| } |
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
| //Install firebase admin | |
| //npm install firebase-admin --save | |
| //Get generated key and place it in the working directory | |
| //Replace line 7 file name with yours | |
| var firebase = require("firebase-admin"); | |
| var serviceAccount = require("./service_accountKey.json"); |
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
| //var express = require('express'); | |
| //var app = express(); | |
| app.use((req, res, next) => { | |
| res.header('Access-Control-Allow-Origin', '*'); | |
| res.header('Access-Control-Allow-Headers', "Origin, X-Requested-With, Content-Type, Accept, Authorization"); | |
| if (req.method === 'OPTIONS') { | |
| res.header('Access-Control-Allow-Method', 'PUT, POST, PATCH, DELETE, GET'); | |
| return res.status(200).json({}); |
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
| <?xml version="1.0" encoding="utf-8"?> | |
| <androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android" | |
| xmlns:app="http://schemas.android.com/apk/res-auto" | |
| xmlns:tools="http://schemas.android.com/tools" | |
| android:layout_width="match_parent" | |
| android:layout_height="match_parent" | |
| app:cardCornerRadius="20dp"> | |
| <androidx.constraintlayout.widget.ConstraintLayout | |
| android:id="@+id/linearLayout" |
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
| import java.text.SimpleDateFormat; | |
| import java.util.Date; | |
| import java.util.Locale; | |
| public class EasyLogger { | |
| private static StringBuilder sb; | |
| /** | |
| * A way to log all around application |
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 class Helpers { | |
| final protected static char[] hexArray = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'}; | |
| public static String bytesToHex(byte[] bytes) { | |
| char[] hexChars = new char[bytes.length * 2]; | |
| int v; | |
| for (int j = 0; j < bytes.length; j++) { | |
| v = bytes[j] & 0xFF; | |
| hexChars[j * 2] = hexArray[v >>> 4]; | |
| hexChars[j * 2 + 1] = hexArray[v & 0x0F]; |
OlderNewer