Basic SQL Commands Every Developer Should Know
The SQL or Structured Query Language (structured query language) is used to manage data in a relational database system (RDBMS). In this article, you will learn about frequently used SQL commands that every developer should know. This material is ideal for those who want to refresh their knowledge of SQL before a job interview. We will be using MySQL or MariaDB syntax in this article. But most of the commands are patform-independent and will work on SQL Server, PostgreSQL, SQLite, OracleDB and others.
How to fix PHP upload file inherit permissions error using Windows IIS Server
If you’re like me, and you use Windows IIS, you’ve spent hours trying to figure out why your uploaded file won’t inherit the permissions needed to display correctly. Luckily, the answer is extremely easy and something most people would have never thought of.
The problem only happens when you use PHP to upload a file. When you upload a file, PHP sends the file to a temporary directory on the hard drive (for me it is C:\Windows\Temp) and then copies it over to it’s intended directory. Once the file has landed in the temporary directory, it is assigned the permissions of that directory. The problem is when Windows copies that file, it keeps the temporary directory’s permissions and doesn’t inherit your web directory’s permissions.
Read more: How to fix PHP upload file inherit permissions error using Windows IIS Server
How to unpack .tar.gz archive in Linux
.tar.gz archives are widely used in a GNU/Linux world because of love of the community to the patent freedom and open source formats. Usually, Linux distributions utilize tar.gz format for source code compression. When you begin familiarizing yourself with the Linux world, you quickly realize you need to know how to extract .tar.gz files in Linux. Actually, tar.gz archives are a a combination of two technologies chained one after another. First, all the files are merged in what is called a Tarball - just a single file plus file names information. Then, the Tarball is compressed with the use of gzip compression algorithm.
So, how to actually extract the .tar.gz archive?
tar -xvf www1
.tar.gz -C /var/www/website/
The above command will eventually extract the file www1.tar.gz residing in current directory to the folder /var/www/website/
Let's look at the details of this command:
x command means we want to extract the archive
v switch tells tar to verbosely output file names
f means we need to specify archive name (othewise tar will look into standard input)
As a bonus, you can extract .tar files or even .tar.bz2 files using the same command! Just specify the correct archive name and extension.
Now, you have mastered extracting tar.gz files. Good luck!
How to import large .sql file in MS SQL Server
Sometimes you need to import large database into MS SQL Server, but when you use Microsoft SQL Server Management Studio, it doesn't do the job right, but shows the message "Insufficient memory". Or maybe you need to do a batch import of sql script to database instead of doing the import by hand. Here comes in handy the sqlcmd command line tool. It can import large .sql files, can be run from a batch script, installer, etc.
How to use sqlcmd command-line tool to import large .sql file?
Open a command prompt window.
In the Command Prompt window, type: sqlcmd -S yourServer\instanceName -i C:\yourScript.sql
Press ENTER.
The progress of operation is written to the command prompt window.
Source: Microsoft
How to Install APK to Android Device via ADB in 6 simple steps
1. Download and install android platform tools: https://developer.android.com/studio/releases/platform-tools.html
2. Open command line and navigate to the folder where ADB is located, eg. cd /D d:\Android\sdk\platform-tools\
3. Type adb devices and press ENTER.
Read more: How to Install APK to Android Device via ADB in 6 simple steps
How To Upload Directory Tree To Remote FTP Server Recursively in Linux
When you host your web site remotely and the ftp server is the only way to upload all files including subdirectroies. You need to use special file transfer program such as ncftpget or ncftpput for recursive remote ftp server uploading and downloading purpose. Ncftp is considered as an improved FTP client. Ncftp's improvements include support for command line editing, command histories, recursive gets/puts, automatic anonymous logins, and much more.
1. Install ncftp client
Type the following command under Debian/Ubuntu Linux to install ncftp client:
$ sudo apt-get install ncftp
Read more: How To Upload Directory Tree To Remote FTP Server Recursively in Linux
Android WebView transparent background for Android 2.3 and up
Many people face an issue with Android's WebView and transparent background. The problem is that if you need to make transparent background for the WebView, it is not easy to do at the first sight. If you try to use property android:background="@android:color/transparent", you will discover that it just don't work as expected. The background is still opaque. Using background color set explicitly as #ff000000 constant sometimes work and sometimes not.
Read more: Android WebView transparent background for Android 2.3 and up
Fixing Magento error "[unknown object].fireEvent()"
Recently I've encountered the following Javascript error in my Magento store:
error: error in [unknown object].fireEvent():
event name: address_country_changed
error message: zipElement.up(...).down(...) is undefined
This error pops out when creating the order from admin panel and entering customer shipping address. It pops out when editing every filed in the address, which is quite annoying.
Regarding to this forum post, this has something to do with defining the zip code as not required filed in the database. Specialists recommend to set zip code as required filed in the database and then setting it as not required on the country basis. But people report that setting so will still not make zip code as optional field.
So I decided to do my own fix. Here it is:
Read more: Fixing Magento error "[unknown object].fireEvent()"
Premius Free Simple Shipping Magento Extension
We are glad to annouce our free Magento Simple Shipping Extension. This extension allows you to add up to 10 fixed price shipping methods to your Magento shopping cart. Easy to use and self-explanatory.
Link to extension: http://www.magentocommerce.com/magento-connect/premius-simpleshipping-3960.html
Direct download link: Premius_Simpleshipping-1.2.1.tgz
To install, use Magento Connect Manager or directly unpack the ‘app’ and ‘skin’ folders to the root of your Magento installation. After installation, a cache cleanup and Admin re-login may be required.
Steve Ballmer is Going to Retire
Microsoft CEO Steve Ballmer is going to retire within the next 12 months, the company announced early Friday. This will happen when a replacement is found.
Ballmer said: "There is never a perfect time for this type of transition, but now is the right time. We have embarked on a new strategy with a new organization and we have an amazing Senior Leadership Team. My original thoughts on timing would have had my retirement happen in the middle of our company’s transformation to a devices and services company. We need a CEO who will be here longer term for this new direction.”
Microsoft also announced it has appointed a special committee to head up the process of finding a replacement for Ballmer. The company's stock shot up by nearly 9% in pre-market trading following the news.
This news about Ballmer retirement come barely one month after Ballmer led a massive reorganization of the company in an attempt to bring all divisions under one unified vision.
More Articles...
- How to create .zip files in Ubuntu Linux
- Fixing MMC cannot open the file COMPMGMT.MSC error
- Joomla 1.0 and PHP 5.3
- Joomla system requirements
- How to fix JComments CAPTCHA image not showing
- How to change the master sound volume in Windows Programatically
- Powerpoint Control is now Presentation Control