Tutorial by Examples: 4

Current version (log4j2) Using Maven: Add the following dependency to your POM.xml file: <dependencies> <dependency> <groupId>org.apache.logging.log4j</groupId> <artifactId>log4j-api</artifactId> <version>2.6.2</version> </de...
First need to create a final static logger object: final static Logger logger = Logger.getLogger(classname.class); Then, call logging methods: //logs an error message logger.info("Information about some param: " + parameter); // Note that this line could throw a NullPointerException!...
Preface You'll need node >= 4 and express 4 for this project. You can get the latest node distribution from their download page. Before this tutorial, you should initialize your node project by running $ npm init from the command line and filling in the information you want. Note that you c...
HTTP 404 Not Found means that the server couldn't find the path using the URI that the client requested. HTTP/1.1 404 Not Found Most often, the requested file was deleted, but sometimes it can be a document root misconfiguration or a lack of permissions (though missing permissions more frequentl...
using System; using System.Security.Cryptography; using System.Text; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { string source = "Hello World!"; using (SHA384 sha384Hash = SHA384.Create()) ...
section .data msg db "Hello world!",10 ; 10 is the ASCII code for a new line (LF) section .text global _start _start: mov rax, 1 mov rdi, 1 mov rsi, msg mov rdx, 13 syscall mov rax, 60 mov rdi, 0 syscall If you want to e...
The 80486 Paging Subsystem was very similar to the 80386 one. It was backward compatible, and the only new features were to allow for memory cache control on a Page-by-Page basis - the OS designers could mark specific pages as not to be cached, or to use different write-through or write-back caching...
This is the default calling convention for 64-bit applications on many POSIX operating systems. Parameters The first eight scalar parameters are passed in (in order) RDI, RSI, RDX, RCX, R8, R9, R10, R11. Parameters past the first eight are placed on the stack, with earlier parameters closer to th...
{ "description": "My awesome library", "dependencies": { }, "frameworks": { "net40": { }, "netstandard1.3": { "dependencies": { "NETStandard.Library": "1.6.0" ...
Since the Physical Address Extension (PAE) mode that was introduced in the Pentium Pro (and Pentum M) was such a change to the Operating System memory management subsystem, when Intel designed the Pentium II they decided to enhance the "normal" Page mode to support the new Physical Address...
Parameters The first 4 parameters are passed in (in order) RCX, RDX, R8 and R9. XMM0 to XMM3 are used to pass floating point parameters. Any further parameters are passed on the stack. Parameters larger than 64bit are passed by address. Spill Space Even if the function uses less than 4 paramet...
The fourth version of the framework focuses mainly on making mobile web application development easier. New features in AP.NET MVC 4 ASP.NET Web API ASP.NET Web API is a framework that makes it easy to build HTTP services that reach a broad range of clients, including browsers and mobile devi...
#Insert a row before/after line 22 $Sheet->Rows("22:22")->Insert(xlUp, xlFormatFromRightOrBelow); $Sheet->Rows("23:23")->Insert(-4121,0); #xlDown is -4121 and that xlFormatFromLeftOrAbove is 0 #Delete a row $Sheet->Rows("22:22")->Delete(); ...
The sum 20 + 21 + 22 + ... + 2n-1 simplifies to 2n - 1. This explains why the maximum value that can be stored in an unsigned 32-bit integer is 232 - 1.
If you want to automatically throw an exception when searching for a record that isn't found on a modal, you can use either Vehicle::findOrFail(1); or Vehicle::where('make', 'ford')->firstOrFail(); If a record with the primary key of 1 is not found, a ModelNotFoundException is thrown. W...
Note: Before upgrading your Rails app, always make sure to save your code on a version control system, such as Git. To upgrade from Rails 4.2 to Rails 5.0, you must be using Ruby 2.2.2 or newer. After upgrading your Ruby version if required, go to your Gemfile and change the line: gem 'rails', '...
// initialize pubnub object var pubnub = new PubNub({ subscribeKey: "yourSubscribeKey", publishKey: "myPublishKey" // optional }) // get up to the last 100 messages // published to the channel pubnub.history( { channel: 'channel1' }, func...
Prerequisite steps: Install Java at your machine Visit neo4j website and click the link "Download Community Edition" or visit directly the download link. Unzip the .tar downloaded file in your home directory Start Neo4j from console (headless, without web server) Visit the sub-d...
json4s uses implicit formats as other json frameworks. SBT dependency: libraryDependencies += "org.json4s" %% "json4s-native" % "3.4.0" //or libraryDependencies += "org.json4s" %% "json4s-jackson" % "3.4.0" Imports import org.json4s...
<?xml version="1.0" encoding="UTF-8"?> <Configuration> <Appenders> <Console name="STDOUT" target="SYSTEM_OUT"> <PatternLayout pattern="%d %-5p [%t] %C{2} %m%n"/> </Console> </Appenders&gt...

Page 2 of 8