iis problem Programming Web Development by Shillz … defined Config File \\?\C:\inetpub\wwwroot\OnlineShopping\web.config Requested URL [url]http://localhost:80/OnlineShopping[/url] Physical Path C:\inetpub\wwwroot…\OnlineShopping Logon Method Not yet determined Logon User… Problem calling a method from main Programming Software Development by laguardian … what I have: public static void main(String[] args) { OnlineShopping shop = new OnlineShopping(); ArrayList<Cart> carts = new ArrayList<Cart… Translation is not working - PhalconPHP with volt. Programming by Nunix …;SadPartners" => "Still looking for partners", "OnlineShopping" => "Online Shopping", "DaizGateway" =>… Arrays are not showing on website - Phalcon Translation with volt template Programming Web Development by Nunix …;SadPartners" => "Still looking for partners", "OnlineShopping" => "Online Shopping", "DaizGateway" =>… Re: iis problem Programming Web Development by geniusvishal You have a Web site that is hosted on Internet Information Services (IIS) 7.5 This problem occurs because the ApplicationHost.config file has a duplicate entry for the following code. <add accessType="Allow" users="*" /> To resolve this problem, In the ApplicationHost.config file, delete the duplicate entry for the … Re: iis problem Programming Web Development by kamilacbe hi.. hope this link would help you [URL="http://forums.asp.net/t/1115232.aspx/1"]http://forums.asp.net/t/1115232.aspx/1[/URL] Re: iis problem Programming Web Development by Shillz I configured the problem. We need to delete/comment [CODE] <sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"> </sectionGroup> [/CODE] This solved my issue...! :icon_cool: Re: Problem calling a method from main Programming Software Development by stultuske what exactly is the point of this: for(int i=0;i<users.size();i++){ if(users.get(i).getName().equals(user.getName()) || users.get(i).getUsername().equals(user.getUsername()) || users.get(i).getContactNo().equals(user.getContactNo())) System.out.println("User exists!");… Re: Problem calling a method from main Programming Software Development by laguardian I'm sorry if my code is a bit messy. Still kinda new to this. for(int i=0;i<users.size();i++){ if(users.get(i).getName().equals(user.getName()) || users.get(i).getUsername().equals(user.getUsername()) || users.get(i).getContactNo().equals(user.getContactNo())) System.out.println("… Re: Problem calling a method from main Programming Software Development by stultuske >Which is why I put users.get(0). How can I make it so that I can get display the profile of the newly added user instead of the pre-existing user? In order to get the 0-indexed element, there still has to be at least one element in the list. You can try to get the last, instead of the first element. (size - 1 ) => if this equals -1, the … Re: Problem calling a method from main Programming Software Development by JamesCherrill Best not to reinvent the wheel. List already has a `contains` method `boolean contains(Object o)` Returns true if this list contains the specified element. More formally, returns true if and only if this list contains at least one element e such that `(o==null ? e==null : o.equals(e))`. so for clarity and safety... if (! users.contains(user… Re: Problem calling a method from main Programming Software Development by laguardian Hello again! I've edited and tried the code: for(int i=0;i<users.size();i++){ if(!users.contains(user)){ users.add(user); } else{ System.out.println("User exists!"); System.exit(0);… Re: Problem calling a method from main Programming Software Development by JamesCherrill The loop (line 1) is totally wrong. First time thru the loop you add the user Second time thru the loop the user is already in users, so you take the else. You don't need that loop at all!. Just delete it. Re: Problem calling a method from main Programming Software Development by laguardian Woops, my bad. I've deleted the for loop already. Just ran the program again and whenever I register a user with the same information, it doesn't enter the else statement. if(!users.contains(user)) users.add(user); else{ System.out.… Re: Problem calling a method from main Programming Software Development by stultuske the contains method will use the equals method. If you didn't override it in your User class, it will run the Object version, meaning a referential equality check. Since they are not the same object, they won't return true with equals, meaning the user will be added anyway. Make sure to implement your own equals method in the user class (and don't… Re: Problem calling a method from main Programming Software Development by laguardian > the contains method will use the equals method. What do you mean? Re: Problem calling a method from main Programming Software Development by stultuske basically, calling contains can be considered this: public boolean contains(Object o){ for ( Object nO : thisList ){ if ( nO.equals(o) ) return true; } return false; } If your code doesn't have a custom equals method, the basic version, which only tests for referential equality will be used, which doesn't lead to… Re: Problem calling a method from main Programming Software Development by laguardian Ahhhhh I get it. So if my code needs a custom equals method, should it look like this: public boolean contains(ArrayList<User> users){ for(User user : users){ if(user.equals(user)) return true; } return false; } Re: Problem calling a method from main Programming Software Development by JamesCherrill No no no. That was just a way of explaining how `contains` works. It needs to be able to test if any user in the list is the same as the new user. That's where the `equals` method come in. You need to define an `equals` method in your User class. [This tutorial](http://users.csc.calpoly.edu/~kmammen/documents/java/howToOverrideEquals.html) … Re: Problem calling a method from main Programming Software Development by laguardian Ohhhhhh. That was stupid of me lol. public boolean equals(User user){ if(user.equals(user)) return false; else return true; } Something like this then? Re: Problem calling a method from main Programming Software Development by JamesCherrill That will just loop forever calling itself. You have to read that tutorial properly. In pseudo code the equals method is going to contain some logic like`: if (the other's name is the same as this name AND other's username is the same as this username AND other's contactNo is the same as this contactNo) THEN … Re: Problem calling a method from main Programming Software Development by laguardian Okay I kinda understand it better now. I have another problem though. I'm confused/stuck on how I should implement my buyProduct method. Scanner sc = new Scanner(System.in); System.out.println("-----------------------------"); System.out.println("1. Edit Profile");… Re: Problem calling a method from main Programming Software Development by JamesCherrill OK, let's think about it... What's different between any two "buy product" processes? Only the user. So we can code it as a method with just one parameter... `void buyProductFor(User u) { ...` in that method we can display the products, get the user's input, update the user's cart, and return. Re: Problem calling a method from main Programming Software Development by laguardian Alright, I think I've got some sort of idea. I'll code it first. Thank you kind sir! Re: Problem calling a method from main Programming Software Development by laguardian Okay, so I've placed then statement under case 3 under my buyProduct method. I'm getting a NullPointerException though. Also, when I added `User user` as the parameter for the buyProduct method: case 3: users.get(users.size()-1).buyProduct(null); break; But when I code: `.buyProduct(user)` the compiler says it… Re: Problem calling a method from main Programming Software Development by laguardian With a little tweaking of the code, I was able to have the first part of the buyProduct completed: public void buyProduct(ArrayList<Product> products){ for (int i=0; i<products.size();i++){ System.out.println("-----------------------------"); System.out.println(i+1+".&… Re: Problem calling a method from main Programming Software Development by stultuske why don't you put the arraylist as a class variable? anyway, don't know whether you've noticed this yet: public boolean equals(User user){ if(user.equals(user)) return false; else return true; } this may be a valid method, but not a valid equals method. for an equals method, as … Re: Problem calling a method from main Programming Software Development by laguardian Hello again! I'm trying to figure out how I can addOrders to my list of orders: public void addOrder(Product product){ orders.add(product); } Here's what I coded under buyProduct: switch(resp){ case 1: { System.out.print("Quantity: ");… Re: Translation is not working - PhalconPHP with volt. Programming by Lan_2 I want to learn programing. How i can I strat it ? Please describe learning step by step. Re: Translation is not working - PhalconPHP with volt. Programming by Nunix First you need to start learning the structure of the web programming, starting with HTML and then it comes the rest. But first HTML.