Tags » Javascript

Wrap different images on different faces of a cube

We can render different geometry in 3D using three.js.
Here I will explain how we can wrap different image on different faces of a Cube using three.js(revision 68). 493 more words

Article

JavaScript 101-#9 – Arrays Pt1

Today’s issue of JavaScript 101 will be all about arrays. If you read the post about data types covering arrays, you should already know at least the basics. 1,230 more words

Development

Difference Between .call() and .apply() in Javascript

Introduction

There is always a confusion in .call() and .apply() where to use when?

Why we need to call a function using .call() 268 more words

.apply

grunt2gulp: a tool for converting Grunt task-runner files to Gulp.js

grunt2gulp is a tool for converting Gruntfiles to Gulp.js files.

There’s a new task runner around, Gulp.js, and it’s supposedly very good (haven’t had a chance to try it yet) but there are still many projects using Grunt. 170 more words

Programming

karma team city reporter not reporting all tests

Have you got few hundred unit tests reporting on TeamCity yet? If not, then:

  • You’re probably not working hard enough
  • You don’t care about quality and maintainability…
  • 161 more words
JavaScript

Integrating ADF / WebCenter and AngularJS – Part 3

No matter what Javascript Framework i use with ADF, i have encountered one problem.Consider the following use case.onDocumentReady uses javascript to update the panelGroupLayout DOM. 858 more words

Adf

Angular JS - Binding Attributes & Events

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>Angular JS</title>
</head>
<body>
    <div data-ng-app="" data-ng-controller="myController">
 
        <!--
            I can use the "data-ng-disabled" directive
            to bind the abilitation of a control
            -->
        <h3>Binding abilitation</h3>
        <button data-ng-disabled="buttonDisabled">Click Me!</button>
        <p>
            Button disabled:
            <input type="checkbox" data-ng-model="buttonDisabled" />
        </p>
        <hr />
 
        <!--
            I can use the "data-ng-show" directive
            to bind the abilitation of a control
            -->
        <h3>Binding visibility</h3>
        <button data-ng-disabled="buttonDisabled" data-ng-show="buttonShowed">Click Me!</button>
        <p>
            Button showed:
            <input type="checkbox" data-ng-model="buttonShowed" />
            Button disabled:
            <input type="checkbox" data-ng-model="buttonDisabled" />
        </p>
        <hr />
 
        <!--
            I can handle an event to make some operation in
            the model with the "data-ng-click" directive
            -->
        <h3>Event handling</h3>
        <button data-ng-click="count = count + 1">Click me!</button>
        <p>You clicked {{ count }} times</p>
        <hr />
 
        <!--
            I can handle an event from the controller
            -->
        <h3>Event handling from controller</h3>
        <button data-ng-click="countIncrement()">Click me!</button>
        <button data-ng-click="toggleAbilitation()">Toggle abilitation</button>
        <p>You clicked {{ count }} times</p>
    </div>
 
    <script>
        function myController($scope) {
            $scope.buttonDisabled = true;
            $scope.buttonShowed = true;
            $scope.count = 0;
 
            //Theese are event handlers
            $scope.countIncrement = function () {
                $scope.count++;
            };
            $scope.toggleAbilitation = function () {
                $scope.buttonDisabled = !$scope.buttonDisabled;
            }
        }
    </script>
 
    <script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
    <script src="//ajax.googleapis.com/ajax/libs/angularjs/1.2.22/angular.min.js"></script>
</body>
</html>
Angular JS