id stringlengths 36 36 | text stringlengths 1 1.25M |
|---|---|
73af4182-b8e6-4f08-bbcd-e4d33c385da5 | @Override
public String toString() {
Joiner joiner = Joiner.on(":");
return joiner.join(id.toString(), firstName, gender, dateOfBirth.toString());
} |
842539af-8102-4d23-820d-8b5a7163de8b | public Baby(String firstName, String lastName, String gender, Date dateOfBirth) {
this.firstName = firstName;
this.lastName = lastName;
this.gender = gender;
this.dateOfBirth = dateOfBirth;
createDate = new Date();
newUpdateDate = new Date();
visitTime = 0;
pictureNum = 0;
diaryNum = 0;
// nee... |
3960031b-43c5-4f4e-836e-7549b33f5f7b | public Baby(String firstName, String lastName, String gender, Date dateOfBirth, String coverImageUrl) {
this.firstName = firstName;
this.lastName = lastName;
this.gender = gender;
this.dateOfBirth = dateOfBirth;
createDate = new Date();
newUpdateDate = new Date();
visitTime = 0;
pictureNum = 0;
... |
1b73e9cf-ae2c-434f-9ff8-1f269b499c28 | public int updateQueue(Date date){
ArrayList<Date> tmpArrayList = new ArrayList<Date>();
for (Date e:visitQueue ){
if ((date.getTime()-e.getTime())/(1000*60*60) >= 1){
tmpArrayList.add(e);
}
}
for (Date e:tmpArrayList){
visitQueue.remove(e);
}
return visitQueue.size();
} |
8eb9022c-9368-4401-8e52-30f6b19930c6 | public void updateNewStuffDate(){
newUpdateDate = new Date();
} |
5eaeac84-2933-493f-a73a-b00729815576 | @Override
public int compareTo(Baby other) {
if (createDate.after(other.createDate)) {
return 1;
} else if (createDate.before(other.createDate)) {
return -1;
}
return 0;
} |
188544ac-98e4-4b7b-82f4-b7a706d6fefd | public void setHeader(String header) {
this.header = header;
} |
f78d5f08-df88-4bc0-95be-192ab133621e | public void onOpenDocument(PdfWriter writer, Document document) {
total = writer.getDirectContent().createTemplate(30, 16);
} |
0c5bb22b-500e-4722-bf1e-137d56bac845 | public void onEndPage(PdfWriter writer, Document document) {
PdfPTable table = new PdfPTable(3);
try {
String Ecole = "ENSA Khouribga - Recherche Opérationnelle";
table.setWidths(new int[]{24, 24, 2});
table.setTotalWidth(527);
table.s... |
2adee2af-6f20-4170-9466-351e3a249e5f | public void onCloseDocument(PdfWriter writer, Document document) {
ColumnText.showTextAligned(total, Element.ALIGN_LEFT,
new Phrase(String.valueOf(writer.getPageNumber() - 1)),
2, 2, 0);
} |
3e71a108-64ee-49e0-ba26-b63ba766e239 | public void createPdf(String filename,String fonction,Vector<String> contraintes,Vector<TableIT> tableau)
throws DocumentException, IOException {
// step 1
Document document = new Document(PageSize.A4, 36, 36, 54, 36);
// step 2
PdfWriter writer = PdfWriter.getInstance(document, new FileO... |
1ff21be5-6714-4e68-943d-04f5d791a1a6 | public static PdfPTable createTable1(Document document,Vector<Vector<String>> tableau,int ligne_pivot,int col_pivot) throws DocumentException {
Font font = FontFactory.getFont(FontFactory.COURIER, 10f);
int NbrColonne = tableau.firstElement().size();
PdfPTable table = new PdfPTable(NbrColonne);
t... |
7291bca0-3032-42fb-b893-e4f6ad05ac78 | public static void main(String[] main)
{
double number = 0.666;
convert(number);
} |
3e0005fa-8a84-4a0d-a23d-1019a08fc1c7 | public static void convert(double number)
{
// Code below doesn't work for 0 and NaN - just check before
long bits = Double.doubleToLongBits(number);
long sign = bits >>> 63;
long exponent = ((bits >>> 52) ^ (sign << 11)) - 1023;
long fraction = bits << 12; // bits are "reversed" but that's not a proble... |
7eaa0fd9-8e9d-4cbe-8b71-327056418802 | public static long gcm(long a, long b)
{
return b == 0 ? a : gcm(b, a % b);
} |
bb86f4a6-c5a3-45d9-81ef-19cd9ca77840 | public static String simplifier(long a, long b)
{
long gcm = gcm(a, b);
return (a / gcm) + "/" + (b / gcm);
} |
9bbea191-beab-4c4f-9a62-b23d0bc3d796 | public TableIT(Vector<Vector<String>> data,boolean finale,boolean automatique) {
initComponents();
Vector<String> ligne;
for(int i=0;i<data.size();i++)
{
ligne = new Vector();
for(int j=0;j<data.get(i).size();j++)
{
ligne.add(d... |
801c2a44-82ca-4c68-8a44-870f7ad1559b | @SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
this.setLayout(layout);
layout.setHorizontalGroup(
lay... |
72d2cba6-e145-456e-8d94-530fc1f73c37 | private void drawTable()
{
Vector<JLabel> row ;
JLabel cellule;
con.insets=new Insets(10, 5, 5, 10);
for(int i=0;i<data.size();i++)
{
row = new Vector();
for(int j=0;j<data.get(i).size();j++)
{
if(data.get(... |
c1f1a5da-eb9e-4a0e-90f0-7d9ed167ffde | public void colorierPivot(String pivot)
{
ligne_pivot = Integer.parseInt(pivot.split(",")[0]);
col_pivot = Integer.parseInt(pivot.split(",")[1]);
for(int i=0;i<labels.size();i++)
{
for(int j=0;j<labels.get(i).size();j++)
... |
af32edd5-bf9a-44b4-a84d-c5f2cb301a57 | @Override
public void mouseClicked(MouseEvent e) {
boolean b=false;
for(int i=1;i<labels.size()-1;i++)
{
for(int j=1;j<labels.get(i).size()-1;j++)
{
if(e.getSource()==labels.get(i).get(j) && (i!=ligne_pivot || j!=col_pivot))
{ ... |
77b4b785-03a7-4e8d-956e-c451fc68c142 | @Override
public void mousePressed(MouseEvent e) {
} |
6d43ad17-ded2-45bf-9852-f3172f04de09 | @Override
public void mouseReleased(MouseEvent e) {
} |
1aa3277f-8184-4ce9-b9ac-4ec9815a80e7 | @Override
public void mouseEntered(MouseEvent e) {
} |
a81c142c-423c-44b4-8ec6-2aafb04e586e | @Override
public void mouseExited(MouseEvent e) {
} |
fecf5e37-e00f-4000-8478-8220b95f2649 | public int getLigne_pivot() {
return ligne_pivot;
} |
4d8178bf-bca6-49a9-9350-34616c977df9 | public int getCol_pivot() {
return col_pivot;
} |
cfaa1b24-9a7f-401e-b3df-142ea4545695 | public Vector<Vector<String>> getData()
{
return data;
} |
59a55b26-850c-4b79-9547-2fee89023f55 | public static Vector<Vector<String>> initialiser(String z,Vector<String> contraintes) {
Vector<String> variables = new Vector();
data = new Vector();
compteur=0;
phase="normale";
ecart_phase1="";
indice_artificielles = new Vector();
b = ... |
0c47ebbd-3fb5-43df-a80e-57c149190811 | public static void initialiser_phase2(Vector<Vector<String>> data)
{
data.set(data.size()-1, z_initial);
z_type_courant = z_type;
System.out.println("Probleme de base : "+z_type_courant);
for(int i=1;i<data.size()-1;i++)
{
for(int j=1;j<data.lastElement().size(... |
6620f76e-87e1-4761-8e8d-aa1257113f0f | public static String equilibrer(String contrainte)
{
if(contrainte.contains("<") || contrainte.contains("<="))
{
compteur++;
return contrainte.replace("<","+e"+compteur+"=").replace("==", "=");
}
else if(contrainte.contains(">") || contra... |
cf131d0f-2124-4de9-8482-100e8fd00d2b | public static void afficher_tableau(Vector<Vector<String>> data)
{
for(int i=0;i<data.size();i++)
{
for(int j=0;j<data.get(i).size();j++)
{
if(i==0 || j==0)
System.out.print(data.get(i).get(j)+"\t");
else
{
... |
b26784e9-c836-4176-9f32-60ae4c0600fe | public static String trouver_pivot(Vector<Vector<String>> data,boolean bland)
{
/* ======== Recherche de la plus grande valeur = la variante entrante = la colonne du pivot ======== */
Vector<String> z = data.get(data.size()-1);
float max=0;
float min=0;
int VE=1;
int ... |
1965b0a0-769b-4320-a3c1-197ebdd1f8a2 | public static void calculer(Vector<Vector<String>> data,String pivot)
{
int ligne_pivot = Integer.parseInt(pivot.split(",")[0]);
int col_pivot = Integer.parseInt(pivot.split(",")[1]);
/* ===================== Copie de la matrice ================= */
Vector<Vector<St... |
e199e541-6ba8-4044-8dad-8a662fb0d790 | public static void setZType(String type)
{
Simplexe.z_type=type;
} |
3302efcb-3db1-4592-8908-6fa3d6f00e2a | public static void setZTypeCourant(String type)
{
Simplexe.z_type_courant=type;
} |
5e79e7de-ccb2-47ad-a92d-6c89782babfc | public static String getZTypeCourant()
{
return Simplexe.z_type_courant;
} |
79cf119b-338e-4ee2-a5f2-5e0ee8592499 | public static String getPhase()
{
return Simplexe.phase;
} |
cbcfdcfd-6b7a-45a0-a370-8f430d1849f8 | public GeomTest(Vector<String> equations,Vector<Vector<Double>> valeurs) {
this.equations=equations;
this.valeurs =valeurs;
initComponents();
this.draw();
} |
f70f011c-4e04-4fc7-91bd-4ae51d88aaf5 | @SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
setTitle("Aperçu graphique");
setPreferredSize(new java.awt.Di... |
4c2bf971-bbdd-4635-addc-e1c688fe2835 | private void draw()
{
Plot2DPanel plot = new Plot2DPanel();
Color[] couleurs = new Color[]{Color.red,Color.blue,Color.ORANGE,Color.green,Color.yellow};
plot.removePlotToolBar();
plot.addLegend("SOUTH");
plot.ge... |
c9f02713-3963-4f10-8dab-a3fd00f21d11 | public TestTableIT() {
initComponents();
/*JPanel pan = new JPanel(new GridBagLayout());
pan.add(new JLabel("TESTTTT"));
/*pan.setPreferredSize(new Dimension(200,200));
pan.setForeground(Color.red);*/
/*this.getContentPane().add(pan);
pan.setVisible(true)... |
5eeb3b28-1ef5-494b-b22a-4d48e34af04d | @SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
jPanel1 = new javax.swing.JPanel();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
javax.swing.GroupLayout jPa... |
311f5fc9-9242-4c95-ae52-b14acfa50d50 | public static void main(String args[]) {
/* Set the Nimbus look and feel */
//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
/* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
* For details see http://down... |
06608069-a803-485f-b58d-951f156c71e9 | public void run() {
JFrame fen = new TestTableIT();
fen.setVisible(true);
} |
03c307e5-d292-4f02-bb77-06dab17f3091 | public List<TweetTimes> getTweetTimes() {
TypedQuery<TweetTimes> query = em.createNamedQuery("TweetTimes.findAll", TweetTimes.class);
return query.getResultList();
} |
da96f8c1-9261-456c-94b8-77de5d7579b2 | public void clear() {
em.createNamedQuery("Tweet.deleteAll", Tweet.class).executeUpdate();
em.createNamedQuery("TweetTimes.deleteAll", TweetTimes.class).executeUpdate();
} |
9f67088f-7114-4834-8eff-52a760bee018 | public void startBatch(Jobs jobs, Properties property) {
JobOperator jobOperator = BatchRuntime.getJobOperator();
String jobId = jobs.toString();
// Java Batchの起動
jobOperator.start(jobId, property);
} |
66f790d4-0277-4b0e-90d6-ba19ba6579fa | @Override
public Object processItem(Object item) throws Exception {
Tweet tweet = (Tweet)item;
Date createdAt = tweet.getCreatedAt();
Calendar cal = Calendar.getInstance();
cal.setTime(createdAt);
int tweetHourOfDay = cal.get(Calendar.HOUR_OF_DAY);
return hou... |
4a237f2f-e548-46aa-a798-61a1d54f60d6 | private Hours hours(int hourOfDay) {
// TODO もっと綺麗な書き方もあると思う
if ((0 <= hourOfDay) && (hourOfDay <= 5)) {
return Hours.MIDNIGHT;
} else if ((6 <= hourOfDay) && (hourOfDay <= 11)) {
return Hours.MORING;
} else if ((12<= hourOfDay) && (hourOfDay <= 17)) {
... |
5181bf30-0ebd-4339-b5f7-ab24cf989f6d | Jobs(String jobId) {
this.jobId = jobId;
} |
9defa3f0-833e-4383-b66b-198f255e5136 | @Override
public String toString() {
return jobId;
} |
83ce3838-eec6-48b2-894d-edc58ef6c267 | @GET
@Consumes("application/json")
public List<TweetTimes> times(@QueryParam("intervalHours") int intervalHours) {
// TODO 時間帯間隔のクエリパラメータ指定。
// このサンプルではパラメータを無視しして、時間帯は6時間ごとに固定とする。
return tweetService.getTweetTimes();
} |
eee1cfbd-8982-4c55-92cd-28539d05046e | @POST
@Consumes("application/json")
// @TwitterAuth
public List<TweetTimes> update() {
// データベース上のTweet情報をクリア
tweetService.clear();
// バッチジョブの起動
batchManagerService.startBatch(Jobs.COLLECT_TWEET, null);
// 更新後の時間帯別tweet回数を返す
return tweetServic... |
f5354a61-e6c4-4fdc-aa19-5000c1db10ff | @Override
public void open(Serializable checkpointInfo) throws Exception {
Twitter twitter = new TwitterFactory().getInstance();
Paging paging = new Paging(1, 100);
timeLineList = twitter.getUserTimeline("n_agetsu", paging);
} |
5c1385b3-a7c6-4f45-9f23-c36f70dcbef0 | @Override
public Object readItem() throws Exception {
if (timeLineList.size() == index) {
return null;
}
Status status = timeLineList.get(index);
index++;
return status;
} |
f751b505-f075-4927-86ec-087553f53af7 | @Override
public void open(Serializable checkpoint) throws Exception {
// ScrollableCursorにキャストするため、TypedQueryは使用しない
Query query = em.createQuery("select t from Tweet t");
query.setHint("eclipselink.cursor.scrollable", true);
scrollableCursor = (ScrollableCursor)query.getSingleResult... |
cd9582a0-be61-4668-8b62-58e2a4d3cd9d | @Override
public Object readItem() throws Exception {
if (scrollableCursor.hasNext()) {
return scrollableCursor.next();
}
return null;
} |
beb4e49a-2bfa-47d6-be37-eb47c4d3ef29 | @Override
public void close() throws Exception {
scrollableCursor.close();
} |
c7ee108f-ebdc-4762-bb30-1f12fac16d63 | public TweetTimes() {
// 処理なし
} |
f6210e02-c192-440f-9787-338c30bcda32 | public TweetTimes(Hours hours, int times) {
this.hours = hours;
this.times = times;
} |
f132cfdb-1772-4e6c-bc8b-35962fa46923 | public Hours getHours() {
return hours;
} |
e4ac8f83-1823-4136-a586-db766bb7ac28 | public int getTimes() {
return times;
} |
b0cc815a-e4fa-4672-b9ab-52838e464afe | public int add() {
times++;
return times;
} |
39228cf1-6a28-40e6-8870-b5035a52f890 | public Tweet() {
// 処理なし
} |
0e2cb4f7-85b3-442d-a2e3-68e479fafdc8 | public Tweet(long id, Date createdAt, String text) {
this.id = id;
this.createdAt = createdAt;
this.text = text;
} |
04e66229-0b76-4cad-a4d8-d8d533e5edf2 | public long getId() {
return id;
} |
a2b2670d-212f-43d1-ae3d-1357c6c129c9 | public Date getCreatedAt() {
return createdAt;
} |
1920ff91-d48e-4ac5-8d10-f9892aceba5f | public String getText() {
return text;
} |
cdf36493-c562-42b6-ad88-f91f9c55c1de | @Override
public void writeItems(List<Object> items) throws Exception {
for (Object obj : items) {
Status status = (Status)obj;
Tweet tweet = new Tweet(status.getId(), status.getCreatedAt(), status.getText());
em.persist(tweet);
}
} |
12717c93-3cb1-4650-ac31-74a6959b23c8 | @Override
public void writeItems(List<Object> items) throws Exception {
for (Object obj : items) {
Hours hour = (Hours)obj;
TweetTimes tweetTimes = em.find(TweetTimes.class, hour);
if (tweetTimes == null) {
tweetTimes = new TweetTimes(hour, 0);
... |
ca5e7922-f0dd-4ed1-a8e1-deee293084c5 | @Override
public Set<Class<?>> getClasses() {
Set<Class<?>> resources = new java.util.HashSet<>();
// following code can be used to customize Jersey 2.0 JSON provider:
try {
Class jsonProvider = Class.forName("org.glassfish.jersey.jackson.JacksonFeature");
// Class jso... |
d28f6685-b99c-49f5-9c7a-3f1008b1be85 | private void addRestResourceClasses(Set<Class<?>> resources) {
resources.add(net.agetsuma.jbatchdemo.resources.BatchResource.class);
} |
290283ca-d462-4ef8-afbc-c8c0c6b4ee9a | public static void main(String[] args) {
Tests tests=new Tests();
tests.printHeader();
tests.testPerfectGame();
tests.testHeartBreak();
tests.testTenthFrameSpare();
tests.testTwoThrowsNoMark();
tests.testFourThrowsNoMark();
tests.testSimpleSpare();
... |
1a8b3c44-6d8a-43e4-842b-135701dd85f1 | private Bowling bowling() {
return new Configuration().game();
} |
7fda90ef-eafc-4436-b9e7-dc71031cfe78 | private PinCount pinCount(int pins) {
return PinCount.instance(pins);
} |
75c97a79-4ded-4f4f-b6e7-d1a93f35adc3 | private FrameCount frameCount(int id) {
return new FrameCount(id);
} |
0f1a509f-ea9b-4176-971a-e76cd636a408 | private void printHeader() {
System.out.printf("%-40s %-25s %-25s %-10s \n", " TEST ", "EXPECTED SCORE", "ACTUAL SCORE", "STATUS");
} |
a7ff5e3d-7bb9-460e-b957-4a480bfd3543 | private void printScore(String test, int expected, Score actual) {
System.out.printf("%-45s %-10s %-15s %-10s %-10s %-10s \n",
test, expected, "", actual, "", status(expected, actual));
} |
32281cbc-b20e-43a7-9ff1-8ac70db70089 | private String status(int expected, Score actual) {
if (expected==Integer.parseInt(actual.toString()))
return "PASS";
return "FAIL";
} |
d034a064-89a8-4eec-ab6f-ecaf5d3e7688 | private void testPerfectGame() {
Bowling game=bowling();
for (int i=0; i<12; i++)
game.roll(pinCount(10));
printScore("testPerfectGame", 300, game.score());
} |
c54bc2fc-3653-4047-9f43-7acbcb2f791c | private void testHeartBreak() {
Bowling game=bowling();
for (int i=0; i<11; i++)
game.roll(pinCount(10));
game.roll(pinCount(9));
printScore("testHeartBreak", 299, game.score());
} |
1600b56b-05ff-4718-b0dc-6453eff36ca1 | private void testTenthFrameSpare() {
Bowling game=bowling();
for (int i=0; i<9; i++)
game.roll(pinCount(10));
game.roll(pinCount(9));
game.roll(pinCount(1));
game.roll(pinCount(1));
printScore("testTenthFrameSpare", 270, game.score());
} |
6e23e867-c322-42dd-bd96-9f602740e576 | public void testTwoThrowsNoMark() {
Bowling game=bowling();
game.roll(pinCount(5));
game.roll(pinCount(4));
printScore("testTwoThrowsNoMark", 9, game.score());
} |
5e07bde8-ce32-461d-a911-c0c03f643188 | public void testFourThrowsNoMark() {
Bowling game=bowling();
game.roll(pinCount(5));
game.roll(pinCount(4));
game.roll(pinCount(7));
game.roll(pinCount(2));
printScore("testFourThrowsNoMark - GAME", 18, game.score());
printScore("testFourTh... |
23f4b919-a47d-41b6-bc58-0734d63e0af6 | public void testSimpleSpare() {
Bowling game=bowling();
game.roll(pinCount(3));
game.roll(pinCount(7));
game.roll(pinCount(3));
printScore("testSimpleSpare - FRAME: 1", 13, game.score(frameCount(1)));
} |
f20d0283-d490-4292-9a6d-7c2122ce6269 | public void testSimpleFrameAfterSpare() {
Bowling game=bowling();
game.roll(pinCount(3));
game.roll(pinCount(7));
game.roll(pinCount(3));
game.roll(pinCount(2));
printScore("testSimpleFrameAfterSpare - FRAME: 1", 13, game.score(frameCount(1)));
... |
582a2cc3-fc25-48f8-9ab9-06410596da32 | public void testSimpleStrike() {
Bowling game=bowling();
game.roll(pinCount(10));
game.roll(pinCount(3));
game.roll(pinCount(6));
printScore("testSimpleStrike - FRAME: 1", 19, game.score(frameCount(1)));
printScore("testSimpleStrike - GAME", 28,... |
f1ed1576-3aca-454c-abef-91aec11be7b7 | public void testEndOfArray() {
Bowling game=bowling();
for (int i=0; i<9; i++) {
game.roll(pinCount(0));
game.roll(pinCount(0));
}
game.roll(pinCount(2));
game.roll(pinCount(8)); // 10th frame spare
game.roll(pinCount(10)); // Strike in last pos... |
1cb64758-8463-4ad5-8e2e-ee2856722d9c | public void testSampleGame() {
Bowling game=bowling();
game.roll(pinCount(1));
game.roll(pinCount(4));
game.roll(pinCount(4));
game.roll(pinCount(5));
game.roll(pinCount(6));
game.roll(pinCount(4));
game.roll(pinCount(5));
game.roll(pinCount(5))... |
d1be4a21-83be-469d-a9be-4cea0b0eba7a | public void testFrameLimit() {
Bowling game=bowling();
for (int i=0; i<20; i++) {
game.roll(pinCount(1));
game.roll(pinCount(1));
}
printScore("testFrameLimit", 20, game.score());
} |
3aba5bab-480a-466e-b1f8-90f242525b62 | public void testUnfinishedSpare() {
Bowling game=bowling();
game.roll(pinCount(2));
game.roll(pinCount(1));
game.roll(pinCount(3));
game.roll(pinCount(7));
printScore("testUnfinishedSpare", 3, game.score()); ... |
965c55d0-4349-43bd-872a-11e9971136c0 | public void testUnfinishedStrike() {
Bowling game=bowling();
game.roll(pinCount(10));
game.roll(pinCount(5));
printScore("testUnfinishedStrike - FRAME: 1", 0, game.score(frameCount(1)));
printScore("t... |
07476ac4-2e1b-4649-bb4b-73e716c6ba35 | public void testUnfinishedOpen() {
Bowling game=bowling();
game.roll(pinCount(2));
game.roll(pinCount(1));
game.roll(pinCount(3));
printScore("testUnfinishedOpen", 3, game.score());
... |
d5c2ffdd-ec6b-40ac-9071-b90d2b45c75b | public void testMoreThanAllowedFrames() {
Bowling game=bowling();
game.roll(pinCount(2));
game.roll(pinCount(5));
game.roll(pinCount(3));
printScore("testMoreThanAllowedFrames", 7, game.score()); ... |
c67a0ec6-7e63-465f-867e-b7fda06078f7 | public void testZeroStrikeBonus() {
Bowling game=bowling();
game.roll(pinCount(10));
game.roll(pinCount(0));
game.roll(pinCount(0));
game.roll(pinCount(5));
printScore("testZeroStrikeBonus", 10, game.score()); ... |
29f65173-5bad-4161-8e01-4d0f68af08b9 | public void testZeroSpareBonus() {
Bowling game=bowling();
game.roll(pinCount(2));
game.roll(pinCount(8));
game.roll(pinCount(0));
game.roll(pinCount(10));
game.roll(pinCount(10));
printScore("testZeroSpareBonus", 30, game.score()); ... |
93b5d444-86a4-48ef-84ba-81d4a9131605 | public void testValidFrame() {
Bowling game=bowling();
game.roll(pinCount(2));
game.roll(pinCount(1));
game.roll(pinCount(3));
game.roll(pinCount(6));
printScore("testValidFrame - GAME", 12, game.score()); ... |
1a262797-9eb9-4492-b375-3fe82e1e2e9a | public void testInvalidFrame() {
Bowling game=bowling();
game.roll(pinCount(4));
game.roll(pinCount(1));
game.roll(pinCount(3));
game.roll(pinCount(6));
printScore("testInvalidFrame - GAME", 14, game.score()); ... |
f4ea84ec-abc5-4757-95e0-d3b03589b6a6 | public void testNegativePins() {
Bowling game=bowling();
try {
game.roll(pinCount(-2));
game.roll(pinCount(5));
game.roll(pinCount(3));
System.out.println("7: "+game.score(frameCount(200)));
} catch(Exception e) {
printScore("t... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.