The following content shows a general structure of a web app, it can be changed based on the different conventions of web frameworks.
- templates (views) # Template files
The following content shows a general structure of a web app, it can be changed based on the different conventions of web frameworks.
- templates (views) # Template files
# Use this script to test that your Telegram bot works. | |
# | |
# Install the dependency | |
# | |
# $ gem install telegram_bot | |
# | |
# Run the bot | |
# | |
# $ ruby bot.rb | |
# |
<?php | |
use GuzzleHttp; | |
$access_token = 'FIREBASE CLOUD MESSAGING SERVER KEY'; | |
$reg_id = 'DEVICE REGISTRATION ID'; | |
$message = [ | |
'notification' => [ |
<?php | |
function example_ajax_enqueue() { | |
// Enqueue javascript on the frontend. | |
wp_enqueue_script( | |
'example-ajax-script', | |
get_template_directory_uri() . '/js/simple-ajax-example.js', | |
array( 'jquery' ) | |
); |
/** | |
* Created by john.francis on 24/05/16. | |
*/ | |
public class PrefKeys { | |
public static final String USER_INCOME = "USER_INCOME"; | |
public static final String USER_MARITAL_STATUS = "USER_MARITAL_STATUS"; | |
public static final String USER_SALARY_FLOAT= "USER_SALARY_FLOAT"; | |
public static final String USER_SALARY_LONG= "USER_SALARY_LONG"; | |
public static final String USER_AGE= "USER_AGE"; | |
} |
<?php | |
function multiple_download(array $urls, $save_path = '/tmp') | |
{ | |
$multi_handle = curl_multi_init(); | |
$file_pointers = []; | |
$curl_handles = []; | |
// Add curl multi handles, one per file we don't already have | |
foreach ($urls as $key => $url) { |
Have you ever wanted to get a specific data from another website but there's no API available for it? That's where Web Scraping comes in, if the data is not made available by the website we can just scrape it from the website itself.
But before we dive in let us first define what web scraping is. According to Wikipedia:
{% blockquote %} Web scraping (web harvesting or web data extraction) is a computer software technique of extracting information from websites. Usually, such software programs simulate human exploration of the World Wide Web by either implementing low-level Hypertext Transfer Protocol (HTTP), or embedding a fully-fledged web browser, such as Internet Explorer or Mozilla Firefox. {% endblockquote %}
MIT License | |
Copyright (c) 2022 Justin | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteBase / | |
#Removes access to the system folder by users. | |
#Additionally this will allow you to create a System.php controller, | |
#previously this would not have been possible. | |
#'system' can be replaced if you have renamed your system folder. | |
RewriteCond %{REQUEST_URI} ^system.* | |
RewriteRule ^(.*)$ /index.php?/$1 [L] |