Understanding memory allocation for large integers in Python

Published on

Python uses C structs to represent objects, includingints: struct _longobject { PyObject_VAR_HEAD digit ob_digit[1]; }; PyObject_VAR_HEAD is just a macro that adds other fields in the struct and, ob_digits is an array holding the value for the number. Boiler-plate in size comes from that struct, for small and large Python numbers. Why increments of 4 … Continue reading Understanding memory allocation for large integers in Python

How to set NODE_ENV to production/development in OS X node.js

Published on

Before running your app, you can do this in console, export NODE_ENV=production Or if you are in windows you could try this: SET NODE_ENV=production or you can run your app like this: NODE_ENV=production node app.js You can also set it in your js file: process.env.NODE_ENV = ‘production’; But I don’t suggest to do it in … Continue reading How to set NODE_ENV to production/development in OS X node.js

CentOS 7.2 semantic error: while resolving probe point

Published on

Error: Solution: As described in one of the comments on that bugzilla entry, you need to install the both systemtap and the debuginfo for the kernel in order for this mitigation to work. The commands given are: yum install systemtap yum-utils debuginfo-install kernel-$(uname -r) Based on what you posted, presumably you already have systemtap, but … Continue reading CentOS 7.2 semantic error: while resolving probe point

Rendering issue in XML preview : Unable to locate mode 0

Published on

That’s problem with RecyclerView in com.android.support:design:25.0.0 Maybe there is some issue in that version. Changed version to 24.1.1 solved my problem. compile ‘com.android.support:appcompat-v7:24.1.1’ compile ‘com.android.support:support-v13:24.1.1’ compile ‘com.android.support:design:24.1.1’