
Search In
To get the date of the past day you can use the below code. You can pass any number of day for which you want to get date instead of 7, I'm getting date of past 7 days in the below example:
/**
* Get date before past 7 days
*
* @return string
To crop image in iOS use the following method.
it will crop the image from the visible frame of the imageView.
-(UIImage *)imageFromImageView:(UIImageView *)imageView rectFrame:(CGRect)frame{
UIGraphicsBeginImageContextWithOptions(frame.size, im
There are many times when we run our testcases there might be the possibility that testcases may fail and when the testcase may fail then the screenshot of the screen should be captured. We should use the following code to capture the screenshot:
Sy
Hello Readers ,
The array_fill_keys() function fills an array with values, specifying keys.
For Example we have an array array("a","b","c","d"); and we want to put "blue" in all values of a key. See the below example.
<!DOCTYPE html>
<htm
Hello Readers ,
The array_flip() function exchanges all keys with their associated values in an array.
Say we have array array("a"=>"red","b"=>"green","c"=>"blue","d"=>"yellow"); and we want to interchange key and values of an array .
To convert hexadecimal values to ASCII characters we will use a PHP function hex2bin().
Syntax:
hex2bin(string);
In above line we have a passed a parameter string in the function which is basically the hexadecimal value that we need to convert t
HEX(str), HEX(N)
A hexadecimal string is returened by HEX(), it is a representation of str for a string argument str, where each byte of each character in str is converted to two hexadecimal digits ans multibyte characters are converted more than t
In python simple server is Internet servers, we use the socket function available in socket module to create a socket object. After then a socket object is used to call other functions to setup a socket server. after this call bind(hostname, port) fu
Given an array of numbers I, write a program to find the sum of remaining in the array and display the new array. the first line specifies the no of elements in the array followed by the elements in the array in the second line.
Sample input: 4 1 2
I want to stream .dat files from a file i created in python, i wrote the python code and it worked great but i can't write it in C++, i need help to write that code in C++, Thank you.
The python code is as following :
for ix in