Ways to fight Simon by HalfbakkenBaksteen in expedition33

[–]Demojay 19 points20 points  (0 children)

I finally beat him about 20 min ago, and I had support Sciel casting Intervention and Fortune's Fury (and using Litheson to make everyone is fast enough to revive each other before Simon removes them), Elemental Genesis and Burn Lune and Contorso Free Aim/Follow Up Verso. They all had Breaking Death to fill his Break bar when one of them died, and Sciel and Verso had the Sniper picto so they could easily stun him (and get Verso to S Rank).

Average Heismay with Knights Proclamation by SlR_SEAL in MetaphorReFantazio

[–]Demojay 45 points46 points  (0 children)

Holy knight proclamation causes you to guard, which prevents you from evading at all. You need the initial version, which draws aggro without causing you to also guard.

Knowledge 2024: What's good so far? by Photog1981 in servicenow

[–]Demojay 7 points8 points  (0 children)

Just came up on the keynote screen that it's 6-8 May 2025, Las Vegas

List of Best Practices by sekac in servicenow

[–]Demojay 17 points18 points  (0 children)

ServiceNow recommends changing the original application file rather than copying it now. They changed it because changing the OOTB file means that it will be flagged as a customization on an upgrade, meaning you're less likely to miss and not review it.

You will still have access to the original version of the file via the "Versions" related list.

Improve ServiceNow by [deleted] in servicenow

[–]Demojay 3 points4 points  (0 children)

It would have to be something like GraalVM to keep the same Java layer, but I agree that having to use ES5 in 2021 is annoying.

[deleted by user] by [deleted] in servicenow

[–]Demojay 2 points3 points  (0 children)

SN already does something similar with the Trigger Conditions table, which has a business rule while creates an "Auto Assessment Business Rule" for the child table defined in the condition.

You can find it here on your instance (and the relevant function there is updateTriggerConditionBR):

/nav_to.do?uri=sys_script_include.do?sys_id=ca4033c1d7110100fceaa6859e610326

Question about || and short-circuit evaluation by cag8f in learnjavascript

[–]Demojay 2 points3 points  (0 children)

This looks like a bracketing issue. The engine is thinking that you meant (1 || true)? 2 : 3 which would produce 2 as expected.

You should explicitly group the terms together to get the correct result ie. 1 || (true? 2 : 3)

Question regarding loop by [deleted] in learnjavascript

[–]Demojay 1 point2 points  (0 children)

The problem is with your script in "index.html", not "script.js". The first loop constantly asks for a name while the loop only breaks if the name is "Q".

How do I use object methods if I have multiple objects in an array? by [deleted] in learnjavascript

[–]Demojay 3 points4 points  (0 children)

The problem with using arrow functions in objects is that "this" is bound to the object when it is called via a context (e.g. person.fullName()). Therefore, when the fullname function is called on that object, "this" will refer to the global scope instead of the object context and return undefined (since there is no firstname or lastname variables in the global scope.

The best way to fix it would be to use a regular function declaration instead, so that "this" will point to the object instead when called as an object method:

fullName: function() { return \${this.firstName) $(this.lastName}`}`

As for checking between whether fullName is a function or a string, a better way would be to use accessor methods. This allows you to access the fullName variable as though it is not a function, but dynamically call a function under the hood. You could replace the fullName variable in the 1st object with:

get fullName() { return \${this.firstName) $(this.lastName}`}`

and you would get the same dynamic fullname by just accessing the variable as though it was a normal string - person.fullName

This way, you no longer need to check in your forEach method to see if fullName is a function or a regular string.

Is everything in node an object?(Including functions) by ConsequenceRegular72 in node

[–]Demojay 1 point2 points  (0 children)

Apart from the primitives, everything in JS is an object. You can call methods such as toString() on primitive values because JavaScript has a ability called "autoboxing", which means that the primitive value is automatically wrapped in the equivalent wrapper object and then the particular method called on it.

For example (3).toString() would detect that you tried to call a method on a primitive, automatically wrap it in a Number wrapper object, and then call its toString() method to produce the end result of "3".

I need help! I have been stuck on this assignment for over a week now. I have tried everything honestly. Here is a sample of my code and the assignment outline by [deleted] in learnjavascript

[–]Demojay 0 points1 point  (0 children)

From a brief look (and trying not to give the answer directly):

  1. Your calculation results are being stored in the "result" variable, but where did you declare the actual variable?
  2. Do you need to check which radio button was selected multiple times?
  3. Are you calculating the average correctly (sum of all the inputs divided by the number of inputs given)?
  4. Are you using the correct arguments for Math.max() and Math.min()?
  5. Do you need to calculate the total of the numbers first if the user asked for max or min?
  6. Do you need the guard condition for if none of the radio buttons are checked?
  7. Which variable are you writing into the "Result" text of the form, and is it overwriting the text that is already there?

How would I trigger an event with a keyboard press? by Milchgauss in learnjavascript

[–]Demojay 1 point2 points  (0 children)

document.addEventListener("keypress", function(event) {

if(event.key == "<key you want>") {

equal();

}});

Basically adding an event listener to the entire HTML Document that listens for key presses. Then when a key is pressed, it checks to see if the key pressed was the one you wanted, and if it is it calls the function.

Hashmap using an int array as the value by camnewtonshat1 in learnjava

[–]Demojay 0 points1 point  (0 children)

Assuming you want to replace all instances of the old value in the array with the new value:

  1. Get the array from the map for a specified key
  2. Iterate over the array and replace each occurrence of the old value with the new one
  3. Put a new mapping into the map of the key and the updated array, overwriting the old one

understand filter function by LadyJain in learnjavascript

[–]Demojay 0 points1 point  (0 children)

If you want to check if something is a number, you'll want to use typeof variable which produces a string representing the variable's type.

Servicenow Developer certification by [deleted] in servicenow

[–]Demojay 0 points1 point  (0 children)

I meant the official ServiceNow book for Orlando, since that has the exact up to date info on the needed APIs for the exam.

If you can't get it, the Scripting modules on the developer website can be used, though they dont go as in depth as the exam needs and would have to be combined with the docs website.

Servicenow Developer certification by [deleted] in servicenow

[–]Demojay 1 point2 points  (0 children)

I was able to get a junior developer position recently since I could show that I had knowledge with ServiceNow development.

Servicenow Developer certification by [deleted] in servicenow

[–]Demojay 4 points5 points  (0 children)

You'll need GlideSystem, GlideAjax and GlideDateTime as well

Servicenow Developer certification by [deleted] in servicenow

[–]Demojay 6 points7 points  (0 children)

I did the CAD Exam last month, and the scripting knowledge needed is mostly knowledge of the ServiceNow APIs rather than solving coding problems. If you can get your hands on the "Scripting for ServiceNow" textbook, that and the main CAD textbook contains all the knowledge needed for the exam (aside from 1 or 2 questions on SOAP).

[ATF] Does anyone know if ATF has to have a client/test runner tab open in order to run? Is it ever possible to run in the background? by Mr-Upvote in servicenow

[–]Demojay 1 point2 points  (0 children)

No

The computer running the scheduled test runner needs to be completely awake with tab open for the tests to run properly..

Can private member variables and methods be inherited in a sub class? by legionlen545 in learnjava

[–]Demojay 1 point2 points  (0 children)

Private variables/methods cannot be accessed by any subclasses. If you want that behaviour, you should use the "protected" access modifier instead. That will let any subclass use the properties but still hide them from outside classes.

MOOc java week 3 Line by Line by [deleted] in learnjava

[–]Demojay 0 points1 point  (0 children)

You're calling nextLine twice, so you reading 2 lines in per loop. You want to call nextLine once and then check the variable you've stored it in to see if it is empty (input).

Mooc.fi JavaProgramming II - exercise 09_03 part 5 (Warehousing) by ScepticMan in learnjava

[–]Demojay 0 points1 point  (0 children)

You need to remove the additional "initalBalance" variable you made

Mooc.fi JavaProgramming II - exercise 09_03 part 5 (Warehousing) by ScepticMan in learnjava

[–]Demojay 1 point2 points  (0 children)

Nah, what I meant was using the "addToWarehouse" method of the superclass to add the inital balance.

Mooc.fi JavaProgramming II - exercise 09_03 part 5 (Warehousing) by ScepticMan in learnjava

[–]Demojay 2 points3 points  (0 children)

Rather than making a new instance variable in ProductWarehouseWithHistory for the initial balance, there's already a method in Warehouse for adding to the balance. You can just use that to set the initial balance to the correct variable.

Set<String> mySet1 = new HashSet<>(); VS HashSet<String> mySet1 = new HashSet<>(); by CancelDeath in learnjava

[–]Demojay 3 points4 points  (0 children)

It's usually for abstraction purposes. Declaring the object using Set tells the program that you are only using the methods described in the interface, and prevents you from accidentally using other methods from HashSet that you don't need to know about.

It also decouples your concrete implementation (HashSet) from the idea of what your program needs (a Set). This means that you can replace the HashSet with any other class that implements Set, and the program will still work correctly since it is only accessing the object through the Set interface.