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
class ApplicationController < ActionController::Base | |
... | |
# FORCE to implement content_for in controller | |
def view_context | |
super.tap do |view| | |
(@_content_for || {}).each do |name,content| | |
view.content_for name, content | |
end | |
end | |
end |
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 void saveJoueur(Joueur joueur) | |
{ | |
List<Joueur> equipe = new List<Joueur>(); | |
List<Joueur> equipeTemp = new List<Joueur>(); | |
equipe = lectureJoueurs(); | |
foreach (Joueur j in equipe) | |
{ | |
if (joueur.isCapitain && j.isCapitain) |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
static void Main(string[] args) | |
{ | |
const char VIDE = '_'; | |
try | |
{ | |
System.IO.StreamReader sr = new System.IO.StreamReader(@"C:\Users\Michael\Desktop\School\Pendu.txt"); | |
string line; | |
while ((line = sr.ReadLine()) != null) | |
{ |