text stringlengths 14 410k | label int32 0 9 |
|---|---|
private void queryTable(String tableName) throws SQLException {
if (conn != null)
{
PreparedStatement stmt = conn.prepareStatement(String.format("SELECT * FROM %s", tableName));
ResultSet rs = stmt.executeQuery();
while (rs.next())
{
for (int i = 1; i <= rs.getMetaData().getColumnCount(); i++) ... | 3 |
@Override
public void startSetup(Attributes atts) {
setText(atts.getValue(A_TEXT));
String mnemonic = atts.getValue(A_MNEMONIC);
if (mnemonic != null && mnemonic.length() > 0) {
mnemonic = mnemonic.trim().toUpperCase();
int mnemonicInt = mnemonic.charAt(0);
setMnemonic(mnemonicInt);
}
Outliner... | 2 |
protected synchronized void processEvent(Sim_event ev)
{
switch ( ev.get_tag() )
{
case GridSimTags.PKT_FORWARD:
case GridSimTags.JUNK_PKT:
processNetPacket( ev, ev.get_tag() );
break;
case GridSimTags.ROUTER_AD:
re... | 4 |
public static void main(String[] args) {
File f = new File("files/readme.txt");
BufferedReader reader = null;
BufferedWriter out = null;
int recuento = 0;
try {
reader = new BufferedReader(new InputStreamReader(
new FileInputStream(f)));
String line = reader.readLine();
while (line != null) {
... | 6 |
public Object getSelectedItem(Object component) {
String classname = getClass(component);
if ((classname == "combobox") || (classname == "tabbedpane")) {
int index = getInteger(component, "selected",
(classname == "combobox") ? -1 : 0);
return (index != -1) ? getItemImpl(component, ":comp", index) : null;... | 9 |
public static void changeData(String c_id,String c_pw, String c_name, String c_email, String c_phone, String path)
{
Connection conn = null;
FileInputStream fis = null;
PreparedStatement psmt =null;
try {
Class.forName("com.mysql.jdbc.Driver");
conn = DriverManager.getConnection("jdbc:mysql://... | 9 |
final public void Block_statement() throws ParseException {
/*@bgen(jjtree) Block_statement */
SimpleNode jjtn000 = new SimpleNode(JJTBLOCK_STATEMENT);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
jjtn000.jjtSetFirstToken(getToken(1));
try {
Statement();
} catch (... | 8 |
public static void sort(long []arr){
int k=0;
long tmp = 0;
for(int i=0;i<arr.length;i++){
k = i;
for(int j=i;j<arr.length;j++){
if(arr[j] < arr[k]){
k = j;
}
}
tmp = arr[i];
arr[i] = arr[k];
arr[k] = tmp;
}
} | 3 |
public static String setOfSequencesToString(FastVector setOfSequences, Instances dataSet, FastVector filterAttributes) {
StringBuffer resString = new StringBuffer();
Enumeration SequencesEnum = setOfSequences.elements();
int i = 1;
boolean printSeq;
while(SequencesEnum.hasMoreElements()) {
Se... | 7 |
public static void displayResults(Event event) {
int size = loserStack.size();
for (int i = 0; i < size; i++) {
Team team = (Team) loserStack.pop();
if (i > 2) {
System.out.println(i + 1 + "th:" + " "
+ team.olympian1.getName() + " "
+ team.olympian2.getName());
event.getPlacing()[i] = te... | 5 |
private StoreInstruction getExceptionStore(StructuredBlock catchBlock) {
if (!(catchBlock instanceof SequentialBlock)
|| !(catchBlock.getSubBlocks()[0] instanceof InstructionBlock))
return null;
Expression instr = ((InstructionBlock) catchBlock.getSubBlocks()[0])
.getInstruction();
if (!(instr instanc... | 5 |
public void loadRestrictions() {
// Clear res.
restrictions.clear();
List<String> items = plugin.getConfigHandler().getRestrictedItems();
int count = 0;
// For every name included in the config, do some things
for (String item : items) {
Restriction r = new Restriction();
int itemID = plugin.getCo... | 8 |
private static void addSomeMetadata( OtuWrapper wrapper,
String inFile, String outFile, boolean rOutput )
throws Exception
{
HashMap<String, PatientMetadata> metaMap =
PatientMetadata.getAsMap();
HashMap<String, NewBiomarkerParser> bioMarkerMetaMap =
NewBiomarkerParser.getMetaMap();
//Syste... | 8 |
public boolean isOutOfCellBounds()
{
boolean out = false;
switch (direction) {
case 0:
out = (int)y <= (row - 1) * pixels + pixels / 2;
break;
case 1:
out = (int)x >= (column + 1) * pixels + pixels / 2;
... | 4 |
@Override
public boolean equals(Object obj) {
if (obj == null) {
return false;
}
if (getClass() != obj.getClass()) {
return false;
}
final Teacher other = (Teacher) obj;
if (!Objects.equals(this.getName(), other.getName())) {
return... | 4 |
@Override
public int compareTo(Edge o) {
if(this==o){ return 0; }
if(this.weight==o.weight){
return 0;
}
if(this.weight>o.weight){
return 1;
} else {
return -1;
}
} | 3 |
public void lisaaSeuraavaArvollinen(Arvollinen arvollinen)
throws IllegalArgumentException, IllegalStateException {
if (arvollinen == null) {
throw new IllegalArgumentException();
}
if (seuraavaArvollinen != null) {
throw new IllegalStateException();... | 2 |
static String filterZinOfWoord(String reeks) {
for(int i = 0; i < reeks.length(); i++) {
char temp = reeks.charAt(i);
String temp2 = Character.toString(temp);
if(reeks.charAt(i) > 31 && reeks.charAt(i) < 65)
reeks = reeks.replace(temp2," ");
else if(reeks.charAt(i) > 90 && reeks.charAt(i) < 97)
r... | 8 |
public void actionPerformed(ActionEvent e) {
if(e.getSource() == login_but)
{
if (login.getText().length() != 0 &&
password.getPassword().length != 0)
{
String pass = CallbackConstants.toMD5_String(password.getPassword().toString());
String log = login.getText();
try {
int callbac... | 9 |
@Override
public boolean isDone(Game game)
{
//END Condition: there must be in the game:
// * exactly limit amount of sprites of type stype1
// * exactly subTypesNum number of subtypes of stype1
boolean ended = super.isFinished(game);
if(ended)
return true;... | 9 |
public static void main(String[] args){
System.out.println("_________________________________________________");
System.out.println("Welcome to the Innumeracy Math Library for Java demo!");
System.out.println("Choose from 1 of the following options:");
System.out.println("_______________________________________... | 3 |
public static void Prepare(Plugin plugin) {
MySQL.setPlugin(plugin);
SQLLogin = new File(plugin.getDataFolder() + File.separator + "MySQL.yml");
System.out.println("Filepath" + SQLLogin.getPath());
if (!SQLLogin.exists()) {
System.out.println("MySQL.yml was not found, Creating it");
System.out.println("Pl... | 5 |
public BoundMethod(Object self, Method method, Object[] parameters) {
this.self = self;
this.method = method;
this.parameters = parameters;
if (method != null && parameters != null) {
Class[] methodTypes = method.getParameterTypes();
if (methodTypes.length != par... | 4 |
@EventHandler
public void onPlayerCancelRoute(PlayerInteractEvent event) {
Player player = event.getPlayer();
ItemStack item = event.getItem();
if (this.manager.isRouteCancelItem(item) && this.manager.isRoutePlayer(player)) {
if (event.getAction() == Action.RIGHT_CLICK_BLOCK) {
Location loc = event.getCli... | 3 |
protected void drawMixedMediaText(BufferedImage target, ArrayList<MixedMediaText> lines, ElementLayout elementLayout) {
Graphics2D g = (Graphics2D) target.getGraphics();
g.setFont(elementLayout.getFont());
g.setColor(elementLayout.getCardFont().getColor());
g.setRenderingHint(RenderingHi... | 8 |
@Id
@GeneratedValue
public int getId() {
return id;
} | 0 |
private void deleteItem()
{
String stock_num = null;
System.out.println("Type the stock number of the item you would like to delete from the cart.");
try {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
stock_num = br.readLine();
} catch (Exception e) {
System.out.println("error... | 4 |
public static void main(String[] args) throws IOException {
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
String line = "";
StringBuilder out = new StringBuilder();
Dijkstra G = new Dijkstra(101);
while ((line = in.readLine()) != null && line.length() != 0) {
int[] nk = readInts... | 7 |
public int find(String string) {
if (string==null) {
return -1;
}
for (int i=0;i!=m_stringOffsets.length;++i) {
int offset=m_stringOffsets[i];
int length=getShort(m_strings,offset);
if (length!=string.length()) {
continue;
}
int j=0;
for (;j!=length;++j) {
offset+=2;
if (string.ch... | 6 |
public byte getBiomeID(int x,int z){
return biomeID[x][z];
} | 0 |
public ManagerArchivo() {
try {
escribirLog("[" + new Date() + "] INICIO DEL PROGRAMA");
FileReader fr = null;
BufferedReader br = null;
ArrayList<String> lineas = new ArrayList<String>();
fr = new FileReader(new File("estudio_juridico.conf"));
... | 8 |
public Command(String name, int numberOfArgs, String helpMessage) {
this.name = name;
this.numberOfArgs = numberOfArgs;
this.helpMessage = helpMessage;
commands.add(this);
} | 9 |
public void add(double value) {
if (Double.isNaN(value)) {
value = 0d;
}
Date now = new Date();
lastValue = value;
avg30Min += value;
last30Minutes.add(new Tuple<Date, Double>(new Date(), value));
if (last30Minutes.size() > 30) {
avg30Min -= first(last30Minutes).getSecond();
last30Minutes.remove... | 6 |
public void remove() {
if (this.root != null) {
FibonacciHeapNode beforeHighestPriority = this.root;
FibonacciHeapNode root = this.root.next;
if (root == null) {
this.root.tree.remove();
} else {
do {
if (befor... | 7 |
public static void run_spell_check(File dic, File doc, String option)
{
// Creating a new SpellCheckerUtil object with the dictionary file
SpellCheckUtil mySC = new SpellCheckUtil(dic);
// Creating a list of misspelled words after checking spellcheking the document
List<String> misspelledWords = mySC.spellC... | 6 |
public int readMono(short[] outputArray) throws IOException {
if (this.nChannels == 1) {
return read(outputArray);
} else {
int len = outputArray.length;
short[] stereoArray = new short[len * 2];
int bytesRead = read(stereoArray);
for (int i = ... | 3 |
private void parseArgs(String[] args) {
if (args.length <= 1) throw new IllegalArgumentException("Not enough arguments.");
String targetFilename = args[0];
if (!targetFilename.endsWith(".zip")) throw new IllegalArgumentException("The target filename must end in .zip");
outFile = new TransactionalFileOutputStrea... | 3 |
public void testConstructor_RI_RD5() throws Throwable {
DateTime dt = new DateTime(TEST_TIME_NOW);
Duration dur = new Duration(-1);
try {
new MutableInterval(dt, dur);
fail();
} catch (IllegalArgumentException ex) {}
} | 1 |
@Override
public void paint(Graphics g) {
super.paint(g);
Graphics2D g2d = (Graphics2D) g;
//g2d.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);... | 9 |
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
read(new org.apache.thrift.protocol.... | 1 |
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int number = 0;
List<Integer> factors = new ArrayList<Integer>();
try {
boolean success = false;
while (!success) {
try {
System.out.print(... | 7 |
@Override
public List<E> insert(E d) {
if (this.isEmpty()) {
super.insert(d);
} else {
this.setFirst();
// New item is the smallest item so far
if (list.data.compareTo(d) > 0) {
insertFirst(d);
return this;
}
// Find the item where the new item should be placed after
while (list.nex... | 5 |
public static void addToEmptyTeam(Player player) {
if (blueMembers == null) {
blueMembers = player;
blueFriends.add(player);
} else if (greenMembers == null) {
greenMembers = player;
greenFriends.add(player);
} else if (orangeMembers == null) {
orangeMembers = player;
orangeFriends.add(player);
... | 4 |
private void digOut(final LayeredMap map,
Point p, Point dir, int range, Random rand)
{
if(range < 1) {
return;
}
// System.err.println("Digging " + range + " squares.");
final Point pos = new Point(p.x, p.y);
for(int x=0; x<range; x++) ... | 8 |
public Secteur getSecteur() {
return secteur;
} | 0 |
protected void addMenu() {
JMenuBar bar = new JMenuBar();
JMenu op = new JMenu("");
JMenu help = new JMenu("");
JMenuItem admin = new JMenuItem("¼û");
JMenuItem exit = new JMenuItem("˳");
JMenuItem author = new JMenuItem("");
admin.setActionCommand("admin");
exit.setActionCommand("exit");
author.set... | 0 |
public void genLegalDestsSaveKing(Piece king, Piece threat)
{
if ((isBlack() ? mBoard.getGame().getBlackRules() : mBoard.getGame().getWhiteRules()).objectivePiece(isBlack()) == this)
return;
if (king == null)
return;
Iterator<Square> oldLegalDests = getLegalDests().iterator();
Square sq = null;
if (mI... | 7 |
public static void main (String[] args) {
System.out.println("MAX_INPUT: " + MAX_INPUT);
int numberOfNets = 100;
Net[] nets = new Net[numberOfNets];
int netLength, netWidth;
netLength = netWidth = 6;
for (int runs = 0; runs < numberOfNets; runs++) {
... | 6 |
@Override
public void toString(String indent, StringBuilder buffer)
{
if (this.length == 0)
{
buffer.append("[]");
return;
}
if (this.subtype != TYPE_NBT)
{
buffer.append("[ ");
buffer.append(Array.get(this.array, 0));
for (int i = 1; i < this.length; i++)
{
buffer.append(", ").appen... | 4 |
private boolean cleverRandom (Square square, Human human, Mark mark) {
Mark humanMark = new Mark(human.getMark());
if (square.belongs(humanMark, '2', 'a') && square.belongs(humanMark, '1', 'b')) {
mark.setLeftCoord('1');
mark.setTopCoord('a');
square.putMark(mark);
... | 8 |
protected void setAttributesByShortcut(String shortcut, TimeBanBanCommand command) {
ConfigurationSection shortcuts = config.getConfigurationSection("shortcuts");
// configure reason
String reason = shortcuts.getConfigurationSection(shortcut).getString("reason");
if (reason == null || r... | 4 |
public static boolean importHover(double xPos,double yPos) {
int check = 0;
if((xPos > importXborderL) && (xPos < importXborderR))
check+=1;
if((yPos > importYborderT) && (yPos < importYborderB))
check+=1;
return check == 2;
} | 4 |
public static int doExecuteUpdate(String storedProcedure, ArrayList<String> arglist) throws DALException
{
try {
String prepCallParams = "";
for (int i=0; i<arglist.size(); i++)
prepCallParams += prepCallParams == "" ? "?" : ",?";
cstm = conn.prepareCall(" { CALL "+storedProcedure+"(" + prepCallParams ... | 5 |
private void remplirHashMap(String key) {
ArrayList<Character> al=new ArrayList<Character>();
for(int i=0;i<key.length();i++) {
if(this.alpha.contains(key.charAt(i)+"")) {
al.add(key.charAt(i));
}
}
for(int i=0;i<ALPHABET.length();i++) {
if(!al.contains(ALPHABET.charAt(i)) && this.alpha.contains(AL... | 6 |
public boolean equals(Object object) {
if (this == object) return true;
if (!(object instanceof CacheKey)) return false;
final CacheKey cacheKey = (CacheKey) object;
if (hashcode != cacheKey.hashcode) return false;
if (checksum != cacheKey.checksum) return false;
if (count != cacheKey.count) r... | 9 |
public ShipUnlockPanel( FTLFrame frame ) {
this.setLayout( new BoxLayout(this, BoxLayout.Y_AXIS) );
this.frame = frame;
log.trace( "Creating Ship Unlock panel" );
log.trace("Adding ship unlocks");
JPanel shipPanel = new JPanel();
shipPanel.setLayout( new GridLayout(0, 3) );
shipPanel.setBorder( BorderF... | 2 |
public static Text getLabel(Graphics pen, Text text, String label)
{
Text temp = new Text(label);
double x = text.getPos().x + text.getWidth(pen) / 2 - temp.getWidth(pen) / 2;
double y = text.getPos().y - 2 * text.getHeight(pen);
temp.setPos(new Point2D.Double(x, y));
return... | 0 |
private Action getAction(String line) {
String[] lineSplitted = line.split(" ");
int second = Integer.parseInt(lineSplitted[0]);
String filePath = lineSplitted[2];
ActionsName a = ActionsName.valueOf(lineSplitted[ACTION_INDEX]);
Action action;
switch (a) {
... | 4 |
private boolean r_post_process_last_consonants() {
int among_var;
// (, line 415
// [, line 416
ket = cursor;
// substring, line 416
among_var = find_among_b(a_23, 4);
if (among_var == 0)
... | 6 |
public void setEnabledEditorTagged(boolean enabled) {
for (int i = 0; i < tabbed.getTabCount(); i++) {
Component c = tabbed.getComponentAt(i);
if (((Tag) componentTags.get(c)) instanceof EditorTag)
tabbed.setEnabledAt(i, enabled);
}
} | 2 |
private void btnRenameItemActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_btnRenameItemActionPerformed
{//GEN-HEADEREND:event_btnRenameItemActionPerformed
String thename = JOptionPane.showInputDialog(this, "Enter the new name for the item:", "WiiExplorer", JOptionPane.QUESTION_MESSAGE);
... | 5 |
public void run () {
if (threadId == 1) {
try {
lm.Lock (1, "a", LockManager.READ);
}
catch (DeadlockException e) {
System.out.println ("Deadlock.... ");
}
try {
this.sleep (4000);
}
catch (InterruptedException e) { }
try {
lm.Lock (1, "a", LockMan... | 8 |
private static void invokeMethod(Method m, Object obj) throws Exception {
m.invoke(obj, "dynamically invoked");
} | 0 |
private int getChar() throws IOException
{
if(this.eof)
{
return -1;
}
int result = this.in.read();
if(result == -1)
{
this.eof = true;
}
return result;
} | 2 |
@Override
protected String buildHeader() {
String header = options().header();
if (options().copyHeader()) {
Configuration def = getDefaults();
if ((def != null) && (def instanceof FileConfiguration)) {
FileConfiguration filedefaults = (FileConfiguration) de... | 9 |
public AttackState isAdvancing(Move mov) {
int iterateVertical = mov.getEnd().row - mov.getStart().row;
int iterateHorizontal = mov.getEnd().column - mov.getStart().column;
Piece.adjLoc nextSpace = new Piece.adjLoc(mov.getEnd().row + iterateVertical, mov.getEnd().column + iterateHorizontal);
Piece.adjLoc previo... | 8 |
public static void main(String[] args) throws InterruptedException {
int nbRows = 0, nbColumns = 0;
int minRows = 10, minCols = 10;
boolean cont = true;
while(cont) {
try {
System.out.println("Enter a number of rows (min " + minRows + ") : ");
nbRows = new Scanner(System.in).nextInt();
if... | 7 |
@SuppressWarnings("deprecation")
public void GET(String request, String full, Server server) {
BrowserGETRequestEvent bgre = new BrowserGETRequestEvent(this, request, full);
server.getEventSystem().callEvent(bgre);
if (bgre.isCancelled())
return;
String respond = bgre.getResponse();
if (respond.equals("")... | 3 |
public int maxProfit(int k, int[] prices) {
if(k>(prices.length+1)/2){
k=(prices.length+1)/2;
}
if(k==0) return 0;
prices=handle(prices);
return f(k,prices);
// 下面是另一种解法,使用的标准DP思想,复杂度也是多项式: N*N*N ,但是会超时
// Integer[][] aux = new Integer[prices.length + 1][];
// ... | 2 |
public String getAlgorithm() {
return algorithm;
} | 0 |
private boolean jj_3_77() {
if (jj_scan_token(PLUS)) return true;
return false;
} | 1 |
public String getCommand(int x) {
String y;
if (x == 1) {
y = "attack";
}
else if (x == 2) {
y = "defend";
}
else if (x == 3) {
y = "jump";
}
else {
y = "";
}
return y;
} | 3 |
@Override
public void execute() {
SceneObject rock = SceneEntities.getNearest(Main.getRockIDs());
if (Inventory.isFull()) {
if (BANK_AREA.contains(Players.getLocal().getLocation())) {
if (Bank.isOpen()) {
Bank.deposit(Main.oreID, 28);
} else {
Bank.open();
}
} else if (MINE_AREA.contain... | 8 |
public int compareTo(DBType dt) {
ByteArrayType bt = null;
if (dt instanceof ByteArrayType) {
bt = (ByteArrayType) dt;
} else {
return -1;
}
int thisLen = bytes!=null?bytes.length:0;
int btLen = bt.bytes!=null?bt.bytes.length:0;
if (btLen < thisLen) {
return 1;
}
if (btLen > thisLen) {
... | 9 |
public void update() {
UP = key[KeyEvent.VK_UP] || key[KeyEvent.VK_W];
DOWN = key[KeyEvent.VK_DOWN] || key[KeyEvent.VK_S];
LEFT = key[KeyEvent.VK_LEFT] || key[KeyEvent.VK_A];
RIGHT = key[KeyEvent.VK_RIGHT] || key[KeyEvent.VK_D];
if (UP != prevUP) {
System.out... | 8 |
public UndoQueueListener[] getUndoQueueListeners() {
return (UndoQueueListener[]) undoQueueListeners.toArray();
} | 0 |
@BeforeClass
public static void setUpClass() {
} | 0 |
@Id
@GeneratedValue
public int getId() {
return id;
} | 0 |
public ArrayList<Edge> getEdges() {
ArrayList<Edge> g = new ArrayList<Edge>();
setState(States.ARR_ADJ);
for (int i = 0; i < N; i++) {
for (int j = 0; j < N; j++) {
if (arr_adj[i][j] != 0)
g.add(new Edge(i, j, arr_adj[i][j]));
}
}
return g;
} | 3 |
public boolean _setSprite(Sprite sprite)
{
if(sprite != null)
{
this.sprite = sprite;
return true;
}
else
{
return false;
}
} | 1 |
private void compute_new_v()
{
// p is fully initialized from x1
//float[] p = _p;
// pp is fully initialized from p
//float[] pp = _pp;
//float[] new_v = _new_v;
//float[] new_v = new float[32]; // new V[0-15] and V[33-48] of Figure 3-A.2 in ISO DIS 11172-3
//float[] p = new float[16];
//float... | 1 |
public static void setConfigFile(String configFile) {
HibernateSessionFactory.configFile = configFile;
sessionFactory = null;
} | 0 |
private boolean notOverrideVessel(Map<String, EnumElement> board,
EnumLine line, EnumColumn column, boolean vertical,
EnumElement vessel) {
boolean empty = true;
for (int i = 1; i < (vessel.getLength() + 1); i++) {
if (vertical) {
line = EnumLine.getEnumLine(i);
empty = this.isEmpty(board, line, ... | 3 |
private void circumference (int circumference) throws IllegalArgumentException, Exception {
// Illegal call or Illegal arguments
if(socket == null) {
throw new Exception("Client:>>>Please connect to a host before specifying trust ring circumference");
} else if (circumference == 0) {
circumference = 1;
}
... | 4 |
public ArrayList<treeNode> generateTrees(int n) {
if (n == 0) {
ArrayList<treeNode> roots = new ArrayList<treeNode>();
roots.add(null);
return roots;
}
return generateSubTree(1, n);
} | 1 |
public void parse()
throws FileNotFoundException, IOException, ExParser, ExManifest {
BufferedReader lReader = null;
try {
lReader = new BufferedReader(new FileReader(mManifestFile));
String lLine;
int lHighestSequencePosition = 0;
Map<String, Integer> lFileIndexes = ne... | 8 |
void compress(int init_bits, OutputStream outs) throws IOException {
int fcode;
int i /* = 0 */;
int c;
int ent;
int disp;
int hsize_reg;
int hshift;
// Set up the globals: g_init_bits - initial number of bits
g_init_bits = init_bits;
// Set up the necessary values
clear_fl... | 9 |
public static boolean Load() {
sheets.clear();
Connection c = RpgConnection.getConnection();
if(c!=null) {
Statement s = null;
ResultSet results = null;
try {
s = c.createStatement();
results = s.executeQue... | 6 |
static protected Location parseLocationLine(String line) {
String latitude, longitude;
int latitudeSign = 1, longitudeSign = 1;
if(log.isDebugEnabled())
log.debug("line:" + line);
latitude = line.replaceAll("^.*CENTER LOCATED NEAR ", "");
latitude = latitude.replaceAll(" AT.*$", "");
if(latitude.ma... | 3 |
@FXML
private void handleCancelButton(ActionEvent event) {
getMessageBox().userAction = UserAction.CANCEL;
hide();
} | 0 |
public void setStateName(String stateName) {
this.stateName.set(stateName);
} | 0 |
@Override
public String getCur() {return cur.toString();} | 0 |
protected Object computeAssign(IEnv env, Object right) {
ASTNode leftNode = left();
if (leftNode instanceof PrimaryExpr) {
PrimaryExpr expr = (PrimaryExpr) leftNode;
if (expr.hasPostfix(0) && expr.postfix(0) instanceof ArrayRef) {
Object object = expr.evaluateSubExpr(env, 1);
if (object instanceof Obj... | 9 |
boolean wordBreakDFS( String s, Set<String> dict ) {
boolean result = false;
for( int i = 0; i < s.length(); i++ ) {
String head = s.substring(0, i + 1 );
String tail = s.substring( i + 1 );
if( dict.contains( head ) ) {
if( tail.length() == 0 ) {
... | 5 |
public FiguraGeometrica(double x, double y) {
posX = x;
posY = y;
} | 0 |
public static void debugPrintBlockedArray() {
for (int x = 0; x < MapEditorData.WIDTH_IN_TILES; x++) {
System.out.print("-");
}
System.out.println();
for (int y = 0; y < MapEditorData.HEIGHT_IN_TILES; y++) {
System.out.print("|");
for (int x = 0; x < MapEditorData.WIDTH_IN_TILES; x++) {
System.out.... | 5 |
public static void scoreRecords(Collection<Record> records) throws SQLException
{
Map<Integer, Integer> recordScoreSum = new TreeMap<Integer, Integer>();
Map<Integer, Integer> scoreCount = new TreeMap<Integer, Integer>();
String sql = "SELECT record_id,score_value from score_history where user_id ... | 4 |
private void resize() {
width = getSkinnable().getWidth();
height = getSkinnable().getHeight();
if (getSkinnable().isKeepAspect()) {
if (aspectRatio * width > height) {
width = 1 / (aspectRatio / height);
} else if (1 / (aspectRatio / height) > width) {
... | 6 |
public synchronized void closeAllConnections() {
for (Socket socket : openConnections) {
safeClose(socket);
}
} | 1 |
public Dimension calculatePreferredHeaderSize(TreePanel panel) {
Font font = getHeaderFont();
int width = getWidth();
if (panel.isUserSortable()) {
width -= SORTER_WIDTH;
}
Dimension size = TextDrawing.getPreferredSize(font, TextDrawing.wrapToPixelWidth(font, getName(), width));
if (panel.isUserSortable(... | 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.