text stringlengths 14 410k | label int32 0 9 |
|---|---|
public String launch(GameState state)
{
Scanner inputScanner = new Scanner(System.in);
System.out.println("d: Debug Menu");
String debug = inputScanner.next();
if(!debug.equals("d"))
{
return debug;
}
while(true)
{
System.out.println("\nDebug Menu: \n");
System.out.println("b: Vie... | 5 |
public CheckResultMessage checkL7(int day) {
return checkReport.checkL7(day);
} | 0 |
public static ProcessManagerCommand getInstance(String value){
ProcessManagerCommand[] instances = ProcessManagerCommand.values();
for(ProcessManagerCommand instance: instances){
if(instance.getValue().equals(value)){
return instance;
}
}
return UN... | 2 |
public V remove(K key) {
if (root == null) {
return null;
}
if (root.key.compareTo(key) == 0) {
V temp = root.value;
if (root.right == null) {
root = root.left;
} else if (root.left == null) {
root = root.right;
... | 5 |
private Operator parseOperator(String operator) {
if (operator.equals("==")) return Operator.EQ;
if (operator.equals(">")) return Operator.GT;
if (operator.equals(">=")) return Operator.GTE;
if (operator.equals("<")) return Operator.LT;
if (operator.equals("<=")) return Operator.LTE;
if (operator.equals("!=... | 6 |
public static void cppOutputDeclarations(Keyword accesscontrolmode, Cons declarations) {
Stella.cppIndent();
if (accesscontrolmode == Stella.KWD_PUBLIC) {
((OutputStream)(Stella.$CURRENT_STREAM$.get())).nativeStream.println("public:");
}
else if (accesscontrolmode == Stella.KWD_PRIVATE) {
((... | 7 |
public static void toggle(){
if(instance == null){
instance = new TimerPanel(UI.instance.root);
} else {
UI.instance.destroy(instance);
}
} | 1 |
public static String readAll(Reader rd) throws IOException {
StringBuilder sb = new StringBuilder();
int cp;
while ((cp = rd.read()) != -1) {
sb.append((char) cp);
}
return sb.toString();
} | 1 |
public void testWithFieldAdded6() {
Partial test = createHourMinPartial();
try {
test.withFieldAdded(DurationFieldType.hours(), 16);
fail();
} catch (IllegalArgumentException ex) {
// expected
}
check(test, 10, 20);
} | 1 |
public void shuffle() {
myCards.clear();
init();
} | 0 |
public BrainConfirmationDialog()
{
setResizable(false);
setModal(true);
contentPane.setBorder(DefaultUIProvider.getDefaultEmptyEtchedEmptyBorder());
setContentPane(contentPane);
getRootPane().setDefaultButton(correctButton);
correctButton.addActionListener(new Acti... | 0 |
public static void floodfill(int i, int j , char source){
Queue<Integer> x = new LinkedList<Integer>();
Queue<Integer> y = new LinkedList<Integer>();
x.add(i);
y.add(j);
v[i][j]=true;
while(!x.isEmpty()){
int xa = x.poll();
int ya = y.poll();
m[xa][ya]='&';
for (int k = 0; k < dx.length; k++) {
... | 9 |
private boolean validarDatos() {
//unicamente valido el numero de cuenta
boolean valido = false;
Fechas fecha = new Fechas();
Validaciones val = new Validaciones();
if (jTextField1.getText().equals("") || jTextField2.getText().equals("")){
mensajeError("Ingre... | 6 |
public ResultView getResultView(){
return resultView;
} | 0 |
public int diff_xIndex(LinkedList<Diff> diffs, int loc)
{
int chars1 = 0;
int chars2 = 0;
int last_chars1 = 0;
int last_chars2 = 0;
Diff lastDiff = null;
for(Diff aDiff : diffs)
{
if(aDiff.operation != Operation.INSERT)
{
// Equality or deletion.
chars1 += aDiff.text.length();
}
if(aD... | 6 |
public void rightClickMenu(MouseEvent e){
int r = this.rowAtPoint(e.getPoint());
if (r >= 0 && r < this.getRowCount()) {
this.setRowSelectionInterval(r, r);
} else {
this.clearSelection();
}
int rowindex = this.getSelectedRow();
if (rowindex < 0)
... | 5 |
public void setFlag(int bit, boolean on) {
switch (bit) {
case LegacyState.SREG_I:
if (on) enableInterrupts();
else disableInterrupts();
break;
case LegacyState.SREG_T: T = on; break;
case LegacyState.SREG_H: H = on; break;
... | 9 |
protected void updateStocks(int numUpdates) {
if (Float.isNaN(credits)) credits = 0 ;
if (Float.isNaN(taxed)) taxed = 0 ;
if (numUpdates % UPDATE_PERIOD == 0) diffuseExistingDemand() ;
//
// Here, we clear out any expired orders or useless items. (Consider
// recycling materials or sending el... | 5 |
protected void processRequest(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
Connexion.setUrl("jdbc:mysql://localhost/rdm?user=root");
try {
//Chargement du pilote :
Class.forName("com.mysql.jdbc.Driver");
} ca... | 5 |
public void setH(float h) {
this.h = h;
} | 0 |
public static void main(String[] args)
{
final MicroBenchmark bench = new MicroBenchmark();
final int len = 1024;
bench.logTime("start");
testAddSubtract();
testLinearCombination();
testMatrixMultiply();
testMatrixMultiplyFast();
testMatrixMultiplyStrassen();
//final int len = 1024;
final DoubleMat... | 7 |
@Override
public void atacar(){
try{
for(int i = 0; i < ejercito.size(); i++){
int refPosX;
int refPosY;
refPosX = ejercito.get(i).refLabel.getLocation().x;
refPosY = ejercito.get(i).refLabel.getLocation().y;
... | 4 |
public void loadConfig() throws IOException {
File f = new File(BrickGame.path + "/custom/" + name + ".png");
if (f.exists()) {
my_image = ImageIO.read(f);
}
try {
System.out.println(name + ": load custom AI configuration");
ArrayList<Double> ai = Tools.getDoubleConfig(BrickGame.path+"/custom/... | 3 |
@SuppressWarnings("unchecked")
public static String convertDealsToJson(List<Deals> deals,
List<Merchants> merchantsList, List<String> dealPicURLList) {
if (deals.size() != merchantsList.size()
|| deals.size() != dealPicURLList.size()) {
return null;
}
JSONArray j_array = new JSONArray();
for (int i... | 5 |
@Override
//work!
public void execute(String[] command) throws ExeptionNotEnoughArguments {
super.execute(command);
String item=command[2];
Player p = GameController.getGame().getPlayer();
switch(command[1])
{
case "world":
case "w":
{
if(p.getLocation().getExit(item) != null && p.getLocatio... | 9 |
public boolean executionAllowed() {
return (receiver == null || receiver.hasPermission(getCommandType().getPermission()));
} | 1 |
public int addExpectedEdges(final Node node)
{
final OrdinaryCluster cl = node.getGtCluster();
/*
* Intra-cluster edges
*/
final List<Long> intraClPartners =
Sequences.binomialSequence(cl.getPIn(), cl.getNodeCount() - 1);
for (final long index : intraClPartners)
{
// mind not to create self loop... | 7 |
public static String encode(final byte[] data) {
final char[] tbl = {
'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P',
'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f',
'g', 'h', 'i', 'j', 'k', 'l', 'm',... | 5 |
public static ListNode addTwoNumbers(ListNode l1, ListNode l2) {
ListNode p1 = l1;
ListNode p2 = l2;
int incr = 0;
ListNode ln = null;
ListNode p = null;;
while (p1 != null || p2 != null || incr != 0) {
int sum = 0;
if (null != p1) sum = sum + p1.val;
if (null != p2) sum = sum + p2.val;
sum = su... | 9 |
@EventHandler()
public void onProjectileHit(ProjectileHitEvent e) {
Iterator<Dodgeball> it = mm.getMinigames();
while(it.hasNext()) {
it.next().handleProjectileHitEvent(e);
}
} | 1 |
public AbstractPiece[][] board(){
AbstractPiece [][] chessboard = new AbstractPiece[CHESSBOARD_WIDTH][CHESSBOARD_HEIGHT];
for(int rows = 0; rows < chessboard.length; rows++){
for(int column = 0; column < chessboard[0].length; column++){
... | 8 |
public TreeNode insert(int value) {
TreeNode current = root, parent = null;
boolean isLeft = false;
while (current != null) {
parent = current;
if (current.val == value) {
// I ignore this case
} else if (current.val > value) { // goes left
current = current.left;
isLeft = true;
} else... | 5 |
public void update() {
getFps();
screen.draw(stage);
if(menu.isOpen()) {
menu.draw();
menu.update(stage);
}
screen.update();
if(!paused)
stage.act();
Input.checkInput(stage);
if(screen.toBeClosed() || Keybinds.EXIT.clicked() || toBeClosed) {
close();
}
} | 5 |
public static String parse(String in){
String B = in;
for(int y = 0; y < Main.parseList.length; y++){
try{
B = B.replaceAll((Main.parseList[y] != "[" && Main.parseList[y] != "]")? Main.parseList[y] : "\\" + Main.parseList[y]
,Main.unParseList[y]);
} catch (NullPointerException e){System.out.print("F... | 4 |
private Graph<Vec2r> build() {
final Graph<Vec2r> visibilityGraph = new Graph<Vec2r>(false);
final Collection<Vec2r> vertices = new ArrayList<Vec2r>(m_Segments.size());
/* Adding segments vertices as graph vertics */
for (final Segment segment : m_Segments) {
if (visibility... | 7 |
public int getId(){
return id;
} | 0 |
private int updatePos(int pos, int increment) {
if (offset > -1)
offset += increment;
return pos + increment;
} | 1 |
private void processRequest(ServerSocketRemoteChannel channel, Object bareRequest) throws InterruptedException {
if (bareRequest != null && bareRequest instanceof Transport) {
Transport transport = (Transport) bareRequest;
String requestId = transport.getId();
Object requestObject = transport.getObject()... | 6 |
private boolean convertYUV422toRGB(int[] y, int[] u, int[] v, int[] rgb)
{
if (this.upSampler != null)
{
// Requires u & v of same size as y
this.upSampler.superSampleHorizontal(u, u);
this.upSampler.superSampleHorizontal(v, v);
return this.convertYUV444to... | 9 |
public void nextQueens(String[] board,int row,int n){
if(row >= n){
list.add(copy(board));
return ;
}
char[] crow = board[row].toCharArray();
for(int col=0; col< n;col++){
if(ok(board,row,col,n)){
crow[col] ='Q';
board[r... | 3 |
@Override
public SampleModel createCompatibleSampleModel(int width, int height) {
if (bitsPerComponent >= 8) {
assert bitsPerComponent == 8 || bitsPerComponent == 16;
final int numComponents = getNumComponents();
int[] bandOffsets = new int[numCompone... | 6 |
@Test
public void invalidCardCreateProfile() {
Address billing = getTestBillingAddress();
Card card = getTestCard();
ProfileResponse createdProfile = null;
try {
Card nillCard = null;
createdProfile = beanstream.profiles().createProfile(nillCard, billing);
Assert.fail("Fail test because the card was ... | 5 |
public int do600baudFFT (CircularDataBuffer circBuf,WaveData waveData,int start) {
// Get the data from the circular buffer
double samData[]=circBuf.extractDataDouble(start,13);
double datar[]=new double[FFT_64_SIZE];
// Run the data through a Blackman window
int a;
for (a=0;a<datar.length;a++) {
if ((a>... | 3 |
private List<?> findByDate(Session session,
String propertyName,
Date date,
String sortByPropertyName) throws InvalidHibernateSessionException,
InvalidCriterionException,
InvalidCriterionValueException,
InvalidSortByPropertyException,
DAOException {
if(ses... | 7 |
@Test
public void testWritePassword() throws NoSuchAlgorithmException {
// Write double hashed password to mock persistence handler
String id = "DouglasAdams";
byte[] passwordHash = new BigInteger(
"769b1075dbb0ef9643e7bcc606acb023af49e00bce9518d6afcb14e6ba52d168",
16).toByteArray();
ph.writePassword(i... | 2 |
final void startBackup(final Component parentWindow, final String destinationPath) {
// If the destination path is invalid, return.
if (destinationPath == null ||
"".equals(destinationPath.trim()) ||
!(new File(destinationPath.trim()).exists())) {
AlertMessages.backupPathNull();
return;
}
... | 3 |
public void deleteMin() {
if (juurilistanEka != null) {
BinomiSolmu kasiteltava = juurilistanEka;
BinomiSolmu edellinen = null;
BinomiSolmu pienin = min();
while (kasiteltava.getArvo() != pienin.getArvo()) {
edellinen = kasiteltava;
... | 5 |
public static Subject[] findNatScSubjects(Data myData) {
List<Subject> results = new ArrayList<>();
for(Subject thisWahlfach:myData.getWahlfaecher()) {
if(thisWahlfach.getSubjectType()==NATURAL_SCIENCE) results.add(thisWahlfach);
}
if(results.isEmpty()) throw new NoSuchE... | 3 |
public ServerThread(Server server, Socket socket) {
this.socket = socket;
this.server = server; // Store it so we can use it in parent class
// I/O
try {
this.inFromClient = new BufferedReader(new InputStreamReader(this.socket.getInputStream()));
this.outToClient = new PrintWriter(this.socket.ge... | 1 |
public int checkstaff()
{
try
{
BufferedReader in = new BufferedReader(new FileReader("./data/staff.txt"));
String data = null;
while ((data = in.readLine()) != null)
{
if (playerName.equalsIgnoreCase(data))
{
return 5;
}
}
}
catch (IOException e)
{
System.out.println("Crit... | 3 |
@Override
public void run() {
while (channel != null) {
long start = System.currentTimeMillis();
try {
buffer.flip();
channel.write(buffer);
} catch (IOException e) {
e.printStackTrace();
}
long elapsed = UnblockingNetwork.getCycleRate()
- (System.currentTimeMillis() - start);
if (... | 4 |
public void create(String name, int maxGuest, double price) {
this.name=name;
this.maxGuest=maxGuest;
this.price=price;
} | 0 |
public void add(int n) {
if (arrIndx == len) {
arrIndx = 0;
listIndx++;
list.add(new int[len]);
}
list.get(listIndx)[arrIndx] = n;
arrIndx++;
} | 1 |
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
Identifier<?> other = (Identifier<?>) obj;
if (_value == null) {
if (other._value != null)
return false;
} else if (!_value.equals(other... | 8 |
public static void makeCompactGrid(Container parent,
int rows, int cols,
int initialX, int initialY,
int xPad, int yPad) {
SpringLayout layout;
try {
layout = (SpringLayout)pa... | 7 |
static long rotate(int u, int c)
{
return (u << c) | (u >>> (32 - c));
} | 0 |
public String toString(){
String result = "";
int i = 0;
for(String[] s1 : this.population){
for(String s2 : s1){
result += s2 + ", ";
}
result += "Fitness = " + String.valueOf(this.fitness[i]);
result += "\n";
i++;
}
return result;
} | 2 |
public boolean Apagar(int id){
try{
EmailDAO emailDAO = new EmailDAO();
TelefoneDAO telefoneDAO= new TelefoneDAO();
EnderecoDAO enderecoDAO = new EnderecoDAO();
PessoaDAO pessoaDAO = new PessoaDAO();
emailDAO.ApagarTodosQuandoExcluiPessoa(id);
... | 1 |
final public void Type_declaration() throws ParseException {
/*@bgen(jjtree) Type_declaration */
SimpleNode jjtn000 = new SimpleNode(JJTTYPE_DECLARATION);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
jjtn000.jjtSetFirstToken(getToken(1));
try {
jj_consume_token(ARRAY... | 8 |
public LoginServlet() {
super();
// TODO Auto-generated constructor stub
} | 0 |
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
HttpSession session = request.getSession();
response.setContentType("text/html;charset=UTF-8");
PrintWriter out = response.getWriter();
String deleteMembruEmail = request.getParameter("del... | 9 |
public int searchInsert2(int[] A, int target) {
if(A == null){
return 0;
}
int res = 0;
if(target < A[0]){
return 0;
}
if(target > A[A.length - 1]){
res = A.length;
}
for (int i = 0; i < A.length; i++) {
if(target == A[i]){
res = i;
}
if(i != A.length -1){
if((target > A[i])&&(... | 8 |
public int[] nextInts(int n) throws IOException {
int[] res = new int[n];
for (int i = 0; i < n; ++i) {
res[i] = nextInt();
}
return res;
} | 1 |
private void stopFileReceiver() {
while (this.fileReceiverThread.isAlive()) {
this.log.fine("FileReceiver thread is alive");
this.fileReceiverThread.interrupt();
this.log.fine("FileReceiver thread is interupt");
try {
this.log.fine("Join FileReceiver thread");
this.fileReceiverThread.join();
t... | 2 |
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 static ObjectInputStream getIn() {
if(in==null){
try {
in = new ObjectInputStream(socket.getInputStream());
} catch (IOException e) {
throw new ConexionException("Error al crear el object in: "
+ e.getMessage(), e);
}
}
return in;
} | 2 |
@Override
public boolean isValid(File file) {
if (firstTime) {
firstTime = false;
return true;
} else {
return false;
}
} | 1 |
public DataModel<MedicoBean> listaMedicos() {
MedicoDAO medico = new MedicoDAO();
if (medico.getMedicos() != null) {
medicosBean.removeAll(medicosBean);
for (MedicoDAO e : medico.getMedicos()) {
medicosBean.add(new MedicoBean(e.getIdMedico(), e.getNome(), e.getCrm... | 2 |
@Test
public void arithmeticInstr_testInvalidDestinationRegisterRef() { //Checks instr. not created with invalid register ref.
try {
instr = new ArithmeticInstr(Opcode.ADD, 5, 25);
}
catch (IllegalStateException e) {
System.out.println(e.getMessage());
}
assertNull(instr);
} | 1 |
private static String getQualifiedNameForArray(Class<?> clazz) {
StringBuilder result = new StringBuilder();
while (clazz.isArray()) {
clazz = clazz.getComponentType();
result.append(SpringClassUtils.ARRAY_SUFFIX);
}
result.insert(0, clazz.getName());
return result.toString();
} | 2 |
public void compileIndex(List<PendingBlock> blocks, RAMOutputStream scratchBytes, IntsRefBuilder scratchIntsRef) throws IOException {
assert (isFloor && blocks.size() > 1) || (isFloor == false && blocks.size() == 1): "isFloor=" + isFloor + " blocks=" + blocks;
assert this == blocks.get(0);
assert sc... | 9 |
@Override
public void Play(PlayerResponse response) {
try {
Suit move = response.getTrump();
System.out.println("trump is " + move);
mP.setLastMove(response);
mP.setCurrentTrump(move);
// Send trump to players
PinochleMessage message = new PinochleMessage();
message.setCurrentTrump(move.toSt... | 2 |
public void draw(Graphics2D g) {
if(!visible) return;
int w = getWidth();
int h = getHeight();
//Color background = new Color(8, 145, 145);
//Color background = new Color(35, 69, 102);
Color background = new Color(22, 49, 79);
Color foreground = Color.WHITE;
RoundRe... | 7 |
public void setLatitudeLongitude(double latitude, double longitude) {
this.setLatitude(latitude);
if (Math.abs(this.latitudeInternal) == 90000000L) {
// At the poles all longitudes intersect. Simplify for later comparison.
this.setLongitude(0);
} else {
this.setLongitude(longitude);
}
} | 1 |
public final int length() { return filter.length; } | 0 |
public void login() {
NavalBattleIO.saveAttribute(new SettingsAttribute("lastGoodUserName",usernameField.getText()));
AuthStatus status = NavalBattle.getRoketGamer().init(new APIKey(Constants.API_KEY),
new Player(usernameField.getText(),
new Password(createString(passwordField.getPassword()))), Constants.... | 5 |
@SuppressWarnings("unchecked") public <T> T getProperty(String key)
{
if (properties == null)
{
return null;
}
return (T)properties.get(key);
} | 1 |
@Override
protected void fillModel(Map<String, Object> model, HttpServletRequest httpServletRequest, SProject sProject, SUser sUser) {
SlackProjectSettings slackProjectSettings = (SlackProjectSettings) projectSettingsManager.getSettings(sProject.getProjectId(), SlackProjectSettingsFactory.SETTINGS_KEY);
... | 7 |
public void nesteOppgave(){
/*Metode nesteOppgave()
Denne metoden holder styring på om dette finnes flere oppgaver å vise
Viser neste oppgave om mulig
Når alle er vist sjekkes det hvor mange rett eleven har
Samler hvilke feil eleven har gjort
Lagrer informasjonen ved å kalle opp lagreFil metoden
Bygger op... | 5 |
private List<String> loadUpdateFiles(String tblId) {
List<String> updateFiles = new ArrayList<String>();
String updatePath = "sql/" + tblId + "/updates/" + dbCon.getDBMS().toLowerCase();
try {
JarFile jar = new JarFile(plugin.getJar());
Enumeration<JarEntry> entries = jar.entries();
//Loop through con... | 4 |
private void extractParentheses() {
int open = 0; // level of outer parentheses
int openIgnored = 0; // level of inner parentheses, to be skipped
Stack<Integer> lefts = new Stack<Integer>();
Stack<Integer> rights = new Stack<Integer>();
for (int i = 0; i < size(); i++) {
if (get(i) instanceof TokenPare... | 8 |
public void update(){
if((vx+ax>0 && vx<0) || (vx+ax<0 && vx>0)){
ax = 0;
vx = 0;
}
vr+=ar;
vx+=ax;
vy+=ay;
x+=vx;
y+=vy;
if(vx>=0)
rotate(vr);
else
rotate(-vr);
boundingBox.... | 5 |
public void buildTable(Renamer renameRule) {
if (!isReachable() && (Main.stripping & Main.STRIP_UNREACH) != 0)
return;
if (isPreserved()) {
if (GlobalOptions.verboseLevel > 4)
GlobalOptions.err.println(toString() + " is preserved");
} else {
Identifier rep = getRepresentative();
if (!rep.wasAlias... | 9 |
public void scoreSound() {
try {
Clip score = AudioSystem.getClip();
score.open(AudioSystem.getAudioInputStream
(Ball.class.getResource("Bonus.wav")));
score.start();
} catch (LineUnavailableException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
} catch (Unsupported... | 3 |
private void btn_aceptarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btn_aceptarActionPerformed
if (lab_modo.getText().equals("Alta")){
if (camposCompletos()){
ocultar_Msj();
insertar();
menuDisponible(true);
... | 9 |
private void jToggleButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jToggleButton3ActionPerformed
//Remember: colocar no ultimo parametros o ID recuperado do banco de dados
long id = 0;
try {
aum.EditarUsuario(txt_Senha.getText(),cmb_Perfil.getSelectedIndex(... | 2 |
static void initSections() {
if (sectionLevelMax == null) {
if (!includeTexOutputInOtherTexFile) {
if (docclass.equals("scrreprt") || docclass.equals("report")) {
sectionLevelMax = CHAPTER_LEVEL;
} else if (docclass.equals("scrartcl")
|| docclass.equals("article")) {
sectionLevelMax = SECTI... | 9 |
public void bonusReward() {
if (jqPoints < 1) {
dropMessage("you do not even have one JQ point. idiot");
return;
}
jqPoints--;
int type = (int) (Math.random() * 100);
if (type < 5) {
if (checkSpace(1812006)) {
gainExpiringItem(1... | 9 |
@Basic
@Column(name = "FUN_GRADO")
public String getFunGrado() {
return funGrado;
} | 0 |
public BuddyWnd(Coord c, Widget parent) {
super(c, new Coord(400, 370), parent, "Kin");
instance = this;
bl = new BuddyList(new Coord(10, 5), new Coord(180, 280), this) {
public void changed(Buddy b) {
if (b != null)
BuddyWnd.this.wdgmsg("ch", b.id);
}
};
bi = new BuddyInfo(new Coord(210, 5), n... | 5 |
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + (int) (lastModified ^ (lastModified >>> 32));
result = prime * result + this.service.hashCode();
return result;
} | 0 |
public static void run()
{
System.out.println("\n\n--|Bernoulli Process|----------------------------------------------------------");
System.out.println("Simulate five trucks, each with 40% chance of being late");
// create a truck which can only be on time (60%) or late (40%)
Hat<Boolean> late_truck ... | 3 |
@Override
public void load() throws DataLoadFailedException {
super.load();
groups.clear();
List<String> groupList = getSection().getStringList("groups");
if (groupList != null) {
groups.addAll(groupList);
}
} | 1 |
public ListenerManager(TotalPermissions p) {
plugin = p;
playerListener = new PlayerListener(plugin);
worldListener = new WorldListener(plugin);
entityListener = new EntityListener(plugin);
consoleListener = new ConsoleListener(plugin);
} | 0 |
private boolean createFileList() {
Enumeration<String> list = listOfFileNames.elements();
while (list.hasMoreElements()) {
// the list is in Object type, typecasting is needed
String filename = (String) list.nextElement();
InputStream inputStream = null;
try {
inputStream = new FileInputStream(filen... | 2 |
@CLNames(names ={ "-ema" })
@CLUsage("time npop m11 m12 ...")
@CLDescription("set the migration matrix at a given time. Effects propergate pastward. Note that the correct number of demes for the time must be specified")
public void addTimeMigrationMatrix(double time, int npop, String[] mat) {
if (!flagI) {
thro... | 7 |
public String getCity() {
return addressCompany.getCity();
} | 0 |
public void checkFadeVolumes() {
if (midiChannel != null)
midiChannel.resetGain();
Channel c;
Source s;
for (int x = 0; x < streamingChannels.size(); x++) {
c = streamingChannels.get(x);
if (c != null) {
s = c.attachedSource;
if (s != null)
s.checkFadeOut();
}
}
c = null;
s = null... | 4 |
public static void main(String[] args) {
try {
System.out
.println("RFIDClient: attempting to start XML-RPC Server...");
WebServer client = new WebServer(CLIENT_XML_RPC_PORT);
client.addHandler("StableXMLRPCClient", new RFIDClient());
client.start();
System.out.println("RFIDClient: started succes... | 6 |
public Object nextEntity(char ampersand) throws JSONException {
StringBuffer sb = new StringBuffer();
for (;;) {
char c = next();
if (Character.isLetterOrDigit(c) || c == '#') {
sb.append(Character.toLowerCase(c));
} else if (c == ';') {
... | 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.