
Search In
// A C++ program for splitting a string using strtok()
#include <stdio.h>
#include <string.h>
int main()
{
char str[] = "First-Demo-Example";
char *token = strtok(str, "-"); // Returns first token
while (token != NUL
Foreach loop is another loop which was introduced in C++ 11. The advantage of foreach loop over other loops is that, it can access elements of an array quickly without performing initialization, testing and increment/decrement, the code bec
While extracting specific portion from Date or from Date Time we can use Date Part functions for doing that
-- Declare Variable
Declare @UserID;
--Extracting Day Month and Year
SELECT DATEPART(yyyy,UserCreated) AS UserYear,
DATEPART(mm,Mon
java.util.Random Class:
java.util.Random class is used to generate random numbers. As we know random numbers are very useful especially in game development. In java we can generate random numbers in two ways either using java.lang.Math.random() meth
Recursion is the process which repeat itself until some condition is reached otherwise it gets repeated again and again.
In programming languages, if a program allows to call a function inside the same function, then it is called a recursive
I was stuck in the following issue. Issue was related with retrieving common records in group. I have to display records which are common with each id.
Following records are inserted into the table "mytable":
id | title
-----
From Xcode6 and later .pch file is not created automatically. One has to create it manually.
Following are the steps to add/create a pch file in your xcode project:
Create a new file using: ⌘cmd+N
•
If you want to call custom create method if method is not defined then follow the following code in your .py file.
if values.get('acquirer_id'):
acquirer = self.pool['payment.acquirer'].browse(cr, uid, values.get('acquirer_id'), contex
An exception is an instance of the class Exception or a descendant. In ruby to rescue exceptions we do something like this:
def process_request!
#some code here
rescue
Rails.logger.error { "#{e.message} #{e.backtrace.join("\n")}" }
The quantifiers describes the number of event of a character to match against. For ease of use we divide three types of quantifier:
Greedy
Reluctant
Possessive
1. Greedy quantifier:
With the help of greedy quantifier match
