text stringlengths 14 410k | label int32 0 9 |
|---|---|
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (getClass() != obj.getClass()) {
return false;
}
@SuppressWarnings("rawtypes")
ArrayHashMapMergingQueue other = (ArrayHashMapMergingQueue) obj;
if (mergedMap == null) {
if... | 9 |
@Override //оповещение наблюдателей
public void notifyObservers() {
//идем по листу наблюдателей и оповещаем их
for (final Observer anObserverList : observerList) {
//из состояния моделт берем все, что надо знать наблюдателю и передаем ему
anObserverList.update(state.getBrick... | 1 |
private static void test_zerosCount(TestCase t) {
// Print the name of the function to the log
pw.printf("\nTesting %s:\n", t.name);
// Run each test for this test case
int score = 0;
for (int i = 0; i < t.tests.length; i += 2) {
int bits = (Integer) t.tests[i];
int exp = (Integer) t.tests[i + 1];
... | 3 |
public LocalInfo getLocalInfo(int addr, int slot) {
LocalInfo li = new LocalInfo(this, slot);
if (lvt != null) {
LocalVarEntry entry = lvt.getLocal(slot, addr);
if (entry != null)
li.addHint(entry.getName(), entry.getType());
}
allLocals.addElement(li);
return li;
} | 2 |
public String reverseWords(String s) {
String result = "";
if (s.length() == 0)
return result;
Stack<String> stack = new Stack<String>();
for (int i = 0; i < s.length(); i++) {
if (s.charAt(i) != ' ') {
String word = "";
while (i < s.length() && s.charAt(i) != ' ') {
word += s.charAt(i);
... | 7 |
public Coord getc() {
Gob tgt = gob.glob.oc.getgob(this.tgt);
if(tgt == null)
return(gob.rc);
Coord c = tgt.position();
return(c);
} | 1 |
public DisplayMode getHighestResolutionDisplayMode(){
DisplayMode[] videoCardModes = videoCard.getDisplayModes();
int highest = 0;
for(int k = 1; k < videoCardModes.length; k++){
if(videoCardModes[highest].getWidth() < videoCardModes[k].getWidth()){
highest = k;
}else if(videoCardModes[highest].getWidth... | 7 |
private static Method findMethod2(Class clazz, String name, String desc) {
Method[] methods = SecurityActions.getDeclaredMethods(clazz);
int n = methods.length;
for (int i = 0; i < n; i++)
if (methods[i].getName().equals(name)
&& makeDescriptor(methods[i]).equals(desc... | 3 |
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;
double[][] t = new double[n][n];
for(int i=0;i<n;i++)for(int j=0;j<n;j++)t[i][j]=sc.nextDouble();
double[][] dp = new double[m][n];
for(int i... | 9 |
public void in_event ()
{
// If still handshaking, receive and process the greeting message.
if (handshaking)
if (!handshake ())
return;
assert (decoder != null);
boolean disconnection = false;
// If there's no data to process... | 8 |
public boolean isEatable() {
return false;
} | 0 |
private void checkInterval(int value) throws PropertyException
{
if(value != UNDEFINED) {
if((value < 0) || (value > 100)) throw new PropertyException(this, "Value " +value +" is not in range [0, 100].");
}
} | 3 |
public void keyReleased(KeyEvent e){
switch(e.getKeyCode()){
case 37:
case 65:
left = false;
((Player)engine.getWorld().getPlayer()).setNext(left, right,-1);
break;
case 38:
up = false;
break;
case 39:
case 68:
right = false;
((Player)engine.getWorld().getPlayer()).setNext(left, ri... | 6 |
private ActualParameters parseActualParameters() {
//System.out.println("parseActualParameters");
ActualParameters node = new ActualParameters();
expect("lp");
String[] operators = {"plus","minus","ident","integer","lp","tilde"};
for(String l : operators) { //int i=0; i< operators.length; i++) {
if (nextIs... | 3 |
public OdigosCard(int id) {
/*
* kartela odigou gia anafora provlimatos
*/
con = new Mysql();
odigosId=id;
this.setTitle("Anafora Provlimatos");
/* vgazei to para8uro sto kedro tis othonis me diastaseis 350x250 */
Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
this.setBounds(dim.width/... | 2 |
public void ClearCircleStrong(int X, int Y, int R)
{
// long time = System.nanoTime();
for (int i1 = Math.max(X-(R+1),0); i1 < Math.min(X+(R+1),w); i1 ++)
{
for (int i2 = Math.max(Y-(R+1),0); i2 < Math.min(Y+(R+1),h); i2 ++)
{
... | 5 |
public void registerTick() {
// count Frames per second...
lastTime = curTime;
curTime = System.currentTimeMillis();
totalTime += curTime - lastTime;
if( totalTime > 1000 ) {
totalTime -= 1000;
fps = frames;
frames = 0;
}
++frames;
} | 1 |
public void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
response.setContentType("text/html");
PrintWriter out = response.getWriter();
out.println("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">");
out.printl... | 3 |
public String toString() {
String s = "";
for (int r = 0; r < 4; r++) {
s += "[ ";
for (int c = 0; c < 4; c++) {
s += get(c, r) + " ";
}
s += "]\n";
}
return s;
} | 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 String buildJsonUsername() {
Iterator<String> iterator = getUserName().iterator();
JsonArrayBuilder jsonArrayBuilder = Json.createArrayBuilder();
while (iterator.hasNext()) {
jsonArrayBuilder.add((String) iterator.next());
}
System.out.println("User Array " + ... | 1 |
public void drawGameObjects(final Graphics g) {
for (GameObject gameObject : gameObjects) {
gameObject.draw(g);
}
for (Projectile p : projectiles) {
p.draw(g);
}
for (int i = 0; i < monsters.size(); i++) {
monsters.get(i).draw(g);
}
... | 3 |
public Deck() {
for (Card.SIGN sign : Card.SIGN.values()) {
for (Card.VALUE value : Card.VALUE.values()) {
cards.add(new Card(sign, value));
}
}
} | 2 |
public static String code(String pngfile) throws IOException
{
BufferedImage image = null;
try{
File file=new File(pngfile);
image=ImageIO.read(file);
}catch(IIOException e){
//System.out.println("Image not found");
}
BufferedImage img=null;
int w=image.getWidth();
... | 9 |
private void trSort(int n, int depth)
{
final int[] arr = this.sa;
TRBudget budget = new TRBudget(trIlg(n)*2/3, n);
for (int isad=n+depth; arr[0]>-n; isad+=(isad-n))
{
int first = 0;
int skip = 0;
int unsorted = 0;
do
{
... | 9 |
public synchronized int[] makeMove(Scanner stdin, String play) {
int r;
int c;
int[] a = null;
Boolean goodInput = false;
while(!goodInput) {
r = -1;
c = -1;
System.out.println ("Enter coordinates to play your " + play);
if (stdin.h... | 8 |
public IsChecked(ExcData excData) {
super(excData.getExceptionClass());
isChecked = isCheckedException(exceptionClass);
if (isChecked) {
rightAnswer = YesAnswer.getInstance();
} else {
rightAnswer = NoAnswer.getInstance();
}
} | 1 |
@BeforeClass
public static void setUpClass() {
} | 0 |
@Override
public String valueToString(Object value) throws ParseException {
double val = ((Double) value).doubleValue();
return mForceSign ? Numbers.formatWithForcedSign(val) : Numbers.format(val);
} | 1 |
public <T> T getItem(Class<T> type, ReadCallback<T> callback)
{
if (getBoolean()) {
T item = callback.read(this);
if (valid) {
return item;
}
}
return null;
} | 2 |
@Test
public void square_test() {
try{
double [][]mat= {{3.0,2.0}, {1.0,3.0}};
double[][]result = Matrix.square(mat);
double [][]exp= {{13.0,9.0}, {9.0,10.0}};
Assert.assertArrayEquals(exp, result);
}
catch (Exception e) {
// TODO Auto-generated catch block
fail("Not yet implemented");
}
} | 1 |
public static Point[] closestk( Point myList[], int k ) {
Comparator<Point> cmptor = new Comparator<Point>() {
public int compare(Point p1, Point p2) {
double x = Math.sqrt(p1.x*p1.x +p1.y*p1.y) - Math.sqrt(p2.x*p2.x +p2.y*p2.y);
if (x>0)
return -1;
else if (x<0)
return 1;
else
r... | 7 |
private static Employee getEmployee(Employee bean, PreparedStatement stmt, ResultSet rs) throws SQLException{
stmt.setString(1, bean.getUsername());
rs = stmt.executeQuery();
if (rs.next()) {
Employee newBean = new Employee();
newBean.setName(rs.getString("name"));
newBean.setUsername(rs.getString(... | 1 |
private void processMoveToAcePile(MouseEvent e) {
int index = (int) (e.getY() / (CARD_Y_GAP + CARD_HEIGHT));
if (index < 4) {
activeMove.cardReleased(index, CardMoveImpl.MOVE_TYPE_TO.TO_ACE_PILES);
String result = activeMove.makeMove(game, this);
processMoveResult(res... | 1 |
public ArrayList<Statement> getStatements(SearchOptions searchOptions) {
ArrayList<Statement> result = new ArrayList<Statement>();
CounterParty counterParty = searchOptions.getCounterParty();
String transactionCode = searchOptions.getTransactionCode();
String communication = searchOptions.getC... | 7 |
@Override
public void run() {
// loads the file "kdv_node_unload"
InputStream pointFile = getClass().getResourceAsStream(
"kdv_node_unload.txt");
BufferedReader pointInput = new BufferedReader(new InputStreamReader(
pointFile));
String line = null;
double x, y;
int index = -1;
... | 8 |
public int search(String txt) {
int N = txt.length();
if (N < M) return N;
long txtHash = hash(txt, M);
// check for match at offset 0
if ((patHash == txtHash) && check(txt, 0))
return 0;
// check for hash match; if hash match, check for exact match
... | 6 |
public int hashCode() {
int result;
result = (address != null ? address.hashCode() : 0);
result = 29 * result + (city != null ? city.hashCode() : 0);
result = 29 * result + (country != null ? country.hashCode() : 0);
return result;
} | 3 |
static int KMP(char[] p, char[] t) {
int i = 0, j = 0, m = p.length, n = t.length, len = 0;
while (i < n) {
while (j >= 0 && t[i] != p[j])
j = b[j];
i++;
j++;
len = Math.max(len, j);
if (j == m)
j = b[j];
}
return len;
} | 4 |
public static void main(String[] args) {
HashSet<Integer> hashSet = new HashSet<Integer>();
if (hashSet.add(10))
System.out.println("element 10 added");
if (hashSet.add(20))
System.out.println("element 20 added");
if (hashSet.add(30))
System.out.println("element 30 added");
System.out.println();
... | 8 |
public static String getPackageName(Class<?> clazz) {
Assert.notNull(clazz, "Class must not be null");
String className = clazz.getName();
int lastDotIndex = className.lastIndexOf(PACKAGE_SEPARATOR);
return (lastDotIndex != -1 ? className.substring(0, lastDotIndex) : "");
} | 2 |
@Override
public boolean done(ArrayList<Node> nw, int fab){
int a = ((BeaconFAB)nw.get(0).getFAB(fab)).A;
Set<Integer> armies = new HashSet<Integer>();
int min = Integer.MAX_VALUE;
int d0 = 0;
int d1 = 0;
int d2 = 0;
int d3 = 0;
boolean res = true;
... | 7 |
private final boolean cvc(int i) {
if (i < 2 || !cons(i) || cons(i - 1) || !cons(i - 2)) {
return false;
}
{
final int ch = this.b[i];
if (ch == 'w' || ch == 'x' || ch == 'y') {
return false;
}
}
return true;
} | 7 |
public void testWithFieldAddWrapped3() {
Partial test = createHourMinPartial();
try {
test.withFieldAddWrapped(null, 6);
fail();
} catch (IllegalArgumentException ex) {}
check(test, 10, 20);
} | 1 |
public void run() {
Thread.currentThread().setName("ChatSocketServer");
ServerSocket serverSocket = null;
try {
serverSocket = new ServerSocket(port);
} catch (IOException e1) {
e1.printStackTrace();
}
System.out.println("ChatServer listening on " + port + "...");
while (listening) {
try {
So... | 3 |
public void recevoir(Information<Boolean> information) {
informationRecue = information;
if (information.iemeElement(0) instanceof Boolean) {
int nbElements = information.nbElements();
boolean[] table = new boolean[nbElements];
for (int i = 0; i < nbElements; i++) {
table[i] = information.iemeElement(i... | 5 |
protected void processLineBreakBlocks(List<String> lineBreakBlocks) {
if(generateStatistics) {
for(String block : lineBreakBlocks) {
statistics.setPreservedSize(statistics.getPreservedSize() + block.length());
}
}
} | 2 |
public void fadeOut() {
double volume = 0.6;
for (;;) {
if (((volume - 0.05) < 0) || !setVolume(volume)) {
break;
}
try {
Thread.sleep(150);
... | 7 |
public JLabel getjLabelDateRapport() {
return jLabelDateRapport;
} | 0 |
@Override
public ArrayList getRecordArray()
{
ArrayList outputArr = new ArrayList();
outputArr.add( this );
int nChart = -1;
for( int i = 0; i < chartArr.size(); i++ )
{
if( i == 0 )
{
Begin b = (Begin) Begin.getPrototype();
outputArr.add( b );
}
Object o = chartArr.get( i );
if( o i... | 4 |
public void compileInsert() {
createSelectorLists();
String insert = "INSERT INTO ";
if(!compFromList.isEmpty()) {
Selector selector = compFromList.get(0);
insert += selector.tableField() + " ";
}
String fields = "(";
for(Selector selector : com... | 9 |
public String toString()
{
NumberFormat nf = NumberFormat.getInstance();
nf.setMaximumFractionDigits(2);
nf.setMinimumFractionDigits(2);
StringBuffer buff = new StringBuffer();
buff.append(this.n + " sequences with distance " + this.getAverageDistance());
//buff.append( getConsensus());
for( int x=0; x... | 6 |
public ClientPlayGameMessage(int version, int typecode, int gameindicator, int gametypecode, int gameplayrequest, long betamount)
{
/* make sure parameters are valid */
this.iVersion = 0;
if (version >= 0)
{
this.iVersion = version;
}
this.iTypeCo... | 9 |
public void addPerson(int x, int y) {
Piece person = new Person(x, y);
if (this.numberOne==null && this.numberTwo==null) {
this.numberOne=person;
} else if (numberOne!=null && numberTwo==null){
this.numberTwo=person;
}
} | 4 |
@Id
@Column(name = "item_id")
public int getItemId() {
return itemId;
} | 0 |
public int availableCars(String typeOfCar){
int counter = 0;
for(int i = 0; i < CARS.size(); i++){
if (typeOfCar.equals(typeOfCar) && carRented == false){
counter++;
} else {
return 0;
}
}
return counter;
} | 3 |
private boolean testPortConditions(Player p){
int gold = 0;
for(ItemStack i : p.getInventory()){
if(i != null){
if(i.getType() == Material.GOLD_BLOCK){
gold += i.getAmount();
}else{
if(!AllowedItems.contains(i.getTypeId())){
p.sendMessage(DeityNether.lang.formatInvalidItems());
retu... | 6 |
@Override
public int doStartTag() throws JspException {
try {
if (price != 0) {
JspWriter out = pageContext.getOut();
out.write(PriceDiscountManager.getFinalPrice(price, discount, userDiscount).toString());
return EVAL_BODY_INCLUDE;
}
... | 2 |
public void setTime(double time, int index){
this.time[index] = time;
} | 0 |
private Dimension layoutSize(Container target, boolean preferred)
{
synchronized (target.getTreeLock())
{
// Each row must fit with the width allocated to the containter.
// When the container width = 0, the preferred width of the container
// has not yet been ... | 8 |
@Override
public void onEnable() {
log.info(String.format("[%s] - Initializing...", getDescription().getName()));
log.info(String.format("[%s] - Checking for Vault...", getDescription().getName()));
// Set up Vault
if(!setupPermissions()) {
log.info(String.forma... | 7 |
@Override
public void display(UserInterface ui) {
if (breakpoints.isEmpty()) {
UserInterface.println("There are no breakpoints currently set.\n");
} else {
UserInterface.print("Breakpoints are currently set on lines: ");
for (String breakpoint : breakpoints) {
... | 2 |
public static void main (String args[])
{
java.awt.EventQueue.invokeLater (new Runnable ()
{
public void run ()
{
new LoginWindow (1500).setVisible (true);
}
}
);
} | 0 |
@Override
public boolean execute(MOB mob, List<String> commands, int metaFlags)
throws java.io.IOException
{
Vector<String> origCmds=new XVector<String>(commands);
if(commands.size()<2)
{
CMLib.commands().doCommandFail(mob,origCmds,L("Hold what?"));
return false;
}
commands.remove(0);
final List<I... | 9 |
public void generateString(ArrayList<String> result, String pic, int left, int right){
if (right <left){
return;
}
if (left==0&&right == 0){
result.add(pic);
return;
}
if(left <0){
return;
}
if(left ==0){
... | 5 |
public String getDescription(int skill)
{
return skillDescriptions[skill];
} | 0 |
private void saveProgress() {
if(modified && fileName != null) {
if(JOptionPane.YES_OPTION == JOptionPane.showConfirmDialog(frame
,new JLabel("Save progress with " + fileName + " ?")
,"Unsaved Progress"
,JOptionPane.YES_NO_OPTION
)) {
saveToFile(fileName);
}
}
} | 3 |
public boolean _setSpriteImage(URL spriteURL)
{
if(image != null)
{
this.setIcon(new ImageIcon(spriteURL));
return true;
}
else
{
return false;
}
} | 1 |
@Override
public boolean consider(Comparable object, int index) {
if (index==0) {
maximum = object;
}
if (index<cutOff) {
if (maximum.compareTo(object)<0) {
maximum = object;
}
}
if (index>=cutOff) {
if (maximu... | 5 |
@Override
public boolean ausfuehren(ServerKontext kontext, Spieler spieler,
Befehlszeile befehlszeile)
{
//TODO auslagern in Methoden
String richtung = extrahiereRichtung(befehlszeile);
Raum nebenRaum = getRaumFuerRichtung(kontext, spieler, richtung);
kontext.schreibeAnSpieler(spieler, "Dr.Little schaut ... | 9 |
protected final MapleData getItemData(final int itemId) {
MapleData ret = null;
final String idStr = "0" + String.valueOf(itemId);
MapleDataDirectoryEntry root = itemData.getRoot();
for (final MapleDataDirectoryEntry topDir : root.getSubdirectories()) {
// we should have .img... | 8 |
private boolean createFileChannel(){
File requestedFile = new File(this.filePath);
if(requestedFile != null && requestedFile.exists()){
try {
// 直接通过文件管道将文件内容输出到客户端
this.fileInput = new FileInputStream(requestedFile);
this.fileChannel = fileInput.getChannel();
} catch (IOExce... | 3 |
public double [][] envCumProb() throws FileNotFoundException{
envCumProb = new double [envName.size()] [envName.size()];
try {
FileReader file = new FileReader("EnvCumProb.txt");
BufferedReader br = new BufferedReader (file);
... | 9 |
private void validateConfiguration() throws MojoExecutionException {
// Validate aliases.
for (final Map.Entry<String, String> alias : aliases.entrySet()) {
if (StringUtils.isBlank(alias.getValue())) {
throw new MojoExecutionException("Illegal alias found. Alias is not allowe... | 9 |
public static boolean transferFont( File inDir, File inFile, File outDir, FontTester tester ) {
if( inDir == null ) {
inDir = inFile.getParentFile();
}
String relPath = getRelativePath( inDir, inFile.getParentFile(), true );
outDir = new File( outDir, relPath );
Fil... | 8 |
@Override
public void handle(ChannelHandlerContext ctx, FullHttpRequest request) throws Exception {
// Cache Validation
String ifModifiedSince = request.headers().get(IF_MODIFIED_SINCE);
if (ifModifiedSince != null && !ifModifiedSince.isEmpty()) {
SimpleDateFormat dateFormatter =... | 3 |
@Override
public void focusGained(FocusEvent e) {
textArea = (OutlinerCellRendererImpl) e.getComponent();
textArea.hasFocus = true;
} | 0 |
public Object get(int index) {
return index < 0 || index >= size() ? null : mList.get(index);
} | 2 |
public void testBinaryCycAccess6() {
System.out.println("\n**** testBinaryCycAccess 6 ****");
CycAccess cycAccess = null;
try {
try {
if (connectionMode == LOCAL_CYC_CONNECTION) {
cycAccess = new CycAccess(testHostName, testBasePort);
} else if (connectionMode == SOAP_CYC_CO... | 4 |
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int opcao;
Menu m = new Menu();
try{
m.Menu();
InfoFuncionario info = new InfoFuncionario();
System.out.println("Digite Sua Opcao :");
opcao = sc.nextInt();
do {
if(opcao == ... | 8 |
public void insert(Halfedge halfEdge) {
Halfedge previous, next;
int insertionBucket = bucket(halfEdge);
if (insertionBucket < _minBucket) {
_minBucket = insertionBucket;
}
previous = _hash.get(insertionBucket);
while ((next = previous.nextInPriorityQueue) != ... | 5 |
@Override
public boolean execute(SimpleTowns plugin, CommandSender sender, String commandLabel, String[] args) {
final Localisation localisation = plugin.getLocalisation();
if (args.length == 0) {
sender.sendMessage(localisation.get(LocalisationEntry.ERR_SPECIFY_STATUS));
re... | 6 |
public String getType() {
return type;
} | 0 |
void sort_duan(double[][] x, double[] y) {
Vector<Integer> indices = new Vector<Integer>();
for (int i = 0; i < x.length; i++) {
indices.add(new Integer(i));
}
if (!stepData.maximizeObjectiveFunctionValue()) {
Sorter sorter = new Sorter(y, Sorter.ASCENDING);
... | 6 |
public void checaProyectilChocaConMuros(){
// checa si proyectil colisiona con las paredes
// de la derecha y la izquierda...
if (proBola.getX() < 0){
proyectilChocaIzquierda();
}
else if(proBola.getX() + proBola.getAncho() > getWidth()){
proyectil... | 4 |
@Override
public void reactPressed(MouseEvent event) {
if (isPressed) {
isPressed = false;
releaseImage();
StateMachine.resetMutePressed();
} else {
if (mt.isPressed())
mt.reactPressed(null);
isPressed = true;
pr... | 2 |
public void addVoiture(Vehicule voiture) {
this.voitures.add(voiture);
try {
oos = new ObjectOutputStream(
new BufferedOutputStream(
new FileOutputStream(
new File("voitures.txt"))));
for(int i = 0; i < this.voitures.size... | 3 |
private void processCommands() {
// tratador das opções da linha de comando
getOpt = new Getopt("prover", argv, ":nsltho:");
getOpt.setOpterr(false);
int c;
// verifica as opções
while ((c = getOpt.getopt()) != -1)
{
switch(c)
{
... | 9 |
public static double[] doLinearRegressionFromTo(int start,int end,double[][] args) //input int start, int end
{ //input double[1]=array of prices
double[] answer = new double[3];
int ... | 5 |
public Pedestrian(int x, int y, int walktype) {
this.walktype = walktype;
i = 0; minus = 1;
switch (walktype) {
case GO_LEFT:
speedX = DEFAULT_SPEED_LEFT;
speedY = 0;
break;
case GO_RIGHT:
speedX = DEFAULT_SPEED_RIGHT;
speedY = 0;
break;
case GO_UP:
speedX = 0;
speedY = DEFAULT_SPEED... | 4 |
public static void setDistance(Red r1, Red r2, int d) {
int N = r1.getSize();
int M = N;
int s1, s2, i, n;
int[] st = new int[N];
int[] rst = new int[d];
for (n = 0; n < N; ++n) {
st[n] = n;
s1 = r1.getNodo(n).getS();
r2.getNodo(n).set... | 9 |
public static void printRuleInGoalTree(ControlFrame frame, Proposition impliesprop, int depth) {
{ PatternRecord patternrecord = frame.patternRecord;
boolean reversepolarityP = frame.reversePolarityP;
System.out.print("RULE: ");
{ Surrogate rulename = ((Surrogate)(KeyValueList.dynamicSlotValue(im... | 7 |
public void visit_monitorenter(final Instruction inst) {
stackHeight -= 1;
if (stackHeight < minStackHeight) {
minStackHeight = stackHeight;
}
} | 1 |
public void setEnd(Date end) {
this.end = end;
} | 0 |
public boolean renderBlockTorch(Block block, int i, int j, int k) {
int l = this.blockAccess.getBlockMetadata(i, j, k);
Tessellator tessellator = Tessellator.instance;
float f = block.getBlockBrightness(this.blockAccess, i, j, k);
if (Block.lightValue[block.blockID] > 0) {
f... | 5 |
protected final void useItemOnPlayersPosition(Player player) throws InvalidActionException {
if (player == null)
throw new IllegalArgumentException("The given player is invalid!");
if (!(this instanceof Useable))
throw new InvalidActionException("The selected item can't be used!");
if (player.getRemainingAc... | 4 |
public static void update(){
for(int i=0;i<4;i++){
if(i==0) prev[KeyEvent.VK_LEFT]=pressed[KeyEvent.VK_LEFT];
if(i==1) prev[KeyEvent.VK_RIGHT]=pressed[KeyEvent.VK_RIGHT];
if(i==2) prev[KeyEvent.VK_DOWN]=pressed[KeyEvent.VK_DOWN];
if(i==3) prev[KeyEvent.VK_UP]=pressed[KeyEvent.VK_UP];
}
} | 5 |
public static void main(String[] args) {
try {
logger.info("Starting the data provider.");
String path = "C:\\DataCommons\\Data";
String domain = "idd:boom.org:boomid";
String contributorName = "BOOM";
int port = 9091;
logger.info("Provider data path: " + path);
logger.info("Provider dom... | 2 |
public int findNumberByInnovNumber(int linkInnovNum) {
int number = -1;
for (int i = 0; i < this.getNumberGenes(); i++) {
if (genes.get(i).getInnovation_num() == linkInnovNum) {
number = i;
}
}
return number;
} | 2 |
public static void main(String[] args) {
try {
for (LookAndFeelInfo info : UIManager.getInstalledLookAndFeels()) {
if ("Nimbus".equals(info.getName())) {
UIManager.setLookAndFeel(info.getClassName());
UIManager.put("Table.background", Color.WHITE);
UIManager.p... | 8 |
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.