Skip to content

Instantly share code, notes, and snippets.

View minons1's full-sized avatar

Salim minons1

View GitHub Profile
@minons1
minons1 / index.html
Created June 19, 2020 10:57
Flask using static content
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Static content</title>
<script src="{{url_for('static',filename='js/index.js')}}"></script>
</head>
<body>
@minons1
minons1 / CurrencyConverter.cs
Created March 31, 2021 14:21
Currency Converter Windows Form App .NET framework C#
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Newtonsoft.Json.Linq;
@minons1
minons1 / DynamicCurrencyConverter.cs
Created March 31, 2021 16:47
Dynamic Currency Converter using API in .NET Framework C#
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Net.Http;
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="AmazingAwesomeApp.MainPage">
<StackLayout>
<Frame BackgroundColor="Crimson" Padding="24" CornerRadius="0">
<Label Text="Welcome to Xamarin.Forms!" HorizontalTextAlignment="Center" TextColor="White" FontSize="36"/>
</Frame>
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Xamarin.Forms;
namespace AmazingAwesomeApp
{
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Using Bootstrap -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css"
integrity="sha384-JcKb8q3iqJ61gNV9KGb8thSsNjpSL0n8PARn9HuZOnIxN0hoP+VmmDGMN5t9UJ0Z" crossorigin="anonymous">
<script src="https://code.jquery.com/jquery-3.5.1.min.js"
integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0=" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.1/dist/umd/popper.min.js"
<?= $this->extend('layout') ?>
<?= $this->section('css') ?>
<link rel="stylesheet" href="css/style.css">
<?= $this->endSection() ?>
<?= $this->section('title') ?>
Dashboard
<?= $this->endSection() ?>
<?php
namespace App\Controllers;
class Home extends BaseController
{
public function index()
{
return view('index');
}
Class CreateBlogTable extends Migration
{
public function up()
{
$this->forge->addField([
'blog_id' => [
'type' => 'INT',
'constraint' => 5,
'unsigned' => true,
'auto_increment' => true,
class BlogModel extends Model
{
protected $table = 'blog';
protected $primaryKey = 'blog_id';
protected $useAutoIncrement = true;
protected $insertID = 0;
protected $protectFields = true;
protected $allowedFields = ['blog_id','blog_title', 'blog_description'];
// Dates