Skip to content

Instantly share code, notes, and snippets.

View oflarcade's full-sized avatar

Omar Farouk Lakhdhar oflarcade

View GitHub Profile
<?php
$studentN= array('omar');
$studentS= array('lakhdhar');
$studentID=array('07011141');
?>
<?php
@oflarcade
oflarcade / game.js
Created May 15, 2018 16:42
Odd behavior of this.setState && this.state
import React, { Component } from 'react';
import { View, StatusBar, StyleSheet, AsyncStorage, Dimensions, TouchableOpacity, ImageBackground } from 'react-native';
import { Container, Content, Card, CardItem, Body, Text, Left, Right, Icon, Header } from 'native-base';
import TimerCountdown from 'react-native-timer-countdown'
import Btn from 'react-native-micro-animated-button';
import { Font } from 'expo';
import ResponseButton from '../components/ResponseButton';
import axios from 'axios';
import QuestionDataRaw from '../data/QuestionData';
import React, { Component } from 'react';
import { View, Text, StyleSheet, ImageBackground, Dimensions, Image, } from 'react-native';
import * as Animatable from 'react-native-animatable';
import Expo, { SQLite, AdMobBanner } from 'expo';
import { Container, Content, Body, Right, Header, Left, Button } from 'native-base';
import AwesomeButton from 'react-native-really-awesome-button';
import AnimateNumber from 'react-native-animate-number'
import DropdownAlert from 'react-native-dropdownalert';
import LottieView from 'lottie-react-native';
import { createStore } from 'redux'
import {Animated, Easing } from 'react-native';
const defaultState = {
levelNbr: 1,
levelName: '',
questionNbr: 1,
@oflarcade
oflarcade / DataSource.java
Created October 12, 2018 10:40
SingleTon Database Connection
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package utils;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package datetest;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.time.LocalDate;
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.text.Text?>
<AnchorPane id="AnchorPane" fx:id="myPane" prefHeight="717.0" prefWidth="1080.0" xmlns="http://javafx.com/javafx/9.0.4" xmlns:fx="http://javafx.com/fxml/1" fx:controller="GUI.FXMLController">
<children>
<Button fx:id="mapBtn" layoutX="991.0" layoutY="3.0" mnemonicParsing="false" text="Map" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0" />
<Button fx:id="cnxBtn" layoutX="955.0" mnemonicParsing="false" onAction="#navigateConnexion" text="authentication" AnchorPane.leftAnchor="930.0" AnchorPane.rightAnchor="44.0" AnchorPane.topAnchor="0.0" />
imports:
- { resource: parameters.yml }
- { resource: security.yml }
- { resource: services.yml }
- { resource: "@HomeBundle/Resources/config/services.yml" }
# Put parameters here that don't need to change on each machine where the app is deployed
# https://symfony.com/doc/current/best_practices/configuration.html#application-related-configuration
parameters:
locale: en
@oflarcade
oflarcade / codenameone.java
Created January 10, 2019 13:04
Image width and height
//WIDTH OF THE DEVICE ====> Display.getInstance().getDisplayWidth();
//HEIGHT OF THE DEVICE ====> Display.getInstance().getDisplayHeight();
//WIDTH OF THE IMAGE ====> IMAGE.getWidth();
//HEIGHT OF THE IMAGE ====> IMAGE.getHeight();
@oflarcade
oflarcade / console.js
Created April 1, 2019 12:58
console Wildfly
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
13:35:51,725 INFO [org.jboss.modules] (main) JBoss Modules version 1.4.3.Final
13:35:52,079 INFO [org.jboss.msc] (main) JBoss MSC version 1.2.6.Final
13:35:52,183 INFO [org.jboss.as] (MSC service thread 1-6) WFLYSRV0049: WildFly Full 9.0.1.Final (WildFly Core 1.0.1.Final) starting
13:35:53,444 INFO [org.jboss.as.controller.management-deprecated] (ServerService Thread Pool -- 3) WFLYCTL0028: Attribute 'job-repository-type' in the resource at address '/subsystem=batch' is deprecated, and may be removed in future version. See the attribute description in the output of the read-resource-description operation to learn more about the deprecation.
13:35:53,447 INFO [org.jboss.as.controller.management-deprecated] (ServerService Thread Pool -- 14) WFLYCTL0028: Attribute 'enabled' in the resource at address '/subsystem=datasources/data-source=ExampleDS' is deprecated, and may be removed in future version. See th