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
// Déclaration du sépérateur | |
char[] separator = { ' ' }; | |
// Exemple | |
string nom = "Anass anass"; | |
string[] mots = nom.Split(separator); | |
// Exemple: utilisation en windowsfroms avec listbox | |
listBox1.Items.AddRange(textBox1.Text.Split(separator)); |
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
//Exemple colorDialog | |
if (colorDialog1.ShowDialog() == DialogResult.OK) | |
{ | |
label1.ForeColor = colorDialog1.Color; | |
} | |
//Exemple fontDialog |
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
module ClassLevelInheritableAttributes | |
def self.included(base) | |
base.extend(ClassMethods) | |
end | |
module ClassMethods | |
def cattr_inheritable(*args) | |
@cattr_inheritable_attrs ||= [:cattr_inheritable_attrs] | |
@cattr_inheritable_attrs += args | |
args.each do |arg| |
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 <stdio.h> | |
#include <stdlib.h> | |
int main() | |
{ | |
int i; | |
int N = 742; | |
int centaines = N/100; | |
int dizaines = N/10 -centaines*10; |
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<stdio.h> | |
#include<stdlib.h> | |
#include<string.h> | |
int main() | |
{ | |
char prenom[20]; | |
char titre[10]; | |
printf("entrez votre prenom: "); |
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<stdio.h> | |
#include<stdlib.h> | |
#include<string.h> | |
int main() | |
{ | |
//déclaration des variales de type string | |
char prenom[20]; | |
char titre[10]; | |
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<stdio.h> | |
#include<stdlib.h> | |
#include<string.h> | |
int main() | |
{ | |
struct Date { | |
char jours[2]; | |
int mois; | |
char annee[4]; |
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
sudo apt-get update | |
sudo apt-get install -y -qq --no-install-recommends build-essential curl git-core vim passwd unzip cron gcc wget netcat libssl-dev zlib1g-dev libmysqlclient-dev libpq-dev libpq-dev libsqlite3-dev | |
sudo apt-get install -y --no-install-recommends imagemagick postgresql-client | |
curl -sL https://deb.nodesource.com/setup_12.x | sudo bash - | |
sudo apt-get install -y --no-install-recommends nodejs |
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
pdf2ps ~/Documents/orchardcore.pdf ~/output-file.ps | |
gs \ | |
-o ~/output.pdf \ | |
-sDEVICE=pdfwrite \ | |
-c "/setrgbcolor{0 mul 3 1 roll 0 mul 3 1 roll 0 mul 3 1 roll 0 mul add add setgray}def" \ | |
-f ~/output-file.ps |
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
class HangpersonGame | |
# add the necessary class methods, attributes, etc. here | |
# to make the tests in spec/hangperson_game_spec.rb pass. | |
# Get a word from remote "random word" service | |
# def initialize() | |
# end | |
attr_accessor :word, :guesses, :wrong_guesses |
OlderNewer