Search Results

Search found 9 results on 1 pages for 'apis17'.

Page 1/1 | 1 

  • rm command not ask before delete

    - by apis17
    i have centos VPS created using XEN + OpenVZ virtualization. -bash-3.2# uname -a Linux host.domain.com 2.6.18-274.7.1.el5.028stab095.1xen #1 SMP Mon Oct 24 22:10:04 MSD 2011 i686 i686 i386 GNU/Linux there are no question asked when i want to delete file(s) -bash-3.2# vi test.txt -bash-3.2# rm test.txt -bash-3.2# the main server (not virtualized one) is asking me first before delete any files. [root@main ~]# vi test.txt [root@main ~]# rm test.txt rm: remove regular file `test.txt'? y [root@main ~]# how to configure virtualized environment to prompt me before deleting any file(s)? thank you.

    Read the article

  • PHP function generate UL LI

    - by apis17
    hi.. i'm referring this address for function olLiTree http://stackoverflow.com/questions/753853/php-function-that-creates-a-nested-ul-li i have this array $tree = array("A"=array("B"=array("C"="C","D"="D"),"E"=array("F"="F","G"="G"))); but not able to use this function function olLiTree($tree) { echo '<ul>'; foreach($tree as $item) { if (is_array($item)) { olLiTree($item); } else { echo '<li>', $item, '</li>'; } } echo '</ul>'; } to generate <ul> <li>A</li> <li>B <ul> <li>C</li> <li>D</li> </ul> </li> <li>E <ul> <li>F </li> </ul> </li> <ul> <li>G</li> </ul> </ul> can anybody help me to fix this? thanks..

    Read the article

  • PHP regex extract date

    - by apis17
    i have $date variable 2009-04-29 which is Y-m-d anybody can give idea how to extract into $d, $m, $y using simplest method as possible? regex is preferable. any more suggestion with simple method will be chosen. :)

    Read the article

  • php calculate float HELP!!

    - by apis17
    help!! i have weird math calculation here. hope someone will explain. $a = 1.85/100; $b = 1.5/100; $c = 1.1/100; $d = 0.4/100; $e = 0.4/100; $f = 0.4/100; $g = 0.4/100; $h = $a + $b + $c + $d + $e + $f + $g; echo $h*100 ."<br>"; $i = $h-$a; $i = $i-$b; $i = $i-$c; $i = $i-$d; $i = $i-$e; $i = $i-$f; $i = $i-$g; echo $i; last $i value should be 0 but it returns 6.93889390391E-18

    Read the article

  • PHP mySQL - select unique value that not being used from dirrefent table

    - by apis17
    Updates : Please see below i have table: data +-----------------------+--------------+-----------+ | State | d_country | d_postcode| +-----------------------+--------------+-----------+ | State1 | Country1 | 1111 | | State2 | Country2 | 2222 | | State3 | Country3 | 3333 | | State4 | Country4 | 4444 | +-----------------------+--------------+-----------+ And another table: user +-----------------------+--------------+-----------+ | Name | u_country | u_postcode| +-----------------------+--------------+-----------+ | Name1 | Country3 | 3333 | | Name2 | Country5 | 5555 | | Name3 | | 6666 | | Name4 | Country6 | 6666 | | Name5 | Country6 | 6666 | +-----------------------+--------------+-----------+ What SQL should i use to: Determine the number (count) of country that are not listed on table data. For example u_postcode is not listed in d_postcode is 5555 and 6666. It will return 2. List down name and what country not available in table data yet. Updates I want to use grouping to filter postcode and make Name3 and Name4 as different rows. For example: +-----------------------+--------------+-----------+ | Name | u_country | u_postcode| +-----------------------+--------------+-----------+ | Name2 | Country5 | 5555 | | Name3 | | 6666 | | Name4 | Country6 | 6666 | +-----------------------+--------------+-----------+ Any possible idea?

    Read the article

  • PHP mySQL - replace some string inside string

    - by apis17
    i want to replace ALL comma , into ,<space> in all address table in my mysql table. For example, +----------------+----------------+ | Name | Address | +----------------+----------------+ | Someone name | A1,Street Name | +----------------+----------------+ Into +----------------+----------------+ | Name | Address | +----------------+----------------+ | Someone name | A1, Street Name| +----------------+----------------+ Thanks in advance.

    Read the article

  • php: regex remove bracket in string

    - by apis17
    hi, similiar like this example, http://stackoverflow.com/questions/1336672/php-remove-brackets-contents-from-a-string i have no idea to replace $str = '(ABC)some text' into $str = 'ABC'; currently use $str = preg_replace('/(.)/','',$str); but not works. how to fix this?

    Read the article

  • eregi replace replacement

    - by apis17
    hi, since eregi replace was deprecated on version 5.3 i want to make my program compatible with new version of php http://php.net/manual/en/function.eregi-replace.php so, i'm trying to use preg_replace like this preg_replace(",",'','20,000.00'); but come with error i'm familiar with eregi_replace(',','','20,000.00'); i'm not familiar with regex expression. what is the best replacement for eregi_replace?

    Read the article

  • Converting arrays into another format (PHP)

    - by apis17
    Hi.. i want to convert this array Array ( [2] => Array ( ) [4] => Array ( [12] => Array ( ) [13] => Array ( [16] => Array ( ) ) ) [5] => Array ( ) [10] => Array ( ) [14] => Array ( ) ) into this format Array ( [2] => 2 [4] => Array ( [0] => 12 [13] => Array ( [0] => 16 ) ) [5] => 5 [10] => 10 [14] => 14 ) can anybody help? thanks.

    Read the article

1