276 questions
0
votes
1
answer
135
views
Why in JavaScript and so in other programming languages is not possible to do if (a==b==c) to compare 3 variable at once? [closed]
Why, objectively, in programming languages in general, as far as I know, isn't possibile to compare 3 variable at once doing something like this:
if(a == b == c)
{
do something;
}
but it is ...
1
vote
1
answer
465
views
When to use cleanup() in Jython
Is it necessary to call cleanup() before close() in a PythonInterpreter in Jython every time?
I've been reading the docs, but I don't find much information about this function. The javadocs don't say ...
-2
votes
1
answer
31
views
How to take screenshots of a web page and make a video of them using coding(any language)? [closed]
I have a table on my web-page with thousands of entries and it shows 20 entries at a time. I want to take screenshots of all the entries page by page and then create a video of them using code. What ...
0
votes
1
answer
259
views
Get only child LI when using "getElementsByTagName("li").length"
I am using below command to get the child LI nodes for the element ID 'treeview_sub' but it returns me the count of all the LI present recursively.
var treeLILength = document.getElementById("...
2
votes
1
answer
139
views
DLR: Put statement and declaration objects to CodeCompileUnit or CodeCompileUnit-like objects
IronRuby and IronPython have custom built-ins, standard modules and you can write code straight out of hand(Directly using statements and declarations in the code), instead of using namespaces and ...
0
votes
3
answers
669
views
How to have a global variable that has been read from a list that has filenames in bash?
I have one txt file that has bunch of class names.
I would like to read those class names line by line in bash script and assign that value to a variable to use it globally in another command in the ...
3
votes
3
answers
12k
views
Problem in JSR223 script, JSR223 PostProcessor : javax.script.ScriptException
I am using Jmeter 5.0 where i have piece of java code written inside a JSR223 PostProcessor. The code is as follows -
import java.util.Map;
import java.util.HashMap;
Map gamePlayHistoryMap = new ...
5
votes
1
answer
233
views
Translating a Gravity (a scripting language) call to a native C function call
I am currently looking into implementing a cleaner way to call native C functions from the Gravity scripting language.
So far, the most simplistic example would be this one:
int add(int lhs, int rhs)...
1
vote
1
answer
3k
views
PowerShell script to Get-RemotePrograms and export to .CSV for multiple AD computer object not working for bulk?
I need to export to .CSV for all computer with Microsoft Office installed, hence I've stumbled upon this script: https://gallery.technet.microsoft.com/Get-RemoteProgram-Get-list-de9fd2b4#content
...
0
votes
0
answers
363
views
List disabled AD account outside certain OU only and Export to .CSV
I need to modify the script below to List any AD User account that is disabled outside of the specific OU.
$filter = '(Enabled -eq $false)'
$ResultDirectory = 'C:\Disabled-ADAccountOutsideOU.csv'
$...
0
votes
0
answers
56
views
R studio doesn't recognize language
I'm trying to create a data frame from SQL query.
Some of the fields are become gibberish since they're not in english.
Any solution of how to fix this?
2
votes
2
answers
459
views
Sorting an array in perl and returning the result in one line
I am trying to sort an array in Perl from Z to A and return the sorted array in one line.
What I am doing is:
sub mainTexts {
my @texts = ();
print ("Enter text 1: ");
my $text1 = <...
0
votes
1
answer
60
views
simple python code wont convert string to float
I trying to write code to show how high a ball would go up from the calculation
however no matter how I type it, it keeps saying that it "cannot convert string to float" on the height varible
time = ...
0
votes
1
answer
122
views
Need some assistance in fixing the PowerShell formatting the Column export result to remove the SMTP: & smtp:?
I want to use the Replace string operation to make sure the result does not contain the SMTP: and smtp: string.
The below script export the list of the Disabled AD account with their corresponding ...
1
vote
1
answer
640
views
Unable to export list of external email recipient using Get-MessageTrackingLog as [email protected]?
I cannot export the list of the external recipient email address and its total number of email based on multiple inputs of the InternalSender.CSV list:
Email
[email protected]
Breville.May@...
1
vote
3
answers
3k
views
invalid arithmetic operator (error token is " ") with for loop
Following script
read n
for (( c=1; c<=$n; c++ ))
do
echo "HI"
done
gives error solution.sh: line 2: ((: c<=1: syntax error: invalid arithmetic operator (error token is "")
I am using BASH....
2
votes
1
answer
2k
views
How to Resume Python Script After System Reboot?
I'm still new to writing scripts with Python and would really appreciate some guidance.
I'm wondering how to continue executing my Python script from where it left off after a system restart.
The ...
1
vote
1
answer
436
views
Batch - Meaning of escaped vertical bar | before equal sign =
I am currently struggling understanding a line of an introduction to windows batch scripting:
SET /A errno=0
SET /A ERROR_SOMECOMMAND_NOT_FOUND=2
...
... SET /A errno^|=%ERROR_SOMECOMMAND_NOT_FOUND%...
-1
votes
3
answers
63
views
How to print specific section from a file if that section has the search keyword [BASH]
Below is a snippet of a file named "books.info":
TITLE and AUTHOR ETEXT NO.
Aspects of plant life; with special reference to the British flora, ...
0
votes
2
answers
155
views
Why isn't this bash script running?
Not sure why this script is throwing up random errors when I try to run it. Mainly in lines 1-10. It's mostly a compilation issue. It's throwing up errors for empty lines as well but I fixed it.
I'm ...
9
votes
2
answers
8k
views
Global and local recursive functions in lua
I am very new to lua and I would like to understand following behaviour.
When I try to run following recursion function:
local func = function ( n )
if n == 1 then return 1
else return n * func( ...
2
votes
1
answer
136
views
Do R programs always have an underlying C layer?
I have read that much of the functionality of R is done by C code that is called by R under the hood when an R program is run. Is this the case for every R program? Does this mean that every R ...
1
vote
1
answer
572
views
JMeter Script Engine which allow caching and compilation
JSR223 Sampler have a statement that Groovy is implementing Compilable interface different than other scripting languages and therefore is recommended
To benefit from caching and compilation, the ...
1
vote
1
answer
88
views
Understanding GameMonkey Script Mixed Arrays
I was just reading some introductory stuff from GameMonkey Script on https://www.gamedev.net/articles/programming/engines-and-middleware/introduction-to-gamemonkey-script-r3297/ and when they were ...
1
vote
1
answer
298
views
What's the scripting language that works best when binding with c++?
I am working on a project that heavily relies on many c++ objects that I created. In stead of compiling the codes every time when I use different objects, I am thinking using scripts that can ...