Parse error: syntax error, unexpected T_STRING in php

You have to use your escape characters correctly. You can’t have a single-quote (‘) inside of a single-quote-encapsulated string. It breaks it. In order to continue the string and have PHP interpret your inner single-quote literally, you have to escape it with \. Or you can use the alternative string encapsulator, double-quote (“). For future reference, Parse … Read more

What should be hadoop.tmp.dir ?

It’s confusing, but hadoop.tmp.dir is used as the base for temporary directories locally, and also in HDFS. The document isn’t great, but mapred.system.dir is set by default to “${hadoop.tmp.dir}/mapred/system”, and this defines the Path on the HDFS where where the Map/Reduce framework stores system files. If you want these to not be tied together, you can edit your mapred-site.xml such that the definition of mapred.system.dir … Read more

PHP get domain name

Similar question has been asked in stackoverflow before. See here: PHP $_SERVER[‘HTTP_HOST’] vs. $_SERVER[‘SERVER_NAME’], am I understanding the man pages correctly? Also see this article: http://shiflett.org/blog/2006/mar/server-name-versus-http-host Recommended using HTTP_HOST, and falling back on SERVER_NAME only if HTTP_HOST was not set. He said that SERVER_NAME could be unreliable on the server for a variety of reasons, including: no … Read more

What does `set -x` do?

set -x enables a mode of the shell where all executed commands are printed to the terminal. In your case it’s clearly used for debugging, which is a typical use case for set -x: printing every command as it is executed may help you to visualize the control flow of the script if it is not functioning … Read more

Screen area vs Work area rectangle

rcMonitor is the total resolution of the display rcWork is the max area you can use,eg if you went fullscreen maximized a window The work area is the portion of the screen not obscured by the system taskbar or by application desktop toolbars. http://msdn.microsoft.com/en-us/library/ms724947 – SPI_GETWORKAREA

IDEA: javac: source release 1.7 requires target release 1.7

Most likely you have incorrect compiler options imported from Maven here: Also check project and module bytecode (target) version settings outlined on the screenshot. Other places where the source language level is configured: Project Structure | Project Project Structure | Modules (check every module) | Sources Maven default language level is 1.5 (5.0), you will see this version as the Module language level … Read more