Showing posts with label Tutorial. Show all posts
Showing posts with label Tutorial. Show all posts

Thursday, September 28, 2017

Solved "openssl config failed: error:02001003:system library:fopen:No such process" for Nodejs Window 10




If you get this kind of error after installed nodejs in window 10, it means that your ssl is not pointed  correctly.

So you have to point to the correct path.

1) echo %OPENSSL_CONF% (See your openssl path)
2) set OPENSSL_CONF=C:\OpenSSL\bin\openssl.cnf (Set your openssl path)

After that try and type npm -v again in cmd. You should be able to proceed without error.


Thanks for watching my blog. Do follow me on google+ or like my facebook page for more! :)

Sunday, June 25, 2017

Enlarge Image when hover using css with LIVE EXAMPLE!




This is a simple image enlargement using css. Do click on the link for example in jsfiddle.

Live Example

Thanks for watching my blog. Do follow me on google+ or like my facebook page for more! :)
Obstrum Facebook Page

Wednesday, May 24, 2017

How to create release in git in SourceTree (Window) (Mac)



1. First of all, make sure that `master` branch and `develop` branch in the same branch. (All you have to do is just merge the develop into the master and it will be in the same level)

(If no `master` brunch just double click the `remote/master` branch to create a local branch OR
 follow the link to put the master here)

2. Now make sure that you in `master` branch.
3. Click Git Flow in the GUI.
4. Click `Create New Release`
5. Enter release name. For example: 0.6.2.0 and click OK. (A new branch is created.)
6. You should see uncommited changes. Commit the Changes.
7. Click `Git Flow` again to complete the release
8. DONE :)


Thanks for watching my blog. Do follow me on google+ or like my facebook page for more! :)
Obstrum Facebook Page

Minus (hour) from a datetime in Mysql



DATE_SUB(in_time, INTERVAL 8 HOUR);

Easy :)

SOURCE

Thanks for watching my blog. Do follow me on google+ or like my facebook page for more! :)
Obstrum Facebook Page

Sunday, May 21, 2017

Useful InnoDB optimizing tips!

 

 

9.5.1 Optimizing Storage Layout for InnoDB Tables

  • Once your data reaches a stable size, or a growing table has increased by tens or some hundreds of megabytes, consider using the OPTIMIZE TABLE statement to reorganize the table and compact any wasted space. The reorganized tables require less disk I/O to perform full table scans. This is a straightforward technique that can improve performance when other techniques such as improving index usage or tuning application code are not practical.
    OPTIMIZE TABLE copies the data part of the table and rebuilds the indexes. The benefits come from improved packing of data within indexes, and reduced fragmentation within the tablespaces and on disk. The benefits vary depending on the data in each table. You may find that there are significant gains for some and not for others, or that the gains decrease over time until you next optimize the table. This operation can be slow if the table is large or if the indexes being rebuilt do not fit into the buffer pool. The first run after adding a lot of data to a table is often much slower than later runs.
  • In InnoDB, having a long PRIMARY KEY (either a single column with a lengthy value, or several columns that form a long composite value) wastes a lot of disk space. The primary key value for a row is duplicated in all the secondary index records that point to the same row. (See Section 15.8.9, “Clustered and Secondary Indexes”.) Create an AUTO_INCREMENT column as the primary key if your primary key is long, or index a prefix of a long VARCHAR column instead of the entire column.
  • Use the VARCHAR data type instead of CHAR to store variable-length strings or for columns with many NULL values. A CHAR(N) column always takes N characters to store data, even if the string is shorter or its value is NULL. Smaller tables fit better in the buffer pool and reduce disk I/O.
    When using COMPACT row format (the default InnoDB format) and variable-length character sets, such as utf8 or sjis, CHAR(N) columns occupy a variable amount of space, but still at least N bytes.
  • For tables that are big, or contain lots of repetitive text or numeric data, consider using COMPRESSED row format. Less disk I/O is required to bring data into the buffer pool, or to perform full table scans. Before making a permanent decision, measure the amount of compression you can achieve by using COMPRESSED versus COMPACT row format. 

Thanks for watching my blog. Do follow me on google+ or like my facebook page for more! :)
Obstrum Facebook Page

"Openssl extension is required error " FIXED!



 [Composer\Exception\NoSslException]
The openssl extension is required for SSL/TLS protection but is not available. If you can not enable the openssl extension, you can disable this error, at your own risk, by setting the 'disable-tls' option to true.


navigate to php.ini (Note that php 7 have php.ini-development and php.ini-production, choose one of this and rename it as php.ini)

Set your path (Line 738)

extension_dir = "C:\EntryPass\Web\php\ext\" ( Make sure that your path is correct, if not it will nto work)

You should be able to create laravel project now. The openssl problem should gone.

Thanks for watching my blog. Do follow me on google+ or like my facebook page for more! :)
Obstrum Facebook Page

"Unabled to retrieve chinese character in xsocket" FIXED!



Turn out that it is the encoding issue. So what I do is i use below solution. Below function will detect what type of string that being received and convert it into the same type.

iconv(mb_detect_encoding($text, mb_detect_order(), true), "UTF-8", $text);

Solution here

Solution Reference

http://stackoverflow.com/questions/4164719/utf-8-encoding-xml-in-php

http://stackoverflow.com/questions/152006/change-mime-type-of-output-in-php

http://php.net/utf8_encode

http://stackoverflow.com/questions/1354263/how-to-load-xml-when-php-cant-indicate-the-right-encoding

Thanks for watching my blog. Do follow me on google+ or like my facebook page for more! :)
Obstrum Facebook Page