text stringlengths 14 410k | label int32 0 9 |
|---|---|
protected void processStyleBlocks(List<String> styleBlocks) {
if(generateStatistics) {
for(String block : styleBlocks) {
statistics.getOriginalMetrics().setInlineStyleSize(statistics.getOriginalMetrics().getInlineStyleSize() + block.length());
}
}
if(compressCss) {
for(int i = 0; i < styleBlock... | 8 |
public static boolean endsWithIgnoreCase(String str, String suffix) {
if (str == null || suffix == null) {
return false;
}
if (str.endsWith(suffix)) {
return true;
}
if (str.length() < suffix.length()) {
return false;
}
String lcStr = str.substring(str.length() - suffix.length()).toLowerCase();
... | 4 |
private void parseMaskAndAdjustmentData(PsdInputStream stream) throws IOException {
int size = stream.readInt();
assert size == 0 || size == 20 || size == 36;
if (size > 0) {
Mask mask = new Mask();
mask.top = stream.readInt();
mask.left = stream.readInt();
... | 7 |
@SuppressWarnings("unchecked")
private void sendEndGameMove(){
check(isMyTurn() && currentMove == VERIFY);
String winnerId = coderId;
List<String> feedbackHistory = (List<String>) state.get(FEEDBACKHISTORY);
String lastFeedback = feedbackHistory.get(feedbackHistory.size()-1);
if (lastFeedback.equa... | 2 |
public int getGraphZ() {
return graphZ;
} | 0 |
* @param itemSlot The itemSlot
* @param newItemId The new item After Drinking
* @param healType The type of poison it heals
*/
public void potionPoisonHeal(int itemId, int itemSlot, int newItemId, int healType) {
c.attackTimer = c.getCombat().getAttackDelay(c.getItems().getItemName(c.playerEquipment[c.playerWe... | 6 |
static private String stripControlCharacters(String s) {
StringBuffer sb = new StringBuffer(s.length() + 1);
for (int i = 0; i < s.length(); i++) {
char ch = s.charAt(i);
if (ch > 256 || ch == '\n' || ch == '\t' || ch == '\r' || ch == 226) {
sb.append(' ');
... | 7 |
static final int method1760(int i, int j, int k) {
if (k == -2) {
return 0xbc614e;
}
if (k == -1) {
if (i >= 2) {
if (i > 126) {
i = 126;
}
} else {
i = 2;
}
return i;
... | 7 |
protected void end() {} | 0 |
public void trimData( int maxLength )
{
if( audioData == null || maxLength == 0 )
audioData = null;
else if( audioData.length > maxLength )
{
byte[] trimmedArray = new byte[maxLength];
System.arraycopy( audioData, 0, trimmedArray, 0,
... | 3 |
public String getCode(){
String str = "";
String itemCode = item.getCode();
if(itemCode != ""){
String nextTemp = Tree.getNextTemp();
str = item.getCode() +
this.printLineNumber(true) +
nextTemp + " := " + item.place + "\n" +
this.printLineNumber(true) + "push := " + nextTemp + "\n";
}
... | 2 |
private synchronized void resize(int newSizeColumns, int newSizeRows)
{
TerminalCharacter [][]newCharacterMap = new TerminalCharacter[newSizeRows][newSizeColumns];
for(int y = 0; y < newSizeRows; y++)
for(int x = 0; x < newSizeColumns; x++)
newCharacterMap[y][x] = new Ter... | 6 |
@Override
public Map<String, String> validateForCreate(Map<String, Object> properties) throws Exception {
Connection conn = ConnectionManager.getInstance().getConnection();
Map<String, String> erros = new HashMap<String, String>();
if (properties != null) {
Long viag... | 8 |
public void cleanup() {
Collection windows = configurationToTraceWindow.values();
Iterator it = windows.iterator();
while (it.hasNext())
((TraceWindow) it.next()).dispose();
configurationToTraceWindow.clear();
} | 1 |
public void setMaxSpeed(double maxSpeed) {
if(_negated) {
_minSpeed = maxSpeed;
} else {
_maxSpeed = maxSpeed;
}
} | 1 |
@Override
public synchronized int compare(Integer i1, Integer i2) {
Queue<PutTask> putQueue1 = putMap.get(i1);
Queue<GetTask> getQueue1 = getMap.get(i1);
Queue<PutTask> putQueue2 = putMap.get(i2);
Queue<GetTask> getQueue2 = getMap.get(i2);
Long time1 = timerMap.get(i1);
Long time2 = timerMap.... | 8 |
public void LItemClothesAll(String folder) throws Exception {
SPProgressBarPlug.setStatus("Adding clothes to pool");
NumberFormat formatter = new DecimalFormat("000");
LVLI LItemClothesAll = (LVLI) SkyProcStarter.merger.getLeveledItems().get(new FormID("106662Skyrim.esm"));
OTFT FarmClot... | 6 |
public static void main(String[] args)
{
int[][] data = new int[2][2];
int[][] data2 = new int[2][2];
data[0][0] = 1;
data[0][1] = 3;
data[1][0] = 2;
data[1][1] = 4;
data2[0][0] = 0;
data2[0][1] = 1;
data2[1][0] = 5;
data2[1][1] = 6;
... | 2 |
public void ascend(){
eraseCenter();
for(int col = 0; col < board.getWidth(); col++){
int[] values = new int[board.getLength()];
for(int i = 0; i < values.length; i++){
values[i] = -2;
}
for(int row = 0; row < board.getLength();row++){
if(board.getValue(row, col) != -2){
if(board.isVali... | 7 |
public void update(float deltaTimeElapsedMs) {
// Moves character or scrolls background accordingly
if (speedX < 0) {
centerX += Util.factorByElapsedTimeMs(speedX, deltaTimeElapsedMs);
}
if (speedX == 0 || speedX < 0) {
bg1.setSpeedX(0);
bg2.setSpeedX(0);
}
if (centerX <= 200 && speedX > 0) {
... | 9 |
Class286_Sub4(OpenGlToolkit var_ha_Sub2, Class83 class83) {
super(var_ha_Sub2);
aBoolean6233 = false;
do {
try {
aClass83_6242 = class83;
if (((Class83) aClass83_6242).aClass258_Sub1_1443 == null
|| !(((OpenGlToolkit) ((Class286) this).aHa_Sub2_3684)
.aBoolean7791)
|| !(((OpenGlToolkit) ((Cl... | 7 |
public BufferedImage crop(int x, int y, int height, int width) {
//Outside of image
if (x > img.getWidth() || y > img.getHeight())
return null;
if (height + y > img.getHeight())
height = img.getHeight() - y;
if (width + x > img.getWidth())
width = im... | 4 |
static public void release() {
if (!injected) return;
try {
// Define
boolean fa;
boolean ff;
Field flagsList;
Field flagsListMod;
// Get: fields required for reflection
flagsList = DefaultFlag.class.getDeclaredField("flagsList");
flagsListMod = Field.class.getDeclaredField("modifiers... | 6 |
public Object readMap(AbstractHessianInput in)
throws IOException
{
String name = null;
String type = null;
String description = null;
boolean isRead = false;
boolean isWrite = false;
boolean isIs = false;
while (! in.isEnd()) {
String key = in.readString();
if ("name... | 8 |
public static boolean isBlank(String str){
if(str==null){
return true;
}
if(str.trim().length()<1){
return true;
}
if(str.trim().equals("")){
return true;
}
if(str.trim().toLowerCase().equals("null")){
return true;
}
return false;
} | 4 |
@Override
public final boolean incrementToken() throws java.io.IOException {
if (!input.incrementToken()) {
return false;
}
char[] buffer = termAtt.termBuffer();
final int bufferLength = termAtt.termLength();
final String type = typeAtt.type();
if (type == APOSTROPHE_TYPE && // re... | 9 |
private void deleteClienteButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_deleteClienteButtonActionPerformed
if(tablaClientes.getSelectedRow() >= 0){
askWind a = new askWind(new javax.swing.JFrame(),true,"Seguro que desea eliminar este cliente?");
a.setLocationRe... | 3 |
public double classifierData(List<Feat> classifiers) throws IOException{
Features f = new Features(0, 0);
f.integralImages(f.FACES, f.numbFaces, f.integralFaces);
System.out.println(new Date() + "--- Integralfaces. Done");
f.integralImages(f.NONFACES, f.numbNonFaces, f.integralNonFaces);
System.out.println(ne... | 6 |
public char nextClean() throws JSONException {
for (;;) {
char c = this.next();
if (c == 0 || c > ' ') {
return c;
}
}
} | 3 |
private static String validateSong(String artist, String title) {
HashMap<String, String> songList = DataManager.getSongMap().get(artist);
for(String songFromMap : songList.keySet()) {
int levDist = StringUtils.getLevenshteinDistance(songFromMap.toUpperCase(), title.toUpperCase());
double ratio = (songFromMap... | 4 |
public DayTimeDurationAttribute(boolean negative, long days, long hours,
long minutes, long seconds,
int nanoseconds)
throws IllegalArgumentException {
super(identifierURI);
this.negative = negative;
this.days = day... | 6 |
public static void asm_iorwf(Integer befehl, Prozessor cpu) {
Integer w = cpu.getW();
Integer f = getOpcodeFromToBit(befehl, 0, 6);
Integer erg = w | cpu.getSpeicherzellenWert(f);
if(getOpcodeFromToBit(befehl, 7, 7) == 1) {
cpu.setSpeicherzellenWert(f, erg, true);
}
else {
cpu.setW(erg, true);
}
... | 1 |
public void setCreatedDate(Date createdDate) {
this.createdDate = createdDate;
} | 0 |
public void sendMail(String mailServer, String from, String[] to, String subject, String messageBody, String attachmentPath, String attachmentName) throws MessagingException, AddressException
{
boolean debug = false;
Properties props = new Properties();
props.put("mail.smtp.starttls.enable", "true");
props.put... | 2 |
public double getWinningOdds(int a, int d) {
attackers = a;
defenders = d;
outcome = new double[attackers + 1][defenders + 1];
for (int i = 0; i < attackers + 1; i++)
for (int j = 0; j < defenders + 1; j++)
outcome[i][j] = -1.0;
outcome[attackers][defenders] = 1.0;
double winOdds = 0.0;
double l... | 6 |
@Override
public void actionPerformed(ActionEvent e) {
quit();
} | 0 |
public static void main(String[] args) throws IOException
{
// TODO Auto-generated method stub
String name = "";
String host = "";
int port = 0;
int i = 0;
int money;
try//name, host, and then port -- lines 43-73 checks the args[] for info
{
name = args[i];
i++;
}
catch(ArrayIndexOutOfBoun... | 5 |
public boolean hit(PlayerState param,Mario mario){
// TODO :: IMPLEMENT PROJECTILE INFO FOR THE KOOPA
mario.rebound();
if(flying){
flying=false;
if(getDy()<0)
setDy(0);
return false;
}else if(!shell){
shell=true;
if(getDy()<0)
setDy(0);
setDx(0);
... | 6 |
public void keyPressed(KeyEvent e) {
switch(e.getExtendedKeyCode()) {
case KeyEvent.VK_LEFT:
//System.out.println("lewo");
action = "right";
Pang.game.ihLudzik.currentFrame=4;
if (x_ > 0)... | 9 |
private void playBoard()
{
do
{
playGame();
this.tryAgain = false;
while(this.tryAgain == false)
{
System.out.print("\n Play again (Y/N): ");
this.theUsersInput = this.someInput.next();
System.out.p... | 6 |
private boolean playerStartPositionsHasNoTeleporter(Grid grid) {
List<Teleporter> teleporters = getTeleportersOfGrid(grid);
for (Player p : grid.getAllPlayersOnGrid())
for (Teleporter teleport : teleporters)
if (grid.getElementPosition(teleport).equals(p.getBeginPosition()))
return false;
return... | 3 |
private void dumpMemory(int address, int size) {
String tmp = "";
String tmp2 = "";
String t;
System.out.println("Dumping memory: " + address);
for (int i = 0; i < size; i++) {
t = Integer.toString(memory[i + address] & 0xff, 16);
if (t.length() < 2)
t = "0" + t;
tmp = tmp + t + "... | 7 |
private boolean verifierChamps(){
String erreurMsg = "";
boolean result = true;
if (nomTF.getText().length() < 3)
{
erreurMsg += "Le nom doit au moins avoir trois caracteres.\n";
result = false;
}
if (prenomTF.getText().length() <... | 9 |
private void ouvrirLecture(){
if(tamponSocket == null) {
try{ tamponSocket = new BufferedReader(new InputStreamReader(socket.getInputStream())); }
catch(IOException io){ io.printStackTrace(); }
}
} | 2 |
protected void createBuffers( SSLSession session ) {
int appBufferMax = session.getApplicationBufferSize();
int netBufferMax = session.getPacketBufferSize();
if( inData == null ) {
inData = ByteBuffer.allocate( appBufferMax );
outCrypt = ByteBuffer.allocate( netBufferMax );
inCrypt = ByteBuffer.allocate... | 4 |
public void getCommitter()
{
networkController.SendMessage("getPromotion#" + clientId + "," + clientType + "," + userCommitter + "," + userName);
clientType = userCommitter;
committer = true;
cleanLabels();
if(observer)
getObserver.setVisible(true);
if(contributor)
getContributor.setVisible(true... | 8 |
protected Account ReadAccount(String accountFile, String id) throws ClassNotFoundException{
ArrayList<Account> accs = new ArrayList<Account>();
Account acc = null;
Object temp = null;
try {
obji = new ObjectInputStream(new FileInputStream(accountFile));
try {
temp = obji.readObject();
} catch (... | 6 |
@Override
public String getColumnName(int column){
String name = "??";
switch (column){
case 0:
name ="produktId";
break;
case 1:
name ="produktNavn";
break;
case 2:
name ="fareNiveau";
break;
case 3:
name ="salgsPris";
break;
case 4:
name ="kostPris";
break;... | 6 |
private void setSizes(Container parent) {
int count = parent.getComponentCount();
Insets insets = parent.getInsets();
if (parent instanceof JPanel) {
insets = new Insets(0, 0, 0, 0);
}
int insetWidth = 0;
int insetHeight = 0;
if (insets != null) {
insetWidth = insets.left + insets.right;
insetHei... | 8 |
public String getItemName() {
return this.itemName;
} | 0 |
private RandomGenerator createRandomGenerator(long seed, Class<? extends RandomGenerator> randGenClass, RandomGenerator... params) {
try {
Constructor<? extends RandomGenerator> constructor ;
if ( params == null || params.length == 0 ) {
constructor = null ;
}
else {
constructor = randGenCl... | 6 |
public int lengthOfLastWord(String s) {
if (s == null) return 0;
int j = s.length() -1;
while (j>=0 && s.charAt(j) == ' ') j --;
if (j == -1) return 0;
int i = j;
while (i >= 0 && s.charAt(i) != ' ') i --;
return j -i;
} | 6 |
public MergeIterators(Comparator<E> comp, Iterator<E>[] itList,
E[] nextContainer) {
if (itList == null)
throw new IllegalArgumentException("Null array of iterators");
if (comp == null)
throw new IllegalArgumentException("Null comparator");
if (nextContainer == null)
throw new IllegalArgumentException... | 6 |
public static void notEmpty(Collection<?> collection, String message) {
if (collection == null || collection.isEmpty()) {
throw new IllegalArgumentException(message);
}
} | 3 |
public static boolean check(Serializable object) {
// TODO Auto-generated method stub
if (object instanceof Grammar)
{
Grammar g=(Grammar) object;
Production[] p=g.getProductions();
//check first 3 productions to make sure this grammar is from conversion
int count=0;
if (p.length < 3)
return... | 6 |
final FEMValue _compileArrayAsValue_() throws IllegalArgumentException {
if (!this._arrayEnabled_) throw this._illegal_(null, " Wertlisten sind nicht zulässig.");
final List<FEMValue> result = new ArrayList<>();
this.skip();
if (this._compileType_() == ']') {
this.skip();
return FEMArray.EMPTY;
}
whil... | 5 |
@Override
public void actionPerformed(ActionEvent e) {
if( e.getSource() == boton_alta_turno ){
Controlador.getInstance().accion(EventoNegocio.GUI_ALTA_TURNO,GUIPrincipal_Turno.this);
}
else if( e.getSource() == boton_baja_turno){
Cont... | 5 |
static private void validateDirectory (File aDirectory) throws FileNotFoundException {
if (aDirectory == null) {
throw new IllegalArgumentException("Directory should not be null.");
}
if (!aDirectory.exists()) {
throw new FileNotFoundException("Directory does not exist: " + aDirectory);
}
... | 4 |
public Trajectory<TobiiFrame> getClosestTrajectoryTo(long timestamp) {
Trajectory<TobiiFrame> bestTraj = null;
long bestDelta = Long.MAX_VALUE;
for(Trajectory<TobiiFrame> traj : trajectories.values()) {
Map.Entry<Long, TobiiFrame> startFrame = traj.getFrameEqualHigher(0L);
if(null == startFrame) {... | 4 |
private boolean supressImport(JClass clazz, JClass c) {
if (clazz instanceof JNarrowedClass) {
clazz = clazz.erasure();
}
if (clazz instanceof JAnonymousClass) {
clazz = clazz._extends();
}
if(clazz._package().isUnnamed())
return t... | 5 |
public static String getPath(int startX, int startY, int endX, int endY, TileGrid grid) {
String out = "";
openList = new ArrayList<Node>();
closedList = new ArrayList<Node>();
openList.add(new Node(grid.getTile(startX, startY),null));
Pathfinder.endX = endX;
Pathfinder.endY = endY;
Node goalNode = new... | 9 |
private void miAddDiscActionPerformed(ActionEvent e) {
if (Manager.getInstance().getCurrentProfile() == null) {
JOptionPane.showMessageDialog(null, "No profile has been selected.");
return;
}
Object[] discNames = Manager.getInstance().getDiscNames().toArray();
String selectedDisc = (Str... | 2 |
private static boolean loadIntoSubSystem() {
ByteArrayOutputStream bos = new ByteArrayOutputStream();
ObjectOutputStream oos = null;
try {
oos = new ObjectOutputStream(bos);
} catch (Exception e) {
return false;
}
try {
oos.writeObject(m_tmp);
} catch (Exception e) {
return false;
}
try {
... | 6 |
public void nextStep(){
MyHex current = nexts.pollLast();
current.visit();
ArrayList<MyHex> k = m.getNeighbors(current).getAllTrimmed();
for(MyHex h : k)
if(!h.hasBeenVisited() && !nexts.contains(h))
nexts.push(h);
//canvas.paintOne(geo, m, current.x(), current.y());
canvas.paintAll(geo, m);
if(nex... | 4 |
private void addSprite(TileMap map,
Sprite hostSprite, int tileX, int tileY)
{
if (hostSprite != null) {
// clone the sprite from the "host"
Sprite sprite = (Sprite)hostSprite.clone();
// center the sprite
sprite.setX(
TileMapRenderer.... | 1 |
public void setState(State state) {
this.state = state;
} | 0 |
public void run() {
// Get config data
ConfigManager cm = new ConfigManager();
// Connect to server through RMI port 1099.
Rmi rmi = null;
try {
Registry registry = LocateRegistry.getRegistry(
cm.getServerIp(), 1099);
rmi = (Rmi) registry.lookup("pcs");
} catch (RemoteException | NotBoun... | 3 |
@Override
public OutputStream getOutputStream() throws IOException {
switch (failValue) {
case 0:
return new OutputStream() {
@Override
public void write(int b) throws IOException {
}
};... | 2 |
public static void addTile(Tile t) {
if(allTiles != null) {
for(int i=0;i<allTiles.length;i++) {
if(allTiles[i]==null) {
allTiles[i] = t;
return;
} else {
if(allTiles[i].getTileId().equalsIgnoreCase(t.getTileId())) {
return;
}
}
}
}
} | 4 |
public double computeDynamicCutoff() {
{ IncrementalPartialMatch self = this;
{ IncrementalPartialMatch parent = ((IncrementalPartialMatch)(self.parent));
double cutoff = 0.0;
if (parent != null) {
if (parent.kind == Logic.KWD_AND) {
{ double pcutoff = parent.dynamicCut... | 9 |
private void putResize (K key, int value) {
// Check for empty buckets.
int hashCode = key.hashCode();
int index1 = hashCode & mask;
K key1 = keyTable[index1];
if (key1 == null) {
keyTable[index1] = key;
valueTable[index1] = value;
if (size++ >= threshold) resize(capacity << 1);
return;
}
int... | 6 |
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
StorySkeleton other = (StorySkeleton) obj;
return ID == other.ID;
} | 3 |
HideToSystemTray(){
super("SystemTray test");
System.out.println("creating instance");
try{
System.out.println("setting look and feel");
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
}catch(Exception e){
System.out.println("Unabl... | 8 |
public void logic(){
//̹ƶ
if( clientTank.getType()==Tank.BLACK_TANK ){
clientTank.active(selectKey, tankSpeed+BLACK_BUFF,SCREEN_WIDTH,SCREEN_HEIGHT);
}
else{
clientTank.active(selectKey, tankSpeed,SCREEN_WIDTH,SCREEN_HEIGHT);
}
//
if( fire==true ){
clientTank.fire();
fire = false;
}
//... | 9 |
private String getPassword()
{
JPanel panel = new JPanel(new BorderLayout());
JLabel label = new JLabel(AutoAppro.messages.getString("bar2auto_passwd_content"));
JPasswordField pass = new JPasswordField();
panel.add(label, BorderLayout.PAGE_START);
panel.add(pass, BorderLayout.CENTER);
int valid = JOptionP... | 1 |
@Override
public void actionPerformed(ActionEvent e) {
enableApply.setEnabled(false);
disableApply.setEnabled(false);
button.setEnabled(false);
if(e.getSource().equals(enableApply)) {
new Thread(new Runnable() {
@Override
public void run() {
try {
AdminClient.client.enableGPS();
... | 7 |
public static double[] MethodNewton(double y[]) throws IOException {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
double[] x = new double[func.length];
x = Arrays.copyOf(y, y.length);
//Количество итераций
int k = 10;
//Точность
//... | 5 |
public void placeUnits(Player player, Dimension minimumRange, Dimension maximumRange) {
for (Unit unit : player.getUnits()) {
int x, y;
do {
x = MathUtil.randomInteger(minimumRange.width, maximumRange.width);
y = MathUtil.randomInteger(minimumRange.height, maximumRange.height);
} while(!grid[x][y].i... | 2 |
public FileItem createItem(String fieldName, String contentType, boolean isFormField, String fileName)
{
return new MonitoredDiskFileItem(fieldName, contentType, isFormField, fileName, getSizeThreshold(), getRepository(), listener);
} | 0 |
private void endCircle(String to) {
if (to.equals("slide"))
slide.addEntity(circle);
else if (to.equals("quizslide"))
quizSlide.addEntity(image);
else if (to.equals("scrollpane"))
scrollPane.addEntity(image);
else if (to.equals("feedback"))
quizSlide.addFeedback(image);
} | 4 |
final public CycList andForm(boolean requireEOF) throws ParseException, java.io.IOException, UnsupportedVocabularyException {
CycList sentences = null;
CycList val = new CycList();
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case AND_CONSTANT:
jj_consume_token(AND_CONSTANT);
break;
case AND_GUID... | 5 |
@Override
public String List_file_url3(String id) {
String texto_html = "";
try {
this.conn = FactoryConnectionDB.open(FactoryConnectionDB.ORACLE);
String sql = "SELECT NO_ARCHIVO,NO_ARCHIVO_ORIGINAL FROM RHTV_CONTRATO_ADJUNTO where ID_CONTRATO='" + id.trim() + "'";
... | 9 |
public void setMass(double m)
{
if(getMass() == Log.MASS && m != Log.MASS)
{System.out.println("ERROR: Attempted to change mass of log " + getName() + ".");}
super.setMass(Log.MASS);
} | 2 |
private void actionPanel(JPanel panel) {
actionsPanel = new JPanel();
actionsPanel.setBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null));
actionsPanel.setBounds(520, 279, 320, 103);
panel.add(actionsPanel);
actionsPanel.setLayout(null);
actionsPanel.setVisible(false);
final JLabel x1Label = new J... | 6 |
public TMBruteParsePane(GrammarEnvironment environment, Grammar orig, Grammar trim, HashMap<String, String> map, InputTableModel model) {
super(environment, orig);
this.treePanel = new UnrestrictedTreePanel(this, map);
initView();
myTrimmedGrammar=trim;
myTrimmedGrammar.setStartVariable("S");
myModel = mode... | 0 |
protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
PrintWriter out = response.getWriter();
response.setCharacterEncoding("UTF-8");
request.setCharacterEncoding("UTF-8");
@SuppressWarnings("unchecked")
... | 4 |
public RegExFindFileContentsHandler(String regex, String lineEnding) {
super(lineEnding);
setRegEx(regex);
} | 0 |
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 fe... | 6 |
private static ClassType parseClassType2(String sig, Cursor c, ClassType parent)
throws BadBytecode
{
int start = ++c.position;
char t;
do {
t = sig.charAt(c.position++);
} while (t != '$' && t != '<' && t != ';');
int end = c.position - 1;
TypeArg... | 5 |
public static
java.util.Calendar[] toArrayOfCalendar(Collection collection)
{
if(collection == null || collection.size() == 0) return new java.util.Calendar[0];
java.util.Calendar[] aResult = new java.util.Calendar[collection.size()];
int i = 0;
Iterator iterator = collection.iterator();
while(iterator.hasN... | 9 |
public void setResource( boolean _shape, boolean _color, boolean _size,
boolean _weight, boolean _healthy ){
int ONES_MASK = (0xFFFFFFFF);
int color = _color?ONES_MASK:~(1<<6);
int shape = _shape?ONES_MASK:~(1<<7);
int size = _size?ONES_MASK:~(1<<8);
int weight = _weight?O... | 5 |
private boolean annotationMatches(Annotation antFromMethod, String antFromUser) {
String justAnnotationNameFromUserInput = extractAnnotationNameFromUserInput(antFromUser);
String justAnnotationNameFromMethod = extractAnnotationNameFromMethod(antFromMethod);
return justAnnotationNameFromMethod.equalsIgnoreCa... | 0 |
public boolean isPassed() {
Calendar cal = Calendar.getInstance();
int currY = cal.get(Calendar.YEAR);
int currMo = cal.get(Calendar.MONTH) + 1;
int currD = cal.get(Calendar.DAY_OF_MONTH);
int currH = cal.get(Calendar.HOUR_OF_DAY);
int currMi = cal.get(Calendar.MINUTE);
int y = ... | 5 |
public SessionKey unserializeSessionKey(String keyFilename) {
SessionKey sessionKey = null;
try {
File f = new File(keyFilename);
f.createNewFile();
InputStream file = new FileInputStream(keyFilename);
InputStream buffer = new BufferedInputStream(file);
ObjectInput input = new ObjectInputStream(bu... | 2 |
public void setMimeType(String mimeType) {
this.mimeType = mimeType;
} | 0 |
private void createProjectControlPanel() {
Vector<JButton> cb = createCustomButtons();
if(cb.size() == 0) {
return; // no buttons to be displayed
}
projectControlContent.removeAll();
JButton minimizeButton;
if(appConfig.guiControlPanelShowProjectControl) {
minimizeButton = createFrameworkIconButto... | 4 |
@Override
public boolean invoke(MOB mob, List<String> commands, Physical target, boolean auto, int asLevel)
{
if(target==null)
{
final PresenceReaction A=(PresenceReaction)mob.fetchEffect(ID());
if(A!=null)
A.shutdownPresence(mob);
if(affected==mob)
shutdownPresence(mob);
return A!=null;
}
... | 7 |
private void showLog_settingsButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_showLog_settingsButtonActionPerformed
if (debug)
logger.log(Level.DEBUG, "Setting preference \"showLog\" from " + settings.showLog() + " to " + showLog_settingsButton.isSelected());
... | 1 |
private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed
modificar.setVisible(false);
}//GEN-LAST:event_jButton2ActionPerformed | 0 |
public int AddInstanceToBestCluster(Instance inst) {
double delta;
double deltamax;
int clustermax = -1;
if (clusters.size() > 0) {
int tempS = 0;
int tempW = 0;
if (inst instanceof SparseInstance) {
for (int i = 0; i < inst.numValues(); i++) {
tempS++;
tempW++;
}
} else... | 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.