woensdag 10 februari 2016
WAMPserver op windows 10
Niet vergeten om de IIS-service te stoppen als je WAMPserver wilt draaien. IIS en WAMPserver willen namelijk beide dezelfde poort gebruiken.
Lambda en Anonymous classes in Java
package testpack;
import java.util.List;
public interface ListMethods {
List<String> SortFruits(List<String> original);
}
package testpack;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
public class testlambda {
public List<String> StrategyTest(ListMethods strategy) {
List<String> fruits = Arrays.asList("Apple", "Tomato", "Currant", "Cranberry");
return strategy.SortFruits(fruits);
}
public List<String> getFuitsAnotherWay() {
ListMethods anonymMethods = new ListMethods() {
public List<String> SortFruits(List<String> original) {
Collections.sort(original);
return original;
}
};
return StrategyTest(anonymMethods);
}
public List<String> getFuitsAnotherWayLambda() {
return StrategyTest((fruitList) -> {
Collections.sort(fruitList);
return fruitList;
});
}
public static void main(String[] args) {
List<String> result;
result = new ArrayList<String>();
result.add("hallo");
result.add("nederland");
result.stream()
.filter(x -> x != "nederland")
.forEach(x -> {
System.out.println(x);
});
testlambda tl = new testlambda();
result = tl.getFuitsAnotherWayLambda();
for (String s: result) {
System.out.println(s);
}
System.exit(-1);
}
}
import java.util.List;
public interface ListMethods {
List<String> SortFruits(List<String> original);
}
package testpack;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
public class testlambda {
public List<String> StrategyTest(ListMethods strategy) {
List<String> fruits = Arrays.asList("Apple", "Tomato", "Currant", "Cranberry");
return strategy.SortFruits(fruits);
}
public List<String> getFuitsAnotherWay() {
ListMethods anonymMethods = new ListMethods() {
public List<String> SortFruits(List<String> original) {
Collections.sort(original);
return original;
}
};
return StrategyTest(anonymMethods);
}
public List<String> getFuitsAnotherWayLambda() {
return StrategyTest((fruitList) -> {
Collections.sort(fruitList);
return fruitList;
});
}
public static void main(String[] args) {
List<String> result;
result = new ArrayList<String>();
result.add("hallo");
result.add("nederland");
result.stream()
.filter(x -> x != "nederland")
.forEach(x -> {
System.out.println(x);
});
testlambda tl = new testlambda();
result = tl.getFuitsAnotherWayLambda();
for (String s: result) {
System.out.println(s);
}
System.exit(-1);
}
}
zondag 7 februari 2016
.NET naar Java
Van .NET naar Java:
ASP.NET page = JSP
ASP.NET code behind = Servlet
ASP.NET global.asax = ServletContextListener
ADO.NET = JDBC
Entity Framework = JPA
JAXB = ?
JSON.Net Newtonsoft = GSON Google
DLL = JAR (Java ARchive. WAR is een Web ARchive, EAR is een Enterprise ARchive)
MSBuild = Maven
In Java heb je ook Generics (compile time), Annotations, boxing en unboxing, Lambda expressions (anonymous class met enkele method. Stream object)
ASP.NET page = JSP
ASP.NET code behind = Servlet
ASP.NET global.asax = ServletContextListener
ADO.NET = JDBC
Entity Framework = JPA
JAXB = ?
JSON.Net Newtonsoft = GSON Google
DLL = JAR (Java ARchive. WAR is een Web ARchive, EAR is een Enterprise ARchive)
MSBuild = Maven
In Java heb je ook Generics (compile time), Annotations, boxing en unboxing, Lambda expressions (anonymous class met enkele method. Stream object)
zaterdag 12 december 2015
PDF converteren
PDF converteren naar text lukt het beste met: https://www.2pdf.nl/
maandag 7 december 2015
Virtualbox draaien? Hyper-V uitschakelen.
Wanneer je VirtualBox gaat gebruiken, dan kan het je opvallen dat onder Windows 10 je geen 64 bit OS kunt installeren. Dat komt omdat Hyper-V ingeschakeld is onder Windows 10. Hyper-V is ook een virtual machine programma.
Uitschakelen gaat als volgt:
Rechter muisknop op je Windows 10 startknop. "Programma's en onderdelen" kiezen.
Vervolgens: "Windows onderdelen in- of uitschakelen.".
Alles onder node "Hyper-V" uitschakelen.
Uitschakelen gaat als volgt:
Rechter muisknop op je Windows 10 startknop. "Programma's en onderdelen" kiezen.
Vervolgens: "Windows onderdelen in- of uitschakelen.".
Alles onder node "Hyper-V" uitschakelen.
zondag 29 november 2015
WAMPserver op Windows 10
In Windows 10 is de World Wide Web publishing service automatisch aan. Deze moet uit om WAMPserver te kunnen laten werken op Windows 10.
Ga naar je startknop en rechterklik 'm. Kies Configuratie en dan Systeembeheer. Vervolgens Services en stop service World Wide Web Publishing en zet 'm op handmatig.
Ga naar je startknop en rechterklik 'm. Kies Configuratie en dan Systeembeheer. Vervolgens Services en stop service World Wide Web Publishing en zet 'm op handmatig.
donderdag 26 november 2015
How to compress VirtualBox image
First, use sdelete from sysinternals to defragment your virtual system.
So, in your Virtual windows do:
sdelete -z c:
Then, exit the image and use:
VBoxManage.exe modifyhd "c:\path\to\thedisk.vdi" --compact
So, in your Virtual windows do:
sdelete -z c:
Then, exit the image and use:
VBoxManage.exe modifyhd "c:\path\to\thedisk.vdi" --compact
Abonneren op:
Posts (Atom)