Latest Software Development Posts

I've started my b2b e-commerce website with Magento. Can anyone share with me popular Magento extension that you know or have tried for b2b ?
I've collected a list that I might need for my website.
Magento 2 Request For Quote - allows wholesale customers to request for quote when placing big orders
Magento 2 Wholesale Fast Order - help wholesale customers save time by allowing import CSV file to choose desired items and put them into shopping cart by only one click.
There might be many other effective extensions that I don't know, so please help me. Thank you!

My first thought was this would no longer work on today's PC. So much has changed that my bet is this may only work in old PC emulators like QEMU. Sure enough that appears to be going on here.

Read priors to cover this again.

I can't guess if you write this from scratch or copied someone else's work but I don't expect it to work today unless you find some over 10 year old hardware.

For masking, write the random numbers directly, not as ascii. Write with fwrite() so each number is buffered into large block writes. Note that RAND_MAX is just 31 bits:

/usr/include/stdlib.h:#define RAND_MAX 2147483647

You can write 3 bytes at a time to have pure randomness. Remember that the bytes you want are located at different ends on little-endian hosts like x86 and big-endian hosts like SPARC. The middle 2 bytes are safe!

I would think that, for masking old data, a random block of a handy size like 65536 would suffice, written over and over to make a large file. More masking on magnetic media takes more write passes with different random data.

Many write passes might shorten SSD life, but I do not think SSD data are possible to recover after a rewrite.

Depending on the file system, you may be limited to 4GB files, but just open a new file and keep on. Systems may get unstable if there is no space left on the primary disk partition, so automated deletes immediately at write error would be nice.

MosaicFuneral commented: Thanks man. That's legit good advice. +11

Here is my code

bits 16
ORG 0x7c00
VIDEO_TEXT_ADDR     EQU 0xb8000 ; Hard code beginning of text video memory
ATTR_WHITE_ON_BLACK EQU 0x07    ; White on black attribute
CR                  EQU 0x0d    ; Carriage return
LF                  EQU 0x0a    ; Line feed
; Include a BPB (1.44MB floppy with FAT12) to be more comaptible with USB floppy media
%include "bpb.inc"
boot_start:
    xor ax, ax                  ; DS=SS=0. Real mode code below doesn't use ES
    mov ds, ax
    mov ss, ax                  ; Stack at 0x0000:0x7c00 below bootloader
    mov sp, 0x7c00
    cld                         ; Set string instructions to use forward movement
    mov si, boot_init_msg       ; Print boot initialization message
    call print_string_rm
    cli                         ; Disable interrupts
    in al, 0x92
    or al, 2
    out 0x92, al                ; Enable A20 using Fast Method
    mov si, load_gdt_msg        ; Print loading GDT message
    call print_string_rm
    lgdt [gdtr]                 ; Load our GDT
    mov si, enter_pm_msg        ; Print protected mode message
    call print_string_rm
    mov eax, cr0
    or eax, 1
    mov cr0, eax                ; Set protected mode flag
    jmp CODE32_SEL:start32      ; FAR JMP to set CS
bits 32
start32:
    mov ax, DATA32_SEL          ; Setup the segment registers with data selector
    mov ds, ax
    mov es, ax
    mov fs, ax
    mov gs, ax
    mov ss, ax
    mov esp, 0x9c000            ; Set the stack to grow down from area under
                                ;     EBDA/Video memory
    xor eax, eax                ; Clear EAX for the instructions below
    mov al, [0x450]             ; Byte at address 0x450 = last BIOS column position
    mov [cur_col], eax          ; Copy to current column
    mov al, [0x451] ...

Haven't programmed in a long time. Last project was a GCODE pathway generator I wrote several years back. My compiler is obviously several years out of date.
Uses time(), itoa(), rand(). Current standard compliant compilers should have , , , and to_string() in suppliment to those more deprecated functions.

This is a very simple, high speed method of generatinga alot of randomized junk data onto your drive. Make sure you have about 300MB of RAM available for the overhead. An older non-SSD might croak.

Useful for making old files unrecoverable by overwriting the old space on a drive. Doesn't go about overwriting any file tables, partitions, etc. Only where the file system allows it to dump the files by defualt. So it's fairly safe, since you're not completely rewriting the disk.

nvm, my keys already are smooth enough XD
I am dumb, this is a dumb post, I facepalmed myself.

rproffitt commented: Smooth. Don't laugh. Optimizing too much is a thing. I was going to comment about something then I see you already did it so you're fine. Good going. +15

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;

    @Override
    public void start(Stage primaryStage) {
        groupS = new Group();
        mainS = new Scene(groupS, WIDTH, HEIGHT, Color.DARKBLUE);
        window = primaryStage;
        window.setScene(mainS);
        window.setTitle(TITLE);
        window.show();
        window.requestFocus();

        rect = new Rectangle();
        rect.setFill(Color.MEDIUMSPRINGGREEN);
        rect.setX(x);
        rect.setY(y);
        rect.setWidth(150);
        rect.setHeight(150);
        groupS.getChildren().add(rect);

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

            @Override
            public void handle(KeyEvent ke) {
                if(ke.getCode() == KeyCode.A) {
                    setVelX(-9);
                }
                if(ke.getCode() == KeyCode.S) {
                    setVelY(9);
                }
                if(ke.getCode() == KeyCode.D) {
                    setVelX(9);
                }
                if(ke.getCode() == KeyCode.W) {
                    setVelY(-9);
                }
            }
        });

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

            @Override
            public void handle(KeyEvent ke) {
                if(ke.getCode() == KeyCode.A) {
                    setVelX(0);             
                }
                if(ke.getCode() == KeyCode.S) {
                    setVelY(0);
                }
                if(ke.getCode() == KeyCode.D) {
                    setVelX(0);
                }
                if(ke.getCode() == KeyCode.W) {
                    setVelY(0);
                }
            }
        });

        final AnimationTimer at = new AnimationTimer() {

            @Override
            public void handle(long arg0) {
                x += velX;
                rect.setX(x);
                y += velY;
                rect.setY(y);
            }
        };
        at.start();
    }

    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) {
        launch(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.

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?

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, https://i.imgur.com/YgrRPQN.png

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 - https://ibb.co/R94400g

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"
                cmbModel.Items.Clear()
                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"
                cmbModel.Items.Clear()
                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"
                cmbModel.Items.Clear()
                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"
                cmbModel.Items.Clear()
                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") ...

Great! Well done.
JC

Nailed it :D

package com.VINSTORM.bleidorb.AudioWaveFormFX_V1.v_aa;

import javafx.application.Application;
import javafx.scene.Group;
import javafx.scene.Scene;
import javafx.scene.media.AudioSpectrumListener;
import javafx.scene.media.Media;
import javafx.scene.media.MediaPlayer;
import javafx.scene.paint.Color;
import javafx.scene.shape.Rectangle;
import javafx.stage.Stage;

public class AWF_FX_v5 extends Application implements AudioSpectrumListener {

    public final static String TITLE = "AWF special program";
    public final static short WIDTH = 1280;
    public final static short HEIGHT = 720;
    public static String AUDIO_FILE = "../mp3Music/Cynematic - Waterbased.mp3";
    public static String AUDIO_FILE1 = "../mp3Music/AcerDroid -Skies.mp3";
    public static String AUDIO_FILE2 = "../mp3Music/Capturez - Patterns.mp3";
    public static String AUDIO_FILE3 = "../mp3Music/Kanooli - Instinct.mp3";
    public static String AUDIO_FILE4 = "../mp3Music/RavenKreyn_InTheAir_NCSrelease.mp3";
    public static String AUDIO_URI = AWF_FX_v1.class.getResource(AUDIO_FILE1).toExternalForm();

    private Stage window;
    private Scene mainS;
    private Group groupS;
    private MediaPlayer audioMP;
    private float[] cMag;
    private short power = 5;

    private Rectangle[] rect = new Rectangle[40];

    @Override
    public void spectrumDataUpdate(double timestamp, double duration, float[] magnitudes, float[] phases) {
        for (int i = 0; i < magnitudes.length; i++) {
            cMag = magnitudes;
            cMag[i] = (int) cMag[i] * power;
            System.out.println("cMag (" + i + "): " + cMag[i]);
        }

        for(int i = 0; i < rect.length; i++) {
            rect[i].setY(500 + ((cMag[i] + (60 * power)) * -1));
            rect[i].setHeight(50 + (cMag[i] + (60 * power)));
        }
    }

    @Override
    public void start(Stage primaryStage) {
        groupS = new Group();
        mainS = new Scene(groupS, WIDTH, HEIGHT, Color.DARKBLUE);
        window = primaryStage;
        window.setScene(mainS);
        window.setTitle(TITLE);
        window.show();

        Media audioMedia = new Media(AUDIO_URI);
        audioMP = new MediaPlayer(audioMedia);
        audioMP.play();
        audioMP.setCycleCount(MediaPlayer.INDEFINITE);
        audioMP.setVolume(0.02);
        audioMP.setAudioSpectrumInterval(0.01);
        audioMP.setAudioSpectrumNumBands(40);
        audioMP.setAudioSpectrumListener(this);

        for(int i = 0; i < rect.length; i++) {
            rect[i] = new Rectangle();
            rect[i].setX(250 + (i * 20));
            rect[i].setY(500);
            rect[i].setWidth(10);
            rect[i].setHeight(50); ...

code without that comments lines:

package com.VINSTORM.bleidorb.AudioWaveFormFX_V1.v_aa;

import javafx.application.Application;
import javafx.scene.Group;
import javafx.scene.Scene;
import javafx.scene.media.AudioSpectrumListener;
import javafx.scene.media.Media;
import javafx.scene.media.MediaPlayer;
import javafx.scene.paint.Color;
import javafx.scene.shape.Rectangle;
import javafx.stage.Stage;

public class AWF_FX_v1 extends Application implements AudioSpectrumListener {

    public final static String TITLE = "AWF special program";
    public final static short WIDTH = 1280;
    public final static short HEIGHT = 720;
    public static String AUDIO_FILE = "../mp3Music/Cynematic - Waterbased.mp3";
    public static String AUDIO_FILE1 = "../mp3Music/AcerDroid -Skies.mp3";
    public static String AUDIO_FILE2 = "../mp3Music/Capturez - Patterns.mp3";
    public static String AUDIO_FILE3 = "../mp3Music/Kanooli - Instinct.mp3";
    public static String AUDIO_FILE4 = "../mp3Music/RavenKreyn_InTheAir_NCSrelease.mp3";
    public static String AUDIO_URI = AWF_FX_v1.class.getResource(AUDIO_FILE2).toExternalForm();

    private Stage window;
    private Scene mainS;
    private Group groupS;
    private MediaPlayer audioMP;
    private float[] cMag;

    private Rectangle[] rect = new Rectangle[8];

    @Override
    public void spectrumDataUpdate(double timestamp, double duration, float[] magnitudes, float[] phases) {
        for (int i = 0; i < magnitudes.length; i++) {
            cMag = magnitudes;
            cMag[i] = (int) cMag[i];
        }
        for(int i = 0; i < rect.length; i++) {
            rect[i].setY(310 + ((cMag[i] + 60) * -1));
            rect[i].setHeight(50 + (cMag[i] + 60));
            System.out.println(i + " setY: " + rect[i].getY());
            System.out.println(i + " setHeight " + rect[i].getHeight());
        }
    }

    @Override
    public void start(Stage primaryStage) {
        groupS = new Group();
        mainS = new Scene(groupS, WIDTH, HEIGHT, Color.DARKBLUE);
        window = primaryStage;
        window.setScene(mainS);
        window.setTitle(TITLE);
        window.show();

        Media audioMedia = new Media(AUDIO_URI);
        audioMP = new MediaPlayer(audioMedia);
        audioMP.play();
        audioMP.setCycleCount(MediaPlayer.INDEFINITE);
        audioMP.setVolume(0.02);
        audioMP.setAudioSpectrumInterval(0.01);
        audioMP.setAudioSpectrumNumBands(8);
        audioMP.setAudioSpectrumListener(this);

        rect[0] = new Rectangle(250, HEIGHT / 2 - 50, 50, 50);
        rect[0].setFill(Color.AZURE);
        rect[1] = new Rectangle(350, HEIGHT / 2 - 50, 50, 50);
        rect[1].setFill(Color.CORNFLOWERBLUE);
        rect[2] ...

This is what I right now have:
Right now I am facing how to make these rectangles make more reactive like they change about 60 pixels maximal higher and I want to make it more than 60 pixels. Now I don't have a question this is just an update for my code.

package com.VINSTORM.bleidorb.AudioWaveFormFX_V1.v_aa;

import javafx.application.Application;
import javafx.scene.Group;
import javafx.scene.Scene;
import javafx.scene.media.AudioSpectrumListener;
import javafx.scene.media.Media;
import javafx.scene.media.MediaPlayer;
import javafx.scene.paint.Color;
import javafx.scene.shape.Rectangle;
import javafx.stage.Stage;

public class AWF_FX_v1 extends Application implements AudioSpectrumListener {

    public final static String TITLE = "AWF special program";
    public final static short WIDTH = 1280;
    public final static short HEIGHT = 720;
    public static String AUDIO_FILE = "../mp3Music/Cynematic - Waterbased.mp3";
    public static String AUDIO_FILE1 = "../mp3Music/AcerDroid -Skies.mp3";
    public static String AUDIO_FILE2 = "../mp3Music/Capturez - Patterns.mp3";
    public static String AUDIO_FILE3 = "../mp3Music/Kanooli - Instinct.mp3";
    public static String AUDIO_FILE4 = "../mp3Music/RavenKreyn_InTheAir_NCSrelease.mp3";
    public static String AUDIO_URI = AWF_FX_v1.class.getResource(AUDIO_FILE2).toExternalForm();

    private Stage window;
    private Scene mainS;
    private Group groupS;
    private MediaPlayer audioMP;
    private float[] cMag;

//  private Rectangle rect0;
//  private Rectangle rect1;
//  private Rectangle rect2;
//  private Rectangle rect3;
//  private Rectangle rect4;
//  private Rectangle rect5;
//  private Rectangle rect6;
//  private Rectangle rect7;

    private Rectangle[] rect = new Rectangle[8];

    @Override
    public void spectrumDataUpdate(double timestamp, double duration, float[] magnitudes, float[] phases) {
        for (int i = 0; i < magnitudes.length; i++) {
            cMag = magnitudes;
            cMag[i] = (int) cMag[i];
            //System.out.println((i + 1) + ": " + (cMag[i] * -1));
        }
        for(int i = 0; i < rect.length; i++) {
            rect[i].setY(310 + ...

We had a long and very productive discussion about exactly this a few years ago. Here's the thread
https://www.daniweb.com/programming/software-development/threads/254810/find-the-differences-between-two-images-and-the-locations-of-the-differences
You need to read the whole thing to get the final answer.
JC

Hi
I am vishnu
i want to code in android java screen sharing android phone to pc like teamviewer
and help me give any idea

rproffitt commented: Idea: Do not bury your new question in 5+ year old discussions. -3

Still another improvement. I added a Web button. When you click on this, a randomly generated "evil" level puzzle is automatically downloaded from websudoku.com.

I also changes the Tile.py class to speed up Undo. Now it will only refresh tiles that have changed.

https://forums.xamarin.com/discussion/122355/building-xamarin-forms-app-for-ios-on-windows and other discussions tell us a lot.

This sounds like just the question for the Xamarin Forums.

I have an issue when building for iOS in Xamarin Studio:

I open Xamarin Studio and create a Single Project View App for IOS, I then run the project, but the project does not load onto the simulator all I get is the message

"Waiting for the debugger to connect to the iOS Simulator".

I have xcode installed on the machine.

Does anyone know how to solve this issue?

if I placed the class just in v7, the error is gone and the music can play, but if the class is inside of v7.v1 then I get that error.

Then just place the class in v7! Faffing around with IDEs just a distraction from learning a language or API.

ps: putting JavaFX code in init() is generally a bad idea. The JavaFX environment is not fully ready at that time. You are much safer ignoring init()and putting everything in start(...)

Now includes Help and About buttons and a status bar. When you click on Check, the tile, pane, row or column in error is highlighted in red. When you solve a puzzle not loaded from presets.txt you will be given the option of adding it to presets.txt.

It has been pointed out to me that in Python 3, the proper use of the super function is

[new version available. See next post]

super().__init__(etc

whereas the old form that I (in error) used was

super(ClassName, self).__init__(etc

Feel free to modify.

filesandprojectsIguess.PNG

that v7 -> v1 is not accidental. I just made a new package in v7.
if I placed the class just in v7, the error is gone and the music can play, but if the class is inside of v7.v1 then I get that error.

I got a error from this: "public static String AUDIO_URI = AWF_Core.class.getResource(AUDIO_FILE).toExternalForm();"
I made a new class, so the code looks more cleaner and readable.
but unfortunatly I don't know what happened?

I got a error:

Exception in thread "JavaFX Application Thread" Exception in thread "main" java.lang.ExceptionInInitializerError
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Unknown Source)
    at com.sun.javafx.application.LauncherImpl.lambda$launchApplicationWithArgs$2(LauncherImpl.java:352)
    at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$7(PlatformImpl.java:326)
    at com.sun.javafx.application.PlatformImpl.lambda$null$5(PlatformImpl.java:295)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sun.javafx.application.PlatformImpl.lambda$runLater$6(PlatformImpl.java:294)
    at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
    at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
    at com.sun.glass.ui.win.WinApplication.lambda$null$3(WinApplication.java:177)
    at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException
    at com.VINSTORM.bleidorb.AudioWaveFormFX_V1.v7.v1.AWF_Core.<clinit>(AWF_Core.java:18)
    ... 11 more
java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at sun.launcher.LauncherHelper$FXHelper.main(Unknown Source)
Caused by: java.lang.NullPointerException
    at com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:383)
    at com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:328)
    ... 5 more

this is how my project folders looks like in the navigator.

filesandprojectsIguess.PNG

here is my new code:

package com.VINSTORM.bleidorb.AudioWaveFormFX_V1.v7.v1;

import javafx.application.Application;
import javafx.scene.Group;
import javafx.scene.Scene;
import javafx.scene.media.AudioSpectrumListener;
import javafx.scene.media.Media;
import javafx.scene.media.MediaPlayer;
import javafx.scene.paint.Color;
import javafx.stage.Stage;

public class AWF_Core extends Application implements AudioSpectrumListener {

    public final static String TITLE = "AWF special program";
    public final static short WIDTH = 1280;
    public final static short HEIGHT = 720;
    public static String AUDIO_FILE = "../mp3Music/Cynematic - Waterbased.mp3";
    public static String AUDIO_URI = AWF_Core.class.getResource(AUDIO_FILE).toExternalForm();

    private Stage window;
    private Scene mainS;
    private Group groupS;
    private static MediaPlayer audioMP;

    @Override
    public void spectrumDataUpdate(double timestamp, double duration, float[] magnitudes, float[] phases) {
        System.out.println("data updated");
        displayMag(magnitudes);
    }

    public void displayMag(float[] mag) {
        for(int i = 0; i < mag.length; i++) {
            System.out.println(i+": " + mag[i]);
        }
        System.out.println("length of mag = " + mag.length);
    }

    public void init() {
        Media audioMedia ...

Hi, welcome back.

I haven't done this myself, but my gut tells me that a recursive solution is the way to go. I probably woudn't try to do too much with split because that doesn't have enough context. I'm thinking maybe build the object graph directly from the json, eg more like:

take everything between the opening bracket and the first matching close bracket: this will be an object. (loop this for any remaining brackets)
split at the first colon - that gives name and a list of member values (discard the enclosing brackets)
take up to the first comma ( loop doing this until there are no more commas)
if the value starts with an open bracket this is a new object: use the name to create a new instance of that class and recurse to get a whole object
otherwize its a primitive value and the name is the variable name: set the instance variable to the value

(don't take that too literally, it's straight off the top of my head. Just a way of thinking about it, thats all)

Hi, sorry been caught into other things on the way.
I've tried to get my head around this again, I'm still in the splitting string phase and I can get this {"Product":{"id":2,"name":Product_2}} to be split into this array of strings

{"Customer":{"id":1
"name":Customer_1}}

But I don't seem to be able to split it any further without getting into issues, ideally I'd like to get to this array of strings instead:

  {"Customer":
  {"id":1
  "name":Customer_1}}

So the methods doing the splits are these

private void parseResponse(String generateJsonResponse) {
        //System.out.println(generateJsonResponse);
        String[] splitObjects = splitObject(generateJsonResponse, ",", 0);

        for(int i = 0; i < splitObjects.length; i++) {          
            System.out.println(splitObjects[i]);
        }           
    }

    private String[] splitObject(String generateJsonResponse, String delimiter, int limit) {        
        String[] split = generateJsonResponse.split(delimiter, limit);

        for(int i = 0; i < split.length; i++) {
            //System.out.println(split[i]);
//          if(split[i].indexOf(':') != -1) {
//              split = splitObject(split[i], ":" , 0);             
//          }       

            //TODO turn into a collection and back into array

            //System.out.println(split[i]);
        }
        TreeSet<String> splitString = new TreeSet<String>(Arrays.asList(split));
        //HashSet<String> splitString = new HashSet<String>(Arrays.asList(split));
        for(String currentString : splitString) {
            //System.out.println(currentString);
        }
        return split;       
    }   

(everything gets copied into TreeSet to avoid duplicates) but the moment is try to split the string even further using the ":" as delimiter and uncommenting this code in splitObject method

if(split[i].indexOf(':') != -1) {
    split = splitObject(split[i], ":" , 0);             
}

then I get only a partial string

{"Customer"
{"id"
1

SO essentially what I'm trying to do there is to split the string first at the "," delimiter, which works, but then I need to ...