A handy pointer for Cocos2d-x

A handy pointer for Cocos2d-xobjects.Hello, Habr! I present to your attention the translation of my article " " Convenient pointer for objects of Cocos2d-x "      All cocos2d-x objects are inherited from the Ref class. This class contains a reference count in the _referenceCount variable. We need to use the release () and reatain () functions to manage this counter. But this can create many problems. For example, a programmer may forget to call release () in an object's destructor. As a result, we will get memory leaks. To avoid this problem and make it easier to work with cocos2d-x objects, I wrote a small template for a ...
+ 0 -

Acceleration of Angular-applications

Many know Minko Gecheva (rhyme.com) for the book "Switching to Angular" and for text "Angular Performance-Checklist", which helps Angular-developers optimize their projects. At our December conference HolyJS 2017 Moscow, he also developed the theme of Angular-performance, making a presentation "Faster Angular applications". And now on the basis of this speech we prepared a habarpost, translating everything into Russian. Welcome to the cut! And if you prefer an English video recording of the performance, we also attach it:
 
 
+ 0 -

About memory leak in one server application

About memory leak in one server application  
 
After reading this note, you will find out what you went through after the unexpected leak of memory of the server application in the FreeBSD OS. What modern means of detecting such problems exist in this environment and why the most powerful of them can be completely useless in the crooked hands .
 
roll the updates , when it will take in head and, in addition, restart the machine. A couple of months ago, so many services collapsed on a neighboring project.
 
someone is conducting a targeted network attack causing an overflow;
 
MeltdownSpectre. Yes! Yes, of course. I do not ...
+ 0 -

Block all the Internet, or a monkey with a grenade

Block all the Internet, or a monkey with a grenade
 
Today, something that has long been warned about happened. ILV blocked a decent part of the global network and Runet in particular, including Yandex, VK, Odnoklassnikov and TamTam at the same time. Facebook and Google also did not stay away.
 
This happened on April 26 at 21:06 UTC , or about midnight in Moscow. A total of were blocked. more than a hundred IP addresses various popular sites.
 
*
 
 
 
???.84
 
pinterest.com
 
 
 
???.1
 
ntp.ix.ru (time server on MSK-IX)
 
 
 
???.10
 
odnoklassniki.ru, ok.ru, tamtam.chat
 
 
 
???.74
 
mail.dom.gosuslugi.ru, mir2...
+ 0 -

Bobaos - KNX TP /UART, Raspberry Pi and Apple HomeKit

Bobaos - KNX TP /UART, Raspberry Pi and Apple HomeKit  
In this publication I'll show you how to configure and run homebridge from the ground up (the implementation of HomeKit Accessory Protocol on nodejs) on the basis of Raspberry Pi, Weinzierl KNX BAOS 838 module kBerry and bobaos.
BAOS 838 kBerry .
 
 
Raspbian with installed: nodejs, npm (in my case raspbian stretch lite, nodejs 8 version).
 
 
 
Let's go
 
We configure the serial port
 
For Raspberry Pi 3:
 
sudo sh -c "echo dtoverlay = pi3-miniuart-bt /boot/config.txt"
 
From the file /boot/cmdline.txt, remove the entry
console = ttyAMA?115200
.
 
Add the user to the ...
+ 0 -

Quest for the elimination of cardiac arrhythmia

Quest for the elimination of cardiac arrhythmia
 
 
Hello, Habr! Today we propose to go on an exciting journey to the very heart of the human body (in the literal sense of the word) to learn how to find and neutralize the sources of arrhythmia.
 
Marching cubes . The essence of this algorithm is that for each voxel, based on its neighbors, a certain part of the surface is given. The result is a closed surface "covering" the voxel model.
 
 

 
 
Mesh rebuilding occurs constantly in the process of changing the voxel model. The screen immediately shows the surface ...
+ 0 -

Generate PDF for downloading server configurations

 
There is a wonderful project www.hiqpdf.com/demo/ConvertHtmlToPdf.aspx
 
 
Can html qualitatively in pdf or pictures convert
 
 
But the default does not take into account the fact that in html you can insert js /iframe, which can be used for other purposes than
 
 
Well, I did not hesitate to try it on their website
 
localhost /api /def /get
 
Generate PDF for downloading server configurations  
 
Ok, let's check that this is exactly .net on Windows
 
 
localhost /api /con.aspx - if not in the course, files with the name con /aux and some other for Windows are forbidden. Legs grow ...
+ 0 -

Bacup correspondence in telegram

Immediately begin with the fact that I do not call anyone to flee the Messenger-which-you can not-be called. Quite the contrary. Simply sleeping is much calmer when one cloud is hacked in another cloud. And then the clouds periodically fall on sinful earth, and losing years of correspondence is very insulting. And my friend asked me how to make a backup, and I did not find any clear instructions.
 
I warn you right away - for backup you will need Linux, or at least a virtual machine with it. If you have hands, you can also on Mac OS, and maybe even on the stub that is now built into Windows - but ...
+ 0 -

How to optimize power consumption in iOS

How to optimize power consumption in iOS
 
Users of devices running iOS often complain that the battery is quickly discharged. When does this happen? Most often when using GPS, but there are other reasons for accelerated discharge of the battery. For example, a saturated exchange through different types of transceivers (cellular, bluetooth) or intensive rendering of graphics. Some lovers of apple devices sin on the battery, but often in a quick discharge, the application developers are to blame. It is important for users to ensure that the charge lasts for a long time, therefore, when developing it is necessary to avoid solutions that increase ...
+ 0 -

What is hidden inside the online cash registers: the development of fiscal registrar

What is hidden inside the online cash registers: the development of fiscal registrar  
 
Few people think, when shopping in the store, how the cashier's technique works. In fact, this is a well-established mechanism, not only from a technical point of view, but also from the legal point of view. Everyone knows that the main thing is to get a check, but that's why a check is a fiscal document that confirms a purchase - basically only entrepreneurs know themselves.
 
 
In this article we will share the experience of developing a cash register and tell you how everything is arranged from within.
 
from the article on 54-ФЗ and the transition to online ...
+ 0 -