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
//import package, classes etc; | |
public class CustomRecyclerAdapter extends RecyclerView.Adapter<CustomRecyclerAdapter.ViewHolder> { | |
private Context context; | |
private List<ModelClass> allData = new ArrayList<ModelClass>(); | |
private OnItemClickListener onItemClickListener; | |
private OnCreateContextMenu onCreateContextMenu; | |
private OnContextMenuItemClickListener onContextMenuItemClickListener; |
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 CustomArrayAdapter extends ArrayAdapter { | |
// declare your custom list with type; | |
private List<YourModelClass> allData = new ArrayList<YourModelClass>(); | |
public CustomArrayAdapter(@NonNull Context context, List<YourModelClass> allData) { | |
super(context, R.layout.your_layout, allData); // add your_layout.xml | |
this.allData = allData; | |
} |
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
<?php | |
$database_name = "your_database_name"; //database name | |
$database_username = "your_database_username"; // database username | |
$database_user_password = "your_database_user_password"; //database user password | |
$table_name = "your_table_name"; // your table name | |
try { | |
$db = new PDO('mysql:host=localhost;dbname=' . $database_name . ';charset=utf8', $database_username, $database_user_password); | |
//echo "Connected"; |
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
//android studio dependency implementation 'com.github.bumptech.glide:glide:4.8.0' | |
RequestOptions options = new RequestOptions() | |
.centerCrop() | |
.placeholder(R.drawable.default_avatar) | |
.error(R.drawable.default_avatar) | |
.diskCacheStrategy(DiskCacheStrategy.ALL) | |
.priority(Priority.HIGH); |
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
<IfModule mod_rewrite.c> | |
RewriteEngine on | |
RewriteBase /your_directory_name_here/ | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteRule ^(.*)$ index.php/$1 [L] | |
</IfModule> |
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
=============== | |
Sublime Text 3 | |
=============== | |
1. AdvancedNewFile | |
2. All Autocomplete | |
3. Auto Semi-Colin | |
4. AutoFileName | |
5. ayu | |
6. Blade Snippets | |
7. Bootstrap 4 Autocomplete |
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
You must already have php and laravel installed in your machine. | |
If you haven’t already a laravel project simply create a new project | |
then create a new laravel project from your Terminal with | |
laravel new | |
Setup your composer for PhpStorm |
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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<!-- Required meta tags --> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | |
<!-- Bootstrap CSS --> | |
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css"> | |
<!-- Ionicons CSS --> |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Sidebar Show Hide</title> | |
<style type="text/css"> | |
.sidebar{ | |
position: fixed; | |
background-color: #dcdcdc; | |
height: 100%; |
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
<style type="text/css"> | |
#marqueecontainer{ | |
position: relative; | |
width: auto; /*marquee width */ | |
height: 200px; /*marquee height */ | |
background-color: white; | |
overflow: hidden; | |
padding: 2px; | |
padding-left: 4px; |
OlderNewer