text stringlengths 14 410k | label int32 0 9 |
|---|---|
protected static IntervalList[] splitIntervals(IntervalList intervals) {
IntervalList[] subIntervals = new IntervalList[2];
subIntervals[0] = new IntervalList();
subIntervals[1] = new IntervalList();
//If only one interval, split it in half
if (intervals.getIntervalCount() == 1) {
List<Interval> intList... | 9 |
private static void printMenu() {
System.out.println("What will you like to have?");
for (Integer item : menu.keySet()) {
System.out.println(" " + item + ". " + menu.get(item));
}
} | 1 |
public static void main(String args[]) {
Server myServer = new Server("mySuperGameServer");
User a = new User(myServer, "a");
User b = new User(myServer, "b");
myServer.addUser(a);
System.out.println(myServer.currentUser().hashCode());
myServer.addUser(b);
System.out.println(myServer.currentUser().hashC... | 7 |
@Override
public boolean equals(Object o) {
if (!(o instanceof Thread)) {
return false;
}
Thread t = (Thread) o;
if (!this.getHeadLine().equals(t.getHeadLine())) {
return false;
}
if (!this.getReplies().equals(t.getReplies())) {
... | 8 |
@Override
public void run() {
Game game = pacManBB.game;
int[] pills = game.getPillIndices();
int[] powerPills = game.getPowerPillIndices();
ArrayList<Integer> powerTargets = new ArrayList<Integer>();
ArrayList<Integer> targets = new ArrayList<Integer>();
for( int i=0; i < pills.length; i++ ) ... | 7 |
public static void main(final String[] args) throws Exception {
int i = 0;
int flags = ClassReader.SKIP_DEBUG;
boolean ok = true;
if (args.length < 1 || args.length > 2) {
ok = false;
}
if (ok && "-debug".equals(args[0])) {
i = 1;
flag... | 9 |
private boolean r_Step_1c() {
int v_1;
// (, line 51
// [, line 52
ket = cursor;
// or, line 52
lab0: do {
v_1 = limit - cursor;
lab1: do {
... | 8 |
@Override
protected void paintComponent(Graphics g) {
super.paintComponent(g);
Graphics2D g2d = (Graphics2D) g;
//g2d.setColor(Color.blue);
g2d.setRenderingHint(
RenderingHints.KEY_ANTIALIASING,
RenderingHints.VALUE_ANTIALIAS_ON);
g2d.setStroke(new BasicStroke(1,
BasicStroke.CAP_ROUND, BasicStrok... | 8 |
public static void main(String[] argv) throws Exception {
Class<Mapper> mhj =(Class<Mapper>) JarLoader.getClassFromJar("C:\\Temp\\1/0.jar", "temperaturetest.Mapper1");
Logger.log("SDssd");
/*Socket sock = new Socket("127.0.0.1", 23456);
byte[] mybytearray = new byte[1024];
InputStream is = sock.ge... | 7 |
private void setUpTechnicalsGraphData() {
TreeMap<Float, float[]> technicals = Database.TECHNICAL_PRICE_DATA
.get(Database.dbSet.get(id));
TreeMap<Float, Point2D.Float> marketToStockPairing = pairPriceWithMarketByDate(
technicals, 6);
TreeMap<Float, Float> stockPrices = new TreeMap<Float, Float>();
Tre... | 1 |
public static String encodeInventory(Inventory inventory) {
YamlConfiguration configuration = new YamlConfiguration();
configuration.set("Title", StringUtil.limitCharacters(inventory.getTitle(), 32));
configuration.set("Size", inventory.getSize());
for (int a = 0; a < inventory.getSize()... | 2 |
public String countAndSay(int n) {
StringBuilder res = new StringBuilder("1");
for (int i = 2; i <= n; ++i) {
StringBuilder tmp = new StringBuilder();
int j = 0;
while (j < res.length()) {
int cnt = 1;
while (j + cnt < res.length() && res.charAt(j) == res.charAt(j + cnt)) {
++cn... | 4 |
private List<String> completeResultWithCharactersTill(final String aCharacter) {
List<String> result = new LinkedList<String>();
for (final String anAlphabet : alphabet) {
if (!anAlphabet.equals(aCharacter)) {
if (result.size() >= 1) {
result = addCharacte... | 3 |
private boolean isValidMineLoc(Block block){
final HashSet<Material> naturalMats = new HashSet<Material>(4);
naturalMats.add(Material.COBBLESTONE);
naturalMats.add(Material.DIRT);
naturalMats.add(Material.GRASS);
naturalMats.add(Material.GRAVEL);
naturalMats.a... | 5 |
public static void main(String[] args) throws Exception {
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
while (true) {
String a = in.readLine();
if (a == null || a.equals(""))break;
String arr[] = a.trim().split(" +");
if (Integer.parseInt(arr[0]) > 1) {
TreeSet<Integer> ... | 9 |
void updateMouse(MouseEvent e,boolean pressed, boolean released,
boolean inside) {
mousepos = e.getPoint();
mousepos.x = (int)(mousepos.x/el.x_scale_fac);
mousepos.y = (int)(mousepos.y/el.y_scale_fac);
mouseinside=inside;
int button=0;
if ((e.getModifiers()&InputEvent.BUTTON1_MASK)!=0) button=1;
if ((e.g... | 9 |
@Override
public void endElement(String uri, String localName, String qName) {
// we need to find out if the element ending now corresponded
// to matches in some stacks
// first, get the pre number of the element that ends now:
if (openNodesPreNumbers.isEmpty()) {
// We ... | 9 |
@Test(expected = DuplicateInstanceException.class)
public void addDuplicateBookingTest() throws DuplicateInstanceException {
Student s = null;
Booking b = null;
try {
s = familyService.findStudent(3);
} catch (InstanceNotFoundException e) {
assertTrue("Student not found", false);
}
SimpleDateFormat ... | 4 |
public boolean equals(Object object)
{
try
{
MealyTransition t = (MealyTransition) object;
return super.equals(t) && getLabel().equals(t.getLabel()) && getOutput().equals(t.getOutput());
}
catch(ClassCastException e)
{
return false;
... | 3 |
public String getImageName() {
String name = "";
if (itemType != null) {
name = itemType.getImageName();
}
return name;
} | 1 |
private TreeNode successor(TreeNode predecessorNode) {
TreeNode successorNode = null;
if (predecessorNode.left != null) {
successorNode = predecessorNode.left;
while (successorNode.right != null) {
successorNode = successorNode.right;
}
} else... | 4 |
@Override
public void onConnect()
{
String channel = config.get("Chan0");
int i = 0;
while(channel != null)
{
this.joinChannel(channel);
channel = config.get("Chan" + ++i);
}
components = new LinkedList<ComponentInterface>();
i = 0;... | 3 |
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
// unconfirmed wrapper?
if (!confirmed) sb.append("[Unconfirmed: ");
// add time
sb.append("Time T+").append(time).append(". ");
// internal/external?
if (threatPosition == THREAT_POSITION_INTERNAL) {
if (threatLevel == THREA... | 9 |
private void fillGroupForm(GroupObject groupObject) {
type("group_name", groupObject.getName());
type("group_header", groupObject.getHeader());
type("group_footer", groupObject.getFooter());
} | 0 |
public String generate() {
if (details)
System.out.println("Producing floors overview. It can be found in: output/"+name+"/overviews");
int dimx = MyzoGEN.DIMENSION_X * chunksX;
int dimy = MyzoGEN.DIMENSION_Y * chunksY;
NoiseMap overviewnoise = null;
try {
overviewnoise = new NoiseMap(dimx, dimy);
... | 5 |
@Override
public void update(final int delta) {
if (startLoading) {
Sounds.get();
Textures.get();
Fonts.get();
final List<Object> options = Config.loadOptions();
Sounds.get().setSoundEnabled(options.isEmpty() ? true : (Boolean) options.get(3));
Sounds.get().setMusicEnabled(options.isEmpty() ? true ... | 3 |
public void display(){
Dimension currentPanelSize; // Current size of the presentation panel.
double sizeFactor; // Factor between 800x600 grid and current panel size.
if (Debug.audio) System.out.println("AudioPlayer -> display called");
if (null != player){
currentPanelSize = Gui.getSlidePanel().getSiz... | 9 |
public void run()
{
while(true)
{
try
{
this.NFull.acquire();
this.NEmpty.release();
System.out.println("Comsommateur : " + this.counter--);
}
catch (Exception e)
{
e.printStackTrace();
}
}
} | 2 |
public void setWypoz(Boolean wypoz) {
this.wypoz = wypoz;
} | 0 |
public static void main(String[] args)
{
Logger log = LogManager.getLogger(Log4jTest.class);
log.info("info通过 class 对象来获取 logger 对象");
log.debug("debug通过 class 对象来获取 logger 对象");
log.warn("warn通过 class 对象来获取 logger 对象");
} | 0 |
public void setaField1(int aField1) {
this.aField1 = aField1;
} | 0 |
public static void main(String [] args) throws BiffException, IOException, RowsExceededException, WriteException
{
ArrayList<pinfo> paperlist = new ArrayList<pinfo>();
String title,link,abs, session, author;
Map<String, String> linkinfo = new HashMap<String,String>();
Map<String, String> absinfo = new HashMap<... | 9 |
public boolean validate() throws Exception
{
boolean result = true;
if (this.products.size() == 0)
throw new Exception("Не указаны товары");
if (this.payed.size() == 0)
throw new Exception("Не указаны платежи");
for(int i = 0; i < this.taxes.length; i++)
... | 8 |
@Override
public void printAnswer(Object answer) {
if (!(answer instanceof String)) return;
System.out.print((String)answer);
} | 1 |
public void executeOrder(Order order) {
Planet planet = order.getPlanet();
switch (order.getType()) {
case BUILD:
buildOrder(planet, false);
break;
case SPECIAL_BUILD:
buildOrder(planet, true);
break;
case MOBILIZE:
mobilizeOrder(planet, false);
break;
case SPECIAL_MOBILIZE:
mobilizeOr... | 6 |
public static Double[][] readData(String fileName) {
BufferedReader b;
Double[][] data = null;
try {
b = new BufferedReader(new FileReader(fileName));
String line;
// count number of lines
int N = 0;
while ((line = b.readLine()) != null) {
N++;
}
b.close();
// data is of the form: (us... | 6 |
public static Map<JComponent, List<JComponent>> getComponentMap(
JComponent container, boolean nested) {
HashMap<JComponent, List<JComponent>> retVal =
new HashMap<JComponent, List<JComponent>>();
for (JComponent component : getDescendantsOfType(JComponent.class,
container, ... | 3 |
public char findCircleStart() {
circularLinkedListNode p1 = head;
circularLinkedListNode p2 = head;
// find meeting point
for (int i = 0; i < nodeCount; i++) {
p1 = p1.next;
p2 = p2.next.next;
if (p1.item == p2.item)
break;
}
p1 = head;
while (p1.item != p2.item) {
p1 = p1.next;
p2 =... | 3 |
private void readDirectory() {
List<File> listfile = new ArrayList<File>();
File folder = new File(path+App.FILE_SEP);
File[] listOfFiles = folder.listFiles();
//compter les sous dossiers
for (int i = 0; i < listOfFiles.length; i++) {
if (listOfFiles[i].isDirectory()) {
listfile.add(list... | 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 fe... | 6 |
public synchronized int replaceAllByName(String name, JixelEntity entity) {
if (entity == null) {
JixelGame.getConsole().printErr(new NullPointerException("Can not set entity to null"));
return -1;
}
int count = 0;
synchronized (entityList) {
for (int i = 0; i < entityList.size(); i++) {
if (name =... | 5 |
public ArrayList<PathItem> getLines() {
return lines;
} | 0 |
public String getUsername() {
return username;
} | 0 |
private boolean messageCC(String channel, String sender, String message)
{
if (!channel.equals("#cirno_tv"))
return false;
int duplicateWordCap = 15;
String[] words = message.split(" ");
if (words.length < duplicateWordCap)
return false;
//<3 Encryp... | 9 |
public static int[] buildFingerPrint(Path path, HashFunction func, int b, int k) {
if (b <= 0 || b > 16)
throw new AssertionError("hyperLogLog : b <= 0 or b > 16");
int m = 1 << b; // m = 2^b
int[] M = new int[m]; // M initialized to 0 by default
// A little more complicated than the first version bec... | 4 |
public static VoidParameter getParam(String name) {
VoidParameter current = head;
while (current != null) {
if (name.equalsIgnoreCase(current.getName()))
return current;
if (current instanceof BoolParameter) {
if (name.length() > 2 && name.substring(0, 2).equalsIgnoreCase("no")) {
... | 6 |
public void generateWorldChunk(int posHeight){
Block block = new Block((byte) 0);
Random material = new Random();
if (posHeight==0){
for(int x=0; x<chunkBase; x++){
for(int y=0; y<chunkBase; y++){
for(int z=0; z<chunkBase; z++){
if(y==0){
this.voxel[x][y][z]=18;
}
else{
... | 9 |
private static void processJarfile(URL resource, String pkgname, ArrayList<Class<?>> classes) {
String relPath = pkgname.replace('.', '/');
String resPath = resource.getPath().replace("%20", " ");
String jarPath = resPath.replaceFirst("[.]jar[!].*", ".jar").replaceFirst("file:", "");
Jar... | 9 |
public void createPollingScheme(String schemeName, int interval,
String notificationMethod, String notificationHost, int port,
String readinessProperty, String readinessValue) {
Folder pollingSchemeFolder;
try {
try {
pollingSchemeFolder = (Folder) s... | 7 |
private boolean buildingPreconditions(int playerIndex) {
return (playerIndex == serverModel.getTurnTracker().getCurrentTurn() &&
(serverModel.getTurnTracker().getStatus().equals("Playing") ||
serverModel.getTurnTracker().getStatus().equals("FirstRound") ||
serverModel.getTurnTracker().getStatus().equal... | 4 |
public AvailableGroup getThisItems() {
if (Script.holdExecution())
return new AvailableGroup();
AvailableGroup ret = new AvailableGroup(icache, ecache);
if (icache == null)
ret.add(Inventory.getItems(true));
if (ecache == null) {
if (Bank.isOpen())
ret.add(Equipment.getItems());
else
ret.add... | 4 |
@Override
public String toString() {
return "file ["
+ (filename==null?"embedded":filename )+" "
+ (crc32==null?"":(", crc="+Long.toHexString(crc32.getValue())))+" "
+ (imageAttributes==null?"":imageAttributes.toString())
+"]";
} | 3 |
public static void main(String[] args) throws Exception {
// take the player number from command line and connect to the appropriate
// TCP port
playerNo = Integer.parseInt(args[0].trim());
int port = portOffset + playerNo;
Socket socket = new Socket("localhost", port);
BufferedReader in =
new BufferedRe... | 6 |
@SuppressWarnings("unchecked")
public TreeMap arbitrary(Random random, long size)
{
int length = (int) Arbitrary.random(random, 0,
Math.min(Integer.MAX_VALUE, size));
TreeMap map = new TreeMap();
for (int i = 0; i < length; ++i) {
Object... | 1 |
public static Map<String, List<String>> readWords(File f) {
Map<String, List<String>> m = new HashMap<String, List<String>>();
Scanner s = null;
try {
s = new Scanner(f);
while (s.hasNext()) {
String word = s.next();
String alpha = sortLett... | 5 |
public void addBookLanguage(BookLanguage lng) {
Connection con = null;
PreparedStatement pstmt = null;
try {
DBconnection dbCon = new DBconnection();
Class.forName(dbCon.getJDBC_DRIVER());
con = DriverManager.getConnection(dbCon.getDATABASE_URL(),
... | 4 |
public void toggleAmmo() {
speedSpinner.setEnabled(false);
piercingCheck.setEnabled(false);
distanceSpinner.setEnabled(false);
ammoDamageSpinner.setEnabled(false);
diameterSpinner.setEnabled(false);
multiCheck.setEnabled(false);
areaTextureText.setEnabled(false);
movingCheck.setEnabled(false);
duratio... | 4 |
public void keyPressed(KeyEvent keyEvent) {
if(keyEvent.getKeyCode() == KeyEvent.VK_LEFT) {
iDireccionCanasta = 1;
}
if(keyEvent.getKeyCode() == KeyEvent.VK_RIGHT) {
iDireccionCanasta = 2;
}
if(keyEvent.getKeyCode() == KeyEvent.VK_P) {
// si no... | 6 |
@Test
public void testReceive() {
try {
consumer = new AbstractMessageConsumer(mockTopic) {
};
} catch (DestinationClosedException e) {
fail("Unexpected exception on constructor");
}
assertNotNull(mockTopic.getTopicSubscriber());
try {
Message msg = new MockMessage("TestMessage");
mockTopic.ge... | 3 |
private int binarySearch(String string, ArrayList<String> array) {
int currentPos = array.size()-1 / 2;
int min = 0;
int max = array.size()-1;
// Returns the location that string will go in the array
return binarySearchTail(array, string, min, max);
} | 0 |
public static void main(String[] args)
{
/** ****************** */
try {
PlasticSettings settings = PlasticSettings.createDefault();
Options.setDefaultIconSize(new java.awt.Dimension(16, 16));
UIManager.put(Options.USE_SYSTEM_FONTS_APP_KEY, settings.... | 3 |
public void addGroup(StringTokenizer tokens) {
int tokenCount = tokens.countTokens();
String[] settings = new String[tokenCount+1];
String line = "";
for (int i = 0; i < tokenCount; i++) {
settings[i] = tokens.nextToken();
line += " " + settings[i];
}
... | 1 |
@Override
public void flush(Map<TermsHashConsumerPerThread,Collection<TermsHashConsumerPerField>> threadsAndFields, final SegmentWriteState state) throws IOException {
// Gather all FieldData's that have postings, across all
// ThreadStates
List<FreqProxTermsWriterPerField> allFields = new ArrayList<Freq... | 9 |
public java.lang.Float getByMethod(int method, boolean repeat) {
elapsed = ((double) System.currentTimeMillis() - timeStart) / timeAnim;
if (!repeat && elapsed > 1.0)
elapsed = 1.0;
switch (method) {
case -METHOD_LINE://line
elapsed = elapsed * 2 - 1;
... | 9 |
@Override
public boolean equals(Object obj){
if (obj == null)
return false;
if (obj == this)
return true;
if (!(obj instanceof User))
return false;
User user = (User)obj;
return this.u_id.equals(user.u_id);
} | 3 |
public void reset()
{
if(!dead)
{
done = false;
moved = false;
attacking = false;
}
updateActions();
} | 1 |
public int getSeqNum(){
return this.seqNum;
} | 0 |
@Override
public String toString() {
return "Offrir{" + "vis_matricule=" + vis_matricule + ", rap_num=" + rap_num + ", med_depotLegal=" + med_depotLegal + ", quantite=" + quantite + '}';
} | 0 |
public static void main(String[] args) throws Exception
{
List<FastaSequence> list = FastaSequence.readFastaFile(ConfigReader.getCREOrthologsDir() + File.separator +
"contig_7000000220927531_postAlign.txt");
BufferedWriter writer = new BufferedWriter(new FileWriter(new File(ConfigReader.getCREOrthologsDir... | 9 |
public static void main(String[] args) {
if(args.length > 0) {
portLocal = Integer.parseInt(args[0]);
System.out.println("TAILLE : "+args.length+";ARGS:"+args[0]/*+";ARGS:"+args[1]*/);
controleur = new Controleur();
service = new InterfaceService(portLocal);
lignes = new HashMap<String, Ligne>... | 1 |
public HelloWorldSoftware() throws Exception {
frame=new JFrame("Hello world");
frame.setSize(800, 600);
frame.setVisible(true);
frame.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);
world = new World();
world.setAmbientLight(0, 255, 0);
TextureManager.getInstance().addTexture("box", new Texture("b... | 0 |
public static Bitmap loadBitmapFromWeb(String location) throws Exception{
final URL url = new URL(location);
final HttpURLConnection connection = (HttpURLConnection) url
.openConnection();
connection.setRequestProperty(
"User-Agent",
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_5) AppleWebKit/537.31 (... | 3 |
public void propertyChange(PropertyChangeEvent e) {
String prop = e.getPropertyName();
if (isVisible()
&& (e.getSource() == optionPane)
&& (JOptionPane.VALUE_PROPERTY.equals(prop) || JOptionPane.INPUT_VALUE_PROPERTY
.equals(prop))) {
Object value = optionPane.getValue();
if (value == JOptionPa... | 9 |
final boolean method1413(Class258_Sub1 class258_sub1,
Class258_Sub1 class258_sub1_2_, int i, float f) {
try {
anInt2517++;
if (!method1414(35632))
return false;
Class206 class206 = ((OpenGlToolkit) aHa_Sub2_2511).aClass206_7778;
int i_3_ = 30 % ((-55 - i) / 59);
Class348_Sub42_Sub2 c... | 6 |
@Override
public List<Usuario> filterGrid(String filter) {
List<Usuario> lista = service.findAll();
if("".equals(filter) || filter.equals("*")){
return lista;
}
List<Usuario> filtro = new ArrayList<Usuario>();
for (Usuario user : lista) ... | 4 |
void parse(InputStream in) throws IOException {
while (!endOfFile) {
n = in.read(buffer, 0, bufSize);
if (n < 0) {
endOfFile = true;
n = 1;
buffer[0] = '\n';
}
for (int i = 0; i < n; ... | 8 |
private boolean collision() {
for(Platform p : level.platforms) {
if(p != null) {
int left = x + 11;
int right = x + 21;
if(right >= p.x && left <= p.x + p.getPixelWidth()) {
if(y >= p.y-3 && y <= p.y + p.getPixelHeight()) {
y = p.y;
return true;
}
}
}
}
... | 6 |
public void startWork ()
{
try
{
boolean hashFound = false;
String inputLine;
Scanner netScanner;
String serverString;
String instType;
//Open socket to server
toServer = new Socket (hostAddr, portNumber);
//Set up output from socket
socketOutput = new PrintWriter(toServer.getOutpu... | 6 |
public static final String getFileContents(String file) throws Exception
{
InputStream is = null;
if (!GoCoin.hasValue(file)) { throw new FileNotFoundException("File must be passed!"); }
try
{
File f = new File(file);
if (!f.exists()) { throw new FileNotFoundException("File ["+file+"] not ... | 6 |
@Override
public void mouseEntered(MouseEvent e) {} | 0 |
public void setScheiding(GregorianCalendar datum) {
if (scheiding == null && huwelijk != null && datum.after(huwelijk)) {
scheiding = datum;
}
} | 3 |
public WorkTable(String firstName) throws SQLException{
db = new DBAccess();
String type = "";
boolean musician = false;
boolean actor = false;
Statement statement = db.connection.createStatement();
ResultSet result = null;
works = new ArrayList<String>();
ResultSet typeOfPerson = statement.executeQu... | 6 |
public static boolean isPrimeTrunc(int k, ArrayList<Integer> arr) {
if (k / 10 == 0)
return false;
for (int i = 1; k / i > 0; i *= 10) {
if (!(Collections.binarySearch(arr, k / i) >= 0)) {
return false;
}
}
for (int i = 10; k / i > 0; i *= 10) {
if (!(Collections.binarySearch(arr, k % i) >= 0)) ... | 5 |
public void testMinus_int() {
Seconds test2 = Seconds.seconds(2);
Seconds result = test2.minus(3);
assertEquals(2, test2.getSeconds());
assertEquals(-1, result.getSeconds());
assertEquals(1, Seconds.ONE.minus(0).getSeconds());
try {
Seconds.M... | 1 |
public void setOptions(String[] options) throws Exception {
// Pruning options
m_unpruned = Utils.getFlag('U', options);
m_reducedErrorPruning = Utils.getFlag('R', options);
m_binarySplits = Utils.getFlag('B', options);
m_useMDLcorrection = !Utils.getFlag('J', options);
String confidenceString ... | 8 |
public boolean intersects(S2Cell cell, S2Point[] vertices) {
// Return true if this cap intersects any point of 'cell' excluding its
// vertices (which are assumed to already have been checked).
// If the cap is a hemisphere or larger, the cell and the complement of the
// cap are both convex. Therefor... | 8 |
private static void assertThatParamsCanBeBound(String template, Object[] parameters) {
int nbTokens = countTokens(template);
if (nbTokens != parameters.length) {
String message = "绑定参数到查询语句[" + template + "]失败:参数个数[" + parameters.length + "]和Shell中Token个数[" + nbTokens
+ "]不匹配";
throw new IllegalMongoShe... | 1 |
public static void repaintWhileDealing(CardPanel panel) {
panel.repaint();
try {
Thread.sleep(50);
} catch (InterruptedException e) {
e.printStackTrace();
}
} | 1 |
public boolean addCoef(String name, BigDecimal coefficient) {
if (name != null && !name.equals("") && !this.existInList(name) && coefficient != BigDecimal.ZERO && this.coefficientList != null) {
Unit unit = new Unit(name, coefficient, false);
this.coefficientList.add(unit);
u... | 5 |
public void processGedcomFile(GedcomReader reader) throws IOException,
GedcomReaderException, PropertyException {
for (GedcomRecord record = reader.nextRecord(); record != null; record = reader
.nextRecord()) {
if (record.getLevel() != 0)
throw new GedcomReaderException("Level is not zero in " + record,... | 8 |
protected void recalcsz(Coord max) {
sz = max.add(wbox.bsz().add(mrgn.mul(2)).add(tlo).add(rbo)).add(-1, -1);
wsz = sz.sub(tlo).sub(rbo);
if (folded)
wsz.y = wsz.y / 2;
asz = wsz.sub(wbox.bl.sz()).sub(wbox.br.sz()).sub(mrgn.mul(2));
} | 1 |
public ViewController(Frame frame, GameServerSocket socket) {
server = socket;
view = frame;
initEvents();
} | 0 |
private boolean isChunkOpDone(int x, int z, int op)
{
if (x < 0 || x >= xSize)
return true;
if (z < 0 || z >= zSize)
return true;
if (savedChunks[x][z])
return true;
if (chunks[x][z] == null)
return false;
return chunks[x][z].o... | 6 |
@Override public void sign(String apikey) {
this.apikey = apikey;
} | 0 |
static void translateXML() throws Exception {
BufferedReader jin = new BufferedReader(new FileReader("37.xml"));
FileWriter citeSeer = new FileWriter("citeSeer.txt");
FileWriter assistant = new FileWriter("assistant.txt");
String line, lineMark, lineInfo, lines = "";
int count = ... | 5 |
public String[] build(int[] values) {
int a[] = new int[10];
Arrays.fill(a,0);
int n = values.length;
for(int i = 0;i < n;i++){
a[values[i]]++;
}
int f = 0;
for(int i = 0;i < 10;i++){
if(a[i] > f)f = a[i];
}
String ans[] = new String[f + 1];
Arrays.fill(ans,"");
for(int i = f;i > 0 ;i--){
... | 6 |
private void startServer_adbMenuActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_startServer_adbMenuActionPerformed
try {
adbController.startServer();
} catch (IOException ex) {
logger.log(Level.ERROR, "An error occurred while starting the ADB server!");
... | 1 |
public void analyze(String param) {
StringTokenizer st = new StringTokenizer(param);
// System.err.println("in analyze " + param);
if (st.countTokens() < 2) return;
String first_word = st.nextToken().toLowerCase();
// System.err.println("in analyze(first_word) " + first_word);
if (first_word.equals("a")) {... | 4 |
private void acao166(Token token) throws SemanticError {
if (tipoFator != Tipo.INTEIRO && tipoFator != Tipo.REAL) {
throw new SemanticError("Operador unário exige operando numérico",
token.getPosition());
}
if(!indexandoVetorParametro)
parametroAtualPodeSerReferencia = false;
} | 3 |
public String getCurSongname() {
if (mp3list != null) {
return mp3list.getSong().getName();
}
return "nichts";
} | 1 |
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.