why

This tag is associated with 35 posts

Why Invest in Loyalty Rewards Programs

SOURCE share on facebook tweet on twitter pin on pinterest          

Why Virtual Reality Matters To Marketing

SOURCE share on facebook tweet on twitter pin on pinterest          

Why You’ll Be Wearing Your Next Computer

SOURCE share on facebook tweet on twitter pin on pinterest          

Why YOU Are A Hacker’s Next Target

SOURCE share on facebook tweet on twitter pin on pinterest          

Made in the USA: Why Manufacturing Should Return to America

SOURCE share on facebook tweet on twitter pin on pinterest          

Why Is Printing “B” Dramatically Slower Than Printing “#”?

I generated two matrices of 1000 x 1000: First Matrix: O and #. Second Matrix: O and B. Using the following code, the first matrix took 8.52 seconds to complete: Random r = new Random(); for (int i = 0; i < 1000; i++) { for (int j = 0; j < 1000; j++) { … Continue reading »

Why Is Subtracting These Two Times (In 1927) Giving a Strange Result?

If I run the following program, which parses two date strings referencing times one second apart and compares them: public static void main(String[] args) throws ParseException { SimpleDateFormat sf = new SimpleDateFormat(“yyyy-MM-dd HH:mm:ss”); String str3 = “1927-12-31 23:54:07”; String str4 = “1927-12-31 23:54:08”; Date sDt3 = sf.parse(str3); Date sDt4 = sf.parse(str4); long ld3 = sDt3.getTime() … Continue reading »

Why Is Char[] Preferred Over String for Passwords?

In Swing, the password field has a getPassword() (returns char[]) method instead of the usual getText() (returns String) method. Similarly, I have come across a suggestion not to use Strings to handle passwords. Why does String pose a threat to security when it comes to passwords? It feels inconvenient to use char[]. Ahamed Answer: Strings … Continue reading »

With C arrays, why is it the case that a[5] == 5[a]?

As Joel points out in Stack Overflow podcast #34, in C Programming Language (aka: K & R), there is mention of this property of arrays in C: a[5] == 5[a] Joel says that it’s because of pointer arithmetic but I still don’t understand. Why does a[5] == 5[a] ? Dinah Answer: The C standard defines … Continue reading »

Bjarne Stroustrup: Why I Created C++

share on facebook tweet on twitter pin on pinterest          

Become a TFE Insider!