Discuss Scratch
- Discussion Forums
- » Things I'm Making and Creating
- » Java/JavaScript Topic
- mybearworld
-
Scratcher
1000+ posts
Java/JavaScript Topic
i've been working on this, it uses javascript, node js (electron).Doesn't that exist already?
i name it Desktop Sonic.
- 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
- Vaibhs11
-
Scratcher
1000+ posts
Java/JavaScript Topic
Is the topic dead?no
Last edited by Vaibhs11 (May 10, 2022 13:26:51)
- 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
I want to learn java for absolutely no reason
- pkhead
-
Scratcher
1000+ posts
Java/JavaScript Topic
To the Java guys in this topic, how far is it from C? Both in functions, capability and difficultyJava is basically C++ but everything is in classes and has garbage collection.
I want to learn java for absolutely no reason
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)
- 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.
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
How to send a post request with a file in it to a file server.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.
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.
- 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.
- Vaibhs11
-
Scratcher
1000+ posts
Java/JavaScript Topic
JAVASCRIPT ONLY!!!Then why would this be a discussion? Scripts only would be boring. Even the OP doesn't “encourage” scripts only:
Share source, help, and talk with other enthusiasts!
- Mi4530
-
Scratcher
500+ posts
Java/JavaScript Topic
JAVASCRIPT ONLY!!!
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
![]+([][(![]+[])[+!![]]+(!![]+[])[+![]]]+[])[!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]]+([][[]]+[])[+!![]+!![]+!![]+!![]+!![]]+(![]+[])[!![]+!![]+!![]]+([][(![]+[])[+!![]]+(!![]+[])[+![]]]+[])[!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]]+!![]
- Tigitaal
-
Scratcher
100+ posts
Java/JavaScript Topic
Cool it's *What do you think this evaluates to? “true is false”![]+([][(![]+[])[+!![]]+(!![]+[])[+![]]]+[])[!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]]+([][[]]+[])[+!![]+!![]+!![]+!![]+!![]]+(![]+[])[!![]+!![]+!![]]+([][(![]+[])[+!![]]+(!![]+[])[+![]]]+[])[!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]]+!![]
- mybearworld
-
Scratcher
1000+ posts
Java/JavaScript Topic
(#762)Yeah you can't swear hereCool it's *What do you think this evaluates to? “true is false”![]+([][(![]+[])[+!![]]+(!![]+[])[+![]]]+[])[!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]]+([][[]]+[])[+!![]+!![]+!![]+!![]+!![]]+(![]+[])[!![]+!![]+!![]]+([][(![]+[])[+!![]]+(!![]+[])[+![]]]+[])[!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]]+!![]
Last edited by mybearworld (June 20, 2022 16:13:07)
- Discussion Forums
- » Things I'm Making and Creating
-
» Java/JavaScript Topic
