This file contains hidden or 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<string.h> | |
int checkState(char ele[20][20],char array[50][3],int arrlength){ | |
int i; | |
for(i=0;i<arrlength;i++) | |
if(strcmp(ele[0],array[i]) ==0) | |
return i; | |
return -1; | |
} | |
void main(){ |
This file contains hidden or 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<string.h> | |
void main() { | |
char input[100],l[50],r[50],temp[10],tempprod[20],productions[25][50]; | |
int i=0,j=0,flag=0,consumed=0; | |
printf("Enter the productions: "); | |
scanf("%1s->%s",l,r); | |
while(sscanf(r+consumed,"%[^|]s",temp) == 1 && consumed <= strlen(r)) { | |
if(temp[0] == l[0]) { | |
flag = 1; |
This file contains hidden or 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
### A program to download wallpapers from alphacoders.com | |
###Author: N.V.Pruthvi Raj, Anantapur, India. | |
###Date: 23/12/2014 | |
###Modified on 1/11/2015 according to the new thumbnail system by the site | |
import requests,urllib2 | |
import shutil | |
import re | |
import os | |
from bs4 import BeautifulSoup | |
url = 'http://wall.alphacoders.com/search.php?search=digital+art&name=Naruto&page=1' |
This file contains hidden or 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<string.h> | |
void main() { | |
char input[100],l[50],r[50],temp[10],tempprod[20],productions[25][50]; | |
int i=0,j=0,flag=0,consumed=0; | |
printf("Enter the productions: "); | |
scanf("%1s->%s",l,r); | |
printf("%s",r); | |
while(sscanf(r+consumed,"%[^|]s",temp) == 1 && consumed <= strlen(r)) { | |
if(temp[0] == l[0]) { |
This file contains hidden or 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
public class Main { | |
public static String nestedReplace(String s) { | |
int nested =0,i=0; | |
StringBuilder o = new StringBuilder(); | |
while(i<s.length()) | |
{ | |
if(nested==0 && s.regionMatches(i,"[yes]",0,4)) | |
{ | |
o.append("Yes"); |
This file contains hidden or 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 openpyxl,datetime,os,time,string | |
from win32com.client import Dispatch | |
workbookname = raw_input('Enter the workbook name: ') | |
outputsheetname = workbookname | |
workbook = openpyxl.load_workbook(workbookname) | |
allsheets = workbook.get_sheet_names() | |
print(allsheets) | |
weeklysheetname = [x for x in allsheets if 'WEEKLY' in x] | |
for sheetname in allsheets: | |
if not sheetname.startswith('I'): |
This file contains hidden or 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
done dona done done |
This file contains hidden or 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> | |
#include<string.h> | |
char* lhs[10] = { "E","E","E","E","E" }; | |
char *rhs[10] = { "E+E","E-E","E*E","E/E","a" }; | |
int numProductions = 5; | |
int row_id,len; | |
char stack[50] = "$"; | |
char inp_string[50]; | |
int get_id(char * string, char* arr[10],int len) |
This file contains hidden or 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 ast | |
allData = [] | |
with open('moosebook.txt','r') as f: | |
allData = list(map(list,ast.literal_eval('[' + f.read().replace(')(','),(')+ ']' ))) | |
for data in allData: | |
print(data[0]+' : '+data[5]) |
This file contains hidden or 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
$(function () { | |
function Player(name,marker,score) { | |
this.name = name; | |
this.marker = marker; | |
this.score = score; | |
}; | |
var p1 = new Player("Player 1","x","000000000"); | |
var p2 = new Player("Player 2","o","000000000"); | |
var SIZE = 3,moves = 0; | |
var turn = p1; |