Ayus
Replies to this thread:

More by Ayus
What people are reading
Subscribers
:: Subscribe
Back to: Computer/IT Refresh page to view new replies
 IT -- Solutions Center[Forum]

[Please view other pages to see the rest of the postings. Total posts: 182]
PAGE: <<  1 2 3 4 5 6 7 8 9 10  
[VIEWED 84973 TIMES]
SAVE! for ease of future access.
The postings in this thread span 10 pages, go to PAGE 1.

This page is only showing last 20 replies
Posted on 02-14-11 10:39 PM     Reply [Subscribe]
Login in to Rate this Post:     1       ?     Liked by
 


Shoot out your problems...
Lets share and expand the knowledge.....!!!!



We are open to share on(any IT related stuffs) :

- Javascript/JQuery/Ajax
- Java,JSP,Servlets and Frameworks
- WebServices
- Unix, Linux, Webserver Administration


+ many more !!!!

 
The postings in this thread span 10 pages, go to PAGE 1.

This page is only showing last 20 replies
Posted on 05-02-11 6:25 PM     [Snapshot: 4474]     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

Folks,

Glad to know at least you tried once. This steps is pretty straight forward. It works for me couple of years ago.
Please just give a shot and let me know where you stuck.
Note. To do this you must have basic knowledge of networking, Dynamic Host Configuration Protocol and Domain Name System.
If not i will walk you through so no worries.

http://www.linuxhomenetworking.com/

Thanks,

Unix_Geek
 
Posted on 05-02-11 7:49 PM     [Snapshot: 4498]     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

 program that calculates and displays the average number of days a company’s employees are absent. The program should have the following functions:

· A function called by main that asks the user for the number of employees in the company. This value should be entered (and returned) as an int. It has no arguments.

· A function called by main that accepts one argument, the number of employees in the company. It should ask the user to enter the number of days each employee missed during the past year. The total of these days should be returned as an int.

· A function called by main that takes two arguments, the number of employees in the company and the total number of days absent for all employees during the year. The function should return as a double, the average number of days absent. (This function does not perform screen output and does not ask the user for input).

Input validation: Do not accept a number less than 1 for the number of employees. Do not accept a negative number for the days any employee missed.

so far,
#include <iostream>
#include <iomanip>
using namespace std;
 
 
void Employee();
void Absents();
double AvgAbsents(int, int);
int main()
{
int nEmployees = 0;
int nTotalAbsents = 0;
double dAvgAbsents = 0.0;
 
nEmployees = Employee();
nTotalAbsents = Absents();
 
dAvgAbsents = AvgAbsents(nEmployees, nTotalAbsents );
 
cout << "The average days missed is " << dAvgAbsents <<endl;
return 0;
}
 
int getEmployees()
{
int n = 0;
cout <<"Enter the Number of Employees: ";
cin >> n, &n;
return n;
}
 
int getAbsents(int nEmployees)
{
int sum =0;
int n = 0;
int i;
for (i = 0; i < nEmployees; i ++)
{
cout <<"Enter the days ansent: ";
cin >>n , &n;
sum += n;
}
return sum;
}
 
double getAvgAbsents(int nEmployees, int nAbsences)
{
double avg =0.0;
if(nEmployees>0)
avg = (double)nAbsences/(double)nEmployees;
return avg ;
}
 
error i got.
 
6 10\6 10\6.cpp(15) : error C2440: '=' : cannot convert from 'void' to 'int'
6 10\6 10\6.cpp(16) : error C2440: '=' : cannot convert from 'void' to 'int'
 
Thanks in advance

 
Posted on 05-02-11 8:10 PM     [Snapshot: 4500]     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

 Hey guys!!

i have got one error solved. i need to solve;

A function called by main that asks the user for the number of employees in the company. This value should be entered (and returned) as an int. It has no arguments.

which i did

void Employee();
 
AND  in main function, i simply call the function like this
nEmployees = Employee();

but it keep on say this error,
 
6 10\6 10\6.cpp(15) : error C2440: '=' : cannot convert from 'void' to 'int'

any suggestion?
 


 
Posted on 05-02-11 9:03 PM     [Snapshot: 4513]     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

 @nepali8

if your method type is void it doesnt return you anything. May be compiler is expecting int and you are calling void. Its a complete data type mismatch. 

call getEmployees() function. This function is returning int.

Your getEmployees() function has code to get user input, why are you calling void Employee().

-- i am not C# programmer, but it just might help.---

 
Posted on 05-02-11 11:23 PM     [Snapshot: 4536]     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

hello!!

I need some heads up on this.
calling all programmer!!!!
 
                                                                                            Bank system.

There are 4 kinds of accounts:

 

 

Saving

Checking

CD

Mortgage

Data

ID

Name

Balance

Interest rate

Minimum requirement

 

ID

Name

Balance

Monthly fee

ID

Name

Balance

Term

Expire date

Interest rate

ID

Name

Balance

Interest rate

Term

Operations

Display info

Deposit cash

Transfer to checking, mortgage account

Interest calculation for current month

Display info

Deposit cash

Transfer to saving, mortgage account

Display info

Create CD

Cancel CD and move money to saving or checking account

Display info

Deposit cash

General operations

Display all account information of one customer

Calculate overall balance of one customer

 

 

 

 

 

When the program starts, initialize several accounts for testing. Provide menu like interface to enable all supported actions (in menu, ask user for account ID to determine the operating account). 

Thanks in advance!!

 
Posted on 05-03-11 10:29 AM     [Snapshot: 4579]     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

@namaste8
- its on java
- i have only done for Checking class
- and tested the class
- similary create two other classes
- operations should be function name(method name)
- for balance transfter: call the method of mortgage or saving class and pass the amount to saving class method  from checking class and vice versa.
- to determine the account via ID, do you hardcore, use arraylist or database. its not clear. for simplicity, you can hardcode in the beginning.

public class Checking {
  private String ID;
  private String name;
  private double balance;
  private double monthlyFee;
  private double amount;

    public String getID() {
        return ID;
    }

    public void setID(String ID) {
        this.ID = ID;
    }

    public double getBalance() {
        return balance;
    }

    public void setBalance(double balance) {
        this.balance = balance;
    }

    public double getMonthlyFee() {
        return monthlyFee;
    }

    public void setMonthlyFee(double monthlyFee) {
        this.monthlyFee = monthlyFee;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
    public String displayInfo(){
        return ("ID:\t"+getID()+"\n"+"Balance:\t"+getBalance()+"\n"+"Name:\t"+getName()+"\n"+"Monthly Fee:\t"+getMonthlyFee());
    }
    public void depositCash(double amount){
        if(amount >0){
          amount = amount+getBalance();
          this.amount=amount;
       }
    }
    public double getNewBalance(){
     return amount;
    }

}

//initialize the class

public class TestClass {
  public static void main(String[]args){
  Saving s = new Saving();
  s.setID("1abc");
  s.setBalance(2000.00);
  s.setName("Test");
  s.setMonthlyFee(20.00);
  s.depositCash(1000);
  System.out.println("Information:\t"+s.displayInfo());
  System.out.println("New Balance:\t"+s.getNewBalance());

  }
}


Last edited: 03-May-11 02:45 PM

 
Posted on 05-03-11 10:30 AM     [Snapshot: 4583]     Reply [Subscribe]
Login in to Rate this Post:     1       ?     Liked by
 

How do I hack sajha?
;)
 
Posted on 05-03-11 2:14 PM     [Snapshot: 4607]     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

@nepali8
 I would use abstract class since most of the members and methods are common





 
Posted on 05-03-11 3:34 PM     [Snapshot: 4631]     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

Baaki afai garnu kere,

/**
 *
 * @author bange
 *
 */
abstract class Account
{
    private int id;
    private String name;
    private double balance;
    
    public int getId()
    {
        return id;
    }
    public void setId(int id)
    {
        this.id = id;
    }
    public String getName()
    {
        return name;
    }
    public void setName(String name)
    {
        this.name = name;
    }
    public double getBalance()
    {
        return balance;
    }
    
    public void setBalance(double balance)
    {
        this.balance = balance;
    }
    abstract void displayInfo();
    
    void depositCash(double cash)
    {
        balance += cash;
    }
    void transferTo(Account account, double amount)
    {
        account.setBalance(account.getBalance() + amount);
        balance = balance - amount;
    }

}
 class Saving extends Account
{
    private float interestRate;
    private double minimumReq;

    public float getInterestRate()
    {
        return interestRate;
    }

    public void setInterestRate(float interestRate)
    {
        this.interestRate = interestRate;
    }

    public double getMinimumReq()
    {
        return minimumReq;
    }

    public void setMinimumReq(double minimumReq)
    {
        this.minimumReq = minimumReq;
    }
    void calcuateInterest()
    {
        System.out.println(getBalance()*interestRate/1200); // PTR/100 ho? :D
    }
    
    void displayInfo()
    {
        // Enter desired info
        System.out.println("Account type=Saving Id= " + getId() + " Name"  + getName() + "Balance " + getBalance());
    }
}

 class Checking extends Account
{
    private float monthlyFee;
   
    public float getMonthlyFee()
    {
        return monthlyFee;
    }

    public void setMonthlyFee(float monthlyFee)
    {
        this.monthlyFee = monthlyFee;
    }
    
    void displayInfo()
    {
        // Enter desired info
        System.out.println("Account type=Checking Id= " + getId() + " Name "  + getName() + "Balance " + getBalance());
    }
}

public class test
{
  public static void main(String args[])
  {
    Saving savAcc = new Saving();
    savAcc.setId(1);
    savAcc.setName("ram");
    savAcc.setBalance(20000.12);
    Checking checkAcc = new Checking();
    checkAcc.setId(1);
    checkAcc.setName("ram");
    checkAcc.setBalance(3000);
    checkAcc.transferTo(savAcc, 200);
    savAcc.displayInfo();
    checkAcc.displayInfo();
  }
}

o/p chai yasto aayecha:
Account type=Saving Id= 1 NameramBalance 20200.12
Account type=Checking Id= 1 NameramBalance 2800.0
 
Posted on 05-06-11 11:46 PM     [Snapshot: 4722]     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

I have two pages. say abc and xyz.

page abc has a anchor tag say "test" , when i click on test, is there a way that I can target a div in page xyz. I cannot use [Disallowed String for - i frame not allowed]

i tried <a target=_blank href="xyz.jsp" target="div1"> test</a>


and around that div in second page
i gave
<a name="div1> <div >

Please suggest

 
Posted on 05-07-11 2:45 PM     [Snapshot: 4753]     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

Are you trying to open/load  div1 from xyz in abc? ( and anchor is in abc rt?)

I dont have answers for your question, but some alternatives may be helpful.

you can try using  directives for the content of div and use logic tag to determine which content you want to include.

Or you can create a template and reload with new contents.

If you use struts, you can use tiles and define that section to be dyanmic .





 
Posted on 05-07-11 6:00 PM     [Snapshot: 4776]     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

no i am not trying to load div from xyz in abc..

when a link in abc is clicked  xyz is loaded, xyz has multiple divs..

and my  problem is that I have to target one particular div in the page xyz...
the xyz should load , but the page should scroll enough to show that div first
:(

how do i do it...can i do using js?

 
Posted on 05-07-11 6:27 PM     [Snapshot: 4780]     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

you may find this link worth for reading.

http://www.frihost.com/forums/vt-47880.html

 
Posted on 05-07-11 7:44 PM     [Snapshot: 4800]     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

Namaste!!!
How u'll doing. Need some information. What kind jobs perspective is out there for who doing his or her double bacholars degree in computer scinece and business adminstration. Or lets just put i like this
way, if one already completed his 1st degree in business managemnt and if
he wants do his second degree in ITfield, which field will be better?





Your valuable informatiom will be highly appriciate
 
Posted on 05-07-11 7:51 PM     [Snapshot: 4812]     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

Basically im pointing on either computer science or information technology?
 
Posted on 05-07-11 8:10 PM     [Snapshot: 4816]     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 
 
Posted on 05-07-11 9:10 PM     [Snapshot: 4828]     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

 thank you guys, it was not a same page link, it was two different page without using an [Disallowed String for - i frame not allowed]


i found the answer though, we can actually give id with the url 

<a target=_blank href="xyz#div"> 
:)

and it solved my problem 

 
Posted on 05-08-11 12:26 AM     [Snapshot: 4858]     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

yeah and it was in the link above.

 
Posted on 05-08-11 11:06 AM     [Snapshot: 4886]     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 
 
Posted on 09-13-11 2:42 PM     [Snapshot: 5623]     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

any guys ever used lucene for suggest search???

 



PAGE: <<  1 2 3 4 5 6 7 8 9 10  
Please Log in! to be able to reply! If you don't have a login, please register here.

YOU CAN ALSO



IN ORDER TO POST!




Within last 365 days
Recommended Popular Threads Controvertial Threads
शीर्षक जे पनि हुन सक्छ।
NRN card pros and cons?
TPS Re-registration case still pending ..
What are your first memories of when Nepal Television Began?
Anybody gotten the TPS EAD extension alert notice (i797) thing? online or via post?
TPS Re-registration
Democrats are so sure Trump will win
Basnet or Basnyat ??
TPS EAD auto extended to June 2025 or just TPS?
nrn citizenship
Toilet paper or water?
Sajha has turned into MAGATs nest
Nas and The Bokas: Coming to a Night Club near you
Mamta kafle bhatt is still missing
ढ्याउ गर्दा दसैँको खसी गनाउच
ChatSansar.com Naya Nepal Chat
whats wrong living with your parents ?
डीभी परेन भने खुसि हुनु होस् ! अमेरिकामाधेरै का श्रीमती अर्कैसँग पोइला गएका छन् !
3 most corrupt politicians in the world
अमेरिकामा बस्ने प्राय जस्तो नेपालीहरु सबै मध्यम बर्गीय अथवा माथि (higher than middle class)
Nas and The Bokas: Coming to a Night Club near you
NOTE: The opinions here represent the opinions of the individual posters, and not of Sajha.com. It is not possible for sajha.com to monitor all the postings, since sajha.com merely seeks to provide a cyber location for discussing ideas and concerns related to Nepal and the Nepalis. Please send an email to admin@sajha.com using a valid email address if you want any posting to be considered for deletion. Your request will be handled on a one to one basis. Sajha.com is a service please don't abuse it. - Thanks.

Sajha.com Privacy Policy

Like us in Facebook!

↑ Back to Top
free counters