Start a new Kumite
AllAgda (Beta)BF (Beta)CCFML (Beta)ClojureCOBOL (Beta)CoffeeScriptCommonLisp (Beta)CoqC++CrystalC#D (Beta)DartElixirElm (Beta)Erlang (Beta)Factor (Beta)Forth (Beta)Fortran (Beta)F#GoGroovyHaskellHaxe (Beta)Idris (Beta)JavaJavaScriptJulia (Beta)Kotlinλ Calculus (Beta)LeanLuaNASMNim (Beta)Objective-C (Beta)OCaml (Beta)Pascal (Beta)Perl (Beta)PHPPowerShell (Beta)Prolog (Beta)PureScript (Beta)PythonR (Beta)RacketRaku (Beta)Reason (Beta)RISC-V (Beta)RubyRustScalaShellSolidity (Beta)SQLSwiftTypeScriptVB (Beta)
Show only mine

Kumite (ko͞omiˌtā) is the practice of taking techniques learned from Kata and applying them through the act of freestyle sparring.

You can create a new kumite by providing some initial code and optionally some test cases. From there other warriors can spar with you, by enhancing, refactoring and translating your code. There is no limit to how many warriors you can spar with.

A great use for kumite is to begin an idea for a kata as one. You can collaborate with other code warriors until you have it right, then you can convert it to a kata.

Ad
Ad
Code
Diff
  • const bg = 'gray';
    
    const css = `
      <style>
      body {
        background: ${bg};
        color: black;
      }
      </style>`;
      
    
    • var bg = 'gray';
    • const bg = 'gray';
    • var css = '' +
    • '<style>' +
    • 'body {' +
    • ' background: '+ bg + ';' +
    • ' color: black;'
    • '}' +
    • '</style>';
    • const css = `
    • <style>
    • body {
    • background: ${bg};
    • color: black;
    • }
    • </style>`;
Code
Diff
  • // reescreva em ES6
    function main(a, b = 2, c = 3) {    
        return a * b * c;
    }
    • // reescreva em ES6
    • function main(a, b, c) {
    • if (typeof b == 'undefined')
    • b = 2;
    • if (typeof c == 'undefined')
    • c = 3
    • function main(a, b = 2, c = 3) {
    • return a * b * c;
    • }
Code
Diff
  • // Exercício 1
    const titulo = "UOL - O melhor conteúdo";
    
    
    // Exercício 2
    const tags = []
    
    tags.push(...['A', 'B']);
    
    
    // Exercício 3
    let descricao = "Em 1999";
    
    descricao += " em São Paulo";
    
    
    // Exercício 4
    const materia = {titulo: "Barão de Limeira"};
    
    materia.titulo = "Alameda " + materia.titulo;
    
    
    // Exercício 5
    for (let i = 10; i--;) {
      console.log(i);
    }
    
    
    // Exercício 6
    for (let tag of ['A', 'B']) {
      console.log(tag);
    }
    
    
    // Exercício 7
    for (var j = [].length; j--;) {}
    
    if (j === -1) {
      console.log('Não encontrei');
    }
    
    
    // Exercício 8
    let a = 123;
    
    {
      a *= 2;
    }
    
    console.log(a);
    
    
    // Exercício 9
    let state = 'active';
    
    function stop() {
      state = 'paused';
    }
    
    stop();
    
    
    // Exercício 10
    const TRUE = !0;
    • // Exercício 1
    • var titulo = "UOL - O melhor conteúdo";
    • const titulo = "UOL - O melhor conteúdo";
    • // Exercício 2
    • var tags = []
    • const tags = []
    • tags.push(...['A', 'B']);
    • // Exercício 3
    • var descricao = "Em 1999";
    • let descricao = "Em 1999";
    • descricao += " em São Paulo";
    • // Exercício 4
    • var materia = {titulo: "Barão de Limeira"};
    • const materia = {titulo: "Barão de Limeira"};
    • materia.titulo = "Alameda " + materia.titulo;
    • // Exercício 5
    • for (var i = 10; i--;) {
    • for (let i = 10; i--;) {
    • console.log(i);
    • }
    • // Exercício 6
    • for (var tag of ['A', 'B']) {
    • for (let tag of ['A', 'B']) {
    • console.log(tag);
    • }
    • // Exercício 7
    • for (var j = [].length; j--;) {}
    • if (j === -1) {
    • console.log('Não encontrei');
    • }
    • // Exercício 8
    • var a = 123;
    • let a = 123;
    • {
    • a *= 2;
    • }
    • console.log(a);
    • // Exercício 9
    • var state = 'active';
    • let state = 'active';
    • function stop() {
    • state = 'paused';
    • }
    • stop();
    • // Exercício 10
    • var TRUE = !0;
    • const TRUE = !0;
Code
Diff
  • class Component {
      constructor(dom) {
        console.log('Parent class constructor executed!');
        this.dom = dom;
      }
      
      onCreate() {
        return true;
      }
    }
    
    class Collection extends Component {
    
      constructor(body,bool) {
        super(body,bool)
      }
    
    }
    • class Component {
    • constructor(dom) {
    • console.log('Parent class constructor executed!');
    • this.dom = dom;
    • }
    • onCreate() {
    • return true;
    • }
    • }
    • class Collection {
    • //
    • class Collection extends Component {
    • constructor(body,bool) {
    • super(body,bool)
    • }
    • }
Code
Diff
  • class Component {
      constructor(dom) {
        this.dom = dom
      }
      
      onCreate() {
        return this.dom
      }
    }
    • function Component(dom) {
    • this.dom = dom;
    • this.onCreate = function() {
    • return this.dom;
    • class Component {
    • constructor(dom) {
    • this.dom = dom
    • }
    • onCreate() {
    • return this.dom
    • }
    • }
Code
Diff
  • fn sum_odd(a: i32, b: i32) -> i32 {
        (a..=b).filter(odd).sum()
    }
    
    fn odd(n: &i32) -> bool {
        n % 2 == 1
    }
    • function sumNechet(a, b) {
    • fn sum_odd(a: i32, b: i32) -> i32 {
    • (a..=b).filter(odd).sum()
    • }
    • function нечетное(число) {
    • fn odd(n: &i32) -> bool {
    • n % 2 == 1
    • }
Code
Diff
  • fn find_max<T: Ord + Copy>(arr: &[T]) -> T {
        *arr.iter().max().unwrap()
    }
    • def find_max(arr):
    • return 0
    • fn find_max<T: Ord + Copy>(arr: &[T]) -> T {
    • *arr.iter().max().unwrap()
    • }
Code
Diff
  • SELECT transactions.date, transactions.store, transactions.total_price FROM transactions
    WHERE transactions.date>='2022-01-01' and transactions.date<='2022-01-03' 
    • -- Code Here
    • SELECT transactions.date, transactions.store, transactions.total_price FROM transactions
    • WHERE transactions.date>='2022-01-01' and transactions.date<='2022-01-03'
Code
Diff
  • select name nama, age umur from customers
    • -- Code Here
    • select name nama, age umur from customers