text stringlengths 14 410k | label int32 0 9 |
|---|---|
public Listener getListener(String name) {
return this.listeners.get(name);
} | 0 |
private static void computeDerivatives(Image image, Mask gaussian, double[][] lx2, double[][] ly2, double[][] lxy) {
int w = image.getWidth(), h = image.getHeight();
Image gx = MaskUtils.applyMask(image,
MaskFactory.buildSobelMask(Direction.HORIZONTAL));
Image gy = MaskUtils.applyMask(image,
MaskFactory.b... | 8 |
@Override
public void ParseIn(Connection Main, Server Environment)
{
List<Integer> SendTo = new ArrayList<Integer>();
List<Integer> Failed = new ArrayList<Integer>();
int count = Main.DecodeInt();
for (int i = 0; i < count; i++)
{
SendTo.add(Main.DecodeInt()... | 6 |
public void actionPerformed(ActionEvent e) {
String[] args = getArgs(e);
String channel = args[0];
String sender = args[1];
String source = args[2];
String message = args[3];
if (isCommand("accountage", message))
{
if (a... | 6 |
public Rectangle2D getBounds() {
return this;
} | 0 |
public void ClearGrid()
{
for (int r=0; r < ROWS; r++) {
for (int c=0; c < COLS; c++) {
colorGrid[r][c] = new Colors();
}
}
} | 2 |
public List<Log_record> GetLog(access_level acc_level, Date begin_dat, Date end_dat)
{
String all_file = "";
InputStream file_in = null;
try {
file_in = c.get("/var/log/sunprint/business/business.inf");
byte[] buf = new byte[1024];
int reded_buf_siz... | 7 |
public static boolean hasIntersection(final Collection a, final Collection b) {
if (a.size() < 50 && b.size() < 50) {
Iterator it = a.iterator();
while(it.hasNext())
if (b.contains(it.next()))
return true;
}
else if (a.size() < b.size()... | 9 |
public void addText(String text) {
this.text.append(text);
} | 0 |
public CustomPanel(int row, int col, Player p1, Player p2, TicTacToeBoard state) {
location = new Position();
location.row = row;
location.col = col;
chosen = false;
player1 = p1;
player2 = p2;
turnState = state;
addMouseListener(
new MouseAdapter() {
/**
* This is the mouseClicked ... | 5 |
protected ConnectionProcessor getConnectionProcessor() {
return connectionProcessor;
} | 0 |
@Override
public boolean equals(Object obj) {
if (obj == null) {
return false;
}
if (getClass() != obj.getClass()) {
return false;
}
final Troupes other = (Troupes) obj;
if (!Objects.equals(this.nom, other.nom)) {
return false;
... | 4 |
protected Item getPoison(MOB mob)
{
if(mob==null)
return null;
if(mob.location()==null)
return null;
for(int i=0;i<mob.location().numItems();i++)
{
final Item I=mob.location().getItem(i);
if((I!=null)
&&(I instanceof Drink)
&&(((Drink)I).containsDrink())
&&(((Drink)I).liquidType()==RawMate... | 7 |
public static void parseMeshRenderer(String line)
{
int intIndex;
intIndex = line.indexOf("path");
if (intIndex == -1)
System.out.println("MeshRenderers require a path!");
else
{
int t = intIndex + 4;
char c = "a".charAt(0);
St... | 9 |
public static String IPToString(int ip){
StringBuilder sb = new StringBuilder();
for(int i=3; i>=0; i--){
sb.append((ip & (0xFF << (i*8))) >>> (i*8));
if(i > 0)
sb.append('.');
}
return sb.toString();
} | 2 |
private static boolean isDirectObservation(Term term) {
if (term.var != null) {
return true;
} else if (term.operation.isBehavorial()) {
// check whether it has hidden varable
boolean found = false;
for (int i=0; i<term.subterms.length; i++) {
if (term.subterms[i].var != n... | 8 |
public double compute( RowD1Matrix64F mat ) {
if( width != mat.numCols || width != mat.numRows ) {
throw new RuntimeException("Unexpected matrix dimension");
}
// make sure everything is in the proper state before it starts
initStructures();
// System.arraycopy(mat.d... | 8 |
private List<LightGrenade> getLightGrenadesOfGrid(Grid grid) {
final List<LightGrenade> lightGrenades = new ArrayList<LightGrenade>();
for (Element e : grid.getElementsOnGrid())
if (e instanceof LightGrenade)
lightGrenades.add((LightGrenade) e);
return lightGrenades;
} | 2 |
public HashSet<BigInteger> getFactors(BigInteger n) {
HashSet<BigInteger> factors = new HashSet<BigInteger>();
while (true) {
for (BigInteger i : primes) {
if (n.remainder(i).equals(ZERO)) {
n = n.divide(i);
factors.add(i);
... | 4 |
public String location() {
return "Acceptable only at select locations.";
} | 0 |
final int method1714(int i, int i_2_) {
anInt5926++;
if (((Class239) this).aClass348_Sub51_3136.method3425(-114))
return 3;
if (((Class239) this).aClass348_Sub51_3136.method3422(674)
== Class10.aClass230_186) {
if ((i_2_ ^ 0xffffffff) == -1) {
if (((Class348_Sub51) ((Class239) this).aClass348_Sub51_... | 7 |
public int getMax()
{
return seat.length;
} | 0 |
public static void main(String[] args) {
EventQueue.invokeLater(new Runnable() {
@Override
public void run() {
try {
Spel spel = new Spel();
KiesOnderwerp ko = new KiesOnderwerp(spel);
spel.openPanel(ko);
ko.updateUI();
} catch (Exception e) {
e.printStackTrace();
}
}
}... | 1 |
protected void checkEdge() {
if ((xmin < containerXMin || getXMax() > containerXMax) && run != 0) {
run *= -1;
}
if ((ymin < 0 || getYMax() > containerYMax) && rise != 0) {
rise *= -1;
}
} | 6 |
private void readNext() //exclusively for token
{
current = next;
if(current != null)
buffer = new StringTokenizer(current);
StringTokenizer temp = null;
do
{
try
{
next = myInFile.readLine();
}
... | 5 |
@Override
public Response info(InfoRequest request) throws IOException {
Mac hmac=null;
try {
hmac = Mac.getInstance("HmacSHA256");
} catch (NoSuchAlgorithmException e) {
System.err.println("NoSuchAlgorithmException (HmacSHA256 not valid): " + e.getMessage());
return new HmacErrorResponse("Integrity che... | 5 |
public boolean onCommand(CommandSender sender, Command cmd, String commandLabel, String[] args) {
if(commandLabel.equalsIgnoreCase("playerlogger")){
if (args.length == 0) {
sender.sendMessage(ChatColor.RED+"Usage: /playerlogger reload");
return false;
} else if (args.length == 1){
//Reload
if (... | 6 |
public void mouseClicked(int var1, int var2, int var3) {
boolean var4 = this.isEnabled && var1 >= this.xPos && var1 < this.xPos + this.width && var2 >= this.yPos && var2 < this.yPos + this.height;
this.setFocused(var4);
} | 4 |
public double proximity(CharSequence cSeq1, CharSequence cSeq2) {
// really only need to create one of these; other can just it and add
ObjectToCounterMap<String> tf1 = termFrequencyVector(cSeq1);
ObjectToCounterMap<String> tf2 = termFrequencyVector(cSeq2);
double len1 = 0.0;
dou... | 8 |
public void initializeForView(AutomatonPane view){
myView = view;
setLocationManually(myAutoPoint);
this.setDisabledTextColor(Color.BLACK);
this.setBackground(new Color(255, 255, 150));
this.addMouseMotionListener(new MouseMotionListener(){
public void mouseDragged(MouseEvent e) {
if (e.isPopupTr... | 5 |
@Override
/**
* A button has been clicked.
*/
public void actionPerformed( ActionEvent e ) {
// get the action string
String action = e.getActionCommand();
// the user has chosen to add a file
if( actio... | 6 |
public void clearShoppingCar(Map<?,?>shoppingCar){
shoppingCar.clear();;
} | 2 |
public void unregisterListener(Listener listener){
listenerLock.lock();
try{
for(ListenerPriority priority : listeners.keySet()){
Set<RegisteredEventListener> toRemove = new HashSet<RegisteredEventListener>();
for(RegisteredEventListener regListener : listeners.get(priority)){
if(regListener.getLi... | 7 |
private String multiLineCommentFilter(String line) {
if (line == null || line.equals("")) {
return "";
}
StringBuffer buf = new StringBuffer();
int index;
//First, check for the end of a multi-line comment.
if (inMultiLineComment && (index = line.indexOf("*/")... | 9 |
public void connect() throws Exception {
if (!isDriverInitialized) {
try {
initDriver();
} catch (ClassNotFoundException e) {
e.printStackTrace();
}
}
this.readFile();
try {
System.out.println(getDbURL());
... | 3 |
private void siftDown(int pos) {
if (2 * pos >= size) return;
int maxI = getMaxInd(2 * pos, 2 * pos + 1);
if (heap.get(maxI).compareTo(heap.get(pos)) > 0) {
swap(pos, maxI);
siftDown(maxI);
}
} | 2 |
public List<char[]> getResult(Combination guess, int[] score) {
if(remainingCombos.size() == 0) {
ComboMaker builder = new ComboMaker(charSet, length);
for(char[] combo: builder) {
Combination test;
int[] testScore = new int[2];
try {
test = new Combination(combo, charSet);
testScore = tes... | 9 |
public QuestionCostLabel()
{
PriceManager.getInstance().addListener(this);
setText(INIT_TEXT + PriceManager.getInstance().getPrice());
setFont(DefaultUIProvider.getQuestionPriceFont());
// priceLabel.setBorder(DefaultUIProvider.getDefaultEmptyBorder());
} | 0 |
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while(true){
int n = sc.nextInt();
int m = sc.nextInt();
if((n|m)==0)break;
int[] h = new int[n];
for(int i=0;i<n;i++)h[i]=sc.nextInt();
int[] w = new int[m];
for(int i=0;i<m;i++)w[i]=sc.nextInt();
int[] wh = new i... | 9 |
public ModeleApplication() {
// ArrayList<Metadonnee> listeMetaDonnees = new
// ArrayList<Metadonnee>();
metadonnee = new Metadonnee(new File("docs//test1.txt"));
liste = new Liste();
} | 0 |
@Override
public void run(){
stop = false;
play = true;
line.start();
while (!end){
if (play){
try {
while (((bytesRead = audioInputStream.read(bytes, 0, bytes.length)) != -1) && !stop && play) {
thi... | 9 |
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 |
AbstractRegex parseClosure(StringStream stream) {
switch (stream.peek()) {
case '^':
stream.poll();
return new HatRegex();
case '$':
stream.poll();
return new DollarRegex();
}
AbstractRegex term = parseTerm(s... | 8 |
public static void main(String[] args) {
Sort_List s = new Sort_List();
// int[] list= {5,4,3,2,1};
// s.Merge(list);
ListNode head = null;
ListNode temp = new ListNode(0);
head = temp;
for (int i = 5; i > 0; i--) {
ListNode node = new ListNode(i);
... | 1 |
private long rec(int i, int current) {
if (DP[i][current] != -1)
return DP[i][current];
if (i >= M.length()) {
return 1;
}
Integer x = M.charAt(i) - '0';
int next = 10 * current + x;
long res = 0;
if (next > 0 && next <= N) {
... | 7 |
@Test
public void ensureCoreBudgetItemsInBudgetContainsDifferentFormObjectTestTwo() {
List<CoreBudgetItem> coreBudgetItemList = new ArrayList<CoreBudgetItem>();
coreBudgetItemList.add(new CoreBudgetItem("Test Description", new BigDecimal("200")));
when(budgetFormData.getCoreBudgetItemsList... | 1 |
public void onRemove(Player senderPlayer, String[] args) {
Block targetBlock = senderPlayer.getTargetBlock(null, 100);
if(targetBlock == null) {
senderPlayer.sendMessage(ChatColor.DARK_RED + "You must be looking at a block while using this command!");
return;
}
if(FancyRoulette.instance.tableManager.remo... | 2 |
public void incColonists(Object args[]) {
final Background b = (Background) args[0] ;
final int
inc = (Integer) args[1],
index = Visit.indexOf(b, COLONIST_BACKGROUNDS) ;
int amount = colonists[index], total = 0 ;
for (int i : colonists) total += i ;
if (inc < 0 && amount <= 0) return ;
... | 5 |
public static List<List<String>> GoGraph(Stack<WordNode> path, List<List<String>> result, String end, List<WordNode> nextNode, Stack<Integer> Soncount) {
int son = Soncount.firstElement();
while(!nextNode.isEmpty()) {
int nextNodeson = 0;
boolean noway = true;
WordNode currentNode = ne... | 8 |
protected void changeSelection(Collection<Object> added,
Collection<Object> removed)
{
if ((added != null && !added.isEmpty())
|| (removed != null && !removed.isEmpty()))
{
mxSelectionChange change = new mxSelectionChange(this, added,
removed);
change.execute();
mxUndoableEdit edit = new mxUnd... | 4 |
public static void solver(int input) {
int leftVal = 0;
int rightVal = 0;
boolean leftFlag = false;
boolean rightFlag = false;
int valIn = input;
while(leftFlag == false || rightFlag == false) {
//left
if(leftFlag == false) {
if(checkLeft(valIn)) {
leftVal = valIn;
... | 6 |
public void updateSubTypes() {
int offset = 0;
if (!isStatic()) {
subExpressions[offset++].setType(Type.tSubType(getClassType()));
}
Type[] paramTypes = methodType.getParameterTypes();
for (int i = 0; i < paramTypes.length; i++) {
Type pType = (hints != null && hints[i + 1] != null) ? hints[i + 1]
... | 4 |
public static double[][] subtract(double A[][], double B[][]){
if(A.length != B.length || A[0].length != B[0].length)
return null;
double T[][] = new double[A.length][A[0].length];
for(int i = 0; i<T.length; i++){
for(int j = 0; j<T[0].length; j++){
T[i][j] = A[i][j]-B[i][j];
}
}
return T;
} //e... | 4 |
private String buildPath() {
StringBuffer builder = new StringBuffer();
if (this.protocol != null) {
builder.append(this.protocol);
}
if (this.host != null) {
builder.append("://");
builder.append(this.host);
}
if (this.port > 0) {
builder.append(":");
builder.append(this.port);
}
return ... | 3 |
public Items getLast() {
return last;
} | 0 |
public String eventDescription(Event e){
//by Budhitama Subagdja
String desc = "";
desc = desc + "At (" + e.x + "," + e.z +") ";
desc = desc + "Health: " + e.curHealth + " ";
if(e.emeDistance<1){
desc = desc + "Enemy Detected! Distance: " + e.emeDistance;
}
desc = desc + "\n";
if... | 9 |
public static void main(String args[]) {
Scanner scan = new Scanner(System.in);
System.out.println("Digite a palavra:");
String[] word = scan.nextLine().split("");
int errors = 0;
boolean right;
String[] player = new String[word.length];
player[... | 8 |
private boolean checkAutoInsert() {
if (autoInsert && lastKeyPressedEvent != null) {
// down in the last row triggers auto-insert
if (prevRowIndex == (this.getRowCount()-1) && (lastKeyPressedEvent.getKeyCode() == KeyEvent.VK_DOWN)) {
this.invokeRowInsert();
r... | 8 |
@Override
public Object execute(HttpServletRequest request, HttpServletResponse response) throws Exception {
Contexto oContexto = (Contexto) request.getAttribute("contexto");
oContexto.setVista("jsp/mensaje.jsp");
ProfesorBean oProfesorBean = new ProfesorBean();
ProfesorDao oProfesor... | 2 |
public void setName(String name) {
mName = name == null || name.length() == 0 ? " " : name; //$NON-NLS-1$
} | 2 |
public void run()
{
if (!inputFile.exists())
{
return;
}
try
{
final FileReader reader = new FileReader(inputFile);
parser = new TencTokenMaker(reader);
parser.parse();
syntaxTreeBuilder = new A... | 5 |
public void move(int xa, int ya) {
if (xa != 0 && ya != 0) {
move(xa, 0);
move(0, ya);
return;
}
//determine direction
if (xa > 0) {
dir = 1;
} else if (xa < 0) {
dir = 3;
} else if (ya > 0) {
dir = ... | 7 |
int insertKeyRehash(char val, int index, int hash, byte state) {
// compute the double hash
final int length = _set.length;
int probe = 1 + (hash % (length - 2));
final int loopIndex = index;
int firstRemoved = -1;
/**
* Look until FREE slot or we start to loop
... | 9 |
private static int produceValue(ArrayList<Integer> values)
{
// Calculates the average value
int average = getAverageValue(values);
//System.out.println("Average: " + average);
// Finds and removes additional 0:s
// And recalculates the average value (if needed)
if (removeZeros(values, average))
aver... | 4 |
private static void freq(File file) throws Exception { //t@C=eretweetƂɓxz쐬o
InputStreamReader isr = new InputStreamReader(new FileInputStream(file));
BufferedReader br = new BufferedReader(isr);
String head = br.readLine(); //擪s(URL)
int max = 0;
int min = Integer.MAX_VALUE;
HashMap<Integer, Integer> ... | 7 |
public static void sendMailSynchron(String subject, String content, String email, Boolean force) {
// 先判断是否开启发邮件功能,如果未开启,直接退出。
// String enable = "1";// PropertyManager.getInstance().getDbProperty(PropertyManager.DB_EMAIL_ENABLE);
// if (!force && !enable.equals("0")) {
// return;
// }
// 邮件服务器发送代码。
try {
... | 1 |
final void method2874(int i, boolean bool, Class348_Sub43 class348_sub43) {
try {
anInt8909++;
int i_94_
= (((Class348_Sub19_Sub1) (((Class348_Sub43) class348_sub43)
.aClass348_Sub19_Sub1_7077))
.aByteArray8984).length;
int i_95_;
if (bool
&& (((Class348_Sub19_Sub1) (((Class348_Sub... | 6 |
public static void bubbleSort(int[] unsorted){
System.out.println("unsorted array before sorting : " + Arrays.toString(unsorted));
// Outer loop - need n-1 iteration to sort n elements
for(int i=0; i<unsorted.length -1; i++){
//Inner loop to perform comparision and ... | 3 |
@Override
public String toString () {
if ( this.socketFile == null ) {
return super.toString();
}
return super.toString() + " (socket: " + this.socketFile + ")";
} | 1 |
public void notifyAllRemoteListeners(Message message) {
distributedService.sendMessage(message);
} | 0 |
public void delete(int id){
travelTripDao.delete(id);
} | 0 |
public DrawableImage(String imageURL)
{
this.imageURL=imageURL;
//Loading the image from URL into bufferedImage
ImageLoader=new BufferedImageLoader();
try {
bufferedImage=ImageLoader.loadImage(imageURL);
} catch (IOException e)
{
e.printStackTrace();
}
} | 1 |
private void update(DocumentEvent e){
Integer key = null;
Document eventDocument = e.getDocument();
//find the key
for (Entry<Integer, Document> entry: textBoxDocuments.entrySet()){
if (entry.getValue() == eventDocument){
key = entry.getKey();
break;
}
}
//find textbox and value
JTextF... | 3 |
@Override
public void unInvoke()
{
final Physical P=affected;
super.unInvoke();
if((P instanceof MOB)&&(this.canBeUninvoked)&&(this.unInvoked))
{
if((!P.amDestroyed())&&(((MOB)P).amFollowing()==null))
{
final Room R=CMLib.map().roomLocation(P);
if(!CMLib.law().doesHavePriviledgesHere(invoker(), ... | 8 |
static public void formatStandard(Writer w, Object obj) throws IOException{
if(obj == null)
w.write("null");
else if(obj instanceof String) {
w.write('"');
w.write((String) obj);
w.write('"');
}
else if(obj instanceof Character) {
w.write('\\');
char c = ((Character) obj).charValue();
switch(c) {
c... | 8 |
public Set<ANode> getConnectedNodes(ANode root, int level) {
if (level < 0) {
throw new IllegalArgumentException();
}
if (level == 0) {
return Collections.singleton(root);
}
final Set<ANode> result = new HashSet<ANode>();
if (level == 1) {
for (ALink link : links) {
if (link.getNode1() == root)... | 7 |
public void eatDiamant(Diamant dia) {
stomache += dia.getPoints();
dia.setCatched();
} | 0 |
public static void setOccupance(int x, int y){
for(int a = 0; a < 80; a++){
for(int b = 0; b < 60; b++){
if(tile[a][b].preOccupied == true){
tile[a][b].occupied = true;
}else if((x/Tile.tileSize) == a && (y/Tile.tileSize) == b){
tile[a][b].occupied = true;
} else {
tile[a][b].occupied = ... | 5 |
public void setPaused(boolean paused)
{
if (rp != null && rp.isGameOver())
{
gameIsPaused = false;
return;
}
gameIsPaused = paused;
if (rp != null && rp.getMenu() != null)
rp.getMenu().popMenu(gameIsPaused);
} | 4 |
@Override
public int doStartTag() throws JspTagException {
if (pages <= 0) {
return SKIP_BODY;
}
try {
JspWriter out = pageContext.getOut();
out.write("<table class='parameterRowB' border='1'><colgroup span='2' title='title' />");
if (head != ... | 7 |
public static VcfInfoType parse(String str) {
str = str.toUpperCase();
if (str.equals("STRING")) return VcfInfoType.String;
if (str.equals("INTEGER")) return VcfInfoType.Integer;
if (str.equals("FLOAT")) return VcfInfoType.Float;
if (str.equals("FLAG")) return VcfInfoType.Flag;
if (str.equals("CHARACTER")) ... | 6 |
private void compute_pcm_samples7(Obuffer buffer)
{
final float[] vp = actual_v;
//int inc = v_inc;
final float[] tmpOut = _tmpOut;
int dvp =0;
// fat chance of having this loop unroll
for( int i=0; i<32; i++)
{
final float[] dp = d16[i];
float pcm_sample;
pcm_sample = (float)(((vp[7 + ... | 1 |
protected void _realSendMessage()
{
if(null == _m_scSocket)
return ;
if(!_m_scSocket.isConnected())
{
ALBasicSendingClientManager.getInstance().addSendSocket(this);
return ;
}
boolean needAddToSendList = false;
_lockBuf();... | 9 |
public Color colores(int i){
Color c;
switch (i) {
case 0:
c = new Color(153,153,153); //Gris
break;
case 1:
case 2:
case 3:
case 4:
c = new Color(195,255,104); //Verde
break;
case 5:
case 6:
... | 9 |
public void testPropertySetMinute() {
LocalDateTime test = new LocalDateTime(2005, 6, 9, 10, 20, 30, 40);
LocalDateTime copy = test.minuteOfHour().setCopy(12);
check(test, 2005, 6, 9, 10, 20, 30, 40);
check(copy, 2005, 6, 9, 10, 12, 30, 40);
try {
test.minute... | 2 |
public void readFromSave(DataTag tag){
reloadMap(tag.readString("map"));
GameTime = tag.readInt("gametime");
nightAlhpa = tag.readFloat("nightshade");
DataList list = tag.readList("content");
for(int i = 0; i < list.data().size(); i ++){
DataTag dt = list.readArray(i);
String uin = dt.readString("UIN... | 3 |
public void driver() {
System.out.println("bmw drive");
} | 0 |
private String runAnOperation(int i, int j){
Double a=Double.parseDouble(calculatorSequence.get(i));
String s=calculatorSequence.get(i+1);
Double b=Double.parseDouble(calculatorSequence.get(j));
double z=0;
if (s.equals("+"))
z= Add(a,b);
if (s.equals("-"))
... | 4 |
public void deleteOrderInfo(int orderID) throws SQLException{
try{
databaseConnector=myConnector.getConnection();
stmnt=(Statement) databaseConnector.createStatement();
SQLQuery="DELETE FROM familydoctor.order WHERE orderID="+"'"+orderID+"'";
stmnt.executeUpdate(S... | 3 |
public static void main(String[] args) throws IOException{
AdaptiveHuffmanTree aTree = new AdaptiveHuffmanTree();
int count = 0;
int read = 0;
String str = "";
while(StdIn.hasNextChar()){
char c = StdIn.readChar();
str = str+c;
if(aTree.characterInTree(c)){
char[] chs = (aTree.getCodeWordFor(c).t... | 7 |
private JSONObject serveAsJson(IHTTPSession request, Session session) {
try
{
// get the handler class by URI
// for example, "/welcome/login" => "api.welcome.login"
String uri = request.getUri();
Class<?> cls = Class.forName("api" + uri.replaceAll("/", "."));
try
{
ApiHandler apiH... | 9 |
public void keyTyped(KeyEvent event) {
if (viewType == MULTI_TEXTFIELD_VIEW) {
char typed = event.getKeyChar();
if (! Character.isDigit(typed))
event.consume();
else if (event.getSource() != yearField) {
JTextField field = (JTextField) event.getSource();
String text = field.getText();
if (tex... | 9 |
private static void method500(char arg0[]) {
for (int i = 0; i < 2; i++) {
for (int chars = Censor.aCharArrayArray621.length - 1; chars >= 0; chars--) {
Censor.method509(Censor.aByteArrayArrayArray622[chars], arg0, Censor.aCharArrayArray621[chars]);
}
}
} | 2 |
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 int setupOrderPosition(int valuePosition, int startIndex, int endIndex) {
swap(valuePosition, endIndex);
int firstBiggerValuePosition = startIndex;
for (int i = startIndex; i <= endIndex; i++) {
if(array[i] <= array[endIndex]) {
swap(i, firstBiggerValuePositi... | 2 |
public void loadDimension(Dimension dim){
this.current = dim;
attachChild(current);
} | 0 |
public final TLParser.indexes_return indexes() throws RecognitionException {
TLParser.indexes_return retval = new TLParser.indexes_return();
retval.start = input.LT(1);
Object root_0 = null;
Token char_literal153=null;
Token char_literal155=null;
TLParser.expression_ret... | 8 |
private CtClass lookupClass0(String classname, boolean notCheckInner)
throws NotFoundException
{
CtClass cc = null;
do {
try {
cc = classPool.get(classname);
}
catch (NotFoundException e) {
int i = classname.lastIndexOf('.')... | 4 |
public void BuscaHorarioAula(String anoletivo, Date datahorario) {
try {
hapmb = new HorarioAulaProfMatDao().RetornaHorarioProfMat(anoletivo, datahorario);
DefaultTableModel tabelahorario = (DefaultTableModel) jThorario.getModel();
tabelahorario.setNumRows(0);
for... | 9 |
@Override
public void onEndermanPickup(EndermanPickupEvent event) {
if (event.isCancelled()) {
return;
}
if (!this.config.yml.getBoolean("Enderman.Disable Pickup", true)) {
return;
}
if (!event.isCancelled()) {
event.setCancelled(true);
... | 3 |
Subsets and Splits
SQL Console for giganticode/java-cmpx-v1
The query retrieves a limited number of text entries within a specific length range, providing basic filtering but minimal analytical insight.