|
There is no best language, your program should be taken into account.
|
|
|
|
|
Java and Microsoft .NET are two leading technologies intended for the development of desktop and server-side applications. Both platforms enable the use of high-level programming languages to build large-scale applications. While both Java and .NET are often referred to as frameworks, only .NET is actually a framework in the strictest meaning of this word. In fact, the .NET platform uses ASP.NET as a web application framework to allow developers to create web apps.
|
|
|
|
|
How to create restaurant reservation booking using a Java code?
|
|
|
|
|
The same way you would do it in any programming language:
- Gather the requirements of the project
- List the inputs and outputs of the project
- Create an overall design (UML diagrams)
- Create the detailed design for each phase or sub-project
- Design the test requirements
etc.
|
|
|
|
|
Hi guys,
I know how to write code in Java (basic and intermediate level). However, I have very little experience in looking at other peoples' code (experts) and understanding those. I know this is very much required in the industry. I would like to understand how architectures, e.g. MVC and design patterns are implemented by experts.
Therefore, I am asking your recommendations for existing GITHUB projects for learning. I would like to look at a project with the following properties:
1. Built with CORE java. It should have some sort of GUI (maybe JavaFX, which I know isn't CORE java).
2. Followed some architecture and design patterns.
3. It can be a game for example.
4. It should have at least some documentation.
I have searched GUTHUB projects and too much choice has overwhelmed me. Please provide your valuable suggestion so that I can at least start somewhere.
Bye.
|
|
|
|
|
|
Try to see some other forums maybe it will help.
|
|
|
|
|
|
I wanna create a library for sending notification to my android app but i don't know how it works and what kind of data i should give to the function in the class. this is my code for sending notification but i don't know how to put it in the class for using in another sections of the app. This code works in MainActivity
Intent intent = new Intent(context, MainActivity.class);
PendingIntent contentIntent = PendingIntent.getActivity(context, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT);
NotificationCompat.Builder b = new NotificationCompat.Builder(context);
b.setAutoCancel(true)
.setDefaults(Notification.DEFAULT_ALL)
.setWhen(System.currentTimeMillis())
.setSmallIcon(R.drawable.ic_launcher_background)
.setTicker("Hearty365")
.setContentTitle("Default notification")
.setContentText("Lorem ipsum dolor sit amet, consectetur adipiscing elit.")
.setDefaults(Notification.DEFAULT_LIGHTS | Notification.DEFAULT_SOUND)
.setContentIntent(contentIntent)
.setContentInfo("Info");
NotificationManager notificationManager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);
notificationManager.notify(1, b.build());
|
|
|
|
|
My simple HttpServlet is called twice everytime I invoke on my endpoint:
http://cdctst1j:15611/TomSampleServlet/TomSampleServletClient
Could you please help me to take a look?
It is very simple.
My files:
1. WEB-INF\classes\TomSampleServletClient.java:
import java.io.IOException;
import java.net.URL;
import java.net.HttpURLConnection;
import java.lang.ClassNotFoundException;
import java.io.PrintWriter;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
public final class TomSampleServletClient extends HttpServlet {
@Override
public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException {
xxxx;
xxxx;
}
}
2. WEB-INF\web.xml:
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
<servlet>
<servlet-name>TomSampleServletClient</servlet-name>
<servlet-class>TomSampleServletClient</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>TomSampleServletClient</servlet-name>
<url-pattern>/TomSampleServletClient</url-pattern>
</servlet-mapping>
</web-app>
Thanks so much.
|
|
|
|
|
Knowing not much about "servlets", maybe "mapping" something to itself might be something?
The Master said, 'Am I indeed possessed of knowledge? I am not knowing. But if a mean person, who appears quite empty-like, ask anything of me, I set it forth from one end to the other, and exhaust it.'
― Confucian Analects
|
|
|
|
|
I am developing a standalone Java application using an embedded Derby database. Can someone help me understand how I could create all the tables of the database should they not exist within the Java code itself?
|
|
|
|
|
Gregory Guy wrote: Can someone help me understand how I could create all the tables of the database An impossible question to answer. You need to com back with a specific detailed question. And if you are not sure how to use Derby, then go to Apache Derby[^].
|
|
|
|
|
What exactly databases do you want?
|
|
|
|
|
I was playing around with annotation processing and was unable to use generated files directly via an import in my code. Instead I had to prepend the generated class with its complete package. I posted a SO question error: package generated.schema does not exist.
In the end I figured out the reason for this, turned out to be pretty simple, see my answer to the same post. Turned out the error was because I was generating the files at last round of processing, instead of anywhere in between.
So my questions are:
How does generating files at last round vs generating files at in between rounds changes accessing the generated files in code?
Is there a specific reason (Java-related or otherwise) for this behavior?
P.S. I posted the question on SO.
|
|
|
|
|
|
And I want a Ferrari and £1,000,000,000.
But it doesn't work like that. "I want" is not a question.
We're more than willing to help those who have tried and got stuck. But nobody here is going to do your work for you.
If you genuinely don't know where to start, then talk to your teacher.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
|
hey guys i have this code
table.getModel().addTableModelListener(new TableModelListener() {
public void tableChanged(TableModelEvent e) {
if (e.getType() == TableModelEvent.UPDATE)
{
int column = e.getColumn();
if (column == 2 )
{
pricetext.setText(Integer.toString(calculatesum()));
}
}
textsearch.grabFocus();
textsearch.requestFocus();
}
});
both focus methods arent working and i dont know why , thanks for help
|
|
|
|
|
|
hey thanks for the tip , i meant that both methods fail to set focus on the searchtext field, when i execute the method the cursor is set on the search textfield but then lost again and set into the cell of the table
|
|
|
|
|
Sorry, but it is impossible to guess what may be happening.
[edit]
I have just run a simple test with both methods and they work fine. There must be something else happening in your code.
[/edit]
modified 23-May-19 7:54am.
|
|
|
|
|
|
Hello, Im working on project about algorithme genetic using cloudsim
about bees life algorithme BLA if any one has information or code java about this algorithm please I realy need that me on that I have tried algorithm genetic
|
|
|
|
|