text stringlengths 14 410k | label int32 0 9 |
|---|---|
public void testConstructor_ObjectStringEx5() throws Throwable {
try {
new LocalDate("T10:20:30.040+14:00");
fail();
} catch (IllegalArgumentException ex) {}
} | 1 |
public void setPouvoirsPris(List<Class<? extends Pouvoir>> pouvoirsPris) {
this.pouvoirsPris = pouvoirsPris;
} | 1 |
public void handleCommand(boolean admin, String command, String sender) {
try {
String[] cmd = command.split(" ");
String commandName = cmd[0];
StringBuilder commandContent = new StringBuilder();
for (int i = 1; i < cmd.length; ++i) {
commandConten... | 4 |
public ImageData addSnippedImage(Rectangle rect){
ImageData.resetId(getSheetData().getAllImageData());
boolean autoColl = Boolean.parseBoolean(Preferences.PREFS.get("coll_auto"));
boolean autoHull = Boolean.parseBoolean(Preferences.PREFS.get("hull_auto"));
boolean autoAnchor = Boolean.parseBoolean(Preferences.P... | 8 |
@BeforeClass
public static void setUpBeforeClass() throws Exception {
sm = new StockManager();
phoneDescription = new HashMap<String, Object>();
phoneDescription.put("name", "Cink Five");
phoneDescription.put("brandName", "Wiko");
phoneDescription.put("screenSize", 5);
phoneDescription.put("screenTyp... | 8 |
public static double[][] GetConfusionMatrix()
{
//row r and column c is the percentage of test images from class r that are classified as class c
//matrix[0][0] -> percentage of test images from class IsFace that are classified as class IsFace
//matrix[0][1] -> percentage of test images from class IsFace that ar... | 4 |
public void showConnections()
{
System.out.println("City to City Connections");
System.out.println("\nCity\tCity\tDistance");
for(int index = 0; index < 17; index++)
{
System.out.println(connections[index].getFirstElement()+"\t"+
connections[index].getS... | 1 |
private String[] loadConfig() {
String[] defaults = new String[] {
"ip=localhost", "port=9190", "heartbeat=1000", "name=UNSET", "pass=UNSET", "debug=false"
};
String[] data = new String[defaults.length];
try {
File folder = getDataFolder();
if(!folder.exists()) {
... | 7 |
public static void main(String[] args) {
Map<Integer, Employee> empMap =new TreeMap<Integer, Employee>();
empMap.put(2, new Employee(101, "Atul", 01));
empMap.put(5, new Employee(104, "Ram", 03));
empMap.put(1, new Employee(102, "John", 02));
empMap.put(3, new Employee(105, "Smith", 02));
empMap.put(4, new... | 1 |
protected void updateTraits(int numUpdates) {
final Batch <Trait> allTraits = new Batch <Trait> (levels.size()) ;
for (Trait t : levels.keySet()) allTraits.add(t) ;
for (Trait t : allTraits) if (t.type != CONDITION) {
final Level level = levels.get(t) ;
if (level.bonus != 0) level.bonus = 0 ;
... | 6 |
private boolean hasPlayersPositionAnActiveLightGrenade(Player player) {
for (Element element : getGrid().getElementsOnPosition(getGrid().getElementPosition(player)))
if (element instanceof LightGrenade && ((LightGrenade) element).isActive())
return true;
return false;
} | 3 |
public static Component smartRequestFocus(Component component) {
if (requestFocus(component))
return component;
if (component instanceof JComponent) {
FocusTraversalPolicy policy = ((JComponent) component).getFocusTraversalPolicy();
if (policy != null) {
Component focusComponent = po... | 8 |
@Override
public String stateString(Rider R)
{
switch(rideBasis)
{
case Rideable.RIDEABLE_AIR:
case Rideable.RIDEABLE_LAND:
case Rideable.RIDEABLE_WAGON:
case Rideable.RIDEABLE_WATER:
return "riding in";
case Rideable.RIDEABLE_ENTERIN:
return "in";
case Rideable.RIDEABLE_SIT:
return "on";
c... | 9 |
private static void doArchiveTest()
{
System.out.print("Testing archive command ");
try
{
// create an MVD from the Renaissance folder
File folder = new File( TEST_DATA+File.separator+RENAISSANCE );
String mvdName = createTestMVD( folder );
MVD mvd = MVDFile.internalise( new File(mvdName), null );
... | 8 |
public boolean isCompatible(ValueType type) {
if (this == type || this == NONE || this == VOID)
return true;
if (this.isNumeric() && type.isNumeric())
return true;
return false;
} | 5 |
@Override
public boolean equals(Object obj) {
if (this == obj) return true;
if (obj == null) return false;
if (getClass() != obj.getClass()) return false;
PersistentSet<?> other = (PersistentSet<?>) obj;
if (set == null) {
if (other.set != null)
return false;
} else if (!set.equals(other.set))
re... | 8 |
public boolean isDifferent(UNote n)
{
if(note!=n.note) return true;
if(duration!=n.duration) return true;
if(channel!=n.channel) return true;
if(velocity!=n.velocity) return true;
if(liveness!=n.liveness) return true;
if(mute!=n.mute) return true;
if(pan!=n.pan) return true;
... | 9 |
public void eliminate(){
int []a = new int[10];
int maxNum = 10;
for (int i = 0; i < a.length; i++) {
a[i] = (int) (Math.random()*maxNum);
System.out.print(a[i]+"\t");
}
System.out.println("");
int counter = 0;
for (int j = 0; j < maxNum; j++) {
for (int i = 0; i < a.length; i++) {
if(a[i]... | 9 |
private static Items sequentialSearch(ItemList lm,
String target, Items[] items) {
Items retVal = null;
System.out.println("Searching for " + target + ".");
int counter = 0;
//Items currentItem = new Items();
Items currentItem = lm.g... | 4 |
public void setDistance( TextDistanceStrategy distance ) {
if( distance == null ) {
throw new IllegalArgumentException( "distance must not be null" );
}
this.distance = distance;
regraph();
} | 1 |
private void processMethods0(int mod, CtClass clazz,
CtMethod m, int identifier, boolean dontSearch)
throws CannotCompileException, NotFoundException
{
CtMethod body;
String name = m.getName();
if (isExcluded(name)) // internally-used method inherited
... | 6 |
public static void extractJAR(LauncherAPI api, GameFile source, File file,
File dest, int min, int max) throws Exception
{
JarFile jar = null;
try
{
jar = new JarFile(file);
}
catch (final IOException e)
{
e.printStackTrace();
... | 9 |
public synchronized int SelctArticleID(String url) {
int id = 0;
try {
ResultSet re = tags_ste.executeQuery("SELECT * from zhangyu_sca.article WHERE (url = '" + url + "');");
re.next();
id = re.getInt("id");
} catch (SQLException e) {
e.printStackT... | 1 |
@Override
public UserModel getUser(String email) throws WebshopAppException {
if (isValidEmail(email, "GET_USER")) {
try (Connection conn = getConnection()) {
String sql = "SELECT * FROM users WHERE email = ?";
try (PreparedStatement pstmt = conn.prepareStatement(sql)) {
setString(pstmt, 1, email)... | 3 |
protected void closeall(){
JInternalFrame [] x = desktop.getAllFrames();
for(int i=0 ; i<x.length ; i++){
x[i].setVisible(false);
}
} | 1 |
public CtrlPraticiens(VuePraticiens vueCR, VueAbstrait vueA) {
super(vueA);
this.vue = vueCR;
this.vue.setCtrl(this);
// Gérer la persistance
em = EntityManagerFactorySingleton.getInstance().createEntityManager();
em.getTransaction().begin();
//préparation des c... | 0 |
public static void schoolEducationalDetails(BufferedReader inp) throws Exception,IOException
{
@SuppressWarnings("unused")
SchoolEducationalBean schoolEducationalBean = new SchoolEducationalBean();
QualificationTbl qualificationTbl = new QualificationTbl();
LocationTbl locationTbl = new LocationTbl();
In... | 3 |
public void construct2DMatrixFromStringSet(int currentRow,int startIndex,int numRows,int numColumns,List<String> rawData){
String sCurrentLine="";
String _convertedPattern="";
int trackNumberOfRows = 0;
int sIndex = 0;
_pattern = new String[numRows];
while(true){
... | 4 |
* @return Whether the specified outline refers to this outline or a proxy of it.
*/
public boolean isSelfOrProxy(Outline outline) {
Outline self = getRealOutline();
if (outline == self) {
return true;
}
for (OutlineProxy proxy : self.mProxies) {
if (outline == proxy) {
return true;
}
}
retur... | 3 |
public static String getName(int difficulty, int i) {
if (instance == null) {
return null;
}
switch (difficulty) {
case Grid.DIFFICULTY_EASY: return instance.easyName[i];
case Grid.DIFFICULTY_MEDIUM: return instance.mediumName[i];
case Grid.DIFFICU... | 5 |
public void setHasRealUse(final Block block, final boolean flag) {
final int blockIndex = cfg.preOrderIndex(block);
hasRealUse[blockIndex] = flag;
if (SSAPRE.DEBUG) {
System.out.println(this);
}
} | 1 |
public void testConstructor_invalidObject() throws Throwable {
try {
new DateMidnight(new Object());
fail();
} catch (IllegalArgumentException ex) {}
} | 1 |
protected Boolean tryCheckHLine5(boolean remove) {
for (int i = 0; i < 6; i++) {
for (int j = 0; j < 6; j++) {
//trace(i, j)
int count = (gemArray[i][j]);
if (i + 4 <= 5) {
if (count == gemArray[i + 1][j] && count == gemArray[i + 2]... | 8 |
public String ToString()
{
StringBuilder sb = new StringBuilder();
for (int i = 0; i < 4; i++)
for (int j = 0; j < 4; j++)
sb.append("[" + matrix[i][j] + "]");
return sb.toString();
} | 2 |
public void closeDoor(String name, InternalDoor door) {
Avatar a = null;
for(Avatar b: avatars){
if(b.getName().equals(name)){
a = b;
}
}
if(a!= null){
String locName = a.getLocationName();
String doorName = door.getName();
Location l = locations.get(locName);
for(GameObject g: l.getAllObj... | 5 |
public static String getAppName(final String line) {
if ((line.contains(" in ") && line.indexOf(" in ") < 20)
|| (line.contains(" out ") && line.indexOf(" out ") < 20)) {
StringTokenizer st = new StringTokenizer(line);
String temp;
while (st.hasMoreElements())... | 7 |
private boolean currentBlockCounst(boolean nextToken,boolean showError){
boolean result = false;
if(currentTokenEquals(nextTokenTRUE, "const")){
boolean error = false;
//Пока не встретим вар или бегин или ошибку
while(!currentTokenEquals("begin")&&!currentTokenEquals... | 9 |
static public Color getColorForState( final DataState dataState) {
if(dataState == DataState.NO_DATA) {
return Color.green;
}
else if(dataState == DataState.NO_SOURCE) {
return Color.orange;
}
else if(dataState == DataState.NO_RIGHTS) {
return Color.red;
}
else if(dataState == DataState.POSSIBLE_... | 9 |
@Test
public void getMaxDiagonal1Product() {
String expected = "[1, 0][0, 1] [1, 1][0, 2] [2, 0][1, 1] [2, 1][1, 2] ";
int numbers = 2;
String actual = "";
for (int x = numbers - 1; x < DATA.length; x++) {
for (int y = 0; y + numbers <= DATA.length; y++) {
... | 3 |
@Override
public TextModifier getTextModifier() {
TextModifier modifier = new TextModifier();
if(textColor != null) {
modifier.addModifier(TextModValue.COLOR, textColor);
}
return modifier;
} | 1 |
private void changeEndDateAndAmount(){
System.out.println("there");
Membership membership= new Membership();
if(jComboBox1.getSelectedObjects()!=null)
membership = (Membership)jComboBox1.getSelectedObjects()[0];
boolean validStartDate= false;
int year=0,month... | 9 |
protected void whenClicked() {
if (! showScroll) return ;
final float mX = myHUD.mouseX(), mY = myHUD.mouseY() ;
if (grabArea.contains(mX, mY)) {
initScrollPos = scrollPos ;
}
else {
initScrollPos = -1 ;
final float inc = Math.max(
MIN_SCROLL_DIST / (mapArea.ydim() - ydim()... | 6 |
private void repaintCards()
{
cardsPanel.removeAll();
for (int i = 0; i < game.getTurnCards().size(); i++)
cardsPanel.add(new GameCardComponent(game.getTurnCards().get(i)));
} | 1 |
public OpenGLTexture getCharacter(char character) {
for(int line = 0; line < map.length; line++){
String list = map[line];
for(int i = 0; i < list.length(); i++){
char c = list.charAt(i);
if(c == character){
return sheet.getSprite(... | 3 |
@Override
public boolean equals(Object object) {
// TODO: Warning - this method won't work in the case the id fields are not set
if (!(object instanceof User)) {
return false;
}
User other = (User) object;
if ((this.id == null && other.id != null) || (this.id != n... | 5 |
private void copyHeadersToWebBrowser(final HttpURLConnection con, final OutputStream outputToWebBrowser) throws IOException
{
int i=0;
while (true)
{
String value = con.getHeaderField(i);
if (value == null)
{
break; // End of headers
}
String name = con.getHeaderFieldKey(i);
i++;
i... | 7 |
public static int code_init()
{
int i;
/* allocate */
code_map = new code_info[(int)__code_max];//(struct code_info*)malloc( __code_max * sizeof(struct code_info) );
for(int k=0; k< code_map.length; k++) code_map[k]=new code_info();
if (code_map==null)
return -1;
cod... | 8 |
private static List<File> getDirFiles(File srcDir) {
List<File> files = Lists.newArrayList();
if (srcDir.exists() && srcDir.isDirectory()) {
//js文件
File[] filesInSrcDir = srcDir.listFiles((FileFilter) new SuffixFileFilter(".js"));
for (File file : filesInSrcDir) {
files.add(file);
... | 4 |
public void display()
{
System.out.println("Source \n");
for (int i = 0; i < dim; i++) {
for (int j = 0; j < dim; j++) {
System.out.print(source[i][j] + " ");
}
System.out.println();
}
System.out.println("result \n");
for (... | 4 |
private boolean hasDifferentSign(double a, double b){
if((a<0&&b<0) || (a>0&&b>0)){
return false;
}
return true;
} | 4 |
@Override
public void mouseClick(int X, int Y) {
if(this.getMouseListener() != null)
{
this.getMouseListener().MouseClick(this);
}
} | 1 |
private String[] getColumnsNames(String tabla) {
String[] columns = new String[getColumns(tabla)];
String query = "SELECT column_name FROM information_schema.columns WHERE table_name='" + tabla + "' AND table_schema='" + vg.baseDeDatos + "' GROUP BY column_name ORDER BY column_default";
try {
... | 2 |
public static void printmenuConsole() {
Connection c = null;
Statement stmt = null;
try {
Class.forName("org.sqlite.JDBC");
c = DriverManager.getConnection("jdbc:sqlite:Restuarant.db");
c.setAutoCommit(false);
System.out.println("Opened database successfully");
stmt = c.createStatement();
Result... | 2 |
@Override
public boolean onCommand(CommandSender sender, Command command,
String label, String[] args)
{
if (!(sender instanceof Player))
{
sender.sendMessage("Commands are designed to be run by players only.");
return true;
}
Player player = (... | 8 |
public LimitSwitchedMotor(SpeedController controller,Trigger top,boolean topOnValue,
Trigger bottom,boolean bottomOnValue) {
_controller = controller;
_top = top;
_bottom = bottom;
_bgThread.schedule(_bgTask, 0, (long)(DEFAULT_PERI... | 0 |
public int getArea(){
return area;
} | 0 |
public void setFecha(Date fecha) {
this.fecha = fecha;
} | 0 |
public static int countPath3(int m, int n) {
if (m < 0 || n < 0) {
return 0;
}
if (m == 0 && n == 0) {
return 1;
}
if (m == 0 && n != 0) {
return 1;
}
if (n == 0 && m != 0) {
return 1;
}
return countPath3(m - 1, n) + countPath3(m, n - 1);
} | 8 |
public static void main(String[] args) throws IOException,
ClassNotFoundException {
allDirRecords = new ArrayList<DirRecord>();
try {
ServerSocket serverSocket = new ServerSocket(portNumber);
Socket clientSocket = serverSocket.accept();
int x = 0;
for (x = 0; x < 8; x++) {
clientSocket = serv... | 2 |
@Override
public boolean supportsDocumentAttributes() {return true;} | 0 |
ScriptSegment consumeBuffer(String pBuffer) {
//Index of the closest escape character
int lClosestEscapeIdx = Integer.MAX_VALUE;
EscapeDelimiter lClosestEscapedDelimiter = null;
//Index of the closest statement delimiter
int lClosestDelimiterIndex = Integer.MAX_VALUE;
//Loop t... | 9 |
public String position() {
if (this.x == 0 && this.y == 0) {
return "Origin";
} else if (this.x > 0 && this.y > 0) {
return "First Quadrant";
} else if (this.x < 0 && this.y > 0) {
return "Second Quadrant";
} else if (this.x < 0 && this.y < 0) {
return "Third Quadrant";
} else
return "Fourth Qu... | 8 |
public static void deleteUsers(long[] userids) throws MoodleRestUserException, UnsupportedEncodingException, MoodleRestException {
String functionCall=MoodleCallRestWebService.isLegacy()?MoodleServices.MOODLE_USER_DELETE_USERS:MoodleServices.CORE_USER_DELETE_USERS;
try {
StringBuilder data=n... | 5 |
* @param onlysupersP
* @param MV_returnarray
* @return Cons
*/
public static Cons findDirectSupersAndSubs(Description self, boolean onlysupersP, Object [] MV_returnarray) {
Logic.finalizeObjects();
if (self == null) {
{ Cons _return_temp = Stella.NIL;
MV_returnarray[0] = Stella.NIL;
... | 9 |
@Override
public void mousePressed(MouseEvent e) {
super.mousePressed(e);
if (Game.currentGame.placedStruct) return;
if (Game.currentGame.state == 0 && Game.world.selectedEntity != null && Game.world.selectedEntity instanceof Struct) if (((Struct) Game.world.selectedEntity).guiPoint != null) Game.world.sel... | 5 |
@SuppressWarnings("deprecation")
private static long getDelayFromNow() {
Date nowD = new Date();
Long now = nowD.getTime();
Long start = new Date(nowD.getYear(), nowD.getMonth(), nowD.getDate()).getTime() + Notification.SCHEDULE_DELAY;
long diff = now - start;
return Notification.SCHEDULE_PERIOD - (diff % No... | 0 |
public void run() {
try {
sleep(10000); // 10s until work starts.
while (true) {
System.out.println(theBuffer.getLine());
}
}
catch (Exception e) {/* Let thread terminate. */};
} // run | 2 |
@SuppressWarnings("deprecation")
@Override
public boolean b(){
Entity ep = null;
String[] s = this.entitycreature.getCustomName().split("");
if((CraftPlayer)Bukkit.getServer().getPlayer(s[0]) != null){
ep = ((CraftPlayer)Bukkit.getServer().getPlayer(s[0])).getHandle();
}
if(ep == null){
return false;
... | 5 |
private static void gestionarPrecio( Tienda tienda)
{
boolean salir;
Integer idMusica;
float precio;
do
{
try
{
System.out.print( "Introduce el Id del producto msica: ");
idMusica = Integer.parseInt( scanner.nextLine());
System.out.println( "El precio actual de este producto es: " + tien... | 2 |
public Boolean InRoom()
{
if (this.CurrentRoom == null)
{
return false;
}
if (this.CurrentRoom.ID == 0)
{
return false;
}
return true;
} | 2 |
public Boom(int x, int y){
this.x = x;
this.y = y;
if(booms.size()<3){
booms.add(this);
final Rectangle r = new Rectangle();
r.setBounds(x,y,width,height);
final Boom b = this;
new Thread(){
public void run(){
try{
while(alive){
Thread.sleep(10);
if(r.intersects(PlayerS... | 7 |
public static void main(String args[]) {
Random rand = new Random();
Cycle[] cyclesArray = {Bicycle.factory.getCycle(), Tricycle.factory.getCycle(),
Unicycle.factory.getCycle()};
for (int i=0; i<5; i++) {
cyclesArray[rand.nextInt(3)].ride();
}
} | 1 |
private void jbStartGameKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jbStartGameKeyPressed
if (evt.getKeyCode() == KeyEvent.VK_G) {
jbStartGameActionPerformed(null);
} else if (evt.getKeyCode() == KeyEvent.VK_H) {
jbHowToPlayActionPerformed(null);
} else if... | 3 |
private static void method377(int ai[], int i, int j, int l, int i1)
{
int k;//was parameter
if(aBoolean1462)
{
if(i1 > DrawingArea.centerX)
i1 = DrawingArea.centerX;
if(l < 0)
l = 0;
}
if(l >= i1)
return;
i += l;
k = i1 - l >> 2;
if(anInt1465 == 0)
{
while(--k >= 0)
{
ai[... | 9 |
private boolean IremoveResourceNode(String resource_id)
{
boolean nodeRemoved = false;
OrientGraph graph = null;
try
{
//String pathname = getPathname(region,agent,plugin);
String node_id = getResourceNodeId(resource_id);
if(node_id == null)
... | 7 |
public void addTag(StatusTag tag) {
if (this.tags == null) {
this.tags = new ArrayList<StatusTag>();
this.tags.add(tag);
} else {
this.tags.add(tag);
}
} | 1 |
public void setStepOutPending(boolean b) {
stepOutPending = b;
} | 0 |
int insertKeyRehash(long val, int index, int hash, byte state) {
// compute the double hash
final int length = _set.length;
int probe = 1 + (hash % (length - 2));
final int loopIndex = index;
int firstRemoved = -1;
/**
* Look u... | 9 |
protected void installDoubleClickHandler()
{
graphControl.addMouseListener(new MouseAdapter()
{
@Override
public void mouseReleased(MouseEvent e)
{
if (isEnabled())
{
if (!e.isConsumed() && isEditEvent(e))
{
Object cell = getCellAt(e.getX(), e.getY(), false);
if (cell != nul... | 5 |
private void expandCapacity(int minimumCapacity) {
int newCapacity = (payload.length + 1) * 2;
if (newCapacity < 0) {
newCapacity = Integer.MAX_VALUE;
} else if (minimumCapacity > newCapacity) {
newCapacity = minimumCapacity;
}
byte[] newPayload = new byte[newCapacity];
try {
while (curLength > pay... | 4 |
private boolean expandKeywordsByChi(double ratio){
int wordID, aspectID, selID = -1;
double maxChi, chiV;
Iterator<Map.Entry<String, Integer>> vIt = m_vocabulary.entrySet().iterator();
while(vIt.hasNext()){//first iteration, select the maxAspect
Map.Entry<String, Integer> entry = vIt.next();
wordID = entr... | 9 |
protected void setBaud(int baud) {
this.baud = baud;
try {
if (baud == 9600)
p.writeBytes(BAUD9600);
else if (baud == 57600)
p.writeBytes(BAUD57600);
else if (baud == 1200)
p.writeBytes(BAUD1200);
else if (baud == 19200)
p.writeBytes(BAUD19200);
else if (baud == 115200)
p.writeByt... | 7 |
private static void getPath(String line) {
int index = line.indexOf('=');
String path = line.substring(index + 1);
path = path.trim();
String key = line.substring(0, index);
key = key.trim();
File filePath = new File(path);
if (filePath.isAbsolute() && filePath.canRead()
&& filePath.isDirectory()) ... | 5 |
public static EncryptableObject fromByteArray(byte[] array){
try{
ByteArrayInputStream bis = new ByteArrayInputStream(array);
ObjectInput in = null;
in = new ObjectInputStream(bis);
Object o = in.readObject();
try{
bis.close();
in.close();
}catch(Exception e){System.out.println("A Memory Le... | 2 |
private static void goKillSomething(GuildWarsInstance gwInstance) throws IOException {
// Moving to the exit portal
gwInstance.getPlayer().moveToEx(7510, 5615, 100);
// Make the movement look a little less suspicous (this can be done way better though...)
gwInstance.getRemainingCommands... | 2 |
public void addFollowing(String email, String friendEmail)
{
initConnection();
String preparedString = null;
PreparedStatement preparedQuery = null;
try
{
//Prepare Statement
preparedString = "INSERT INTO friends VALUES (?, ?);";
preparedQuery = (PreparedStatement) connection.prepareStatement(pr... | 2 |
public MainGUI() {
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setBounds(100, 100, 450, 300);
this.contentPane = new JPanel();
this.contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
setContentPane(this.contentPane);
this.contentPane.setLayout(new MigLayout("", "[424px,grow][]", "[20%:22.52%:20%][][][]... | 2 |
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 |
private Vector[] getArray(){
Vector res[] = new Vector[beings.size()];
for (int i = 0; i < beings.size(); i++){
res[i] = new Vector(beings.get(i).getX(), beings.get(i).getY(), beings.get(i));
}
return res;
} | 1 |
public static Test suite()
{
return new TestSuite( AppTest.class );
} | 0 |
public static boolean putAdminChat(Player p, String pName) {
if (!PlayerChat.plugin.AdminChat.containsKey(pName)) {
PlayerChat.plugin.CustomChat.remove(pName);
PlayerChat.plugin.ModChat.remove(pName);
PlayerChat.plugin.AdminChat.put(pName, true);
Messenger.tell(p, Msg.ADMIN_CHAT_ENTERED);
... | 2 |
@Override
public boolean write(Writer out, boolean atNewline) throws IOException {
if (!isInline() && !atNewline)
out.write(DocletConstants.NL);
String tagString = htmlTag.toString();
out.write("<");
out.write(tagString);
Iterator<HtmlAttr> iterator = attrs.keySet... | 7 |
private void propagate(){
this.latestInput = this.sum;
this.sum += this.biasWeight;
this.latestSum = this.sum;
if(this.type == NeuronType.Hidden){
this.latestoutput = this.funs.activation(this.sum);
}
else if(this.type == NeuronType.Input){
this.latestoutput = this.sum;
}
else if(this.t... | 6 |
public Polynomial pow(int e) {
Polynomial x = this;
Polynomial r = one();
while (e > 0) {
if ((e & 1) != 0) r = r.mul(x);
e >>= 1;
x = x.mul(x);
}
return r;
} | 2 |
public void updateUITables() {
String[][] table;
long time = MainWindow.getCurrentNode();
int n;
// signals
Map<Contact, Signal> signals = engine.getResults().getSignals();
table = new String[signals.size()][2];
n = 0;
for (Contact contact : signals.keySe... | 7 |
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 |
private void enterBoxData(Map<String, String> request) throws InvalidAttributeValueException {
String height = PackagePanel.getPanel().getPackageHeight();
String width = PackagePanel.getPanel().getPackageWidth();
String depth = PackagePanel.getPanel().getPackageDepth();
if ((null == height || height.length() ==... | 9 |
private String seperate()
{
String field = "";
for(int i = 1; i <= dsl.temp.length(); i++)
{
if(dsl.temp.substring(i - 1, i).equals(":") && (i + 1 < dsl.temp.length()))
{
if(dsl.temp.substring(i, i + 1).equals(":"))
{
... | 4 |
private void fillAnimationPanel() {
for (ImageLabel actObject : dragObject) {
if (actObject.getCategory().compareTo(CategoryType.BASS)==0){
actObject.setToolTipText("Bass");
}
if (actObject.getCategory().compareTo(CategoryType.BEATS)==0){
actObject.setToolTipText("Beats");
}
if (actObject.getCa... | 6 |
/* */ public void updateGroundEffects(Graphics g) {
/* 422 */ for (int i = 0; i < groundEffects.size(); i++) {
/* 423 */ Effect e = (Effect)groundEffects.get(i);
/* 424 */ e.update(17);
/* 425 */ if ((e.isElapsed()) || (!e.alive)) {
/* 426 */ groundEffects.remove(i);
/* 427 */ ... | 3 |
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.