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

Thursday, July 26, 2012

Android & Twitter - OAuth authentation

http://automateddeveloper.blogspot.com/2011/06/android-twitter-oauth-authentication.html

I’ve seen a lot of questions about connecting Android apps with Twitter using OAuth and thought I would write up a walk-through of how it can be done. The example will be done using Twitter4J which is a great library for connecting Java apps with Twitter and provides a simple interface to connect to the public Twitter Web Services.

First thing you will need to do is to register your new app (even though you haven’t made it yet!). Do this by heading to https://dev.twitter.com/apps/new (you will need an existing Twitter account sign up). You should complete the form with the relevant details for your app:


Spring Social Twitter Oauth

http://stackoverflow.com/questions/7968641/spring-social-twitter-oauth

Tuesday, July 24, 2012

Android VM and application

Dalvik performs a host of other optimizations, such as utilizing shared memory to allow objects being used by more than one application. This results in less memory consumption and fewer garbage collector cycles (again saving computing time and therefore battery). To achieve this, Android starts a special Dalvik VM instance on system boot, called Zygote, which preloads data into the shared memory that will likely be used by all applications (such as the core libraries). The Zygote VM then forks a new Dalvik instance from itself for each new application that’s about to start. Each child process (which is also a separate Linux process) can then access the shared data.



Sunday, July 22, 2012

Java Classloaders



The Java platform ships with a number of typical classloaders, which are used to do different jobs during the startup and normal operation of the platform:

Primordial (or bootstrap) classloaderThis is instantiated very early in the process of starting up the VM, and is usually implemented as native code. It’s often best to think of it as being a part of the VM itself. It’s typically used to get the basic system JARs—basically rt.jar—loaded and it does no verification.


Extension classloader—This is used to load installation-wide standard extensions. This often includes security extensions.

Application (or system) classloader—This is the most widely used classloader. It’s the one that will load the application classes and do the majority of the work in in most SE environments.


Custom classloader—In more complex environments, such as EE or the more sophisticated SE frameworks, there will often be a number of additional (a.k.a. custom) classloaders. Some teams even write classloaders that are specific to their individual applications. In addition to their core role, classloaders are also often used to load resources (files that aren’t classes, such as images or config files) from JAR files or other locations on the classpath.

Android inter-/intra-process communication


Android offers a unique collection of mechanisms for inter- (and intra-) application
communication. This chapter discusses the following:

Intents
Specify what you intend to do next: either to invoke a particular class within your
application, or to invoke whatever application the user has configured to process
a particular request on a particular type of data
Broadcast receivers
In conjunction with intent filters, allow you to define an application as able to
process a particular request on a particular type of data (i.e., the target of an intent)
AsyncTask
Allows you to specify long-running code that should not be on the “GUI thread”
or “main event thread” to avoid slowing the app to the point that it gets ANR
(“Application Not Responding”) errors
Handlers
Allow you to queue up messages from a background thread to be handled by an-
other thread such as the main activity thread, usually to cause information to up-
date the screen safely