Saturday, 17 August 2013

In civilization V: Brave New World, will other countries (all are AIs) act different if you enter an era?

In civilization V: Brave New World, will other countries (all are AIs) act
different if you enter an era?

In CiV (civilization V) Brave New World, will other countries (all are
AIs) act different if you enter an era? For example if you were to enter
the renaissance (or whatever) era, would other countries reach that
faster? I know that developing nukes does something along those lines, but
does reaching eras?

Checking for other rules

Checking for other rules

I have this "forward" rule that can move the player to different room and
it is functioning properly...
forward:-here(Location), facing(Direction), connected(Location,
PlaceToMove, Direction), moveto(PlaceToMove).
forward:-write('Sorry you cant move forward.').
But now , I have to put some rules that can detect if the player can feel
the breeze if he is around "m" and can fell into the pit if he reaches
"m".
breeze(m,xong).
checkbreeze:- here(Location), breeze(P,xong), connected(Location,P,_),
write('You felt the breeze.').
checkpit:- here(m), write('You fell into the pit.').
But my question is , how can I put it in the "forward" rule??

Jconsole Cannot Connect

Jconsole Cannot Connect

All,
I am using VNC to connect to a server. I am able to VNC into the server,
and open Jconsole, but cannot get it to connect to my process whether I
include the PID or try connecting using the GUI. The weird thing is all
the processes show up in the GUI. See below.

I get this when I try connecting:

Followed by

Is there something I need to do in order to get jconsole working locally
on a linux server over vnc?
Thanks

C++ STL, iterator or index number?

C++ STL, iterator or index number?

While i using C++ *STL*, should i use iterator or the index number?
Another thing, is all the templates (list,deque,...) accept both iterator
and index number (like vector) or not?

Converting an xml file for use in a Ruby on Rails application

Converting an xml file for use in a Ruby on Rails application

http://www.cafeconleche.org/examples/baseball/1998statistics.xml
I am trying to load the xml file above to fit into a rails application and
am having very little success. I am thinking that I should use Nokogiri to
parse the data. The end goal here is to take the data from the link above,
baseball stats, and have a table displaying its data, the baseball players
stats and fit this into a rails application.
Basically, it's two parts: 1. Reading the XML file into your program 2.
Converting the XML into a hash, or any other suggestion
I am using Rails 4.0, Ruby 2.0, on a Mac OSX
How do I read the xml file and convert the data to allow it to run in a
ruby on rails application?

goto page javascript not working in android

goto page javascript not working in android

I am creating webapp using html5, css3, javascript, Phonegap in
dreamweaver. I am using below code to do a goto page feature. it will open
a an html page. but my problem is it's not working in android app. any
help?
javascript Code
function gotopage(id){
var num = document.getElementById(id).value;
var jarry =
["pagenotfound.html","ch1/1.html","ch1/2.html","ch1/3.html","ch1/4.html","ch1/5.html","ch1/6.html"];
if(jarry[num] == null)
num = 0;
window.location.href =
window.location.pathname.substring(0,window.location.pathname.substring(1).indexOf("/"))+jarry[num];
//window.location.href = "/"+jarry[num];
Html code
<input type="text" id="t1" size="4px"/>
<input type="button" value="Goto Page" onClick="gotopage('t1')"/>
I am getting error message on android " application error: A network error
occurred. (file:///android_asset/ch1/1.html)

Can I match Windows' touchpad acceleration curve to that of my MacBook's trackpad?

Can I match Windows' touchpad acceleration curve to that of my MacBook's
trackpad?

I recently got a Logitech T650 at work for reasons of a RSI nature.
I have a MacBook Air at home, and have used Apple laptops for the last 10+
years.
Windows and OS X's varying pointer acceleration curves never bothered me
before because I used a trackpad on my mac and a mouse on windows... but
using a touchpad on both makes this subtle difference annoying.
There's some options out there to help people who are used to Windows
adjust their Macs, but I'm accustomed to OS X's acceleration curve so I
would rather change Windows.
I'm guessing I can change SmoothMouseXCurve and SmoothMouseYCurve in the
registry, but I can't find any data of what values would correspond to the
third-slowest tracking speed on the Mountain Lion trackpad prefpane.