This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Live Form Validation for Nette 2.0 | |
* | |
* @author Radek Ježdík, MartyIX, David Grudl | |
*/ | |
var LiveForm = { | |
options: { | |
controlErrorClass: 'form-control-error', // CSS class for an invalid control | |
errorMessageClass: 'form-error-message', // CSS class for an error message |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Primka { | |
// rovnice primky je dana: | |
// y = k*x + q | |
public double k; // k - smernice primky | |
public double q; // q - posun v ose y | |
// kostruktor, naplni instacni promenne | |
// hodnotami danymi pri vytvoreni objektu: | |
// new Primka(2, -1) je primka y = 2x - 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// jednotliva Kruznice je reprezentovana touto tridou Kruznice: | |
public class Kruznice { | |
public double x; // x stredu | |
public double y; // y stredu | |
public double r; // polomer | |
} | |
///////////////////////////////////////////////////////////////////////////////// | |
// metoda pro vypocet obsahu nejmensiho obdelniku: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ACTOR | |
----- | |
actor NazevAktera { | |
description: Popis ucastnika | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Integer randomizedSelect(List<Integer> elements, int k) { | |
if(elements.size() == 1) return elements.get(0); | |
Integer pivot = elements.get(0); | |
List<Integer> smaller = new ArrayList<Integer>(); | |
for(Integer i : elements) { | |
if(i < pivot) smaller.add(i); | |
} | |
if(k < smaller.size()) return randomizedSelect(smaller, k); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package mysystem; | |
import org.axonframework.commandhandling.model.Repository; | |
import org.axonframework.eventsourcing.EventSourcingRepository; | |
import org.axonframework.spring.stereotype.Aggregate; | |
import org.jetbrains.annotations.NotNull; | |
import org.springframework.beans.BeansException; | |
import org.springframework.beans.factory.BeanFactory; | |
import org.springframework.beans.factory.BeanFactoryAware; | |
import org.springframework.beans.factory.config.BeanDefinition; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// client code | |
object NewFeature : Feature | |
object NewFeatureVariant : Feature | |
fun main() { | |
// configuration | |
val featureConfiguration = mapOf( | |
NewFeature to true, |