Skip to content

Instantly share code, notes, and snippets.

clc;clear;
net = alexnet;
net.Layers
%I = imread('peppers.png');
%I=imread('testimage2.jpg');
I=imread('testimagekey.png');
sz = net.Layers(1).InputSize
I = I(1:sz(1),1:sz(2),1:sz(3));
label = classify(net, I);
figure
clc;clear;close
%Fs >2*(Fc + BW), where BW is the bandwidth of the modulating signal, X
fs = 100;
t = (0:1/fs:100)';
%Set the carrier frequency to 10 Hz and input freq to 1 Hz.
fc = 10;
fm=1;
x = sin(2*pi*fm*t);%supressed carrier
%x = sin(2*pi*fm*t)+5;%large carrier
%Create a spectrum analyzer
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
CREATE TABLE IF NOT EXISTS `month` (
<?PHP
define('dbhost','localhost');
define('dbname','scholararchive');
define('dbpw','123456');
define('dbuname','root');
define('$conn','0');
$conn =mysqli_connect(dbhost,dbuname,dbpw,dbname);
mysqli_select_db($conn,dbname);
<?php
include('config_scholarship.php');
if(!null== filter_input(INPUT_POST,'id')){
$id=filter_input(INPUT_POST,'id');
$sql=mysqli_query($conn,"Select * from test where id='$id'");
while($row=mysqli_fetch_array($sql))
@amrrashed
amrrashed / dropdown_menu.php
Created February 7, 2018 09:50
4 different example for dropdown menu
<!DOCTYPE html lang="ar" dir="rtl">
<html>
<body>
<head>
<meta charset="utf-8">
<script type="text/javascript" src="//code.jquery.com/jquery-1.11.3.min.js"></script>
</head>
@amrrashed
amrrashed / code1.m
Created November 28, 2014 12:24
plot with matlab2
z=[10 4 6 9 3];
subplot 221
pie(z)
subplot 222
pie(z,[0 0 0 1 0]);
subplot 223
pie(z,[1 1 1 1 1])
subplot 224
pie3(z,[0 0 0 1 0]);
@amrrashed
amrrashed / code.m
Created November 28, 2014 12:09
matlab fft,filter
clear all;close all;clc;
t=0:0.01*pi:4*pi;
x=cos(4*pi*t)+cos(8*pi*t)+cos(12*pi*t);
fx=fft(x,512);
w=1/(0.01*pi*2)*linspace(0,1,256);
subplot 421
plot(t,x)
xlabel('time')
ylabel('amplitude')
subplot 422
@amrrashed
amrrashed / example1.m
Created November 28, 2014 11:34
plot with matlab
clear all;
close all;
clc;clf;
t=0:0.01*pi:4*pi;
x=sin(t);
y=x;
z=x;
n=length(y);
for i=1:n
if (x(i)<0)
@amrrashed
amrrashed / jquery.limit.js
Created November 13, 2014 17:18
textarea limiter,counter using jquery and javascript
(function($){
$.fn.limita = function(options) {
var defaults = {
limit: 200,
id_result: false,
alertClass: false
}
var options = $.extend(defaults, options);