Skip to content

Instantly share code, notes, and snippets.

View kevinvavelin's full-sized avatar
💻
Coding

Vavelin Kevin kevinvavelin

💻
Coding
View GitHub Profile
var gulp = require('gulp');
var gutil = require('gulp-util');
var bower = require('bower');
var concat = require('gulp-concat');
var sass = require('gulp-sass');
var minifyCss = require('gulp-minify-css');
var rename = require('gulp-rename');
var sh = require('shelljs');
var uglify = require("gulp-uglify");
var sourcemaps = require("gulp-sourcemaps");
@kevinvavelin
kevinvavelin / MoodHistory.java
Last active January 10, 2019 13:21
Mood History Array
// Dans le mood history
List<MoodData> moodList = DatabaseManager.readTop7();
// Dans le MoodHistoryAdapter
override View getView(Int position, View convertView,ViewGroup viewGroup) {
View view = new View();
if(convertView == null) {
view = inflater.inflate(R.layout.mood_list_item, parent, false);
TextView numberOfTheDay = view.findViewById(R.id.textOfTheDay);
@kevinvavelin
kevinvavelin / MoodHistory.java
Created January 10, 2019 13:15
Mood History Array
// Dans le mood history
List<MoodData> moodList = DatabaseManager.readTop7();
// Une fois que le MoodHistoryAdapter cree
override View getView(Int position, View convertView,ViewGroup viewGroup) {
View view = new View();
if(convertView == null) {
view = inflater.inflate(R.layout.mood_list_item, parent, false);
TextView numberOfTheDay = view.findViewById(R.id.textOfTheDay);
override func viewDidLoad() {
super.viewDidLoad()
var collectionViewFlowLayout = UICollectionViewFlowLayout()
twitterCardCollectionView = UICollectionView(frame:CGRectMake(0, 0, self.view.frame.size.width,self.view.frame.size.height), collectionViewLayout: collectionViewFlowLayout)
twitterCardCollectionView.registerClass(MultipleCardCollectionViewCell.self, forCellWithReuseIdentifier: "account")
twitterCardCollectionView.delegate = self
twitterCardCollectionView.dataSource = self
twitterCardCollectionView.backgroundColor = UIColor.clearColor()
self.view.addSubview(twitterCardCollectionView)
<?php
if(isset($_POST["mail"])) {
$mail = $_POST["mail"];
try {
$bdd = new PDO('mysql:host=votrehost;dbname=votrenomdebase', 'login', 'motdepasse');
} catch (Exception $e) {
die('Erreur : ' . $e->getMessage());
}
$mailExist = false;
$reponse = $bdd->query("SELECT * FROM mailing");
func doSomethingWithDelegate() {
if delegate as? MyProtocol {
delegate.method()
}
}
OR TRY
func doSomethingwithDelegate() {
delegate?.method()