Skip to content

Instantly share code, notes, and snippets.

View salimos's full-sized avatar
🇹🇳

SocoM salimos

🇹🇳
View GitHub Profile
<?php
#symfony/src/dwira/AnnoncesBundle/Entity/annonce.php
namespace dwira\AnnoncesBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
echo "Entrer le login de l'utilisateur souhaité :"
read user
adduser -a $user 2>/dev/null # 2>/dev/null redirection vers la
if [ $? -eq 0 ] # poubelle de la commande précédente
then # si le résultat est faux
echo -e "\033[31m L'utilisateur $user à bien été créé ! \033[00m"
else
echo -e "\033[31m Echec, l'utilisateur $user n'a pas été créé, vérifier vos données... \033[00m"
fi
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package edu.esprit.presentation;
import api.RSSReader;
import edu.esprit.dao.EquipeDAO;
import edu.esprit.dao.FavoritsDAO;
import edu.esprit.entite.Equipe;
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package mp3player;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.util.logging.Level;
import java.util.logging.Logger;
#include <iostream>
using namespace std;
int main(){
int a,b,c,d;
a = rand() % 9+1 ;
b = rand() % 10;
c = rand() % 10;
import bb.cascades 1.0
Page {
property int x
property int y
Container {
id: container
layout: DockLayout {
@salimos
salimos / afficher.html
Created November 25, 2013 23:39
Exemple LocalStorage
<html>
<head>
<title>afficher dans le LocalStorga</title>
<script type="text/javascript">
function show () {
document.write("<TABLE BORDER='5'><CAPTION> Meilleur score </CAPTION> <TR> <TH> Nom </TH> <TH> Score </TH> </TR> ")
for (var i=1; i<6; i++) {
document.write("<tr><td>")
document.write(localStorage.getItem("nom"+i),"</td><td>")
document.write(localStorage.getItem("score"+i),"</td></tr>")
package edu.esprit.mariage.domain;
import java.io.Serializable;
import java.util.Date;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
@salimos
salimos / main.cpp
Created September 19, 2014 21:43
Simple exemple de vérification de la config d'OoenCV
//
// main.cpp
// OpenCV
//
// Created by Slim Khan on 19/09/2014.
// Copyright (c) 2014 Slim Khan. All rights reserved.
//
#include <iostream>
var active = false;
function changeRefer(details) {
if (!active) return;
for (var i = 0; i < details.requestHeaders.length; ++i) {
if (details.requestHeaders[i].name === 'Referer') {
details.requestHeaders[i].value = 'http://www.google.com/';
break;
}