Skip to main content

Posts

Showing posts from 2010

How to Read XML Using PHP DOM

This simple example mentions how the data from the xml file can be read and displayed in a textbox in the html file. It illustrates the concept which simplifies understanding the basics. The structure of file.xml is:- <?xml version="1.0" encoding="UTF-8"?> <root>HELLO</root> This code lies in  file.php:- <?php  $xdoc = new DOMDocument( '1.0', 'UTF-8' ); $xdoc->Load("file.xml"); $candidate = $xdoc->getElementsByTagName('root')->item(0); $newElement = $xdoc ->createElement('root'); $txtNode = $xdoc ->createTextNode ($root); $newElement -> appendChild($txtNode); $candidate -> appendChild($newElement); $msg = $candidate->nodeValue; ?> This code lies in file.html <input type="text" name="msgval" value="<?php echo $msg; ?>" /> It will display the data in $msg variable in the textbox names msgval.

Creating A Xml Document Using XML DOM And PHP

I had many issues to dealing with while solving this problem i i though about sharing this. The code below illustates a simple logis to create a XML file if it is not present and create a root node. And looking at this node you can create chile nodes. The code is as follows:- <?php $uvar = "HELLO"; $doc = new DOMDocument('1.0', 'UTF-8'); $ele = $doc->createElement( 'root' ); $ele->nodeValue = $uvar; $doc->appendChild( $ele ); $test = $doc->save("file.xml") ?> This will create a file.xml with the following contents:- <?xml version="1.0" encoding="UTF-8"?> <root>HELLO</root>

Bing Makes Real Use of that Facebook Data

I had a given a exam on Information System Security few days ago as a part of my Engineering exams. It included topics about indexing, searching, page rank, popularity based ranking, Term Frequency - Inverse Document Frequency which are used to calculate values which determine the relevant page of your search query and display the list of relevant information. Though about sharing this with all of you as i found it interesting courtesy webpronews. This might be interesting to know for users who use bing for their search on the web compared to that of widely used Google. Now BING introduces a new feature which will show you which of your Facebook friends have liked search results as they will appear in your searches and works towards proving you with more relevant links concerned with your search query. It will make more usage of the Facebook data. If a query shows which is liked by one for your friends it will show up as 'Liked within Bing'. With this bing will be delivering s

Implementing procedures using parameters

Procedure for deletion of record This is the procedure to which we are passing the parameter called in. Write this procedure in oracle. create or replace procedure del(n in number) is begin delete from stud where rno=n; end; Write this code in VB. You can write this at onclick event of command button for example. Set com = New ADODB.Command com.ActiveConnection = con com.CommandType = adCmdStoredProc com.CommandText = "del(" & Text1.Text & ")" com.Execute

SQL query Optimization or Query Evalution

Note: I have performed on oracle 10g wonder whether it will work on oracle 9i. SQL> set autotrace on; SQL> create table sailors (sid number(5) primary key, sname varchar2(10), rating number(5), age number(5)); Table created. SQL> create table reserves (sid number(5) , did number(5), day number(5), rname varchar2(5), CONSTRAINT col3_fk FOREIGN KEY(sid) REFERENCES sailors(sid) ON DELETE CASCADE); Table created. SQL> select * from sailors;        SID SNAME          RATING        AGE ---------- ---------- ---------- ----------          1 asss                1         22          2 adfss               2         12          3 affss               6         52          4 afdss               6         32          5 ddss                6         62          6 iops                6         35 6 rows selected. Execution Plan ---------------------------------------------------------- Plan hash value: 1417977701 ----------------------------------------------

This is the possible list of assignments for clp 1.

Sanket told to tell this to all it also has been displayed on google groups and facebook. Courtesy sanket. This is the possible list of assignments for clp 1. (VB oracle, procedure, trigger) 1. voting system for election 2. customer data system for bank mgmnt project 3online aptitude test mgmnt system 4. airline reservation system 5. result analysis system for students 6. User/admin moovie ticket system 7. medical shop system 8 emmployee info for an organisation & retrieving the data foran employee 9. library database mgmnt system 10.automobile mgmnt sytems --------------------------------------------------------------------------------- XML 1.travel agency system & xml dbase to retrieve data 2. Airline reservatio system ,DTD use, xml queries ---------------------------------------------------------------------------------- C LANGUAGE 1.c program for mulitiple transactions on a bankiing system 2. decision tree for copmuter shop --------------------------

Validations in Visual Basic 6.0

This topic will demonstrate how to perform client side validations in Visual Basic 6.0. It will guide you with a step by step procedure. 1) Firstly in the below image suppose you want to accept only integer numbers as id in the textbox next to ID label in the form from the user you can perform client side validations in the following way: These are the ascii codes that i am using for acepting only integer values from user. Back space - 8 0 to 9 Integers - 48 to 57 Delete - 127 This is how the function will look. Private Sub Text2_KeyPress(KeyAscii As Integer) If Not ((KeyAscii >= 48 And KeyAscii <= 57) Or KeyAscii = 127 Or KeyAscii = 8) Then MsgBox "enter proper value" KeyAscii = 0 End If End Sub Double click on the text box which you want to validate. Next select the event as keypress from top right list box. In this case the name of text box is text1. This is the function for accepting input as integer value only from the user.

HTML5 video conferencing

About HTML5 the latest being microsoft switching its focus from Silverlight to HTML5 With HTML5 media support now websites can now deliver rich, interactive media as easily as they deliver images. Safari was the first browser to support HTML5 audio and video elements Work is being done to which will enable videoconferencing from HTML5 applications. It will allow the user to give permission to a page to use a device, such as a video camera. That will make possible for users to communicate with each other through a web conferencing from the browser itself. Until recently there was limited support for HTML5 specs but now we have chrome, firefox, opera and IE 9 supporting HTML5. Also there is support for Previous versions of IE through a plugin. You can read more about it here. http://goo.gl/i3VY . You can view a demo of  video conferencing implemented using the device element and stream API's in WebKit GTK+ that enables you to capture video from an web cam and display it in t

Viewing records from an table.

Many had been asking about how to view records this tells  how to view records from database. Private Sub Command7_Click() 'code for view On Error GoTo q Dim viewv As Integer viewv = InputBox("enter the voter id") On Error GoTo w 'again you type it in a line this code runes rsv.Open "select id,name,address,age,gender,dob from voter where id=' " & viewv & " '", conv, adOpenDynamic, adLockOptimistic Text5.Text = rsv.Fields("id") Text2.Text = rsv.Fields("name") Text3.Text = rsv.Fields("address") Combo1.Text = rsv.Fields("age") If (rsv.Fields("gender") = "male") Then Option1.Value = True ElseIf (rsv.Fields("gender") = "female") Then Option2.Value = True End If DTPicker1.Value = rsv.Fields("dob") If (rsv.State = 1) Then rsv.Close End If MsgBox "view" Exit Sub q: MsgBox "you cancelled" Exit Sub w

Design database using XML and evaluate queries.

It is a simple xml demo using altova.M5X6SH23V6Q9 You can download the altova trial version here http://www.altova.com/download-trial/ When you download you wll get the key for trial version on your mail id. Steps: 1)   2)

Oracle and VB 6.0 Connectivity (Part 4)

This part describes the way to implement procedure and cursor as well. I have together described cursor and procedure in a single example. What i have done is when you delete or update a record that record gets deleted from voter table and get inserted in to votertemp table. In procedure what i have tried to do is the deleted record that is currently in votertemp gets deleted from votertemp table and gets inserted back to voter table as it was in its first instance Oracle 1) type ed -> in the sql> command line -> it opens a notepad 2) type the procedure there! create or replace procedure voterundo is cursor votercur is select * from votertemp; id number(5); name varchar2(25); address varchar2(50); age varchar2(3); gender varchar2 (6); dob varchar2(30); begin open votercur; loop fetch votercur into id,name,address,age,gender,dob; exit when votercur%notfound; delete from voter; insert into voter values(id,name,address,age,gender,dob) ; delete from voterte

Oracle and VB 6.0 Connectivity (Part 3)

Now we will see how to insert values into table a table and to view them. Oracle Initially we had created table in part1. Visual Basic 6.0 Now we wil insert data into the table through visual basic. The code for inserting will be as follows When you double click on add button it will open your code window it will have this code! Private Sub Command1_Click() Dim gen As String If (Option1.Value = True) Then gen = "male" ElseIf (Option2.Value = True) Then gen = "female" End If rsv.Open "insert into voter values(" & Text5.Text & ",'" & Text2.Text & "','" & Text3.Text & "','" & Combo1.Text & "','" & gen & "','" & DTPicker1.Value & "')", conv, adOpenDynamic, adLockOptimistic If (rsv.State = 1) Then rsv.Close End If MsgBox ("Data Entered") End Sub This will add the data entered into

Oracle and VB 6.0 Connectivity (Part 2)

The first part defined how to establish connectivity between the back end and the front end of the project. Next we will see how to implement triggers . Oracle We need to Create the triggers in the oracle. 1) type ed in sql 2) it opens a notepad window 3) type the trigger as in the below example 4) exit the notepad with saving 5)and then type "/" 6) this will show a message as trigger created! 7) It should not show trigger created with compilation errors. If this message is shown check your syntax of trigger. Example: create or replace trigger votertrig after update or delete on voter for each row begin insert into votertemp values(:old.id,:old.name,:old.address,:old.age,:old.gender,:old.dob); end; Whenever we perform an update or delete operation the old values get stored into the votertemp table and the changed data gets reflected into the permanent table Visual Basic 6.0 In VB we do not have to do anything as triggers are automatically fired whenev

Oracle and VB 6.0 Connectivity (Part 1)

Here is a basic VB application called voter information system demonstrated which explains the concepts quite clearly. The first step required to establish connectivity is preparing the back end and the front end of the project. These steps are divided into two parts first the back end that is the oracle and front end that is the Visual Basic 6.0. Oracle Firstly we need to set up the database. Create the tables, triggers and procedures and database in the oracle. Create tables: Example: create table voter(id number(5) primary key, name varchar2(25),address varchar2(50),age number(3),gender varchar2(6),dob varchar2(30)); create table votertemp(id number(5) primary key, name varchar2(25),address varchar2(50),age number(3),gender varchar2(6),dob varchar2(30)); (we will be using the next table in the triggers that we will be implementing) Visual Basic 6.0 Develop the VB application as in this example given below. Design the necessary forms for the application. The next part is

Developing Internet Based Multimedia Application Then Why JMF?

If you want to develop internet-based multimedia applications then the best technology to use is Java Media Framework  H93VHC3XEZT6 So what is JMF ? Here are few reason why JMF is good. JMF is an API. JMF is an optional package of Java 2 standard edition platform. JMF allows your applications to playback media, capture audio through microphone and video through Camera, do real-time streaming of media over the Internet process media ( change media format, add special effects ), store media into a file. JMF supports popular media formats such as JPEG, MPEG-1, MPEG-2, QuickTime, AVI, WAV, MP3, GSM, G723, H263, MIDI, and Hotmedia. JMF supports popular media access protocols such as file, HTTP, HTTPS, FTP, RTP, and RTSP. So why JMF? Existing desktop players rely mainly upon native codes to improve performance. Hence they are platform dependent and unsuitable for deployment over Internet. JMF provides a layer of abstraction. JMF API hides the implementation details and provides a cross pl

Latest Malware Alert

This is to inform a alert regarding a new malware called "Here You Have" worm which delivers unwanted gift. Its shows itself as a global mass mailing worm which masquerades as business message but actually it links to malware. KU5Y2XG5ZMGY This internet worm dubbed "Here You Have" is streaming into worldwide inboxes, offering a dangerous payload. The worm travels via spam email with the subject line of "Here you have," or "Just for you," and masquerades as an email with a link to a video or an attached document file. However, the email actually contains a link to a malicious program that can disable security software and send itself to all the contacts in the recipient's address book. It has been labeled as a "medium" risk, and delete any email with the "Here you have," or "Just for you," subject line. If you have an up-to-date and properly configured security software product then you are protected against thi

SETTING PROXY SERVERS

Setting Up Internet Explorer 6.0 for the Proxy 1. On the Tools menu in Internet Explorer, click Internet Options, click the Connections tab, and then click LAN Settings. 2. Under Proxy server, click to select the Use a proxy server for your LAN check box. 3. In the Address box, type the IP address of the proxy server. 4. In the Port box, type the port number that is used by the proxy server for client connections (by default, 8080). 5. You can click to select the Bypass proxy server for local addresses check box if you do not want the proxy server computer to be used when you connect to a computer on the local network (this may speed up performance). 6. Click OK to close the LAN Settings dialog box. Click OK again to close the Internet Options dialog box. You are done.

Colayer: More than what google wave promised!

                                                                             Google wave is a project announced by Google at the Google I/O conference on May 28, 2009 A3SF2YF58PCP People were confused as to how to use it. On August 4, 2010, Google announced  suspension of the Wave development and the intent of maintaining the web site at least for the remainder of the year. And guess what the innovation did not turn out to be on a long run, might be a technology that’s sure to rule in future. Google Wave is a web-based collaboration tool that's notoriously difficult to understand. People can communicate and work together with richly formatted text, photos, videos, maps, and more.  But very few people know that this concept had been  implemented by Colayer in its unique way. Its the simplicity that makes your life easy working in Colayer and makes it stand out against the wave. You will be seeing this further as we move on. Colayer a Swiss-Indian software product company, deve