Pages

Saturday, December 27, 2014

Android Studio Was Unable To Find a Valid JVM

Run the following at terminal:

launchctl setenv STUDIO_JDK /Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk


do shell script "launchctl setenv STUDIO_JDK /Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk"

(OR)



Wednesday, November 12, 2014

D3 local webserver


Command line:

for Python3.x:
                python3 -m http.server 8888 &
                (or)
for Python2.x:
                python -m SimpleHTTPServer 8888 &

The above code will activate the port 8888.
Then open the following URL.

                http://localhost:8888/

Html Template

<style>
.html{
font-size:16px;
font-family: Menlo, Monaco, Consolas, monospace;
}

</style>




<br />
<pre><code class="html">
 
   <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
    <title>BiSpecialist</title>
    <link href="styles/stylesheet.css" rel="stylesheet"></link>
    <script charset="utf-8" src="http://d3js.org/d3.v3.min.js"></script>
    <script src="scripts/angular.js" type="text/javascript"></script>
    <script src="scripts/Script.js" type="text/javascript"></script>
   </head>
   <body>
</body>
</html>
</code>
</pre>

Tuesday, September 2, 2014

String Function - STUFF

SELECT   HD.GroupName,
          STUFF((SELECT distinct  '; ' + D.Name FROM HumanResources.Department D
          WHERE D.GroupName = HD.GroupName
          FOR XML PATH('')), 1, 1, '') Name_Group                    
FROM HumanResources.Department HD
GROUP BY HD.GroupName
ORDER BY HD.GroupName


Wednesday, June 11, 2014

JAVA - Tutorial

class declaration:
       class MyClass {
                        // field, constructor, and
                        // method declarations
                        }
(OR)
        class MyClass extends MySuperClass implements YourInterface {
                // field, constructor, and
                // method declarations
            }

Modifiers:
             1) public
             2) private
Modifiers determine what other classes can access and can be added to the class at the begining as following
              public class MyClass {
                          // field, constructor, and
                         // method declarations
                                  }
(OR)
              private class MyClass {
                          // field, constructor, and
                         // method declarations
                                  }

In general, class declaration can be include these components, in order:
    1.Modifiers such as public, private, and a number of others that you will encounter later.
    2.The class name, with the initial letter capitalized by convention.
    3.The name of the class's parent (superclass), if any, preceded by the keyword extends. A class can only extend (subclass) one parent.
    4.A comma-separated list of interfaces implemented by the class, if any, preceded by the keyword implements. A class can implement more than one interface.
    5.The class body, surrounded by braces, {}.