A PHP Error was encountered

Severity: 8192

Message: Function create_function() is deprecated

Filename: geshi/geshi.php

Line Number: 4698

Backtrace:

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/libraries/geshi/geshi.php
Line: 4698
Function: _error_handler

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/libraries/geshi/geshi.php
Line: 4621
Function: _optimize_regexp_list_tokens_to_string

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/libraries/geshi/geshi.php
Line: 1655
Function: optimize_regexp_list

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/libraries/geshi/geshi.php
Line: 2029
Function: optimize_keyword_group

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/libraries/geshi/geshi.php
Line: 2168
Function: build_parse_cache

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/libraries/Process.php
Line: 45
Function: parse_code

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/models/Pastes.php
Line: 517
Function: syntax

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/controllers/Main.php
Line: 693
Function: getPaste

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/index.php
Line: 315
Function: require_once

Adding Two Binary - Stikked
From Colorant Lizard, 11 Years ago, written in Java.
Embed
  1. import java.io.*;
  2. public class Linked {
  3.     public static void main(String args[])throws IOException{
  4.         System.out.println("Enter the first BIN");
  5.         int a=Integer.parseInt(in.readLine());
  6.         System.out.println("Enter the Second BIN");
  7.         int b=Integer.parseInt(in.readLine());
  8.         int c=(bin_dec(a)+bin_dec(b));
  9.         System.out.println(rev(dec_bin(c)));
  10.         }
  11.     static Integer bin_dec(int a){
  12.         int b=a;int len=0;
  13.         while(b!=0){
  14.             len++;
  15.             b=b/10;
  16.         }
  17.         double pew=0;int c;
  18.         for(int j=0;j<len;j++){
  19.             c=a%10;
  20.             pew=pew+(c*(Math.pow(2,j)));
  21.             a=a/10;
  22.         }
  23.         return (int)pew;
  24.      
  25.         }
  26.     static String rev(String a){
  27.         String mr="";
  28.         for(int j=a.length()-1;j>=0;j--){
  29.             mr=mr+a.charAt(j);
  30.         }
  31.  
  32.         return mr;
  33.     }
  34.     static String dec_bin(int c){
  35.         String mr="";int x;
  36.         while (c >0){
  37.             x=c%2;
  38.             mr=mr+x;
  39.             c=c/2;
  40.         }
  41.         return mr;
  42.     }
  43. }
  44.