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
import kotlinx.coroutines.CoroutineScope | |
import kotlinx.coroutines.delay | |
import kotlinx.coroutines.flow.Flow | |
import kotlinx.coroutines.flow.collect | |
import kotlinx.coroutines.flow.flow | |
import kotlinx.coroutines.flow.onEach | |
import kotlinx.coroutines.launch | |
import kotlinx.coroutines.runBlocking | |
import kotlin.properties.ReadOnlyProperty | |
import kotlin.reflect.KProperty |
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
<html> | |
<head><title>Animating a List with CSS3 Transitions - Multiple Lists</title></head> | |
<body> | |
<!-- Demonstrates one way to animate multiple lists --> | |
<style type="text/css"> | |
.leaderboard li { | |
font-family: sans-serif; | |
font-size: 12px; |
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
<style type="text/css"> | |
#leaderboard li { | |
font-family: sans-serif; | |
font-size: 12px; | |
line-height: 12px; | |
} | |
#leaderboard #players li { | |
display:block; | |
clear: both; | |
position: absolute; |
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 int triple(int x) { | |
return x * 3; | |
} |
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
<!--- EggLayer.cfc ---> | |
<cfcomponent> | |
<cffunction name="layEggs"> | |
<cfargument name="count" /> | |
<cfreturn "I just laid #count# eggs." /> | |
</cffunction> | |
</cfcomponent> |
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
// If you call records.find() with an id that doesn't exist, you get a RecordNotFound Exception | |
int id = 1; | |
try { | |
records.find(id).setName("Joe"); | |
} catch(RecordNotFoundException e) { | |
System.out.println("Record wasn't found!"); | |
} |
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
<script> | |
$(document).ready(function() { | |
$("#execute").bind("click", function() { | |
var dateString = $("#date").val(); | |
var date = new Date(dateString); | |
$("#dateObject").text(date.toString()); | |
}); | |
}); | |
</script> |
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 Address findAddress(String city) { | |
Address matchingAddress = null; | |
List<Address> addresses = getAddresses(); | |
for(Address address : addresses) { | |
if(address.getCity().equals(city)) { | |
if(matchingAddress == null) { | |
matchingAddress = address; | |
} else { |
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 Address processData(String city) { | |
Address ret = null; | |
List<Address> list = getAddresses(); | |
for(Address obj : list) { | |
if(obj.getCity().equals(city)) { | |
if(ret == null) { | |
ret = obj; | |
} else { |