Tuesday 2 July 2019

Add image to server C#

this post will help you to upload a file to the server with a new name

HTML



<form>
    <input type="file" id="filelogo" class="fileUpload" accept="image/x-png,image/jpeg" /><br /><br />
  <input type="button" value="Upload" onclick="UploadImage('filelogo','new name')" >

 </form>

Java Script




function UploadImage(fnm,newname)
{
        var data = new FormData();
        data.append("filename", $("#"+fnm)[0].fil

Saturday 29 June 2019

Solved : January, 2015 M4.3-R4: INTRODUCTION TO ICT RESOURCES

Saturday 15 June 2019

Answer : July, 2015 M4.3-R4 INTRODUCTION TO ICT RESOURCES

Multiple Choice


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

True/Fase


2.1 : F
2.2 : T
2.3 : F
2.4 : T
2.5 : T
2.6 : F
2.7 : F
2.8 : T
2.9 : T
2.10 : F

Match the columns


3.1 : C
3.2 : E
3.3 : D
3.4 : B
3.5 : F
3.6 : K
3.7 : J
3.8 : L
3.9 : M
3.10 : I

Fill in the Blanks


4.1 : G
4.2 : E
4.3 : C
4.4 : J
4.5  : K
4.6 : M
4.7 : B
4.8 : D
4.9 : A
4.10 : F

Wednesday 5 June 2019

Copy Current url to clipboard using Javascript


function copyLinkWhatsup()
    {

        var dummy = document.createElement('input'),
          text = window.location.href;
        document.body.appendCh

Monday 3 June 2019

Put links in head section of view



When you work in ASP.Net MVC and you want to put links in head section but it appears after many links this is because head section code comes from shared layout. 

So if you want to add some links at the top in a view head section you need to make a render point in shared layout with a unique name and put your links inside of given name section.

Layout section 



@RenderSection("GCSS", required: false)
@RenderSection("og", required: false)


Razor/View Section

Tuesday 7 May 2019

Show Serial number for Table column

Some time we retrieve data from the database and render in the table and we want to show serial number, then this article will help you to show the serial number using foreach loop  using razor.



<table class="table table-bordered table-hover">
    <thead>

Sunday 21 April 2019

Display DB Error message php


By default PHP doesn’t show run time error. You will have to set error method as follows


// first set general PHP error reporting
// in order to be sure we will see every error in the scriptini_set('display_errors',1);error_reporting(E_ALL);
/*** THIS! ***/mysqli_report(MYSQLI_REPORT_ERROR MYSQLI_REPORT_STRICT);/*** ^^^^^ ***/$db $mysqli = new mysqli($host$user$pass$database);
$res $db->query("apparently not valid SQL string");$res->fetch_assoc();

Sunday 31 March 2019

File preview before upload : HTML

<html>
<head>
     <title>File upload preview</title>
     <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/css/bootstrap.min.css">
     <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
     <style>
     .fileUpload {
        position: relative;
        overflow: hidden;
        margin: 10px;
        margin-top: 0px;
    }

    .fileUpload input.upload {
           position: absolute;
           top: 0;

Friday 29 March 2019

Check empty file using jquery

When you use file control from the input tag then for validation purpose you need to check the file name. if no file is selected then an error message should be displayed. This post will help you to achieve the same. When a user doesn’t select a file and an attempt is made to read file name then JS engines throw an exception which must be caught otherwise you will not be able to read and validate the empty file.

Wednesday 27 March 2019

Sketch effect to a picture using photoshop




  1. open a picture in photoshop and make a duplicate layer by pressing Cntl+J

  2. Select huge saturation from create or adjustment layer tool 

Sunday 24 March 2019

Website Login Page HTML

Login page screen shot

HTML



<!DOCTYPE html>

<html>

<head>

    <meta charset="utf-8" />

 

Friday 22 March 2019

Insert record in Database

This post will help you to learn the basics of inserting the record in the database using ci framework.

Table Structure

Culumn_Name
Data_type
Id
Auto number(int)
Name
Varchar(50)
Email
Varchar(50)
Phone
Varchar(15)
Msg
Varchar(255)


Configure Database

Goto App (Application in older CI) folder then open Config folder then Database.php file change db parameter as per your configuration. 

Database.php 


$db['default'] = array(
       'dsn' 
=> '',
       'hostname' 
=> 'localhost',
       'username' 
=> 'username',
       'password' 
=> 'password',
       'database' 
=> 'db_name',
       'dbdriver' 
=> 'mysqli',
       'dbprefix' 
=> '',
       'pconnect' 
=> FALSE,
       'db_debug' 
=> (ENVIRONMENT !== 'production') ,
       'cache_on' 
=> FALSE,
       'cachedir' 
=> '',
       'char_set' 
=> 'utf8',
       'dbcollat' 
=> 'utf8_general_ci',
       'swap_pre' 
=> '',
       'encrypt' 
=> FALSE,
       'compress' 
=> FALSE,
       'stricton' 
=> FALSE,

Sunday 3 March 2019

File upload with new name (PHP)

This post will help you to upload an image file to server with A new name . File name will be database auto increment field value . So no name conflict will be arise.

function SaveSliderImage($file)
{

$stmt = $this->conn->stmt_init();
if ($stmt->prepare("insert into  ueks98_si_jsj_os9 (id,id1,id2)   values(NULL,?,?)"))
{
//Get File Extension
$tmpstr=strtolower($_FILES[$file]['name']);
$extnsn=end(explode(".",$tmpstr));

Show file on HTML page using file control

This post will help you to show preview of selected file from html file control because by default HTML file control only show the selected file name. So file preview is best way to show user that whether he is selected right file or not.

HTML


<input type="file" id="bfile" id="bfile" class="form-control" accept="image/x-png,image/jpeg" onChange="readURL(this)">

<br><img id="blah" style="margin:auto;display:block" />

JS


function readURL(input) {
  

Sunday 10 February 2019

Solved : July, 2010 M4.2-R4: INTRODUCTION TO MULTIMEDIA

1. Multiple Choice


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

Monday 28 January 2019

Solved : January, 2011 M4.2-R4: INTRODUCTION TO MULTIMEDIA

1. Multiple Choice


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

Saturday 26 January 2019

Core Java series Programs

Q 1  : Write a program to print sum of following series of given terms ?

Terms=5
Series = (1)+(1+2)+(1+2+3)+(1+2+3+4) + (1+2+3+4+5)
Sum=35

Solution :  

Using Nested Loop 


import java.util.*;
class nextedloop
{
 
    public static void main(String args [])
    {

Compare of core java nested loop

This is will show you to compare of all three types of loops (while,do-while and for) and print a triangle pattern.

import java.util.*;
public class star
{
    
    static void sop(String ar)
    {
        System.out.println(ar);
    }
   public static void main(String args[])
   {
       int i,j,k;
       Scanner sc=new Scanner(System.in);

Pascal Triangle

Q: Write a program to make pascal triangle ?

Answer :

Pascal Triangle :

Pascal's Triangle is more than just a big triangle of numbers. There are two major areas where Pascal's Triangle is used, in Algebra and in Probability / Combinatorics.


Rule 

Wednesday 23 January 2019

Get multiple list using single object

MVC transfer data from controller to list in the form of list. If a page needs to load multiple lists using razor then you will have to wrap multiple lists into single object list. Following code will help you to accomplish this.

Modal


public class MarketingStaffModal
   {
      public string  ID  {get;set;}
       public string Name {get;set;}
      

   }

Monday 21 January 2019

Jquery Radio button operations

Jquery Radio button operations

Check selected radio button


HTML


<input type="radio" value="Active" checked name="rdostatus" />Active

Friday 18 January 2019

HTML inside if

HTML example for Radio button  inside of if-else using C# MVC

Code :



  @if(@Model.Status=="1")
  {
       @:<input type="radio" value="Active" checked name="rdostatus" />Active

Monday 7 January 2019

July, 2011 M4.2-R4: INTRODUCTION TO MULTIMEDIA

1. Multiple Choice


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

2. True/False


2.1 : T
2.2 : T
2.3 : F
2.4 : F
2.5 : F
2.6 : F
2.7 : F
2.8 : F
2.9 : T
2.10 : F

3. Match the column


3.1 : F
3.2 : M
3.3 : I
3.4 : K
3.5 : B
3.6 : D
3.7 : L
3.8 : C
3.9 : E
3.10 : G

4. Fill in the Blanks


4.1 : I
4.2 : D
4.3 : H
4.4 : K
4.5 : G
4.6 : M
4.7 : E
4.8 : F
4.9 : A
4.10 : B

Friday 7 December 2018

Last Created Store Procedure SQL Server


SELECT * FROM INFORMATION_SCHEMA.ROUTINES
WHERE ROUTINE_TYPE = N'PROCEDURE' and ROUTINE_SCHEMA = N'dbo'
order by last_altered desc


Thursday 29 November 2018

Solved : January, 2012 M4.2-R4: INTRODUCTION TO MULTIMEDIA

Multiple Choice


1.1 : C
1.2 : A
1.3 : D
1.4 : A

Monday 26 November 2018

Get input type file size in KB


HTML

<input type="file" class="upload" onchange="readURL(this)" id="file" accept="image/x-
png,image/jpeg" />

<input type="button" value="Upload" class="btn btn-default" style="margin:auto;display:block" onclick="checksize(this)" />

Java Script

Get File Name in JavaScript:
document.getElementById('file').files[0].name
Get File Size in JavaScript:

Saturday 10 November 2018

Alter Table SQL Server

Making Unique key


Syntax :

alter table your_table add constraint constraint_Name  unique(yourcolumn);

Tuesday 30 October 2018

2013 M4.2-R4: INTRODUCTION TO MULTIMEDIA Solved

Multiple Choice


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

Wednesday 24 October 2018

Jquery Preloader


Girfa Student Help

Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specim

Monday 15 October 2018

Solved July, 2013 M4.2-R4: INTRODUCTION TO MULTIMEDIA

1  Multiple Choice


1.1 : D
1.2 : B
1.3 : A
1.4 : D
1.5 : D
1.6 : A

1.7 : D
1.8 : A
1.9 : D
1.10 : B

2 True/False

2.1 : T
2.2 : T
2.3 : T

Tuesday 2 October 2018

January, 2014 M4.2-R4: INTRODUCTION TO MULTIMEDIA Solved

Multiple Choice


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

Monday 1 October 2018

HTML Tag CSS

<a> style change
    a.menu:link {color:black;}      /* unvisited link */
    a.menu:visited {color:black;}  /* visited link */
    a.menu:hover {color:#CCFF99;}  /* mouse over link */
    a.menu:active {color:yellow;}  /* selected link */

    a.menu:link{text-decoration: none} /* Hide Underline of link */

Example : <a class="menu">Link test</a>

Next Example

Wednesday 22 August 2018

Setup locale date time zone


SQL server saves date in local region format, for example if you’re in india and hosting your site with godaddy and choose Asia server then your date will be 12 hour forward compare to current region.

Sunday 19 August 2018

July, 2014 M4.2- R4: INTRODUCTION TO MULTIMEDIA Solved


Multiple Choice


1.1 : C
1.2 : A
1.3 : C
1.4 : B
1.5 : C
1.6 : C
1.7 : A
Explanation : Old 2D cel animation and stop-motion animation both fall under the category of traditional animation,  both may use digital methods of filming in the end. The matters is the method of producing the animation itself. Cel animation uses hand-drawing, hand-inking, and hand-painting thousands of frames on clear cels that are displayed against painted backgrounds and photographed in rapid sequence, on the other end stop-motion animation involves working with physical models and objects captured on camera one frame at a time.

This hands-on method requires a team of artists, cleanup artists, painters, directors, background artists, and camera crews, along with the storyboard artists and scriptwriters to work out the original concepts. For large-scale projects, the amount of time, labor, and equipment involved is staggering.

1.8 : B

Monday 13 August 2018

January 2015 M4.2-R4: INTRODUCTION TO MULTIMEDIA Solved

Multiple Choice


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

Friday 3 August 2018

July, 2015 M4.2-R4: INTRODUCTION TO MULTIMEDIA Solved

Multiple Choice


1.1 : C
1.2 : D
1.3 : A
1.4 : D

Friday 27 July 2018

M2-R4: INTERNET TECHNOLOGY AND WEB DESIGN-July-12 Solved

Multiple Choice


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

Wednesday 25 July 2018

M2-R4 INTERNET TECHNOLOGY AND WEB DESIGN-Jan-13 Solved

Multiple Choice


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

Sunday 22 July 2018

Input type pattern





Form tag is one of the key tags of HTML through which users data are sent on server. While making a form there are lots of validation implemented to allow valid data only. As a developer we all know about importance of validation and we do lots of JS code for validation. Working with JS is not an easy task for beginner.

HTML 5 introduce built in validation using regular expression using pattern property. If you are using patter regular expression then this will save your time and it is supported by all model browsers. So using pattern, you do not to worry about browser compatibility.

Following code will help you to understand basics of pattern. Ones you will implement basics then after using regular expression you will be able to implement complicated validation rule.

Name :

Six Digit Pin :

Email :


Monday 16 July 2018

INTERNET TECHNOLOGY AND WEB DESIGN July, 2013 Solved

Multiple Choice


1.1 : C
1.2 : B
1.3 : B
1.4 : B
1.5 : C

Thursday 12 July 2018

M2-R4: INTERNET TECHNOLOGY AND WEB DESIGN January, 2014 Solution

Multiple Choice


1.1 : D
1.2 : C
1.3 : C
1.4 : A
1.5 : A
1.6 : C

Tuesday 3 July 2018

Solved July, 2014 M2-R4: INTERNET TECHNOLOGY AND WEB DESIGN

Multiple Choice


1.1 : B
1.2 : C
1.3 : B
1.4 : A
1.5 : C
1.6 : B

Tuesday 26 June 2018

Solved July, 2015 M2-R4: INTERNET TECHNOLOGY AND WEB DESIGN

Multiple Choice


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

Solved January, 2015 M2-R4: INTERNET TECHNOLOGY AND WEB DESIGN

Multiple Choice

1.1 : C
1.2 : A
Explanation : Shortest Seek Time First
1.3 : D
Explanation : 
Seek time: Say you're reading some data from the (0,4). You receive instructions to read from track (2,5). The time it takes for you to move from track 0 to track 2 is seek time.

Sunday 24 June 2018

M1-R4: IT TOOLS AND BUSINESS SYSTEMS July 2011 Solution

Multiple Choice


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

Friday 22 June 2018

Paper IT Tools and Business Systems January 2011 Solution

Multiple Choice

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

Wednesday 20 June 2018

IT Tools and Business Systems -July-2010 Solution

Multiple Choice


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

Sunday 17 June 2018

IT TOOLS AND BUSINESS SYSTEMS Jan-12 Solved

Multiple Choice


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

July, 2012 M1-R4: IT TOOLS AND BUSINESS SYSTEMS Solution

Multiple Choice


1.1 : D
1.2 : D
1.3 : D
1.4 : D
1.5 : D

Monday 11 June 2018

Paper M1-R4: IT TOOLS AND BUSINESS SYSTEMS-jan-13 Solution

Multiple Choice


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

Saturday 9 June 2018

July, 2013 M1-R4: IT TOOLS AND BUSINESS SYSTEMS Solution

Multiple Choice

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

Wednesday 6 June 2018

CSS Selector



This page will help you to learn how you can user CSS on various types of HTML tag. If you have knowledge of CSS selector then you can make big changes of fo

Sunday 3 June 2018

July-2014 M1-R4: IT TOOLS AND BUSINESS SYSTEMS Answer

Multiple Choice


1.1 : C
1.2 : B
1.3 :  D
1.4 : B
1.5 : D
1.6 : D