Tutorial by Examples

With deferred execution, if the data to be queried is changed, the query object uses the data at the time of execution, not at the time of definition. var data = new List<int>() {2, 4, 6, 8}; var query = data.Select(x => x * x); If we execute the query at this point with an immediate m...
0.6.0-dev In Julia v0.6 and later, command macros are supported in addition to regular string macros. A command macro invocation like mymacro`xyz` gets parsed as the macro call @mymacro_cmd "xyz" Note that this is similar to string macros, except with _cmd instead of _str. We typ...
An enumerated type is a type that can hold one of a finite list of possible values. In Julia, enumerated types are typically called "enum types". For instance, one could use enum types to describe the seven days of the week, the twelve months of the year, the four suits of a standard 52-ca...
Although the @enum macro is quite useful for most use cases, it can be excessive in some use cases. Disadvantages of @enum include: It creates a new type It is a little harder to extend It comes with functionality such as conversion, enumeration, and comparison, which may be superfluous in some...
public class RedisPublisher extends RouteBuilder { public static final String CAMEL_REDIS_CHANNEL = "CamelRedis.Channel"; public static final String CAMEL_REDIS_MESSAGE = "CamelRedis.Message"; @Value("${redis.host}") private String redisHost; ...
public class RedisSubscriber extends RouteBuilder { @Value("${redis.host}") private String redisHost; @Value("${redis.port}") private int redisPort; @Value("${redis.channel.mychannel}") private String redisChannel; private Object b...
<bean id="managedCamel" class="com.pubsub.example.ManagedCamel" > <constructor-arg name="routes"> <list> <ref bean="redisSubscriber"/> </list> </constructor-arg> </bean> &lt...
<bean id="managedCamel" class="com.pubSub.example.ManagedCamel" > <constructor-arg name="routes"> <list> <ref bean="redisPublisher"/> </list> </constructor-arg> </bean> <...
public class ManagedCamel implements Managed { public static final String REDIS_TEMPLATE = "redisTemplate"; public static final String LISTENER_CONTAINER = "listenerContainer"; public static final String REDIS_SERIALIZER = "redisSerializer"; privat...
By Creating Custom Progress Dialog class, the dialog can be used to show in UI instance, without recreating the dialog. First Create a Custom Progress Dialog Class. CustomProgress.java public class CustomProgress { public static CustomProgress customProgress = null; private Dialog m...
All instances (objects) of an entity class can be loaded from the underlying database table as follows (akin to retrieving all rows from the table): Iterable<Foo> foos = fooRepository.findAll(); The findAll method is provided by the CrudRepository interface. It returns an Iterable instead ...
A particular instance of an entity class can be loaded as follows: Foo foo = fooRepository.findOne(id); The findOne method is provided by the CrudRepository interface. It expects an identifier that uniquely identifies an entity instance (for instance, a primary key in a database table). The Java...
All instances of an entity class with one of the class attributes matching a specified value can be retrieved as follows: public interface FooRepository extends CrudRepository<Foo, Long> { List<Foo> findAllByName(String name); } Invoking the findAllByName method results in the JP...
node_redis, as you may have guessed, is the Redis client for Node.js. You can install it via npm using the following command. npm install redis Once you have installed node_redis module you are good to go. Let’s create a simple file, app.js, and see how to connect with Redis from Node.js. app...
Now that you know how to connect with Redis from Node.js, let’s see how to store key-value pairs in Redis storage. Storing Strings All the Redis commands are exposed as different functions on the client object. To store a simple string use the following syntax: client.set('framework', 'Angula...
Checking the Existence of Keys Sometimes you may need to check if a key already exists and proceed accordingly. To do so you can use exists() function as shown below: client.exists('key', function(err, reply) { if (reply === 1) { console.log('exists'); } else { cons...
ICU(International Components for Unicode) can be installed as a library for the following languages: Java: ICU4J C/C++: ICU4C Python: pyICU Perl: Wrappers for ICU (PICU) C#: ICU-dotnet Erlang: icu4e Ruby: ffi-icu Haskell: text-icu Lua: ICU4Lua Here is a series of installion steps for a...
The symbols [ ] { } ^ \ | ~ # are frequently used in C programs, but in the late 1980s, there were code sets in use (ISO 646 variants, for example, in Scandinavian countries) where the ASCII character positions for these were used for national language variant characters (e.g. £ for # in the UK; Æ ...
C99 In 1994 more readable alternatives to five of the trigraphs were supplied. These use only two characters and are known as digraphs. Unlike trigraphs, digraphs are tokens. If a digraph occurs in another token (e.g. string literals or character constants) then it will not be treated as a digraph,...
Here i am going to explain the ajax custom pagination in cakephp 3.2. This one is easier to use and understandable. Do this code inside any function and any controller you need. Make an ajax call for the pagination <script type="text/javascript"> $(document).ready(function ()...

Page 955 of 1336