Monday, February 4, 2013

IntelliJ grails run-app vs grails:exec

http://stackoverflow.com/questions/10916713/intellij-uses-mvn-grailsexec-instead-of-original-grails-command

By default IntelliJ use grails:exec to run your Grails app, but if you want to use run-app instead then you need to comment out Grails Maven Plugin in pom.xml




Saturday, January 12, 2013

Spring Configuration Options: XML vs. Annotations

http://www.theserverside.com/tip/How-the-Java-Config-Module-Pounced-on-Spring-30

Spring Configuration Options: XML vs. Annotations
The XML camp talks about separation of concerns. XML configuration is outside the classes. The whole configuration can be viewed easily in only a few files. Furthermore, configuration can change without recompiling, etc.
Cons of XML could be that we have all these String values that need to be converted. Typos occur all over the place, they are difficult to debug, and they are not type safe because of the Strings.
The Annotations party, like myself, like the type safety of annotations. It can also self document a class, so that you can look in the class and truly see what is being injected by Spring.
The cons of Annotations is that it clutters the POJO, sometimes where you might say it is not a POJO anymore. If you change, add or delete, annotations require a recompilation and deployment.
So, who wins the debate?
Guess what: they are all correct. There is no best answer to this debate. So wouldn't it be great if we could get the 'pro' benefits of both styles and remove the cons.
With @Configuration, we can do just that.
@Configuration is configuration using Java classes. Each @Configuration Java class is its own configuration. Since it is Java, it is type safe, we can keep it as a POJO (with just a couple of annotations, we promise not too much), and we can have a clean separation of concerns. We will also have a single resource representing the application's configuration, and we can change it without having to change our application code.

Saturday, January 5, 2013

Wednesday, August 15, 2012

FalconView COM


   FalconView™ COM Overview

  • COM (Component Object Model) is a Microsoft specification which describes how to build components that can be dynamically shared.
  • COM components consist of executable code distributed as DLLs or EXEs
  • COM is language independent (C, C++, Visual Basic, JAVA, ADA…) But Microsoft tools such as VB Visual C++ or C# make it much easier.
With FalconView, you can use the interfaces either from a EXE running out of process or by creating a DLL running InProcess with FalconView. This first example is an EXE implementation.


Sunday, August 5, 2012

How to setup MineCraft Coder Pack (MCP)

Step 1. Download Java JDK (Need this for MCP) 

Step 2. Download MCP (Minecraft Coder Pack) 

http://www.mediafire.com/?hxui27dv5q4k8v4

(This step is only if you want to make mods,clients,etc. for minecraft)
Step 3. Download a Program to Edit with. (Eclipse)
 

Step 4. Download minecraft_server.jar (You need this for MCP) 

Step 5. Download/Installing Winrar 

Step 6. Setting Up MCP 
- Locate where all your downloaded files are.
- Make a folder on your desktop name "MCP" (Don't add quotations)
- Extract mcp70a.zip to folder you just created "MCP"
- Open folder "MCP" on desktop and open "jars" folder, now drag minecraft_server.jar into "jars" folder
- Now go to start and search "Run" then type in %appdata% then click ".minecraft" and copy "bin and "resources" (Make sure they have no mods installed)
- Now go back to "jars" folder and paste "bin" and "resources"
- Now go back to "MCP" and run "decompile.bat"
- If it says you need to update run "updatemcp.bat"
- Now you have successfully setup MPC
 


http://www.thetechgame.com/Archives/t=2004430/tutorial-how-to-setup-mcp-minecraft-coder-pack.html


david@david-ubuntu:~/Minecraft/MCP7.0a$ ./decompile.sh
== MCP 7.0 (data: 7.0a, client: 1.3.1, server: 1.3.1) ==
!! Please install either wine or astyle for source cleanup !!
# found ff, jad patches, ff patches, osx patches, srgs, name csvs, doc csvs, param csvs, renumber csv, astyle config
!! Updates available. Please run updatemcp to get them. !!
> Creating Retroguard config files
!! client already decompiled. Run cleanup before decompiling again !!
== Decompiling server using fernflower ==
> Creating SRGs
> Applying Retroguard
> Applying MCInjector
> Unpacking jar
> Copying classes
> Decompiling
> Copying sources
> Applying fernflower fixes
> Applying patches
> Cleaning comments
- Done in 67.34 seconds
== Reformating server ==
> Cleaning sources
!! reformating disabled due to no astyle or config !!
- Done in 1.16 seconds
== Updating server ==
> Adding javadoc
> Renaming sources
- Done in 0.83 seconds
== Recompiling server ==
> Cleaning bin
> Recompiling
- Done in 11.15 seconds
> Generating server md5s