Hello all,
I'm developing a deployment script at work and at one point it would need to display something like this:
Which version of ADMIN would you like to deploy?
1) 1.0.0 (store1, 10 Jan 2004)
2) 1.0.1 (store1, 20 Jun 2004)
3) 1.0.2 (store1, 15 Jul 2004)
Select a version :
I know... (5 Replies)
Hi all
is menu driven by SELECT can be a dynamic ?
My requirement is that i want SELECT to be created on run time not predefine . The select should be created as per the no of
words in a file
thanks in advance
rawat (2 Replies)
Is there any way to implement a drop down menu selection in bash?
This is on CDLinux which is a very minimal live CD and I am using it to install an image onto a hard drive. Part of that process is the timezone selection. There are just too many timezones to attempt to use the "select" command.... (1 Reply)
I'm working on a menu to read folders in as menu selections then CD to the selected folder and display the contained files as menu selections for execution.
I'm using the following to read in the file list but I get lost after that.
I only read in files that begin with CAPs. The problem is... (3 Replies)
Hello All,
I am trying to come up with this interface with the backend on perl. The interface needs drop down boxes with dynamic chain loading ( as in contents of the 1st drop down box will populate the second drop down and so on) Any idea how I can do this?
Kindly help
Regards,
Garric (13 Replies)
Hi Team,
I have a requirement to login into URL using username and password , then I have to select a "particular name" from drop-down menu and then Read the values user records etc.... using perl.
Is it possible to do in perl script ? (OR) Can you please let me know which scripting... (1 Reply)
Hi guys, i would like to create a program that allow user to show the information of certain thing such as network card.
I would like the menu to be dynamic, for example:
my computer system have 2 network card inserted at the moment, therefore the menu will have 2 choice for the user.
eth0... (12 Replies)
Have just added (after missing for some time), the latest version of Google Site Search for our site in the Navbar Search Menu:
https://www.unix.com/members/1-albums215-picture791.png
Cheers and Enjoy.
Here is the URL for that link in case you need it:
https://goo.gl/P8p82c (4 Replies)
Discussion started by: Neo
4 Replies
LEARN ABOUT PHP
gmp_setbit
GMP_SETBIT(3) 1 GMP_SETBIT(3)gmp_setbit - Set bitSYNOPSIS
void gmp_setbit (GMP &$a, int $index, [bool $bit_on = true])
DESCRIPTION
Sets bit $index in $a.
PARAMETERS
o $a
- The value to modify. Either a GMP number resource in PHP 5.5 and earlier, a GMP object in PHP 5.6 and later, or a numeric string
provided that it is possible to convert the latter to a number.
o $index
- The index of the bit to set. Index 0 represents the least significant bit.
o $bit_on
- True to set the bit (set it to 1/on); false to clear the bit (set it to 0/off).
RETURN VALUES
A GMP number resource in PHP 5.5 and earlier, or a GMP object in PHP 5.6 and later.
EXAMPLES
Example #1
gmp_setbit(3) example - 0 index
<?php
$a = gmp_init("2"); //
echo gmp_strval($a), ' -> 0b', gmp_strval($a, 2), "
";
gmp_setbit($a, 0); // 0b10 now becomes 0b11
echo gmp_strval($a), ' -> 0b', gmp_strval($a, 2), "
";
?>
The above example will output:
2 -> 0b10
3 -> 0b11
Example #2
gmp_setbit(3) example - 1 index
<?php
$a = gmp_init("0xfd");
echo gmp_strval($a), ' -> 0b', gmp_strval($a, 2), "
";
gmp_setbit($a, 1); // index starts at 0
echo gmp_strval($a), ' -> 0b', gmp_strval($a, 2), "
";
?>
The above example will output:
253 -> 0b11111101
255 -> 0b11111111
Example #3
gmp_setbit(3) example - clearing a bit
<?php
$a = gmp_init("0xff");
echo gmp_strval($a), ' -> 0b', gmp_strval($a, 2), "
";
gmp_setbit($a, 0, false); // clear bit at index 0
echo gmp_strval($a), ' -> 0b', gmp_strval($a, 2), "
";
?>
The above example will output:
255 -> 0b11111111
254 -> 0b11111110
NOTES
Note
Unlike most of the other GMP functions, gmp_setbit(3) must be called with a GMP resource that already exists (using gmp_init(3) for
example). One will not be automatically created.
SEE ALSO gmp_clrbit(3), gmp_testbit(3).
PHP Documentation Group GMP_SETBIT(3)