This file contains 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
#define _CRT_SECURE_NO_WARNINGS | |
#include <stdio.h> | |
int main(void) | |
{ | |
// Declare variables | |
char wordChar; | |
char lastChar = 'a'; | |
int queueChecker = 0; |
This file contains 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
/* | |
* WRITE A PROGRAM TO DISPLAY THE FOLLOWING TRIANGLE, USING A FUNCTION | |
* | |
* OUTPUT: | |
* * | |
* *** | |
* ***** | |
* ******* | |
* ********** | |
* |
This file contains 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
/* | |
The TC Id numbers are actually 9 digits, the last 2 digits are calculated based on the first 9 digits. These are the steps: | |
- add digits in positions 1,3,5,7,9 and multiply it by 7. | |
- subtract from the computed number digits in position 2,4,6,8. | |
- from the calculated number calculate modulo 10, the result will be your 10th TC Id digit. | |
- Add all 10 digits now, and calculate modulo 10, the result will be your 11th TC Id digit. |
This file contains 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
@Component | |
public class BeanValidation<T> { | |
private final Validator validator; | |
private DtoConverterService dtoConverterService; | |
private BeanValidation(ResourceBundleMessageSourceBean resourceBundleMessageSourceBean) { | |
ValidatorFactory validatorFactory = resourceBundleMessageSourceBean.validator(); | |
this.validator = validatorFactory.getValidator(); | |
} |
This file contains 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
@Component | |
public class ValidationResponseChecker<T> { | |
private final BeanValidation<T> beanValidation; | |
@Autowired | |
public ValidationResponseChecker(BeanValidation<T> beanValidation) { | |
this.beanValidation = beanValidation; | |
} | |
@SuppressWarnings("unchecked") |
This file contains 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
import java.util.ArrayList; | |
import java.util.Date; | |
import java.util.List; | |
/* | |
{ | |
"_id": "507f1f77bcf86cd799439011", | |
"user_id": "507f191e810c19729de860ea", | |
"changes": [ |
This file contains 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
db.Todos.aggregate([ | |
{ | |
$lookup: { | |
from: "Tags", | |
localField: "tags.$id", | |
foreignField : "_id", | |
as: "tags" | |
} | |
}, | |
{ |
This file contains 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
-- This script was generated by a beta version of the ERD tool in pgAdmin 4. | |
-- Please log an issue at https://redmine.postgresql.org/projects/pgadmin4/issues/new if you find any bugs, including reproduction steps. | |
BEGIN; | |
CREATE TABLE public.candidate_users | |
( | |
id integer NOT NULL GENERATED ALWAYS AS IDENTITY ( INCREMENT 1 START 1 MINVALUE 1 MAXVALUE 2147483647 CACHE 1 ), | |
first_name character varying(50) NOT NULL, | |
last_name character varying(50) NOT NULL, |
This file contains 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
public class Instructor extends User { | |
private String biography; | |
private double averageRating; | |
public Instructor() { | |
} | |
public Instructor(int id, String firstName, String lastName, String email, int birthYear, String city, String biography, double averageRating) { |