TechFreakForU
24 FOLLOWERS
Welcome to our tech blog. In this blog you can get knowledge about amazing tech gadgets.
TechFreakForU
3y ago
System Software
Image Source - Google | Image By - Dribble
1) MNT -> Macro Name Table.
2) PNTAB -> Parameter Name Table.
3) MDTP -> Macro Definition Table Pointer.
4) SSTP -> Sequencing Symbol Table Pointer.
5) APT -> Actual Parameter Table.
6) PDT -> Parameter Default Table.
7) EVT -> Expansion Time Variable Table.
8) EVNTAB -> EV name are entered in EVNTAB while accessing EV declarations.
9) SSNTAB -> SS name are entered in SSTAB while accessing SS declarations.
10) MDT -> Macro Definition Table.
11) APTAB -> Actual Parameter Table
12) MN ..read more
TechFreakForU
3y ago
Client
import java.io.*;
import java.net.*;
class Q3_Client
{
public static void main(String ar[]) throws Exception
{
Socket s=new Socket("localhost",12345);
PrintWriter p=new PrintWriter(s.getOutputStream());
BufferedReader in=new BufferedReader(new InputStreamReader(s.getInputStream()));
BufferedReader ink=new BufferedReader(new InputStreamReader(System.in));
System.out.println("How many numbers Enter ? ");
int num=Integer.parseInt(ink.readLine());
p.println(num);
p.flush();
System.out.println("Enter "+num+" numbers :");
String sarr[]=new String[num];
for(int i=0;i<num;i ..read more
TechFreakForU
3y ago
Client
import java.util.*;
import java.io.*;
import java.net.*;
class Q2_Client{
public static void main(String[] args) throws Exception {
Scanner scan=new Scanner(System.in);
DatagramSocket cSocket=new DatagramSocket();
InetAddress iPAddress=InetAddress.getByName("localhost");
byte[] sdata=new byte[1024];
byte[] rdata=new byte[1024];
System.out.println("\nEnter Number : ");
int st ..read more
TechFreakForU
3y ago
Client
import java.net.* ;
import java.io.* ;
import java.util.*;
public class Q1_Client{
public static void main(String [] args)
{
try {
Scanner scan=new Scanner(System.in);
Socket skt= new Socket("localhost",0722);
InputStream in = skt.getInputStream();
OutputStream out = skt.getOutputStream();
byte[] sdata=new byte[1024 ..read more
TechFreakForU
3y ago
Output
Code
import java.util.Scanner;
abstract class abs{
StringBuffer str;
Scanner scan=new Scanner(System.in);
abstract void ins();
abstract void del();
abstract void app();
abstract void rev();
}
class operations extends abs{
operations(StringBuffer str){
this.str=str;
}
void ins(){
dis(str);
System.out.print("Enter Inserting String : ");
String s1=scan.next();
s1=" "+s1+" ";
int i=str.length()+1;
while(i>str.length()){
System.out.print("Enter Inserting Index : ");
i=scan.nextInt();
}
System.out.print("After Inserting : ");
dis(str.insert(i,s1));
}
void del(){
dis(str);
int s1=str.len ..read more
TechFreakForU
3y ago
Output
Code
import java.util.Scanner;
interface st{
void Sub();
void len();
void index();
}
class menu implements st{
Scanner scan = new Scanner(System.in);
String org = "";
menu (String org) {
this.org = org;
}
public void Sub(){
System.out.print ("Enter SubString : ");
String s1 = scan.next();
int in = org.indexOf (s1);
if(in != -1)
System.out.println ("First occurrence of Substring "+s1+" is found at : " +in);
else
System.out.println ("Substring not found.....");
}
public void len(){
int lengt = org.length();
System.out.println (org+" length is : "+lengt);
}
public void index ..read more
TechFreakForU
3y ago
• For 3-D rotation, we need to pick an axis to rotate an object.
• The most common choices are the x-axis, y-axis, and z-axis.
X-Axis Rotation
• The transformation for x-axis is obtain from equation of z-axis rotation by replacing cyclically as shown here:
x -> y -> z -> x
• Rotation about x-axis, we leave x co-ordinate unchanged.
y' = ycosθ - zsinθ
z' = ysinθ + zcosθ
x' = x
• Matrix equation is:
p' = Rx (θ) * p
Y-Axis Rotation
• The transformation for y-axis is obtain from equation of x-axis rotation by replacing cyclically as shown here:
x -> y -> z -> ..read more
TechFreakForU
3y ago
• Parallel projection methods are used by engineers to create and working drawing of an object which preserves its true value.
• In the case of parallel projection the rays from an object coverage at infinity, unlike the perspective projection where the rays from an object converse at infinite distance.
• Parallel projection can be categorized according to the angle that projection of direction plan.
Transformation of Parallel Projection
• Parallel projection (are also known as orthographic projection) is projections into one of the coordinate plans.
x = 0, y = 0 and z = 0
• The standard ..read more
TechFreakForU
3y ago
Solution
Clipline (40, 80, 120, 30, 20, 60, 20, 40)
{
code1 = 0000
done = 0
code2 = 0000
draw = 0
while (done == 0)
{
code1 = encode (x1, y1)
encode (40, 80)
{
if (x < xwmin) (40 < 20)
false
if (x > xwmax) (40 > 40)
false
if (y < ywmin) (80 < 20)
false
if (y > ywmax) (80 > 60) true
code = 1000
}
So, code1 = 1000
code2 = encode (120, 30)
encode (120, 30)
{
if (x < xwmin) (120 < 20)
false
if (x > xwmax) (120 > 40) true
code = 0010
if (y < ywmin) (30 < 20)
false
if (y > ywmax) (30 > 60) false
}
code2 = 0010
ans = accept (code1, code2)
accept ..read more
TechFreakForU
3y ago
Double Buffering
Image Source - Google | Image By - slideshare
• The idea of maintaining 2 images, one to show and one to build or alter is called double buffering.
• Eg - word file
Rename Segment
rename_segment (old_seg, new_seg)
{
If (old_seg < 1 or new_seg < 1 or old_seg > num_seg or new_seg > num_seg) then
Error: "Invalid segment name"
If now_open = old_seg or now_open = new_seg then
Error: "Segment open"
If seg_size [new_seg] > 0 then
Error: "Segment already exists"
seg_start [new_seg] = seg_start [old_seg]
seg_size [new_seg] = seg_size [old_seg]
visib ..read more