Skip to content

Instantly share code, notes, and snippets.

View mdsami's full-sized avatar
🏠
Work from Mars

MD SAMI mdsami

🏠
Work from Mars
View GitHub Profile
switch (item.getItemId()){
case R.id.share:{
Intent shareIntent = new Intent(Intent.ACTION_SEND);
shareIntent.setAction(Intent.ACTION_SEND);
shareIntent.setType("text/plain");
shareIntent.putExtra(Intent.EXTRA_TEXT, "Enjoy This Apps https:/apps link");
startActivity(shareIntent);
@mdsami
mdsami / prime.py
Created August 15, 2016 18:39
Prime number calculation with python in DIU-Cluster 10 nodes Raspberry pi
def is_prime(n):
status = True
if n < 2:
status = False
else:
for i in range(2,n):
if n % i == 0:
status = False
return status
for n in range(1,10001):
package com.atomapgroup.aeonshopping;
import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.ActionBar;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.CheckedTextView;
package com.atomapgroup.aeonshopping;
import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.ActionBar;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.Button;
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/three_buttons_activity"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".SelectStore">
<RelativeLayout
android:layout_width="fill_parent"
@mdsami
mdsami / overlay.php
Last active December 14, 2016 05:29
#overlay
<?php
require( __DIR__.'/facebook_start.php' );
$token = $_SESSION['facebook_access_token'];
//$r = new HttpRequest('https://graph.facebook.com/me?access_token='.$r, HttpRequest::METH_POST);
$output = curly($token);
echo $output;
$r=json_decode($output, true);
package com.example.mdsami.receivedsms;
/**
* Created by mdsami
* 1/5/2017.
* thrusday -11.00 pm .
*/
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
@mdsami
mdsami / mpipypi.py
Created January 11, 2017 08:15 — forked from jcchurch/mpipypi.py
Compute Pi using Python and MPI4PY
"""
This code computes pi. It's not the first python
pi computation tool that I've written. This program
is a good test of the mpi4py library, which is
essentially a python wrapper to the C MPI library.
To execute this code:
mpiexec -np NUMBER_OF_PROCESSES -f NODES_FILE python mpipypi.py
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
<!--[if IE]>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<![endif]-->
package com.example.stccon.spiner;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.graphics.Color;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import android.view.View;