Friday, 11 December 2015

How to Enable Click To Play Plugins in Google Chrome


image
Have you ever opened a webpage only to have all sorts of multimedia on the page just start playing? Chrome has a hidden setting that was designed to prevent situations just like that. Read on to find out how to enable it.

Enabling Click To Play Plugins in Chrome

Click on the settings wrench and select the settings menu item.
image
Then you will need to click on the advanced settings link.
image
Scroll down until you can see the privacy section, then click on the Content settings button.
image
A new Window will pop-up, scroll down until you see the Plug-ins section. Then change the plug-ins option from Run all plugin content to “Let me choose when to run plugin content”.
Settings_-_Content_settings
IMPORTANT!
Make sure you check the Manage Exceptions button in the screenshot above, because that will override the setting.
For Chrome, you’ll also need to head into about:plugins (literally type that into the address bar and hit Enter) and make sure that “Always allowed to run” isn’t enabled, which appears to override the click-to-play setting.
Screenshot_7_11_15__12_35_PM
Of course you should probably just click the Disable button to make sure Flash is dead.
Now navigate to any website that requires a plugin, like YouTube, and you will have to click on the content to activate the plug-in.
image
That’s all there is to it.

Thursday, 10 December 2015

RoFL.....!!!!!!!!!




Future king of Internet programming

What is Java to you? A programming language you learned in college? The lingua franca of corporate IT? Would you believe that Java is poised to dominate the next explosion of the Internet? Built for embedded computing and streamlined for real-time applications, here's why Java is the language for IoT.



Isn't Java too big for embedded systems?




Java wasn't always a viable first choice for embedded systems, mainly because embedded devices are often stingy on computing resources. Assembler, C, and even Python have fared better in systems with constrained memory, CPU power, or other hardware issues. This objection has largely faded away in the past few years, however, as the average size of an embedded environment has grown. Resource requirements have also shrunk with the introduction of new techniques for compiling Java for embedded environments.

Sunday, 18 January 2015

PART II : Know the Value of Variables : CHARLES AND JACK STORY

                                            Making the Most of Variables
                                and Their Values



▶ Assigning values to things

▶ Making things store certain types of values

▶ Applying operators to get new values


                        READ THE BELOW                                                    CONVERSATION 

The following conversation between Mr. Van Doren and Mr. Barasch never
took place:
Charles: A sea squirt eats its brain, turning itself from an animal into a plant.

Jack: Is that your final answer, Charles?
Charles: Yes, it is.

Jack: How much money do you have in your account today, Charles?

Charles: I have fifty dollars and twenty-two cents in my checking account.

Jack: Well, you better call the IRS, because your sea squirt answer is
correct. You just won a million dollars to add to your checking account.

What do you think of that, Charles?
Charles: I owe it all to honesty, diligence, and hard work, Jack.


Some aspects of this dialogue can be represented in Java by a few lines of code.







what you can do with a Language - Java

                                                            YES I CAN DO IT  


It would be so nice if all this complexity was free, but unfortunately, it isn't.
Someone has to think hard and decide exactly what to ask the computer to
do. After that thinking, someone has to write a set of instructions for the
computer to follow.

Given the current state of affairs, you can’t write these instructions in English
or any other language that people speak. Science fiction is filled with stories
about people who say simple things to robots and get back disastrous, unexpected
results. English and other such languages are unsuitable for communication
with computers for several reasons:



✓ An English sentence can be misinterpreted. “Chew one tablet three
times a day until finished.”
✓ It’s difficult to weave a very complicated command in English. “Join
flange A to protuberance B, making sure to connect only the outermost
lip of flange A to the larger end of the protuberance B, while joining the
middle and inner lips of flange A to grommet C.”
✓ An English sentence has lots of extra baggage. “Sentence has
unneeded words.”
✓ English is difficult to interpret.



class PayBarry {


public static void main(String args[]) {
double checkAmount = 1257.63;
System.out.print(“Pay to the order of “);
System.out.print(“Dr. Barry Burd “);
System.out.print(“$”);
System.out.println(checkAmount);

         }


}


Thursday, 8 January 2015

Checking Out Java Code for the First Time

The first time you look at somebody else’s Java program, you tend to feel a bit
queasy. The realization that you don’t understand something (or many things)
in the code can make you nervous. I’ve written hundreds (maybe thousands) of
Java programs, but I still feel insecure when I start reading someone else’s code.
The truth is that finding out about a Java program is a bootstrapping experience.
First, you gawk in awe of the program. 


Then you run the program to see
what it does. Then you stare at the program for a while or read someone’s
explanation of the program and its parts. Then you gawk a little more and run
the program again. Eventually, you come to terms with the program. (Don’t
believe the wise guys who say they never go through these steps. Even the
experienced programmers approach a new project slowly and carefully.)
In Listing 3-1, you get a blast of Java code. (Like all novice programmers,
you’re expected to gawk humbly at the code.) Hidden in the code, I’ve placed
some important ideas, which I explain in detail in the next section. These
ideas include the use of classes, methods, and Java statements.



The Simplest Java Program


class Displayer {

public static void main(String args[]) {

System.out.println(“You’ll love Java!”);

}


}


Tuesday, 6 January 2015

Not just English is One Language .. People found out even a Language to Communicate with Non Living things " Write Once, Run Anywhere "

Getting Perspective: Where Java Fits In


Here’s a brief history of modern computer programming:
✓ 1954–1957: FORTRAN is developed.
FORTRAN was the first modern computer programming language. For
scientific programming, FORTRAN is a real racehorse. Year after year,
FORTRAN is a leading language among computer programmers throughout
the world.

✓ 1959: COBOL is created.
The letter B in COBOL stands for Business, and business is just what
COBOL is all about. The language’s primary feature is the processing of
one record after another, one customer after another, or one employee
after another.

Within a few years after its initial development, COBOL became the most
widely used language for business data processing. Even today, COBOL
represents a large part of the computer programming industry.

✓ 1972: Dennis Ritchie at AT&T Bell Labs develops the C programming
language.
The “look and feel” that you see in this book’s examples comes from
the C programming language. Code written in C uses curly braces, if
statements, for statements, and so on.
In terms of power, you can use C to solve the same problems that you
can solve by using FORTRAN, Java, or any other modern programming
language. (You can write a scientific calculator program in COBOL,
but doing that sort of thing would feel really strange.) The difference
between one programming language and another isn’t power. The
difference is ease and appropriateness of use. That’s where the Java
language excels.

✓ 1986: Bjarne Stroustrup (again at AT&T Bell Labs) develops C++.
Unlike its C language ancestor, the language C++ supports object oriented
programming. 

✓ May 23, 1995: Sun Microsystems releases its first official version of the
Java programming language.
Java improves upon the concepts in C++. Java’s “Write Once, Run
Anywhere” philosophy


Part I Getting Started

                                                             All about Java



What You Can Do with Java

It would be so nice if all this complexity was free, but unfortunately, it isn't.

Someone has to think hard and decide exactly what to ask the computer to
do. After that thinking, someone has to write a set of instructions for the
computer to follow.

Given the current state of affairs, you can’t write these instructions in English
or any other language that people speak. Science fiction is filled with stories
about people who say simple things to robots and get back disastrous, unexpected
results. English and other such languages are unsuitable for communication
with computers for several reasons:
✓ An English sentence can be misinterpreted. “Chew one tablet three
times a day until finished.”
✓ It’s difficult to weave a very complicated command in English. “Join
flange A to protuberance B, making sure to connect only the outermost
lip of flange A to the larger end of the protuberance B, while joining the
middle and inner lips of flange A to grommet C.”
✓ An English sentence has lots of extra baggage. “Sentence has
unneeded words.”

Tuesday, 19 November 2013

why string is immutable in java



This is one of the most popular String Interview questions in Java, which starts with discussion of,  What is String, How String in Java is different than String in C and C++, and then shifted towards what is immutable object in Java , what are the benefits of immutable object , why do you use it and which scenarios do you use it. This is some time also asked as "Why String is final in Java" . Though there could be many possible answer for this question, and only designer of String class can answer this , I think below two does make sense

1) Imagine StringPool facility without making string immutable , its not possible at all because in case of string pool one string object/literal e.g. "Test" has referenced by many reference variables , so if any one of them change the value others will be automatically gets affected i.e. lets say

String A = "Test"
String B = "Test" 

Now String B called "Test".toUpperCase() which change the same object into "TEST" , so A will also be "TEST" which is not desirable.

Monday, 24 June 2013

Declarative Programming

Many software and hardware producers take pride in the exponential pace of technology change, but for users and consumers of their products and services the rapid technological obsolescence often means increased costs, frustrations, and unfulfilled promises. Corporate America expects to make capital investments in goods and facilities that should last five, ten, even twenty years, but only an eighteen-month lifetime for computer software and hardware investment is not uncommon.
Lowering the costs to develop new software solutions or extending the lifetime of software applications are two complementary approaches to addressing technological change. These goals can often be met by taking a declarative strategy when designing software systems independent of the programming methodology employed.
Issues with Imperative Programming
Most programming projects today use the imperative style of programming. Developers write sequences of operations in a language, such as C++, Java, Visual Basic, etc., that implement an algorithm, or recipe, for performing tasks. The algorithm for the task mixes logical, or relational, statements about the task to be solved and control statements about how to calculate the solution. The logical statements describe "what-to" calculate while the control statements describe "how-to" calculate. Debugging the algorithm consists of verifying the accuracy of the logical statements and fixing the control statements, if necessary.
There are many problems with the imperative approach. The sequence of operations critically determines the correctness of the algorithm. Unexpected execution sequences through an algorithm caused by user input actions or real-time events in a multitasking environment may result in subtle or catastrophic algorithm failure. Writing the control logic is the programmer's responsibility and, therefore, subject to implementation errors. Understanding a program's algorithm is often difficult for other developers without extensive metadata, or comments, on the code and empirical tracing of the program's execution with sample data. Verifying program correctness consumes a significant portion of the development effort, but also usually fails to discover a significant number of defects.
To address the problems associated with imperative programming, the computer industry has developed and advocated many approaches. Structured programming and campaigns against "go-to" statements address some of the problems discovered with ad hoc control structures and statements. Modularization initiatives stress decomposition techniques on the premise that humans can better comprehend, reason about, and maintain smaller pieces of code. Object-oriented programming advocates program constructions using reusable components, libraries, and frameworks. The pattern programming school stresses analogies to other fields, such as architecture, by constructing programs using well-designed and crafted solutions, or patterns, that recur in many programming contexts.
What is Declarative Programming?
Declarative programming separates the logic, or what, of an algorithm from the control, or how, of an algorithm. The programmer still specifies the logic or equations specifying the problem's relations, but the programming system is responsible for control, or how the logic is evaluated. The most familiar examples are spreadsheets and query languages for relational databases. The user, or programmer, specifies a mathematical relation as a query, say in SQL, for what to retrieve, while the database engine determines how to execute the query against the database.
There are many advantages to declarative programming over the imperative style. In declarative languages, programmers do not specify sequences of operations, but only definitions or equations specifying relations. Unlike imperative programming, the logic relations in declarative programming are execution order independent, free of side effects of evaluation, and semantically clear to visual inspection.
The declarative family of programming languages has a long history in the academic computer science community and specialized areas of commercial application, such as compiler construction, expert systems, and databases. Declarative languages have two main family trees. The logic declarative languages, such as Prolog, are based on first-order predicate calculus, which generalizes the notions of Aristotelian true or false values to statements, or predicates, involving relations among any entities. The other family branch consists of functional declarative languages, such as Miranda, Haskell, and SML. The functional declarative languages are based on the l-calculus developed by the mathematician, Alonzo Church in the 1930's. l-calculus formalizes the notions of recursive application of pure functions to computable problems. Although not widely known as such, the latest programming fashion, XSLT, an extensible stylesheet language for transforming XML, is also a functional declarative language.
Despite the theoretical advantages of declarative programming languages, they do not have widespread use in commercial programming practice despite an attempt in the 1980's by Borland to mass-market a PC version of Prolog along with the highly popular Turbo Pascal. There are many factors contributing to the infrequent use of declarative languages. A large contributor is the paucity of collegiate training in declarative languages, but awkward syntaxes of some languages, inefficient compilers and run-times, and restricted domains of applicability of generalized "how-to" mechanisms are all contributors.
Using Declarative Strategies in Commercial Software
While declarative programming languages have not received wide-spread commercial usage, the strategy of separating logic, or what, from control, or how, in an algorithm is a powerful, generalized technique for increasing ease of use and extending the longevity of software. Declarative techniques are particularly powerful in user interfaces and application programming interfaces (APIs) that have a rich, complex set of inputs over a relatively small field of execution behaviors.
Two examples of commercial software that illustrate the applicability of declarative techniques are DriverLINX and ExceLINX in the fields of data acquisition and test instrument control.
Using Declarations for Data Acquisition
DriverLINX is an API for controlling data-acquisition hardware used to measure and generate analog and digital signals interfaced to all types of external transducers. Data-acquisition applications include laboratory research, medical instrumentation, and industrial process control.
Traditionally, APIs for data-acquisition devices modeled the characteristics of the hardware design and had a large number of functions of one or more parameters to setup the hardware and control data flow through the system. The ordering of sequences of operations was often critical to correctly programming and controlling the hardware. Upgrading to new data-acquisition hardware was often costly as hardware-necessitated changes in the order of operation sequences to program the hardware required costly software changes.
To surmount these problems, DriverLINX takes an abstract and declarative approach to data-acquisition programming. Instead of modeling specific board designs, DriverLINX abstracts the functional subsystems of data-acquisition hardware into generalized attributes and capabilities. Programs request the measurement task they want to perform by parameterizing a "service request" declaration. The DriverLINX runtime determines how to satisfy the service request using the available hardware and returns the measurements as a packetized stream to the program. The data-acquisition programmer is relieved of any responsibility for data-acquisition algorithm control.
Besides relieving the programmer of control responsibility, the DriverLINX abstract, declarative approach gives the program syntactic and semantic interchangeability when migrating to equivalent hardware products. The abstract, declarative approach also helps isolate the software vendor from early technological obsolescence of change in the computer industry by focusing on the immutable logic of data-acquisition relations while the control mechanisms vary with software developments. DriverLINX has been a viable approach to data-acquisition programming for more than 12 years despite the market evolution from 16-bit Windows to .NET today.
Using Declarations for Test Instruments
Test instruments, such as digital voltmeters and electrometers, have evolved from simple devices with a front panel knob and display screen to sophisticated measurement processors performing dozens of measurement and control functions. Like data-acquisition devices, typically developers send a carefully ordered sequence of commands to an instrument to setup the measurement and then send additional command sequences to control the data flow of measurements from the instrument. The aforementioned problems for developers using imperative approaches to instrument control significantly limit ease of use and prohibit quick instrumentation solutions to short-term measurement needs.
ExceLINX is an add-in to Microsoft Excel that allows rapid specification of instrument test setups by using worksheet forms. Users specify, or declare, the channels, configurations, sampling rates, triggering, and data locations for the measurements they wish to perform by filling out an Excel worksheet. When the user selects the "start" button on the toolbar, ExceLINX translates the specification into the correct command sequence for the target instrument, initiates the measurement, and flows the data back to the requested worksheet. Users can setup and collect measurements by themselves in minutes using logic specifications compared to days or weeks using programmer's time for imperative specifications.
Internally, ExceLINX also uses a declarative approach to handling the complex problem of field validation for the worksheet forms. Instruments have hundreds of parameters with complex overlaps among parameters. To validate whether the instrument supports the parameter set the user selected, ExceLINX maintains a dependency tree of allowed, disallowed, and unused parameters for every input cell on the worksheet. Each node in the tree also maintains logical relations among the selected set of parameters that ExceLINX evaluates at runtime to cross validate user input selections. Each supported instrument model has different parameter semantics, but ExceLINX can easily handle this complexity by switching model trees because the model-specific logic in the validation tree is separate from the shared control implementation in the ExceLINX code.
Declarative programming strategies that separate logic from control in algorithms are powerful techniques that can be used with today's popular imperative languages. These techniques can make software more interchangeable, maintainable, usable, and endurable.

Thursday, 30 May 2013

how to enable java console in mac

Mac OS X comes with a pre-installed Java Runtime environment (JRE). There are different versions of Java and Mac users using different OS such as Leopard, Lion. Mac users may have different JRE versions installed on their Mac's.
Mac users need to know that though JRE comes pre-installed on their machines, the Java Console is disabled by default. It means you are likely to get JRE related errors when you try to run an application on Mac that needs Java Runtime environment. There is a simple solution to this problem, activate the Java Console and enable Javascript on your Mac. Let's take a look at steps to enable viewing of Java Console in a Mac.
Steps to enable Java Console on Mac:
Close all Internet browsers before proceeding. This step is necessary because you will be required to restart your Internet browsers again after activating Java Console on your Mac.
  • Step 1: Navigate to Application folders. You can use the Finder's Go Menu to navigate to the Application folder. The top-right corner of the Finder's goes Menu lists Application option. Clicking on "Application" reveals the application folder.

  • Step 2: Navigate to Utiliities-> Java in Applications folder.

  • Step 3: Click on the item labeled as "Java preferences" icon in Java folder.

  • Step 3: Click on "Advanced" tab located on the top of the window.

  • Step 4: Locate the "Show Console" in Java Console section in Java Prefrences window.

  • Step 5: Select radio button "Show Console" in the Java Preferences window.
After you have enabled the view of Java Console in Mac OS, you need to enable Javascript in order to run Java Virtual Machine on your Mac. You can use any browser such as Safari, Internet Explorer, or Mozilla Firefox installed on your Mac to enable Javascipt.
Steps to activate Javascript in Safari:
  • Launch Safari browser by click on the application icon in the dock
  • Go to "Menu" option located on the top right corner of the application
  • Select "Preferences" from the menu
  • In preferences window, click on "Security" tab.
  • Locate the option "Enable Javascript" and check the box adjacent to the option.
  • Click on "Save" in the Preferences window to save the settings and exit the Preferences window.
Steps to activate Javascript in Firefox:
  • Launch Firefox browser by clicking on the application icon in the dock
  • Go to "Menu" option located on the top right corner of the application
  • Select "Preferences" from the menu
  • In preferences window, click on "Content" tab.
  • Locate the option "Enable Javascript" and check the box adjacent to the option.
  • Click on "Save" in the preferences window to save the settings and exit the preferences window
Steps to activate Javascript in Internet Explorer 5 and above:
  • Launch Internet Explorer by clicking on the application icon in the dock
  • Go to "Tools " menu option located on the tool bar
  • Select "Internet options" from the menu
  • In Internet Options window, click on "Security" tab.
  • Locate the "Custom level" button and click on it.
  • In Security Settings dialog box, enable "Active Scripting" under Scripting category.
  • Click on "Ok" to quit the window.
  • Click Refresh to apply the changes.

Wednesday, 15 May 2013

Java Programming, An Introduction


Java is a programming language developed by Sun in 1995. It is designed to be platform independent. This means that the same program can run regardless of whether you use Windows, MacOS, Linux or a cell phone. To do this there must be a Java interpreter installed on the system where the program should run.
Java allows you to write programs without having to go out and buy something. It only requires some time and patience.
Java can be used for making interactive parts of web sites. It is known as applets. This may be small games or useful tools. Java should not be confused with JavaScript, which can also be used for websites. These are two different things.
Java is OOP. Object Oriented Programming. It's a slightly different way of thinking than the "old fashioned" programming language. There could for example have two variables X and Y without having defined any relation between them. In OOP, it could be that you have the object "point" which has x and y as variables that determine point coordinates. It's a little hard to explain very briefly. You probably should try it to understand it.
You can get started with programming Java applications without buying any software. Just as HTML can be written in a plain text editor like notepad in Windows, you can also write Java applications. It just requires that you change the suffix on the file extension from Txt to Java.
/ / Comment
public class HelloWorld
{ public static void main (String [] args)
{ System.out.println ("Hello World!"); } }
The above small program is probably one of the simplest you can make. It prints out the text "Hello World".
To be able to run your Java program, you need to change it to byte-code. The tool to do this is called JDK, Java Development Kit. The latest version is called JDK 6 Update 23. It can be downloaded free from oracle.com
Now, it is not enough with notepad and compiler. It is also necessary to have a book on Java. There are many sources available on the net.
It is a matter of taste whether you liked the somewhat primitive method of writing in notepad or whether you'd rather use a large package with many utilities and guides. But if you want to learn how to program from scratch, I would recommend this simple tool. It is perhaps inconvenient to write all the code, but you learn something by doing it.
Java games are used on many pages and are usually developed by professional programmers. It is also be possible to make a simple game if you are a hobby programmer. When I taught myself Java for a few years ago I made a little Java game to gain some practice in programming.

Tuesday, 1 January 2013

happy new year... love u all.. N J O y!!!!!!!

happy new year.... hope all your dreamzzzzzzz come true!!!!!!!!!!!!!!

                                  All goals set by us,
                                   All dreams thought by us,
                                     All sorrows, happiness, faiths  - Hope everything goes fine for us!!!






Tuesday, 25 December 2012

Spend Half Day In A Graveyard


A physician gave some rather whimsical advice to a patient, an aggressive, go-getter type of businessman. Excitedly the businessman told the doctor what an enormous amount of work he had to do and that he had to get it done right away or else things will fall apart.

“I take my brief case home every night and it’s packed with work,” he said with nervous inflection.

“Why do you take work home with you at night?” the doctor asked quietly.

“I have to get it done,” he fumed.

“Can’t someone else do it, or help you with it?” asked the doctor.

“No,” the man snapped. “I am the only one who can do it. It must be done just right, and I alone can do it as it must be done, and it has to be done quickly. Everything depends upon me.”

“If I write a prescription, will you follow it?” asked the doctor.

This, believe it or not was the prescription. His patient was to take off half-day a week and spend that half-day in cemetery.

In astonishment the patient demanded, “Why should I spend a half-day in a cemetery?”

“Because,” answered the doctor, “I want you to wander around and look at the gravestones of men who are there permanently. I want you to meditate on the fact that many of them are there because they thought even as you do, that the whole world rested on their shoulders. Meditate on the fact that when you get there permanently the world will go on just the same &, as important as you are, others will be able to do the work you are now doing.” 

The patient got the idea. He stopped fuming & fretting. He got peaceful and developed a more competent organization & his business is in better condition.