embedXcode find Arduino system library header files

Arduino play on Mac,In addition to the official use of the simple addition of IDE,You can also choose to use Xcode to develop。

use embedXcode Plug-ins can make Xcode transformed into embedded development IDE,Including native compilation、Uploading full set of features。

but,In the standard library when it is a problem,For example, the figure above,I was testing nRF24L01 The SPI module,Need to use [crayon-679c143bbb[……]

Click link to continue reading...

Solving MySQL suddenly occupy all memory problems

Pocketed a while ago on migrating from virtual host to an independent VPS,Maintenance of this all is my own。For performance,If your environment,Nature does not use the old configuration。

I use Ubuntu Server 16.04 + PHP 7.0 + Nginx + MySQL 5.7 In short,Stepped on a lot of holes。

From now on,To record

Why MySQL is suddenly filling up memory

At first I thought it was a VPS under attack,But not only this traffic View Card[……]

Click link to continue reading...

Ubuntu 16.04 Adding memcached and redis extended PHP7

Switch to PHP 7 after that,Site speed boost,But usually just one of extension may not yet support PHP7.

Memcached

For example, I now use the latest Ubuntu 16.04,Although it built in PHP 7 source,But it has not memcached,Fortunately, however,,It has supported PHP 7 ,Not just the source of it,We compile it manually。

To install memcached,You need to install the dependent libraries libmemcached

FromHereturn up[……]

Click link to continue reading...

Swift in the single mode

In the process of writing the code,We will meet when the need to ensure that only one instance of the global,This time use the singleton pattern。

Single mode--this ensures that only one instance of a class,And provide a global point of access to。

What about how to implement the singleton pattern? We take a look at the classic Java code,How to implement the singleton pattern。

Our online search for "Java singleton pattern" will be able to find plenty of readily available code snippets,Here are random excerpts of a report:
[crayon-679c143bbd5989784[……]

Click link to continue reading...

Rollover to the Ubuntu Server 16.04

We vps,In general, Ubuntu is still easy to use,On the one hand it is more friendly to novice,On the other hand are some common service configuration can be a key installation。Plus Niubi ufw,Really perfect。

but,Now not all vps service providers are able to provide the latest Ubuntu Server 16.04,what a pity。It has so many benefits of,For example, the native library is php7,No additional compiler ......

So since it is linux,Will be able to directly upgrade to the new version - I remember Ubu[……]

Click link to continue reading...

Please use caution in the C # var

we all know,For example, Swift 、 Python,,You do not need to declare a special variable type - although they are type-safe languages,But it can help you to dynamically infer the type of a variable in context。

Python do what you do,Write a name is the default declare a variable;And Swift,It is more close to our topic,It also uses where

If you have had experience in the use Swift,Again using C #[……]

Click link to continue reading...

Let's Encrypt using the VPS configure SSL for Nginx

Before we have talked about how to siteOpen Full Site SSL Now we take a look at how the vps to Nginx open Let's Encrypt certificate and automatically update。

The contents of this article older,About letsencrypt configuration article,I wrote a new,Perhaps you can refer to a look:letsencrypt tool renamed certbot

Set the environment

First of all,We should prepare the installation environment,This time I am using CentOS 6.7[……]

Click link to continue reading...

Using python write a domain whitelist reptiles

Some time ago I wrote an article,SayIt is time to use the whitelist to the wallBe,But that has expired long whitelist,It is not so smooth with the,Then I say boasted:I want to implement your own a reptile,Come crawling China's domain,Good update whitelist。

Ok,All in all this crawler is written on the line and then climb took more than ten thousand,But in the end I found the former to do a better solution,So the project was abandoned reptile。In short,White List more powerful,Just do not use it this reptile。

Crawler is written in Python,Not used by[……]

Click link to continue reading...