Tutorial by Examples: c

Usually this means that the Master crashed and that sync_binlog was OFF. The solution is to CHANGE MASTER to POS=0 of the next binlog file (see the Master) on the Slave. The cause: The Master sends replication items to the Slave before flushing to its binlog (when sync_binlog=OFF). If the Master cr...
Check for a Firewall issue blocking port 3306. Some possible diagnostics and/or solutions Is the server actually running? "service firewalld stop" and "systemctl disable firewalld" telnet master 3306 Check the bind-address check skip-name-resolve check the socket.
1067 This is probably related to TIMESTAMP defaults, which have changed over time. See TIMESTAMP defaults in the Dates & Times page. (which does not exist yet) 1292/1366 DOUBLE/Integer Check for letters or other syntax errors. Check that the columns align; perhaps you think you are putting i...
In some cases basic validation is not enough. Angular support custom validation adding validator functions to the $validators object on the ngModelController: angular.module('app', []) .directive('myValidator', function() { return { // element must have ng-model attribute // o...
It may be helpful to include additional information with an exception, e.g. for logging purposes or to allow conditional handling when the exception is caught: class CustomError < StandardError attr_reader :safe_to_retry def initialize(safe_to_retry = false, message = 'Something went wro...
English text has the occasional diacritics. Loan words, like née, café, entrée Names, like Noël and Chloë Place names, like Montréal and Québec
Almost all written text has punctuation marks which are outside the ASCII character set: dashes: the en dash –, and the em dash — Quotation marks: “quotes” rather than "quotes" The ellipsis…
There are a few common symbols in use: copyright sign ©, and trademark signs ® ™ fractions like ¼ superscripts. For instance, a shorthand for square meters is m².
fork() is a system call. fork is used to create a child process from the running process, which is a replica of the parent process(Process which executed fork() ). Child process is derived from the parent process. Both the parent and child have different address space, each is independent of the cha...
In this example we create a new list element with the text "new text", and select the first unordered list, and its first list element. let newElement = document.createElement("li"); newElement.innerHTML = "new text"; let parentElement = document.querySelector(&quo...
There are several ways of getting the data that you will bind to the DOM elements. The simpler one is having your data in your script as an array... var data = [ ... ]; But D3.js allows us to load data from an external file. In this example, we will see how to properly load and deal with data fr...
You can create ACL by using Phalcon\Acl\Adapter\Memory class: $acl = new Phalcon\Acl\Adapter\Memory(); By default phalcon allows action to resource which has not been defined, to change this you can use: $acl->setDefaultAction(Phalcon\Acl::DENY); Roles can be added in two ways - using Pha...
You can allow role to access some action on resource by: $acl->allow('Administrator', 'products', 'create'); You can deny role to access some action on resource by: $acl->deny('Customer', 'categories', 'create'); You can check if role is allowed to some action on resource by using: $a...
You can add also add some more logic which has to be checked to your ACL using anonymous functions. They will be executed when using Phalcon\Acl\Adapter\Memory::allow() or Phalcon\Acl\Adapter\Memory::deny(), if they will return true, they role will be allowed to access certain action on resource. $...
By implementing Phalcon\Acl\RoleAware or Phalcon\Acl\ResourceAware you can use them as objects in Phalcon\Acl\Adapter\Memory::isAllowed(). // Create our class which will be used as roleName class UserRole implements Phalcon\Acl\RoleAware { protected $id; protected $roleName; publ...
Modifying the strings returned by the standard functions getenv(), strerror() and setlocale() is undefined. So, implementations may use static storage for these strings. The getenv() function, C11, §7.22.4.7, 4, says: The getenv function returns a pointer to a string associated with the matched...
To execute a function within a loop in node.js, it's fine to use a for loop for short loops. But the loop is long, using for loop will increase the time of processing which might cause the node process to hang. In such scenarios, you can use: asycn.times function recursiveAction(n, callback) { ...
When we want to handle array of data, its better to use async.each. When we want to perform something with all data & want to get the final callback once everything is done, then this method will be useful. This is handled in parallel way. function createUser(userName, callback) { //creat...
var path = "/test_javascript_upload.txt"; var content = "data to upload"; var accessToken = "<ACCESS_TOKEN>"; var uploadUrl = "https://content.dropboxapi.com/2/files/upload" var result; var xhr = new XMLHttpRequest(); xhr.onreadystatechange = fun...
The regexp command is used to match a regular expression against a string. # This is a very simplistic e-mail matcher. # e-mail addresses are extremely complicated to match properly. # there is no guarantee that this regex will properly match e-mail addresses. set mydata "send mail to john....

Page 444 of 826