text stringlengths 14 410k | label int32 0 9 |
|---|---|
public void SetBus(int bus)
{
this.bus = bus;
} | 0 |
public static Decoder createDecoder(int encoding, CMsgReader reader) {
/*
if (encoding <= Encodings.encodingMax && createFns[encoding])
return (createFns[encoding])(reader);
return 0;
*/
switch(encoding) {
case Encodings.encodingRaw: return new RawDecoder(reader);
case Encodings.encodi... | 5 |
public int maxSubArray(int[] A) {
int max = 0;
int cur = 0;
boolean allZero = true;
int maxNegtive = Integer.MIN_VALUE;
for (int a : A) {
cur += a;
if (cur > max) {
max = cur;
}
if (cur < 0) {
cur = ... | 6 |
@Override
public void run() {
int totalConsumedByThisConsumer=0;
try{
while(true)
{
Integer item =sharedQueue.retreiveItem();
if(item==null)
{
... | 4 |
public static boolean isEqual(BufferedImage newImage,
BufferedImage previousImage) {
boolean equal = true;
if ((newImage != null) && (previousImage != null)) {
DataBuffer newDb = newImage.getData().getDataBuffer();
DataBuffer prevDb = previousImage.getData().getDataBuffer();
for (int i = 0; (i < newDb... | 5 |
private CharacterStorageInventory() {
characterList = new LinkedList<Character>();
} | 0 |
protected static String[] parseAsStrings(String[] args) {
List<String> all = new LinkedList<String>();
List<String> one = new LinkedList<String>();
for (String arg : args) {
one.clear();
for (String a : arg.split(C.separator)) {
one.add(a);
}
all.addAll(one);
}
String... | 2 |
private ClustersRequest parserRequest(String requestData) throws UnsupportedEncodingException{
// 解析握手信息
ClustersRequest requestInfo = new ClustersRequest();
String[] requestDatas = requestData.split("\r\n");
if(requestDatas.length < 0){
return null;
}
String line = requestDatas[0];
... | 7 |
private static int modifyInt(int rgb, int amount) {
int r = rgb & 0xFF0000 >> 16;
int g = rgb & 0x00FF00 >> 8;
int b = rgb & 0x0000FF;
int result = 0;
r += amount;
g += amount;
b += amount;
if(r < 0) {
r = 0;
}
else if(r > 255) {
... | 6 |
public static String charToString(char[][] tMap, int player){
String[] board = new String[tMap[0].length];
String pboard;
//reset board
for(int i=0; i<tMap[0].length; i++)
board[i] = "";
if(player == 1){
pboard = "o";
}else{
pboard = "x";
}
//Concatenate horizontally
//make map into ro... | 7 |
public static boolean isWraith (Entity entity) {
if (entity instanceof Zombie) {
Zombie wraith = (Zombie) entity;
LeatherArmorMeta meta;
ItemStack stack = new ItemStack(299, 1, (short) - 98789);
meta = (LeatherArmorMeta) stack.getItemMeta();
meta.setCo... | 2 |
public void runProgram()
{
outputLine("Interpreting...");
program.clear();
variables.clear();
try
{
program = BareBonesInterpreter.InterpretString(input.getText(), variables);
}
catch (BareBonesSyntaxException e)
{
outputLine("Syntax Error:");
outputLine(e.getMessage());
outputLine("O... | 4 |
public static void buildAssets(String directory) throws IOException {
if (!(directory.endsWith("/")||directory.endsWith("\\"))) {
//Logger.warning("Assets", "A slash was not added at the end of the asset output directory. Attempting to fix...");
directory = directory + "/";
}
... | 5 |
public void setMed_depotLegal(String med_depotLegal) {
this.med_depotLegal = med_depotLegal;
} | 0 |
public Object newArray(String type, int[] dimensions)
throws InterpreterException, NegativeArraySizeException {
if (type.length() == dimensions.length + 1) {
Class clazz;
try {
clazz = TypeSignature.getClass(type
.substring(dimensions.length));
} catch (ClassNotFoundException ex) {
throw new... | 2 |
public boolean processFollow(MOB mob, MOB tofollow, boolean quiet)
{
if(mob==null)
return false;
final Room R=mob.location();
if(R==null)
return false;
if(tofollow!=null)
{
if(tofollow==mob)
{
return nofollow(mob,true,false);
}
if(mob.getGroupMembers(new HashSet<MOB>()).contains(tofollo... | 9 |
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... | 6 |
public void criarGerente(Usuario Gerente) throws SQLException, excecaoGerenteExistente, excecaoGerentePorDepartamento {
UsuarioDAO userDAO = new UsuarioDAO();
Usuario GerenteExistente = userDAO.selectGerente(Gerente.getNome(), Gerente.getTipo());
//VERIFICA SE HA ALGUM GERENTE CADASTRADO COM O ... | 2 |
private void setUpButtonImage(JButton button, String image){
BufferedImage choosePageButtonImage;
try{
if(bookLayout == 1){
choosePageButtonImage = ImageIO.read(new File("resources/buttons/"+image));
}
else{
choosePageButtonImage = ImageIO.read(new File("resources/buttons" +bookLayout + "/"+image))... | 2 |
public DbSchema getSimpleSchema() throws WaarpDatabaseSqlException, IOException {
if (type == null) {
logger.warn("Structure non prête");
return null;
}
String schemaName = technicalDescription.getName();
int pos = schemaName.lastIndexOf('.');
if (pos > 0) {
schemaName = schemaName.substring(0, pos);... | 9 |
private static boolean circleCircleResolve(CircleObject a, CircleObject b)
{
double t=-1;
Vector2f aPosition = a.getPosition().copy();
Vector2f bPosition = b.getPosition().copy();
Vector2f aVelocity = a.getVelocity().copy();
Vector2f bVelocity = b.getVelocity().copy();
double distanceSq = aPositio... | 8 |
public boolean allowParameters(int number) {
if ("for".equals(keyword.getKeyword()) && (number == 0 || number == 1)) {
return true;
} else if ("enum".equals(keyword.getKeyword()) && (number == 1 || number == 2 || number == 3)) {
return true;
} else if ("set".equals(keywor... | 9 |
@SuppressWarnings("unchecked")
@Override
public void mousePressed(MouseEvent e) {
if (this.checkModifiers(e)) {
this.viewer = (VisualizationViewer<ILayoutVertex, ILayoutEdge>) e
.getSource();
this.layout = this.viewer.getModel().getGraphLayout();
final Point2D p = e.getPoint();
GraphElementAccesso... | 8 |
public void doAction() {
for (int i = 0; i < provider.getAvailableShare().length; i++) {
try {
if (accountmanager.diverShareSell(provider.getAvailableShare()[i].name,
playerbotname)) {
accountmanager.buyShare(playerbotname,
provider.getAvailableShare()[i].name, 5);
}
} catch (ShareExce... | 6 |
private void jButton_DepositActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton_DepositActionPerformed
try {
ArrayList selectedIndices = new ArrayList();
for (int i = 0; i < jTable5.getRowCount(); i++) {
String id = (String) jTable5.getModel().getValueA... | 5 |
@Override
public SolveStep getStep(Sudoku s) {
for (int x=0; x<9;x++){//SCORRO OGNI BLOCCO
SudokuBlock sb = s.getBlock(x);
Freq[] freq = new Freq[10];
for (int i = 0; i < freq.length; i++) freq[i]= new Freq();
for (int r=0; r<sb.getSize();r++){
for (int c=0; c<sb.getSize();c++){
if (!sb.getCell... | 8 |
public static void main(String [] args) {
Car car1 = new Car();
Car car2 = new Car();
Car car3 = new Car();
Car car4 = new Car();
Car car5 = new Car();
Car car6 = new Car();
Car car7 = new Car();
Car car8 = new Car();
Car car9 = new Car();... | 6 |
public void fillDeclarables(Collection used) {
for (int j = 0; j < methods.length; j++)
methods[j].fillDeclarables(used);
} | 1 |
@Override
public ResultadoAvItem[] getresultadoAvItem(String refeicao, String data) {
List<ResultadoAvItem> resultList = new ArrayList<ResultadoAvItem>();
Iterator<List<AvaliacaoItem>> avaliacoes = avItens.values().iterator();
List<AvaliacaoItem> avs = null;
while(avaliacoes.hasNext()){
avs = av... | 7 |
public void printMergedNodes() {
Iterator<Integer> it = mergedNodes.keySet().iterator();
while (it.hasNext()) {
int vertex = it.next();
System.out.print(vertex + ":");
LinkedList<Integer> nodes = mergedNodes.get(vertex);
if (nodes != null) {
System.out.print("[");
for (int i : nodes) {
Syst... | 3 |
private void modifyReply(Map<String, Object> jsonrpc2Params) throws Exception {
Map<String, Object> params = getParams(jsonrpc2Params,
new NullableExtendedParam(Constants.Param.Name.REPLY_ID, false),
new NullableExtendedParam(Constants.Param.Name.TEXT, true));
int reply... | 3 |
protected State<TransitionInput> exitCurrentState(State<TransitionInput> newState, State<TransitionInput>... submachineStates) {
if(currentState == null) {
return null;
}
State<TransitionInput> previousState = currentState;
if(submachine != null) {
submachine.exitCurrentState(getFirstState(submachineStat... | 7 |
private void saveAllButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_saveAllButtonActionPerformed
for (int i = 0; i < tabs.getTabCount(); i++) {
SimPanel t = (SimPanel) tabs.getComponentAt(i);
if (t.isModified()) {
t.save(false);
}
... | 3 |
public List<T> extractData(ResultSet rs) throws SQLException {
List<T> results = (this.rowsExpected > 0 ? new ArrayList<T>(this.rowsExpected) : new ArrayList<T>());
int rowNum = 0;
while (rs.next()) {
results.add(this.rowMapper.mapRow(rs, rowNum++));
}
return results;
} | 2 |
public String nextToken() throws JSONException {
char c;
char q;
StringBuffer sb = new StringBuffer();
do {
c = next();
} while (Character.isWhitespace(c));
if (c == '"' || c == '\'') {
q = c;
for (;;) {
c = next();
if (c < ' ') {
throw syntaxError("Unterminated string.");
}
if... | 9 |
void readLinesCheck(String vcf, int numTests) {
Random random = new Random(20130218);
System.out.println("Opening file '" + vcf + "'");
FileIndexChrPos idx = new FileIndexChrPos(vcf);
idx.setVerbose(verbose);
idx.open();
// Get file size
long size = (new File(vcf)).length();
for (int i = 1; i < numTes... | 5 |
public int compareTo(ReviewJournal o) {
if (o.score == score)
return title.compareTo(o.title);
return score > o.score ? -1 : 1;
} | 2 |
private void handle(String role, String order) throws Exception {
//leader
if(role.equals("l1")){
//System.out.println("leader handle");
l1.setOrder(order);
l1.action();
}else if(role.equals("l2")){
//System.out.println("leader handle");
l2.setOrder(order);
l2.action();
}else if(role.equa... | 9 |
public void morrisTraverse(TreeNode root) {
while (root != null) {
if (root.getLeft() == null) {
System.out.println(root.getData());
root = root.getRight();
} else {
TreeNode ptr = root.getLeft();
while (ptr.getRight() != null && ptr.getRight() != root)
ptr = ptr.getRight();
if (ptr.... | 5 |
public static int curiousNumberDenom() {
int num = 1;
int den = 1;
for (int i = 10; i < 100; i++) {
for (int j = 10; j < 100; j++) {
if (isCurious(i, j)) {
num *= j;
den *= i;
}
}
}
for (int i = 2; i <= num; i++) {
while (true) {
if (num == 1) {
break;
}
if (num % i... | 8 |
@Override
public void process(ChatSocket sock, ChatPacket packet) {
if (packet.getType() == PacketType.MANIFEST) {
ManifestMessage mfst = (ManifestMessage) packet.getPayload();
// For every persistence sequence number locally known...
for (int seq : sock.getPersistenceMan... | 7 |
private void method393(int ai[], byte abyte0[], int i, int j, int k, int l, int i1, int j1, int k1) {
int l1 = -(l >> 2);
l = -(l & 3);
for(int i2 = -i1; i2 < 0; i2++) {
for(int j2 = l1; j2 < 0; j2++) {
if(abyte0[j++] != 0)
ai[k++] = i;
else
k++;
if(abyte0[j++] != 0)
ai[k++] = i;
... | 8 |
@Override
public void run() {
Start.display("Initialized loop for " + this.getTempAlias());
// Run the loop while it's still open.
boolean running = true;
while (running) {
String message;
try {
message = (String) input.readObject();
if (CommandFormat.isCommand(message)) {
Comm... | 5 |
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int num1 = Integer.parseInt(in.next());
double num2 = Integer.parseInt(in.next());
if (num2 == 0) {
System.out.println("Error: divide by zero!");
System.exit(0);
}
System.out.println(num1 / num2);
} | 1 |
public boolean optimal(int[] bowl, int bowlId, int round)
{
//System.out.println("Inside Optimal..");
int bowlScore=0;
bowlScore = buildDistribution(bowl, bowlId, round);
if (maxBowls[round] == 2) {
scoresSeen.add(bowlScore);
len[round]++;
return Math.random()>0.5;
}
... | 4 |
private static String getSelectionString (Object selection) {
StringBuilder builder = new StringBuilder();
try {
XServiceInfo selectionServiceInfo = As.XServiceInfo (selection);
if (selectionServiceInfo.supportsService ("com.sun.star.text.TextRanges")) {
XIndexAccess indexAccess = As.XIndexAccess (se... | 9 |
public void renderEntities(){
for (GameObject gameObject : entityList) {
gameObject.render();
}
} | 1 |
@Override
public void decreaseAmount(ResourceType resource) {
switch(resource){
case BRICK:
discardView.setResourceDiscardAmount(ResourceType.BRICK, --brickDiscardAmount);
updateButtons(brickDiscardAmount,brickMax,resource);
break;
case ORE:
discardView.setResourceDiscardAmount(ResourceType.ORE... | 5 |
public static void testValidity(Object o) throws JSONException {
if (o != null) {
if (o instanceof Double) {
if (((Double)o).isInfinite() || ((Double)o).isNaN()) {
throw new JSONException(
"JSON does not allow non-finite numbers.");
... | 7 |
private static void filterCSV(String filename, LinkedList<String> filters, LinkedList<String> includes) throws IOException
{
FileReader fr = new FileReader(filename);
CsvReader csvIn = new CsvReader(fr, SEPARATOR);
csvIn.setSafetySwitch(false);
if(csvIn.readHeaders()) {
csvIn.readRecord();
System.out.... | 9 |
public String getFormTrackTitle(int formTrackNumber) throws SQLException
{
List<Track> trackRepTracks = new LinkedList<Track>();
for (Track t : getTracks())
if (t.getFormTrackNumber() == formTrackNumber)
trackRepTracks.add(t);
if (trackRepTracks.size() == 1)
if (trackR... | 6 |
public static Properties readFile(Log log, File file) {
InputStream stream = null;
Properties properties = new Properties();
log.info("Reading from config file");
try {
if (file == null) {
log.warn("No config file given");
} else {
stream = new FileInputStream(file);
properties.load(stream);
... | 7 |
public String getSuitAsString() {
switch (suit) {
case SPADES:
return "Spades";
case HEARTS:
return "Hearts";
case DIAMONDS:
return "Diamonds";
case CLUBS:
return "Clubs";
default:
... | 4 |
@Override
public void deserialize(Buffer buf) {
playerId = buf.readInt();
if (playerId < 0)
throw new RuntimeException("Forbidden value on playerId = " + playerId + ", it doesn't respect the following condition : playerId < 0");
playerName = buf.readString();
alignmentSid... | 8 |
@Override
public ContextKey createContextPartitionKey(int partition, String context, Class<?> contextType) {
return new ContextKey(partition, context, contextType);
} | 1 |
public void setPlayerOneWin()
{
currentState = States.PlayerOneWin;
} | 0 |
public void setboss(Player p) {
this.boss = p;
oldclass = plugin.getHero(p).getHeroClass();
} | 0 |
public static void main(String[] args){
Scanner in = new Scanner(System.in);
int n = in.nextInt();
int b = in.nextInt();
ArrayList<Integer> result = new ArrayList<Integer>();
int index = 1;
while(n-->0){
int ni = in.nextInt();
int possible = 0;
for(int i=0;i<ni;i++){
int t = in.nextInt();
... | 5 |
public boolean getBoolean(int index) throws JSONException {
Object object = get(index);
if (object.equals(Boolean.FALSE) ||
(object instanceof String &&
((String)object).equalsIgnoreCase("false"))) {
return false;
} else if (object.equals(Boolean.TRUE)... | 6 |
public void send() {
if (!isConnected) {
JOptionPane.showMessageDialog(null, "還未連線,不能發送訊息!", "Error",
JOptionPane.ERROR_MESSAGE);
return;
}
String message = textField.getText().trim();
if (message == null || message.equals("")) { ... | 3 |
@Override
final public void computeGradient() {
//
final int last = this.frameidx;
//
// from last to first layer.
//
for (int l = this.structure.layers.length - 1; l >= 0; l--) {
//
if (l == this.structure.inputlayer) continue;
fin... | 7 |
public void printOut() { // just a console printout for debugging
System.out.println("Task Name: " + taskName);
System.out.println("Duration(ms): " + calculateDuration());
if (taskParent != null) {
System.out.println("Parent: " + taskParent.getName());
} else {
Sy... | 5 |
public boolean guardarCambios(){
File f;
f = new File("parametros.conf");
try {
FileWriter fw = new FileWriter(f);
BufferedWriter bw = new BufferedWriter(fw);
PrintWriter pw = new PrintWriter(bw);
pw.write("ruta_excel=>"+t... | 1 |
public static void main(String[] args) {
Parcel p = new Parcel();
p.ship("Tasmania");
Parcel q = new Parcel();
// Defining references to inner classes:
Contents c = q.contents();
Destination d = q.to("Borneo");
} | 0 |
public boolean foodAhead() {
if (direction.equals(Direction.RIGHT)) {
return map.getTrailAt(x, (y >= h - 1 ? 0 : y + 1));
}
if (direction.equals(Direction.LEFT)) {
return map.getTrailAt(x, (y <= 0 ? h - 1 : y - 1));
}
if (direction.equals(Direction.UP)) {
return map.getTrailAt((x <= 0 ? w - 1 : x - 1... | 8 |
public FileReadException(String message) {
super(message);
} | 0 |
private boolean jj_scan_token(int kind) {
if (jj_scanpos == jj_lastpos) {
jj_la--;
if (jj_scanpos.next == null) {
jj_lastpos = jj_scanpos = jj_scanpos.next = token_source.getNextToken();
} else {
jj_lastpos = jj_scanpos = jj_scanpos.next;
}
} else {
jj_scanpos = jj_... | 9 |
String nextControlWord() throws StorageReaderException {
try {
String line = file.readLine();
while(line != null && (isCommentString(line) || !isControlWord(line))) {
line = file.readLine();
}
if(isEndOfBlock(line)) {
throw new EndOfBlockException(fileName);
}
return line;
} catch(IOExcept... | 5 |
public void map(Object key, Text value, Context context)
throws IOException, InterruptedException {
String line = value.toString();
if (line == null || line.equals(""))
return;
String[] lines = line.split("\t");
Post post = new Post(lines[0]);
String content = lines[1];
List<String> words... | 6 |
@Override public Iterator<String> iterator() {
return cookies.keySet().iterator();
} | 0 |
private void txPesqNomeKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_txPesqNomeKeyPressed
String nome = txPesqNome.getText();
if(nome.length()>0){
ConsultaController pc
= new ConsultaController();
modelo.setNumRows(0);
for (Consulta p : pc.listB... | 6 |
public static String gettext(AttributedCharacterIterator s) {
StringBuilder tbuf = new StringBuilder();
for(int i = s.getBeginIndex(); i < s.getEndIndex(); i++)
tbuf.append(s.setIndex(i));
return(tbuf.toString());
} | 1 |
public Move createMoveFromString(String instruction) {
String[] Split = instruction.split(" ");
String owner = Split[0];
int ID = Integer.parseInt(Split[1]);
Player player = null;
if(owner.equals(Character.toString('R'))) player = Player.Rom;
else if(owner.equals(Character.toString('C'))) player = P... | 2 |
@Override
public Balance addBusinessObject(Balance value) throws EmptyNameException, DuplicateNameException {
try {
return addBusinessObject(value, value.getUniqueProperties());
} catch (DuplicateNameException ex) {
String name = value.getName();
if (YEAR_BALANCE.... | 4 |
public void mousePressed(MouseEvent paramMouseEvent)
{
if (TextButton.this.Clickable)
{
if ((TextButton.this.player != null) && (TextButton.this.sound != null))
{
TextButton.this.player.play(TextButton.this.sound);
}
if (TextButton.this.MousePressedBackgroundCo... | 5 |
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result
+ ((backFace == null) ? 0 : backFace.hashCode());
result = prime * result
+ ((bottomFace == null) ? 0 : bottomFace.hashCode());
result = prime * result + ((coord == null) ? 0 : coord.hashCode());
result ... | 7 |
public static void delete(CommandSender sender, String [] args){
if(sender.hasPermission("battlegrounds.team.delete")){
//If missing parameters
if(args.length < 2+1){
sender.sendMessage(ErrorMessage.MissingParameters);
sender.sendMessage(ChatColor.YELLOW + usage);
}
else if(args.length ... | 8 |
public Node<K> getRoot() {
return root;
} | 0 |
@Override
public boolean isComponent(JsonObject jsonObject) {
return jsonObject.get("showdigitalclock") != null &&
jsonObject.get("showweather") != null &&
jsonObject.get("type").getAsString().equals("timeofdayclock");
} | 2 |
@Override
public boolean doValidation() {
if(nameTextField.getText().isEmpty()){
addToValidationMassage("name is empty!");
return false;
}
if(priceTextField.getText().isEmpty()){
addToValidationMassage("price is empty!");
return false;
}
if(quantityTextField.getText().isEmpty()){
... | 3 |
public void run() {
while (true) {
if (socket.isConnected()) {
try {
System.out.println("Listening on port " + socket.getPort() + " for incoming messages");
BufferedReader reader = new BufferedReader(new InputStreamReader(socket.getInputStream()));
String msg = reader.readLine();
System.out... | 4 |
private float move(float p, int index, Float max, Float min) {
float value = 0f;
if((min != null && max != null) && allowed[index]) {
if(isInRange(p, max, min)) {
value = p;
} else if(p > max) {
value = max;
} else {
... | 6 |
public UserInfo setUserInfo(String username, String password, String newPassword, String name, String organization,
String position, String phone, String email, String extraInfo)throws XMPPException{
if(newPassword != null && newPassword.length() < 6)
throw new XMPPException(new XMPPError(XMPPError.Co... | 8 |
public Constant newFloat(final float value) {
key1.set(value);
Constant result = get(key1);
if (result == null) {
result = new Constant(key1);
put(result);
}
return result;
} | 1 |
@Override
public boolean okMessage(final Environmental myHost, final CMMsg msg)
{
if(!(affected instanceof MOB))
return true;
final MOB mob=(MOB)affected;
if((msg.targetMajor(CMMsg.MASK_MALICIOUS))
&&(((msg.source()==mob)&&(msg.target()!=null)&&(isTruceWith(msg.target().Name())))
||((msg.target()==mob)... | 9 |
public void removeTask(Task task)
{
if (DEBUG) log("Find the taskWidget that contains the desired task");
TaskWidget target = null;
for (TaskWidget tw : taskWidgets)
{
if (tw.getTask() == task)
{
target = tw;
}
}
if (target == null)
{
if (DEBUG) log("Failed ... | 6 |
public void addChatMessage(String s) {
if(!s.trim().isEmpty()){
for(Component l : main.getContentPane().getComponents()){
if(l instanceof JLabel && l != name && l != creator && l != players){
l.setLocation(l.getLocation().x, l.getLocation().y - 20);
if(l.getLocation().y <= 120){
main.getContent... | 7 |
public void stopSpel(){ //stopt het spel en opent hoofdMenuPanel (als spel nog bezig is, eerst bevestiging via dialog)
if(spel.isSpelBezig() && toonStopDialog() == JOptionPane.NO_OPTION) return;
try{
spel.resetSpel();
} catch(Exception e){
toonError(e);
}
... | 3 |
public void setCityImageLocation(String forceName)
{
switch (forceName)
{
case "曹操": cityImageLocation = "/resources/caocaoCityColour.png";
cityImagePressedLocation = "/resources/caocaoCityPressedColour.png";
break;
case "刘备": ... | 4 |
private Object readDouble() {
return readFloat();
} | 0 |
public final void draw(byte i, boolean bool) {
anInt4696++;
if (i != -49)
method2022(null, 101);
if (bool) {
int width = (Class321.windowWidth > Class92.anInt1524 ? Class321.windowWidth : Class92.anInt1524);
int height = (((OpenGlToolkit.anInt7666 ^ 0xffffffff) > (Class348_Sub42_Sub8_Sub2.windowHeight... | 5 |
public List<CarrierInfo> findOFDMCarriersWithinRange (double spectrum[],double sampleRate,int binCount,double multiFactor,int startBin,int endBin) {
List<CarrierInfo> cList=new ArrayList<CarrierInfo>();
int a;
double dPoint=-1.0;
for (a=startBin;a<endBin;a++) {
if (spectrum[a]>dPoint) dPoint=spectrum[a];
}... | 6 |
protected void initializeDictionaries() throws MojoFailureException {
// Read the dictionary files
try {
// Load the default dictionary
dictionary.addDictionary(getClass().getResourceAsStream("/eap6.dict"));
for (File f : dictionaryFiles)
dictionary.ad... | 8 |
@Override
public String toString() {
String message = "";
// Include name into message
message += "Name:\n" + name;
// Include done or not
if (isDone) {
message += " [Done]\n\n";
} else {
message += "\n\n";
}
// Include description into message
if (!description.isEmpty()) {
messa... | 7 |
public Trame[] getTrame() {
return trame;
} | 0 |
public static void back(double curMoney, int last) {
if ((totalDis - stations[last].dis) <= (galCapacity * milesPerGal)
&& curMoney != 0) {
if (curMoney < min)
min = curMoney;
} else {
for (int i = last + 1; i < stations.length; i++) {
double dis = stations[i].dis - stations[last].dis;
double ... | 7 |
private void configureListeners() {
/*
* Changes to be done in text box on change of seletedDate ,
* selectedMonth and selectedYear in DatePicker.
*/
ChangeListener<Object> listener = new ChangeListener<Object>() {
@Override
public void changed(Ob... | 5 |
public List<HipchatUser> getStandupUsers()
{
List<HipchatUser> remaining_users = new ArrayList<HipchatUser>();
List<String> user_names = getSelectedRoom().getConnectedUsers();
List<HipchatUser> users = new ArrayList<HipchatUser>();
for ( String user_name : user_names )
{
HipchatUser user = findUser(user_n... | 7 |
private static String getPostionInBase64Table(char c) {
if((c >= 65 && c <= 90))// Gro�buchstabe
return c - 65 + "";
else if((c >= 97 && c <= 122))// Kleinbuchstabe
return c - 71 + "";
else if((c >= 48 && c <= 57))// Ziffern
return c + 4 + "";
else if(... | 7 |
private ArrayList<Vertex<T>> getPath(
ArrayList<Tuple<Pair<Vertex<T>>, Double>> vertexPairs,
Vertex<T> src,
Vertex<T> dest )
{
ArrayList<Vertex<T>> path = new ArrayList<Vertex<T>> ();
Vertex<T> successor = dest;
Pair<Vertex<T>> tempPair = null;
// trace the path backwards from the d... | 5 |
Subsets and Splits
SQL Console for giganticode/java-cmpx-v1
The query retrieves a limited number of text entries within a specific length range, providing basic filtering but minimal analytical insight.