[Solved] Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 491520 bytes) in

Solution: Just create the file named php.ini under wp-admin folder and add the below lines, <? phpinfo(); ?> memory_limit = 64M save changes and close the file. Refresh the page. Hope you will not get the error now.   Note: 1. Be sure that you have not added any other lines in any other files. 2. If you still getting

193 total views, no views today

» Read more

Sorting Month in Java with Set

Program: package agn; import java.util.Date; import java.text.DateFormat; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; import java.util.Map; import java.util.Set; import java.util.TreeMap; import java.util.TreeSet; public class Sorting { public static void main(String[] args) throws ParseException { Set<Date> myset = new TreeSet<Date>(); DateFormat dateFormat = new SimpleDateFormat("MMM"); myset.add(new java.sql.Date(dateFormat.parse("Apr").getTime())); myset.add(new java.sql.Date(dateFormat.parse("jan").getTime())); myset.add(new java.sql.Date(dateFormat.parse("dec").getTime())); myset.add(new java.sql.Date(dateFormat.parse("feb").getTime())); myset.add(new java.sql.Date(dateFormat.parse("jul").getTime())); myset.add(new java.sql.Date(dateFormat.parse("sep").getTime())); Iterator

168 total views, no views today

» Read more

Month Sorting in Java using HashMap

Program: package agn; import java.util.Date; import java.text.DateFormat; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.HashMap; import java.util.Map; import java.util.TreeMap; public class Sorting { public static void main(String[] args) throws ParseException { Map<Date, Integer> m = new HashMap<Date, Integer>(); DateFormat dateFormat = new SimpleDateFormat("MMM"); m.put(new java.sql.Date(dateFormat.parse("Apr").getTime()),67); m.put(new java.sql.Date(dateFormat.parse("Dec").getTime()),89); m.put(new java.sql.Date(dateFormat.parse("Jan").getTime()),56); m.put(new java.sql.Date(dateFormat.parse("Sep").getTime()),34); Map<Date, Integer> m1 = new TreeMap(m); DateFormat df = new SimpleDateFormat("MMM");

360 total views, 2 views today

» Read more

Eclipse plugin for go language

Step 1: Open the eclipse. Step 2: Help -> Install New Software. Step 3: Add the repository. http://goclipse.googlecode.com/svn/trunk/goclipse-update-site click next and finish. Step 4: Now you can able to see File -> New -> others -> Go project in the eclipse. Then start working on “go language”.   Thanks for reading this post……..!!! 224 total views, no views today

224 total views, no views today

» Read more

[Solved] eclipse invalid go language settings

Configuring GO settings: Step 1: Open the eclipse. Step 2: File -> New -> Go Project (Give project name as your wish) Step 3: Set the GOROOT value like this,   give ok and create the project. Step 4: Inside src folder create hello.go file and paste the below code, package agn import “fmt” func main() { fmt.Println(“Hello World”) }  Step 5: Run and see

234 total views, no views today

» Read more

Configure GO Settings in eclipse

Configuring GO settings: Step 1: Open the eclipse. Step 2: File -> New -> Go Project (Give project name as your wish) Step 3: Set the GOROOT value like this,   give ok and create the project. Step 4: Inside src folder create hello.go file and paste the below code, package agn import “fmt” func main() { fmt.Println(“Hello World”) }

167 total views, no views today

» Read more

Hello World Go Programming Language

Step 1: Download the go programming language from the below link, http://code.google.com/p/go/downloads/list and Install it. Step 2: Create a file named hello.go and paste the below code, package main import “fmt” func main() { fmt.Println(“Hello World”) }  Step 3: Save the hello.go in bin folder as like in java. Step 4: Compile and run the program as like below,  

288 total views, no views today

» Read more

[Solved] The JRE_HOME environment variable is not defined correctly – Tomcat

Error: The JRE_HOME environment variable is not defined correctly – Tomcat Solution: Right click on My computer (Computer) -> Properties -> Advanced System settings -> Advanced -> Environment Variables Click ok and close. Now Run the apache startup.bat under bin. Recommended Java Books: 3,057 total views, no views today

3,057 total views, no views today

» Read more

Sample multithreading program using Callable Interface

Step 1: Create “MainThread.java” and paste the below code, package runnableandcallable; import java.util.ArrayList; import java.util.Collection; import java.util.List; import runnableandcallable.CallingThread; import java.util.concurrent.Callable; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; public class MainThread{ private static ExecutorService service = Executors.newFixedThreadPool(10); //connection pool @SuppressWarnings("unchecked") public static void main(String[] args) throws InterruptedException { List<CallingThread> threads = new ArrayList<CallingThread>(); //ArrayList to store the threads with CallingThread Type CallingThread ct

214 total views, 1 views today

» Read more
1 51 52 53 54 55 61