I had a weird issue on a PHP script. I was returning an error 404 on a WordPress page the following way : // At the beginning of a template page global $wp_query; if ( $posts_query->post_count == 0 ) { $wp_query->set_404(); status_header(404); get_template_part( 404 ); die(); } When I was accessing the error page on the browser, It worked well, I had a 404 error page displayed + the correct status code when I inspected the page (Network tab). However, when I was “curl-ing” the same error page, it didn’t work. It didn’t work in the shell, or in the PHP script. The Shell command I did : $ curl -I http://myerrorpage.dev HTTP/1.1 200 OK Date: Tue, 13 Mar 2018[…]

I had this error once while trying to install the npm package react-devtools. leiluspocus$ npm i -g react-devtools npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules npm ERR! path /usr/local/lib/node_modules npm ERR! code EACCES npm ERR! errno -13 npm ERR! syscall access npm ERR! Error: EACCES: permission denied, access ‘/usr/local/lib/node_modules’ npm ERR! { Error: EACCES: permission denied, access ‘/usr/local/lib/node_modules’ npm ERR! stack: ‘Error: EACCES: permission denied, access \’/usr/local/lib/node_modules\”, npm ERR! errno: -13, npm ERR! code: ‘EACCES’, npm ERR! syscall: ‘access’, npm ERR! path: ‘/usr/local/lib/node_modules’ } npm ERR! npm ERR! Please try running this command again as root/Administrator. npm ERR! A complete log of this run can be found in: npm ERR! /Users/leiluspocus/.npm/_logs/2018-02-27T13_52_59_313Z-debug.log The issue was that I was previously installing[…]

It’s pretty impressive how we can simply set up a development environment without XCode using Expo. Make sure you’re using the right Node and NPM versions and double check that there are no missing packages while doing the npm install. I had to run these commands before running npm start on my app (created through create-react-native-app ): sudo sysctl -w kern.maxfiles=5242880 sudo sysctl -w kern.maxfilesperproc=524288   While you edit your project files (using any IDEA like Atom or Sublime Text), Expo provides live reloading so that you can directly test your application very quickly. I made a very simple app that only embed a webview. IT can be found here: https://github.com/leiluspocus/react-test   Resources: Basic tutorial to get started with React Native:[…]

I had the following error in a “User Defined Java Class” step on Pentaho Data Integration. FieldHelper cannot be cast to java.lang.String Indeed, you have to use the getRow() method to convert the field you’re getting into a String or any other variable type. public boolean processRow(StepMetaInterface smi, StepDataInterface sdi) throws KettleException, Exception { Object[] r = getRow(); if (r == null) { return false; } String myString = get(Fields.In, “FeedSubmissionId”).getString(r); }