Discuss Scratch

Vaibhs11
Scratcher
1000+ posts

Java/JavaScript Topic

gvbvdxx wrote:

Desktop Sonic.
amazing
mybearworld
Scratcher
1000+ posts

Java/JavaScript Topic

gvbvdxx wrote:

i've been working on this, it uses javascript, node js (electron).
i name it Desktop Sonic.
Doesn't that exist already?
pkhead
Scratcher
1000+ posts

Java/JavaScript Topic

I made a javascript api for the lua api isn’t that great. I compiled the Lua run time to webassembly. Isn’t that neat
Mi4530
Scratcher
500+ posts

Java/JavaScript Topic

Hey! I am currently making PixelPaint in Java. Here is a screenshot (Click on the picture to see it in better quality)

I will add soon:
  • saving to a text file for further editing
  • adding other colors (There are only ten colors so far)
  • and something else
(I used a translator if that)
Mi4530
Scratcher
500+ posts

Java/JavaScript Topic

Is the topic dead?
Vaibhs11
Scratcher
1000+ posts

Java/JavaScript Topic

Mi4530 wrote:

Is the topic dead?
no

Last edited by Vaibhs11 (May 10, 2022 13:26:51)

XxDarqMidnightxX
Scratcher
100+ posts

Java/JavaScript Topic

Hi
Vaibhs11
Scratcher
1000+ posts

Java/JavaScript Topic

XxDarqMidnightxX wrote:

Hi
not again
Vaibhs11
Scratcher
1000+ posts

Java/JavaScript Topic

To the Java guys in this topic, how far is it from C? Both in functions, capability and difficulty
I want to learn java for absolutely no reason
pkhead
Scratcher
1000+ posts

Java/JavaScript Topic

Vaibhs11 wrote:

To the Java guys in this topic, how far is it from C? Both in functions, capability and difficulty
I want to learn java for absolutely no reason
Java is basically C++ but everything is in classes and has garbage collection.

int main(int argc, char* argv) is replaced with public static void main(String args)
(The entry point of a program is in the main method of a class)

Like modern C++, Java has a heck ton of standard libraries and classes.
std::vector is replaced with java.util.ArrayList
std::string is replaced with java.lang.String (Automatically imported since it is in java.lang)
Math functions are in java.lang.Math (Identical to JS math functions)
scanf is a class called java.util.Scanner. To create a scanner for stdin you write Scanner scanner = new Scanner(System.in)

stdout = System.out (System.out has a print function)
stdin = System.in (Use this with the Scanner class)
stderr = System.err

Java also has error handling. By default functions aren’t allowed to throw errors, so you have to write “throws ExceptionType1,ExceptionType2…” after the function declaration and before the function code boock. To make it able to throw any type of error, you write “throws Exception” (Exception is a class in java.lang)

Last edited by pkhead (May 10, 2022 14:05:03)

Vaibhs11
Scratcher
1000+ posts

Java/JavaScript Topic

pkhead wrote:

Java
thanks
Tigitaal
Scratcher
100+ posts

Java/JavaScript Topic

How to send a post request with a file in it to a file server.
I have 2 websites. 1 is my main website where you can upload stuff. This will be saved on my second website. I need my first website to post a xmlhttprequest to my fileserver website. Does anyone know how to do? I don’t have code yet.
pkhead
Scratcher
1000+ posts

Java/JavaScript Topic

Tigitaal wrote:

How to send a post request with a file in it to a file server.
I have 2 websites. 1 is my main website where you can upload stuff. This will be saved on my second website. I need my first website to post a xmlhttprequest to my fileserver website. Does anyone know how to do? I don’t have code yet.
Make it like a POST or PUT request in the request’s open function, and put the file data as an ArrayBufferView or Blob in the argument of the send function.
Mi4530
Scratcher
500+ posts

Java/JavaScript Topic

Why Java and Javascript are similar in name
Since the names “JavaScript” and “Java” are suspiciously similar to each other, it is quite logical to assume a certain relationship between these languages. To deal with this issue, let's turn to history, namely, an interview from 2008, in which the creator of JavaScript, Brendan Eich, participated. In it, the founder of JS confirms that the similarity of the two languages ​​in the name is the result of the signing of a license agreement between Netscape and Sun, with Sun being the developer of the Java language. The idea behind the agreement was for JavaScript to be an additional scripting language that comes with Java, a compiled language. Firstly, JavaScript and Java had to complement each other, so JavaScript got a similar syntax, and secondly, at that time Java was very popular, and therefore, developers, in order to attract more people to the language, decided to use a well-known word in the name and replaced Live in Java. This is how JavaScript was born. But similar in languages ​​only syntax, later, Java was used less and less on the Internet and the paths of the languages ​​diverged.
TheSmartGuy1234
Scratcher
1000+ posts

Java/JavaScript Topic

JAVASCRIPT ONLY!!!
Vaibhs11
Scratcher
1000+ posts

Java/JavaScript Topic

TheSmartGuy1234 wrote:

JAVASCRIPT ONLY!!!
Then why would this be a discussion? Scripts only would be boring. Even the OP doesn't “encourage” scripts only:

Arbiter1227 wrote:

Share source, help, and talk with other enthusiasts!
Mi4530
Scratcher
500+ posts

Java/JavaScript Topic

TheSmartGuy1234 wrote:

JAVASCRIPT ONLY!!!

Arbiter1227 wrote:

This is a Topic for all things Java (and JS).

Share source, help, and talk with other enthusiasts!

Permitted Languages:
  • Java
  • JavaScript
  • Node.js
mybearworld
Scratcher
1000+ posts

Java/JavaScript Topic

![]+([][(![]+[])[+!![]]+(!![]+[])[+![]]]+[])[!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]]+([][[]]+[])[+!![]+!![]+!![]+!![]+!![]]+(![]+[])[!![]+!![]+!![]]+([][(![]+[])[+!![]]+(!![]+[])[+![]]]+[])[!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]]+!![]
What do you think this evaluates to? “true is false”
Tigitaal
Scratcher
100+ posts

Java/JavaScript Topic

mybearworld wrote:

![]+([][(![]+[])[+!![]]+(!![]+[])[+![]]]+[])[!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]]+([][[]]+[])[+!![]+!![]+!![]+!![]+!![]]+(![]+[])[!![]+!![]+!![]]+([][(![]+[])[+!![]]+(!![]+[])[+![]]]+[])[!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]]+!![]
What do you think this evaluates to? “true is false”
Cool it's *
mybearworld
Scratcher
1000+ posts

Java/JavaScript Topic

Tigitaal wrote:

(#762)

mybearworld wrote:

![]+([][(![]+[])[+!![]]+(!![]+[])[+![]]]+[])[!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]]+([][[]]+[])[+!![]+!![]+!![]+!![]+!![]]+(![]+[])[!![]+!![]+!![]]+([][(![]+[])[+!![]]+(!![]+[])[+![]]]+[])[!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]]+!![]
What do you think this evaluates to? “true is false”
Cool it's *
Yeah you can't swear here

Last edited by mybearworld (June 20, 2022 16:13:07)

Powered by DjangoBB