Tutorial by Examples

//Using Iterator Iterator iterator = deque.iterator(); while(iterator.hasNext(){ String Item = (String) iterator.next(); } //Using For Loop for(Object object : deque) { String Item = (String) object; }
# not all of this is required, but just here for reference bl_info = { "name": "Hello World", # name of the add-on "author": "Blender developer", # name of the author "version": (1, 0), ...
Thanks to encoders and decoders, the JSR 356 offers a object oriented communication models. Messages definition Let's assume all received messages have to be transformed by the server before being sent back to all connected sessions: public abstract class AbstractMsg { public abstract void t...
import java.util.*; class Book { int id; String name,author,publisher; int quantity; public Book(int id, String name, String author, String publisher, int quantity) { this.id = id; this.name = name; this.author = author; this.publisher = p...
import java.util.*; enum days { SUNDAY, MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY } public class EnumSetExample { public static void main(String[] args) { Set<days> set = EnumSet.of(days.TUESDAY, days.WEDNESDAY); // Traversing elements Itera...
public class localInner1{ private int data=30;//instance variable void display(){ class Local{ void msg(){System.out.println(data);} } Local l=new Local(); l.msg(); } public static void main(String args[]){ localInner1 obj=new localInner1(); obj.di...
Read Keywords KeyWordFunctionExampleMATCHFind following expression in graphMATCH (n) Write Keywords KeyWordFunctionExampleCREATECreate the following patternCREATE (n:Person{name:"Bob"})DELETEDelete the following nodes/relationshipsDELETE nDETACH DELETEDelete the following nodes, and any...
The function Emitter.listenerCount(eventName) will return the number of listeners that are currently listening for the event provided as argument const EventEmitter = require("events"); class MyEmitter extends EventEmitter{} var emitter = new MyEmitter(); emitter .on("data&quot...
When a Qt event loop is used to perform operations and a non-Qt-saavy user needs to interact with that event loop, writing the slot to handle regular invocations from another thread can simplify things for other users. main.cpp: #include "OperationExecutioner.h" #include <QCoreApplic...
Naming When naming CSS variables, it contains only letters and dashes just like other CSS properties (eg: line-height, -moz-box-sizing) but it should start with double dashes (--) //These are Invalids variable names --123color: blue; --#color: red; --bg_color: yellow --$width: 100px; //Vali...
// sample token string taken from the New example tokenString := "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJmb28iOiJiYXIiLCJuYmYiOjE0NDQ0Nzg0MDB9.u1riaD1rW97opCoAuRCTy4w58Br-Zk-bh7vLiRIsrpU" // Parse takes the token string and a function for looking up the key. The latter is especially ...
The StandardClaim is embedded in the custom type to allow for easy encoding, parsing and validation of standard claims. tokenString := "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJmb28iOiJiYXIiLCJleHAiOjE1MDAwLCJpc3MiOiJ0ZXN0In0.HE7fK0xOQwFEr4WDgRWj4teRPZ6i3GLwD5YCm6Pwu_c" type MyCustomCla...
// Create a new token object, specifying signing method and the claims // you would like it to contain. token := jwt.NewWithClaims(jwt.SigningMethodHS256, jwt.MapClaims{ "foo": "bar", "nbf": time.Date(2015, 10, 10, 12, 0, 0, 0, time.UTC).Unix(), }) // Si...
The StandardClaims type is designed to be embedded into your custom types to provide standard validation features. You can use it alone, but there's no way to retrieve other fields after parsing. See the custom claims example for intended usage. mySigningKey := []byte("AllYourBase") //...
// Token from another example. This token is expired var tokenString = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJmb28iOiJiYXIiLCJleHAiOjE1MDAwLCJpc3MiOiJ0ZXN0In0.HE7fK0xOQwFEr4WDgRWj4teRPZ6i3GLwD5YCm6Pwu_c" token, err := jwt.Parse(tokenString, func(token *jwt.Token) (interface{}, error...
type contextKey string const ( // JWTTokenContextKey holds the key used to store a JWT Token in the // context. JWTTokenContextKey contextKey = "JWTToken" // JWTClaimsContextKey holds the key used to store the JWT Claims in the // context. JWTClaimsContex...
Object pollAnswered = getCurrentSession().createSQLQuery( "select * from TJ_ANSWERED_ASW where pol_id = "+pollId+" and prf_log = '"+logid+"'").uniqueResult(); with this query, you get a unique result when you know the result of the query is always going to b...
If you get a message that the browser can't connect to the server, first check to ensure the server is up. $ ps -aef | grep httpd You should see a few httpd processes if Apache is up and running.
TYPO3 is the leading enterprise content management system. It focuses on providing the features that professionals need to build and maintain large and/or complicated websites across multiple devices (mobile and desktop). Features Open Source Multilingual Frequent security updates - safety fir...
1.vim ~/.bash_profile The file may not exist (if not, you can just create it). 2.type in this and save the file: export PATH=$PATH:YOUR_PATH_HERE

Page 1273 of 1336