This file contains hidden or 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
ViewPort.when(Resolution.ALL_MOBILE, Resolution.LAPTOP) | |
// match // fallback | |
.then((portChange) -> GWT.log(portChange.getResolution()), (width, height) -> GWT.log("fallback for " + width + " " + height)); | |
ViewPort.when(Resolution.ALL_MOBILE, Resolution.LAPTOP) | |
// match | |
.then((portChange) -> GWT.log(portChange.getResolution())); | |
ViewPort.when(Resolution.ALL_MOBILE) | |
.or(Resolution.LAPTOP) |
This file contains hidden or 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 PasswordResetPage ... implements HasParameters<PasswordResetPage.Params> { | |
... | |
public class Params extends PageParams { | |
public Params(String emailAddress) { | |
emailAddress(emailAddress); | |
} | |
public Params emailAddress(int emailAddress) { |
This file contains hidden or 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 errai.prototype.client.constants.EditMode; | |
import errai.prototype.core.client.page.PageParam; | |
import errai.prototype.core.client.page.PageParams; | |
public class ModelEditParams extends PageParams { | |
public PageParam<Integer> id; | |
public ModelEditParams(int id) { | |
id(id); | |
} |
This file contains hidden or 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 HandlerRegistration addClickHandler(final ClickHandler handler) { | |
return addHandler(new ClickHandler() { | |
public void onClick(ClickEvent event) { | |
if(isEnabled()) { | |
handler.onClick(event); | |
} | |
} | |
}); | |
} |
This file contains hidden or 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
local totalDamageOut, totalDamageIn, totalHealing = 0.1, 0.1, 0.1 -- avoid dividing by zero | |
local scores = {} | |
local info = globalBosses[bossId] | |
local damageMap = creature:getDamageMap() | |
for guid, stats in pairs(info) do | |
local player = Player(stats.playerId) | |
local part = damageMap[stats.playerId] | |
local damageOut, damageIn, healing = (stats.damageOut or 0) + (part and part.total or 0), stats.damageIn or 0, stats.healing or 0 |
This file contains hidden or 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
local lootFactor = 1 | |
lootFactor = lootFactor / participants ^ (1 / 3) -- tone down the loot a notch if there are many participants | |
lootFactor = lootFactor * (1 + lootFactor) ^ (con.score / expectedScore) -- increase the loot multiplicatively by how many times the player surpassed the expected score | |
playerLoot = monsterType:getBossReward(lootFactor, _ == 1) |
This file contains hidden or 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 gwt.material.design.client.ui; | |
/* | |
* #%L | |
* GwtMaterial | |
* %% | |
* Copyright (C) 2015 GwtMaterialDesign | |
* %% | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. |
This file contains hidden or 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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains hidden or 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
@MappedSuperclass | |
public abstract class BaseSetting extends Model { | |
@NotNull | |
@Size(min = 5) | |
String name; | |
@Basic | |
String description; |
This file contains hidden or 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
@Observable(inherit = true) | |
@Entity(name = "settings") | |
@Cache(usage=CacheConcurrencyStrategy.TRANSACTIONAL) | |
public class Setting extends BaseSetting { | |
@Id | |
@GeneratedValue(strategy = GenerationType.IDENTITY) | |
protected int id = Model.UNSAVED_ID; | |
@Column(columnDefinition="VARCHAR") |