Archive for category EĞİTİMLER

move project svn to git

STEPS

  • create new directory.
  • copy svn source code to that directory.
  • remove target folder

git init
git add README.md
git commit -m “first commit”
git remote add origin https://github…
git push -u origin master

git remote add origin https://github…
git push -u origin master

Advertisements

Leave a comment

sql find duplicate record using fields

 

SELECT COUNT(id)
FROM  Employee
GROUP BY id
HAVING ( COUNT(id )>1 )

 

using two fields

SELECT
    name, email, COUNT(*)
FROM
    users
GROUP BY
    name, email
HAVING 
    COUNT(*) > 1

Leave a comment

Using Matcher search in list

String value=”java”;

List result = searchIn(list, new Matcher() {
public boolean matches(MyObjectp) {
return p.getName().equals(value);
}
});

public List searchIn(List list, Matcher m) {
List r = new ArrayList();
for (T t : list) {
if (m.matches(t)) {
r.add(t);
}
}
return r;
}
interface Matcher {
public boolean matches( T t );
}

Leave a comment