Author Archives: Kevin Whetstone

Java Programming: Basic 2D Array

/*
Name: Kevin Whetstone
Date: 11/15/13
Program: Basic 2D Array
Description: For Loop, and Array
**/

//professor’s code
import java.util.Scanner;
import java.util.Random;

public class GridPractice
{

public static void main(String[] args)
{
//declarations
Scanner in = new Scanner(System.in);
Random  generator = new Random();
int [][] grid;    //un-instantiated grid
int size = 0;    //number of rows and columns

//get size of grid – no validation & instantiate
System.out.print(“Enter size of grid: “);
size = in.nextInt();
grid = new int[size][size];
//end of professor’s code

//beginning of my own code:

//fill grid with random number from 1..99
System.out.println();
for (int row=0; row<size; row++)
{
for (int col=0; col<size; col++)
{
grid[row][col] = generator.nextInt(100); //random numbers 0.99 – not 100
}
}

//print grid with formatting to align
System.out.println();
System.out.print(“Random values assigned to ” + size + ” by ” + size + ” grid.\n”);
for(int row = 0; row < size; row++)
{
for(int col = 0; col < size; col++)
{
System.out.printf(“%4d”, + grid[row][col]);
}
System.out.println();
}

//print each row sum
System.out.println();

int rowSum = 0;

System.out.print(“Row    Sum\n”);
System.out.print(“———-\n”);
for(int row = 0; row < size; row++)
{
for(int col = 0; col < size; col++)
{
rowSum += grid[row][col];
}

System.out.printf(“%3d”, + row);
System.out.printf(“%6d”, + rowSum);
System.out.println();
rowSum = 0;
}

//print each column sum
System.out.println();

int colSum = 0;

System.out.print(“Col    Sum\n”);
System.out.print(“———-\n”);
for(int col = 0; col < size; col++)
{
for(int row = 0; row < size; row++)
{
colSum += grid[row][col];
}

System.out.printf(“%3d”, + col);
System.out.printf(“%6d”, + colSum);
System.out.println();
colSum = 0;
}

//print two diagonal sums
int upperLeft2LowerRight = 0;
int upperRight2LowerLeft = 0;

for(int col = 0; col < grid[0].length; col++)
{
for(int row = 0; row < grid[0].length; row++)
{
if(row == col)
{
upperLeft2LowerRight += grid[row][col];
}
}
}

for(int row = 0; row < grid[0].length; row++)
{
for(int col = 0; col < grid[0].length; col++)
{
if(!(row == col))
{
upperRight2LowerLeft += grid[row][col];
}
}

}
System.out.print(“Diagonal from upper left to lower right is ” + upperLeft2LowerRight);
System.out.print(“\nDiagonal from upper right to lower left is ” + upperRight2LowerLeft);
}
}

You can test with any number from 1 to 99, and I will start with 2

Here is the output

2Darray

Advertisements

Java Programming: BankAccount/BankAccountTester

BankAccount Class Code:

public class BankAccount
{
//Data type
private double balance;
private double bankFees;
private int freeTrans;
private int transCount = 0;

//default constructor
public BankAccount()
{
balance = 0;
}

public BankAccount(double amount)
{
balance = amount;

}

//The method for withdraw
public void withdraw(double amount)
{
balance -= amount;
this.setTransNum();
}

//The method for deposit
public void deposit(double amount)
{
balance += amount;
this.setTransNum();
}

//the method for Transaction Fee
public void setTransFee(double amount)
{
bankFees = amount;

}

public void setTransNum()
{
transCount++;
}

//the method for Free Transactions
public void setNumFreeTrans(int amount)
{
freeTrans = amount;
}

public double monthlyCharge()
{
//return Math.max(transCount, freeTrans);

if(transCount > freeTrans)
{
balance -= ((transCount – freeTrans) * bankFees);
transCount = 0;
return balance;
}

else
{
transCount = 0;
return balance;
}

}

//Accessor method for balance
public double getBalance()
{
return balance;
}

}

Read the rest of this entry

Java Programming: First

public class First
{
public static void main (String [] args)
{

System.out.println(“Testing”);
}

}
You can run the program by using JGRASP to see the output nor CMD (Command Shell):

Capture1

Capture

Programming Languages (Simple)

Java Programming:

//Author: Kevin Whetstone

public class Test
{
public static void main (String [] args)
{
System.out.print(“Hello People”);
}
}

Perl Programming:

#!/user/bin/perl
#Author: Kevin Whetstone

print (“Hello People”);

C++ Programming

#include <iostream>
#Author: Kevin T. Whetstone
using namespace hellworld;

int main ()
{
  cout << "Hello World!";
  return 0;
}

If you want other programming languages, please let me know so I can code the basic program to your preference. 

Stanley Cup Final Predictions

banner bos chi scf

Gesterling: I want to start off with a little historical playoff perspective, Boston and Chicago is the first original six Stanley Cup match-up since 1979 when Montreal beat the New York Rangers, and the first playoff match-up between the Bruins and Blackhawks since 1978.

The road to the finals consisted of Boston beating Pittsburgh in a surprising upset to many. I am not terribly surprised that they got past Pittsburgh, but more so the fashion that it happened in winning it in just four games. Chicago only needed 5 games to take care of the Los Angeles Kings with game five going into double overtime.

Now onto the match-ups, in terms of offense I like Chicago, I think they are better offensively, not by a land slide like I thought of the Penguins over the Bruins, and we saw how that went. On defense I give Boston the edge, I don’t think this is a landslide either, I think the Blackhawks are a really good defense, so they will be no push overs. In net I give the edge to the Bruins, while Crawford has been in the league longer, I feel like Tuukka Rask really is the better of the two goalies, that might be a product of the Bruins defense, but I think his fundamentals are pretty much top notch when he is confident and he seems extremely confident coming into the series.

The key players for both teams will be the tougher guys like Shawn Thornton and Milan Lucic on Boston and Bryan Bickell and Andrew Shaw on Chicago. These guys are key elements to their teams success, to me Bickell and Lucic are a wash physically and Bickell in the playoffs has 8 goals, so he is no slouch. Another key match up could be Patrice Bergeron and Jonthan Toews, will Bergeron have to smoother Toews like he did Crosby? I think the better question is that, can the Bruins contain Patrick Kane? If they can then Chicago is in trouble.

Chicago needs to find an answer for the red hot Milan Lucic-David Krejci-Nathan Horton line because they’ve been incredible in the post season, if the Blackhawks have an answer for that than the Bruins are in big trouble because Jaromir Jagr and Tyler Seguin are not getting pucks in the net.

Speaking of Jagr and Seguin these guys are close to getting some pucks in the net I feel, they’ve come close so many times that is it impossible not to like what you see from them, and eventually it will pay off. I just do not want it to happen during a street hockey game in the summer time when it doesn’t matter.

So here is my prediction, I’ll go Boston in six games. I think the Bruins will pull it off because Tuukka Rask has been red hot, and the Bruins defense is better. I firmly believe that defense and goaltending wins titles. I think this is where Boston is stronger than Chicago, but if Crawford can get into a zone it could be a series of low scoring games, which again plays in Boston’s favor.

Whetstone: In my prediction, I have no doubt who will win the series since Boston Bruins made through tough times: Maple Leafs, and Pittsburgh Penguins. The Chicago Blackhawks were the hottest team this very short season, but like I said in my last couple posts, I do not want to see Chicago Blackhawks to enter the Stanley Cup Final but I have no choice and say this; I am very impressed with their performance and their hungry for the cup. My prediction that Boston Bruins will win the series because I want them to win, not because I like them, it is because of what happen in Boston due to Boston Bombing.

Razer Introduces The Blade—The World’s Thinnest Gaming Notebook (1 video and 4 product pictures)

Razer Introduces the Blade—The World’s Thinnest Gaming Notebook

The Razer Blade: Thinner than a dime with a 14-inch HD+ Screen, Intel Quad Core i7, NVIDIA GTX 765M

SAN FRANCISCO – May 30, 2013 – Razer™, the world leader in high-performance gaming hardware, software and systems, today unveiled Razer Blade, the world’s thinnest gaming laptop. The Razer Blade, measuring in at just 0.66-inches thin, packs more power-per-cubic-inch than any other laptop in the world. The Razer Blade is powered with a future 4th gen Intel® Core™ processor,  the latest NVIDIA® GeForce® GTX 765M GPU and utilizes solid-state storage technology with boot speeds of up to four-times faster than a traditional 5400-RPM notebook hard drive. The Razer Blade has a rigid all-aluminum chassis, with a stunning 14-inch LED-backlit HD+ display and features a custom-designed trackpad and backlit gaming grade keyboard.

“We’ve designed and built the thinnest, most powerful 14-inch laptop in the world,” says Min-Liang Tan, Razer co-founder, CEO and creative director. “Thinner than a dime and more powerful than other traditional desktop replacements today, we’ve created an entirely new category of thin and powerful laptops that is generations ahead of other PCs.”

Designed entirely in-house by the multi-award winning Razer design team, the Razer Blade has an incredible 14-inch LED-backlit HD+ display with a native resolution of 1600 x 900 and its custom-made gaming grade trackpad offers multi-touch gesture support. The Razer Blade also features a full-size backlit gaming keyboard that has full anti-ghosting capabilities and programmable keys powered by the revolutionary Synapse 2.0.

“Incredible innovation is happening across the computing landscape, and the new mobile gaming experience Razer is delivering with the Edge, and now its Blade, is remarkable,” says Navin Shenoy, vice president and general manager of Intel’s Mobile Client Platforms. “Powered by a future 4th gen Intel Core processor, people can expect the highest level performance from the Blade for the most discerning gamer.”

The ultra-portable laptop features 8 GB of fast 1600 MHz DDR3L memory and comes standard with 128 GB of total solid-state storage with options for a 256 GB or 512 GB SSD. The Razer Blade also comes with Dolby® Home Theatre® v4, featuring immersive audio-quality output that is custom-tuned to deliver a cinematic sound experience.

The Razer Blade delivers up to six hours of battery life and includes a Killer™ Wireless-N high-performance wireless networking adapter, combining intelligence and control along with up to five-times the wireless networking speed of competitive wireless adapters.

“The 14-inch Razer Blade packs a ton of horsepower into a very small chassis,” says Rene Haas, vice president and general manager of notebook GPUs at NVIDIA. “The new NVIDIA GeForce GTX 765M GPU delivers blazing performance with incredibly efficient power usage to this ultra-portable gaming machine.”

The new 14-inch Razer Blade embodies Razer’s continuing goal to design the world’s best gaming laptops for those that need insanely powerful performance in the thinnest form factors to game anywhere, anytime. Razer sets out to do the impossible without compromising performance and, with the new Blade 14-inch laptop, users are able to game more and do more than ever before on an ultra-portable system.

The Razer Blade will be available for pre-order June 3. For more information, go to www.razerzone.com/blade.

Price:
Starts at $1,799

Availability:
Razerzone.com – Pre-Order June 3
United States and Canada

Product features:

  • Future 4th gen Intel® Core™ processor (formerly codename ‘Haswell’)
  • 8 GB Onboard Memory (DDR3L – 1600 MHz)
  • NVIDIA® GeForce® GTX 765M (2 GB GDDR5) & Intel HD4600
  • Windows® 8 64 Bit
  • 128 GB SSD, with optional 256/512 GB SSD (mSATA)
  • Qualcomm® Killer™ NIC N1202 (802.11a/b/g/n + Bluetooth® 4.0)
  • 14.0 in. HD+ 16:9 Ratio, 1600 x 900, with LED backlight
  • Built-in stereo speakers
  • 3.5 mm audio microphone/headphone combo jack
  • Array microphone
  • (3x) USB 3.0 port (SuperSpeed)
  • HDMI 1.4a audio and video output
  • Dolby® Home Theater® v4
  • 7.1 Codec support (via HDMI)
  • Built-in full HD webcam (1.3 MP)
  • Compact 150 W Power Adapter
  • Built-in 70 Wh Rechargeable lithium ion polymer battery
  • Razer™ Anti-Ghosting Keyboard (with adjustable backlight)
  • Razer™ Synapse 2.0 Enabled
  • Kensington Lock
  • 13.6 in. / 345 mm (Width) x 0.66 in. / 16.8 mm (Height) x 9.3 in. / 235 mm (Depth)
  • 4.135 lbs. / 1.876 kg

For more information about the Razer Blade, please visit www.razerzone.com/blade.

About Razer:
Razer™ is the world leader in high-performance gaming hardware, software and systems. Founded in 1998, with its headquarters in Carlsbad, California, the company has offices in nine cities around the globe. Used by the most demanding professional gamers who compete in global tournaments, Razer provides gamers with the unfair advantage of cutting-edge technology and award-winning design. We live by our motto: For Gamers. By Gamers.™

For more information, please visit www.razerzone.com/.

Product Video:

NHL Playoff Predictions

banner min chi

#8 Wild vs #1 Blackhawks

Gesterling: I don’t think this will be a cake walk for the Blackhawks, Minnesota is a tough team and they will make it hard for Chicago. guys like Mikko Koivu and Dany Heatley need to play big along with Zach Parise. I still question Corey Crawford so I am not going to give the Blackhawks an easy win this series. With that said I still take Chicago in six.

Whetstone: Wild win 4-3
banner det ana

#2 Ducks vs # 7 Red Wings

Gesterling: This should be a great series between these teams, I think Detroit has the man power to knock off the Ducks, but it will need consistent play outside of defense without the aid of Nicklas Lindstrom. The Ducks to me do not have the leadership they need to succeed over anyone, so with that said I am going with Detroit in seven.

Whetstone:  Ducks win 4-3

web banner sj van

#3 Canucks vs #6 San Jose

Gesterling: This series I am on the fence with. Because I think the Sharks can win the series but that would require them to score goals and I just cannot see it being to the level they need it to be. So my prediction is Vancouver in six.

Whetstone: Sharks win 4-3

banner la stl

#5 Kings vs #4 Blues

Gesterling: I really like the Blues, I think the world of the way they play, and I think they will stun the defending champions. I just don’t think the Kings are up to the level talent wise that the Blues have. However if Quick can play the role of God again this season then the Kings could pull off another championship run. As I said I think St. Louis will stun the Kings, so my pick is Blues in six.

Whetstone: Kings win 4-3

banner nyi pit

#8 Islanders vs #1 Penguins

Gesterling: I think this will be a good series, I think the Islanders are a feel good story and I think they will make it a better series than people expect. It will take contributions from John Tavares down to Brad Boyes to pull off an upset. But with Crosby coming back (from what I can guess), and the firepower the Penguins have, I think it will be too much. I am taking Pittsburgh in six.

Whetstone: Islanders win 4-3

banner mon ott

#2 Canadiens vs #7 Senators

Gesterling: The Canadiens and Senators had a good season series. And I expect it to continue here, I think there will be some fireworks, and a good amount of goals. I think goaltending will steal this series for the Senators so I am going with the upset here, Ottawa in seven.

Whetstone: Montreal win 4-2

banner was nyr

#3 Capitals vs #6 Rangers

Gesterling: This series is interesting, because we have Henrik Lundquist who is great in the regular season but in the playoffs he is known to let in some soft goals. And then on the other end there is Alexander Ovechkin, who is also not great in the playoffs. I think the Rangers have more talent than the Capitals though on the ice so I take the Rangers in six.

Whetstone: Capitals win 4-1

banner tor bos

#5 Maple Leafs vs #4 Bruins

Gesterling: The Bruins have over the last few seasons taken Phil Kessel out of his game when the Bruins played the Maple Leafs and that has essentially crippled the Leafs offense. But this year the Maple Leafs have secondary scoring and have been impressive. The key for Boston will be Tuukka Rasks’ play, if Rask doesn’t play well then the Bruins will lose the series. The key for the Maple Leafs will be the play of Phil Kessel, if he has a good series the Maple Leafs will have a good shot at upsetting the Bruins.  I predict the Bruins win the series in six games.

Whetstone: Boston win 4-3

Razor Edge Pro

There is a new tablet in the market, Razor Edge Pro;

Quick Specifications:

  • Release date03/28/13
  • Processor Intel 3rd Gen Core i7 i7-3517U / 1.9 GHz ( 3 GHz ) ( Dual-Core )
  • Memory 8 GB
  • Hard Drive 256 GB – Serial ATA-600
  • Operating System Microsoft Windows 8
  • Display Type 10.1 in IPS
  • Max Resolution 1366 x 768 ( HD )
  • Graphics Processor NVIDIA GeForce GT 640M LE / Intel HD Graphics 4000 Dynamic Video Memory Technology 5.0
  • Video Memory 2 GB DDR3 SDRAM

Manufacturer: Razer INC

Part Number: RZ09-00930101-R3U1

General

  • Packaged Quantity 1
  • System Type Slate Tablet PC
  • Mechanical Design No keyboard
  • OS Provided Microsoft Windows 8
  • Notebook type HD display,
    Gaming

Processor / Chipset

  • CPU Intel 3rd Gen Core i7,
    3 i7-3517U / 1.9 GHz
  • Max Turbo Speed 3 GHz
  • Number of Cores Dual-Core
  • Cache 4 MB
  • Features Hyper-Threading Technology

Memory

  • RAM 8 GB,
    ( 2 x 4 GB )
  • Technology DDR3 SDRAM
  • Speed 1600 MHz / PC3-12800

Storage

  • Hard Drive 256 GB SSD
  • Interface Serial ATA-600

Display

  • Type 10.1 in Yes – IPS
  • Max Resolution 1366 x 768 ( HD )
  • Widescreen Yes
  • Features 10-point multi-touch

Audio & Video

  • Graphics Processor NVIDIA GeForce GT 640M LE / Intel HD Graphics 4000 – 2 GB DDR3 SDRAM
  • Memory Allocation Technology Dynamic Video Memory Technology 5.0
  • Video System Features NVIDIA Optimus
  • Camera Yes
  • Resolution 2 Megapixel
  • Sound Stereo speakers , Stereo microphone
  • Compliant Standards Dolby Home Theater v4

Input

  • Type Touch-screen

Communications

  • Wireless 802.11n,
    Bluetooth 4.0

Battery

  • Technology Lithium polymer
  • Capacity 5600 mAh

Connections & Expansion

  • Interfaces USB 3.0,
    Headphone/microphone combo jack,
    Dock

Dimensions & Weight

  • Width 11 in
  • Depth 0.8 in
  • Height 7 in
  • Weight 33.9 oz

Source: http://www.cnet.com/laptops/razer-edge-pro-core/4505-3121_7-35561052.html

Top 20 Most Popular Programming Languages Among Hacker News Readers

  1. Python (3044)
  2. Ruby (1718)
  3. JavaScript (1412)
  4. C 966
  5. C# 828
  6. PHP 662
  7. Java 551
  8. C++ 529
  9. Haskell 518
  10. Clojure 458
  11. CoffeeScript 361
  12. Objective C 326
  13. Lisp 321
  14. Perl 310
  15. Scala 233
  16. Scheme 190
  17. Other 188
  18. Erlang 162
  19. Lua 145
  20. SQL 101

They are the top numbers that hackers tend to use to hack any systems in the world and there is no way to secure them from learning the programming language because they can be taught by teachers, professors, friends, family members, or self-taught.

Source:

http://devopsangle.com/2012/04/06/top-20-most-popular-programming-languages-among-hacker-news-readers/

How to Protect Yourself on Social Networking Sites?

1. Turn off your computer. *Make sure that your computer are turned off, if you don’t want to turn it off, then make sure that you have a password on it (Secure one, not too simple for people to guess)*

2. Be careful with your information. *Don’t give too much of information including your home address, income, location of your job, etc.

3. Restrict your privacy. *Make sure that your posts are private, not public to the world and to the internet because they can be on any search engine (Highest risk for employers to find the information about your rant).

Razor Blade (Gaming Laptop)

Razor Blade Laptop
By: Kevin T. Whetstone

I purchased my first gaming PC, Razor Blade from Razor (http://www.razerzone.com/about-razer). In this blog, I will list the following information on specifications, the good news, and the bad news.

Specifications:

Price as reviewed $2,500
Processor 2.2GHz Intel Core i7-3632QM
Memory 8GB, 1,600MHz DDR3
Hard drive 512GB 7,200rpm HDD, plus 64GB SSD cache
Chipset Intel HM77
Graphics Nvidia GeForce GTX 660M (2GB)/Intel HD 4000
Operating system Windows 7 Home Premium (64-bit)
Dimensions (WD) 16.8×10.9 inches
Height 0.88 inch
Screen size (diagonal) 17.3 inches
System weight / Weight with AC adapter 6.6 pounds / 7.4 pounds
Category Desktop replacement

Good News:
The latest Razer Blade has improved graphics and a quad-core, Core i7 processor with an excellent 17-inch 1080p display

Bad News:
No DVD drive
very pricey (If you want to purchase from the company, Razor)
The new Blade costs $300 less than the first one
Unique Switchblade UI touch-screen interface doesn’t have enough game support

Source:

http://www.razerzone.com/store/razer-blade-r1
http://www.cnet.com/laptops/razer-blade-fall-2012/4505-3121_7-35433773.html

Pros and Cons: FaceBook

Facebook is the king of the internet world but many of you may understand the pros/cons or may not understand them, that is why I am going to provide you pros and cons of using FaceBook.

PROS:

physical boundaries
the freedom to choose whom you would like to share your ‘updates’ with
networking

CONS:

privacy
The freedom of expression on ‘FB’ is often misused and many a time abused by people who seem to be virtually living on the site
here are loads of fake and bogus accounts on the site, with people looking to steal your personal information

Sources:
http://www.buzzle.com/articles/pros-and-cons-of-facebook.html
http://grad.hg3media.com/features/grad1/the_pros_and_cons_of_facebook

%d bloggers like this: