Monday 27 November 2017

Java Script Date Operation

Java Script Date Operation

Convert dd/mm/yyyy date to yyyy/mm/dd

Java Script support date in many format except dd/mm/yyyy . So if you are working on a project which has date as in dd/mm/yyyy format then you will need to change it mm/dd/yyyy for further date related operations.

Following code will change dd/mm/yyyy date to mm/dd/yyyy date format

Wednesday 22 November 2017

Solution : July, 2010 M3-R4: PROGRAMMING AND PROBLEM SOLVING THROUGH ‘C’ LANGUAGE

Solution : July, 2010 M3-R4: PROGRAMMING AND PROBLEM SOLVING THROUGH ‘C’ LANGUAGE

1. Multiple Choice : 


1.1 : B
1.2 : B
1.3 : A
1.4 : B
1.5 : C
1.6 : B
1.7 : C
1.8 : C
1.9 : B

Tuesday 14 November 2017

Jquery Animated Validation


Jquery Validation


Validation is most important part any website while creating a form. There are lots of methods and processes of JavaScript or jquery.

I have implemented basic validation as simple as possible which can be used for empty fields check. You need to call just little function and achieved validation on various HTML form tags. 



Roll :
Class :
Message :


Code

<html>
<head>
    <title>Girfa : Javascript Validation</title>
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
    <script>
        var Flag = true;
        function Validate() {
            Flag = true;
            if ($("#txtRoll").val() == "")
                AddCss("txtRoll");
            if ($("#ddlClass").val() == "")
                AddCss("ddlClass");
            if ($("#txtMessage").val() == "")
                AddCss("txtMessage");
        }

        function AddCss(id) {

            Flag = false;

            $("#" + id).css("border", "solid 1px red");
            $('#' + id).animate({
                'marginLeft': "+=10px", //moves right
            }, 100);
            $('#' + id).animate({
                'marginLeft': "+=-10px", //moves right
            }, 100);
            $('#' + id).animate({
                'marginLeft': "+=10px", //moves right
            }, 100);
            $('#' + id).animate({
                'marginLeft': "+=-10px", //moves right
            }, 100);
        }
        function RemoveCss(id) {
            $("#" + id).css("border", '');

Saturday 11 November 2017

O Level C Language solved paper January-2011

NIELIT  O Level C Language solved paper January-2011

1. Multiple Choice


1.1 : B
1.2 : A
1.3 :  A
1.4 : A
1.5 : D
1.6 : B
1.7 :  C
1.8 : B
1.9 : A

Cosine series Flowchart

Q :  Make the flow chart to solve the following cosine series.
       S = 1 – x2/ 2! + x4/ 4! – x6/ 6! + … 100 terms


Solution : 

Cosine series Flowchart

Wednesday 8 November 2017

Dynamic Table Java Script


Dynamic Table Java Script

This post helps you to make dynamic table. You can do following task using this post code
  • Add a row dynamically
  • Check duplicate value
  • Delete a row 




ProductAction



HTML Code



<html>
<head>
    <title>Girfa : DynamicTable Management </title>
    <script>
 var tblrowid=0
 function AddScheduleTOTable() 
{
           

Sunday 5 November 2017

C language Paper Solution July 2011

NIELIT O Level C language Paper Solution  July 2011

1. Objective


1.1 : C
1.2 : B
1.3  :  D
1.4 : B
1.5 : B
1.6 : A
1.7 : A
1.8 :  B

Saturday 4 November 2017

2D character array sorting

Q : Write a ‘C’ program to read an array of names and to sort them in alphabetical order.

Solution :

/*==============================
     Girfa Student Help
     Program : Sort 2D  Array    
================================*/
#include<stdio.h>
#include<conio.h>
#define MAX 3
void main()
{
     char ar[MAX][20],ch[20];

Thursday 2 November 2017

NIELIT O Level C Language Solve Paper

July-12
Answer Key
1. Objective
1.1  : B
1.2 : A
1.3 : A
1.4 : C
1.5 : A

Tuesday 31 October 2017

Nielit O Level C Language Practice Paper Set 3

NIELIT O Level Sample Paper
C Language
Note : Each Question carry one marks :                                                                                Time : 45 Min   
Student Name : ________________________
         



Q 1: which of the following Operator is used to transfer value to another variable.
A) =   
B) ==   
C) &   
D) int

Tuesday 24 October 2017

UGC Net Computer Science December-12 Page 7 Solved

UGC Net Computer Science December-12 Page 7 Solved

61. Which one is a collection of templates and rules ?
(A) XML
(B) CSS
(C) DHTML
(D) XSL

UGC Net Computer Science December-12 Page 6 Solved

UGC Net Computer Science December-12 Paper 3 Page 6 Solved

UGC Net Computer Science December-12 Page 6 Solved

51. Suppose there are logn sorted lists of n logn elements each. The time complexity of producing a sorted list of all these elements is (use heap data structure)

UGC Net Computer Science December-12 Page 5 Solved

UGC Net Computer Science December-12 Paper 3 Page 5 Solved

UGC Net Computer Science December-12  Page 5 Solved

41. Consider a system having m resources of the same type. These resources are shared by 3 processes A, B and C which have peak demands of 3, 4 and 6 respectively. For what value of m
deadlock will not occur ?
(A) 7
(B) 9
(C) 10
(D) 13

42. The grammar ‘G1’ S -> OSO| ISI | 0|1|→ and the grammar ‘G2’ is S → as |asb| X, X → Xa | a.
Which is the correct statement ?
(A) G1 is ambiguous, G2 is unambiguous
(B) G1 is unambiguous, G2 is ambiguous
(C) Both G1 and G2 are ambiguous

NIELIT O Level Paper Solution July-2012 C Language

NIELIT O Level Paper Solution July-2012 C Language

1. Objective


1.1 : C
1.2 : C
1.3 : B
1.4 : D
1.5 : A
1.6 : B
1.7 : C
1.8 : B

Sunday 22 October 2017

Even Odd Separation File Creation

Q : Write a ‘C’ Program to create a file of numbers and copy odd number into second file and even number into third file.

Solution :


#include<stdio.h>
#include<conio.h>
void main()
{
     FILE *source,*even_file,*odd_file;
     char ch;
     clrscr();
     source=fopen("test.txt","r");
     even_file=fopen("even.txt","w");
     odd_file=fopen("o

Friday 20 October 2017

Function

A function is a combination of more than one statement which execute together one by one to achieved some specific task. Function code run while calling. There are many variety of functions some takes arguments and return something or takes argument and doesn’t return and more.

C language is known as building block of function all the things of programming is achieved through function. Program gets start running with main function.

Types


No argument, No return


This type of function neither returns anything nor takes arguments. When a function doesn’t have something to return then void is used. Void indicates no return.

no return type function

Example

Constructor PHP

Constructor used in object oriented language for allocate space while creating object. A constructor also helps initialize a variable while declaring.

Every object oriented language built in support for programming. PHP is also a server side script and object oriented language. So should know how can you use constructor is elaborate in following example.


<?php
class Foo
{
    private 
$roll$name$city;
    function 
__construct($roll$name$city)
    {
        
$this->roll $roll;

Thursday 19 October 2017

Compile time vs Run time error

Compile time
1.      The program need not satisfy any invariants. In fact, it needn't be a well-formed program at all. You could feed this HTML to the compiler and watch it barf...
2.      What can go wrong at compile time:
·         Syntax errors
·         Type checking errors
·         (Rarely) compiler crashes
3.      If the compiler succeeds, what do we know?
·         The program was well formed---a meaningful program in whatever language.
·         It's possible to start running the program. (The program might fail immediately, but at least we can try.)
4.      What are the inputs and outputs?
·         Input was the program being compiled, plus any header files, interfaces, libraries, or other voodoo that it needed to import in order to get compiled.
·         Output is hopefully assembly code or relocatable object code or even an executable program. Or if something goes wrong, output is a bunch of error messages.
Run time
1.      We know nothing about the program's invariants---they are whatever the programmer put in. Run-time invariants are rarely enforced by the compiler alone; it needs help from the programmer.
2.      What can go wrong are run-time errors:
·         Division by zero
·         Dereferencing a null pointer
·         Running out of memory
Also there can be errors that are detected by the program itself:
·         Trying to open a file that isn't there
·         Trying find a web page and discovering that an alleged URL is not well formed
3.      If run-time succeeds, the program finishes (or keeps going) without crashing.
4.      Inputs and outputs are entirely up to the programmer. Files, windows on the screen, network packets, jobs sent to the printer, you name it. If the program launches missiles, that's an output, and it happens only at run time :-)

 Example compile time error

Wednesday 18 October 2017

Array vs Link List




Sr No.
Array
Link List
1
An array is a collection of similar data type
A link list a collection of similar objects which may have array
2
Space allocation continuous
Space allocation random
3
Element of an array is access through its index
Data of link list access through self-referential pointer

Monday 16 October 2017

Matrix Diagonal Sum

Q : Write a ‘C’ program to find out sum of diagonal elements of a matrix using ‘C’.

Solution : 

#include<stdio.h>
#include<conio.h>
#define MAX 3
void main()
{
     int ar[MAX][MAX],i,j,r,c,sum=0;
     clrscr();
     for(r=0;r<MAX;r++)
     {
          for(c=0;c<MAX;c++)
          {
              printf("Enter Number>> ");
              scanf("%d",&ar[r][c]);
          }
     }
     printf("\n\tOutput\n\n");
     for(r=0;r<MAX;