Monday, June 16, 2014

How to take Screen Shot in Huawei Honor 3C

How to take Screen Shot in Huawei Honor 3C

How to Take snapshot in Huawei Honor 3C

To take a screenshot or screen capture on the Huawei Honor:
Hold down the POWER button and the VOLUME DOWN button simultaneously.
All screenshot images taken using the methods described above are saved by default to the Pictures folder on your phones internal SD card. You can also see the captured images in the picture Gallery.

LOCATE Function jBase

Locate Function with Example

Locate Function finds exact String in array, it return position of element.

Code:

SUBROUTINE PK.M.LOCATE
    $INSERT I_COMMON
    $INSERT I_EQUATE
    GOSUB INIT.FILES
    GOSUB PROCESS
PROCESS:
    LENGTH = DCOUNT(CHK.ARR,FM)
    *CRT "LENGTH = ":LENGTH
    NAME = 'Furqan'
LOOP
    WHILE POS LT LENGTH
        CRT I
        LOCATE NAME IN CHK.ARR SETTING POS THEN
        CRT CHK.ARR<POS>:POS
        CHK.ARR<POS> := '!'
        I +=1
        END
    REPEAT
FOR I = 1 TO LENGTH
CRT CHK.ARR<I>
NEXT I
RETURN
INIT.FILES:
CHK.ARR = ''
I = ''
POS = ''   
CHK.ARR <-1> = '12Monday'
CHK.ARR <-1> = '14Tuesday'
CHK.ARR <-1> = 'Furqan'
CHK.ARR <-1> = '32Thursday'
CHK.ARR <-1> = '36Saturday'
CHK.ARR <-1> = '38Sunday'
CHK.ARR <-1> = 'Furqan'
CHK.ARR <-1> = '58Wednesday'
CHK.ARR <-1> = '60Thursday'

RETURN


OUTPUT



Friday, June 13, 2014

Useful jBase Commands

Useful jBase Commands


JBASETHREADCreate
command
Starts a thread.
JBASETHREADStatus
command
Shows the status of all running threads.



For Any Help Email Me Furqan Khyraj
T24 Technical Consultant

Useful jBase Functions

Here is the list of use Full jBase Functions.

@ function Cursor and screen manipulation.
ABS function Returns absolute value.
ABSS function Returns absolute value of elements in a dynamic array
ADDS function Adds corresponding elements in two dynamic arrays.
ALPHA function Returns Boolean result for alphabetic check.
ANDS function Create a dynamic array of logical AND of corresponding elements from two arrays.
ASCII function EBCDIC to ASCII conversion function.
ASSIGNED function Returns Boolean result for variable assignment.
BITAND function Performs a bitwise AND comparison of two integers.
BITCHANGE function Toggles the state of the specified bit.
BITCHECK function Returns the current value of the specified bit.
BITLOAD function Assigns values in the local bit table.
BITNOT function Returns the bitwise negation of an integer specified by a numeric expression.
BITOR function Performs a bitwise OR comparison of two integers.
BITRESET function Resets the value of the specified bit.
BITSET function Sets the value of the specified bit.
BITTEST function Tests the bit number of the integer specified by an expression.
BITXOR function Performs a bitwise XOR comparison of two integers.
BYTELEN function returns the length of the expression as the number of bytes rather than the number of characters.
CALLONEXIT function specifies the name of a subroutine to call when the program terminates
CATS function Concatenates corresponding elements in two dynamic arrays.
CHANGE function Sub-string replacement.
CHANGE function Adjust existing time stamp to return new timestamp value.
CHAR function Returns the ASCII equivalent of a numeric expression.
CHARS function Returns the ASCII equivalents of the numeric expressions in a dynamic array.
CHDIR function Changes the current directory.
CHECKSUM function Returns numeric checksum for the supplied expression.
COL1 / COL2 functions Position determination subsequent to use of the FIELD function.
COMPARE function Compares two strings.
CONVERT function Converts a character string to another.
COS function Returns the cosine of an angle.
COUNT function Returns the number of times that one string occurs in another.
COUNTS function Counts the number of times a substring is repeated in each element of a dynamic array.
DATE function Returns the date in internal form.
DCOUNT function Counts the number of elements in a string separated by a specified delimiter.
DECRYPT function Decodes an encrypted string.
DIR function Returns information about a file.
DIVS function Divides corresponding elements in two dynamic arrays.
DIV function Calculates the value of the quotient after division of the dividend by the divisor.
DOWNCASE function Converts all uppercase characters in an expression to lowercase.
DQUOTE function Encloses a value in double quotation marks.
DROUND function Performs double-precision rounding on a value.
DTX function Returns the hexadecimal representation of a decimal expression.
DYNTOXML function Converts a dynamic array to XML.
EBCDIC function Converts a string value from ASCII to EBCDIC.
ENCRYPT function Encrypts strings.
EQS function Tests if elements of one dynamic array are equal to the elements of another dynamic array.
EREPLACE function Replace substring in an expression with another substring.
EXP function Returns the mathematical constant e to the specified power.
EXTRACT function Archaic method of extracting elements from a dynamic array.
FADD function Performs addition on two floating point numbers.
FDIV function Performs division on two floating point numbers.
FIELD function Returns one or more delimited fields from a string.
FIELDS function Returns a dynamic array of delimited fields from a dynamic array of strings.
FILEINFO function Returns information on a specified file variable
FMT function Formats a string to a specified pattern.
FMTS function Formats the elements of a dynamic array for output.
FMUL function Performs multiplication on two floating point numbers.
FOLD function Re-delimits a specified string with attribute marks.
FSUB function Performs subtraction on two floating point numbers.
GES function Compares corresponding elements in two dynamic arrays.
GETCWD function Returns the name of the current working directory.
GETENV function Determines the value of the specified environment variable.
GROUP function Returns one or more delimited fields from a string.
ICONV function Converts data in external format to internal format.
ICONVS function Converts elements of a dynamic array to internal format.
IFS function returns a dynamic array whose elements are chosen individually from one of two arrays based on the contents of a third array.
INDEX function Returns the position of a character or characters within another string.
INDICES function Returns information about a file's secondary index.
INMAT function Returns the number of dimensioned array elements.
INSERT function Allows the insertion of elements into a dynamic array.
INT function Truncates a numeric value to the nearest integer.
IOCTL function Returns file information.
ISALPHA function Checks that an expression consists entirely of alphabetic characters.
ISALNUM function Checks that an expression consists entirely of alphanumeric characters.
ISCNTRL function Checks that an expression consists entirely of control characters.
ISDIGIT function Checks that an expression consists entirely of numeric characters.
ISPRINT function Checks that an expression consists entirely of printable characters.
ISSPACE function Checks that an expression consists entirely of space type characters.
ISUPPER function Checks that an expression consists entirely of upper case characters.
JBASECOREDUMP function Dumps a portion of the application to an external file for later analysis.
KEYIN function Reads a single character from the input buffer and returns it.
LATIN1 function Converts a UTF-8 byte sequence to it's Binary or Latin equivalent.
LEFT function Extracts the first n characters from a string.
LEN function Returns the character length of an expression.
LENS function Returns a dynamic array of the number of bytes in each element of a dynamic array.
LENDP function Returns the display length of and expression.
LES function Determines whether elements of one dynamic array are less than or equal to the corresponding element in another dynamic array.
LN function Returns the value of the natural logarithm of a supplied expression.
LOCALDATE function Returns an internal date using the specified Timestamp and TimeZone combination.
LOCALTIME function Returns and internal time using the specified Timestamp and TimeZone combination.
LOWCASE function Converts all uppercase characters in an expression to lowercase.
LOWER function Lowers delimiters in a string to their next lowest value.
MAKETIMESTAMP function Generates a Timestamp using internal date, time and timezone.
MAXIMUM function Returns the highest numerical value in a dynamic array.
MATCHES function Allows pattern matching to be applied to an expression.
MATCHFIELD function Checks a string against a match pattern.
MINIMUM function Returns the lowest numerical value in a dynamic array.
MOD function Returns the arithmetic modulo of two numeric expressions.
MODS function Creates a a dynamic array from the remainder of the division of the elements in two dynamic arrays.
MULS function Divides corresponding elements in two dynamic arrays.
NEG function Returns the inverse of a value.
NEGS function Returns the negative values for the elements of a dynamic array.
NES function Determines whether the elements of one dynamic array are equal to the corresponding elements in another dynamic array.
NOT function Inverts the Boolean value of an expression.
NOTS function Returns a dynamic array of the logical complement of the elements of a dynamic array.
NUM function Returns Boolean true if the supplied value is numeric.
NUMS function Determines whether the elements of a dynamic array are numeric.
OCONV function Converts data in internal format to external format.
OCONVS function Converts the elements of a dynamic array to external format.
ORS function Creates a dynamic array of the logical OR of the corresponding elements of two dynamic arrays.
PUTENV function Sets environment variables for the current process.
PWR function Raises a number to a specified power.
QUOTE function Encloses a value in double quotation marks.
RAISE function Raises delimiters in a string to their next highest value.
RECORDLOCKED function Returns the status of a record lock.
REGEXP function Pattern matching with regular expressions.
REM function Returns the arithmetic modulo of two numeric expressions.
REMOVE function Successively extracts delimited strings from a dynamic array.
REPLACE function Archaic method of replacing elements in dynamic arrays.
RIGHT function Extracts the last n characters from a string.
RND function Generates a random number.
SADD function Performs string addition.
SDIV function Performs string division.
SENTENCE function Returns the command used to invoke a program and the arguments it was given.
SEQ function Returns the numeric ASCII value of a character.
SEQS function Converts a dynamic array of ASCII characters to their numeric string equivalents.
SIN function Returns the sine of an angle.
SMUL function Performs string multiplication.
SORT function Sorts a dynamic array.
SOUNDEX function Converts strings to their phonetic equivalents.
SPACE function Generates strings of spaces.
SPACES function Generates a dynamic array with elements comprising of blank spaces.
SPLICE function Creates a dynamic array from the element by element concatenation of two dynamic arrays.
SPOOLER function Returns spooler information.
SQRT function Returns the square root of a number.
SQUOTE function Encloses a value in single quotation marks.
SSUB function Performs string subtraction.
STATUS function Determines cause of a file open failure.
STOP function Program termination.
STR function Performs string duplication.
STRS function Generates a dynamic array containing the specified number of repetitions of each element of a dynamic array
SUBS function Subtracts corresponding elements in two dynamic arrays.
SUBSTRINGS function Returns sub-strings of elements from a dynamic array.
SUM function Sums elements of a dynamic array.
SYSTEM function Returns system information.
SWAP function Sub-string replacement.
TAN function Returns the tangent of an angle.
TIME function Returns the current system time.
TIMEDATE function Returns the current time and date.
TIMEDIFF function Returns the interval between two timestamps as a dynamic array.
TIMEOUT function Terminates a READBLK or READSEQ statement.
TIMESTAMP function Returns a UTC timestamp as decimal seconds.
TRANS function Retrieves a field from a file.
TRANSQUERY function Used to determine if currently in a transaction.
TRIM function Removes characters from a string.
TRIMB function Removes trailing blanks.
TRIMBS function Removes trailing spaces and tabs from elements of a dynamic array.
TRIMF function Removes leading blanks.
TRIMFS function Removes leading spaces and tabs from elements of a dynamic array.
UNASSIGNED function Returns Boolean result for variable assignment.
UNIQUEKEY function Returns a unique 16-byte character key.
UPCASE function Converts all lowercase characters in an expression to uppercase.
UTF8 function Converts a latin1 or binary string into the UTF-8 equivalent byte sequence.
WRITEXML function Writes an XML record to a hashed file.
XLATE function Retrieves a field from a file.
XMLTODYN function Converts XML to a dynamic array.
XMLTOXML function Transforms XML using an XSL
XTD function Returns the decimal representation of a hexadecimal expression.

Thursday, June 12, 2014

This is How Globus Works

Model Bank – installation

1.      Shortcuts, applications basics
2.      Application data, LIVE and NAU files, record status, audit trail, LIST basics, INT applications
3.      FIN and CUS applications, history file, “F” VOC entries, COMPANY, EVAL in LIST
4.      SELECT and SELECT lists, COUNT, “SAVING” and “UNIQUE” in SELECT

Navigation in Classic

1.      Introduction into programs and subroutines, conclusion for applications
2.      Introduction into OFS, more about functions, setup OFS.SOURCE,tSS, simple enquiry output OFS -inputting an application record: VERSION creation, “VALIDATE” option, couple of tests, STANDARD.SELECTION check

Writing a simple T24 subroutine

1.      Getting application information from a routine
2.      OFS – application record creation – continued, overrides,fields GTS.CONTROL and NO.OF.AUTH VERSION routines – AUT.NEW.CONTENT, R.NEW, application insert file
3.      OFS.REQUEST.DETAIL
4.      Manual transaction input in comparison with OFS, GTSACTIVE variable
5.      Browser client – jboss, jBASE agent, logging in
6.      Transaction input under Browser, debugging
7.      TODAY variable, date format in T24, edit mode in Classic,API for dates manipulation
8.      Global variables again – their lifetime, writing a PROGRAM, CRT
9.      CHECK.REC.RTN – error raising, other VERSION routines – notes
10.  Programming language overview, writing a simple game
11.  Local applications, code rating, enrichment, AUTO.ID.START, SEARCH, jBASE file types, jstat


Saturday, July 13, 2013

Oopsie! Toddler Buys Car on eBay with Dad's Smartphone



The next time a toddler asks to play with your smartphone, you might want to think twice.
A 14-month-old girl in Portland, Ore. went on a little shopping spree on on her dad's eBay app. Okay, not so little — she bought a 1962 Austin Healey Sprite.
In good condition, the Sprite is a sweet set of wheels, but this car is a real fixer-upper — you'll see. But in an adorable twist of events, the father plans to keep the car and restore it to give to his daughter for her 16th birthday or high school graduation.
source: Mashable

Monday, June 10, 2013

US Govt is Watching Your Emails, Images, Videos, Search History, Skype Calls, Files, Chats

There are chances that you might have thought of being watched by US government through Gmail, Facebook and other internet giants who are holding your sensitive and most private data.
The news is that all your fears were real, as a new secret document has proven the existence of a US government program that grants NSA (National Security Agency) and FBI the direct access to the servers of Google, Facebook, Microsoft, Skype, Yahoo, Apple and other internet companies, from where they can extract any user information at their will.
Named as PRISM, the program was sanctioned by President Bush in 2007, which is now renewed again by President Obama in December 2012.
Under this program, tech giants gave the direct access to its servers to US government agencies, through which they can grab any information they want, without any hurdle.
The information that NSA can access may include your emails, chats, search history, images, videos, skype calls (even the content of skype calls), YouTube videos (even those which are private), files that are stored in your computer, call records of your smartphones, SMS, MMS, places you visit and much more.
Microsoft joined this program before anyone, followed by Yahoo and Google. Facebook, Skype, Youtube, AOL and Apple are also the program partners who have given the direct access and they can obtain information of any kind for any user who uses these services.
Dropbox is likely to be added in the list of partner companies soon.

PRISM enables US government agencies to reach directly into the servers of the participating companies and obtain both stored communications as well as perform real-time collection on targeted users.
Interestingly, US agencies call PRISM “one of the most valuable, unique and productive accesses for NSA”.
Another fact, which may worry our local “Privacy and Internet Freedom Activists” to a greater level is that Pakistan is second largest spying target of NSA, after Iran. Over 13.5 billion reports were gathered from Pakistan in March 2013 only.
Given the amount of data we share with these companies, including our personal and private information, this revelation is alarming and raise countless serious questions, concerning the morality of tech companies and US government.
Via Guardian


Monday, May 27, 2013

Convert Month Number to Month Name in PHP

Here is a quick code to convert Month Number to Month Name

<?php $monthNumber = 5; $monthName = date("F", mktime(0, 0, 0, $monthNumber, 10)); echo $monthName; ?>

OutPut:
May

Saturday, May 25, 2013

Send email using gmail’s smtp server using PHP



This tutorial  explains how to “Send Mail using SMTP and PHP” using SMTP credentials

You need to install two pear packages, Mail and SMTP. Code is quite self-explanatory.

<?php

require_once "Mail.php";
$from    = "test@gmail.com";
$to      = "test2@gmail.com";
$subject = "Email Subject";
$body    = "Content For the email";

$config=array(
    'host'      => 'ssl://smtp.googlemail.com',
    'port'      => 465,
    'auth'      => true,
    'username'  => 'write your gmail username here',
    'password'  => 'write your gmail password here'
);

$headers=array(
    'From'      => $from,
    'To'        => $to,
    'Subject'   => $subject
);

$smtp = Mail::factory('smtp',$config);

$mail = $smtp->send($to, $headers, $body);

if(!(PEAR::isError($mail)))
{
    echo "Mail sent successfully!"; // On Success
}

else
{
    echo $mail->getMessage(); // On Failure
}

?>        

Google Buzz Is Going To Shut Down

In October 2011 google announced that Google Buzz was shutting down. On or after 17 July 2013, Google will take the last step in the shut-down and will save a copy of your Buzz posts to your Google Drive, a service for storing files online. Google will store two (2) types of files to your Google Drive and the newly-created files will not count against your storage limits.
  1. The first type of file will be private, only accessible to you, containing a snapshot of the Google Buzz public and private posts that you authored.
  2. The second type of file will contain a copy of only your Google Buzz public posts. By default it will be viewable by anyone with the link and may appear in search results and on your Google Profile (if you've linked to your Buzz posts). Note, any existing links to your Google Buzz content will redirect users to thisfile.
  3. Any comments that you made on other users' posts will only be saved to those users' files and not to yours. Once the change described in this email is final, only that user will be able to change the sharing settings of those files. This means that if you have commented on another author's private post, that author could choose to make that post and its comments public. If you would like to avoid that possibility, delete all your Buzz content now.
  4. The new Google Drive files will only contain comments from users who previously enabled Google Buzz, and the files will not contain comments that were deleted prior to moving the data to your Google Drive.
Once the files have been created, they will be treated the same as any other Drive file. They are yours to do with as you please. This includes downloading them, updating who can access them or deleting them.
Before these files are created, you can view the Google Buzz posts that you have authored here. If you do not want any of your Buzz posts or comments to be saved to Google Drive files, you can immediately delete your Google Buzz account and data.

Thursday, May 23, 2013

Google to Launch Galaxy S4

At its famed I/O Conference, Google, instead of announcing a new Nexus smartphone, Google has announced that it will be selling the Galaxy S 4 instead with stock Android OS. The phone will come with the same specs as the original Galaxy S 4 with the only difference being the original, skin-free Android UI instead of Samsung’s own Touchwiz with Nature UI.
The phone will also lose the exclusive Samsung apps but will come with an unlocked bootloader so there won’t be any end of possibilities. And of course, the updates will be coming to this phone before any other existing Android device on the market, thanks to Google’s trusty, uncompromised support.
The phone will come with 16 GBs of expandable storage and will be available for $649 or Rs. 70K at launch. The version of Android running is unknown though as Google might announce a new version of Android in the very conference this phone was announced it but we can’t say that for sure.
The phone will be available at Google’s own Google Play Store initially.
In case you’ve forgotten, these are the specs of the Samsung Galaxy S 4:
  • Android 4.2.2 Jelly Bean customized with Samsung’s Nature UI
  • 5 inch display with Full HD resolution of 1080 x 1920 pixels
  • Corning Gorilla Glass 3 protection and super sensitive screen
  • 7.9mm thick
  • Weight: 130 grams
  • Octa-core Exynos processor with 8 cores and PowerVR SGX 544MP3 GPU
  • 2 GB RAM with 16/32/64 GB expandable storage
  • 13 megapixel rear-camera with HDR and 1080p Full HD video recording
  • Optical Image Stabilization
  • 2 megapixel 1080p Full HD front-camera
  • Bluetooth 4.0, microUSB 2.0, USB-OTG, IR Blaster, Wifi Hotspot, GPS
  • 2600 mAh battery
  • Available in White Frost and Black mist colors

source:propakistani.pk

Monday, February 28, 2011

PHP Useful Functions

Functions with Arbitrary Number of Arguments

You may already know that PHP allows you to define functions with optional arguments. But there is also a method for allowing completely arbitrary number of function arguments.
First, here is an example with just optional arguments:
// function with 2 optional arguments
function foo($arg1 = '', $arg2 = '') {

 echo "arg1: $arg1\n";
 echo "arg2: $arg2\n";

}

foo('hello','world');
/* prints:
arg1: hello
arg2: world
*/

foo();
/* prints:
arg1:
arg2:
*/
Now, let’s see how we can build a function that accepts any number of arguments. This time we are going to utilize func_get_args():
// yes, the argument list can be empty
function foo() {

 // returns an array of all passed arguments
 $args = func_get_args();

 foreach ($args as $k => $v) {
  echo "arg".($k+1).": $v\n";
 }

}

foo();
/* prints nothing */

foo('hello');
/* prints
arg1: hello
*/

foo('hello', 'world', 'again');
/* prints
arg1: hello
arg2: world
arg3: again
*/