text stringlengths 14 410k | label int32 0 9 |
|---|---|
public void updateUniforms(Matrix4f worldMatrix, Matrix4f projectedMatrix, Material material, Vector3f playerPos)
{
if(material.getTexture() != null)
material.getTexture().bind();
else
RenderUtil.unbindTextures();
setUniform("transformProjected", projectedMatrix);
setUniform("transform", worldMatrix);... | 4 |
@Override
public void productContainerSelectionChanged() {
if(getView().getSelectedProductContainer() == null){
getView().setProducts(new ProductData[0]);
return;
}
ProductContainer selectedContainer =
(ProductContainer)getView().getSelectedProductContainer().getTag();
List<ProductData> productData... | 7 |
public boolean equals(
Object o)
{
if (o == null || !(o instanceof ASN1Sequence))
{
return false;
}
ASN1Sequence other = (ASN1Sequence)o;
if (this.size() != other.size())
{
return false;
}
Enumeration s1 = this.get... | 9 |
public long convertStringToLong(String seq) {
seq = seq.toLowerCase();
for(int i = 0; i < seq.length(); i++) {
if(seq.charAt(i) == 'a') { // 00
if(i == 0) {
key = 0;
} else {
key = key << 2;
key = key | 0;
}
}
if(seq.charAt(i) == 'c') { // 01
if(i == 0) {
key = 1 ;
... | 9 |
public synchronized boolean setGridletsResumed(int failedMachID)
{
int gridletInPausedList_size = gridletPausedList_.size();
ResGridlet rgl;
Gridlet gl;
// update the Gridlets up to this point in time
updateGridletProcessing();
// go on with the gridle... | 4 |
private void findNext() throws UnsupportedOperationException {
while(this._state == 0)
{
if(this._source.hasNext())
{
T item = this._source.next();
try {
if(this._predicate.evaluate(item))
{
this._current = item;
this._state = 1;
}
} catch (Exception e) {
... | 4 |
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result
+ ((cityName == null) ? 0 : cityName.hashCode());
return result;
} | 1 |
public Collection<String> getStations() {
return stations;
} | 0 |
private void valorImpressao() {
if (comparaLexema(Tag.NUMERICO)) {
consomeToken();
} else if (comparaLexema(Tag.VERDADEIRO) || comparaLexema(Tag.FALSO)) {
consomeToken();
} else if (comparaLexema(Tag.IDENTIFICADOR)) {
Simbolo c = new Simbolo(escopoAtual, null, listaTokens.get(
indiceLista).get... | 9 |
public ArrayList<BEPlaylist> getAllPlaylists2() throws SQLException {
Connection c = getConnection();
try {
Statement stm = c.createStatement();
boolean status = stm.execute("select * from Playlist");
if (status == false) {
return null;
}
... | 4 |
public void cleanPom(File originalPom, File targetPom, File pomProperties,
boolean noParent, boolean hasPackageVersion, boolean keepPomVersion,
boolean keepParentVersion, String setVersion, String debianPackage) {
if (targetPom.getParentFile() != null) {
targetPom.getParentF... | 4 |
public String codigoPlanDisponible (int id_padre, String codigo_plan_padre){
String codigo_hijo = codigo_plan_padre;
Vector<Cuenta> Hijos = getHijos(id_padre);
String nuevo_codigo="";
boolean termine = false;
int i = 1;
while ((i <= Hij... | 9 |
public List<ObjectType> getObject() {
if (object == null) {
object = new ArrayList<ObjectType>();
}
return this.object;
} | 1 |
public static String likePurviewCode(String alias,String puriveCode,String columnName){
if(puriveCode == null){
return "";
}
if(isBlank(alias)){
alias = "";
}else{
alias += ".";
}
StringBuilder sb = new StringBuilder();
sb.append(" ( ");
sb.append(alias).append(columnName).append(" like ... | 2 |
void initializeFXMLLoader() {
if (this.fxmlLoader == null) {
this.fxmlLoader = this.loadSynchronously(resource, bundle, bundleName);
this.presenterProperty.set(this.fxmlLoader.getController());
}
} | 1 |
public static void handleAuthenticateReply(HTSMsg msg, HTSPClient client) {
Collection<String> requiredFields = Arrays.asList(new String[]{});
if (msg.keySet().containsAll(requiredFields)){
//TODO
} else if (msg.get("error") != null){
//TODO
} else{
System.out.println("Faulty reply");
}
} | 2 |
private void refreshGameSituation() {
jTextFieldRoundNumber.setText(Integer.toString(game.getRound()));
jTextFieldPlayerColor.setText(game.getPlayerList().get(game.getCurrentPlayerIndex()).getName());
switch(game.getPlayerList().get(game.getCurrentPlayerIndex()).getColor())
{
case YELLOW... | 6 |
public static BatBitmap clip(BatBitmap bm, int x0, int y0, int x1, int y1) {
int sw = bm.width;
int sh = bm.height;
if(x0 < 0) x0 = 0;
if(y0 < 0) y0 = 0;
if(x1 > sw) x1 = sw;
if(y1 > sh) y1 = sh;
int tw = x1 - x0;
int th = y1 - y0;
BatBitmap cm = new BatBitmap(tw, th);
for (int yy = y0; yy ... | 6 |
public static Cons coerceUncoercedColumnValues(Cons row, Cons types) {
if (types == null) {
return (row);
}
{ Cons result = Stella.NIL;
{ Stella_Object value = null;
Cons iter000 = row;
Stella_Object type = null;
Cons iter001 = types;
Cons collect000 = null;
... | 7 |
@Override
public List<WeightedEdge<N, W>> edgesTo(N... toList) {
LinkedList<WeightedEdge<N, W>> list = new LinkedList<WeightedEdge<N, W>>();
if(toList.length == 1) {
N to = toList[0];
if(containsNode(to)) {
for(N node : getNodes()) {
if(!node.equals(to)) {
List<WeightedEdge<N, W>> edgesFrom = ... | 8 |
static MethodMappingInfo determineMapping(Class<?> originalClass, Object ... targetObjects) {
MethodMappingInfo info = new MethodMappingInfo(originalClass);
for (Method method : info.mapping.keySet()) {
CallTarget target = null;
for (Object targetObject : targetObjects) {
Method targetMethod = findMethod(... | 6 |
private String readString() throws IOException {
StringBuilder line = new StringBuilder();
// synchronized (processOut) {
while (true) {
String subline = processOut.readLine();
if (subline == null) {
StringBuilder errorMessage = new StringBuilder();
... | 5 |
private void BMEupdateAveragesMatrix( double[][] A, edge e, node v,
node newNode )
{
edge sib, par, left, right;
//first, update the v,newNode entries
A[newNode.index][newNode.index] = 0.5*(A[e.head.index][e.head.index]
+ A[v.index][e.head.index]);
A[v.index][newNode.index] = A[newNode.index][v.index]... | 4 |
private void drawDayNames() {
int firstDayOfWeek = calendar.getFirstDayOfWeek();
DateFormatSymbols dateFormatSymbols = new DateFormatSymbols(locale);
dayNames = dateFormatSymbols.getShortWeekdays();
int day = firstDayOfWeek;
for (int i = 0; i < 7; i++) {
if (maxDayC... | 6 |
public void configureOtherEtcProperties(){
if (getDebug()) System.out.println(getProperties().size()+" property updates found");
for (Map.Entry<String, String> e:getProperties().entrySet()){
File file=new File(getFuseHome(), "etc/"+e.getKey().split("_")[0]+".cfg");
if (!file.exists()) throw ... | 9 |
public void run()
{
Object var1 = NetworkManager.threadSyncObject;
synchronized (NetworkManager.threadSyncObject)
{
++NetworkManager.numWriteThreads;
}
while (true)
{
boolean var13 = false;
try
{
var13... | 8 |
public static ArrayList<ArrayList<Integer>> combine(int n, int k) {
// Start typing your Java solution below
// DO NOT write main() function
if(n<k||k<=0) return null;
ArrayList<ArrayList<Integer>> all = new ArrayList<ArrayList<Integer>>();
if(k==1){
for(int i=1;i<=n;i++){
ArrayList<Integer> al... | 6 |
public void setWeatherType(WeatherTypes weatherType) {
this.weatherType = weatherType;
} | 0 |
public ArrayList<Field> getPiecesLegalFields(Piece piece, Field currentField) {
ArrayList<Field> legalFields = new ArrayList<Field>();
for (Field targetField : this.window.board.fields) {
if (piece.canMove(this.window.board, currentField, targetField) || piece.canAttack(this.window.board, currentField, ... | 4 |
public LogClientThread(Socket connectionSocket) {
this.connectionSocket = connectionSocket;
this.connectionID = nextClientThreadID++;
} | 0 |
private static void decryption() {
boolean d_loop = true;
String fn= "pic", fex=".jpg";
do {
System.out.println("\n\n\n+==+ DECRYPTION +==+ \n\n"+
"-- 1 - Begin decryption -- \n"+
"-- 2 - Change file name (Currently:" +fn+fex+") -- \n"+
"-- 3 - Go back -- \n");
layer_2 = user_input.... | 6 |
public static Filter isPrivate()
{
return new IsPrivate();
} | 0 |
public void findConnected(String label) {
int index = getVertexIndex(label);
if (vertices[index].wasVisited() == false) {
vertices[index].setVisited(true);
visitedNodes.push(vertices[index]);
System.out.println("push " + label);
}
// traverse columns
for (int col = 0; col < COLS; col++) {
if (grap... | 6 |
@Override
public boolean equals(Object obj)
{
if (this == obj)
return true;
if (obj == null)
return false;
if (!(obj instanceof GeoPosition))
return false;
GeoPosition other = (GeoPosition) obj;
if (Double.doubleToLongBits(latitude) != Double.doubleToLongBits(other.latitude))
return false;
if ... | 5 |
public UserFollowers(int uid, MyIntegerArrayList followersList) {
this.uid = uid;
followers = new int[followersList.size()];
for (int i = 0; i < followersList.size(); i++) {
followers[i] = followersList.get(i);
}
Arrays.sort(followers);
} | 1 |
private static void writeObjectFile(Path path){
ObjectOutputStream dataOut=null;
try {
//apertura del stream. StandardOpenOption.CREATE->si el fichero no existe se crea
dataOut = new ObjectOutputStream(Files.newOutputStream(path, java.nio.file.StandardOpenOption.CREATE)... | 4 |
public String getLoginno() {
return loginno;
} | 0 |
@SuppressWarnings("resource")
public void run()
{
try
{
ServerSocket listener = new ServerSocket(sc.getPort());
while (!sc.isConnected())
{
Socket s = listener.accept();
sc.setConnection(s);
sc.chatLogWrite("Connected to: " + s.getInetAddress().getHostAddress());
}
}
catch (BindExc... | 3 |
@Override
public byte[] generate(int targetLength, int preferredPadding) {
// TODO implement!!
return new byte[0];
} | 0 |
@Test
public void runTestExceptions1() throws IOException {
InfoflowResults res = analyzeAPKFile("GeneralJava_Exceptions1.apk");
Assert.assertEquals(1, res.size());
} | 0 |
private static int getTypeNeighbors(int[][] tileMap, int x, int y, int max, int min) {
int resultType = 4;
int maxCount = 0;
int grassCount = getCountNeighbors(tileMap, x, y, MyTile.GRASS);
int grass2Count = getCountNeighbors(tileMap, x, y, MyTile.FOREST_GRASS);
int dirtCount = g... | 7 |
public Action(){
super();
} | 0 |
private int yoff(int dir) {
switch (dir) {
case 0:
case 1:
case 2:
return 1;
case 3:
case 7:
return 0;
case 4:
case 5:
case 6:
return -1;
}
return 0;
} | 8 |
public void updateTimer() {
long var1 = System.currentTimeMillis();
long var3 = var1 - this.lastSyncSysClock;
long var5 = System.nanoTime() / 1000000L;
double var7 = (double)var5 / 1000.0D;
if(var3 > 1000L) {
this.lastHRTime = var7;
} else if(var3 < 0L) {
this.lastH... | 7 |
private ArrayList<String> removeDuplicates(ArrayList<String> fullArray) {
// ArrayList to hold non-repeated words
ArrayList<String> originals = new ArrayList<String>();
// Populates ArrayList
for (String s : fullArray)
if (!originals.contains(s))
originals.add... | 2 |
public static byte[] gzip(String input) {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
GZIPOutputStream gzos = null;
try {
gzos = new GZIPOutputStream(baos);
gzos.write(input.getBytes("UTF-8"));
} catch (IOException e) {
e.printStackTrace... | 3 |
public static void main(String[] args) {
int[] height={2,1,5,6,2,3};
String s1 ="1234";
System.out.println(s1.substring(1));
//System.out.println(new Generate_Parentheses().largestRectangleArea(height) );
for(String s : new Generate_Parentheses().generateParenthesis(4))
... | 1 |
public static void main(String[] args) throws Exception {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
String[] ns = reader.readLine().split(" ");
assert ns.length == 3;
int wordSize = Integer.parseInt(ns[0]);
int dictSize = Integer.parseInt(ns[1]);
int caseCount = Integer.p... | 7 |
@Override
public void actionPerformed(ActionEvent e) {
JScanner jScanner = JScanner.getInstance(this);
JOptionPane.showMessageDialog(this,
"Scanning your computer for archives. This could take a while.");
int count = 0;
long startTime = System.currentTimeMillis();
for (File root : File.listRoots())
fo... | 2 |
static public Mantenimiento_Especialidad instancia() {
if (UnicaInstancia == null) {
UnicaInstancia = new Mantenimiento_Especialidad();
}
return UnicaInstancia;
} | 1 |
public static void main(String[] args) {
try {
// make sure JDBC driver is loaded
Class.forName("com.mysql.jdbc.Driver");
// create connection between our account and the database
Connection con = DriverManager.getConnection
("jdbc:mysql://" + server, account, password);
Statement stmt = c... | 3 |
@Override
public void run() {
while(!Thread.interrupted()) {
if(taskQueue.size() > 0) {
Iterator<Task<Result>> iterator = taskQueue.iterator();
while(iterator.hasNext()) {
Task<Result> next = iterator.next();
LOGGER.infop("Checking to run: %s", next);
Machine machineToRunOn = checkDequeue... | 6 |
public int kamaLookback( int optInTimePeriod )
{
if( (int)optInTimePeriod == ( Integer.MIN_VALUE ) )
optInTimePeriod = 30;
else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) )
return -1;
return optInTimePeriod + (this.unstablePeriod[FuncUnstId.Kama.ordinal()]) ... | 3 |
protected void drawFood( Graphics g, int x, int y, int CELL_SIZE,
SimpleLanguage language ){
int index = 5;
if( ((Boolean)getAttribute(language.getPercept(index))).booleanValue() ){ // key or lock
int DELTA = CELL_SIZE / 8;
int dx = DELTA;
for( int k=0; k<3; k++ ){
... | 5 |
private void HelpMarked(DInfo<T> op){
if(op==null || !(op instanceof DInfo))
return ;
LockFreeNode<T> other;
if(op.l.compareTo(op.p.right.getReference())==0)
other=op.p.left.getReference();
else
other=op.p.right.getReference();
CAS_CHILD(op.gp, op.p, other, op.stamps.gpLeftStamp,op.stamps.gpRightSta... | 5 |
public static void main(String[] args) throws java.lang.Exception
{
boolean debug = false;
for(int i = 0; i < args.length; i++)
{
if(args[i].equalsIgnoreCase("-debug"))
{
debug = true;
}
}
SchemeInterpreter scheme = new SchemeInterpreter();
scheme.debug = debug;
InputStreamReader isr =... | 9 |
public Gui_StreamOptions(Stream stream, Gui_StreamRipStar mainGui,
boolean createNewStream, boolean setVisible,boolean defaultStream) {
super();
this.stream = stream;
this.setVisible = setVisible;
this.mainGui = mainGui;
this.createNewStream = createNewStream;
this.defaultStream = defaultStream;
... | 8 |
public Exception getException() {
return exception;
} | 0 |
private String appendFillingInString() {
int i = 0;
StringBuilder field = new StringBuilder();
for (Integer key : cardInFieldGame.keySet()) {
if (!listeofcontains.contains(key)) {
int fehlt = LEGHTFORSTRING
- cardInFieldGame.get(key).getPanelFilling()
.toCharArray().length;
int me = fehlt... | 5 |
@Override
public void execute() {
if (validate(Constants.WAITFOR_WIDGET)) {
AIOsmelter.status = "Smelting Bars..";
}
if (validate(Constants.SELECTION_WIDGET)) {
if (Constants.SELECTION_WIDGET.click(true)) {
AIOsmelter.status = "Clicking the smelt button..";
Task.sleep(5000);
final Timer timeout... | 5 |
public Account getAccount(String username){
ArrayList<Account> accounts = getAccounts();
for(int i = 0; i<accounts.size(); i++){
if(accounts.get(i).getUsername().equals(username)){
return accounts.get(i);
}
}
return null;
} | 2 |
@Override
public void init() throws IOException
{
try
{
onInit();
initialized = true;
closed = false;
}
catch (IOException e)
{
throw e;
}
catch (RuntimeException e)
{
throw e;
}
... | 3 |
public static String strStr(String haystack, String needle) {
boolean bContain=true;
if (haystack == null || needle == null) return null;
if (needle.length() == 0) return haystack;
if (needle.length() > haystack.length()) return null;
for(int i=0;i<haystack.length()-ne... | 8 |
public void update() {
// applyDots();
// if (this.actionPoints > 0) this.imUp = true;
// else this.imUp = false;
/* if ((Math.round((Game.getGameplay().getDeltaTimeStage() / 100000000))) % 5 == 0) {
this.isGettingDamage = false;
System.out.println(Math.round((Game.getGameplay().getDeltaTimeStage() / 10000... | 9 |
@Override
public void onEnable(){
instance = this;
// Check configuration
getConfig().loadDefaults(getResource("resources/config.yml"));
if(!getConfig().fileExists() || !getConfig().checkDefaults()){
getConfig().saveDefaults();
}
getConfig().load();
// Load Vault (if we can)
Plugin plugin = getSer... | 4 |
public int search(int[] A, int target) {
// Start typing your Java solution below
// DO NOT write main() function
if (A.length == 0) {
return -1;
}
int start = 0;
int end = A.length - 1;
int mid;
while (start <= end) {
mid = (start + end) / 2;
if (A[mid] == target) {
return mid;
}
if ... | 8 |
public void moveGuardian(Displacement displacement) {
if (manager.isAuthorizedMovement()) {
switch (displacement) {
case NORTH:
manager.moveIndividual(manager.getGuardianMoving(), Displacement.NORTH);
break;
case SOUTH:
manager.moveIndividual(manager.getGuardianMoving(), Displacement.SOUTH);
... | 6 |
private void stackTraceField(Map<String, Object> map, ILoggingEvent eventObject) {
IThrowableProxy throwableProxy = eventObject.getThrowableProxy();
if (throwableProxy != null ) {
StackTraceElementProxy[] proxyStackTraces = throwableProxy.getStackTraceElementProxyArray();
if (pro... | 5 |
public List<Double> getMeanList() {
List<Double> result= new ArrayList<Double>();
double[] values= this.getMeanArray();
for (int i= 0; i< values.length; ++i) {
result.add(Double.valueOf(values[i]));
}
return result;
} | 1 |
public void mouseReleased(MouseEvent evt) {
if (mousein == 1 && evt.getSource()==buysell){
System.out.println("Opening Buy/Sell window...");
BuySell bs= new BuySell(SectorView.this, sector);
bs.display();
}
if (mousein == 2 && evt.getSource()==close){
setVisible(false); //you can't see me!
... | 4 |
public void add(NBTBase nbtbase) {
if (this.type == 0) {
this.type = nbtbase.getTypeId();
} else if (this.type != nbtbase.getTypeId()) {
System.out.println("WARNING: Tried adding mismatching data-types to tag-list!");
return;
}
this.list.add(nbtbase);... | 2 |
public void transferCard(Deck d, int index)
{
if(deck.isEmpty() == false)
{
card tmp = deck.get(index);
deck.remove(index);
d.addCard(tmp);
}
} | 1 |
public void fillWithWater() {
Water water = Water.getInstance();
for (int i = 0; i < nRows; i += 1) {
for (int j = 0; j < nColumns; j += 1) {
array[i][j] = water;
}
}
} | 2 |
@Override
public boolean invoke(MOB mob, List<String> commands, Physical givenTarget, boolean auto, int asLevel)
{
final Physical target=getAnyTarget(mob,commands,givenTarget,Wearable.FILTER_UNWORNONLY);
if(target==null)
return false;
if(target.fetchEffect(ID())!=null)
{
mob.tell(L("The aura of fear is ... | 8 |
private static void makeTet3(SquareColor[][] tet) {
for (int i = 0; i < 4; i++) {
for (int j = 0; j < 4; j++) {
if (((i == 1 || i == 2) && j == 0) || (i == 3 && (j == 0 || j == 1))) {
tet[i][j] = SquareColor.RED;
} else tet [i][j] = null;
... | 8 |
public _Post(JSONObject json) {
try {//special treatment for the overall ratings
if (json.has("Overall")){
if(json.getString("Overall").equals("None")) {
System.out.print('R');
setLabel(-1);
} else{
double label = json.getDouble("Overall");
if(label <= 0)
setLabel(1);
else if... | 5 |
public static List
cloneList(
List list )
{
if ( list == null ){
return( null );
}
List res = new ArrayList(list.size());
Iterator it = list.iterator();
while( it.hasNext()){
res.add( clone( it.next()));
}
return( res );
... | 2 |
public int getScrollableBlockIncrement(Rectangle visibleRect,
int orientation, int direction) {
return orientation == SwingConstants.VERTICAL ? visibleRect.height
: visibleRect.width;
} | 1 |
private List<Query[]> getQueries(List<String> querymixDirs,
List<Integer[]> queryRuns, List<Integer> maxQueryNrs) {
List<Query[]> allQueries = new ArrayList<Query[]>();
Iterator<String> queryMixDirIterator = querymixDirs.iterator();
Iterator<Integer[]> queryRunIterator = queryRuns.iterator();
Iterator<Integ... | 6 |
public static void main(String args[]) {
/* Set the Nimbus look and feel */
//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
/* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
* For details see http://down... | 6 |
public void setUsertileImagePosition(Position position) {
if (position == null) {
this.usertileImagePosition = UIPositionInits.USERTILE_IMAGE.getPosition();
} else {
if (!position.equals(Position.LEFT) && !position.equals(Position.CENTER) && !position.equals(Position.RIGHT)) {
... | 4 |
public int getIndex() {
for (int i = 0; i < Weapon.values().length; i++) {
if (Weapon.values()[i].equals(this)) {
return i;
}
}
return -1;
} | 2 |
@Override
public void actionPerformed(ActionEvent e) {
if(e.getSource() == viewAllLibrarians){
contentPanelLayout.show(panel, "viewLibrarians");
}
if(e.getSource() == createLibrarianAccount){
contentPanelLayout.show(panel, "createLibrarian");
}
if(e.getSource() == removeLibrarianAccount){
content... | 7 |
private void executeReservedGridlet(int index)
{
boolean success = false;
// if there are empty PEs, then assign straight away
if (gridletInExecList_.size() + index <= super.totalPE_) {
success = true;
}
// if no available PE then put unreserved Gridlets into qu... | 5 |
@Override
public void actionPerformed(ActionEvent e) {
hoist((OutlinerDocument) Outliner.documents.getMostRecentDocumentTouched());
} | 0 |
public void onStart() {
profit = 0;
killCount = 0;
visageCount = 0;
information = "";
startTime = System.currentTimeMillis();
Tabs.FRIENDS_CHAT.open();
Task.sleep(400);
if (Widgets.get(1109, 20).visible()) {
friendsChat = true;
}
if (friendsChat) {
if (Widgets.get(1109, 19).validate() && Widge... | 5 |
public static void printMethods(Class<?> c){
display2.append("メソッド\r\n");
Method[] declaredmethods = c.getDeclaredMethods();
Method[] methods = c.getMethods();
ArrayList<Method> methodList = new ArrayList<Method>(methods.length);
for(int i = 0; i < methods.length; i++){
methodList.add(methods[i]);
}
f... | 5 |
@Override
public void newSource( boolean priority, boolean toStream, boolean toLoop,
String sourcename, FilenameURL filenameURL, float x,
float y, float z, int attModel, float distOrRoll )
{
IntBuffer myBuffer = null;
if( !toStream )
... | 8 |
public static void asm_decfsz(Integer akt_Befehl, Prozessor cpu) {
Integer f = getOpcodeFromToBit(akt_Befehl, 0, 6); // zum speichern
PIC_Logger.logger.info("[DECFSZ]: Speicheradresse="
+ Integer.toHexString(f));
PIC_Logger.logger.info("[DECFSZ]: Speicherzelleninhalt="
+ Integer.toHexString(cpu.getSpeic... | 3 |
@Override
public void respond() {
File file = new File(Main.webroot + path); // find file within webroot
if(file.isDirectory()) file = new File(
Main.webroot + path + File.separator + Main.defaultFile);
try { // attepmt the normal case: file exists
FileInputStream in = new FileInputStream(file);
... | 4 |
private ApiResponse getApiResponse(final HttpUriRequest request) throws IOException, InternalApiException {
final CloseableHttpResponse httpResponse = httpClient.execute(request, httpContext);
try {
HttpEntity entity = httpResponse.getEntity();
if (entity != null) {
... | 3 |
public boolean isLeave() {
if( (childs == null) || (childs.size() <= 0) ) return true;
return false;
} | 2 |
public boolean getBlock(String DFSBlkName, String localBlkName){
/* Send Get-Block_Request to NameNode */
DFSMessage getBlkNameNodeReq = new DFSMessage(DFSMessageType.GetBlkClientReqMsg, DFSBlkName, null);
DFSMessage getBlkNameNodeResp = DFSMessageSender.sendMessage(getBlkNameNodeReq, this.nameN... | 8 |
@Override
public void caseAExprest(AExprest node)
{
inAExprest(node);
if(node.getComma() != null)
{
node.getComma().apply(this);
}
if(node.getExp() != null)
{
node.getExp().apply(this);
}
outAExprest(node);
} | 2 |
static void order(String order, int x) //adds and manipulates orders
{
final JButton expand = new JButton("+"); //button used to expand/collapse text field
expand.setPreferredSize(new Dimension(30, 40));
c.anchor = GridBagConstraints.NORTHWEST;
c.weightx = 0.1;
c.gridx = 1;
c.gridy =... | 5 |
public static void showAllBorders()
{
if (!borderEnabled()) return;
// in case any borders are already shown
removeAllBorders();
if (!Config.DynmapBorderEnabled())
{
// don't want to show the marker set in DynMap if our integration is disabled
if (markSet != null)
markSet.deleteMarkerSet();
ma... | 5 |
public double[][][] getGridDydx1(){
double[][][] ret = new double[this.lPoints][this.mPoints][this.nPoints];
for(int i=0; i<this.lPoints; i++){
for(int j=0; j<this.mPoints; j++){
for(int k=0; k<this.nPoints; k++){
ret[this.x1indices[i]]... | 3 |
public String getNumOfOximata(){
/*
* epistefei ton arithmo twn oximatwn ths vashs
*/
String num=null;
try {
pS = conn.prepareStatement("SELECT COUNT(*) AS num FROM oximata");
rs=pS.executeQuery();
while(rs.next()){
num=rs.getString("num");
}
} catch (SQLException e) {
e.printStackTrace... | 3 |
public String getMIMEtype(String type){
if (type.equals("html")){
return type = "text/html";
} else if (type.equals("css")){
return type = "text/css";
} else if (type.equals("js")){
return type = "text/javascript";
} else if (type.equals("jpg") || type.... | 8 |
public void setRecordList(RecordList recordList) {
this.recordList = recordList;
} | 0 |
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.