Skip to content

Instantly share code, notes, and snippets.

View nerzid's full-sized avatar

Eren YILDIZ nerzid

  • Umea University
  • Sweden
View GitHub Profile
if(t.getKind() != Tree.Kind.METHOD)
continue;
@nerzid
nerzid / AsalSayilar.java
Last active August 2, 2016 16:34
YouTube Nerzid Kanalı | Java 101 Video Serisi Bölüm 28 | Asal Sayılar Probleminin Çözümü
import java.util.ArrayList;
public class AsalSayilar {
public static void main(String[] args) {
ArrayList<Integer> asal_sayilar = new ArrayList<>();
asal_sayilar.add(2);
public class EulersNumber {
public static void main(String[] args) {
double euler = 1;
for (int i = 1; i < 100; i++) {
double fact = 1;
for(int j = i; j > 1; j--)
import java.util.ArrayList;
public class EvenFibonacciNumbers {
public static void main(String[] args) {
ArrayList<Integer> liste = new ArrayList<>();
@nerzid
nerzid / CommentGenerator.java
Created August 17, 2016 10:25
this is old. It uses github.com/javaparser/javaparser . Problem was javadocs added and twice. You are using INRIA/spoon library right now
package com.nerzid.autocomment.generator;
import com.github.javaparser.ASTHelper;
import com.github.javaparser.JavaParser;
import com.github.javaparser.ParseException;
import com.github.javaparser.ast.CompilationUnit;
import com.github.javaparser.ast.body.MethodDeclaration;
import com.github.javaparser.ast.body.Parameter;
import com.github.javaparser.ast.body.TypeDeclaration;
import com.github.javaparser.ast.comments.JavadocComment;
public class hello {
public String foo(String s) {
s = "hello world";
String x = "eren";
System.out.println("s: " + s + "x: " + x);
System.out.println("s: " + s + "x: " + x);
System.out.println("s: " + s + "x: " + x);
System.out.println(s = s + x);
magic();
public class NewClass {
public static boolean chooseDB() throws FileNotSelected {
File f = null;
if (!checkIfDatabaseIsInProject()) {
f = FilePicker.chooseDBFile();
if (f == null) {
return false;
}
} else {
/*
* Copyright 2016 nerzid.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
/*
* Copyright 2016 nerzid.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@nerzid
nerzid / antlr4.bat
Created April 19, 2017 06:21
Running ANTLR4 from terminal using .bat
java -cp C:\Users\nerzid\Documents\ANTLR4\antlr-4.6-complete.jar org.antlr.v4.Tool %*