Mistři v programování na #hovnokod

export function arePasswordsSame(password, passwordconfirm) {
  const notSamePasswords = passwordconfirm !== password
  if (notSamePasswords) {
    return false
  } else return true
}

Anonymous,

Ponekud nesedi vyber prvku v comboboxu a validacni hlaska. Formular nelze odeslat.


<div _ngcontent-c95="" class="lane lane--fourth ng-star-inserted">
      <p _ngcontent-c95="" class="label">Délka trvání <span _ngcontent-c95="">*</span></p>
      <!----><aukro-select _ngcontent-c95="" class="possibleDaysSelect select ng-star-inserted"><div class="c-select selected" clickoutside="">
  <!---->
  <div class="aukro-select-trigger">
    <!---->
    <!---->
    <!----><span class="selected-title ng-star-inserted">3 dny</span>
    <i class="arrow-icn"></i>
  </div>
  <ul class="aukro-select-list">
    <!----><li class="aukro-select-list-item ng-star-inserted selected">
      <!---->
      <span class="option-name">3 dny</span>
    </li><li class="aukro-select-list-item ng-star-inserted">
      <!---->
      <span class="option-name">5 dní</span>
    </li><li class="aukro-select-list-item ng-star-inserted">
      <!---->
      <span class="option-name">7 dní</span>
    </li><li class="aukro-select-list-item ng-star-inserted">
      <!---->
      <span class="option-name">10 dní</span>
    </li>
  </ul>
</div>
</aukro-select>
      <!---->
      <!----><div _ngcontent-c95="" class="error-message ng-star-inserted">
        <span _ngcontent-c95="">Délka trvání musí být nejméně 12 dní.</span>
      </div>
    </div>

Anonymous,

Když prostě "break" miluješ a musíš ho použít!

public boolean hasAccessTo(CdbFunctionDescriptor function) {
	boolean result = false;
	for(CdbRole role : getRoles()) {
		if(role.isAllowed(function)) {
			result = true;
			break;
		}
	}
	return result;
}

Anonymous,

K německým kolegům zřejmě ještě nedorazila vymoženost funkce COALESCE

          CASE 
           WHEN NULLIF([Packing Material], 'Not assigned') IS NULL
             OR [Packing Material] = '' 
            THEN
             CASE 
              WHEN NULLIF (Material, 'Not assigned') IS NULL
                OR Material = '' 
               THEN
                CASE 
                 WHEN NULLIF ([Reporting Brand], 'Not assigned') IS NULL 
                   OR [Reporting Brand] = '' 
                  THEN '#' 
                 ELSE [Reporting Brand] + '_#' 
                END 
               ELSE Material 
              END 
             ELSE [Packing Material] 
            END AS BRANDS, 

Anonymous,

        Object[][] data = new Object[queryResultData.length + 1][5];
        if (queryResultData != null) {
...

Anonymous,