Skip to content

Instantly share code, notes, and snippets.

View devpruthvi's full-sized avatar
🎯
Focusing

Pruthvi Raj devpruthvi

🎯
Focusing
View GitHub Profile
@devpruthvi
devpruthvi / Boolestaxonomy.php
Created February 1, 2015 15:10
Project Help for varma bro
<?php
//$a is the Array with final result that we gathered after traversing through all the words in the question
$a = array(
"Synthesize" => 3,
"Evaluate" => 3,
"Applying" => 3
);
//$priorities is just a array with constants that shouldn't be replaced which are ordered a/c to booles's taxonomy thing
$priorities = array(
"Synthesize" => 6,
import java.util.Scanner;
class Complex
{
private float real;
private float imaginary;
public void display()
{
if(imaginary > 0)
System.out.println(real + "+" + imaginary + "i");
else
@devpruthvi
devpruthvi / lab1.sql
Created February 17, 2015 12:51
jntu lab work
-------- JNTU LAB ANSWERS ----- PRUTHVI, SRIT -- ANANTAPUR -- 17-FEB-2015-------
CREATE TABLE DEPARTMENT
(
DEPTNO NUMBER(2) PRIMARY KEY,
DEPTNAME VARCHAR2(4) NOT NULL,
DESCRIPTION VARCHAR(50)
);
CREATE TABLE EMPLOYEE
CREATE TABLE DEPARTMENT
(
DEPT_NO VARCHAR2(2) PRIMARY KEY,
DEPT_NAME VARCHAR2(25),
DEPT_DESCRIPTION VARCHAR2(100)
);
-----
CREATE TABLE CATEGORY
@devpruthvi
devpruthvi / upload.php
Last active August 29, 2015 14:17
project help for varma bro inserting multiple questions at once
<?php
$con=mysql_connect("localhost","root","");
mysql_select_db("project",$con);
$allQues = $_POST['ques'];
$individualQues = explode(',', $allQues);
foreach($individualQues as $key => $quesToInsert)
{
package temp;
import java.applet.Applet;
import java.awt.Color;
import java.awt.Graphics;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.util.Random;
public class temp extends Applet
str = '[quote][quote]Hi[/quote] Hello[/quote]';
regexp = /\[quote\](.*)\[\/quote\]/;
while(str.indexOf('[quote]') != -1)
{
str = str.replace(regexp,'<div class="quote">$1</div>');
}
document.writeln(str);
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <string.h>
/* Define an array of transitions to sort. */
int transtablecount;
char id[100];
struct transition
{
const char curstate[7];
#include<stdio.h>
#include<malloc.h>
#include<string.h>
#define MAX_INPUTS 10
#define MAX_INPUT_SIZE 5
#define MAX_STATES 20
#define MAX_STATE_SIZE 5
#define MAX_ID_SIZE 100
int get_id(char str[], char str_arr[][MAX_STATE_SIZE], int len)
#include <regex.h>
#include<stdio.h>
int main(int arg, char * argv[])
{
regex_t regex;
int reti;
char msgbuf[100];
reti = regcomp(&regex, "^[01]*1[01][01]$", 0);
if (reti) {