Tag: java

0 votes
0 answers
32 views
No artigo de hoje vou apresentar a você 15 dicas muito boas da linguagem

   Atenção: nem todas dicas, especialmente os atalhos de código, v&at

avatar
asked 14 June, 2023
49 votes
7 answers
2K views
How does this milw0rm heap spraying exploit work?

I usually do not have difficulty to read JavaScript code but for this one I can’t figure out the logic. The

avatar
Robyn
0 1 0 9
asked 07 September, 2021
52 votes
1 answers
536 views
Why do ARM chips have an instruction with Javascript in the name (FJCVTZS)?

FJCVTZS is "Floating-point Javascript Convert to Signed fixed-point, rounding toward Zero". It is supported i

avatar
Majorie
0 1 0 9
asked 07 September, 2021
63 votes
5 answers
1.6K views
Why does Java switch on contiguous ints appear to run faster with added cases?

I am working on some Java code which needs to be highly optimized as it will run in hot functions that are inv

avatar
Kristopher
0 1 0 9
asked 07 September, 2021
57 votes
1 answers
2.7K views
Rounding BigDecimal to *always* have two decimal places

I'm trying to round BigDecimal values up, to two decimal places. I'm using BigDecimal rounded = va

avatar
Rufus
0 1 0 9
asked 07 September, 2021
60 votes
11 answers
2.4K views
How can I round down a number in Javascript?

How can I round down a number in JavaScript? math.round() doesn't work because it rounds it to the neare

avatar
Rufus
0 1 0 9
asked 07 September, 2021
57 votes
11 answers
887 views
JavaScript % (modulo) gives a negative result for negative numbers

According to Google Calculator (-13) % 64 is 51. According to Javascript (see this JSBin) it is -13. How do

avatar
Percy
0 1 0 9
asked 07 September, 2021
55 votes
25 answers
2.4K views
How to evaluate a math expression given in string form?

I'm trying to write a Java routine to evaluate math expressions from String values like: "5+3" "10-40" "(

avatar
Stacia
0 1 0 9
asked 07 September, 2021
66 votes
16 answers
1.9K views
How to round up the result of integer division?

I'm thinking in particular of how to display pagination controls, when using a language such as C# or Jav

avatar
Hilario
0 1 0 9
asked 07 September, 2021
62 votes
12 answers
2.4K views
JavaScript math, round to two decimal places

I have the following JavaScript syntax: var discount = Math.round(100 - (price / listprice) * 100)

avatar
Lashawna
0 1 0 9
asked 07 September, 2021
67 votes
21 answers
1.8K views
What is JavaScript's highest integer value that a number can go to without losing precision?

Is this defined by the language? Is there a defined maximum? Is it different in different browsers?

avatar
Keith
0 1 0 9
asked 07 September, 2021
52 votes
18 answers
1.6K views
How to perform an integer division, and separately get the remainder, in JavaScript?

In JavaScript, how do I get: The whole number of times a given integer goes into another? The remainder?

avatar
Dusty
0 1 0 9
asked 07 September, 2021
55 votes
30 answers
1K views
Fastest way to determine if an integer's square root is an integer

I'm looking for the fastest way to determine if a long value is a perfect square (i.e. its square root is

avatar
Margo
0 1 0 9
asked 07 September, 2021
51 votes
15 answers
1.7K views
Link and execute external JavaScript file hosted on GitHub

When I try to change the linked reference of a local JavaScript file to a GitHub raw version my test file stop

avatar
Margo
0 1 0 9
asked 07 September, 2021
49 votes
2 answers
824 views
How to call axios/api call in Nativescript application

I'm trying to build a small application on Nativescript-vue where I'm having backend laravel framewo

avatar
Nidia
0 1 0 9
asked 07 September, 2021
57 votes
1 answers
2.5K views
Attempted to assign to readonly property even though same command works elsewhere?

I have a Javascript function (in an Angular 2 NativeScript based mobile app) which is triggered on a button pr

avatar
Wilber
0 1 0 9
asked 07 September, 2021
65 votes
5 answers
558 views
Is there localstorage in nativescript?

How to share the data across the pages which resides in application.Can anyone tell about localstorage in nati

avatar
Adolfo
0 1 0 9
asked 07 September, 2021
47 votes
1 answers
1.2K views
iOS 3D Touch Support in Native Script

I want to utilize the 3D touch support in iOS through Native Script. Currently there is a Plugin for Quick act

avatar
Carmelina
0 1 0 9
asked 07 September, 2021
55 votes
1 answers
2.9K views
Adding a global variable / function in JavaScript (specifically NativeScript)

I'm learning how to write apps with NativeScript. I believe the best way to learn is by doing. For that r

avatar
Adolfo
0 1 0 9
asked 07 September, 2021
61 votes
2 answers
2.6K views
Testing NativeScript app with Appium

I am learning NativeScript. I am trying to write some automated tests with Jasmine. From my understanding, I c

avatar
Alba
0 1 0 9
asked 07 September, 2021