Tutorial by Examples: 4

The summation 1/1 + 1/4 + 1/9 + 1/16 + ... out to infinity converges to π2 / 6, and therefore any summation of the form 1/1 + 1/4 + 1/9 + 1/16 + ... + 1/n2 is Θ(1).
.intel_syntax noprefix .data .align 16 hello_msg: .asciz "Hello, World!" .text .global _main _main: push rbp mov rbp, rsp lea rdi, [rip+hello_msg] call _puts xor rax, rax leave ret Assemble: clang main.s -o hello ./hello Not...
You can use a filter to log only messages "lower" than e.g. ERROR level. But the filter is not supported by PropertyConfigurator. So you must change to XML config to use it. See log4j-Wiki about filters. Example "specific level" <appender name="info-out" class=&quo...
results = News.objects.todays_news() for r in results: article = graph.merge_one("NewsArticle", "news_id", r) article.properties["title"] = results[r]['news_title'] article.properties["timestamp"] = results[r]['news_timestamp'] article.pus...
results = News.objects.todays_news() for r in results: article = graph.merge_one("NewsArticle", "news_id", r) if 'LOCATION' in results[r].keys(): for loc in results[r]['LOCATION']: loc = graph.merge_one("Location", "name", loc)...
Create a new console application and add a reference to the Service Bus NuGet package, similar to the sending application above. Add the following using statement to the top of the Program.cs file. using Microsoft.ServiceBus.Messaging; Add the following code to the Main method, set ...
Apache 2.4 provides the following 6 directives via the mod_rewrite module: RewriteBase RewriteCond RewriteEngine RewriteMap RewriteOptions RewriteRule The following directives, available previously in Apache 2.2 have been removed: RewriteLock RewriteLog RewriteLogLevel All the dir...
pip install neo4jrestclient
from neo4jrestclient.client import GraphDatabase db = GraphDatabase("http://localhost:7474", username="neo4j", password="mypass")
from neo4jrestclient import client q = 'MATCH (u:User)-[r:likes]->(m:language) WHERE u.name="Marco" RETURN u, type(r), m' "db" as defined above results = db.query(q, returns=(client.Node, str, client.Node)) Print results for r in results: print("(%s)-[%s]->...
The TLC5940 is a handy item to have when you run out of PWM ports on the Arduino. It has 16 channels, each individually controllable with 12 bits of resolution (0-4095). An existing library is available at http://playground.arduino.cc/Learning/TLC5940. It is useful for controlling multiple servos or...
In PubNub JavaScript v3, you could implement a unique callback for every channel that you subscribed to as long as you called the subscribe function for each channel and implemented the callback in that subscribe like this: var pubnub = new PubNub({ publishKey: "your-pub-key", s...
1. Install GLFW First step is to create an OpenGL window. GLFW is an Open Source, multi-platform library for creating windows with OpenGL, to install GLFW first download its files from www.glfw.org Extract the GLFW folder and its contents will look like this Download and install CMake to buil...
Guice is the default dependency injection (further DI) framework of Play. Other frameworks may be used as well, but using Guice makes development efforts easier, since Play takes care for things under the veil. Injection of Play API-s Starting from Play 2.5 several API-s, which were static in the ...
String base64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; void setup() { Serial.begin(9600); // Turn the serial protocol ON Serial.println("Start Typing"); } void loop() { if (Serial.available() > 0) { // Check if data has bee...
Here's a layout that renders two, four, or six cells across depending on screen size. <div class="container-fluid"> <div class="row"> <div class="col-xs-6 col-md-3 col-lg-2">1</div> <div class="col-xs-6 col-md-3 co...
Helpers and fakeApplication Class Helpers is used a lot for unit tests. It imitates a Play application, fakes HTTP requests and responses, session, cookies - all whatever may be needed for tests. A controller under the test should be executed in a context of a Play application. The Helpers method f...
OpenCL is low level api so it must be implemented in "C space" first. For that, one needs to download header files from Khronos' site. My hardware is AMD and capable of version 1.2, downloading opencl.h cl_platform.h cl.h cl_ext.h cl_egl.h cl_dx9_media_sharing.h cl_d3d10.h c...
Goto - http://www.jorambarrez.be/blog/2010/08/02/tutorial-a-bpmn-2-0-hello-world-with-activiti-5-0-alpha4-in-5-steps/ A very Good and detailed tutorial by Joram Barrez (one of the core Developer of Activiti)
Go to Extensions > Modules > Filter. If not installed select Install. Click Edit & then Enabled from option & then Save module.

Page 4 of 8