It is the task of taking an image described in a vector graphics format (shapes) and converting it into a raster image (a series of pixels, dots or lines, which, when displayed together, create the image which was represented via shapes). The rasterised image may then be displayed on a computer display, video display or printer, or stored in a bitmap file format. Rasterisation may refer to the technique of drawing 3D models, or the conversion of 2D rendering primitives such as polygons, line segments into a rasterized format.
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 sys | |
if __name__ == "__main__": | |
sys.argv = sys.argv[1:] | |
w1 = sys.argv[0] | |
w2 = sys.argv[1] | |
print(True if sorted(list(w1)) == sorted(list(w2)) else False) |
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 "y.tab.h" | |
%} | |
%% | |
"if" {return IF;} | |
"else" {return ELSE;} | |
"&&" {return AND;} | |
"||" {return OR;} | |
"<=" {return LE;} | |
">=" {return GE;} |
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
%{ | |
/* Definition section */ | |
#include<stdio.h> | |
#include "y.tab.h" | |
extern int yylval; | |
%} | |
/* Rule Section */ | |
%% | |
[0-9]+ { |
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
%{ | |
/* Definition section */ | |
#include<stdio.h> | |
int yylex(); | |
void yyerror(); | |
%} | |
%token NUMBER ID | |
// setting the precedence | |
// and associativity of operators |
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 "y.tab.h" | |
//extern char * yytext | |
%} | |
%% | |
[0-9]+ {return digit;} | |
[a-z]+ {return id;} | |
[\t] ; | |
[\n] {return 0;} | |
. {return yytext[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
#include <stdio.h> | |
char input[100]; | |
int i; | |
int T(); | |
int F(); | |
int TP(); | |
int EP(); | |
int E() | |
{ |
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 icode[10][30], str[30], opr[30]; | |
int i=0; | |
printf("Enter Intermediate Code (terminated by exit):\n"); | |
do{ | |
scanf("%s", icode[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
import sqlite3 | |
from pprint import pprint | |
class DB: | |
def __init__(self): | |
self.con = sqlite3.connect('newdb.db') | |
self.cur = self.con.cursor() | |
def view_table(self): | |
self.cur.execute("Select * from NEW") |
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
from discord.ext import commands | |
from discord import Status, Game | |
from discord.errors import LoginFailure | |
bot = commands.Bot(command_prefix="?") | |
@bot.listen('on_ready') | |
async def bot_is_ready(): | |
print(f"Logged in as: {bot.user}") | |
await bot.change_presence(status=Status.online, activity=Game(f"{bot.command_prefix}help")) |
OlderNewer