text stringlengths 14 410k | label int32 0 9 |
|---|---|
@Test
public void testConvertingHashMapToSQLArray() {
HashMap<Integer, Integer> map = new HashMap<Integer, Integer>();
for (int i = 0; i < 10; i++) {
map.put(i + 1, i);
}
String result = null;
try {
Method method = DBHandler.class.getDeclaredMethod("c... | 6 |
public void setOxygen( int n ) {
oxygen = n;
if ( oxygen == 100 ) {
bgColor = maxColor;
} else if ( oxygen == 0 ) {
bgColor = minColor;
} else {
double p = oxygen / 100.0;
int maxRed = maxColor.getRed();
int maxGreen = maxColor.getGreen();
int maxBlue = maxColor.getBlue();
int mi... | 2 |
public static void deleteAccounts(List<Account> accountList, Accounts accounts){
if(!accountList.isEmpty()) {
ArrayList<String> failed = new ArrayList<String>();
for(Account account : accountList) {
try{
accounts.removeBusinessObject(account);
... | 6 |
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 GameState findSetToTrue(GameState state, Card card)
{
//Check the hand
for(Card c : state.getPlayer(card.getFaction()).getHand())
{
if(c.equals(card))
{
state.getPlayer(card.getFaction()).removeFromHand(c);
c.setTrue(state.getTime());
state.getPlayer(card.getFaction()).addToHand(c);
... | 8 |
public static void main(String[] args)
{
File dictionary = null;
File document = null;
String option = "";
if(args.length < 2 || args.length > 3)
{
System.out.println("Incorrect number of arguments!");
return;
}
dictionary = new File(args[0]);
if(!dictionary.isFile()){
System.out.printl... | 7 |
public static void copybitmap(osd_bitmap dest, osd_bitmap src, int flipx, int flipy, int sx, int sy,
rectangle clip, int transparency, int transparent_color)
{
rectangle myclip=new rectangle();
/* if necessary, remap the transparent color */
if (transparency == TRANSPARENCY_COLOR)
transparent_col... | 8 |
public Modele getPlateau1() {
return plateau1;
} | 0 |
public boolean write(aos.apib.OutStream out, aos.apib.Base o) {
PeerInfo__Tuple v = (PeerInfo__Tuple)o;
int i = -1;
while ((i = out.nextField(i, this)) >= 0) {
switch (i) {
case 0:
out.putInt(v.id, i, __def.id, this);
break;
case 1:
out.putBool(v.isAlive, i, __def.isAlive, this);
... | 6 |
public static void main(String[] args) {
/* Use an appropriate Look and Feel */
try {
//UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
long l = Long.parseLong("1111222222222222");
Date d = new Date(l);
Calendar c = C... | 4 |
public Dimension getPreferredSize() {
Insets i = getInsets();
return new Dimension(i.left + i.right + 2 + (image != null && text != null && textVisible ? textImageGap : 0)
+ (image != null ? image.getWidth(this) : 0)
+ (metrics != null && textVisible && te... | 9 |
protected void oneMoreStoryChar(){
if(curStory.isEmpty()&&curPStory.isEmpty()){
timer.stop();
storyDiscription="";
pStoryDiscription="";
storyCharIndex=0;
pStoryCharIndex=0;
return;
}
if(!curStory.isEmpty()){
... | 8 |
public ClassifierCustomizer() {
m_ClassifierEditor.
setBorder(BorderFactory.createTitledBorder("Classifier options"));
m_updateIncrementalClassifier.
setToolTipText("Train the classifier on "
+"each individual incoming streamed instance.");
m_updateIncrementalClassifier.
a... | 7 |
public static void main(String[] args)
{
Scanner in = new Scanner(System.in);
PrintWriter out = new PrintWriter(System.out);
int n = in.nextInt();
ArrayList<ArrayList<Integer>> a = new ArrayList<>();
for (int i = 0 ; i <= 100 ; i++){
ArrayList<Integer> b = new Arr... | 5 |
public void sinkDown(int k){int a = mH[k];
int smallest =k;
if(2*k<position && mH[smallest]>mH[2*k]){
smallest = 2*k;
}
if(2*k+1<position && mH[smallest]>mH[2*k+1]){
smallest = 2*k+1;
}
if(smallest!=k){
swap(k,smallest);
sinkDown(smallest);
}
} | 5 |
public void trimData( int maxLength )
{
if( audioData == null || maxLength == 0 )
audioData = null;
else if( audioData.length > maxLength )
{
byte[] trimmedArray = new byte[maxLength];
System.arraycopy( audioData, 0, trimmedArray, 0,
... | 3 |
@EventHandler (priority = EventPriority.NORMAL)
public void onBlockPlace(BlockPlaceEvent event){
Player p = event.getPlayer();
if(!RPSystem.permission.has(p, plugin.config.getString("block-restriction.override-permission")) && !p.isOp()){
if(plugin.itemConfig.getStringList("restricted-items").contains(event.... | 5 |
public int getS1() {
return this.state;
} | 0 |
public static void main( String[] args )
{
/*
* Given following method signature, print all the combinations of the numbers: void combinations(int maxNumber);
*/
System.out.println("01---------------------------------------");
int[] sampleArray = { 1, 2, 3,4 };
ArrayList<Object> arr ... | 7 |
public static BufferedImage getPanel(int w, int h, BufferedImage img) {
BufferedImage res = new BufferedImage(w, h, 2);
int onew = img.getWidth() / 3;
int oneh = img.getHeight() / 3;
res.getGraphics().drawImage(img.getSubimage(0, 0, onew, oneh), 0, 0, onew, oneh, null);
res.getGraphics().drawImage(img.get... | 5 |
public void leftRotate( int d) {
int i, j, k, temp;
int n = arr.length;
int gcd = gcd(d, n);
for (i = 0; i < gcd; i++) {
/* move i-th values of blocks */
temp = arr[i];
j = i;
while (true) {
k = j + d;
if (... | 4 |
@Override
public boolean execute(final CommandSender sender, final String[] split) {
if (sender instanceof Player) {
if (MonsterIRC.getHandleManager().getPermissionsHandler() != null) {
if (!MonsterIRC.getHandleManager().getPermissionsHandler()
.hasCommand... | 5 |
public void getMemento() {
Memento memento = (Memento) c.getMemento();
state = memento.getState();
System.out.println("the state is " + state + " now");
} | 0 |
@Test
public void fieldFilterIsCaseInsensitive() {
citations.add(c1);
filter.addFieldFilter("author", "kekkonen");
List<Citation> filtered = filter.getFilteredList();
assertTrue(filtered.contains(c1) && filtered.size() == 1);
} | 1 |
private synchronized void invia (String v, int a, int b) throws JMSException {
QueueConnection qc =null;
QueueSession qs =null;
///prova mess
try {
qc = qcf.createQueueConnection();
} catch (JMSException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
try... | 3 |
private static Map processJsonAsMap(JsonElement jsonElement, Class<?> mapClass, Class<?> valueClass) throws JsonException, IllegalAccessException, InstantiationException {
Map map;
if (mapClass.isInterface()) {
if (mapClass.isAssignableFrom(HashMap.class)) map = new HashMap();
el... | 7 |
public void setDescription (String d)
{
description = d;
} | 0 |
@Override
public void handleNotOpenEnded( int x, int y ) {
if( itemShown ){
parent.removeItem( line );
}
itemShown = false;
} | 1 |
void placeAllShipsRandomly(){
Random generator = new Random();
int randomRow = generator.nextInt(10);
int randomCol = generator.nextInt(10);
boolean isHorizontal = generator.nextBoolean();
// place the battle ship
Battleship battleship = new Battleship();
battlesh... | 7 |
@Override
public void erzeugeAnmeldung(AnmeldungDTO a) {
Laeufer provLaeufer = new Laeufer();
Laufveranstaltung provLaufveranstaltung = new Laufveranstaltung();
Verein provVerein = new Verein();
for(int i = 0; i < laeuferList.size(); i++) {
provLaeufer = laeuferL... | 8 |
@Override
public void handleEvent(Event event) {
if (event.getType() == EventType.END_ACTION)
endActionUpdate();
} | 1 |
public final void update(Level level, int x, int y, int z, Random rand) {
if(rand.nextInt(4) == 0) {
if(!level.isLit(x, y, z)) {
level.setTile(x, y, z, DIRT.id);
} else {
for(int var9 = 0; var9 < 4; ++var9) {
int var6 = x + rand.nextInt(3) - 1;
... | 5 |
public int run(){
sort(aInt);
return 0;
} | 0 |
@Override
public void run()
{
resetFlags();
try
{
this.in = this.socket.getInputStream();
// attempt to start a WebSocket session - failure caught in error handler
String responseString = startSession(in);
sendResponse(responseStr... | 8 |
public Builder staffRepository(Repository respository) {
// If we didn't get a repository, do nothing.
if (respository == null) {
return this;
}
if (message.staffRepositoryList == null) {
message.staffRepositoryList = new ArrayList<Reposit... | 2 |
public static void flipCell(JCellule[][] grid, int x, int y, JLabel lblGeneration, JButton btnProchaineGeneration) {
ControllerGrille.grid.flipCell(x, y);
synchroniser(grid, lblGeneration, btnProchaineGeneration);
} | 0 |
public static int findNumYouIs(String content) {
int result = 0;
if (content != null && !content.equals("")) {
ArrayList<String> sentences = findSentences(content);
for (String sentence : sentences) {
if (sentence.contains("IMHO"))
result += countNumberOfOccurence(sentence, "IMHO");
if (sentence.... | 6 |
public static String convertPatternExtractBracketedExpression( String pattern )
{
String[] s = pattern.split( "\\[" );
if( s.length > 1 )
{
pattern = "";
for( String value : s )
{
int zz = value.indexOf( "]" );
if( zz != -1 )
{
String term = "";
if( value.charAt( 0 ) == '$' )
... | 5 |
@Override
public void doChangeBrightness(int brightnessAmountNum) {
if (imageManager.getBufferedImage() == null)
return;
WritableRaster raster = imageManager.getBufferedImage().getRaster();
for (int x = 0; x < raster.getWidth(); x++) {
for (int y = 0; y < raster.getHeight(); y++) {
double[] pixel = new... | 5 |
@Override
public void copyDifferentItemsToRightList() throws RemoteException {
try {
toList.addItems(fromList.getWorkingDirectory(), fromList.getDifferentItems(toList));
} catch (IOException ex) {
throw new RuntimeException(ex);
}
} | 1 |
@Override
public boolean envelopesPoint(double xx, double yy) {
return (((a > 0 && (xx >= x && yy >= y)) && (xx <= x + a) && (yy <= y + a)) || ((a < 0 && (xx <= x && yy <= y)) && (xx >= x + a) && (yy >= y + a)));
} | 9 |
public boolean matches( Class<?> clazz )
{
return clazz.isAnnotationPresent( this.annotationType );
} | 1 |
final public UpdateCommand Update() throws ParseException {
String tableName;
List<AttributeAssign> attrAssgs = new ArrayList<AttributeAssign>();
String condition = "";
AttributeAssign attrAssg;
jj_consume_token(KW_UPDATE);
tableName = getTokenImage();
jj_consume_token(KW_SET... | 6 |
private void assertTagValue(JsonObject node, String propertyName, String value)
throws XPathExpressionException {
List<JsonElement> list = new ArrayList<>();
if (propertyName.startsWith("/")) {
findJsonElementsPath(node, propertyName.substring(1).split("/"), list);
} else {
findJsonEleme... | 9 |
@Override
protected void processClasspathResources(List<ClasspathResource> classpathResources) {
updateStatus("Searching for overlaping jars");
List<JarPair> overlapReportLines = scanner.findOverlappingJars(classpathResources, false);
for (JarPair overlapPair : overlapReportLines) {
... | 9 |
private String DDCRET_String(int retcode)
{
switch ( retcode )
{
case DDC_SUCCESS: return "DDC_SUCCESS";
case DDC_FAILURE: return "DDC_FAILURE";
case DDC_OUT_OF_MEMORY: return "DDC_OUT_OF_MEMORY";
case DDC_FILE_ERROR: return "DDC_FILE_ERROR";
case DDC_INVALID_CALL:... | 7 |
public Tool(AutomatonPane view, AutomatonDrawer drawer) {
this.view = view;
this.drawer = drawer;
automaton = drawer.getAutomaton();
} | 0 |
private int signOf(double x)
{
if (x > 0.1)
return 1;
else if (x < -0.1)
return -1;
else
return 0;
} | 2 |
public Period getDepartureTime() {
return this._departureTime;
} | 0 |
private void boutonAsgardMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_boutonAsgardMouseClicked
// TODO add your handling code here:
if (partie.getAs().isActif()) {
if (!partie.getDieuActuel().isaJouerEnAsgard()
|| ((partie.getDieuActuel().getNom().compar... | 5 |
public static boolean driveDistance(double distance) {
if (!encoderInit) {
resetEncoders();
currentDistance = 0.0;
encoderInit = true;
}
if (distance > 0) {
while (currentDistance < distance) {
currentDistance = getEncoderAverage();
return fa... | 5 |
public Partie() {
lstJoueurs = new LinkedList<Joueur>();
peuplesPris = new LinkedList<Class<? extends Peuple>>();
peuplesDispo = new LinkedList<Class<? extends Peuple>>();
pouvoirsPris = new LinkedList<Class<? extends Pouvoir>>();
pouvoirsDispo = new LinkedList<Class<? extends Pouvoir>>();
argentPeuple = ne... | 4 |
public boolean setFile(String file) {
boolean test = false;
if (test || m_test) {
System.out.println("FileManager :: setFile() BEGIN");
}
m_inFile = new File(this.m_path + file);
if (test || m_test) {
System.out.println("FileManager :: setFile() END");
}
return true;
... | 4 |
public Types getObjectType(String name) {
int index;
if((index = ObjectNames.indexOf(name)) != -1) {
return ObjectType.get(index);
}
return null;
} | 1 |
public void initRGBbyHSL( int H, int S, int L )
{
int Magic1;
int Magic2;
pHue = H;
pLum = L;
pSat = S;
if( S == 0 )
{ //Greyscale
pRed = (L * RGBMAX) / HSLMAX; //luminescence: set to range
pGreen = pRed;
pBlue = pRed;
}
else
{
if( L <= (HSLMAX / 2) )
{
Magic2 = ((L * (HSLMAX +... | 5 |
public static void stopServer() {
// TODO Fix bug, server not sending message to all clients
//send message to clients informing them of server shutdown
try
{
for(int a = 0; a < clients.size(); a++)
{
//System.out.println("Exit: " +
clients.elementAt(a).setServerMessage("ServerShutdown");
fo... | 9 |
public void checkValid(Loader l) throws InterruptedException {
boolean test = false;
if (test || m_test) {
System.out.println("ControlButtonListener :: "
+ "checkValid() BEGIN");
}
if (l.getValid()) {
m_game.getGrid().setGrid(l.getGridArray());
m_game.setPla... | 5 |
private void asetaKimmotusehto(Pelihahmo h){
if (0 > h.getMinX() || kentanLeveys < h.getMaxX()){
setEhtoX(h, getEhtoX(h)+1);
} else {
setEhtoX(h, 0);
}
if (0 >= h.getMinY() || kentanKorkeus <= h.getMaxY()){
setEhtoY(h, getEhtoY(h)+1);
} else {... | 4 |
public int isGameOver ()
{
if (gameover!=NOPLAYER) return gameover; // cached value
switch (neutron_x) {
case 1: gameover=BLACK; break;
case 5: gameover=WHITE; break;
default:
if (!canNeutronMove()) {
gameover=whoDidLastMove();
break;
}
gameover=NO... | 4 |
public FilesWatcher(int periodInSec) {
period = periodInSec * 1000;
timer = new Timer();
timer.schedule(new TimerTask() {
@Override
public void run() {
List<File> hasChanged = new ArrayList<File>();
synchronized (LOCK_WATCHERS) {
for (FileWatcher watcher : watchers) {
if (watcher.hasChan... | 4 |
public int getComboMonth() {
return combo2.getSelectedIndex();
} | 0 |
public int bestAction()
{
int selected = -1;
double bestValue = -Double.MAX_VALUE;
for (int i=0; i<children.length; i++) {
if(children[i] != null) {
//double tieBreaker = m_rnd.nextDouble() * epsilon;
double childValue = children[i].totValue / (c... | 4 |
protected PseudoSequenceBIDE trimBeginingAndEnd(Position positionStart, Position positionEnd){
int itemsetStart = 0;
int itemStart =0;
int itemsetEnd=lastItemset;
int itemEnd=lastItem;
if(positionStart != null){ // where the cut starts
itemsetStart = positionStart.itemset;
itemStart = positionStart... | 8 |
@Test
public void removeHousehold() throws InstanceNotFoundException,
ParseException, DuplicateInstanceException {
Household hh = familyService.findHousehold(0);
SimpleDateFormat sdf = new SimpleDateFormat(DATE_FORMAT);
Calendar cal3 = Calendar.getInstance();
cal3.setTime(sdf.parse("12/03/2006"));
Student... | 1 |
public String getDayOfWeekName(Integer dayOfWeek){
switch (dayOfWeek){
case 1:
return "Sun";
case 2:
return "Mon";
case 3:
return "Tue";
case 4:
return "Wed";
... | 7 |
private String formatNodes(ViterbiNode[][] startsArray, ViterbiNode[][] endsArray) {
this.nodeMap.clear();
this.foundBOS = false;
StringBuilder sb = new StringBuilder();
for (int i = 1; i < endsArray.length; i++) {
if(endsArray[i] == null || startsArray[i] == null) {
continue;
}
for (int j = 0; j ... | 7 |
public void createDirectedGraph() {
for(String word1 : parseUtil.getFeatureWordSet()) {
Map<String, Double> rowMap = new HashMap<String, Double>();
for (String word2 : parseUtil.getFeatureWordSet()) {
rowMap.put(word2, 0.0);
}
directedGraph.put(word1, rowMap);
}
Iterator iterator = parseUtil.g... | 7 |
public void writeBlocks(DAWG graph) throws IOException {
// use heuristic to estimate number of blocks
// estimated overhead of 15 and 25KB / block target size
int blockNumber = graph.text.length() / 1000 * 15 / 25;
if (blockNumber < 100) {
blockNumber = 100;
}
int threshhold = (graph.size() / blockNu... | 9 |
public static double processLightHouse(LightHouse lightHouse) {
long timeStart = System.currentTimeMillis();
while (!lightHouse.canBeLifted()) {
//Random balloon with diameter 20..30 cm and fullness 80..100%
Balloon b = Balloon.getRandomBalloon(0.10, 0.15, 0.8, 1.0);
... | 1 |
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 String getUpdatedTokenWithAlias(final String querySchema, final String tableName,
final String fieldToken, final String aliasBefore,
final String aliasAfter)
{
if (fieldToken.lastIndexOf(SQLFormatter.DOT) != -1)
... | 8 |
@Override
public boolean canMove(Board board, Field currentField, Field emptyField) {
return this.validSetupForMove(currentField, emptyField) && this.inSameRankOrFile(currentField, emptyField) && board.clearPathBetween(currentField, emptyField);
} | 2 |
private void afficherFixerCoefficient() {
System.out.println("Fixer un coefficient.");
System.out.println("Liste de vos modules :");
Professeur professeur = (Professeur) this.modeleApplication.getCurrent();
ArrayList<Module> modules = this.universite.getModulesParProfesseur(professeur);
... | 9 |
protected boolean update(SunFishFrame parent, display.DisplayData displayData) {
title = displayData.getFileName();
doc = (Document)(displayData.getData(0));
Node documentRoot = doc.getDocumentElement();
DefaultMutableTreeNode treeRoot = addTreeNodes(documentRoot);
tree = new JTree(treeRoot);
tree.set... | 8 |
public void add(DimensionValueCollection o, Long TimeStamp, InfoStored type) {
if(size() == CAPACITY && !containsKey(TimeStamp))
{
Iterator <Long> i = keySet().iterator();
Long oldest = i.next();
while(i.hasNext())
{
Long check = i.next();
if(check < oldest)
oldest = check;
}
remove(o... | 9 |
private static void read(int[] symbols, FileReader reader) throws IOException {
int c;
while ((c = reader.read()) != -1) {
if (c - 'a' < 26 && c - 'a' >= 0) {
symbols[c - 'a']++;
} else {
if (c - 'A' < 26 && c - 'A' >= 0) {
symbols[c - 'A']++;
}
}
}
} | 5 |
public static void exportProcess(){
BufferedWriter file =null;
String nameFile = "UsiExportQuartier";
try{
File dir = new File("export");
dir.mkdirs();
FileWriter fileWriter = new FileWriter("export\\" + nameFile + ".csv");
file = new BufferedWrit... | 6 |
private List<Movement> listPositionsToMove(Player player) {
if (player == null)
throw new IllegalArgumentException("Player can't be null!");
List<Movement> possibleMovements = new ArrayList<Movement>();
for (Movement move : Movement.values()) {
if (grid.canMove(player, move))
possibleMovements.add(mov... | 3 |
@Override
public boolean equals(Object obj)
{
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
Route other = (Route) obj;
if (name == null) {
if (other.name != null)
return false;
} else if (!name.equals(other.name))
return... | 6 |
public Lexicon(boolean stressSensitive, boolean trace, boolean useTrust, boolean useProbMem,
boolean useNorm, double probAmount, double decayAmount, SubSeqCounter counter) {
this.stressSensitive = stressSensitive;
this.trace = trace;
this.useTrust = useTrust;
this.NORMALIZATION = useNorm;
this.counter = co... | 2 |
public String getSaveEncoding() {
return saveEncoding;
} | 0 |
@Override
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
HttpSession session = request.getSession(true);
System.out.println("desde NEXT");
String salir = request.getParameter("salir");
String newsC = request.getPa... | 2 |
public void printOriginalGraph() {
int vertex = 0;
int neighbor = 0;
int edge = 0;
Iterator<Integer> it = originalGraph.keySet().iterator();
while (it.hasNext()) {
vertex = it.next();
System.out.print(vertex + ":");
HashMap<Integer, Integer> neighbors = originalGraph.get(vertex);
Iterator<Integer... | 2 |
static final void method701(Class273 class273, int i, int i_0_) {
ClientScript class348_sub42_sub19
= Class153.method1223(i, i_0_, 96837648, class273);
if (class348_sub42_sub19 != null) {
anIntArray1164
= (new int
[((ClientScript) class348_sub42_sub19).anInt9688]);
aStringArray1155
= (new Stri... | 5 |
public Response handleRequest() {
switch (criteria) {
case CREATE_ACCOUNT:
(new ApplyAccountCreate(list)).accountCreate();
break;
case CHECK_LOGIN:
return (new ApplyLoginCheck(list)).checkLogin();
case CHECK_REGISRTY:
... | 6 |
public int[] exceptionTypes() {
if (exceptions != null) {
return exceptions.exceptionTypes();
}
return new int[0];
} | 1 |
public void paint(Graphics g)
{
super.paint(g);
if (shapes == null) return;
long timeOverlap = - System.currentTimeMillis();
// reset overlaps
for (Shape s: shapes) s.overlaps = false;
// Calculate overlaps
for (Shape s1: shapes) {
for (Shape s2: shapes) {
if (s1.hashCode() < s2.hashCode()) ... | 9 |
protected boolean canPutInBackpack(Actor actor)
{
System.out.println(getName() + " is finding out if it can add " + ((SimpleWorldActor)actor).getName() + " to its backpack.");
return getBackpack() != null && //must have a backpack
actor instanceof ContainableSimWo && //a is containable
... | 2 |
public static ByteBuffer get(FileDescription description)
{
if (description.getIndex() == 255 && description.getArchive() == 255)
{
return meta;
}
if (data.containsKey(description))
{
return data.get(description);
}
ArchiveMeta meta = cache.get(description.getIndex()).getArchiveMeta(
descriptio... | 9 |
public void InsertarOtro(ArrayList datos)
{
// Cambiamos todos los datos, que se puedan cambiar, a minúsculas
for(int i = 0 ; i < datos.size() ; i++)
{
try{datos.set(i, datos.get(i).toString().toLowerCase());}
catch(Exception e){}
}
biblioteca.insertar... | 2 |
public GridSizeDialog() {
myPanel.add(new JLabel("Width:"));
wField.setText("10");
myPanel.add(wField);
myPanel.add(Box.createHorizontalStrut(15));
myPanel.add(new JLabel("Height:"));
chooseFile.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
JFileC... | 2 |
public boolean isGetMethodPresentFor(Field field) {
FieldStoreItem item = store.get(FieldStoreItem.createKey(field));
if(item != null) {
return item.getGetMethod() != null ? true : false;
}
return false;
} | 2 |
public void stop(){
distributedService.dispose();
} | 0 |
@Override
public void paintComponent(Graphics g)
{
super.paintComponent(g);
// Determine the width of the space available to draw the line number
FontMetrics fontMetrics = component.getFontMetrics( component.getFont() );
Insets insets = getInsets();
int availableWidth ... | 3 |
void readCdsFastaFile(String cdsFastaFileName) {
int lineNum = 1;
if (!quiet) System.out.print("Reading file:" + cdsFastaFileName + "\t");
FastaFileIterator ffi = new FastaFileIterator(cdsFastaFileName);
for (String cds : ffi) {
// Transcript ID
String trid = GprSeq.readId(ffi.getHeader());
// Repeat... | 5 |
public void executeJob(IJob job){
JobExecutor executor = new JobExecutor(job, updateable, id);
try {
executor.run();
} catch (Exception e) {
e.printStackTrace();
try {
//Executing the job went wrong, we signal the master and shut ourselves down
updateable.send(new StatusUpdate("VM " + id ... | 2 |
private static void solve(Integer[] in) {
int cuts = 0;
int min = Integer.MAX_VALUE;
// for (int item : in) {
// if (item > 0 && item < min) {
// min = item;
// }
// }
//
... | 6 |
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
Sequence other = (Sequence) obj;
if (definitionLine == null) {
if (other.definitionLine != null)
return false;
} else if (!definitionLin... | 9 |
public static void main(String[] args) throws Exception
{
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
String sM = reader.readLine();
String sN = reader.readLine();
int nM = Integer.parseInt(sM);
int nN = Integer.parseInt(sN);
for (in... | 2 |
public boolean onPlayerRightClick(EntityPlayer par1EntityPlayer, World par2World, ItemStack par3ItemStack, int par4, int par5, int par6, int par7)
{
this.syncCurrentPlayItem();
this.netClientHandler.addToSendQueue(new Packet15Place(par4, par5, par6, par7, par1EntityPlayer.inventory.getCurrentItem())... | 9 |
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.