Apache2: ‘AH01630: client denied by server configuration’

If you are using Apache 2.4 You have to check allow and deny rules Check out http://httpd.apache.org/docs/2.4/upgrading.html#access In 2.2, access control based on client hostname, IP address, and other characteristics of client requests was done using the directives Order, Allow, Deny, and Satisfy. In 2.4, such access control is done in the same way as other … Read more

Enhanced FOR loops in C++

In C++11, if your compiler supports it, yes it is. It’s called range-based for. It works for C style arrays and any type that has functions begin() and end() that return iterators. Example:

Censored Words Condition

The best solution would be to use a regex with word boundary. if(myString.matches(“.*?\\bdarn\\b.*?”)) This prevents you from matching sdarnsas a rude word. 🙂 demo here

Get first row value of a given column

To select the ith row, use iloc: To select the ith value in the Btime column you could use: There is a difference between df_test[‘Btime’].iloc[0] (recommended) and df_test.iloc[0][‘Btime’]: DataFrames store data in column-based blocks (where each block has a single dtype). If you select by column first, a view can be returned (which is quicker than returning a copy) and the original dtype is preserved. In … Read more

bash assign default value

Use a colon: The colon is a null command that does nothing and ignores its arguments. It is built into bash so a new process is not created.