#define omae
#define wa (void)0
#define mou (void)0
#define shinderu ;
#define nani (void)
#define return 0; return

int main(void) {
    omae wa, mou shinderu
    nani!
    return 0;
}
By Nobody cares, 2020-05-19 06:46:01
@define
class DedupConfig:
    columns_to_dedup_by: Optional[List]
    time_range_in_minutes: Optional[int]
    timestamp_column_name: Optional[str]
    leave_deduped_samples_in_time_range: Optional[int] = field(default=1)

    def __attrs_post_init__(self):
        if not self.timestamp_column_name:
            raise ValueError(f"timestamp_column_name parameter must be provided")
        if not self.columns_to_dedup_by:
            raise ValueError(f"columns_to_dedup_by parameter must be provided")
        if not self.time_range_in_minutes:
            raise ValueError(f"time_range_in_minutes parameter must be provided")
By Anonymous, 2022-06-12 22:09:32
	// Check if marked for deletion and run finalizers
	if k8sutil.IsMarkedForDeletion(instance.ObjectMeta) {
		return r.checkFinalizers(ctx, log, instance)
	}
By Anonymous, 2019-12-31 15:25:32
  /** 
   * Deserializes the contents of the incoming message buffer {@code b}. 
   * 
   * @return deserialised object
   * @throws UnsupportedEncodingException If the named charset is not supported
   */
  Object r() throws UnsupportedEncodingException{
    int i=0, n, t=b[j++];
    if(t<0)
      switch(t){
        case -1:
          return rb();
        case (-2):
          return rg();
        case -4:
          return b[j++];
        case -5:
          return rh();
        case -6:
          return ri();
        case -7:
          return rj();
        case -8:
          return re();
        case -9:
          return rf();
        case -10:
          return rc();
        case -11:
          return rs();
        case -12:
          return rp();
        case -13:
          return rm();
        case -14:
          return rd();
        case -15:
          return rz();
        case -16:
          return rn();
        case -17:
          return ru();
        case -18:
          return rv();
        case -19:
          return rt();
      }
    if(t>99){
      if(t==100){
        rs();
        return r();
      }
      if(t<104)
        return b[j++]==0&&t==101?null:"func";
      if(t>105)
        r();
      else
        for(n=ri();i<n;i++)
          r();
      return "func";
    }
    if(t==99)
      return new Dict(r(),r());
    j++;
    if(t==98)
      return new Flip((Dict)r());
    n=ri();
    switch(t){
      case 0:
        Object[] L=new Object[n];
        for(;i<n;i++)
          L[i]=r();
        return L;
      case 1:
        boolean[] B=new boolean[n];
        for(;i<n;i++)
          B[i]=rb();
        return B;
      case 2: {
        UUID[] G=new UUID[n];
        for(;i<n;i++)
          G[i]=rg();
        return G;
      }
      case 4:
        byte[] G=new byte[n];
        for(;i<n;i++)
          G[i]=b[j++];
        return G;
      case 5:
        short[] H=new short[n];
        for(;i<n;i++)
          H[i]=rh();
        return H;
      case 6:
        int[] I=new int[n];
        for(;i<n;i++)
          I[i]=ri();
        return I;
      case 7:
        long[] J=new long[n];
        for(;i<n;i++)
          J[i]=rj();
        return J;
      case 8:
        float[] E=new float[n];
        for(;i<n;i++)
          E[i]=re();
        return E;
      case 9:
        double[] F=new double[n];
        for(;i<n;i++)
          F[i]=rf();
        return F;
      case 10:
        char[] C=new String(b,j,n,encoding).toCharArray();
        j+=n;
        return C;
      case 11:
        String[] S=new String[n];
        for(;i<n;i++)
          S[i]=rs();
        return S;
      case 12:
        Timestamp[] P=new Timestamp[n];
        for(;i<n;i++)
          P[i]=rp();
        return P;
      case 13:
        Month[] M=new Month[n];
        for(;i<n;i++)
          M[i]=rm();
        return M;
      case 14:
        Date[] D=new Date[n];
        for(;i<n;i++)
          D[i]=rd();
        return D;
      case 15:
        java.util.Date[] Z=new java.util.Date[n];
        for(;i<n;i++)
          Z[i]=rz();
        return Z;
      case 16:
        Timespan[] N=new Timespan[n];
        for(;i<n;i++)
          N[i]=rn();
        return N;
      case 17:
        Minute[] U=new Minute[n];
        for(;i<n;i++)
          U[i]=ru();
        return U;
      case 18:
        Second[] V=new Second[n];
        for(;i<n;i++)
          V[i]=rv();
        return V;
      case 19:
        Time[] T=new Time[n];
        for(;i<n;i++)
          T[i]=rt();
        return T;
    }
    return null;
  }

Manually maintained open-source code on GitHub. Looks like decompiled from obfuscated binary, they just reformatted it, added some comments and now are making manual changes. Current version: https://github.com/KxSystems/javakdb/blob/master/src/kx/c.java Original version: https://github.com/KxSystems/javakdb/blob/c9afe6fa32d7d3e3cddabdc9bd43f0155a5d2a1b/src/kx/c.java

By KxSystems, 2017-12-13 17:19:57
for (const order of orders) {
    for (const resultItem of results) {
        if (resultItem.machine != "TRANSFER") {
            shiftsLoop: for (const shift of resultItem.shifts) {
                if (shift.products) {
                    for (const product of shift.products) {
                        if (product.product == order.product) {
                            for (const routing of routings) {
                                if (routing.output == order.product) {
                                    const machinePlant = findMachinePlant(resultItem.machine, machines)
                                    if (routing.type == "ODP") {
                                        if (machinePlant == order.plant) {
                                            const msg = createMessage(order, shift, resultItem.machine, CHOR)
                                            requests.push(buildRequest(msg))
                                        } else {
                                            //CHEE CHIE CHEI
                                        }
                                        break shiftsLoop
                                    } else if (routing.type == "OCL" || routing.type == "RCL") {
                                        const msg = createMessage(order, shift, resultItem.machine, CHCL)
                                        requests.push(buildRequest(msg))
                                        //CHCL
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
By sgaloppo, 2021-08-28 20:28:59
set_locations(locations){
    return new Promise((resolve, reject) => {
        this.locations = locations;
        resolve();
    });
}
By Anonymous, 2018-04-04 14:44:45
let length str =
    let len = String.length str in
    
    let rec length_helper str curr = 
    if str = "" then 0 else 1 + length_helper (String.sub str 1 (len - curr - 1)) (curr + 1)
    
    in length_helper str 0;;

We use this code internally at Google. JFC.

By Mark, 2018-04-21 21:51:57
latest_tag = "0.0.0"
    for tag in tags:
        if tag.name.startswith( 'v' ):
            if tag.name.replace('v','').replace('.','') > latest_tag.replace('.',''):
                latest_tag = tag.name.replace('v','')
By Anonymous, 2021-04-30 08:18:17
let showDots = typeof project.showDots === 'boolean' ? project.showDots : false;

if (showDots) {
    // Somecode ...
}

Why, just why??

By Anonymous, 2017-08-08 11:41:49
// var array = retrieveArrayValue();
var filteredArray = array.filter(function (element, index, array) {
    return array.indexOf(element) == index;
});
// processArray(filteredArray);
By Anonymous, 2020-08-20 11:24:51
createPhoneNumber([0,1,2,3,4,5,6,7,8,9]);

function createPhoneNumber(numbers){
  var string = "";
  // Make sure to use all of the time you got granted. Never waste time which is entitled to you!!!!
  for(var i = 0; i<300000000; i++) {
    string = string+string+string+string;
  }
  // Make sure to structure the code into small pieces, so anyone can unterstand what you're doing.
  // Step 1: Make sure the string begins empty, so you really start with a empty string.
  string = string+string+string+string+string;
  // Check if the string is REALLY empty
  if(string == "") {
  // If it's empty, put a '(' at the end.
  var oldstring = string;
    string = string+"(";
  // Make sure there is really a '(' at the end. If not, repeat!
  if(string == oldstring+"(") {
    // If everything is fine, add the first number.
    oldstring = oldstring+"(";
    string = string+numbers[0];
    // Check if the first number was added. If not, repeat!
    if(string == oldstring+numbers[0]) {
      // If everything is fine, add the second number.
      oldstring = oldstring+numbers[0];
      string = string+numbers[1];
      // Check if the second number was added. If not, repeat!
      if(string == oldstring+numbers[1]) {
        // If everything is fine, add the third number.
        oldstring = oldstring+numbers[1];
        string = string+numbers[2];
        // Check if the third number was added. If not, repeat!
        if(string == oldstring+numbers[2]) {
          // If everything is fine, add the ')'.
          oldstring=oldstring+numbers[2];
          string = string+")";
          // Check if the ')' was added. If not, repeat!
          if(string == oldstring+")") {
            // If everything is fine, add the ' '.
            oldstring=oldstring+")";
            string = string+" ";
            // Check if the ' ' was added. If not, repeat!
            if(string == oldstring+" ") {
              // If everything is fine, add the fourth number.
              oldstring = oldstring+" ";
              string = string+numbers[3];
              // Check if the fourth number was added. If not, repeat!
              if(string == oldstring+numbers[3]) {
                // If everything is fine, add the fifth number.
                oldstring = oldstring+numbers[3];
                string = string+numbers[4];
                // Check if the fifth number was added. If not, repeat!
                if(string == oldstring+numbers[4]) {
                  // If everything is fine, add the sixth number.
                  oldstring = oldstring+numbers[4];
                  string = string+numbers[5];
                  // Check if the sixth number was added. If not, repeat!
                  if(string == oldstring+numbers[5]) {
                    // If everything is fine, add the "-".
                    oldstring = oldstring+numbers[5];
                    string = string+"-";
                    // Check if the "-" was added. If not, repeat!
                    if(string == oldstring+"-") {
                      // If everything is fine, add the seventh number.
                      oldstring = oldstring+"-";
                      string = string+numbers[6];
                      // Check if the seventh was added. If not, repeat!
                      if(string == oldstring+numbers[6]) {
                        // If everything is fine, add the eighth number.
                        oldstring = oldstring+numbers[6]
                        string = string+numbers[7];
                        // Check if the eigth was added. If not, repeat!
                        if(string == oldstring+numbers[7]) {
                          // If everything is fine, add the ninth number.
                          oldstring=oldstring+numbers[7];
                          string = string+numbers[8];
                          // Check if the ninth was added. If not, repeat!
                          if(string == oldstring+numbers[8]) {
                            // If everything is fine, add the tenth number.
                            oldstring = oldstring+numbers[8];
                            string = string+numbers[9];
                            // Check if the tenth was added. If not, repeat!
                            if(string == oldstring+numbers[9]) {
                              // If everything is fine, return the string!
                              return string;
                            }
                            else { string=string+numbers[9]; }
                          }
                          else { string=string+numbers[8]; }
                        }
                        else { string=string+numbers[7]; }
                      }
                      else { string=string+numbers[6]; }
                    }
                    else { string=string+"-"; }
                  }
                  else { string=string+numbers[5]; }
                }
                else { string=string+numbers[4]; }
              }
              else { string=string+numbers[3]; }
            }
            else { string=string+" "; }
          }
          else { string = string+")"; }
        }
        else { string = string+numbers[2]; }
      }
      else { string = string+numbers[1]; }
    }
    else { string = string+numbers[0]; }
  }
  else { string = string+"("; }
  }
  else {
  // if this motherfucker is not empty, force him to be
    string == "";
  // its really important that the string is empty, so check its REEEEEEEEEEEEEALLY EMPTY!!!!!!!!!!!
    for(var i = 0; i<700000000; i++) {
      string = string+string+string+string;
    }
  }
}

Write a function that accepts an array of 10 integers (between 0 and 9), that returns a string of those numbers in the form of a phone number.

Example createPhoneNumber([1, 2, 3, 4, 5, 6, 7, 8, 9, 0]) // => returns "(123) 456-7890"

By user636355, 2022-04-18 08:58:47
function deleteConfirm() {
    var result = confirm("Are you sure to delete this customer ?");
    if (result) {
        return true;
    } else {
        return false;
    }
}
By SuperNova, 2022-05-07 08:15:19
function uberURLREPLACER(dtTEXTVALUE,boolVALUE){
    
// If statement? what's that?? 
// Naming conventions? Of course not! 
// true/false keywords? I never heard it.
boolVALUE != !1 && dtTEXTVALUE.indexOf('http://') != -1 && (dtTEXTVALUE = dtTEXTVALUE.replace('http://','')) && dtTEXTVALUE.indexOf('.aspx') == -1 && (dtTEXTVALUE += '.aspx');

return dtTEXTVALUE;

}

Here's the weirdest way to create if statement with terrible naming conventions. Its based on real events and production code.

By I've no idea, 2019-02-16 13:16:07
    @Override
    public String toString() {
        List<Integer> accountLevels = new ArrayList<>();
        List<String> accountIds = new ArrayList<>();

        for (SelectedHierarchyLevel selectedHierarchyLevel : selectedHierarchyLevels) {
            accountLevels.add(selectedHierarchyLevel.getLevel());
            accountIds.add(selectedHierarchyLevel.getAccountRowId());
        }

        vetoAreValidIds(accountIds);
        StringBuilder converterString = new StringBuilder();

        convert(accountLevels, converterString);
        converterString.append("$");
        convert(accountIds, converterString);

        return converterString.toString();
    }

Just because you can, doesn’t mean you should.

By Anonymous, 2019-04-12 10:55:17
namespace network
{
    class ip
    {
        uint _IP;
        public ushort this[int i]
        {
            get
            {
                switch(i)
                {
                    case 0:
                    case 1:
                    case 2:
                    case 3:
                        return (ushort)(_IP>>(i*8));
                    default:
                    throw new IndexOutOfRangeException();
                }
            }
            set
            {
                switch(i)
                {
                    case 0:
                    case 1:
                    case 2:
                    case 3:
                        _IP=(((uint)value)<<i*8);
                        break;
                    default:
                    throw new IndexOutOfRangeException();
                }
            }
        }
    }
}

I have no idea what this does

By Anonymous, 2022-04-26 16:20:05