Sandeep & Vicky’s Archive
27
Sep

How to convert String to double in ASP.Net

   Posted by: admin   in .Net

Hi guys,

Converting a string to integer or double in .Net is very much similar to that in java.

Here is the code

double x=Double.Parse(“”+100.1);

Output

x=100.1

Hi Folks,

This is really interesting about flash. It can just read, but never write. We can read XML files in flash as well as data can be read, but we cannot write using flash. Due, to security reason, We cannot write anything into any file on neither the local file system nor the server file system using flash. Flash is not authorized to do so. Same is the case with databases. Flash cannot connect to databases as well. The problem seems to be a very serious one, but isnt. There is a very simple solution to this

Solution

Just use any scripting language like ASP, PHP, ASPX, etc. All you need to do is pass the variables that you wanna save to any scripting page and that scripting page would do the needful of connecting to database, or writing into any file. The action script code and the asp (i used asp as my scripting language) code for doing this is as follows

Flash Action Script Code

import mx.controls.*;

var send_lv:LoadVars = new LoadVars();
// define the component instances on the Stage.
var uname:TextInput;
var email:TextInput;
var phone:TextInput;
var address:TextArea;
var btnReset:Button;

var name_label:Label;
var email_label:Label;
var url_label:Label;
var comments_label:Label;

//set color of labels
name_label.setStyle(“color”, “0xFFFFFF”);
email_label.setStyle(“color”, “0xFFFFFF”);
url_label.setStyle(“color”, “0xFFFFFF”);
comments_label.setStyle(“color”, “0xFFFFFF”);

// set the tabbing order for the components
this.uname.tabIndex = 1;
this.email.tabIndex = 2;
this.phone.tabIndex = 3;
this.address.tabIndex = 4;
this.btnReset.tabIndex = 5;

Selection.setFocus(uname);
// when the clear button is clicked, set the form fields to empty strings.
var clearBtnListener:Object = new Object();
clearBtnListener.click = function(evt:Object) {
uname.text = “”;
email.text = “”;
phone.text = “”;
address.text = “”;
};
this.btnReset.addEventListener(“click”, clearBtnListener);

// when the next button is clicked, send the form values to the server using a LoadVars object.
var nextBtnListner:Object = new Object();
nextBtnListner.click = function(evt:Object) {
// if the name is blank, display an error message using the Alert component.
if (uname.text.length == 0) {
Alert.show(“Please enter your Name.”, “Error”, Alert.OK);
Selection.setFocus(uname);
return false;
}
//if email
if (email.text.length == 0) {
Alert.show(“Please enter your Email.”, “Error”, Alert.OK);
Selection.setFocus(email);
return false;
}
// if phone
if (phone.text.length == 0) {
Alert.show(“Please enter your Contact No.”, “Error”, Alert.OK);
Selection.setFocus(phone);
return false;
}
// make sure the comments_ta TextArea instance isn’t blank.
if (address.text.length == 0) {
Alert.show(“Please enter your Address.”, “Error”, Alert.OK);
Selection.setFocus(address);
return false;
}

// if all the required fields have been filled in, create a LoadVars object instance and populate it.

send_lv.name = uname.text;
send_lv.email = email.text;
send_lv.phone = phone.text;
send_lv.address = address.text;

gotoAndStop(5);

};
this.btnNext.addEventListener(“click”, nextBtnListner);

ASP File code to insert records(data passed by flash) into a database

<%

Dim conn,rs
set conn=server.CreateObject(“ADODB.Connection”)

conn.Open “Provider=Microsoft.Jet.OLEDB.4.0;Data Source=” & Server.mappath(“opinionpoll.mdb”)
set rs=server.createobject(“ADODB.recordset”)
rs.open “opinion”,conn,0,2

rs.addnew
rs.Fields(“name”) = request.form(“name”)
rs.Fields(“email”) = request.form(“email”)
rs.Fields(“phone”) = request.form(“phone”)
rs.Fields(“address”) = request.form(“address”)
rs.Fields(“Q1″) = request.form(“q1″)
rs.Fields(“Q2″) = request.form(“q2″)
rs.Fields(“Q4″) = request.form(“q4″)
rs.Fields(“Q5″) = request.form(“q5″)
rs.Fields(“Q3″) = request.form(“q3″)
rs.update
rs.close()

conn.Close
Response.Write(“Done”)
%>

Time management is extremely important when it comes to multi tasking, which is the basic activity which every businessman does these days. To list, some of the top reasons why time management is important are

1. Time is limited. Time is a very special resource in that you cannot store it or save it for later. Everyone gets the exact same amount of time each and every day. If you don’t use your time wisely, you can never get it back.

2. Time is scarce. Most people feel like they have too much to do and not enough time. Lack of time is blamed for everything from not getting enough exercise, poor finances, unachieved goals, too much stress, bad relationships, and even an unfulfilled life. Time management helps you use the time that you do have in better ways.

3. You need time to get what you want out of life. You need time to do almost anything worthwhile in life. Waiting for more free time is a loosing game that almost never results in getting time for what you want. You need to learn how to make time for the things that are important to you. Even if you can only afford to give a small amount of time each week to your goals, you’d be surprised at how much progress you can make.

4. You can accomplish more with less effort. When you become more productive using improved time management skills and tools, you can accomplish more with less effort. Reducing wasted time and effort gives you even more productive time throughout the day. Both of these allow you to make time for a wide range of activities that bring more balance and fulfillment to your life.

5. Too many choices. In this day and age, there are so many ways you can spend your time, that you need some sort of plan to make intelligent choices.

Time management helps you make conscious choices so you can spend more of your time doing things that are important and valuable to you.

 There are various techniques to manage time. All of them are briefed in a Power point ppt and i can be downloaded from the following linlk

Click here to download the ppt

You can use this for your Business communication / soft skills presentation if you are pursuing MBA

17
Sep

Risk and return presentation

   Posted by: admin   in MBA : Presentations and projects

Risk and return are always interrelated.

As a Finance manager, It is but obvious that the manager will have to take decisions because of the trade off  between risk and returns.

The presentation for risk and return can be downloaded from the following link

Click here to download the ppt

This case states that there is a sum of money which needs to be invested in different securities so as to maximize the profits and minimize risks. It is particularly based on solver. Some variables are defined then the constraints are defined and then the answer report is generated.

You can find all the solved excel sheets and other related documents from the following link

Click here to download all documents

Leadership is an entire chapter in OB. The entire chapter has been briefed in the following ppt

Click here to download the ppts

Hi,

This case is based on hypothesis testing of proportions. A company has a product whose
sales are declining. The company reforms the product and tst markets it in two cities to find out the change in consumption due to the change in product.

Two samples are taken and then tested whether the samples are distinct or not. Refer the ppt for further details

Click here to download the ppts

Hi,

In this presentation we have discussed the  micro and macro environment for a two wheeler industry by taking bajaj auto as our reference.

Click here to download the ppts

Hi guys,

I have started this new threa for people pursuing Management courses. They need to make ppts on some case studies / other stuffs very frequently.

The case of china long lines is a case in which we have discussed the oil market in China. Its deman, supply, factors affecting the duo, and also, price controlling of oil in china and result of price fluctuations on other industry sectors. The entire case presentation slides can be downloaded fromt he following link

 China long lines PPT

15
Sep

Easy switching to .Net for JAVA developers : J#

   Posted by: admin   in .Net, Programming

Hi guys,

I have  working with java for the past two years and never tried building application in.Net. Recently, we had a project which was to be done in .Net. We then just learned visual studio and found a very gr8 feature in it.

J#

.Net applications can be written in the java syntax by using J#.

It really kool…..all our database connectivity codes, server side codes which were written in java were easily transformed into a .Net application.

We can have .java extension files as well in our .Net web site.

That is the language independence feature of .Net….which makes it more user friendly and will obviously attract more developers to switch to .Net.

But still java rules

Related Posts with Thumbnails