Latest Posts

yes, that is the problem

If you start to press the next key before you have fully released the previous one then the release will override the press. Maybe that's part of the problem???

//here is my code

import javafx.animation.AnimationTimer;
import javafx.application.Application;
import javafx.event.EventHandler;
import javafx.scene.Group;
import javafx.scene.Scene;
import javafx.scene.input.KeyCode;
import javafx.scene.input.KeyEvent;
import javafx.scene.paint.Color;
import javafx.scene.shape.Rectangle;
import javafx.stage.Stage;

public class SmoothKeyEvents extends Application {

    public final static String TITLE = "simple key-input program";
    public final static short WIDTH = 1280;
    public final static short HEIGHT = 720;

    private Stage window;
    private Scene mainS;
    private Group groupS;
    private Rectangle rect;

    private int x = 50;
    private int y = 50;
    private int velX = 0;
    private int velY = 0;

    public void start(Stage primaryStage) {
        groupS = new Group();
        mainS = new Scene(groupS, WIDTH, HEIGHT, Color.DARKBLUE);
        window = primaryStage;

        rect = new Rectangle();

        mainS.setOnKeyPressed(new EventHandler<KeyEvent>(){

            public void handle(KeyEvent ke) {
                if(ke.getCode() == KeyCode.A) {
                if(ke.getCode() == KeyCode.S) {
                if(ke.getCode() == KeyCode.D) {
                if(ke.getCode() == KeyCode.W) {

        mainS.setOnKeyReleased(new EventHandler<KeyEvent>(){

            public void handle(KeyEvent ke) {
                if(ke.getCode() == KeyCode.A) {
                if(ke.getCode() == KeyCode.S) {
                if(ke.getCode() == KeyCode.D) {
                if(ke.getCode() == KeyCode.W) {

        final AnimationTimer at = new AnimationTimer() {

            public void handle(long arg0) {
                x += velX;
                y += velY;

    public void setVelX(int velX) {
        this.velX = velX;

    public void setVelY(int velY) {
        this.velY = velY;

    public void stop() {
        System.out.println("program exited");

    public static void main(String[] args) {

I am making a ping pong game using JavaFX, but before I am going to make that, I like to test the KeyEvents.
I made a simple ping pong game about 2 years ago, but I like to improve my game.
And was pretty bad controlls back when I made the ping pong game, because of the not smooth controls.

so here is the problem:
whenever I holdpress A and switch quickly to holdpress D or D to A, same with (W to S and S to W).
it just takes a little break and then move, is there something I can change, improve?
I don't know why it does this.

No. You just start the same client code twice, or as many times as you want for many clients.
But you do have to enhance the server code to keep track of the clients, and keep separate data input/output streams open for each client, and have separate threads waiting for input from each client.

Please supply exactly what is broken. Error messages along with what you expected to happen.

I get the feeling you expected this to help your SEO or rank but from what I know, this feature is not about that.

-> Write more. Tell the forum what you felt should happen.

how can I make it that another client can join in?
like there is 2 clients and 1 server.
do I just copy the clients code?

It appears you didn't read the above replies. This area is well discussed and I see answers above and there are more on the web. I chimed in because I'm running into folk that never used a terminal so they never had to deal with character I/O and what terminals did back then.

Sure, echo out the Enter key. My bet is that it will do nothing visible. If you want the Enter key to do something, then code it to do what you needed.

Again. Enter does not equal \n (newline.)

@rproffitt I actually missed \n in my question, but I was talking about echoing the Enter key after pressing 'a' (the character for getchar). Why does getchar echo Enter while it is for terminating getchar? And why does getche not echo it?

I have used the breadcrumblist mentioned by the for my [website](

<script type="application/ld+json">
  "@context": "", 
  "@type": "BreadcrumbList", 
  "itemListElement": [{
    "@type": "ListItem", 
    "position": 1, 
    "name": "Home",
    "item": ""  
    "@type": "ListItem", 
    "position": 2, 
    "name": "About Us",
    "item": ""  
    "@type": "ListItem", 
    "position": 3, 
    "name": "Our Services",
    "item": ""  
    "@type": "ListItem", 
    "position": 4, 
    "name": "Contact Us",
    "item": ""  

And this is the result showing in Google searches:

What is missing? Please guide.

you can also use FTP server
if you are using for onw hositng paln that you can access.

@Sappie, so you indirectly told me you want a newline when the Enter is pressed. You'll have to code that to happen.

That is, \n is not the character generated by the enter key.

I didn't notice but I was to write- "Hello\n" instead of "Hello".

If a site did that, it would be breaking some fundamental rules about password management. User name, sure but password, never.

Reading for you (pick a few articles):

I worry here that you might think you would make money. wrote:

I built I'm originally a front-end mobile dev, but have since moved into project management, running a software development agency by day and by night

If it was a hit, I wouldn't be able able to write "Don't quit your day job."

I was looking for open source projects on google and found this platform

is there anyone with experience using the platform?

I plan to contribute to a game project there.

Thank you for your posts, I managed to work around the problem of course with your help.
I have started working with PDO for security as well as hashing in replacement of crackable MD5.
Will keep on applying your suggestions as I get along with learning HTML, PHP, Java Script, and MYSQL.
All in all, you guys are wonderful.
Thank you once more.

Following are the latest trend in digital marketing-2019
-Voice search
-Chat bot
-Augmented and virtual reality
-Live videos
-AI and mAchine Learning

hai all,

i want to know the system user name and password when iam running the web page in jsp to oracle


I see a lot of unnecessary code. For example, every one of your

If cmbModel.SelectedItem
End If

blocks clears the value of txtDate.Text before setting it to a new value. You don't have to clear it before assigning a new value. Furthermore, no matter what the user selects you have to execute every If block. Replace these with a Select Case.

Alternately, you could create a dictionary where the key is the selected item text and the value is the desired value of txtDate.Text. A little extra work up front but it requires only one line of code to set the value of txtData.Text. That's a saving of about 400 lines. It's a lot easier to type in and maintain and a lot less prone to typos.

rproffitt commented: I should tell a story about 6 sigma and the code was too small and therefore was unacceptable (Motorola days.) +15

I see that you posted widely so check your other posts. Also,

I don't see a question.

rproffitt commented: While I was commenting on the code you were busy correcting. Not everyone understands my humor. At least my code is far more understandable. +0

Your post has a few issues.

  1. Use the forum code formatter.
  2. STATE what your questions are.
  3. If the code is failing, supply what line it is and the error output.
  4. Share how you debug your code. I find that I use my IDE to break on that line and look at the variables in the call. Can you do this?
    If not why not add a line of code to print out the values for you to check.
Reverend Jim commented: While you were commenting on the code formatting I was busy correcting it ;-P +15

I created a simple Point of Sale program without database in Visual Studio 2008 (VB.NET) and I want to output the number of money bills that are needed to complete the change of the customer

This is the preview of my program -

In the image, at the bottom of the form, I put a panel and there's a label and text box inside.

I want to show how many 1000, 500, 100, 50, and 20, that is needed to complete the change.

see the image for the desired output.

Thank you for your help :)

*Sorry for my bad english

Public Class Form1

    Private Sub cmbProduct_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmbProduct.SelectedIndexChanged

        Select Case cmbProduct.Text
            Case "SAMSUNG"
                txtDate.Text = ""
                txtPrice.Text = ""
                cmbModel.Items.Add("SAMSUNG GALAXY J2 32GB")
                cmbModel.Items.Add("SAMSUNG GALAXY J5 32GB")
                cmbModel.Items.Add("SAMSUNG GALAXY J7 60GB")
                cmbModel.Items.Add("SAMSUNG GALAXY S5 60GB")
                cmbModel.Items.Add("SAMSUNG GALAXY S6 60GB")
                cmbModel.Items.Add("SAMSUNG GALAXY S8 120GB")
                cmbModel.Items.Add("SAMSUNG GALAXY S9 120GB")

            Case "CHERRY MOBILE"
                txtDate.Text = ""
                txtPrice.Text = ""
                cmbModel.Items.Add("CHERRY MOBILE FLARE S7")
                cmbModel.Items.Add("CHERRY MOBILE FLARE S7 PLUS")
                cmbModel.Items.Add("CHERRY MOBILE FLARE S7 PRIME")
                cmbModel.Items.Add("CHERRY MOBILE FLARE S7 DELUXE")
                cmbModel.Items.Add("CHERRY MOBILE FLARE X3")
                cmbModel.Items.Add("CHERRY MOBILE FLARE S8")

            Case "MYPHONE"
                txtDate.Text = ""
                txtPrice.Text = ""
                cmbModel.Items.Add("MyPhone myX1")
                cmbModel.Items.Add("MyPhone SuperD D1")
                cmbModel.Items.Add("MyPhone my35")
                cmbModel.Items.Add("MyPhone my36")
                cmbModel.Items.Add("MyPhone MyXI1")
                cmbModel.Items.Add("MyPhone my33")

            Case "XIAOMI"
                txtDate.Text = ""
                txtPrice.Text = ""
                cmbModel.Items.Add("Xiaomi Redmi Note 7 Pro")
                cmbModel.Items.Add("Xiaomi Redmi Note 7S")
                cmbModel.Items.Add("Xiaomi Redmi 7")
                cmbModel.Items.Add("Xiaomi Redmi Note 7")
                cmbModel.Items.Add("Xiaomi Redmi 7A")
                cmbModel.Items.Add("Xiaomi Redmi Note 7 Pro 128GB") ...
private void OnCaptured(CaptureResult captureResult)
            // Check capture quality and throw an error if bad.
            if (!_sender.CheckCaptureResult(captureResult)) return;
            DataResult<Fmd> resultConversion = FeatureExtraction.CreateFmdFromFid(captureResult.Data, Constants.Formats.Fmd.ANSI);
            SendMessage(Action.SendMessage, "A finger was captured.  \r\nCount:  " + (count));
            if (resultConversion.ResultCode != Constants.ResultCode.DP_SUCCESS)
                _sender.Reset = true;
                throw new Exception(resultConversion.ResultCode.ToString());
            if (count >= 4)
                DataResult<Fmd> resultEnrollment = DPUruNet.Enrollment.CreateEnrollmentFmd(Constants.Formats.Fmd.ANSI, preenrollmentFmds);
                if (resultEnrollment.ResultCode == Constants.ResultCode.DP_SUCCESS)
                    SendMessage(Action.SendMessage, "An enrollment FMD was successfully created.");
                    SendMessage(Action.SendMessage, "Place a finger on the reader.");
                    count = 0;
                else if (resultEnrollment.ResultCode == Constants.ResultCode.DP_ENROLLMENT_INVALID_SET)
                    SendMessage(Action.SendMessage, "Enrollment was unsuccessful.  Please try again.");
                    SendMessage(Action.SendMessage, "Place a finger on the reader.");
                    count = 0;
            SendMessage(Action.SendMessage, "Now place the same finger on the reader.");
        catch (Exception ex)
            // Send error message, then close form
            SendMessage(Action.SendMessage, "Error:  " + ex.Message);                

I tend to use but you didn't reveal what makes "best." For some that's cost and speed and to others it's an ISP that will setup your home/business network since not all of us can play network god.

I'm in SoCal and with TWC aka Spectrum and have none of the trouble you read about.

That said there are "communities" that only allow AT&T here so unless you use a cellular connection, you get AT&T. Strange how that is since it seems to fly in the face of this usually consumer sided state.

Maybe it does. The Enter character code might be 10 (ASCII) is 10 or 0x0a hexadecimal. Or it could be EOF which might be -1.

Now see what happens when your putchar that to the screen. It may not be what you expect at all.

Maybe you wanted the cursor to move to the beginning of the line and drop down a line. THAT would depend on the terminal and OS. Remember this all began back in 1969 so many new programmers stumble around this because they don't know the history. Or what the enter key is returning.

It's just how the designers of those two functions decided they should work.

HI, I'm just new to c (programming in general), and I am wondering why getche() echoes every character that I type but not 'Enter' key. Isn't 'Enter' key a character? And also, why does getchar() -which requires to press enter after typing a character- echo the 'Enter' along with the typed character (while it shouldn't because that 'Enter' is for finishing getchar() function)?

Here is the code for getchar() function-


The output I get is-


I want to know why it echoes 'Enter' key when pressed after a character? And why getche() doesn't (when pressed as a character)?

how am i supposed to find the best internet services in my area since i have recently shifted to california. im lookin for networking sites. please leme know if anyone can help me with it.??