Welcome to Ozkey
My goal is to make notes of what I learn while actually making something useful in the process.
Below you can read my notes
My goal is to make notes of what I learn while actually making something useful in the process.
Below you can read my notes
I wanted to try Bugzilla but these days I have little time to play with software and install look like it was going to take to long. After an easier install I was recomened to use a virtual machine. will try it with virtual box
http://www.turnkeylinux.org/bugzilla
Update: turnkeylinux is great. I tried bugzilla and Trac with VirtualBox and they just work. I wish i had seen this website before. they also have mysql virtual server
After having a few problem with the scope of my spring beans for hours we found the answer here:
http://en.wikibooks.org/wiki/ZK/How-Tos/Integrate-Other-Frameworks
While using zk gmaps/gmapz I could not find anything on the internet on why I was getting the error “Failed to process rm e._area is undefined” so if you are having this problem here is the solution. When you create Gmarker set the “maxzoom” to zero.
Gmarker marker = new Gmarker(); marker.setMaxzoom(0);
Today I did some css animation. great example:
I been looking for a good 3D JavaScript engine that will allow us to make some kind of html5 game on a mobile but none of them really work on iphones.
Today I found this: https://github.com/mrdoob/three.js#readme
Most of the examples do not work with an iphone as they have to many polygons but some do work at 30 frames per second !
These work well in iPhone (3Gs):
http://mrdoob.github.com/three.js/examples/canvas_geometry_cube.html
http://mrdoob.github.com/three.js/examples/canvas_interactive_cubes.html
This one does not work on iphone (you need to be able to click) but looks like fun. Create a 3d model here: http://mrdoob.com/projects/voxels/ When you finish creating your 3D model the url will be longer copy it to your iphone and you will see your 3d model.
Using Javascript instead of zscript to calculate a value means you don’t have to communicate with the server until necessary but how do you send data back to the server? I could not find a complete answer so here is my answer below:
In your zul page you will need a textbox (hidden if you want)
<textbox id="serverComm" class="serverComm"></textbox>
Your Javascript put something like this to trigger event
zk.Widget.$($(".serverComm")).setValue("value to send");
wid = zk.Widget.$($(".serverComm"));
zAu.send(new zk.Event(wid, 'onUser', location));
In your “GenericForwardComposer” you need to listen for the event:
Textbox serverComm;
public void onUser$serverComm(Event event) throws Exception {
Event eventx = Events.getRealOrigin((ForwardEvent)event);
String test = eventx.getData().toString();
System.out.println(test);
}
So you don’t make the same mistakes I made:
I been trying to get the users GEO-location so I can pre-fill one of the questions with the users country. This code did the trick
the HTML:
<script type="text/javascript" src="http://www.google.com/jsapi?key=ABQIAAAA-O3c-Om9OcvXMOJXreXHAxQGj0PqsCtxKvarsoS-iqLdqZSKfxS27kJqGZajBjvuzOBLizi931BUow"></script> <script type="text/javascript" src="/js/geoIP.js" ></script> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> <div class="countryDiv"/> <input> </div>
the Script:
google.load("maps", "2", {callback: initialize});
function initialize() {
// Initialize default values
var latlng = new google.maps.LatLng(37.4419, -100.1419);
var location = "";
// If ClientLocation was filled in by the loader, use that info instead
if (google.loader.ClientLocation) {
latlng = new google.maps.LatLng(google.loader.ClientLocation.latitude, google.loader.ClientLocation.longitude);
location = "" + getFormattedLocation() + "";
}
alert(location);
$(".countryDiv input").val(""+location);
}
function getFormattedLocation() {
return google.loader.ClientLocation.address.country;
}
Amazon web services looks very complicated at first but this document really helps to explain the different products they have.
http://media.amazonwebservices.com/AWS_Storage_Options.pdf
Amazon EC2 cloud allow root access to the Instance over ssh. This is a Bad Idea. To secure your Instance and give you a more secure method to access it:
# useradd -G wheel account# passwd account# visudo## Allows people in group wheel to run all commands
# %wheel ALL=(ALL) ALL
## Same thing without a password
%wheel ALL=(ALL) NOPASSWD: ALLAfter you’ve edited the /etc/sudoers file, perform these steps on your Amazon EC2 Instance:
cd /home/accountmkdir .sshcp /root/.ssh/authorized_keys .sshchown -R account:account .sshYou can now access your Amazon EC2 account using your Private Key.
taken from: http://robpickering.com/2010/08/battle-of-the-clouds-rackspacecloud-vs-amazon-ec2-247
I just got an account with Amazon web services and I hope to get tomcat and mysql running sometime in the near future.
sudo apt-get install mysql-server tomcat6
That’s really as complicated as it gets. Depending on how you do your webapp deployment, you’ll want to install tomcat6-admin
this is what i think i have to do:
sudo apt-get install tomcat6-admin
Config files can be found in
/etc/mysql
/etc/tomcat6
/etc/default/tomcat6.
Start and stop servers using
/etc/init.d/tomcat6 start|stop
/etc/init.d/mysql start|stop
*http://stackoverflow.com/questions/5334989/installing-tomcat-6-and-mysql-server-on-ubuntu-ec2-instance