Skip to content

Instantly share code, notes, and snippets.

View Synxed's full-sized avatar

Synxed Synxed

  • Somewhere in milky way
View GitHub Profile
@Synxed
Synxed / C.c
Last active August 19, 2017 17:33
#include <stdio.h>
#include <stdlib.h>
int main()
{
int count, i, j, temp;
int *array, *elements, *counts;
char dictionary[100][100];
printf("Enter total number of elements: ");
@Synxed
Synxed / Swapper.cs
Last active July 20, 2017 13:04
Swapping 2.0
using System;
using System.Collections.Generic;
using System.Linq;
namespace Swapper
{
class Program
{
private const char NoMatchChar = '#';
private static readonly List<char> AltcharsList = new List<char> { 'A', 'B', 'C', 'D', 'E' };
@Synxed
Synxed / Swapping.cs
Created July 20, 2017 06:31
Shit Swap
using System;
using System.Collections.Generic;
using System.Linq;
namespace Swapper
{
class Program
{
private const char NoMatchChar = '#';
private static readonly List<char> AltcharsList = new List<char> { 'A', 'B', 'C', 'D', 'E' };
1. Create the following table : STUDENT
Column Name Data Type Size Constraints
RegNo Varchar2 6 Not null
RollNo Number 6 Not null
Name Varchar2 10 Not null
Address Varchar2 15 Not null
PhoneNo Number 10
YearOfAdm Number 4 Not null
DeptCode Varchar2 4 Not null
Year Number 1 Not null
--Invert a number
declare
num1 number(5);
num2 number(5);
rev number(5);
begin
num1:=123;
dbms_output.put_line('Original: '||num1);
rev:=0;
while num1>0
@Synxed
Synxed / Bash.sh
Last active May 26, 2017 21:36
Bash Programs
#Add two numbers
if [ $# -ne 2 ]
then
echo "Usage - $0 x y"
echo " Where x and y are two nos for which I will print sum"
exit 1
fi
echo "Sum of $1 and $2 is `expr $1 + $2`"
@Synxed
Synxed / OS.c
Last active February 21, 2023 09:23
OS All Process C
//Print Process Info and shits
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/types.h>
int main()
{
printf("Process ID of current process = %d\n",getpid() );
printf("Process ID of parent process = %d\n",getppid() );
@Synxed
Synxed / Client.c
Created May 25, 2017 19:15
TCP Client
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netdb.h>
#include <stdio.h>
#include <unistd.h>
#include <string.h>
#include <stdlib.h>
@Synxed
Synxed / Server.c
Last active May 25, 2017 19:15
TCP
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netdb.h>
#include <stdio.h>
#include <unistd.h>
#include <string.h>
#include <stdlib.h>
@Synxed
Synxed / Ping.java
Created May 25, 2017 19:07
Remote Check
import java.net.InetAddress;
import java.util.Scanner;
public class Ping
{
public static void main(String[] args)
{
String address;
Scanner sc = new Scanner(System.in);