Returned 5 Results for "class" Ordered By Relevance

SecPay Enumerated Type [relevance: 2.76]


2007-12-07 Digg! icurtain Delcious icurtain Technorati icurtain


public enum SecpayErrorType {

authorised ("Transaction authorised by bank. auth_code available as bank reference"),

notAuthorised ("Transaction not authorised. Failure message text available to merchant"),

commsProblem ("Communication problem. Trying again later may well work"),

fraud ("The SECPay system has detected a fraud condition and rejected the transaction. The message field will contain more details."),

amountInvalid ("Pre-bank checks. Amount not supplied or invalid"),

insufficientParams ("Pre-bank checks. Not all mandatory parameters supplied"),

paymentRepresented ("Pre-bank checks. Same payment presented twice"),

startInvalid ("Pre-bank checks. Start date invalid"),

expireInvalid ("Pre-bank checks. Expiry date invalid"),

issueInvalid ("Pre-bank checks. Issue number invalid"),

LUHNFailed ("Pre-bank checks. Card number fails LUHN check"),

cardTypeInvalid ("Pre-bank checks. Card type invalid - i.e. does not match card number prefix"),

nameInvalid ("Pre-bank checks. Customer name not supplied"),

merchantInvalid ("Pre-bank checks. Merchant does not exist or not registered yet"),

merchantAccountCardTypeInvalid ("Pre-bank checks. Merchant account for card type does not exist"),

merchardAccountCurrencyTypeInvalid ("Pre-bank checks. Merchant account for this currency does not exist"),

CVV2Invalid ("Pre-bank checks. CVV2 security code mandatory and not supplied / invalid"),

timeOut ("Pre-bank checks. Transaction timed out awaiting a virtual circuit. Merchant may not have enough virtual circuits for the volume of business."),

noMD5 ("Pre-bank checks. No MD5 hash / token key set up against account");

private final String description; // constructor

SecpayErrorType(String description) {

this.description = description;

}

public String getDescription(){

Runnable r = new Runnable() {

public void run(){

}

};

Runnable s = new MyRunnable();

return description;

}

private class MyRunnable implements Runnable {

public void run(){

}

}

}


PHP Class Example [relevance: 1.79]


2007-07-21 Digg! icurtain Delcious icurtain Technorati icurtain


instanceVar; } public static function staticFunction(){ return self::$staticVar; } } $object = new TestClass(); //call transient on object $object -> transientFunction(); //call function from class TestClass::staticFunction(); ?>

Vista Style Buttons CSS [relevance: 1.56]


2008-03-11 Digg! icurtain Delcious icurtain Technorati icurtain


Resizable Vista style buttons with a gradient in XHTML/CSS

As I had to spend an entire afternoon trying to get these to work I might as well post them

To get your lovely Vista Style buttons just screen shot Vista or make a rectangle with 2 gradients that meet.. then add a boarder and blend the corner pixels onto whatever backdrop you want to put them on.

Vista Button CSS

.buttonLeft {
background-image: url(button-right.gif);
background-repeat: no-repeat;
background-position: top right;
display:block;
float:left;
/*external border spacing*/
margin:4px;
}

.buttonRight {
background-image: url(button-left.gif);
background-repeat: no-repeat;
background-position: top left;
display:block;
}

.buttonCentre{
/*line-height pushes the display block to the full height of the containing image*/
line-height:26px;
/*Inner boarders*/
margin-left:4px;
margin-right:4px;
background-image: url(button-centre.gif);
background-repeat: repeat-x ;
background-position: top left;
display:block;
}

span.buttonCentre:hover{
background: url(button-centre-hover.gif) ;
}
span.buttonLeft:hover {
background-image: url(button-right-hover.gif);
}
span.buttonRight:hover {
background-image: url(button-left-hover.gif);
}

And then all you have to do is make a few containing spans and you have your buttons

<span class="buttonLeft">
<span class="buttonRight">
<span class="buttonCentre">
buttonText
</span>
</span>
</span>

like this: buttonText

To conclude - these buttons are infinitely horizontally resizable and do display properly - however the hover does not work perfectly, if you hit the outer nested elements they will hover without making the internal elements hover..


PHP ArrayList Class [relevance: 1.49]


2008-06-25 Digg! icurtain Delcious icurtain Technorati icurtain


PHP ArrayList Class - Having spent the last year working in Java, working with PHP now makes me cry and weep in anguish.. for many reasons, one of the main ones being its' complete inability to store more than 1 thing in anything other than an array

I have attempted to create a class that handles data in a marginally more friendly manner allowing you to interate through etc.. it's still a bit BETA but it speeds up my development times.. so here it is

  1. class ArrayList { 
  2.  
  3. //Copyright Mike Lang - icurtain.co.uk - please retain this header and give credit if used. 
  4. //This is a little class I've written to make my life easier and a little more like Java 
  5. //for those occasions when i just can't afford Java hosting 
  6. //It doesnt work the same as a Java arrayList.. it's just a high level aproximation of it 
  7. //if you have any comments or suggestions for improving or changing this class feel free to mail me 
  8. //mike [at] bluemedia dot co dot uk 
  9.  
  10.    //ARRAY LIST CLASS STARTS COUNTING AT 0!!!!! 
  11.    private $arrayList = array(); 
  12.    private $pointer = 0; 
  13.  
  14.    public function version(){ 
  15.    echo 'version 1.0'; 
  16.    } 
  17.     
  18.    public function add($item){ 
  19.       //$this->arrayList[sizeof($this->arrayList)] = $item; 
  20.       array_push($this->arrayList, $item); 
  21.    } 
  22.  
  23.    public function addAtPos($position, $item){ 
  24.       if($position < count($this->arrayList) && $position >= 0) 
  25.       { 
  26.       $this->add($item); 
  27.       $this->shift(count($this->arrayList)-1, $position); 
  28.       } 
  29.       else 
  30.       { 
  31.       throw new Exception('List out of bounds'); 
  32.       } 
  33.    } 
  34.  
  35.    public function getList(){ 
  36.       return $this->arrayList; 
  37.    } 
  38.  
  39.    public function hasValue(){ 
  40.       if(isset($this->arrayList[$this->pointer])) 
  41.          { 
  42.             return true; 
  43.          } 
  44.       else 
  45.          { 
  46.             return false; 
  47.          } 
  48.     } 
  49.  
  50.     public function hasNext(){ 
  51.       if($this->pointer <= count($this->arrayList)-1) 
  52.          { 
  53.             return true; 
  54.          } 
  55.       else 
  56.          { 
  57.             return false; 
  58.          } 
  59.     } 
  60.  
  61.  
  62.    public function next(){ 
  63.       if(isset($this->arrayList[$this->pointer])) 
  64.       { 
  65.          //return $this->arrayList[($this->pointer++)-1] = $value; 
  66.       $this->pointer++; 
  67.          return($this->arrayList[$this->pointer-1]); 
  68.       } 
  69.       else 
  70.       { 
  71.          return null; 
  72.       } 
  73.       } 
  74.  
  75.    public function shift($origin, $dest){ 
  76.          //wont shift from last element 
  77.          if($origin > count($this->arrayList) || $origin < 0 || $dest > count($this->arrayList) || $dest < 0) 
  78.          { 
  79.          throw new Exception('List out of bounds'); 
  80.          } 
  81.          if($origin > $dest) 
  82.             { 
  83.             $temp = $this->arrayList[$origin]; 
  84.             $this->shiftUp($origin, $dest); 
  85.             $this->arrayList[$dest] = $temp; 
  86.             } 
  87.             else 
  88.             { 
  89.             $temp = $this->arrayList[$origin]; 
  90.             $this->shiftDown($origin, $dest); 
  91.             $this->arrayList[$dest] = $temp; 
  92.             } 
  93.    } 
  94.  
  95.    private function shiftUp($origin, $dest) 
  96.          { 
  97.             for($i=$origin;$i>$dest;$i--) 
  98.                               { 
  99.                               $this->arrayList[$i] = $this->arrayList[$i-1]; 
  100.                               } 
  101.          } 
  102.  
  103.    private function shiftDown($origin, $dest) 
  104.          { 
  105.             for($i=$origin;$i<$dest;$i++) 
  106.                               { 
  107.                               $this->arrayList[$i] = $this->arrayList[$i+1]; 
  108.                               } 
  109.          } 
  110.  
  111.    public function remove($item){ 
  112.       if(array_key_exists($item, $this->arrayList)){ 
  113.          unset($this->arrayList[$item]); 
  114.       } 
  115.       else  
  116.       { 
  117.       throw new Exception('key not found'); 
  118.       } 
  119.    } 
  120.  
  121.    public function addArray($array){ 
  122.     foreach ($array as $item) { 
  123.          $this->add($item); 
  124.             } 
  125.    } 
  126.     
  127.    public function reverse(){ 
  128.       $this->arrayList = array_reverse($this->arrayList); 
  129.    } 
  130.  
  131.       public function size(){ 
  132.       return count($this->arrayList); 
  133.    } 
  134.  
  135.       public function reset(){ 
  136.       $this->pointer = 0; 
  137.    } 
  138.  
  139.    public function end(){ 
  140.       $this->pointer = count($this->arrayList) -1; 
  141.    } 
  142.  
  143. ?>

With it you can while($arrayList->hasNext()){} and do all kinds of other crazy things that will bring endless listing joy to your life - mail me if you have any improvement suggestions


web.xml deployment file example [relevance: 1.19]


2006-07-20 Digg! icurtain Delcious icurtain Technorati icurtain


Eclipse never seems to bother creating the deployment file for tomcat so here is a template web.xml document so i can find it easily

Empty web.xml file for Web Application

PrintListenerClient

uk.co.iblocks.printclient.PrintListenerClient

PrintListenerClient

/

log4JFile

C:\XmlClientJobListener\log4j.xml

30

html

text/html

txt

text/plain

index.jsp

index.html