Mistři v programování na #hovnokod


Anonymous,

if (s111.isSelected())
                    pocet1 = pocet1 + 1;
                else if (s112.isSelected())
                    pocet1 = pocet1 + 1;
                else if (s113.isSelected())
                    pocet1 = pocet1 + 1;
                else if (s114.isSelected())
                    pocet1 = pocet1 + 1;
                else if (s115.isSelected())
                    pocet1 = pocet1 + 1;
                else if (s121.isSelected())
                    pocet1 = pocet1 + 1;
                else if (s122.isSelected())
                    pocet1 = pocet1 + 1;
                else if (s123.isSelected())
                    pocet1 = pocet1 + 1;
                else if (s124.isSelected())
                    pocet1 = pocet1 + 1;
                else if (s125.isSelected())
                    pocet1 = pocet1 + 1;
                else if (s131.isSelected())
                    pocet1 = pocet1 + 1;
                else if (s132.isSelected())
                    pocet1 = pocet1 + 1;
                else if (s133.isSelected())
                    pocet1 = pocet1 + 1;
                else if (s134.isSelected())
                    pocet1 = pocet1 + 1;
                else if (s135.isSelected())
                    pocet1 = pocet1 + 1;
                else if (s116.isSelected())
                    pocet1 = pocet1 + 1;
                else if (s117.isSelected())
                    pocet1 = pocet1 + 1;
                else if (s118.isSelected())
                    pocet1 = pocet1 + 1;
                else if (s119.isSelected())
                    pocet1 = pocet1 + 1;
                else if (s120.isSelected())
                    pocet1 = pocet1 + 1;
                else if (s126.isSelected())
                    pocet1 = pocet1 + 1;
                else if (s127.isSelected())
                    pocet1 = pocet1 + 1;
                else if (s128.isSelected())
                    pocet1 = pocet1 + 1;
                else if (s129.isSelected())
                    pocet1 = pocet1 + 1;
                else if (s130.isSelected())
                    pocet1 = pocet1 + 1;
                else if (s136.isSelected())
                    pocet1 = pocet1 + 1;
                else if (s137.isSelected())
                    pocet1 = pocet1 + 1;
                else if (s138.isSelected())
                    pocet1 = pocet1 + 1;
                else if (s139.isSelected())
                    pocet1 = pocet1 + 1;
                else if (s140.isSelected())
                    pocet1 = pocet1 + 1;
                else if (S341.isSelected())  //s3-1
                    pocet3 = pocet3 + 1;
                else if (S342.isSelected())
                    pocet3 = pocet3 + 1;
                else if (S343.isSelected())
                    pocet3 = pocet3 + 1;
                else if (S344.isSelected())
                    pocet3 = pocet3 + 1;
                else if (S345.isSelected())
                    pocet3 = pocet3 + 1;
                else if (S351.isSelected())
                    pocet3 = pocet3 + 1;
                else if (S352.isSelected())
                    pocet3 = pocet3 + 1;
                else if (S353.isSelected())
                    pocet3 = pocet3 + 1;
                else if (S354.isSelected())
                    pocet3 = pocet3 + 1;
                else if (S355.isSelected())
                    pocet3 = pocet3 + 1;
                else if (S361.isSelected())
                    pocet3 = pocet3 + 1;
                else if (S362.isSelected())
                    pocet3 = pocet3 + 1;
                else if (S363.isSelected())
                    pocet3 = pocet3 + 1;
                else if (S364.isSelected())
                    pocet3 = pocet3 + 1;
                else if (S365.isSelected())
                    pocet3 = pocet3 + 1;
                else if (S346.isSelected())
                    pocet3 = pocet3 + 1;
                else if (S347.isSelected())
                    pocet3 = pocet3 + 1;
                else if (S348.isSelected())
                    pocet3 = pocet3 + 1;
                else if (S349.isSelected())
                    pocet3 = pocet3 + 1;
                else if (S350.isSelected())
                    pocet3 = pocet3 + 1;
                else if (S356.isSelected())
                    pocet3 = pocet3 + 1;
                else if (S357.isSelected())
                    pocet3 = pocet3 + 1;
                else if (S358.isSelected())
                    pocet3 = pocet3 + 1;

Anonymous,

Nikdy never ifu.

if (!TextUtils.isEmpty(r.getSignature())) {
            String signature = r.getSignature();
            if (!TextUtils.isEmpty(signature)) {
                 //do something with signature
            }
}

Anonymous,

Spring a Dependency Injection? Pche! Umíme sami! (A líp!)

@Configuration
public class SpringApplicationContext implements ApplicationContextAware {

	private static ApplicationContext context;

	@Override
	public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
		context = applicationContext;
	}

	public static <T> T getBean(Class<T> clazz) {
		return context.getBean(clazz);
	}
}

...
MojeBean mojeBean = SpringApplicationContext.getBean(MojeBean.class);

Anonymous,


Anonymous,