کتاب رایگان Scala Succinctly
Learning a new programming language can be a daunting task, but Scala Succinctly makes it a simple matter. Author Chris Rose guides readers through the basics of Scala, from installation to syntax shorthand, so that they can get up and running quickly.
- Introduction
- Variables and Values
- Expressions and Functions
- Control Structures
- Arrays and Lists
- Other Collection Types
- Classes and Objects
- Pattern Matching
- Closures
- Conclusion
describe('myApp', function() { var scope; beforeEach(angular.mock.module('myApp')); beforeEach(angular.mock.inject(function($rootScope) { scope = $rootScope.$new(); }); it('...') });
describe('Remote tests', function() { var $httpBackend, $rootScope, myService; beforeEach(inject( function(_$httpBackend_, _$rootScope_, _myService_) { $httpBackend = _$httpBackend_; $rootScope = _$rootScope_; myService = _myService_; })); it('should make a request to the backend', function() { $httpBackend.expect('GET', '/v1/api/current_user') .respond(200, {userId: 123}); myService.getCurrentUser(); $httpBackend.flush(); }); });
»httpBackend$.expectGet
»httpBackend$.expectPost
»httpBackend$.expectDelete
»httpBackend$.expectJson
»httpBackend$.expectHead
»httpBackend$.expectPatch
Flush کردن سرویس httpBackend$ در پایان تست نیز برای همین مبحث async اجرا شدن سرویسهای http$backend است.
Always Encrypted is a new feature in SQL Server 2016, which encrypts the data both at rest *and* in motion (and keeps it encrypted in memory). So this protects the data from rogue administrators, backup thieves, and man-in-the-middle attacks. Unlike TDE, as well, Always Encrypted allows you to encrypt only certain columns, rather than the entire database.
تصاویری از اتاق کار برنامه نویسها
When Ruby on Rails, a web application framework written in the Ruby programming language, was first released as open source back in July 2004, it stumbled to rise in the rankings as one of the top programming languages. But in 2006, Apple announced that it would be shipping Ruby on Rails with their Mac OS X v10.5 “Leopard” and Ruby soon became known and used by many. So much so, that the TIOBE index, a measure of the popularity of programming languages, named Ruby the “Programming Language of 2006.” However, due to some scalability issues and the release of other exciting new tools, such as Node.js and AngularJS, Ruby started to lose its popularity and by 2008 it seemed as if it was on its way out.