text stringlengths 14 410k | label int32 0 9 |
|---|---|
public void setStrategy(Strategy strategy)
{
this.strategy = strategy;
} | 0 |
protected void printParameter(String parentParameterFile,
String childParameterFile, ArrayList<_Doc> docList) {
System.out.println("printing parameter");
try {
System.out.println(parentParameterFile);
System.out.println(childParameterFile);
PrintWriter parentParaOut = new PrintWriter(new File(
par... | 8 |
public static void main(String[] args) {
final List ab= new ArrayList();
for(int i=0;i<100;i++){
ab.add(i);
}
ExecutorService ex = Executors.newCachedThreadPool();
for (int i = 0; i < 4; i++) {
final int a = i;
//每一次execute方法,都是向池中放入一个对象
ex.execute(new Runnable() {... | 6 |
public TradeProposalPopUp(ArrayList<String[]> tradesProposed, Player proposer) {
final ArrayList<String[]> trades = tradesProposed;
final Player proposingPlayer = proposer;
int cash0 = Integer.parseInt(trades.get(0)[0]);
String[] properties0 = trades.get(1);
int cash1 = Integer.parseInt(trades.get(2)[0]);
... | 9 |
public boolean isTypedReady(int e){
if(keys[e] && typed[e]){
typed[e]=false;
return true;
}
return false;
} | 2 |
public void die(){
if (sound.Manager.enabled) {
sound.Event effect = new sound.Event(getPosition(), getVelocity(),sound.Library.findByName(DEATH_EFFECT));
effect.gain = EFFECT_VOLUME;
sound.Manager.addEvent(effect);
}
velocity.timesEquals(0);
if(Parti... | 2 |
public static byte[] decode(String encoded, int length) {
Preconditions.checkArgument(length > 0);
ByteArrayOutputStream os = new ByteArrayOutputStream(length);
int offset = 0, encodedLength = encoded.length(), decodedLength = 0;
while (offset < encodedLength - 1 && decodedLength < length) {
byte first = d... | 9 |
private boolean filterFile(File file) {
boolean rtnBoolean = false;
if(this.config.getExtensions() != null){
// 파일이 있다면 파일 이름 출력
Set<String> exts = new HashSet<String>();
//해당 확장자만 가져오도록한다.
for(String ext : this.config.getExtensions()){
exts.add("."+ext.toLowerCase().trim());
}
Iterator<St... | 4 |
private static Collection<String> moeglicheBefehlsnamen(
List<String> geparsteZeile)
{
ArrayList<String> befehlsnamen = new ArrayList<String>();
if(geparsteZeile.size() == 0)
return befehlsnamen;
for(int i = 0; i < geparsteZeile.size(); i++)
befehlsnamen.add("");
for(int i = 0; i < geparsteZeile.si... | 5 |
public Player() {
_current = Status.STOP;
_player = null;
_index = -1;
new JFXPanel();
setBackground(Color.WHITE);
SpringLayout layout = new SpringLayout();
setLayout(layout);
//Setting up the list.
_myList = new JList<Song>(new DefaultListMode... | 9 |
public static ArrayList<Entry<Integer, String>> getColInfo(String datapath)
throws IOException {
BufferedReader br = new BufferedReader(new FileReader(datapath));
HashMap<Integer,String> ctgs = new HashMap<Integer,String>();//每列的类型
String line = br.readLine();
int arrcount = line.split(",").length -1;
... | 7 |
public static HashMap<Integer, String> ReadName(String filename){
HashMap<Integer, String> udict = new HashMap<Integer, String>();
//Read the input file stream
try{
FileInputStream fstream = new FileInputStream(filename);
BufferedReader br = new BufferedReader(new InputStreamReader(fstream));
for(... | 2 |
public static void main(String[] args) {
SudokuApp sudokuApp = new SudokuApp(0, "800006304000000000040090001309060000000700006021800050002470000400008700000001040");
// SudokuApp sudokuApp = new SudokuApp(0, "002519436596342871314867290"
// + "001738649937654128648921750"
// + "0004839678732965104691... | 5 |
public int getAge() {
return age;
} | 0 |
public boolean containsMethodAliasDirectly(String methodName,
String paramType, IdentifierMatcher matcher) {
for (Iterator i = methodIdents.iterator(); i.hasNext();) {
Identifier ident = (Identifier) i.next();
if (((Main.stripping & Main.STRIP_UNREACH) == 0 || ident
.isReachable())
&& ident.wasAlia... | 7 |
public int maxProfit(int[] prices) {
int len = prices.length;
if (len ==0){
return 0;
}
int[] mProL = new int [len];
int[] mProR = new int [len];
for (int i = 0;i<len;i++) {
mProL[i] = mProR[i] = 0;
}
int minL = prices[0],maxR = pri... | 7 |
public EigenvalueDecomposition (Matrix Arg) {
double[][] A = Arg.getArray();
n = Arg.getColumnDimension();
V = new double[n][n];
d = new double[n];
e = new double[n];
issymmetric = true;
for (int j = 0; (j < n) & issymmetric; j++) {
for (int i = 0; (i < n) & issymmetr... | 7 |
public String toUnicode(char ch){
// check bfChar
if (bfChars != null) {
char[] tmp = bfChars.get((int) ch);
if (tmp != null) {
return String.valueOf(tmp);
}
}
// check bfRange for matches, there may be many ranges to check
if (... | 5 |
private void postExpansionExecute(final ClientServices client, final EventManager em) throws CommandException,
AuthenticationException {
// processExistingModules(client.getLocalPath());
super.execute(client, em);
//
// moved modules code to the end of the other arg... | 9 |
public ListNode merge2Lists(ListNode list1, ListNode list2) {
if (list1 == null && list2 == null)
return null;
if (list1 == null)
return list2;
if (list2 == null)
return list1;
ListNode head1 = null;
ListNode head2 = null;
if (list1.val <= list2.val) {
head1 = list1;
head2 = list2;
} else {... | 9 |
public static void main(String[] args)
{
Algoritmo programa = new Algoritmo();
if (programa.leerFichero(RUTA)){
System.out.println("Se ha cargado correctamente el fichero: "+RUTA);
String solucion = programa.executeDijkstra(origen);
... | 2 |
public void start() {
Thread thread = new Thread(this);
try {
thread.start();
System.out.println("Thread Start...");
} catch (Exception error) {
}
} | 1 |
public boolean hasItemAny(int id, int amount) {
for(int i = 0; i < playerItems.length; i++) {
if(playerItems[i] == id+1 && playerItemsN[i] >= amount)
return true;
}
for(int i2 = 0; i2 < playerBankSize; i2++) {
if(bankItems[i2] == id+1 && bankItemsN[i2] >= amount)
return true;
}
return fals... | 6 |
public int getScrollableUnitIncrement(Rectangle visibleRect,
int orientation, int direction) {
return 5;
} | 0 |
public static String readSqlCmdTemplateVariable(String template, int start, int end, Object [] MV_returnarray) {
{ int cursor = start;
boolean escapedP = false;
if ((cursor >= end) ||
(!(template.charAt(cursor) == '{'))) {
}
else {
loop000 : while (cursor < end) {
... | 7 |
private int putTextBlock (Graphics2D g2d, String t, int x, int startY) {
int y = startY;
if ((t == null) || (t.equals(""))) {
return y;
}
TextLayout tl = new TextLayout(t,
MainWindow.setupData.getPrintElementSetupList().getPrintElementSetup (PrintElementSetupList.FONT_SUMMARY_SHEET).getPrin... | 3 |
private synchronized boolean hasReceivedPacketWithSequenceNumber(int sequenceNumber) {
//if the sequence number isn't specified then we can't tell whether we've received it before--assume we haven't
if(sequenceNumber == Packet.SEQUENCE_NUMBER_NOT_APPLICABLE)
return false;
//if we've NEVER received a packet ev... | 6 |
private String findLine(String containing, boolean throwException) throws IOException {
String line = reader.readLine();
while (line != null) {
if (line.contains(containing)) {
return line;
}
line = reader.readLine();
}
// We've reache... | 3 |
public double winPossibility(ActionList history, GameInfo gameInfo, int playerHandStrength) {
// find number of raise actions in history
int numRaises = history.opponentActions(gameInfo).numberOfRaises();
// find histogram and adjusted hand strength
int[] histogram = historyToHandStrength.get(numRaises);
... | 3 |
public String getHelpMessage() { return this.helpMessage; } | 0 |
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
DefaultPeptideIon that = (DefaultPeptideIon) o;
if (charge != that.charge) return false;
if (Double.compare(that.mass, mass) != 0) return false... | 6 |
public static void tfmsymtri2(double a[][], int n, double d[], double b[], double bb[], double em[]) {
int i, j, r, r1;
double w, x, a1, b0, bb0, machtol, norm;
norm = 0.0;
for (j = 1; j <= n; j++) {
w = 0.0;
for (i = 1; i <= j; i++)
w += Math.abs(a[i][j]);
for (i = j + 1; i <= n; i++)
w += M... | 9 |
public ArrayList<BodyPart> getBodypartsByType(UpgradeType type){
ArrayList<BodyPart> bodyparts = new ArrayList<BodyPart>();
switch (type) {
case Head:
for(BodyPart u : allHeads){
bodyparts.add(u);
}
return bodyparts;
case Body:
for(BodyPart u : allBodys){
bodyparts.add(u);
}
return bod... | 6 |
public void play() {
if (!isLoaded()) {
return;
}
clip.setFramePosition(0);
if (looping) {
clip.loop(Clip.LOOP_CONTINUOUSLY);
} else {
clip.loop(repeat);
}
} | 2 |
private void initRandomLL(int randomNum) {
for (int i = 0; i < randomNum; i++) {
ll.add(ran.nextInt(20));
}
} | 1 |
public void removeValue(Comparable rowKey, Comparable columnKey) {
setValue(null, rowKey, columnKey);
// 1. check whether the row is now empty.
boolean allNull = true;
int rowIndex = getRowIndex(rowKey);
DefaultKeyedValues row = this.rows.get(rowIndex);
for (int item = ... | 9 |
private void setModel(String modelName) {
if (modelName.isEmpty())
modelName = this.getClass().getSimpleName().replace("Controller", "");
modelName += modelName.equals("App")? "Model" : "";
try {
model = (Model) Class.forName("app.models." + modelName).newInstance();
model.setController(this);
}
... | 5 |
public static void main(String[] args) {
try {
MoodleCallRestWebService.init("http://localhost:7070/moodle/webservice/rest/server.php", "d65f7f717b69f706873dcae6eef08ac7");
MoodleCourse[] allCourses = MoodleRestCourse.getAllCourses();
for (int i=0; i<allCourses.length; i++, Syst... | 4 |
public void removeExtras(){
List<Tile> removeList = new ArrayList<Tile>();
for(Tile tile : tileList ) {
if (tile.getStyle() == 0){
removeList.add(tile);
}
}
for(Tile rTile : removeList){
tileList.remove(rTile);
}
} | 3 |
@Override
public void testStarted(Description description) {
resetCurrentFailure();
final String id = getId(description);
logger.info("START Testcase '{}' '{}'.", id, description.getDisplayName());
if (!uri.equals(NULL_URI)) {
logger.info("START Testcase '{}' '{}'.", id,
... | 1 |
public Dimension getMinimumSize()
{
Dimension localDimension = super.getSize();
int j;
if (this.HeightPacked)
{
j = (this.HardHeight > -1) && (this.HardHeight < this.ActualHeight) ? this.HardHeight : this.ActualHeight;
} else if (this.HardHeight > -1)
j = this.HardHeight;
else
... | 8 |
public void imprimirTable() {
for (int i = 0; i < this.table_trans.getRowCount(); i++) {
for (int j = 1; j < this.table_trans.getColumnCount(); j++) {
System.out.print(this.table_trans.getValueAt(i, j) + " ");
}
System.out.println("");
}
} | 2 |
private void writeImport() {
ImportGenerator imports = new ImportGenerator( filePath );
if ( date )
imports.addImport( IMPORT_DATE );
sb.append( imports.toString() );
} | 1 |
public int[] computePrefix(String pattern) {
int patternLength = pattern.length(); int longestPrefix = 0;
int[] prefixFunction = new int[patternLength];
prefixFunction[0] = 0;
for(int patternIndex = 1; patternIndex < patternLength; patternIndex++) {
while(longestPrefix > 0 && !this.compareTwoChars(pattern.ch... | 4 |
protected boolean canItselfContain(ContainableSimWo conSimWo)
{
boolean canContain =
conSimWo != this && // a container cannot contain itself
// only a pot can contain a plant. must be in parentheses
(!(conSimWo instanceof Plant) || (this instanceof Pot)) &&
ma... | 4 |
@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 TypeWork)) {
return false;
}
TypeWork other = (TypeWork) object;
if ((this.idTypeWork == null && other.idTypeWo... | 9 |
public String getRandomGeslacht() {
Random rn = new Random();
switch (rn.nextInt(4)) {
case 0:
return "man";
case 1:
return "vrouw";
case 2:
return "onbepaald";
case 3:
return "onbekend";
default:
return "onbekend";
}
} | 4 |
public static void deleteUtilisateur(Utilisateur utilisateur) {
Statement stat;
try {
stat = ConnexionDB.getConnection().createStatement();
stat.executeUpdate("delete from utilisateur where id_utilisateur="+ utilisateur.getId_utilisateur());
} catch (SQLException e) {
... | 2 |
private static void resetOutOfRoi (ImageProcessor ip, int extraX, int extraY) {
int width = ip.getWidth();
int height = ip.getHeight();
Rectangle roiRect = ip.getRoi();
Rectangle temp = (Rectangle)roiRect.clone();
temp.grow(extraX, extraY);
Rectangle outer = temp.intersec... | 5 |
public void inicializarHuertos(int[][] iniciales) throws TamanosInvalidosInicializacionException
{
Huerto hAsignar=null;
Nodo enCreacion=null;
if(iniciales[0].length==CROP_NUMBER*Huerto.NODOS_POR_HUERTO
&& iniciales[1].length==CROP_NUMBER*Huerto.NODOS_POR_HUERTO )
{
for(int i =0; i<CROP_NUMBER*Huerto.N... | 4 |
public static String removeAllStylenames(String style)
{
StringBuffer buffer = new StringBuffer();
if (style != null)
{
String[] tokens = style.split(";");
for (int i = 0; i < tokens.length; i++)
{
if (tokens[i].indexOf('=') >= 0)
{
buffer.append(tokens[i] + ";");
}
}
}
return... | 4 |
public int getTotalFilhos(ArrayList<Byte> contexto, int nivel){
if(nivel > -1){
if(this.isEsc() || (this.getValor() != contexto.get(nivel))) return -1;
}
if(nivel == contexto.size() - 1) {
if(this.isEsc()) return -1;
return filhos.size();
}
for(Contexto c : filhos){
int res = c.g... | 7 |
public PlaceHoldRequestDialog(BorrowerSearchPanel parent, final int BID, Controller session) {
setResizable(false);
setTitle("Return Book");
this.parent = parent;
this.mySession = session;
this.BID = BID;
ImageIcon img = new ImageIcon("res/library-icon.png");
this.setIconImage(img.getImage());
setBound... | 5 |
Base(String path) {
url = asUrl(path);
StackTraceElement[] elements = Thread.currentThread().getStackTrace();
StackTraceElement callee = elements[4];
String className = callee.getClassName();
String methodName = callee.getMethodName();
try {
@SuppressWarnings("unchecked")
Class<? extends API>... | 6 |
protected JComponent initButtons()
{
JPanel q = new JPanel();
q.setLayout(new BoxLayout(q, BoxLayout.Y_AXIS));
myMessage = new JTextArea();
myMessage.setEditable(false);
q.add(myMessage);
JPanel topRow = new JPanel();
JPanel bottomRow = new J... | 4 |
public Object nextValue() throws JSONException {
char c = this.nextClean();
String string;
switch (c) {
case '"':
case '\'':
return this.nextString(c);
case '{':
this.back();
return new JSONObject(this);
... | 7 |
public StringBuffer format(final CommandSender target) {
// format all dates with time zone for target
TimeZone timeZone = null;
final Format[] formats = this.getFormatsByArgumentIndex();
for(int i = 0; i < formats.length; i++) {
if (!(formats[i] instanceof DateFormat)) conti... | 4 |
public void run() {
while (true) {
if (year!=w.year) {
year=w.year;
this.repaint();
}
try {
Thread.sleep(250);
} catch (InterruptedException e) {
}
}
} | 3 |
public void keyPressed(KeyEvent e) {
char keychar = e.getKeyChar();
int keycode = e.getKeyCode();
if (keycode>=0 && keycode < 256) {
keymap[keycode]=true;
lastkey=keycode;
lastkeychar=keychar;
if (wakeup_key==-1 || wakeup_key==keycode) {
if (!eng.isRunning()) {
eng.start();
// key is cle... | 8 |
public int lengthOfLinkedListWithCycle(ListNode head){
if (head == null)
return 0;
ListNode fast = head, slow = head;
int length = 1;
while(true){
if (fast == null || fast.next == null)
break;
slow = slow.next;
head = head.next.next;
if (slow == fast)
... | 9 |
public static void writeFile(ClassFile cf, String directoryName)
throws CannotCompileException {
try {
writeFile0(cf, directoryName);
}
catch (IOException e) {
throw new CannotCompileException(e);
}
} | 1 |
private void setFrameLocal(final int local, final Object type) {
int l = newLocals.length;
if (local >= l) {
Object[] a = new Object[Math.max(2 * l, local + 1)];
System.arraycopy(newLocals, 0, a, 0, l);
newLocals = a;
}
newLocals[local] = type;
} | 1 |
public void doGet(HttpServletRequest request,
HttpServletResponse res)
throws ServletException, IOException {
// send out the HTML file
res.setContentType("text/html");
PrintWriter out = res.getWriter ();
out.println("<html>");
out.println("<head>");
out.println("<title> Photo List </title>");... | 8 |
private void logRequest(String uri, String res) {
try {
PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter("log.txt", true)));
out.println(uri);
out.println(res);
out.close();
} catch (IOException e) {
e.printStackTrace();
}
} | 1 |
@Test
public void determineHighestFlush_ifSevenOfSameSuit_returnsSetOfSevenCards() {
assertFlushOfSize(getAllFlushCards(sevenFlush()), 7);
} | 0 |
public SplitYamlDataHolder(File f) {
folder = f;
userFile = new File(folder, "users.yml");
groupFile = new File(folder, "groups.yml");
worldFile = new File(folder, "worlds.yml");
entityFile = new File(folder, "entities.yml");
specialFile = new File(folder, "specials.yml")... | 0 |
private void login() {
panel = new LoginPanel(this);
centerWindow();
this.add(panel);
panel.updateUI();
((LoginPanel) panel).getSignInBtn().addActionListener(new ActionListener(){
@Override
public void actionPerformed(ActionEvent e) {
String user = ((JTextField)panel.getComponent(1)).getText();
... | 3 |
public Long getAverageStatistical(List<Long> list) {
// parameters check
if (list == null) {
return null;
}
int iterations = list.size();
Long sum = (long) 0;
for (Long result : list) {
sum += result;
}
return sum / iterations;
... | 2 |
private void viewSelectedComment() {
if (table == null)
return;
final int row = table.getSelectedRow();
if (row < 0)
return;
final int id = ((Integer) table.getValueAt(row, 0)).intValue();
URL u = null;
try {
u = new URL(Modeler.getContextRoot() + "comment?client=mw&action=view&primarykey=" + id);
... | 8 |
private void abrirLog() {
routeTable.setModel(new MyTableModel());
initColumnSizes(routeTable);
actionStartRouter.setEnabled(true);
actionStartForwarder.setEnabled(true);
actionSendMessage.setEnabled(true);
} | 0 |
public void use(BattleFunction iface, PokeInstance user, PokeInstance target, Move move) {
PokeInstance p;
if (this.target == Target.target) {
p = target;
} else {
p = user;
}
p.battleStatus.flags[flag] = true;
if (text != null) {
text = text.replace("$target", p.getName());
if (p.battleStatu... | 3 |
void parseXMPDecl(boolean ignoreEncoding) throws java.lang.Exception
{
String version;
String encodingName = null;
String standalone = null;
// Read the version.
require("version");
parseEq();
version = readLiteral(0);
if (!version.equals("1.0")) {
... | 3 |
public static GoalActionSequence findGoalRoute(Level l, Agent agent,
Box box, Field agentFromField, Field agentToField,
Field boxFromField, Field boxToField,
Collection<Field> blockedFields) {
dir boxDir = null;
GoalSequenceNode root = new GoalSequenceNode(boxFromField,
agentFromField, null);
Linke... | 9 |
static void initFeature() {
Random rand = new Random();
for(int i = 0; i < DataInfo.userNumber; i++)
for(int j = 0; j < DataInfo.featureNumber; j++)
DataInfo.userFeature[i][j] = 0.01 * rand.nextDouble();
for(int i = 0; i < DataInfo.itemNumber; i++)
for(int j = 0; j < DataInfo.featureNumber; j++... | 4 |
private void paintTextBounds(Graphics g) {
Page currentPage = pageViewComponent.getPageLock(this);
// get page transformation
AffineTransform pageTransform = currentPage.getPageTransform(
documentViewModel.getPageBoundary(),
documentViewModel.getViewRotation(),
... | 3 |
private void updateParam(List<Instance> instances) {
Map<Integer, Double> update = new HashMap<Integer, Double>();
for (Instance instance : instances) {
double y = Double.parseDouble(instance.getLabel().toString()) ; //yi
double wx = this.innerProduct(instance);
for (Map.Entry<Integer, Double> entry : inst... | 5 |
public static String doubleToString(double d) {
if (Double.isInfinite(d) || Double.isNaN(d)) {
return "null";
}
// Shave off trailing zeros and decimal point, if possible.
String string = Double.toString(d);
if (string.indexOf('.') > 0 && string.indexOf('e') < 0 &&
... | 7 |
public int getM()
{
return m;
} | 0 |
private void nextMove(int type) {
if (type == 0) {
holdable = true;
generateNextTokens();
} else {
currentType = type;
}
//set currentTokens
switch (currentType) {
case 1:// the I token
setPositionForCase1(currentTok... | 8 |
@Override
public void valueChanged(LabelledSpinner source, int value) {
if (source == hpNumerator) {
eventBus.post(new HPNumeratorChanged(value));
} else if (source == hpDenominator) {
eventBus.post(new HPDenominatorChanged(value));
} else if (source == defNumerator) {
eventBus.post(new DefNumeratorChan... | 6 |
@Override
/**
* Encodes a message.
* @param session
* @param message
* @param out
*/
public void encode(IoSession session, Object message, ProtocolEncoderOutput out) throws Exception {
try {
Packet p = (Packet) message;
byte[] data = p.getData();
int dataLength = p.getLength();
ByteBuffer buff... | 7 |
public static void main(String[] args) throws IOException {
// BufferedReader in = new BufferedReader(new
// InputStreamReader(System.in));
Scanner scan = new Scanner(System.in);
String line[];
int times = 1;
while (scan.hasNext()) {
int n = scan.nextInt();// Integer.parseInt(line[0]);
if(n==0)
... | 8 |
@Override
public int hashCode() {
int hash = 0;
hash += (itItemHasEmpleadoPK != null ? itItemHasEmpleadoPK.hashCode() : 0);
return hash;
} | 1 |
public void openFile() throws Exception {
if (fileChooser.showOpenDialog(null) == JFileChooser.APPROVE_OPTION) {
DrawInternalFrame internalFrame = new DrawInternalFrame(this);
File file = fileChooser.getSelectedFile();
if (file.getName().endsWith(".png")
|| file.getName().endsWith(".PNG")) {
Buffere... | 4 |
private boolean isSlavoGermanic(String value) {
return value.indexOf('W') > -1 || value.indexOf('K') > -1 ||
value.indexOf("CZ") > -1 || value.indexOf("WITZ") > -1;
} | 3 |
private boolean isValid() {
if (email.length() > 50 || address.length() > 75)
{
System.err.println("Invalid argument(s) when inserting an availability!");
return false;
}
return true;
} | 2 |
public static void main(String[] args) {
Claire clairette = new Claire();
clairette.play();
} | 0 |
private synchronized ExecutorService getExecutor() {
if (service == null) {
service = Executors.newFixedThreadPool(MAX_NUMBER_OF_ENFORCERS);
}
return service;
} | 1 |
public static void main(String[] args) throws Exception
{
for( int x=1; x < NewRDPParserFileLine.TAXA_ARRAY.length; x++)
{
System.out.println(NewRDPParserFileLine.TAXA_ARRAY[x]);
File inFile = new File(ConfigReader.getAdenomasReleaseDir() + File.separator +
"spreadsheets" + File.separator + "pivote... | 7 |
public void deleteElement(String value) {
ListElement index = head;
if (index.value.equals(value)) {
deleteFromBegin();
} else {
while (index.next != null) {
if (index.next.value.equals(value)) {
index.next = index.next.next;
... | 5 |
public int CantPar(int opcion2) {
if (opcion2 == 5 || opcion2 == 8) {
cp++;
}
//if para reiniciar las partidas jugadas en caso de reiniciar el juego
if (opcion2 == 7) {
cp = 0;
}
return cp;
} | 3 |
private boolean jj_3_1()
{
if (jj_scan_token(LEFTB)) return true;
if (jj_3R_9()) return true;
if (jj_scan_token(COMMA)) return true;
return false;
} | 3 |
* @param notes notes to be added about the contact.
* @throws NullPointerException if the name or the notes are null
*/
public void addNewContact(String name, String notes) throws NullPointerException
{
if(name == null)
{
throw new NullPointerException("name should not be null");
}
if(notes == null)
... | 2 |
final int[][] method3047(int i, int i_3_) {
if (i_3_ != -1564599039)
return null;
anInt9353++;
int[][] is = ((Class348_Sub40) this).aClass322_7033
.method2557(i_3_ + 1564598957, i);
if (((Class322) ((Class348_Sub40) this).aClass322_7033).aBoolean4035) {
int[][] is_4_ = this.method3039((byte) -60, i, 0... | 5 |
@Test
public void test_solvable_matrix_size_2_solve2() throws
ImpossibleSolutionException,UnsquaredMatrixException,
ElementOutOfRangeException{
int height=2;
int width=2;
float[] result;
try{
test_matrix = new Determinant(height,... | 3 |
public static int atoi2(String str) {
// Note: The Solution object is instantiated only once and is reused by each test case.
int result=0;
for(int i=str.length()-1, w=0;i>=0;--i) {
if(str.charAt(i)=='-') return -result;
if(str.charAt(i)=='+') return result;
if(str.charAt(i)!=' ') {
result += ((int)(... | 4 |
@Override
public boolean equals(Object o )
{
if(o == null)
return false;
if(o == this)
return true;
if(!(o instanceof FertigungsplanDTO))
return false;
FertigungsplanDTO f = (FertigungsplanDTO)o;
if(f.nr != nr || f.id != id || f.auftra... | 7 |
public static void main(String[] args) throws Exception {
if (args.length != 4 && args.length != 5) {
System.err.println(USAGE);
System.exit(1);
}
File metadataFile = new File(args[0]);
File outputFile = new File(args[1]);
File pkcs12File = new File(args... | 7 |
private void turnAngle(int index, double change){
switch(index){
case 0:
this.angle[0]+=change;
break;
case 1:
this.angle[1]+=change;
break;
case 2:
this.angle[2]+=change;
}
... | 5 |
public SyncCheckView(final JPanel panel) {
// Top will be button
final JPanel top = new JPanel();
top.setBorder(BorderFactory.createEtchedBorder());
top.setLayout(new BorderLayout());
// Bottom will be text area
final JPanel bottom = new JPanel();
bottom.setBorder(BorderFactory.createEtchedBorder());
b... | 2 |
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.