Skip to content

Instantly share code, notes, and snippets.

View oflarcade's full-sized avatar

Omar Farouk Lakhdhar oflarcade

View GitHub Profile
@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();
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
<?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" />
/*
* 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;
@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;
import { createStore } from 'redux'
import {Animated, Easing } from 'react-native';
const defaultState = {
levelNbr: 1,
levelName: '',
questionNbr: 1,
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';
@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';
<?php
$studentN= array('omar');
$studentS= array('lakhdhar');
$studentID=array('07011141');
?>
<?php