2,955
questions with no upvoted or accepted answers
10
votes
0
answers
3k
views
Scope of inline-svg elements' id='x' and <use xlink:href='#x' />
When having multiple inline svg in my document I have noticed that using <use xlink:href="#id"/> will reference the first defined element with id="id", even when defined in another inline svg.
...
9
votes
0
answers
1k
views
Safari bug with block scoped variables?
I was testing if block scope can be used to replace IIFEs to create "private" variables through closures. It was going well until tested in Safari 11.0.3 (11604.5.6.1.1), which supports block scope, ...
9
votes
0
answers
5k
views
Chrome Devtools: all watches not available
I get errors working with Swagger-ui, and trying to figure out the cause by using Chrome built-in JavaScript debugger.
I set some watches, but, strangely, <not available> is output instead of ...
7
votes
0
answers
857
views
Why is Vuetify CSS applying outside of the Vue instance?
We are using Vuetify in a VueJS 2 app.
This Vue app is used inside another web application which doesn't use Vue.
However the CSS of Vuetify is leaking out of the Vue app. This causes the Vuetify CSS ...
7
votes
1
answer
229
views
Repeated DBI connect does not work with lexical variable in Perl 5.24.0
When I switched my perl environment from 5.16.0 to 5.24.0 I got a strange behavior that I cannot understand. This code
use DBI;
my $conn = 'dbi:ODBC:sqlserver_xxxx';
my $userid = 'dw_select';
...
7
votes
1
answer
663
views
A "safe place" to eval trusted code in Javascript (with specific context)? [Edit: how can you break it?]
Don't judge me yet on the title, I know eval is evil, but there are reasons I do it that way, and it will be very limited. Here is the thing: I want to create a safe space where i can run specific (...
6
votes
1
answer
1k
views
Handling uninitialized or erroneous Redis connection on AWS Lambda
My Scenario
I'm trying to utilize the global scope of Node.js to initialize a database connection once, and use the initialized connection when the lambda function is invoked.
This can save a lot ...
6
votes
1
answer
3k
views
Caret position in textarea with AngularJS
I am asking myself if I am doing it right. The problem I have is that I want to preserve caret position after AngularJS update textarea value.
HTML looks like this:
<div ng-controlle="...
6
votes
0
answers
2k
views
CDI @Conversation not propagated with handleNavigation()
I have a problem with the propagation of a long running conversation when I redirect the view by the handleNavigation() method. Here is my test code:
I have a conversationscoped bean and two views:
...
6
votes
2
answers
4k
views
how to create REAL global object in v8?
I used v8 engine to create a program , it can run JS codes like :
alert('test'); // alert function is created in C++ and set global to v8 context. so it can be run.
window.name = 'aa'; // window ...
5
votes
1
answer
2k
views
Converting Pytorch model to Keras using ONNX
I want to convert a pytorch model to keras using onnx based on this medium article:
https://medium.com/analytics-vidhya/pytorch-to-keras-using-onnx-71d98258ad76
I reproduced the same code as this ...
5
votes
0
answers
139
views
How does JS declare variables and functions without lexical scope in a statement block?
var a;
{
function a() {}
a = 60;
console.log('1: ', a);
}
console.log('2: ', a);
var b;
{
b = 60;
function b() {}
console.log('3: ', b);
}
console.log('4: ', b);
...
5
votes
1
answer
17k
views
What value should I give the scope attribute in my manifest.json file when serving a Progressive Web App from a local IP address with a port number?
I am having a problem with web app manifest scope on my local Node JS test server. I cannot get the correct scope because the port number on the IP address gets in the way. I am accessing my server ...
5
votes
0
answers
743
views
Guice and VertX injectable request context available throught the application
I have been trying to learn ins and outs of VertX Web framework for the past couple of months.
I have however came across a problem which I thought would be easily solvable - but to this day I haven'...
5
votes
1
answer
351
views
Registering Variables and Functions Declarations in Java Script
I was watching a video on javascript scopes which said that just before browser interprets java script code, it actually involves a quick compilation step(well not exactly 'compilation' so to speak ...