This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
This program will calculate factorial value of a given input. Reccursive function is used in this program. | |
**/ | |
#include<stdio.h> | |
/* Main function */ | |
int main(){ | |
int n; | |
int result = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#define MAX 10 | |
int choice = 0; | |
int stackBag[MAX] = {}; | |
int pos = 0; | |
int value = 0; | |
// Function for Push an Element to Stack |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import urllib | |
url = 'http://pr4e.dr-chuck.com/tsugi/mod/python-data/data/comments_168215.json' | |
input = urllib.urlopen(url).read() | |
info = json.loads(input) | |
#print info |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Note - this code must run in Python 2.x and you must download | |
# http://www.pythonlearn.com/code/BeautifulSoup.py | |
# Into the same folder as this program | |
import urllib | |
from BeautifulSoup import * | |
position = raw_input('Enter Position - ') | |
count = raw_input('Enter Count - ') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import urllib | |
from BeautifulSoup import * | |
url = raw_input('Enter - ') | |
html = urllib.urlopen(url).read() | |
soup = BeautifulSoup(html) | |
# Retrieve all of the anchor tags | |
tags = soup('span') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if ! hash git &> /dev/null || ! hash php &> /dev/null; then | |
echo -e " *****\n ***** INSTALLING GIT AND PHP\n *****" | |
if hash apt-get &> /dev/null; then | |
sudo apt-get install git-core php5-cli php5-curl | |
elif hash port &> /dev/null; then | |
sudo port install php5-curl | |
elif hash fink &> /dev/null; then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# encoding: utf-8 | |
class Users::OmniauthCallbacksController < Devise::OmniauthCallbacksController | |
before_filter :authenticate_user!, only: :stripe_connect | |
def facebook | |
auth = request.env['omniauth.auth'] | |
@user = User.where(auth.slice('provider', 'uid')).first | |
if @user.present? | |
sign_in(@user, event: :authentication) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<table align="center" style="width: 600px; height: auto; margin: 20px auto 0;"> | |
<tr> | |
<td> | |
<a href="https://www.staff.com/"><img alt="Image" src="https://www.staff.com/newsletter/headerAugust.png"></a> | |
</td> | |
</tr> | |
<tr> | |
<td> | |
<img alt="Image" src="https://www.staff.com/newsletter/titleAugust.png"> | |
</td> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Author Md. Sirajus Salayhin <[email protected]> | |
* Class for parsing number | |
*/ | |
class Parser | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<select name="Country"> | |
<option value="" selected="selected">Select Country</option> | |
<option value="United States">United States</option> | |
<option value="United Kingdom">United Kingdom</option> | |
<option value="Afghanistan">Afghanistan</option> | |
<option value="Albania">Albania</option> | |
<option value="Algeria">Algeria</option> | |
<option value="American Samoa">American Samoa</option> | |
<option value="Andorra">Andorra</option> | |
<option value="Angola">Angola</option> |