text stringlengths 14 410k | label int32 0 9 |
|---|---|
private void method289(Object5 class28)
{
for(int j = class28.anInt523; j <= class28.anInt524; j++)
{
for(int k = class28.anInt525; k <= class28.anInt526; k++)
{
Ground class30_sub3 = groundArray[class28.anInt517][j][k];
if(class30_sub3 != null)
{
for(int l = 0; l < class30_sub3.anInt1317; l... | 7 |
public void setEcho(boolean echoToConsole) {this.echoToConsole = echoToConsole;} | 0 |
public String multiply(String num1, String num2) {
int[] num = new int[num1.length() + num2.length()];
for (int i = 0; i < num1.length(); i++) {
int carry = 0;
int a = num1.charAt(num1.length() - 1 - i) - '0';
for (int j = 0; j < num2.length(); j++) {
... | 5 |
public void EndTurn() {
players.Base ply = Game.player.get(currentplayer);
for (units.Base unit : Game.units) {
unit.acted=false;
unit.moved=false;
}
currentplayer++;
if (currentplayer>=totalplayers) {currentplayer=0;day++;}
ply = Game.player.get(currentplayer);
if (day!=1) {
ply.money+=buildingm... | 7 |
@Override
public int getScale(final RoundingContext context)
{
final Integer decimalPlaces = map.get(SampleRoundingContext.narrow(context));
if (decimalPlaces == null)
{
return defaultDecimalPlaces;
}
else
{
return decimalPlaces;
}
} | 1 |
SS_translation find_translation(String pref_lang_locale, String format)
{
String loc = pref_lang_locale;
do
{
// System.out.println("==locale=" + loc + " format=" + format);
/* see if this format string exists in the transsets */
SS_translationset ts = trans_by_lang.get(loc);
// System.out.printl... | 6 |
private Stmt parseStatement() {
//System.out.println("parseStatement");
Stmt node = null;
switch (showNext().getKind()) {
case "ident":
Identifier id = new Identifier(acceptIt());
Selector sel = parseSelector();
if (nextIs("assign")) {
node = parseAssignment(id,sel);
} else {
node = parsePro... | 4 |
public T NextLargest2(T key) throws InvalidPositionException,
EmptyTreeException {
BTPosition<T> current = checkPosition(root());
Stack<BTPosition<T>> s = new Stack<>();
while (!s.isEmpty() || current != null) {
if (current != null) {
s.push(current);
current = current.getLeft();
} else {
... | 4 |
@Override
public void validate() {
super.validate();
if (SUBMIT.equals(getSubmit())) {
if (StringUtils.isBlank(bookVO.getBookName())
|| !(StringUtils.isAlphaSpace(bookVO.getBookName()))) {
addFieldError("bookVO.bookName", "Please enter valid book name");
}
if (StringUtils.isBlank(bookVO.getPublis... | 7 |
private void processObject(Object o){
try {
MethodTransfer mt=(MethodTransfer)o;
//System.out.println ("method transfer");
MethodDetails md=mt.getMethodDetails();
Class<?> c=couple.getReceiver().getClass();
try {
Method m=c.getDeclaredMethod(md.getName(),md.getArgumentTypes());
Object ob=m.... | 7 |
public String getState() {
if(isValidState(this.state)){
return this.state;
}
return null;
} | 1 |
public InnerClassInfo[] getExtraClasses() {
if ((status & INNERCLASSES) == 0)
loadInfo(INNERCLASSES);
return extraClasses;
} | 1 |
public void relayerMessage(String user, long mesID){
int index = getMessageIndexFromID(recentMessages, mesID);
if(index != -1 ){
recentMessages.get(index).addAuthors(user);
} else {
int i = 0;
List<Message> old = null;
while(index == -1 && i < logs.size()){
old = loadLog(logs.get(i));
inde... | 5 |
public void compExecTime() {
double newExeTime;
double newCost;
dEval = 0;
dTime = 0;
dCost = 0;
for (int i = 0; i < iClass; i++) {
newExeTime = 0;
// System.out.print("Cost[" + i + "]");
for (int j = 0; j < iSite; j++) {
if (dmAlloc[i][j] != -1) {
if (dmAlloc[i][j] < 1) {
newExeTime... | 8 |
private void setInvisibility(boolean invisible) {
Geometry geo = (Geometry)spatial;
MatParam param = geo.getMaterial().getParam("Diffuse");
ColorRGBA c;
if(param != null) {
c = (ColorRGBA)param.getValue();
} else {
c = ColorRGBA.White;
... | 6 |
public void reload() {
if (!new File(plugin.getDataFolder(), "config.yml").exists()) {
plugin.saveDefaultConfig();
}
plugin.reloadConfig();
configLoader = (YamlConfiguration) plugin.getConfig();
} | 1 |
public DbHelper() throws ClassNotFoundException {
Class.forName("org.sqlite.JDBC");
try
{
// create a database connection
connection = DriverManager.getConnection("jdbc:sqlite:" + DATABASE_NAME);
Statement statement = connection.createStatement();
statement.setQueryTimeout(30)... | 1 |
void drawChip(Graphics g) {
int i;
Font f = new Font("SansSerif", 0, 10 * csize);
g.setFont(f);
FontMetrics fm = g.getFontMetrics();
for (i = 0; i != getPostCount(); i++) {
Pin p = pins[i];
setVoltageColor(g, volts[i]);
Point a = p.post;
... | 7 |
public void analyze(String source) {
int originalSize = source.length();
HtmlCompressor compressor = getCleanCompressor();
String compResult = compressor.compress(source);
printHeader();
System.out.println(formatLine("Compression disabled", originalSize, originalSize, originalSize));
int prevSize =... | 4 |
public void setSomeList(List<String> someList) {
this.someList = someList;
} | 0 |
public int[] searchRange(int[] nums, int target) {
int[] pos = new int[]{-1, -1};
int start = 0, end = nums.length-1;
while(start < end) {
int mid = start + (end-start)/2;
if(nums[mid] < target) {
start = mid + 1;
} else {
en... | 7 |
public void update(int delta, boolean beat, int bpm) {
this.bpm = bpm;
if (beat) {
altBeat++;
if (game.getCurrentLevel().getLevelNumber() > 0) {
xPosition++;
}
if (altBeat % 4 == 0)
setupLavaGlow = true;
}
ArrayList<TileEffect> toRemove = new ArrayList<TileEffect>();
for (TileEffect t ... | 8 |
public static Boolean[] wordsTrusts(boolean[] trusts, Boolean[] boundaries) {
if (boundaries.length == 0) {
// Trust anything with no boundaries
return new Boolean[] {true};
}
else {
List<Boolean> wordsTrusts = new LinkedList<Boolean>();
for (int i = 0; i < boundaries.length; i++) {
// Every time ... | 3 |
public void keyPressed(KeyEvent e)
{
switch(e.getKeyCode())
{
case KeyEvent.VK_LEFT: Kontroller.left = true;
break;
case KeyEvent.VK_RIGHT: Kontroller.right = true;
break;
case KeyEvent.VK_UP... | 6 |
@Override
public Class<?> getColumnClass(int columnIndex) {
switch (columnIndex) {
case 0:
return String.class;
case 1:
return Integer.class;
case 2:
return Integer.class;
case 3:
return Integer.c... | 8 |
@Override
public List<CommandEntity> findCommandByLawnMowerIndex(LawnInformationVO information, int index) {
if (information instanceof TextFileLawnInformationVO) {
TextFileLawnInformationVO textFileInformation = (TextFileLawnInformationVO) information;
// Reading from file
setFileToRead(Paths.get(textFile... | 7 |
public String nextCDATA() throws JSONException {
char c;
int i;
StringBuffer sb = new StringBuffer();
for (;;) {
c = next();
if (end()) {
throw syntaxError("Unclosed CDATA");
}
sb.append(c);
i = ... | 6 |
private Vector<String> createRankcapVector(int rank) {
Vector<String> rankcapVector = new Vector<String>();
if (rank<4)
{
rankcapVector.add("11");
rankcapVector.add("10");
rankcapVector.add("9");
rankcapVector.add("6");
rankcapVector.add("3");
}
else if (rank<7)
{
rankcapVector.add("11");
... | 6 |
public PrimitiveOperator combineMidNLeftOnLeft(PrimitiveOperator other) {
boolean[] newTruthTable = new boolean[8];
// the other gate is on the left side - on the MSB
newTruthTable[0] = truthTable[((other.truthTable[0]) ? 4 : 0) | 0]; //000
newTruthTable[1] = truthTable[((other.truthTable[0]) ? 4 : 0) ... | 8 |
@Override
public String toString(){
switch(status){
case 0:
return "["+formatDate(new Date())+"]"
+"[Unapproved]"+getSender().getName()
+": /"+getCommand();
case 1:
if(getOverseer() != null && getCompletionTime() != null)
return "["+formatDate(getCompletionTime())+"]"
+"[Approved: "+getO... | 9 |
private static ArrayList<int[]> readOrWriteNextRLE(RunLengthEncoding rle)
throws IOException, ClassNotFoundException {
if (WRITE_MODE) {
encodeRLE(rle, os);
return rleToList(rle);
} else {
return decodeRLE(is);
}
} | 1 |
public boolean getBoolean(){
String value = this.value.trim().toLowerCase();
if( "true".equals( value ))
return true;
if( "on".equals( value ))
return true;
if( "1".equals( value ))
return true;
if( "yes".equals( value ))
r... | 8 |
int sizeOfNextSubPiece(String content) {
if (content.charAt(0) != openingBracket)
return -1;
int openBrackets = 0;
char c;
char[] chars = content.toCharArray();
for (int i = 1; i < chars.length; i++) {
c = chars[i];
if (c == openingBracket)
... | 5 |
public int getMostEast() {
for (int c = matrix.length - 1; c >= 0; c--) {
for (int r = 0; r < matrix.length; r++) {
if (checkSlot(r, c))
return c;
}
}
return -1;
} | 3 |
private Rectangle2D createShadow(RectangularShape bar, double xOffset,
double yOffset, RectangleEdge base, boolean pegShadow) {
double x0 = bar.getMinX();
double x1 = bar.getMaxX();
double y0 = bar.getMinY();
double y1 = bar.getMaxY();
if (base == RectangleEdge.TOP) {... | 8 |
public static void init() throws IOException {
for (int i = 0; i < runAnimationLeft.length; i++) {
runAnimationLeft[i] = ((BufferedImage) image).getSubimage(i * 143, 0, 143, 178);
runAnimationRight[i] = ((BufferedImage) image).getSubimage(i * 143, 0, 143, 178);
}
image = ... | 3 |
@EventHandler
public void playerMove(PlayerMoveEvent event) {
PigTeam team = null;
for (CTFTeam t : Teams) {
if (t.inTeam( CTFPlugin.getTeamPlayer(event.getPlayer()) )) {
team = (PigTeam) t;
break;
}
}
if (team == null){
return;
}
Goal goal = team.getGoal();
if (goal ... | 6 |
public int specialHash(){
// EDebug.print(myAutoPoint.hashCode() + getText().hashCode());
return myAutoPoint == null? -1 : myAutoPoint.hashCode() + this.getText().hashCode();
} | 1 |
public static void main(String[] args) {
List<String> list = new ArrayList<String>(
Arrays.asList("cat", "dog", "horse")
);
System.out.println(list);
Iterator<String> it = list.iterator();
while (it.hasNext()) {
System.out.println(it.next());
it.remove();
System.out.println(list);
}
} | 1 |
public void addClassDoc(ClassDoc classdoc) {
if (classdoc == null) {
return;
}
addClass(classdoc, allClasses);
if (classdoc.isOrdinaryClass()) {
addClass(classdoc, ordinaryClasses);
} else if (classdoc.isException()) {
addClass(classdoc, except... | 7 |
private boolean add() throws UnsupportedEncodingException {
if(addStoreName == null || addStoreName.isEmpty())
return false ;
if(addStoreAddr == null || addStoreAddr.isEmpty())
return false ;
String tempName = new String(addStoreName.getBytes("ISO-8859-1"),"UTF-8") ;
String tempAddr = new String(addSto... | 5 |
IA(Parametre param){
this.listePossibles = new ListeCombinaison(param);
this.derniereCombiJouee = null;
} | 0 |
public void makePersistentHumanProp() {
try {
this.humanProp = (HumanProp) cache.get("humanProp");
LinkedHashMap<String, LinkedHashMap<String, String>> lhm = humanProp
.getRootMap();
Element root = new Element("root");
for (String key : lhm.keySet()) {
if (key == null || lhm.get(key) == null
... | 6 |
public Player getOppositePlayer(Player player) {
return player == this.playerWhite ? this.playerBlack : this.playerWhite;
} | 1 |
protected double updateAll(CorefInput input, CorefOutput outputCorrect,
CorefOutput outputPredicted, double learningRate) {
double loss = 0d;
// Update all false positive and all false negative edges.
for (int rightMention = 0; rightMention < input.getNumberOfTokens(); ++rightMention) {
int correctClusterOf... | 9 |
private MoveEvalScore minimax(BoardMove node, int depth, int hole)
{
//if depth = 0 or node is a terminal node
if(depth == 0 || Kalah.gameOver(node.getBoard()))
{
//heuristic value of node
return new MoveEvalScore(hole,evalFunc.compareScoringWells(node, initialDepth % 2 == 0 ?node.getNextSide(... | 9 |
@SuppressWarnings("empty-statement")
public void Show(String uname)
{
User moves = new User();
ASCII_Art a = new ASCII_Art();
ASCII_Tiles t = new ASCII_Tiles();
//Display EQ
delayASC(a.getEq(), 250);
Options o = new Options();
t.setTilePairs(o.getTilePairs... | 9 |
private static int merge(Candidate[] K, int k, int i, int[] equvalenceLines,
boolean[] equivalence, int p) {
int r = 0;
Candidate c = K[0];
do {
int j = equvalenceLines[p];
int s = binarySearch(K, j, r, k);
if (s >= 0) {
... | 8 |
public void tick()
{
if (this.currentScene == null) return;
synchronized (this.appletRef.getPaintLock())
{
Enumeration localEnumeration = this.currentScene.getActors().elements();
while (localEnumeration.hasMoreElements())
{
Actor localActor = (Actor)localEnumeration.nextElement... | 5 |
public Node<K> getRight() {
return right;
} | 0 |
protected HttpClient getHttpClient() {
if (this.caHTTPClient == null) {
this.caHTTPClient = createHttpClient();
}
return this.caHTTPClient;
} | 1 |
private void compareButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_compareButtonActionPerformed
if (compareFile == null) {
JOptionPane.showMessageDialog(this, "Compare file hasn't been set.");
return;
}
if (baseFile == null) {
JOption... | 3 |
public static TreeMap<String,ArrayList<Integer>> SplitAttribute(Table table, String attribute) {
int attrSize = table.RowSize();
int attrIndex = table.GetAttributeIndex(attribute);
if (attrIndex==-1) return null;
// treemap contains subsets of Attribute splitted by TargetAttribute
TreeMap<String,ArrayList<In... | 3 |
public boolean check(int px, int py)
{
return px > this.x && px < (this.x + this.w) && py > this.y && py < (this.y + this.h);
} | 3 |
public static void saveChannels() {
if (Channels == null || ChannelsFile == null) {
return;
}
try {
getChannels().save(ChannelsFile);
} catch (IOException ex) {
Messenger.severe("Could not save config to " + ChannelsFile);
}
} | 3 |
private File toFile(final Properties azotProperties, final String key, final String defaultValue) {
File file = null;
if (azotProperties.getProperty(key) != null) {
try {
final String fileName = azotProperties.getProperty(key);
if(fileName != null) {
file = new File(fileName);
if(!file.exists()... | 5 |
public static void main(String args[]) {
/* Set the Nimbus look and feel */
//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
/* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
* For details see http://down... | 6 |
public Component getEditorComponent(final PropertyEditor editor)
{
String[] tags = editor.getTags();
String text = editor.getAsText();
if (editor.supportsCustomEditor())
{
return editor.getCustomEditor();
}
else if (tags != null)
{
// m... | 5 |
private boolean r_Step_4() {
int among_var;
int v_1;
// (, line 140
// [, line 141
ket = cursor;
// substring, line 141
among_var = find_among_b(a_7, 18);
if (among_var == 0)
... | 9 |
public static PropertyResource getInstance(String propPath)
{
if (PROPERTY_RESOURCE == null)
{
PROPERTY_RESOURCE = new PropertyResource(propPath);
}
return PROPERTY_RESOURCE;
} | 1 |
public void initEdge(){
for(Node n : this.getNodes()){
int x = Integer.parseInt(n.name.split(":")[0]);
int y = Integer.parseInt(n.name.split(":")[1]);
if(n.name.split(":")[2].equals("void")){
Node otherNode = this.getNode(x-1 + " : " + y );... | 4 |
void incrementalThreadStart() {
incrementalEvents = new Vector<ImageLoaderEvent>();
incrementalThread = new Thread("Incremental") {
public void run() {
// Draw the first ImageData increment.
while (incrementalEvents != null) {
// Synchronize so we don't try to remove when the vector is null.
sy... | 4 |
public static void main(String[] args)
{
int distinct = 0, words = 0, processed = 0;
int minlen = Integer.parseInt(args[0]);
String lastWordInserted = null;
String filename = args[1];
BinarySearchST<String, Integer> st = new BinarySearchST<String, Integer>(
10000);
try
{
BufferedReader input = ne... | 7 |
@Override
public void mouseWheelMoved(MouseWheelEvent event) {
if (event.getScrollType() == MouseWheelEvent.WHEEL_UNIT_SCROLL) {
int amt = event.getUnitsToScroll();
JScrollBar bar = event.isShiftDown() ? mHSB : mVSB;
bar.setValue(bar.getValue() + amt * bar.getUnitIncrement());
}
} | 2 |
@Override
public DataBuffers getFileData(HTTPRequest request) throws HTTPException
{
// split the uri by slashes -- the first char is always /!!
final String[] url = request.getUrlPath().split("/");
// first thing is to check for servlets
if(url.length > 1)
{
final Class<? extends SimpleServlet> servletC... | 9 |
public void displayAllCandidates() {
if (nakeds == null) {
System.out.println("No Candidates Stored");
return;
}
for (int i=0; i < nakeds.size(); i++) {
NakedCandidates current = nakeds.get(i);
System.out.println("Eval at Coordinate x="+current.x+", y="+current.y);
for (int j=0; j < current.v... | 3 |
public static String postHtml(String url,String charSet,Map<String,String> param){
DefaultHttpClient httpClient = new DefaultHttpClient();
HttpPost httpPost = postForm(url,param);
HttpResponse httpResponse = null;
try {
httpResponse = httpClient.execute(httpPost);
} c... | 3 |
public static void main(String[] args) throws Exception
{
new Main(new File("."), args).start();
} | 0 |
private String copyOrCatUrl(String dst, String src) {
if (src != null) {
if (src.startsWith("http://")) {
dst = src;
} else {
if (!src.startsWith("/")) {
dst += "/";
}
dst += src;
}
}
... | 3 |
protected void setProperty(Object object, String name, String value)
throws SQLException {
Class<?> type = object.getClass();
PropertyDescriptor[] descriptors;
try {
descriptors = Introspector.getBeanInfo(type)
.getPropertyDescriptors();
} catch (Exception ex) {
SQLException sql... | 7 |
private boolean getShipCoords() {
System.out.println("INSIDE GET SHIP COORDS");
this.validPoints = 0;
this.pointsOnBoard = 0;
int size = this.shipSelected.getSize(); //Gets tje size of the Ship from class Ship
int orientation = this.shipSelected.getOrientation(); //Gets the ori... | 9 |
protected void demo11() throws IOException, UnknownHostException, CycApiException {
if (cycAccess.isOpenCyc()) {
Log.current.println("\nThis demo is not available in OpenCyc");
}
else {
Log.current.println("Demonstrating getImpreciseParaphrase api function.\n");
CycFormulaSentence formula ... | 1 |
public Coordinate shiftTarget(int direction, Coordinate c) {
int shiftWide = 1;
switch(direction) {
case 0: return new Coordinate(c.getXCoordinate() ,c.getYCoordinate()+shiftWide);
case 1: return new Coordinate(c.getXCoordinate()-shiftWide,c.getYCoordinate()+shiftWide);
case 2: return new Coordinat... | 8 |
@Override
public boolean isValid( PositionValidator validator )
{
if (coordinates==null) return false;
if (coordinates.size()==0) return false;
for ( List<List<Double>> linearRing : coordinates )
{
if (linearRing==null) return false;
if (linearRing.size()<4) return false;
for ( List<Double> posit... | 8 |
public static JButton getDefenceThrowButton() {
if (defenceThrowButton == null) {
defenceThrowButton = new JButton("Throw");
defenceThrowButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
// int dice = (Integer) defenceSpinner.getValue();
int dice = ((D... | 7 |
public Tile getTile(int x, int y) {
for (int i = 0; i < tiles.size(); i++) {
if (tiles.get(i).getX() == x && tiles.get(i).getY() == y) {
return tiles.get(i);
}
}
return null;
} | 3 |
public static void main(String[] args) throws IOException {
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
String line = "";
StringBuilder out = new StringBuilder();
int MOD = 1000000, MAX = 101;
int[][] dp = new int[MAX][MAX];
dp[0][0] = 1;
for (int i = 1; i < dp.length; i++) {... | 6 |
@Override
public void focusLost(FocusEvent e) {
recordRenderer(e.getComponent());
textArea.hasFocus = false;
} | 0 |
public static <E extends Comparable <E>> void subsets(E[] array) {
if (array == null)
return;
HeapSort.sort(array);
for (int i = 0; i < array.length - 2; i++) {
if (array[i] != array[i + 1]) {
for (int j = i + 1; j < array.length - 1; j++) {
if (array[j] != array[j + 1]) {
for (... | 8 |
protected JPanel createPicrossPanel(boolean fileOpened){
JPanel panel = new JPanel();
// Calculate Parameters
int leftColumnWidth = maxSize(picross.left) * pixelSize;
int leftColumnHeight = picross.left.size() * pixelSize;
int upColumnWidth = picross.up.size() * pixelSize;
... | 7 |
public String getDescription() {
return delegate.getDescription();
} | 0 |
private void drawPiece(Graphics2D g2) {
if (piece == null) return;
Pos center = piece.getCenter();
for (int x = 0; x < piece.getWidth(); x++) {
for (int y = 0; y < piece.getHeight(); y++) {
if (piece.get(x, y)) {
int cx = x + posX - center.x;
... | 5 |
public Class<? extends Tag> getListType() {
if (type.getName().equals("java.lang.Class"))
return CompoundTag.class;
else
return type;
} | 2 |
public void tryProcessNewVehicles(int time,Simulator sim) throws VehicleException, SimulationException {
if(time > Constants.CLOSING_TIME || time < 0)
throw new VehicleException("Time violate constraints");
// try create new vehicle
if(sim.newCarTrial()){
if(sim.smallCarTrial()){
count++;
Car sc = n... | 5 |
public static PlayerChoice randomChoice() {
double i = Math.rint(Math.random() * 100);
if(i<33)
return createPlayerChoiceFromCode(ChoiceCode.P);
if(i>66)
return createPlayerChoiceFromCode(ChoiceCode.R);
return createPlayerChoiceFromCode(ChoiceCode.S);
} | 2 |
public void checkpoint(SegmentInfos segmentInfos, boolean isCommit) throws IOException {
if (infoStream != null) {
message("now checkpoint \"" + segmentInfos.getCurrentSegmentFileName() + "\" [" + segmentInfos.size() + " segments " + "; isCommit = " + isCommit + "]");
}
// Try again now to delete an... | 7 |
public void setBulletTimer(long timer){
this.bulletTimer = timer;
} | 0 |
public void run() {
try {
boolean running = true;
while (running) {
// Small delay to prevent spamming of the channel
Thread.sleep(_bot.getMessageDelay());
String line = (String) _outQueue.next();
if (line !... | 3 |
protected void calcFATSz() {
if (BPB_FATSz16 != 0) {
FATSz = BPB_FATSz16;
} else {
FATSz = BPB_FATSz32;
}
} | 1 |
private int xoff(int dir) {
switch (dir) {
case 0:
case 7:
case 6:
return -1;
case 1:
case 5:
return 0;
case 2:
case 3:
case 4:
return 1;
}
return 0;
} | 8 |
protected int possiblyAddColVar(CycVariable colVar) {
String col = colVar.toString();
int colIndex = -1;
List<String> columnNames = getColumnNamesUnsafe();
if ((colIndex = columnNames.indexOf(col)) < 0) {
columnNames.add(col);
for (List<Object> row : getRS()) {
row.add(null);
}... | 2 |
public JPasswordField getjPasswordFieldMdp() {
return jPasswordFieldMdp;
} | 0 |
public static void printAll()
{
try
{
PreparedStatement stmt = Main.EMART_CONNECTION.prepareStatement("select * " +
"from martitem");
ResultSet rs = stmt.executeQuery();
System.out.println("Mart Items:");
while (rs.next())
{
System.out.println("Item:");
System.out.println(rs.getString("... | 4 |
protected void setVisibleComponent(Component component) {
if (visibleComponent != null && visibleComponent != component && visibleComponent.getParent() == tabPane) {
visibleComponent.setVisible(false);
}
if (component != null && !component.isVisible()) {
component.setVisi... | 5 |
@Override
public double[] calculateFractal3DWithoutPeriodicity(Complex pixel) {
iterations = 0;
double temp = 0;
Complex[] complex = new Complex[1];
complex[0] = new Complex(pixel);//z
Complex zold = new Complex();
Complex zold2 = new Complex();
if(parser.f... | 9 |
@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 Option)) {
return false;
}
Option other = (Option) object;
if ((this.id == null && other.id != null) || (this.i... | 5 |
public Overview(Adrianna adrianna) {
super(new BorderLayout());
this.adrianna = adrianna;
JPanel topPanel = new JPanel();
topPanel.setLayout(new BoxLayout(topPanel, BoxLayout.LINE_AXIS));
topPanel.add(new JLabel("Directory"));
topPanel.add(Box.createHorizontalBox());
pathField = new JTextField(ad... | 5 |
@Override
public String getDesc() {
return "Default";
} | 0 |
public void characters(char ch[], int start, int length) throws SAXException {
if (title) {
document.setTitle(new String(ch, start, length));
title = false;
}
if (dateline) {
document.setDateline(new String(ch, start, length));
dateline = false;
}
//we don't actually do anything here... this ... | 7 |
public static void createDisplay() {
try {
PixelFormat pixelFormat = new PixelFormat();
ContextAttribs contextAttribs = new ContextAttribs(3,2).withProfileCore(true);
Display.setDisplayMode(new DisplayMode(1280, 800));
Display.create(pixelFormat,contextAttribs);... | 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.