Reusable components in AngularJS

angular.module('components', []).directive('category', function () { return { restrict: 'E', scope: {}, templateUrl: '/Scripts/app/partials/CategoryComponent.html', controller: function ($scope, $http, $attrs) { $http({ url: "api/FeaturedProducts/" + $attrs.catName, method: "get" }).success(function (data, status, headers, config) { $scope.Cat = data; }).error(function (data, status, headers, config) { $scope.data = data; $scope.status = status; }); [Read More]

Checked or Unchecked Exceptions?

Some Java books(*) covering exceptions advice you to use checked exceptions for all errors the application can recover from, and unchecked exceptions for the errors the application cannot recover from. In reality most applications will have to recover from pretty much all exceptions including NullPointerException, IllegalArgumentExceptions and many other unchecked... [Read More]

Open multiple Eclipse workspaces on the Mac

At the command line, navigate to your Eclipse installation. For example: cd /Applications/eclipse/ or wherever you installed Eclipse to. Once there, launch Eclipse as follows: ./eclipse & This will launch eclipse and immediately background the process. example cd /azizkhani/Download/eclipse/Eclipse.app/Contents/macos [Read More]

درد یک پنجره را پنجره ها می فهمند

  درد یک پنجره را پنجره ها می فهمند معنی کور شدن را گره ها می فهمند سخت بالا بروی ، ساده بیایـــــی پایین قصه ی تلخ مرا سرسره ها می فهمند یک نگاهت به من آموخت که در حرف زدن چشم ها بیشتر از حنجره ها می فهمند آنــچه... [Read More]

Good vs Bad Leader

  ContextGood LeaderBad Leader Responsibility A good leader always takes responsibility of his project. If the project fails, he knows he’s the one to blame and he has the courage to admit it. A bad leader knows it can’t be his fault, so he channels his energy into proving his... [Read More]