Personally I think Python is better then ruby because it runs on the Django framwork and it can do more. But I wanted some debate from ruby devs so bring it on!!

Member Avatar
Member Avatar
-2 forum 4

Hello everyone, this is my first help post on daniweb so please excuse me if I have done something wrong. So as for my question, I have to shuffle an array of card objects. This is the code I have come up with so far. public void shuffleDeck(){ Random seed = new Random(123456); int n = deck.length; int N = n - 1; for(int i = 0; i < N; i++){ int k = seed.nextInt(deck.length); Card swap = deck[k]; deck[N] = deck[k]; deck[k] = deck[N]; N--; } } When done correctly the output is supposed to be 3d, Ah, 5d, …

Member Avatar
Member Avatar
+0 forum 4

It has been just over a month now since North Korea gloated about its successful nuclear weapon test. A test which prompted the imposition of new UN sanctions against Pyongyang, and if the Korean Central News Agency (KCNA) which acts as a state mouthpiece for the Democratic People's Republic of Korea is to be believed, it has also prompted "intensive and persistent" cyber-attacks. Attacks, according to the North Koreans, which have been jointly launched by South Korea and the United States. ![28f2a88054ead0da521c67c6964c43a1](/attachments/small/0/28f2a88054ead0da521c67c6964c43a1.jpg "align-right") The KCNA claims that the attacks, which are believed to have taken down official state websites such …

Member Avatar
Member Avatar
+1 forum 8

Hi, I have to write a program that plays out a whole game of the card game WAR. I have to create a bunch of classes that go along with some pre written classes so right now im trying to start out small and work my way up. We are given two enum classes of Rank and Suit which look like... public enum Suit { /** * The suit CLUBS */ CLUBS('c', "Clubs"), /** * The suit DIAMONDS */ DIAMONDS('d', "Diamonds"), /** * The suit HEARTS */ HEARTS('h', "Hearts"), /** * The suit SPADES */ SPADES('s', "Spades"); public enum Rank …

Member Avatar
Member Avatar
+0 forum 2

I need to fix the code. Once a war event takes place, no points are assigned however in the next deal whoever wins (be it the player or computer) should get double points. One point for the war and the second point for the next deal that was won as well. import java.util.Scanner; public class Game { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int count = 1; War war = new War(); while(count == 1){ System.out.println("Score: "+war.playerScore+"-"+war.compScore); war.playerCard(); Card playerCard = new Card(war.playerNum, war.playerFace); war.compCard(); Card compCard = new Card(war.compNum, war.compFace); System.out.println("Player: "+playerCard.toString()); System.out.println("Computer: "+compCard.toString()); …

Member Avatar
Member Avatar
+0 forum 23

I recently applied for a PHP programming job and they required me to do a coding challenge. One of the challenges involved simulating the card game war which I found intriguing. I "over-engineered" it as they requested, but I still don't think it was good enough for them. Is there anything I could have done better? A live example is here: http://dev.lifeboatcreative.com/war/index.php The rules this game is based off are found here: http://www.pagat.com/war/war.html Source files are attached.

Member Avatar
Member Avatar
+2 forum 8

Hey, so I just created a new Youtube video with some highlights about my new Indie game "Temporal Wars". I have been trying to get this cool game out for over a year now!! But the Xbox indie reviewers are tough! Which is good, but this is like 5 times I have updated this stuff! Has anybody ran into this issue with the XNA website? Anyway... Here is my new video -> http://youtu.be/7Vo0t25p2vg Ben :)

Member Avatar
+0 forum 0

My web hosting service provider allows me to uplaod my ROOT.war file only. and there is no directory structure. So is there any way by which I can upload pics and add new pages or make changes in existing pages without re-uploading the entire ROOT.war file. P.S. I also want to learn how can I rename a file?. For example I want a user to upload his profile picture, now that picture should be saved in the images/user/profile_pic/user_no folder with the name user_no.gif. How can I achieve this?

Member Avatar
Member Avatar
+0 forum 1

The Iranian Cyber Army may be the latest elite military hacking squad to hit the headlines, but Iran has a long way to go if it's to catch up with China in terms of international data disruption. According to one newly published report into the threat from Chinese state-sponsored espionage activity, the true scale and nature of these cyber-attacks is really quite interesting. [ATTACH=RIGHT]24125[/ATTACH]Context Information Security argues in the '[URL="http://www.contextis.com/news/articles/targetedattacks/Targeted_Attacks_Whitepaper.pdf"]Hidden Tiger, Crouching Dragon, Stolen Data[/URL]' report that while cyber-attacks originating from China are nothing new, they have grown in both size and scope in recent years in order to support …

Member Avatar
Member Avatar
+0 forum 1

[ATTACH=RIGHT]16800[/ATTACH]The Swedish chief prosecutor Eva Finne dismissed a warrant for the arrest of Wikileaks founder Julian Assange less than a day after the warrant for charges of rape and molestation was issued. Finne declared, "I don't think there is reason to suspect that he has committed rape." She did not address the molestation charge, but presumably regards it as also unlikely. When the warrant, involving two young women Assange had encountered in Stockholm and Enk√∂ping, was first issued, statements from Wikileaks called the charges "without basis" and charged that it was one of a series of "dirty tricks" aimed at …

Member Avatar
+0 forum 0

[ATTACH=RIGHT]16424[/ATTACH]In its daily briefing for reporters today, Pentagon spokesman Geoff Morrell demanded that [URL="http://wikileaks.org"]WikiLeaks[/URL] return over 15,000 documents that the site has not yet published. He also denied reports that WikiLeaks had asked Department of Defense officials for assistance in going through the as yet unpublished documents. [I]"The Defense Department demands that Wikileaks return immediately to the US government all versions of documents obtained directly or indirectly from the Department of Defense databases or records...The only acceptable course is for Wikileaks to take steps immediately to return all versions of all of these documents to the US government and permanently …

Member Avatar
+0 forum 0

No, I'm not talking about a Linux vs. Microsoft or Apple vs Microsoft but rather a prediction by UN Telecommunications Agency Chief Hamadoun Toure'. Apparently, the U.S. Homeland Security and other U.S.-based paranoia groups agree since US Secretary for Homeland Security Janet Napolitano said that she received the green light to hire up to 1,000 cybersecurity experts to ramp up the United States' defenses against cyber threats. Need a job? To launch such an attack successfully would take thousands of experienced hackers in different locations simultaneously attacking a site or sites with malicious intent. Depending on the type of attack, …

Member Avatar
+2 forum 0

The DVD format war continues, with neither side determined to give up. So who seems to be winning now? Well, this article [URL="http://www.pcmag.com/article2/0,1895,2104850,00.asp"]seems to claim that Blu-ray is winning[/URL], and will soon displace HD-DVD, as were a number of other articles I read in the last few days on the internet. This particular quote stuck out at me:[I]"[/I]Within three years it will just be Blu-ray." So says Frank Simonis, the Blu-ray Disc Association's European chairman, at the CeBIT trade show. I find this kind of amusing. Well, I'm not totally saying that Blu-ray is unable to outsell HD-DVD and win …

Member Avatar
Member Avatar
+0 forum 7

The End.