What makes Lisp macros so special?

Reading Paul Graham’s essays on programming languages one would think that Lisp macros are the only way to go. As a busy developer, working on other platforms, I have not had the privilege of using Lisp macros. As someone who wants to understand the buzz, please explain what makes this feature so powerful. Please also … Read more

ndroid 8: Cleartext HTTP traffic not permitted

According to Network security configuration – Starting with Android 9 (API level 28), cleartext support is disabled by default. Also have a look at Android M and the war on cleartext traffic Codelabs explanation from Google Option 1 – First try hitting the URL with “https://” instead of “http://” Option 2 – Create file res/xml/network_security_config.xml … Read more

IF “OR” multiple conditions

In R you can’t use , to separate line, but you can use ;. Also, the way you are doing considers a,b and c are boolean (TRUE/FALSE), which is not the case as they are numbers. Your condition should be : Note that your code will run nevertheless, even if a,b and c are not … Read more

Categories R

Read data (.dat file) with Pandas

You can use parameter usecols with order of columns: Edit: You can use separator regex – 2 and more spaces and then add engine=’python’ because warning: ParserWarning: Falling back to the ‘python’ engine because the ‘c’ engine does not support regex separators (separators > 1 char and different from ‘\s+’ are interpreted as regex); you … Read more

SQL conditional SELECT

Sounds like they want the ability to return only allowed fields, which means the number of fields returned also has to be dynamic. This will work with 2 variables. Anything more than that will be getting confusing. Dynamic SQL will help with multiples. This examples is assuming atleast 1 column is true.

Proper Format of iframe in PHP?

You are not properly escaping the double quotes. You only escape it before the http:// bit and all the way at the end, but not in between (which is also necessary). If you encapsulate the HTML between single quotes, you don’t have to escape all the double ones. Try it like this: Although, you’re not … Read more

In c++ what does a tilde “~” before a function name signify?

It’s the destructor, it destroys the instance, frees up memory, etc. etc. Here’s a description from ibm.com: Destructors are usually used to deallocate memory and do other cleanup for a class object and its class members when the object is destroyed. A destructor is called for a class object when that object passes out of … Read more