Friday 31 December 2021

Test work

  1. Details & Summary behave a lot like the accordion design pattern, only just the basics. Could you layer on functionality, like a group of details elements in which only one can be open at once?

  2. Can you progressively enhance Details & Summary to add custom styling and animation?

  3. These elements don't work in Edge. You could have a look at the polyfills out there and perhaps build your own if you'd like to have a go at it.

How do you add a class or an interface to a package? Explain with an example.


Adding Classes or interface to Packages

In order to put add Java classes to packages, We must do two things:

पैकेज में जावा क्लास जोड़ने के लिए, हमें दो काम करने होंगे:

1.   Put the Java source file inside a directory matching the Java package you want to put the class in.

जावा की क्‍लास वाली सोर्स फाइल (क्‍लास कोड फाइल) को पैकेज के नाम वाले फोल्‍डर में ही रखना चाहिए।

2.   Declare that class as part of the package.

क्‍लास को पैकेज के पार्ट के तौर पर ही डिक्‍लेयर किया जाना चाहिए।

Here is how you declare the package inside a Java source file:


यहां बताया गया है कि आप जावा स्रोत फ़ाइल के अंदर पैकेज कैसे घोषित करते हैं:

package com.jenkov.navigation;
public class Page {
    ...
}

The first line in the code above (in bold) is what declares the class Page as belonging to the package com.jenkov.navigation.

Package is nothing but just a folder which contain classes (Not Definition). Packages can be considered as data encapsulation (or data-hiding). Placing a class/interface in the package makes it a member of that package.

पैकेज और कुछ नहीं बल्कि सिर्फ एक फोल्डर है जिसमें Classes होती हैं (परिभाषा नहीं)। पैकेज को डेटा एनकैप्सुलेशन (या डेटा-छिपाने) के रूप में माना जा सकता है। पैकेज में क्लास/इंटरफ़ेस रखने से वह उस पैकेज का सदस्य बन जाते हैं।

To do so in Eclipse:

Right click on package name, choose new, and then choose what you want to create.

पैकेज नाम पर राइट क्लिक करें, नया चुनें, और फिर चुनें कि आप क्या बनाना चाहते हैं

 

To do this in file system:

Create a new file name.java for in the folder your.package.name. This would be a member of the package.

your.package.name फ़ोल्डर में एक नई फ़ाइल name.java बनाएँ। यह पैकेज का सदस्य होगा।

example:-

package inherit;

            class parent

            {

                        public static void main(String ar[])

                                    {

                                    System.out.println(“This Is Parent”);

                                    }

            }

            class base

            {

                        public static void main(String ar[])

                                    {

                                    System.out.println(“This Is Baset”);

                                    }

            }


Whats its exactly does ←→

A folder will be created which contain classes like

parent.class

base.class



Thursday 2 December 2021

June-2019(8) Explain with example how you pass an array to procedure.


Parameter array in vb.net

A procedure can never be called with more arguments than that specified in the procedure declaration. However, using a parameter array, we can pass an array of values for an argument of a procedure. In addition, we need not know the number of elements in the parameter array when we define the procedure. The array size can be determined individually by each call to the procedure. The 'ParamArray' keyword is used to denote a parameter array. Rules to be followed while using a Parameter Array are:

We cannot use more than one parameter array in a procedure, and it must be the last argument in the procedure definition.
The parameter array must be passed by value and we should specify the ByVal keyword.


The code within the procedure must use the parameter array as a one-dimensional array. In addition, each element of the array must be of the same data type as the data type of ParamArray.
The parameter array is optional. The default value of a parameter array is an empty one-dimensional array. The parameter array must be the lone optional argument in the list of arguments for a procedure. All other arguments preceding the parameter array must be as signed value.

Passing arguments of a Parameter Array

While calling a procedure, we can pass the following arguments to a parameter array: An array that has the same element type as the parameter array. The arguments are separated by commas. We can also omit the ParamArray argument. If we omit the ParamArray argument, an empty array for the parameter array will be passed to the procedure. The following example illustrates the definition of a procedure with a parameter array.



Private Sub AccOrders(ByVal AccName As String, ByVal paramArray orders() As String)
Dim i as integer
Msgbox(AccName & "has orders:")
For i = 0 to UBound(orders)
MsgBox("Orders" & i & orders(i))
Next i
End Sub




We can make calls to the procedure AccOrders as the following.



Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

AccOrders("Account1","order1","order2","order3","order4","order5","order6","order7")

End Sub

June-2019(9) What is data binding? How it is used in VB•Net.

Data binding एक ऐसा Process है जो किसी Specified Sources से Data को Retrieve करता है और फिर उस Data को किसी User Interface Element की किसी Property के साथ Associated कर देता है।


DataBinding is a powerful feature provided by the .NET Framework that enables visual elements (TextBox, Datagrid, etc) in a client to connect to a datasource such as DataSets, DataViews, Arrays, etc. A two-way connection is established such that any changes made to the datasource are reflected immediately in the visual element and vice versa.

Below is a graphical description of the concept of databinding:

डेटा बाइंडिंग .NET फ्रेमवर्क द्वारा प्रदान की गई एक शक्तिशाली विशेषता है जो कि क्लाइंट एप्‍लीकेशन में Visual Elements (टेक्स्टबॉक्स, डेटाग्रिड इत्यादि) को Data Source/डेटा स्रोत (जैसे डेटासेट, डेटा व्यू, एरेज़ इत्यादि) से कनेक्ट करने में सक्षम बनाता है। यह दो-तरफा कनेक्शन इस तरह स्थापित किया जाता है कि डेटा स्रोत में किये गए कोई भी परिवर्तन तुरंत Visual Elements में दिखाई देते हैं और इसका उल्टा भी संभव है।



नीचे डेटाबाइंडिंग की अवधारणा का चित्रमय विवरण दिया गया है: 

 

 

We can tackle any data access scenario easily with ADO.NET and ADO data access. The flexibility of ADO.NET enables data binding to any database, as well as classes, collections, and arrays, and provides true XML representation of data. Correct access to ADO enables simple data access for connected data binding scenarios

हम ADO.NET और ADO की सहायता से डेटा एक्सेस करने की किसी भी समस्‍या से आसानी से निपट सकते हैं। ADO.NET का लचीलापन डेटा को किसी भी Database, Classes1, Collection और arrays(सारणियों) के लिए वाइंडेवल बनाता है, और डेटा का सही XML representation प्रदान करता है। ADO तक सही पहुंच, कनेक्टेड डेटा बाइंडिंग केसेज के लिए भी सरल डेटा एक्सेस को सक्षम बनाता है।


Advantages of DataBinding

1. Databinding in .NET can be used to write data driven applications quickly. dOT NET data binding allows you to write less code with fast execution but still get the work done in the best way.

2. .NET automatically writes a lot of databinding code for you in the background (you can see it in "Windows Generated Code" section), so the developer does not have to spend time writing code for basic databinding, but still has the flexibility of modifying any code that he would like to. We get the benefits of bound as well as unbound approach.

3. Control over the Databinding process by using events.



डेटा बाइंडिंग के लाभ

1. .NET में डेटाबाइंडिंग का उपयोग डेटा संचालित applications को शीघ्रता से लिखने के लिए किया जा सकता है। .NET डेटा बाइंडिंग आपको तेजी से निष्पादन के साथ कम कोड लिखने की अनुमति देता है लेकिन फिर भी काम को बेहतरीन तरीके से पूरा करता है।

2. .NET स्वचालित रूप से Background में आपके लिए बहुत सारे डेटाबाइंडिंग कोड लिखता है (आप इसे "विंडोज जेनरेट कोड" Section में देख सकते हैं), इसलिए डेवलपर को बुनियादी डेटाबाइंडिंग के लिए कोड लिखने में समय नहीं लगाना पड़ता है, लेकिन फिर भी इसमें लचीलापन होता है जिससे डवलपर किसी भी कोड को संशोधित कर सकता है जिसे वह चाहता है। हमें बाउंड और अनबाउंड approach के लाभ मिलते हैं।

3. घटनाओं/Events का उपयोग करके डाटाबेसिंग प्रक्रिया पर नियंत्रण किया जाता है।

10) Explain followings i) Data Table ii) Data Adaptor iii) Data Set iv) OLEDB/SQL command


DataSet

is made up of a collection of tables, relationships, and constraints. In ADO.NET, DataTable objects are used to represent the tables in a DataSet. A DataTable represents one table of in-memory relational data; the data is local to the . ... The DataTable class is a member of the System.

तालिकाओं, संबंधों और बाधाओं के संग्रह से बना है। ADO.NET में, DataTable ऑब्जेक्ट्स का उपयोग डेटासेट में तालिकाओं का प्रतिनिधित्व करने के लिए किया जाता है। एक डेटाटेबल इन-मेमोरी रिलेशनल डेटा की एक तालिका का प्रतिनिधित्व करता है; डेटा स्थानीय है। ... डेटाटेबल क्लास सिस्टम का सदस्य है



What is DataAdapter

ये Object ADO.NET के Connected व Disconnected Portion के बीच एक Bridge की तरह काम करने वाला Object है। DataAdapter वह Object है, जो हमें Connected Objects जैसे कि DbCommand Object को Use करने की सुविधा Provide करता है, जिसका प्रयोग करके हम Disconnected Object जैसे कि DataSet के साथ काम कर सकते हैं।



data Table: Table एक data structure होता है जो की organize करता है information को rows और columns में. इसका इस्तमाल किया जा सकता है दोनों ही तरीकों के लिए, जो की हैं data को store करने के लिए और data को display करने के लिए एक structured format में.



OLEDB/SQL command:

ऑब्जेक्ट लिंकिंग और एंबेडिंग, डेटाबेस (OLEDB या OLE-DB) Microsoft द्वारा डिज़ाइन किया गया एक एपीआई है, जो विभिन्न प्रकार के डेटा स्रोतों से डेटा तक पहुंचने की अनुमति देता है। OLE DB वैचारिक रूप से उपभोक्ताओं और प्रदाताओं में विभाजित है।

उपभोक्ता: ऐसे एप्लिकेशन हैं जो डेटा तक पहुंच की आवश्यकता है। प्रदाता: सॉफ्टवेयर घटक हैं जो उपभोक्ता डेटा ओएलई डीबी एपीआई का उपयोग करके प्रदान करते हैं।



Sql Commands

SQL एक डेटाबेस भाषा है जिसे relational database में डेटा की पुनर्प्राप्ति और प्रबंधन के लिए डिज़ाइन किया गया है। SQL डेटाबेस प्रबंधन के लिए मानक भाषा है। सभी RDBMS सिस्टम जैसे MySQL, MS Access, Oracle, Sybase, Postgres, और SQL Server SQL का उपयोग अपने डेटाबेस डेटाबेस भाषा के रूप में करते हैं।

हां पांच प्रकार के व्यापक रूप से उपयोग किए जाने वाले एसक्यूएल प्रश्न हैं।

Data Definition Language (DDL)

Data Manipulation Language (DML)

Data Control Language(DCL)

Transaction Control Language(TCL)

Data Query Language (DQL) 

 


Dec-2019(4) Give difference between C++ & VB. Net. Also Explain IDE.


C++:-

C++ is a true OOP. It is one of the early Object-Oriented programming languages. C++ derives from the C language. Visual C++ is the name of a C++ compiler with an integrated environment from Microsoft. This includes special tools that simplify the development of great applications, as well as specific libraries. Its use is known as visual programming.


 

सी ++ एक असली OOPs है। यह प्रारंभिक ऑब्जेक्ट-ओरिएंटेड प्रोग्रामिंग भाषाओं में से एक है। सी ++ सी भाषा से निकला है। Visual C++ Microsoft के एकीकृत परिवेश के साथ C++ कंपाइलर का नाम है। इसमें विशेष उपकरण शामिल हैं जो महान अनुप्रयोगों के साथ-साथ विशिष्ट पुस्तकालयों के विकास को सरल बनाते हैं। इसके उपयोग को विजुअल प्रोग्रामिंग के रूप में जाना जाता है।

 

Visual Basic

is a “visual programming” environment for developing Windows applications. Visual Basic makes it possible to develop complicated applications very quickly.

This site is all about Visual Basic.

 

विंडोज़ अनुप्रयोगों को विकसित करने के लिए एक "विज़ुअल प्रोग्रामिंग" वातावरण है। Visual Basic जटिल अनुप्रयोगों को बहुत तेज़ी से विकसित करना संभव बनाता है। यह साइट विजुअल बेसिक के बारे में है।

 

Integrated Development Environment

Visual Basic is not just a language. It’s an Integrated Development Environment (IDE) in whichyou can develop, run, test and debug your applications.

विजुअल बेसिक सिर्फ एक भाषा नहीं है। यह एक एकीकृत विकास पर्यावरण (आईडीई) है जिसमें आप अपने अनुप्रयोगों को विकसित, चला सकते हैं, परीक्षण कर सकते हैं और डिबग कर सकते हैं।

IDE is a programming environment integrated into a software application that provides a GUI builder, a text or code editor, a compiler and/or interpreter and a debugger. Visual Studio, Delphi, JBuilder, FrontPage and DreamWeaver are all examples of IDEs.

आईडीई एक प्रोग्रामिंग वातावरण है जो एक सॉफ्टवेयर एप्लिकेशन में एकीकृत है जो एक जीयूआई प्रदान करता है बिल्डर, टेक्स्ट या कोड एडिटर, कंपाइलर और/या इंटरप्रेटर और डीबगर। विजुअल स्टूडियो, डेल्फी, जेबील्डर, फ्रंटपेज और ड्रीमवेवर सभी आईडीई के उदाहरण हैं।