[OSX] How to install ssh-askpass for OS X/macOS

You can install ssh-askpass using Homebrew, this method also works on the latest Mojave 10.14.5 version.

 

[PHP] How to return IP address of a host / domain

Here is a quick solution written in php that you can use to determine the current IP address of a given webhost/domain.

[Linux] Install WordPress on Ubuntu Server with add-on features as HTTPS support, SSL certificate and HTTP2 supports

Enable HTTPS supports:

Create a ssl-params.conf file and add the following definition below to it, then save it.

Next thing to do is create a backup of the original default-ssl.conf file.

Then modify it accordingly, we are deploying a wordpress site in this particular example we use the following adjustments.

Enable HTTP2 supports:

It is also recommended adding strong ciphers for Apache to increase SSL Security on the server.
Part of my Best Practices to deploy a secure webserver, virtual personal server or database serve is to add the recommended ciphers from Cipherli.st.

Install Oracle Java 12 on Ubuntu

You need to add the PPA. (Surce: “Linux Uprising” team)
Install:

For multiple java versions, install [or uninstall] oracle-java12-set-default package to set [or not] Java 12 as default.
Verify:
Remove it: … use the following command if you need to uninstall it:

How to Install Google Authenticator on Ubuntu Server

Install Google Authenticator:

Install qrencode:

youtube-dl arguments

Best Audio Quality for mp3 (with –ffmpeg-location):

Best Audio/Video Quality for mp4 (with –ffmpeg-location):

Login to WordPress or other accounts using python selenium package

The best way to install the selenium package is using the following command:

$ pip install selenium

or on macOS with Homebrew

$ brew install geckodriver

If you are using Anaconda just simply activate your virtual environment and then install geckodriver using the following command:

$ conda install -c conda-forge geckodriver

Then you’ll need a driver to interface with the browser you choose. I used Firefox in this example, therefore I downloaded the required geckodriver driver.
Drivers for other browser: selenium-python.readthedocs.io
You might need to set the PATH of your geckodriver.

This python source code will pull up a Firefox window and open the url that you need set https://yourwpdomain.com/wp-login.php, then find user_login and user_pass elements on the page (by the id) and finally send a click() function to the submitButton.
If everything goes well the next thing you should see is your WordPress dashboard page in the browser.

If you are using Windows you might need to set the geckodriver PATH with FirefoxDriver.

How to use wget without adding –no-check-certificate

You need to add a check_certificate = off line into your .wgetrc file in your Home directory.
Or simply run this command on your terminal.

After this wget will add this –no-check-certificate automatically from your .wgetrc file.

BTCPayServer the self-hosted payment processor for Bitcoin and other cryptocurrencies.

How does it works?

BTCPay Server is a self-hosted and automated invoicing system. When checking out, the customer is presented with an invoice. Each time, a different address is tied to a particular invoice, so there is no address re-use. BTCPay follows the status of the invoice through the blockchain and informs a merchant when he can fulfil the order safely.

BTCPay is a code, not a company. There is no third-party between a merchant and a customer. Merchant is always in full control of the funds. There are no processing or subscription fees. BTCPay Server is free to use and completely open-source, so developers or security auditors can always inspect the quality of the code.

Source code: https://github.com/btcpayserver/btcpayserver

SQLite – How to use fundamental functions in C++

SQLite operations in C++
This tutorial aimed to demonstrate how to use SQLite database operations such as CREATE, INSERT, UPDATE, SELECT and DELETE in C++. Since the appearance first smartphone and other mobile devices SQLite become most widely deployed and used database engine in the world. Precise numbers are difficult to obtain but SQLite is likely used more than all other database engines combined. We can find SQLite in every Android device, iPhone and iOS device, Mac, Windows10, Firefox, Chrome, Safari, Skype, Dropbox, TurboTax, QuickBooks, PHP, Python, television sets, set-top cable boxes and many automotive multimedia systems.

It’s an open-source SQL database engine. You can download the source code or precompiled binaries depending your requirements. You might also need to add [-lsqlite3] and [-std=c++17] to successfully compile, create an executable file. Each of the following source code available on my git repository.

github.com/lnrsoft/sqlite3_cpp_basics_updated

Use this link local_db.sqlite.zip (71 downloads) if you would like to download the local_db.sqlite file that I used in this tutorial.

Step 1 – The first thing we need to do is to create the actual database file that we will use in this article. I called sqltdemo.db in our case.

Compile and run our source code to create the local_db.sqlite with the following command. Here we link our code with the sqlite3 library that will create our db file.

Verify our result:

Step 2 – CREATE TABLE

Compile and run.

Step 3 – INSERT INTO our CANDIDATE TABLE

Compile and run.

Step 4 – Fetch and display records from the company CANDIDATE TABLE. In this scenario we use a callback function that obtains results from SELECT statement.

Compile and run.

Step 5 – Using UPDATE statement to update any records in our CANDIDATE table.

Compile and run.

Step 6 – DELETE statement can delete any records from the CANDIDATE table.

Compile and run.

I recommend you to check the official SQLite documentation at sqlite.org for more advance SQLite features and options and support. For further info about using sql with c++ you might found it useful to read me previous post of  a simple Qt tool to test QSqlDatabase access connection to a MySQL database. I created this simple Qt command line tool to test connection between Qt client applications and a remote Mysql Server. The code includes Secure Sockets Layer (SSL) support to test secure connection. The QSqlDatabase class provides an interface for accessing a database through a connection where an instance of QSqlDatabase represents the connection. The connection provides access to the database via one of the supported database drivers, which are derived from QSqlDriver.

Alternatively, we can subclass your own database driver from QSqlDriver. My next post will be an article how to write your own database driver in Qt for Unix, OSX and Windows platforms.

[WWW] Web development tools

Here is a list of web development tools I mostly use, these tools are coming very useful especially to analyze, tune and optimize your web project. These are essential tools to achieve the best user experience and highest performance.

https://developers.google.com/speed/pagespeed/insights/
https://www.websitepulse.com/help/tools.php
https://tools.geekflare.com/tools/dns-lookup
https://www.webpagetest.org 
https://tools.geekflare.com/report/speed-test 
https://performance.sucuri.net 
https://sitecheck.sucuri.net 
https://www.site24x7.com/web-page-analyzer.html
https://www.dotcom-tools.com/website-speed-test.aspx
http://www.monitis.com/pageload/

[Linux] Enable universe, multiverse and restricted repositories on Ubuntu

Use the following terminal commands to enable universe, multiverse and restricted repositories on your Ubuntu system. It works well on the latest Ubuntu Server 18.04 LTS

How to temporarily disable IPv6 on Ubuntu? You need to diagnose a communication issue or track down a network problem?

IPv6 provides solution of the IPv4 address exhaustion as it’s offering a much larger addressing space.
However, there are few instances in which IPv6 is casing network problems.
Some hardware doesn’t utilize it or take any advantages of IPv6 communications protocol. There are instances in which the temporary and easy solution is to (permanently) disable it. It can be easily re-enabled when it needed again.

In case you need to disable it, either only for troubleshooting or permanently, you can use the following terminal commands.

First of all, let’s verify the current status of your IPv6 communications protocol.

If this command returns 0 that means IPv6 is enabled in your system.

Scroll down to the end of the file and insert these three lines below.

Save and quit your editor, then reboot your system.

Verifying the status of IPv6.

This command should return 1 meaning you successfully disabled IPv6 communications protocol.

To re-enable IPv6 just simple delete or comment out those 3 lines above.

You can use

to read values from file, it should return:

There are some additional commands if this method does not work.

Disable the network manager

Get the IP address from the server using:

List of IP address

Removing all IP information from an interface (enp2s1 in my case)

Assign the first ip addresses like this:

You can repeat for other IP addresses.
You can add the default route using:

List of network devices:

Restart the networking.service

or

Ipv6 test is a free online service to diagnose connection problems: http://ipv6-test.com/

[C++] MemorySanitizer

MemorySanitizer is a detector of uninitialized memory reads in C/C++ programs. Uninitialized values occur when stack- or heap-allocated memory is read before it is written. MSan detects cases where such values affect program execution.
At this time, MemorySanitizer supports Linux x86_64 only.
To use MemorySanitizer, compile and link your program with -fsanitize=memory -fPIE -pie. To get any stack traces, add -fno-omit-frame-pointer.

Origins tracking

[C++] AddressSanitizer

AddressSanitizer is a memory error detector for C/C++. It finds:

-Use after free (dangling pointer dereference)
-Heap buffer overflow
-Stack buffer overflow
-Global buffer overflow
-Use after return
-Use after scope
-Initialization order bugs
-Memory leaks

In order to use AddressSanitizer we will need to compile and link your program using clang with the -fsanitize=address switch. To get a reasonable performance add -O1 or higher.

[C++] ThreadSanitizer

ThreadSanitizer is a data race detector for C/C++. Data races are one of the most common and hardest to debug types of bugs in concurrent systems.
Here is an example of a data race that can lead to crashes and memory corruptions:

[C++] How to install gcc-7 on Ubuntu LTS 16.04

[C++] Return absolute_path using boost::filesystem

Return absolute_path using boost::filesystem

Note:
You’ll need to add the boost libraries to the linking phase with the -L flag and the names of the libraries with the -l flag. This is different from the compilation phase where only the -I include path is needed. For example in my case:

boost::filesystem tutorials
https://meetingcpp.com/blog/items/handling-files-using-boost-filesystem.html
http://www.boost.org/doc/libs/1_55_0/libs/filesystem/doc/tutorial.html
http://www.boost.org/doc/libs/1_44_0/libs/filesystem/v3/doc/tutorial.html
http://www.boost.org/doc/libs/1_51_0/libs/filesystem/doc/reference.html#Absolute-path
http://www.boost.org/doc/libs/1_53_0/libs/filesystem/doc/reference.html
http://www.boost.org/doc/libs/1_55_0/libs/filesystem/doc/reference.html#copy_file
http://wiki.lihebi.com/boost.html

The Boost C++ Libraries
AdvC++Libs.key
boost-graph-library
asio_doc
dima-boost-intro
Boost_for_KDE_Developers-Volker_Krause

[C++] An Interesting Bit Array Example

Here is an interesting bit array task and its solution in C++ that I thought it’s worth to share with you.
You are given four integers values: N, A, B, and C. You need to use them in order to create the sequence called bitArray with the following pseudo-code:

Task: calculate the number of distinct integer in the bitArray sequence.

Solution
Input: four space separated integers on a single line, N, A, B, and C  respectively.
Where N = 32, A = 16, B = 16, C = 16.
Output: 
one integer that denotes the number of distinct integer in the bitArray sequence equals 7 as we set N, A, B, C values.

If you’d like to read the input from the console simply comment out line 57 and 62 and toggle comment selection on line 58, 59, 60 and 61.
Input read from the console:

four space separated integers on a single line, N, A, B, and C  respectively.
Output print to the console: 
One integer that denotes the number of distinct integer in the sequence called bitArray.
The number of distinct integer  in the sequence  will be 536870912 when we change the previously set integer values to:
Use Wandbox online C++ compiler

[C++] cxx_status and support in Clang

Here is the list of current C++ implementation status and support in Clang as per Aug 2017.
You can find the complete list of features and minimum Clang version with support on the source page: https://clang.llvm.org/cxx_status.html

C++11 implementation status
Clang 3.3 and later implement all of the ISO C++ 2011 standard. By default, Clang builds C++ code according to the C++98 standard, with many C++11 features accepted as extensions. You can use Clang in C++11 mode with the -std=c++11 option. Clang’s C++11 mode can be used with libc++ or with gcc’s libstdc++.

C++14 implementation status
Clang 3.4 and later implement all of the ISO C++ 2014 standard.

You can use Clang in C++14 mode with the -std=c++14 option (use -std=c++1y in Clang 3.4 and earlier).

C++17 implementation status
Clang 5 and later implement all the features of the C++ 2017 Draft International Standard.
You can use Clang in C++17 mode with the -std=c++17 option (use -std=c++1z in Clang 4 and earlier).

C++2a implementation status
Clang has experimental support for some proposed features of the C++ standard following C++17, provisionally named C++2a. Note that support for these features may change or be removed without notice, as the draft C++2a standard evolves.
You can use Clang in C++2a mode with the -std=c++2a option.

More technical specifications and standing documents on the source page: https://clang.llvm.org/cxx_status.html

[Linux]Ubuntu LTS default kernel

LTS Enablement Stacks
The Ubuntu LTS enablement (also called HWE or Hardware Enablement) stacks provide newer kernel and X support for existing Ubuntu LTS releases. These enablement stacks can be installed manually but are also available when installing with Ubuntu LTS point release media. These newer enablement stacks are meant for desktop and server and even recommended for cloud or virtual images.

Ubuntu 16.04 LTS – Xenial Xerus
The 16.04.2 and newer point releases will ship with an updated kernel and X stack by default for the desktop. Server installations will default to the GA kernel and provide the enablement kernel as optional.

The 16.04 HWE Stacks will follow a new Rolling Update Model as documented at the following location:

https://wiki.ubuntu.com/Kernel/RollingLTSEnablementStack

It is highly recommended to read the above documentation before executing the following commands, as the HWE model has changed in 16.04.

Installing the HWE stack is simple:

DESKTOP

SERVER

 

CMAKE BUILD TYPES AND HOW TO SPECIFY COMPILERS AND COMPILER FLAGS

CMake has a CMAKE_BUILD_TYPE option for predefined build types. The build type affects optimization and whether the result of the build is debuggable. Those used by MySQL are RelWithDebInfo or Debug.
RelWithDebInfo (optimizations are on, debug info is generated) is used in MySQL by default.
Debug (optimizations are off, debug info is generated) is used if the WITH_DEBUG option is set.

CMAKE_BUILD_TYPE is not set when custom compile flags are used

To define which C and C++ compilers to use, you can define the CC and CXX environment variables. For example:

To specify your own C and C++ compiler flags, for flags that do not affect optimization, use the CMAKE_C_FLAGS and CMAKE_CXX_FLAGS CMake options:

When providing your own compiler flags, you might want to specify CMAKE_BUILD_TYPE as well.
For example, to create a 32-bit release build on a 64-bit Linux machine, do this:

If you set flags that affect optimization (-Onumber), you must set the CMAKE_C_FLAGS_build_type and/or CMAKE_CXX_FLAGS_build_type options, where build_type  corresponds to the CMAKE_BUILD_TYPE value.

To specify a different optimization for the default build type (RelWithDebInfo) set the CMAKE_C_FLAGS_RELWITHDEBINFO and CMAKE_CXX_FLAGS_RELWITHDEBINFO options.
For example, to compile on Linux with -O3 and with debug symbols, do this:

SPECIFY ADDITIONAL COMPILER OPTIONS IN QTCREATOR OR SIMPLE ADD THEM TO QMAKE

List of build-specific variants to specify your Qt project.

QSqlDatabase connection testing tool

QSqlDatabase connection access

A simple command line tool to test connection between Qt client applications and a remote Mysql Server. The code includes Secure Sockets Layer (SSL) support to test secure connection. The QSqlDatabase class provides an interface for accessing a database through a connection. An instance of QSqlDatabase represents the connection. The connection provides access to the database via one of the supported database drivers (MySQL in our case), which are derived from QSqlDriver. Alternatively, we can subclass your own database driver from QSqlDriver. I’ll post an another article about how to write your own database driver in Qt for Unix, OSX and Windows platforms. It’s recommend to write your own database driver especially when you planning to deploy your application in different platforms. It’s simply because there could be surprises especially on client deploying your application that using one of the supported database drivers due to missing dependencies or environmental variables.

Software prerequisites:
Remote MySQL server version: 5.7 or above
Qt version: Qt_5_7_1 or above
OpenSSL 1.0.x or above the for SSL feature

How to use it:
1. I simply run the mysql_conn_test_database.sql SQL script file to create a test database on the remote server.
2. Set the hostname or IP, port number, username and password. You migth need to create a new database user for this purpose.
[You will need to create SSL certificates for the database server and client in order to test SSL Feature on the MySQL Server.] 3. If everthing is set just simple build and run the project in your QtCreator.

If everything goes well you will recieve the following feedback from your terminal:


QSqlDatabase connection test tool was created and written by Roland Ihasz and it is licensed under the GNU General Public License (GPL) Version 2 or above.

Check out on GitHub. https://github.com/lnrsoft/QSqlDatabase-connection-test-tool

 mysql_db_connection_test.pro
 main.cpp
 mysql_conn_test_database.sql
Alternatively, use the following shorter source code to check the connection without any sql query.
 QSqlDatabase connection test tool without query

[SOLVED] QSQLDATABASE: QMYSQL DRIVER NOT LOADED ON OSX AND LINUX

After spending a quite a bit of time to find the solution of this often-occurring
QMYSQL driver not loaded problem mainly after installing Qt installation in a new software environment, So I thought I am going to share my best practice to fix this issue.
I wasn’t able to establish database connection even if I received the list of available drivers:

QSqlDatabase: available drivers: QSQLITE QMYSQL QMYSQL3 QODBC QPSQL
QSqlDatabase: QMYSQL driver not loaded

The following simple method helps to fix the problem.
On OSX system just simple install or re-install mysql using the flowing command. I usually prefer Homebrew as it fulfils most my requirements and using MacPort when I really no other options available.

then place the following libmysqlclient.18.dylib.zip (69 downloads) file to the path below:

On different Linux distributions I usually apt install or yum install the MySQL package basically the only thing I need to make sure that place the libmysqlclient.18.dylib.zip (69 downloads) file to the following path:

This method solves the QMYSQL driver not loaded issue and allows me to establish database connection, it might work on Windows system as well, however I had not opportunity to try before.
Please, let me know if this method also working for you by dropping a line.

Download: libmysqlclient.18.dylib.zip (69 downloads)

HOW TO RETURN A STRING EQUIVALENT OF THE NUMBER N USING QT.

QString QString::number(double n, char format = ‘g’, int precision = 6) returns a string equivalent of the number n, formatted according to the specified format and precision.

Let’s see the following example.
There are 3 double values x, y, z.
We want to return the result of the following equation:
(x / z) * (5.961 / y)
We also want to ask the user to set the desired precision of the result.

Here is how I do with Qt.
You can also Fork the complete qt project from my GitHub.
* note = there are many ways to solve this issue, much simpler, but this time I want to demonstrate how we do in Qt.

Argument Formats
In member functions where an argument format can be specified (e.g., arg(), number()), the argument format can be one of the following:

Format            Meaning

e                      format as [-]9.9e[+|-]999

E                      format as [-]9.9E[+|-]999

f                       format as [-]9.9

g                      use e or f format, whichever is the most concise

G                     use E or f format, whichever is the most concise

A precision is also specified with the argument format. For the ‘e’, ‘E’, and ‘f’ formats, the precision represents the number of digits after the decimal point. For the ‘g’ and ‘G’ formats, the precision represents the maximum number of significant digits (trailing zeroes are omitted).

How to return a string equivalent of the number n using Qt was written by Roland Ihasz>, you can modify or distribute. You can do anything you want with this software, just don’t say you wrote it.

More info on   doc.qt.io

Accessing Inherited Functions – HackerRank Challenge Solved in C++

Accessing Inherited Functions – HackerRank Challenge Solved in C++

You and run the code from your terminal using the following commands:

Multi Level Inheritance – HackerRank Challenge Solved in C++

Multi Level Inheritance – HackerRank Challenge Solved in C++

Variable Sized Arrays – HackerRank Challenge Solved in C++

Variable Sized Arrays – HackerRank Challenge Solved in C++

Set STL – HackerRank Challenge Solved in C++

Set – STL – HackerRank Challenge Solved in C++

HackerRank C++ Virtual Functions Challenge

HackerRank C++ Virtual Function Challenge

HackerRank Challenge – Find out the area of a rectangle using C++ inheritance

Rectangle Area HackerRank Challenge
..and a bit longer version.

How to display an image on a QtWidget


There is a simple method to insert images such as a png file using QPixmap. I personally prefer to use a QLabel to show simple images on QWidget, particularry if there is no any other fancy requirements.
Basically you can locate the QLabel anywhere on your QWidget. You will find the pixelmap option at the text option section in your Qt Creator, right below the textFormat. When you click on the Value section you’ll find a small arrow pointing down.
Simple click on it, then choose your png file.

If you just simple want to display an image to the QWidget, I found the following option works well. You just need to insert the path of the image file right after the

member function in your main parent widget, then insert the following source code.

If you know other method to display an image on a QtWidget Please, let me know by dropping a line, I can add it to this post if it is relevant and you agree to do.

Top software developer blogs

1) CODE SIMPLICITY
codesimplicity.com
2) JOEL ON SOFTWARE
joelonsoftware.com
3) SCOTT BERKUN
scottberkun.com/blog/
4) CODING HORROR
blog.codinghorror.com
5) SCOTT HANSELMAN
hanselman.com/blog
6) /\NDY
andy.pragprog.com
7) PAUL GRAHAM’S ESSAYS
paulgraham.com/articles.html
8) FEDERICO CARGNELUTTI
blog.fedecarg.com
9) DAILYJS
medium.com/dailyjs
10) DAVID WALSH
davidwalsh.name
11) PONTIKIS
pontikis.net
12) SIX REVISIONS
sixrevisions.com
13) WEBAPPERS
webappers.com
14) AJAXIAN
ajaxian.com
15) PROGRAMMABLEWEB
programmableweb.com
16) MARTIN FOWLER
martinfowler.com/bliki
17) ERIC SINK
ericsink.com
18) THE DAILY WTF
thedailywtf.com
19) UIE BRAINSPARKS
uie.com/brainsparks
20) PRAGDAVE
pragdave.me
21) SILK AND SPINACH
silkandspinach.net
22) YTECHIE
ytechie.com
23) BIT-PLAYER
bit-player.org
24) EXPLORATION THROUGH EXAMPLE
exampler.com/blog
25) CLARKE CHING ROLLS ROCKS
rolls.rocks/ccblog
26) JONATHAN KOHL
kohl.ca/blog
27) WORD ALIGNED
wordaligned.org
28) TECHNOLOGY, STRATEGY, PEOPLE & PROJECTS
ericbrown.com/blog
29) DAVID CHELIMSKY
blog.davidchelimsky.net
30) RUMINATIONS OF A PROGRAMMER
debasishg.blogspot.co.uk
31) HERDING CATS
Herding Cats
32) MY SECRET LIFE AS A SPAGHETTI CODER
codeodor.com/index.cfm
33) SOFTWARE BY ROB
softwarebyrob.com
34) IMPLEMENTING SCRUM
implementingscrum.com/section/blog/
35) SUCCEEDING WITH AGILE
mountaingoatsoftware.com/blog
36) REGULAR GEEK
regulargeek.com
37) GOOD CODERS CODE, GREAT REUSE
Catonmat.net
38) SECRETGEEK
secretgeek.net
39) OTAKU, CEDRIC’S BLOG
beust.com/weblog/
40) A GEEK WITH A HAT
swizec.com/blog/

… and some great once on Data Science:

news.google – Data Science

data science central

kdnuggets

IBM big data hub

A curated list of data science blogs http://rushter.com/dsreader/

No Free Hunch

David Smith’s blog evolutionanalytics.com

Data Science for Social Good

DataCamp

[SOLVED] How to re-flash the corrupted BIOS of a Dell Laptop using a USB drive

This is the latest version of the How re-flash the corrupted BIOS of a Dell Inspiron Laptop article.

Repair-Corrupted-BIOS-Firmware

There is, however, no guarantee that the following method will also work for you, as reading this sentence you agree that I am taking no responsibility of any damage caused by the following procedure.

CORRUPTED BIOS AND HOW TO FLASH IT?
How to Recover from a disastrous BIOS update?
How to Flash a Corrupted Dell Inspiron Laptop BIOS?

Simply follow this procedure to re-flash failed BIOS update on a Dell Inspiron (n5010 model in my case) laptop. Presumably the following method also works on almost all other Dell models.

Phase 1.

  • Rename the newly created N5010A15.HDR and N5010A15.ROM files to N5010.HDR and N5010.ROM.
  • Format an USB thumb-drive to FAT and copy the N5010.HDR, N5010.ROM files on it. You do not need to create bootable USB drive.
    *UPDATE: most of the time I hear feedback about this method people add a comment that they formatted their USB thumb-drive to FAT16 as the FAT32 file system did NOT work.

Phase 2.

  • Shutdown your faulty laptop if is is still running with the black screen.
  • Remove the battery
  • Remove the CMOS battery
  • Disconnect the power supply.
  • Insert the USB drive in the USB port.
    *UPDATE: According to the feedback on this method most people use the left USB socket, as the rest of the USB sockets might not functioning at this state.

*Note: There are few cases reported about not active USB ports. Simply try to use other USB port if you notice or suspect that the system cannot read the USB drive from the port you plugged it. Use USB drive with activity LED if you have one, the blinking LED will confirm that the system reads data from your USB drive.

Phase 3.

  • Press and keep hold the END key on the keyboard for your faulty laptop.
  • Plug the DC power connectors (power plug) into the laptop.
  • After a few seconds your faulty laptop will start itself and will re-flash its corrupted BIOS and automatically reboot.
  • You can release the END key after the flashing process started. A USB drive with an activity LED can confirm that the BIOS flashing process started. The complete re-flashing process will take no longer than 60 maximum 90 seconds.

Your comments and suggestions would be greatly appreciated.

 


WARNING! 
I am taking no responsibility of any damage caused by the following NOT TESTED procedure. Try this PhoenixTool method when the /writeromfile and /writehdrfile commands are not give you any result.

This procedure never been tested by myself, however quite a few people were asked me about how to extract ROM files from other system BIOS files without the /writeromfile and /writehdrfile commands mentioned above in my step by step guide. 

Let’s take an example of Inspiron N7010 BIOS. In this case the usual /writeromfile and /writehdrfile commands will not work.
You’ll need 7-Zip or Universal Extractor and PhoenixTool to extract/create rom files from the R301250.exe System BIOS file.

Phase 1.

  • Download the R301250.exe (2969 KB) file from the official source ( http://www.dell.com/support/home/uk/en/ukbsdt1/drivers/driversdetails?driverId=R301250 )

Phase 2.

Phase 3.

Useful resources:

  1. AT24C01A EEPROM datasheet
  2. DELL EMC System Update for Windows and Linux
  3. Flashrom or Qflashrom
  4. Superiotool – Detect which Super I/O you have on your mainboard
  5. Official Dell BIOS Recovery options
  6. Dell: What is BIOS and How to Download and Install the latest BIOS?
  7. Dell: 64-bit BIOS Installation Utility
  8. RW-Everything
  9. PhoenixTool 2.73

The reason behind writing this BIOS recovery article is provide some helpful info/advice/starting point to everyone facing with the same issue. This work (How to re-flash the corrupted BIOS of a Dell Laptop using only a USB drive, by Roland Ihasz) is free of known copyright restrictions.

C++ Standards Support in GCC

GNU has announced the stable release of GNU Compiler Collection 7 (GCC 7), which has been marked with the release of GCC 7.1. This month, the 30-year anniversary of GCC 1.0 will also be celebrated.

C++ Standards Support in GCC
This page is a brief summary of some of the huge number of improvements in GCC 7. For more information, see the Porting to GCC 7 page and the full GCC documentation.

Changes
gcc_7.1.0.pdf
gcc.gnu.org/gcc-7
Onlinedocs
Porting to GCC 7
List of GNU GCC Releases

Qt Creator plugins

Just reIf you just started to familiar yourself with Qt’s IDE, this is my advice. After a long time of daily usage became my favorite developing IDE, as it is covering almost every part of the work I do on a daily basis. However there are three (3rd party) plugins am always adding to my Qt Creator IDE wherever I work on-site or in the office they are very useful. Especially CppCheck but gtest and the DB viewing tool can coming handy.
Qt Creator CppCheck integration plugin
Qt Creator Google C++ Testing Framework integration plugin
Qt Creator SQL database viewer plugin

All three plugins developed by Gres

Bottom line: a good and comfortable development enviromet setup if playing a key role of utilizing your almost always limited time and result an efficient way of your daily developing work.
Valgrind (adding memory and function profiler feature to Qt Creator), sometimes preferring GDB instead of LLDB especially project on OSX.
I also use Doxygen for generating documentation from annotated C++ sources.
You can enable/disable plugins, I strongly recommend to enable this very convenient plugging, it is much more helpful compare to my previously used tool. It recognizes notes: TODO, BUG, FIXME, NOTE, HACK by default.

Very simply to use. Here is one of my projects TODO list just started.

Click image to zoom inClick image to zoom in

Sort My List

Sort My List an easy to use very handy online tool where You can sort or clean your list in a variety of ways. This simple online tool could help you remove, add, separate data without using other other softwares sorting features. There are limitations in this online tool, and I won’t recommend on large datasets, however in many cases could be very handy, removing unwanted whitespaces or any characters.
Find out more: sortmylist.com

Cheerp

Cheerp is a C++ compiler for the Web, based and integrated into the LLVM/clang infrastructure.

With Cheerp you can write Web applications in pure C++ code, or port existing C++ code to the Web. Your C++ code is fully optimized by the LLVM system and it’s compiled into JavaScript code that runs on the browser.

Conan C/C++ Package Manager

Conan is a portable package manager, intended for C and C++ developers, but it is able to manage builds from source, dependencies, and precompiled binaries for any language.

POCO C++ Libraries

Modern, powerful open source C++ class libraries for building network- and internet-based applications that run on desktop, server, mobile and embedded systems.

[Linux] Required packages to fix (Missing GL/gl.h) error

The following additional packages required on Ubuntu in order to be able successfully compile qt projects without (Missing GL/gl.h) error message.

NeoVim – “the future of vim” and SpaceVim – the community-driven vim distribution


After trying many light-weight IDE in the past I decided to give NeoVim a whirl. I’ve been using NeoVim for four months now without any issues. If you are a Vim user or just looking for a very light-weight IDE NeoVim is for you.

Features:
More powerful plugins. The msgpack API enables structured communication to and from any programming language. Remote plugins run as co-processes that communicate with Neovim safely and asynchronously. User manual: http://neovim.io/doc/user

Better out-of-the-box
-Strong defaults
-Modern terminal features such as truecolor and bracketed paste
-Built-in terminal emulator

First-class embedding, GUIs (or TUIs such as readline) can nvim –embed or communicate via named pipe using the discoverable msgpack API.
Install Now



SpaceVim – the community-driven vim distribution.

SpaceVim is a community-driven vim distribution that supports vim and Neovim. SpaceVim manages collections of plugins in layers. Layers make it easy for you, the user, to enable a new language or feature by grouping all the related plugins together. It got inspired by spacemacs.

Linux and macOS one-line installer:

Manual install on Linux and macOS:

https://spacevim.org/blog/
https://github.com/SpaceVim/SpaceVim
Install on other platforms: Installing SpaceVim


 

htop and glances interactive process viewers for Linux Servers.

This is htop, an interactive process viewer for Unix systems. It is a text-mode application (for console or X terminals) and requires ncurses.
I am using this brilliant app for monitoring my servers and Raspberry Pi. Download

Glances – “An Eye on your system”
Glances is a cross-platform system monitoring tool. Written in Python, Glances will run on almost any platform : GNU/Linux, FreeBSD, OS X and Windows.
Install:

You can enable many useful plugins using the following command.

or with python3

Configuration file options:


Ncdu is also a brilliant command line disk usage analyzer with an ncurses interface.
dev.yorhel.nl/ncdu

 

[PDF] Jenkins The Definitive Guide – Continuous Integration

Continuous Integration is a key element of modern software development best practices. You can learn how to automate your build, integration, release and deployment process with Jenkins from this free ebook.

jenkins-the-definitive-guide
jenkins-the-definitive-guide

Download pdf eBook
You can get more information about CI on Eclipse Hudson website where you can read The Hudson Book for free in online, PDF, EPUB formats.

*Request(Please report broken links) Dear Reader, if any of the external links in this post are broken please inform me using the contact us form. Thank you.

Switch PHP version on Ubuntu Server

Here is an example tho to switch from php5.6 to php7.1 just run the following command: