Showing posts from July, 2015
import java.sql.*; import java.util.*; public class JDBC { static String insert(){ Scanner s = new Scanner(System.in); int book_id; String book_name = null, book_author = null, book_publ=null; …
#include"iostream" #include"stdlib.h" #define MAX 200 using namespace std; int q[MAX] = {0}; bool visited[MAX] = {false}; int n,i,j, front, rear; struct node { int data; struct node *next…
AStar.cpp 1: #include<iostream> 2: #include<stdlib.h> 3: #define MAX 200 4: using namespace std; 5: int hn[MAX]={-1}; 6: int n; // no. of vertices 7: int src, dest; // source &…
Modcal.lisp 1: (defvar a) 2: (defvar b) 3: (defvar c) 4: (defvar d) 5: (write-line " Enter two numbers in binary format with prefix #b : ") 6: (setf a(read)) 7: (setf b(read)) 8: (sb-thread:make-thread…
OddEven.cu 1: #include"iostream" 2: using namespace std; 3: __global__ void sort(int *in, int n) 4: { 5: int temp; 6: bool oddeven=true; 7: __shared__ bool oddswap, evenswap; // shared variabl…
// QuickSort.cu #include "iostream" using namespace std; __global__ void sort(int *arr_d, int pivot, int len, int *arrl_d, int *arrh_d) { int id = threadIdx.x; bool flag; int element = arr_d[id+1]; if( eleme…
1: /* 2: >> g++ binarysearch.cpp 3: >> ./a.out 4: */ 5: #include"iostream" 6: #include"stdlib.h" 7: using namespace std; 8: class BinarySearch 9: { 10: public: 11: int search(…