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
| import {config} from "../app.config"; | |
| import {crypto} from 'crypto-browserify'; | |
| import {Buffer} from 'buffer/'; | |
| export class RsaService { | |
| private privateKey: string; | |
| private publicKey: string; | |
| private enabled: boolean; | |
| constructor() { |
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
| @Component | |
| public class OrtecAuthenticationProviderImpl extends OrtecAuthenticationProvider<UserDTO> { | |
| @Autowired | |
| private UserRepository repository; | |
| @Override | |
| protected void configure(AuthenticationConfigurer<UserDTO> configurer) { | |
| configurer | |
| .loadUserByUsername(username -> repository.findByUsername(username)) | |
| .createUserEntity(ldap -> { |
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
| #include "string.h" | |
| void main(int ac, char **args) { | |
| String hello = string_init("hello"); | |
| hello->append(hello, " my girl"); | |
| printf("got a length of %d now", hello->length(hello)); | |
| } |
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
| /** | |
| * @Author: romain.pillot | |
| * @Date: 18/08/2017 | |
| */ | |
| @Service | |
| public class ActivityService extends AbstractCrudService<ActivityDTO, ActivityRepositoryImpl> { | |
| @Autowired | |
| private UserService userService; |
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
| import {Injectable} from '@angular/core'; | |
| import {Http, Headers} from '@angular/http'; | |
| import {Observable} from 'rxjs/Rx'; | |
| import 'rxjs/add/operator/catch'; | |
| import "rxjs/add/operator/mergeMap"; | |
| import "rxjs/add/operator/do"; | |
| import {isNullOrUndefined} from "util"; | |
| @Injectable() | |
| export class AuthenticationService { |
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
| @Override | |
| protected void defineConverter(ConverterBuilder<User, UserDTO> builder, Converter converter) { | |
| builder | |
| .convertEntity((entity, dto) -> dto.getRoles().addAll(entity.getRoles().stream() | |
| .map(x -> converter.convert(x, RoleDTO.class)) | |
| .collect(Collectors.toSet()))) | |
| .convertDto((dto, entity) -> entity.setRoles(dto.getRoles().stream() | |
| .map(x -> converter.convert(x, Role.class)) | |
| .collect(Collectors.toSet()))); | |
| } |
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
| #include <stdlib.h> | |
| char *strdupl(char const *str) | |
| { | |
| char *new; | |
| int i; | |
| i = 0; | |
| while (str && str[i] && ++i); | |
| if (!(new = malloc(sizeof(char) * (i + 1)))) | |
| return (NULL); |
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
| static t_object *create_object(t_key *key) | |
| { | |
| t_object *object; | |
| if (!(object = malloc(sizeof(t_object)))) | |
| return (NULL); | |
| object->type = keyget_integer(key, "type"); | |
| object->position = my_create_sfvector3f(keyget_integer(key, "position.x"), | |
| keyget_integer(key, "position.y"), | |
| keyget_integer(key, "position.z")); |
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
| #!/usr/bin/python | |
| # | |
| # Made by [email protected] | |
| # Version: 1.2.1 | |
| # | |
| ''' | |
| An Epitech norme checker | |
| Usage: python norme.py <files to scan> [-nocheat] [-verbose] [-score] [-libc] |
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
| if not defined then | |
| defined = true | |
| ArenaEnemies = { | |
| "arenapet1", | |
| "arenapet2", | |
| "arenapet3", | |
| "arena1", | |
| "arena2", | |
| "arena3", |