This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Pageable pageable = PageRequest.of(0, 10); | |
| // Build query without pagination first | |
| Query query = new Query(); | |
| // Add criteria's here | |
| long total = mongoTemplate.count(query, Patient.class); | |
| query.with(pageable); // Apply pagination only for the find operation | |
| List<Patient> filteredPatients = mongoTemplate.find(query, Patient.class, "patient"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| angular.module('myApp', ['smart-table']) | |
| .controller('mainCtrl', ['$scope', '$timeout', | |
| function ($scope, $timeout) { | |
| var nameList = ['Pierre', 'Pol', 'Jacques', 'Robert', 'Elisa']; | |
| var familyName = ['Dupont', 'Germain', 'Delcourt', 'bjip', 'Menez']; | |
| $scope.isLoading = false; | |
| $scope.rowCollection = []; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var user = { | |
| validateCredentials: function (username, password) { | |
| return ( | |
| (!(username += '') || username === '') ? { error: "No Username Given.", field: 'name' } | |
| : (!(username += '') || password === '') ? { error: "No Password Given.", field: 'pass' } | |
| : (username.length < 3) ? { error: "Username is less than 3 Characters.", field: 'name' } | |
| : (password.length < 4) ? { error: "Password is less than 4 Characters.", field: 'pass' } | |
| : (!/^([a-z0-9_-]+)$/i.test(username)) ? { error: "Username contains invalid characters.", field: 'name' } | |
| : false | |
| ); |