Can anyone tell me how I modify this piece of java script code to relay the next number in sequence rather than a random one:
var a = Math.random() + ""
var rand1 = Math.floor(Math.random()*1);
quotes = new Array
quotes[0] = "Mathematics is the language of nature"
quotes[1] = "1123581321345589"
var quote = quotes[rand1]
I'm pretty new to this and I'd love to spend the time finding out how to do this myself but my other studies outweigh this lenghty one for the time being. It's going to be used to relay IP addresses as part of a game server testing script/project.
Your question is not complete, however if you want to use next indices instead of random in quotes array, just use
var quote=quotes[2];
If you can explain what exactly you want, may be i could help.
between i am just curious :
quotes[0] = "mathematics is the language of nature";
and
quotes[1]="your fibonacci series";
kinda reminds me of golden ratio.
Residing in a 3U high, 19 rackmountable metal enclosure, the NetVanta 5305 is a single platform that offers six interface slots and dual 10/100Base-T Ethernet LAN ports for true LAN segmentation or DMZ applications...
Vertical antennas are everywhere - on cell phones, broadcast towers and portable radios. You'll also find them on the roofs, towers and vehicles of hams from Altoona to Australia. And for good reason. We all use them, but how can we make them work better? If you're in the market to buy or build a vertical, you'll find a wealth of advice on choosing the design that's best for you...
DEBUG: SMTPTransport trying to connect to host "smtp.gmail.com", port 465
javax.mail.MessagingException: Could not connect to SMTP host: smtp.gmail.com, port: 465;
nested exception is:
java.io.IOException: Couldn't connect using "javax.net.ssl.SSLSocketFactory" socket factory to host, port: smtp.gmail.com, 465
at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:695)
at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:168)
at javax.mail.Service.connect(Service.java:227)
at javax.mail.Service.connect(Service.java:131)
at seeni.Main.(Main.java:47)
at seeni.Main.main(Main.java:60)
You may be hitting a firewall, check that your machine isn't blocking port 465, or if you can - anything on your network as well.
If you can't tell - try using ( from a command prompt )
telnet smtp.gmail.com 465
if it just sits there and returns without connecting then it's a firewall problem.
What are some good API's to consider when starting development on a stand alone GUI applications?
For most of my career I've implemented client / server console applications, shell, server-side web applications and tons of Javascript. I know this is pretty generic but some of the things that are important to me:
- Cross platform compatibility
- Ease of end user installation
- Robust high level OO API
- Ability to prototype but not critical
- HTTP network interfaces /w cookies / sessions and ssl capable
- Good community support
I've looked at a few different GTK solutions like PHPGTK, pyGTK, Java and C#.
My core competencies are C, Python, PHP, Perl and Javascript on mostly Linux and Solaris platforms so it would be nice to not have to brain up on something completely foreign.
Could anyone recommend a good open source solution and briefly explain their advice?
Thanks!
if your goal demands cross-platform, java is a good answer, though GTK is good as well. Both have a pretty good cross platform history.