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
<!-- | |
Copyright (c) 2006-2013, JGraph Ltd | |
Graphlayout example for mxGraph. This example demonstrates using | |
automatic graph layouts and listening to changes of the graph size | |
to keep the container size in sync. | |
--> | |
<html> | |
<head> | |
<meta name="description" content="Graphlayout example for mxGraph"> |
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
String className = (this != null) ? this.getClass().getSimpleName() : ""; | |
int wavFilesCount = new java.io.File("sounds").listFiles().length; | |
int clipIndex = (className.hashCode() & 0x7FFFFFFF) % wavFilesCount; | |
javax.sound.sampled.Clip clip = javax.sound.sampled.AudioSystem.getClip(); | |
java.io.File wavFile = new java.io.File("sounds" + java.io.File.separator + "sound" + clipIndex + ".wav"); | |
javax.sound.sampled.AudioInputStream audio = javax.sound.sampled.AudioSystem.getAudioInputStream(wavFile); | |
clip.open(audio); | |
clip.start(); |
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
i=1 | |
t='e' | |
s='hi there' | |
print(s.find(t,i)) | |
print(s[i:].find(t)) | |
print(s[i:].find(t)+i) | |
# Write Python code that initializes the variable |
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
i=1 | |
t='e' | |
s='hi there' | |
print(s.find(t,i)) | |
print(s[i:].find(t)) | |
print(s[i:].find(t)+i) | |