Posted on Leave a comment

IMPORTHTML – Docs Editors Help

Imports data from a table or list within an HTML page.

Sample Usage

IMPORTHTML("http://en.wikipedia.org/wiki/Demographics_of_India","table",4)

IMPORTHTML(A2,B2,C2)

Syntax

IMPORTHTML(url, query, index)

  • url – The URL of the page to examine, including protocol (e.g. http://).
    • The value for url must either be enclosed in quotation marks or be a reference to a cell containing the appropriate text.
  • query – Either “list” or “table” depending on what type of structure contains the desired data.
  • index – The index, starting at 1, which identifies which table or list as defined in the HTML source should be returned.
    • The indices for lists and tables are maintained separately, so there may be both a list and a table with index 1 if both types of elements exist on the HTML page.

See Also

IMPORTXML: Imports data from any of various structured data types including XML, HTML, CSV, TSV, and RSS and ATOM XML feeds.

IMPORTRANGE: Imports a range of cells from a specified spreadsheet.

IMPORTFEED: Imports a RSS or ATOM feed.

IMPORTDATA: Imports data at a given url in .csv (comma-separated value) or .tsv (tab-separated value) format.

Source: IMPORTHTML – Docs Editors Help

Posted on Leave a comment

.NET Design Patterns in C# and VB.NET – Gang of Four (GOF) – doFactory.com

Design patterns are solutions to software design problems you find again and again in real-world application development. Patterns are about reusable designs and interactions of objects.

The 23 Gang of Four (GoF) patterns are generally considered the foundation for all other patterns. They are categorized in three groups: Creational, Structural, and Behavioral (for a complete list see below).

To give you a head start, the C# source code for each pattern is provided in 2 forms: structural and real-world. Structural code uses type names as defined in the pattern definition and UML diagrams. Real-world code provides real-world programming situations where you may use these patterns.

A third form, .NET optimized, demonstrates design patterns that fully exploit built-in .NET 4.5 features, such as, generics, attributes, delegates, reflection, and more. These and much more are available in our .NET Design Pattern Framework 4.5. You can see the Singleton page for a .NET 4.5 Optimized example.

Source: .NET Design Patterns in C# and VB.NET – Gang of Four (GOF) – doFactory.com

Posted on Leave a comment

Woocommerce emails not sending! | WordPress.org

WooCommerce sends emails with the wp_mail() WordPress function. WordPress in turn calls on PHP to send the email, and PHP calls on the server at your host. If you install an SMTP plugin, the request will no longer go to your host email server which is causing your notification errors, but will go to your SMTP plugin and added to a queue to be sent out.

Source: Woocommerce emails not sending! | WordPress.org

Posted on Leave a comment

Field Note to setup OwnCloud + SSL

Here is summarized step to install those on the RaspberyPI Streach 

wget -nv https://download.owncloud.org/download/repositories/production/Debian_9.0/Release.key -O Release.key

echo ‘deb http://download.owncloud.org/download/repositories/production/Debian_9.0/ /’ | sudo tee /etc/apt/sources.list.d/owncloud.list

sudo apt install apache2 libapache2-mod-php mariadb-server mariadb-client php-bz2 php-mysql php-curl php-gd php-imagick php-intl php-mbstring php-xml php-zip

sudo a2enmod rewrite

wget https://download.owncloud.org/community/owncloud-10.2.0.tar.bz2

cd /var/www/html

sudo tar -xjf ~/owncloud-10.2.0.tar.bz2 ( Plese download this from the website )

sudo chown -R www-data:www-data owncloud

sudo chmod -R 755 owncloud

Following is to make openSSL

in my case:

sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -out /etc/apache2/ssl/server.crt -keyout /etc/apache2/ssl/server.key


https://www.snu.net/index.php/2020/01/30/enable-ssl-for-apache-server-in-5-minutes/


Using Differnt port other than https 443
https://www.snu.net/index.php/2020/01/30/apache-2-with-ssl-virtual-host-on-different-port-8080-or-8081-in-linux-super-user/

Posted on Leave a comment

Lightweight jQuery Input Mask Plugin For Phone Numbers | Free jQuery Plugins

1. Download, unzip the plugin and then insert the JavaScript jquery-input-mask-phone-number.js after jQuery JavaScript library.

2         integrity="sha384-nvAa0+6Qg9clwYCGGPpDQLVpLNn0fRaROjHqs13t4Ggj3Ez50XnGQqc/r8MhnRDZ"
3         crossorigin="anonymous">
4 </script>
5 <script src="jquery-input-mask-phone-number.js"></script>

2. Create a normal text field for the telephone input.

1 <input type="text" id="yourphone">

3. Call the function on the input field to mask and format the strings you typed in xxx-xxx-xxxx format.

1 $(function(){
2
3   $('#yourphone').usPhoneFormat();
4
5 });

4. Customize the format for phone numbers.

1 $(function(){
2
3   $('#yourphone').usPhoneFormat({
4     format: '(xxx) xxx-xxxx'
5   });
6
7 });

Lightweight jQuery Input Mask Plugin For Phone Numbers

Source: Lightweight jQuery Input Mask Plugin For Phone Numbers | Free jQuery Plugins

Posted on Leave a comment

jQuery $(document).ready()

Whenever you use jQuery to manipulate your web page, you wait until the document ready event has fired. The document ready event signals that the DOM of the page is now ready, so you can manipulate it without worrying that parts of the DOM has not yet been created. The document ready event fires before all images etc. are loaded, but after the whole DOM itself is ready.

Multiple Document Ready Listeners

jQuery allows you to register multiple document ready listeners. Just call $(document).ready() multiple times. Here is a multiple document ready listener example:

$(document).ready(function() {

    //DOM manipulation code

});


$(document).ready(function() {

    //DOM manipulation code

});

The two listener functions registered in this example will both get called when the DOM is ready. They will get called in the order they were registered.

Source: jQuery $(document).ready()

Posted on Leave a comment

How do I get the text value of a selected option? | jQuery Learning Center

How do I get the text value of a selected option?

Select elements typically have two values that you want to access. First there’s the value to be sent to the server, which is easy:

1
2
$( "#myselect" ).val();
// => 1

The second is the text value of the select. For example, using the following select box:

1
2
3
4
5
6
7
<select id="myselect">
<option value="1">Mr</option>
<option value="2">Mrs</option>
<option value="3">Ms</option>
<option value="4">Dr</option>
<option value="5">Prof</option>
</select>

If you wanted to get the string “Mr” if the first option was selected (instead of just “1”) you would do that in the following way:

1
2
$( "#myselect option:selected" ).text();
// => "Mr"

Source: How do I get the text value of a selected option? | jQuery Learning Center