javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster

Maybe somehow, you are losing the session. You might want to check some tutorials about sessions in wml and what this tag does:
<onevent type="ontimer">
<go href="session_var2.jsp"/>
</onevent>

Is there any other way to go from one page to the next?

Try to use <go href="session_var2.jsp"/> ONLY, without the onevent

javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster

Post deleted. Wrong suggestion.

javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster

The query should be like this: "SELECT * FROM ADMINISTRATOR.USERDATA WHERE userid = '"+user1+"' AND upass ='"+pass1+"'" Not: "SELECT * FROM ADMINISTRATOR.USERDATA WHERE userid = "+user1+" AND upass ='"+pass1+"'" After the execution of the query you always go to the second page. You don't check if the log in was successful. You execute the query and the without checking the result you go to the second page.

Also. Delete most of your code and:
Write a separate class with a method that connects to the database, executes the query, returns the result and CLOSES everything (ResultSet, Statement, Connection).
Don't put that "database connection code" there. Put it in a separate class and call a method that simply returns true/false if the log in was successful.
Then if it is true, only then redirect.

The above is general practice and you should follow it!

As for the session, it should return what you set it, but I am not familiar with wml, so you might want to wait for someone else to reply.

javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster

yess..i need to run it in php..pls do help me..

Then you should have posted your question at the PHP forum. I have already asked for a moderator to move your thread.

javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster

<?php
echo shell_exec('whoami');
?>
this gives the output as apache..

That is PHP, not JSP.

javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster

You get the "sesspassword" because you set it:

//On Page1.jsp
session.setAttribute("sesspassword",pass1 );

//On page2.jsp
<%=session.getAttribute("sesspassword")%>

But do you set the sessuser1? I see that you only do:
<%=session.getAttribute("sessuser1")%>
Where do you set it?

Also if sesspassword "returns" null:
1) are you sure the code where you set its value executes?
2) are you sure that you didn't misspell the sesspassword? (sesspasword/sespassword ) they both need to be the same.
3) are you sure that the value that you set (pass1) is not null?

Try to add some messages (System.out.println) that print at the server and see.

javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster

session.setAttribute("sessumobile", user1)
session.getAttribute("sesspassword")

javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster

Collections.sort(arr); //acs
Collections.sort(arr, Collections.reverseOrder()); //decs

The idea is for someone to learn as an exercise how to sort an array or how to find the max/min number. Not to just call a method and let it do the work for you. The idea is to learn how to think and implement solutions for your problem. Not all problems can be solved by methods provided by java

javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster

First of all, the methods for smallest, largest are wrong. You initialize at both cases with zero.
For example you set smallest=0, but what if the user enters only positive numbers, at the accept method?:
1,2,3,4,5,....
Then the smallest 0 will always be smaller than all the elements of the array and the method will return 0 instead of the right value 1

The same goes with the other method. You need to initialize the smallest/largest variable with the first element of the array.

As far as Fibonacci, try to find the formula for fibonacci numbers and implement it. I think that each fibonacci number is the sum of the previous 2 so you will need to have variable with the first 2 values and then use them to calculate the third and then recursively the fourth from the previous 2 and so on.
Have a method with argument n that returns the nth fibonacci number. If n=1 or n=2 just return the fixed values, else calculate based on the formula

javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster

You can use the same code you use to get the file from the request in order to get the text.
Can you use post some part the code that you use to take the file from the request? There are different libraries for that.

javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster

i have this type of code like
User:<select>
<option>Faculty</option>
<option>Student</option>
</select>
now what i want when i am selected Faculty option then page will be redirect to Faculty.jsp page is it possible in jsp ...plz reply me ...

Start a new thread and read about onclick events:

<select onchange="">
..
</select>

or

<select onclick="">
..
</select>

http://www.w3schools.com/default.asp

javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster

What do you mean lost focus. All we see here is the same code posted twice. Do you submit at the same page? If yes then what happens is that the page reloads.
You need to take the value of the radio button from the request and set the attribute "checked" to the selected radio button.
Take the value and use java scriplets (if statements) to decide which button needs to have the "checked"

javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster

Delete everything.
Don't use the above code. (Html in servlets)

Create a class with attributes the id, nme(name ?), twn(town ?), cny(country ?).
Create a class that has a method that does the database operations and returns the data. Probably a list of the above class (id, nme, twn, cny)
Inside a jsp call that one single method to get the data and then use scriplets to display them.
When you click a button you can call a javascript function that submits a form to the page that you want.
Or instead of buttons you can have href links:

<%
for (int i=0;i<arrayOfData.length;i++) {
  //i-th elements that has the data from the database

  String id = arrayOfData[i].getId(); // just an example, arrayOfData being an array of the class you created with the attributes. You call the get methods
%>

  <a href="delete.jsp?id=<%=id%>">Delete</a>

<%
}
%>

If the above doesn't make much sense then you need to study more about the basics before starting to work with jsps.
The same goes about scriplets. Get a book and learn how to use them in jsps, and don't write code that connects to the database in a jsp. Call a method that gets you the data.

Also take a look at the link at the top of this forum with title:
JSP database connectivity according to Model View Controller (MVC) Model 2
And then leave a positive feedback to the author for his …

javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster

As masijade said the error has nothing to do with database.

You call a method that throws an exception. Regardless if that method will ever throw that exception at Runtime or not, according to the declaration of that method you must catch the exception that it throws.

The above has nothing to do with adding the sql driver at the classpath or not.

javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster

Are you saying that your professor didn't teach you how to create forms (JFrame) ?

How to click buttons (ActionListener)

Or how to create your own classes?

class Book {
  String name;
  String author;
  ....
}
javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster

Submit to the same page with the results, instead of going to a new page.
Always display the search criteria and if there was any input in the request and there were results also display those.

Assuming that you submit to a servlet, you take the results and send them to the same page then:

<display here the search bar>

 - take the results from the servlet.
 - If they were found display them
 - If this is the first you enter the page then there aren't any results, so don't display anything.

You need to post some code showing what technique you currently use

javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster

Actually, if I may suggest, the initialization should take place in the constructor. So when the user creates that object, the array would be initialized and not having to call any other methods.

We usually initialize things in the constructor. Of course the method init_matrix could be private and be called in the constructor.

Of course the issue here is that the code posted here doesn't make any sense

javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster

When you set this driver: "sun.jdbc.odbc.JdbcOdbcDriver" with: Class.forName("sun.jdbc.odbc.JdbcOdbcDriver") that is actually a class that you use to get the Connection instance as well as the others (PreparedStatement for example).

Do you have some jar downloaded or something that has the above class to put in the classpath.
I don't work with Access so I don't know the exact procedure. Is it necessary to use Access. Why not mySql ?

javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster

Do you have the driver installed. Have you set it at your classpath ?

javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster

I run that code and seems that it does the trick. Did you run it kaneyip ?

javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster

You might want to try this. You need to close everything in the finally block. But if you declare them in the try, they won't be visible in the finally, but you cannot declare them outside because, they throw an exception. So declare them outside and initialize them inside the try:

int method(String name, String pass) throws SQLException {


// declaration
Connection conn = null;
PreparedStatement ps = null;
ResultSet rs = null;

try {
String str = "SELECT 1 FROM voterlogin where voterID=? and password=?";

// initialization
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
conn = DriverManager.getConnection("Jdbc:Odbc:db1","","");

ps = conn.prepareStatement(str);
ps.setString(1,name);
ps.setString(2,pass);

rs = ps.executeQuery();
if (rs.next()) return 1;
else return 0;

} catch (SQLException e) {
   e.printStackTrace();

   //return 0;
   // or
   //throw e;

   // You can either return 0 or better yet -1 in case an exception occurred.
   // or rethrow the exception to be caught somewhere else in the code 

} finally { // the finally always executes even after the return statement.
  if (rs!=null) rs.close(); // the if is in case an exception occurred before ResultSet taking value

  if (ps!=null) ps.close();
  if (conn!=null) conn.close();
}

}

The whole method throws an SQLException because the close operations also throw exception. An alternative way would be in the finally:

} finally {

   try {if (rs!=null) rs.close();} catch(Exception e) {}
   try {if (ps!=null) ps.close();} catch(Exception e) {}
   try {if (conn!=null) conn.close();} catch(Exception e) {}

}
javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster

Yeah,ur right but I have to download a server to test my webform...

So? You mean you want someone to give you the code because you cannot test it yourself. Most IDEs come with a server that start automatically when you run a web application. Try downloading NetBeans IDE. Create you web application and run it.

javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster

You have two challenges - first to think through the logical process you need, second to translate that into Java code. You can't start the second until you've completed the first.
So the best thing you can do is to set the PC aside, grab a pencil and pad of paper, and work out how you would do this manually.

Don't you think this is a little difficult for a beginner?

javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster

First of post what errors you get. Specifically the exception. Don't use: System.out.println(e) , use e.printStackTrace.
And show us the line where you get the error. Test that method in a main method first

Also this is wrong:
if(r == null)

ResultSet is never null.
Use:
if (r.next()) {
return 1;
}

You don't need to create a Statement since you don't use. And you need to close the connection, PreparedStatement, ResultSet after you are done, in a finally block.

javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster

Actually I believe that you need to call the setLenient method of the SimpleDateFormat class. Check the API. I think that is something that needs to be added to the code.

javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster

This assignment looks very familiar with this one:
http://www.daniweb.com/software-development/java/threads/347028
Someone posted the same exact question. The answer that I gave, can be found there

javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster

You can do that with javascript.
Example, add an onchange event at the select tag. When you change something make the fields editable. Then take the values of those fields and check them if they are filled. You can use javascript to change the content of the select box.

For the fields, you can add an onkey... event so when the user types something at the field you will check the same.:
http://www.w3schools.com/
Read the javascript tutorial and the DOM tutorial

<head>
  <script>
    function callFunction() {
       var v = document.getElementById("field").value;
    }
  </script>
</head>
<body>

  <input type="text" id="field" name="field" value="" onkeyup="callFunction2();" />
  
  <select onchage="callFunction();" id="select_id" name="some_name">
</body>
javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster

Apparently he wants to add java scrip-lets. Like this:

<body>

<select>
<%
for (int i=0;i<12;i++) {
%>
    HTML CODE FOR MONTH OPTIONS.
<%
}
%>
</select>

</body>

Try to run the above and see what it prints.

I would advise you to study a little bit more about HTML before going to submitting forms with jsp. That is not the right way to display things on a jsp. Now people use divs and style sheet, BUT you should use, as a beginner a combination of the tags: table, tr, td.

Study this tutorial about html and learn how to use the <table> tag:
http://www.w3schools.com/ Check out the html section. Use those tags to display things in your page and put what you want to send into a form. On second thought you should study thoroughly the entire tutorial about HTML because your <select> tags weren't that good as well.
You forgot to put the name attribute at the select tag. Also it is good for all the options to have a value and don't use the SELECTED attribute the way you did

Do you have any books about JSPs ? Or any notes to look at? Every book has examples and teaches you exactly what you have asked in this thread. You might want to do a little research and studying first, before posting a question that can be found with a little studying.

javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster

The right way would be to use servlets but there is another way. Although it is not recommended by some, (I am not one of them, I usually use java in jsp pages), you can call your java methods from a jsp. If you say that the RequestDispatcher doesn't work here is another example.

Assuming that you have a page with a form and input fields and stuff. Just submit to the jsp page you want:

page1.jsp

<form action="page2.jsp">

</form>

page2.jsp:

<%
// get data from request:
String param1 = request.getParameter("param1");
...

// do some stuff

SomeClass sc = new SomeClass();
SomeObject [] obj = sc.getData(param1,....);

// display the jsp page:
%>

<body>
.....
</body>
</html>

Try to keep as little as possible the java code. Just limit your self to getting the input from request, calling methods and displaying data.

You can also get to that page by a link:

<a href="page2.jsp?param1=123123&param2=123213">
Some Link
</a>
javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster

May be this time you can skip the servlet part and the RequestDispatcher. I don't know if it will work, but instead of submitting to the servet you can submit directly to he page you want, and put scriplets in the page.

Assuming you submit directly to a page. Then in that page you can put the java code and then display the html code

javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster

i input a set of coordinates,,,and i expect the distance between them. the coordinate of a point may be of the format 2.4454458393,78.39585839385 ,,,,,,,i still dont understand the 8th line u've posted,,,what is that if its not enclosed within scriptlet tags,,
or if im wrong pls explain me this line u've mentioned..

Lat1=<%=lat1%>, Lon1=<%=lon1%>, Lat2=<%=lat2%>, Lon2=<%=lon2%>

If you don't get the right value it means that your formula is wrong. What mathematical formula did you use for the method?

Also what kind of study did you do and started writing jsp pages? Did you read any books? Because if you don't understand that line, then stop immediately. Forget about jsp and start learning basic java. Then learn html and get a book about jsp and do some studying.

If you can't get that simple method to work then you shouldn't be working with jsp. So far all of my questions where about that method. What happens in the jsp is irrelevant. Try to debug and correct the method. Take some values and pass them to the method and see what it does. Also shouldn't that method take as arguments double values and return one double value?

javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster

That is java not javascript.
Also have you tried running that method in a main method. Not returning the right values has nothing to do with jsp. It has to do with the code in the method. So what values do you pass as arguments and what do expect it to do?

javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster

First of all, that is not proper way to write jsp.

A minor error is that in a jsp you never do this: <% out.println(hav);%> You do this: <%= hav %> And for the rest of the code this is how you need to proceed:
Create a separate class, called Utils for example, and put that method inside it.
Then display the input of the method at the page.

<%
String lat1 = lat.substring(0, lat.indexOf(","));
String lon1 = lat.substring(lat.indexOf(",") + 1, lat.length());
String lat2 = abc.substring(0, abc.indexOf(","));
String lon2 = abc.substring(abc.indexOf(",") + 1, abc.length());
%>

Lat1=<%=lat1%>, Lon1=<%=lon1%>, Lat2=<%=lat2%>, Lon2=<%=lon2%>

Take those inputs and run your method from a main method in order to debug it. After you are finished debugging and made sure that the method works then call it from the jsp.

What input do you pass at the method and what do you expect to receive? Add some System.out.println when debugging in order to see what values are generated.

javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster

Thank you for your recommendations. I will give them a go and let you know how I proceeded.
If anyone else has anything else to share I will be happy to read any other suggestions

javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster

Hi, I recently decided to learn how to program and distribute applications for iPad. After some research I have some questions. I found similar threads in this forum but none where exactly what I wanted.

1) Do I have to buy a Mac to develop my iPad program? After reviewing this link:
http://www.daniweb.com/forums/thread323449.html and this Dragon Fire SDK I found that I can write my app in C++. But is it possible that some things that I need to do for my app cannot be done in C++ and I should be using Objective-C (or Cocoa Touch Programming)? Has anyone else similar experience?

2) Do you have any book recommendations? I did some searching but surely I cannot buy all of them and I would like to have a hard copy of a book to start instead of getting many e-Books.

My main expertise is (can you guess it?) Java. I am an experienced programmer in Java so I am confused whether I should buy a book about iPad for completely beginners or a more advanced book since I have very little experience in Mac, or C programming.

Thank you.

javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster

You can do this with IFRAME.
You can add an onclick event at the link. When that link is clicked execute a javascript method.
In that method you can take the iframe and set its src (source) with that page:

<IFRAME name="yourIframe" id="yourIframe" src="empty.jsp"></IFRAME>

Create an empty jsp for when the page loads. Just have an empty file.

When you click the link:

document.getElementById("yourIframe").src = "yourJsp.jsp";

OR:

document.getElementById("yourIframe").src = "yourJsp.jsp?param1=123&param2=abc";

check the http://www.w3schools.com/default.asp for a reference about the iframe

javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster

Wow, nice.. That's pretty cool. Makes the code in the files less and much more manageable. In the myHtml.jsp, you don't need to import anything like that? You literally just do this:

<%
     String s = (String)request.getAttribute("attr1");
     Integer iObj = (Integer)request.getAttribute("attr2");
%>

And the request/attribute data will be "reachable" for the jsp page?

Yes,
But of course you need to have set those values in the request. Otherwise they will be null.
That is happening when you do this: dispatcher.forward(request, response); You set the attributes at the request instance and send that request to the jsp page of the dispatcher

peter_budo commented: Thank you for helping out +16
javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster

So what you saying. Is that instead of having a single servlet generate 3 "html pages".. Rather have 3 servlets that obtain data from the database etc, and 3 JSPs that then uses those 3 servlets repectively?

Actually I had a problem with the browser reloading that is why my first post didn't make much sense. Read my latest post.

Also
You can do whatever you want based on your needs.
Example:
After reading your last comment, you can have 1 servlet that redirects to whatever html you want:

String url = "";
if (....) {
  url = "somepage.jsp"
  request.setAttribute("att1", "value1")
} else if (....) {
  url = "somepage2.jsp"
  request.setAttribute("att2", "value2")
}

RequestDispatcher dispatcher = request.getRequestDispatcher(url);

dispatcher.forward(request, response);

You don't need to have 1 servlet for all pages. You can have 1 servlet that goes to 1 jsp page,
Or 1 servlet with if statemets that goes to many pages.

Many similar pages that have some sort of common operations so they need to go the one servlet that has the code you want to execute and redirect to wherever you want.


BUT. I general: HTML code in servlets: bad idea. I am sure that you already know that; after trying to write html code like this:

PrintWriter out = response.getWriter();
        out.println("<html>");
        out.println("<head><title>Servlet1</title></head>");
        out.println("<body>");
        out.println("<p>Hello world</p>");
        out.println("</body></html>");
        out.close();

Imagine wanting to write a huge jsp page with many tags and complex javascript code. Even the above is difficult to understand, write …

Dean_Grobler commented: Right to the point, easy to understand explination. Well done! +1
javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster

Actually, you never create pages nor write HTML code in servlets. You may be able to do that, but you don't.
You use servlets for handling data, doing operation, reading from database and then you send the results to the jsp page. It is not a good idea to write html code in servlets. After you have sent the data at the servlet (like you do), do whatever operations you like and then redirect to a JSP page with the results for displaying or for whatever you want.

You might want to look at the class RequestDispatcer. In the servlet, after you are done with whatever you are doing, you can do this:

RequestDispatcher dispatcher = request.getRequestDispatcher("myHtml.jsp");

request.setAttribute("attr1", "Value");
request.setAttribute("attr2", new Integer(1));

dispatcher.forward(request, response);

And in the myHtml.jsp you can do this:

String s = (String)request.getAttribute("attr1");
Integer iObj = (Integer)request.getAttribute("attr2");

You need to check if the s, iObj are null or not, before you use them. If you go to that page without going through that servlet you will need to ignore them

javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster

Actually, you never create pages nor write HTML code in servlets. You may be able to do that, but you don't.
You use servlets for handing data, doing operation, reading from database and then you send the results to the jsp page. It is not a good idea to write html code in servlets. J

javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster

As I already said before, you use an object which is null. Before you use the "first" you need to check if it is null or not. The line tells you where the error is.

And of course Taywin gave you the same suggestion

javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster

Is this line 19:

if(first.next == null) { //this line 

If yes then according to the exception you are trying to use something which is null. In this case I assume that it is the "first"

I don't know your logic but, maybe you need this:

if(first == null) {
  ...
} else { ...

OR

if(first == null || first.next==null) {
  ...
} else { ...

In any case you need to check if "first" is null and/or first.next before you use either one.

And use code tags. Press the button (code) when you make your post

javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster

Check the constructor of the File API. It takes as argument a String. What do you think that String would be?

javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster

Because when you do this: image instanceof ImageIcon You only check if the java object is an ImageIcon. It will always be true because you create an ImageIcon instance. You can try to create a File and check if it exists:

File file = new File("......")
if (file.exists()) {
  JLabel label = new JLabel(new ImageIcon(image));
  // and the rest of the code you have in the main for displaying the JFrame
} else {
  // the error message you print
  System.out.println("Nothing loaded. Try again.");
}

Or you can look at API of ImageIcon for more information.

javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster

Does the "Successfully loaded the image file." gets printed?
I will run your code in a few minutes, but you can also try to use the full path of the image: Image image = app.getImage("C:/.../.../chicks.jpg");

javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster

First of all, in the ImageIcon method you pass the filename as argument and then you set it to "" . Why? Just pass the argument to the constructor and create the image. Why do you "delete" the argument by doing this:
filename = "";

And since you have the ImageIcon method to get the image you don't need the getImage method. You can keep it if you want though. The rest of the code seems ok.

You need to look at the API of the classes that you use. More specifically the constructor of the JLabel. If it does takes as argument an ImageIcon then look at the API of ImageIcon on how to create such object.

Post some new code with new question afterwards

javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster

In the mean time you can you look at the java.lang.String API. There are methods you can use. I think there is one called "endsWith".

javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster

I doubt the OP is going to return after six years to post his classes. ;)

Ups, I never thought that niksinghania would go and post a "solution" to a 6-year-old thread

javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster

We need to see more code. Post your classes. We need to see how they are declared, which are abstract and how you override your abstract methods.

And niksinghania the error clearly says that the problem is the enableRecording method (cannot resolve symbol) not how the Boolean object is created. A look at the API shows that both ways are correct:
http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Boolean.html

javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster

You can try to use this encoding:
ISO-8859-9 taken from: http://www.w3schools.com/tags/ref_charactersets.asp

If it doesn't work you can try to change the encoding of the page at the browser if you go at at the "View" menu.

Or investigate that link for more ideas