In 2014, it was not possible for JS code to access variables inside a closure from outside the closure. Since then, Chrome's internals have changed to use [[Scopes]] instead of Closure. Is it now (2018) possible for Chrome DevTools to read [[Scopes]] programmatically? If so, is there an existing DevTools extension that does so? Use case: inspecting variables inside a UMD module loaded using RequireJS. I know I can do this at a breakpoint or debugger statement using the Scopes panel, but would like to be able to do so even when I am not at a breakpoint. Edit As of 2017, it was not possible to a
I have a Pandas DataFrame with a named index. I want to pass it off to a piece off code that takes a DataFrame, a column name, and some other stuff, and does a bunch of work involving that column. Only in this case the column I want to highlight is the index, but giving the index's label to this piece of code doesn't work because you can't extract an index like you can a regular column. For example, I can construct a DataFrame like this: import pandas as pd, numpy as np df=pd.DataFrame({'name':map(chr, range(97, 102)), 'id':range(10000,10005), 'value':np.random.randn(5)}) df.set_index('name',
I am trying to create a Jeopardy app using React and React Table and I am stuck. I am trying to get the column headers to get filled in with the actual name of the category from the jeopardy API. The object fetched from the API looks like this: "id": 11111, "title": "papers", "clues_count": 5, "clues": where the title is the name of the category. That request is made 6 times, once for each column. Right now I have "category x" hardcoded as the value of the header for each column. I can't figure out how to get the title as the column header. My code is below (I know it's messy and needs refacto
Crossing with many existing questions related to my question, I post this. So don't comment this as duplicate and send duplicate answers my scenario is a little bit different. All solutions are related to javascript or jquery. But I want in Angular. I am using mdBootstrap, providing only the CDN link in index.html not installing it. I have a popup with tabs for login & Register. The problem is after entering credentials and click login modal is not closing(I don't want to put data-dismiss="modal") as it closes the modal without doing login functionality. I want both functions to be done, valid
I would like to use pywinauto to control an image processing software. First, I need to click a specific area (which is used for image dragging) to pop up a windows for path input. See the first figure. Then, I need to input a path and click the button "Select Folder". See the second figure. I tried: from pywinauto import Desktop, Application, mouse, findwindows from pywinauto.keyboard import SendKeys app = Application(backend='uia').start(r"C:\Program Files\Duplicate Photo Cleaner\DuplicatePhotoCleaner.exe") app.connect(path="DuplicatePhotoCleaner.exe") app.DuplicatePhotoCleaner.print_control
So, I'm currently using A system where I can manually say if the website is online or not; but I don't see this as "Efficient" because I won't be there 24/7. So I was wondering if there was a way to check if their website is online or not and then create a file on a server as soon as it goes down?
How can I grant only CREATE/ALTER permission for Procedures/Functions only, to specific users of database (Developers). I don't want to allow them to CREATE/ALTER/DROP tables or any other functionality. Is this possible?
I'm using Visual Studio Code to develop in PHP, and I've been having some trouble getting Code to provide the proper intellisense results. For example, this newly created Codeception unit test: <?php class MyTest extends \Codeception\Test\Unit { /** * @var \UnitTester */ protected $tester; protected function _before() { } protected function _after() { } // tests public function testSomeFeature() { $this->assertFalse(false); } } When I type $this-> I expect to see assertFalse, assertTrue, and all the other methods provided by \Codeception\Test\Unit. But what I get is basically whatever items ex
I try to make breadcrumb with Angular 6. Texts work but links doesn't work correctly. I want to do this. Home > Dashboard > Statistical ( It Works.) Home -> xxx.com (It works.) Dashborad -> xxx.com/dashboard (It works.) Statistical -> xxx.com/statistical (It doesn't work.) So, if it is subcomponent links don't work. It needs to be xxx.com/dashboard/statistical (Correct) How can i do this ? breadcrumb.component.ts import { Component, OnInit } from '@angular/core'; import { Location } from '@angular/common'; import { Router } from '@angular/router'; @Component({ selector: 'app-breadcrumb', templ
I am running my Spring Boot application but it gives me this error related with the EntityManagerFactory. Should I create my own EntityManager? Isn't it included in spring-boot-starter-data-jpa 2018-08-21 12:27:18.993 WARN 2728 --- [ main] s.c.a.AnnotationConfigApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'office365InstanceServiceImpl': Unsatisfied dependency expressed through field 'instanceRepository'; nested exception is org.springframewor
I am trying to create an excel formula that locates duplicate entries for an employee. Records are pulled from two different systems and then the data is dumped into excel. Below is an example of how the records look. If an employee performed the same task on the same day that is a duplicate. I've tried the index/match, index/match match, but it will only return the first duplicate (if it even works to do that). I have very little experience with arrays and I've been trying to figure those out to no avail - I feel like this should be easier than I'm making it?? Ideally would want it to return
I'm trying to migrate my legacy monolith to k8s, now I have nginx and php-fpm (with code) images and I want nginx to just serve http traffic and pass it to fpm, but nginx insist on having files, I don't have try_files directive, but it tries to find root and index files anyways. So is it at all possible to not mount source code to nginx, I really don't see why it should be there, but I couldn't find any working example nginx.conf: server { listen 80; index index.php; # This dir exist only in php-fpm container root /var/www/html/public; location ~* \.php$ { client_max_body_size 0; include fastc
I develop a program using ojAlgo library for computing matrix exponential. It includes eigen value decomposition. Does ojAlgo include multi-threaded algorithms ? For example is it possible to attach more than one thread to the decomposition task to reduce decomposition time? eigenvalue = Eigenvalue.PRIMITIVE.make(matrix); eigenvalue.decompose(matrix); //matrix dimension (3000x3000)
I am doing a project to monitor my virtual IED's with a SCADA system. However, the driver that i want to use to transmit information is MMS or GOOSE. So does ScadaLTS support IEC 60870-5-104 (MMS) and IEC 61850 (GOOSE)? If not, do you have any recommendation to mitigate this issue?
So I've been using Visual Studio Code (VS Code) for a while and working on my project with Git and had no problem. I was able to clone the git repository to a work space then I would see the "master" at the bottom left corner showing that I cloned a master branch and am working on the master branch. Then Normally I can click on it and select "Create new branch" and create my own branch such as "off_master". I don't know why, but since little over a week ago, when I clone a git repository, it downloads the files, but I don't see the the word "master" at the bottom left of VS Code. And when I cl
To create a mask, I use angular2 text mask. I can't figure out how to make an input mask for email. Tried so: public emailMask = [/[a-z]/, '@', /[a-z]/, '.', /[a-z]/ ] But nothing works. Adds only two characters one in front of the other behind. How can I make an input mask for e-mail (Other tools for masking on the angular 2+ are welcome).
So msgpack-c provides me with objects as arrays. Say I serialized a a C++ message alike this: template <class T> struct Message { std::vector<T> data; std::vector<int> shape; MSGPACK_DEFINE(data, shape); }; and had T == double. If deserialised to json in C++ it would have internals like [[1.23,3.01,44.02,33],[2,2]]. Now I want to deserialize it in C# with MessagePack-CSharp. If I try to turn it into json string I get an empty string, when I try var msg = MessagePackSerializer.Deserialize<List<List<double>>>(e.RawData); I get System.InvalidOperationException: code is invalid. code:0 format:posi
I would like to how to load/fetch the current database values for an entity ("force reload from database") with Entity Framework Core. My property looks like the following: [Column(TypeName = "decimal(16, 2)")] public decimal Fee { get; set; } If the Fee is saved with a higher precision than the one specified in the Column Attribute e.g. 1,2888 the Database round it to two decimal placed but the entity I save does not get Updated. So I tried to reload the values from the database to show the "correct current" values in this UI but neither of the following worked: // removed from tracked entiti
I know, there are several similar questions about that problem but I cant find any satisfying solution. Thats why I would like to reopen it here. I want to set the JSON serialization of Dates (java.util) in SpringBoot to ISO1806 format globally. I tried: add dependecy: com.fasterxml.jackson.datatype:jackson-datatype-joda set property: spring.jackson.serialization.write-dates-as-timestamps=false spring.jackson.date-format=yyyy-MM-dd'T'HH:mm:ss'Z' e.g. -didnt work. Still TimeStamps Also tried some other solutions but they didnt work or were deprecated or hacked etc... So how to solve it correctl
My dev team is currently setting up the environment for the updates on a proyect we've developing. I'm going straight to the point. In our DockerFile we are installing yarn with RUN npm install -g yarn But when executing an .sh file that empties cache files, we got the error: yarn error “EACCESS: permission denied, scandir '/root/.config/yarn/link'” I've looking up for possible fixes, and we only found a workaround which is to give full permissions to that directory: RUN chmode -R 777 '/root/ And we know this is highly not recommended. Does anyone know a better answer? I've seen tons of issues
I have deployed a private docker registry with vmware-harbor v1.5.0. Although it could work with most functions, such as login and pull/push images, but when I try to use [administration] -> [replications], an error of "authentication required" always accurred. following is the harbor replication error detail: 2018-08-06T06:57:41Z [INFO] initialization completed: repository: ops/test, tags: [3.4.11], source registry: URL-http://registry.xx.com insecure-true, destination registry: URL-https://registry-slave.xx.com insecure-false 2018-08-06T06:57:41Z [WARNING] the status code is 409 when creatin
NOT A DUPLICATE-please read carefully and understand the question.I don't want to replace the arrow. I want to keep the arrow as the way it is and change it's position. appearance:none can hide the arrow and by setting background:url() I may be able to replace the arrow,but that's not my question I have a dropdown list which appears good and works fine. We all know by default it adds a dropdown arrow at the right side of the dropdown list.Now what I want to do is to move the arrow bit lower to the position like margin-top:5px. But I can't find any pseudo elements or classes to write my code. I
I'm trying to run this code that I found online to figure out how to run C++ on Visual Studio Code but it keeps telling me "Please update your includePath. IntelliSense features for this translation unit... will be provided by the Tag Parser." as well as "could not open source file "iostream" (no directories in search list)". VC told me to download git and so I did. Its site also told me to download mingw-w64 and I did so. How do I edit includePath settings? Please keep in mind that I am a complete beginner to C++ but need to be able to use something for a class and was recommended VC. #includ
I have tried all things to align vertically an icon and a text, Code: <Danger color="secondary" style={{ flex:1,justifyContent: "center",alignItems: "center" }}> <ErrorOutline className={classes.warning} /> <text numberOfLines={1} style={{ textAlignVertical: "center" }}> The last job was canceled </text> </Danger> Things that I've tried : display, justifyContent, alignItems, flex, flexDirection, etc. Any advice? Thanks!
I am trying to insert spark DF to Postgres using JDBC write. The postgres table has a unique constraint on one of the columns, when the df to be inserted violates the constraint entire batch is rejected and spark session closes giving an error duplicate key value violates unique constraint which is correct as the data is duplicate (already exists in the database) org.postgresql.jdbc.BatchResultHandler.handleError(BatchResultHandler.java:148 What is needed that the data rows which do not violate the constraint be inserted and the failed row be ignored, without failing the entire batch. The code
I am running docker for windows on Windows 10 Enterprise edition. It runs successfully in windows container mode. When I do right-click on docker icon and "Switch to Linux Container", it keeps on switching and after some time, it throws the below error: error during connect: Get http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.38/containers/json: open //./pipe/docker_engine: The system cannot find the file specified. In the default daemon configuration on Windows, the docker client must be run elevated to connect. This error may also indicate that the docker daemon is not running. at Docker.Core.Pipe.
I have a problem with the video game that I am trying to create. The problem that I have is that, the song that I have made this one very strong and looking at the documentation I have seen that can form the volume, have applied this way of forming it without any result. Not if I have explained correctly... My code in typescript: export class SampleScene extends Phaser.Scene { private song: Phaser.Sound.BaseSound; public preload() { // TODO: Add your code this.load.audio('theme', 'assets/audio/sayrun.mp3'); } public create() { // TODO Add your code. this.song = this.sound.add('theme'); this.so
I've been working in Java Eclipse with a Maven project for school. I've been using Eclemma for code coverage data, but my professor wants to run my code from the command line and get a code coverage report from there. I've been trying to get Jacoco to work, but I really have never worked with Maven or Pom.xmls before and am pretty lost. Thise is what mine looks like at the moment <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersio
I am creating an excel file by using Excel4node package. by using this code // Require library var excel = require('excel4node'); // Create a new instance of a Workbook class var workbook = new excel.Workbook(); // Add Worksheets to the workbook var worksheet = workbook.addWorksheet('Sheet 1'); var worksheet2 = workbook.addWorksheet('Sheet 2'); // Create a reusable style var style = workbook.createStyle({ font: { color: '#FF0800', size: 12 }, numberFormat: '$#,##0.00; ($#,##0.00); -' }); // Set value of cell A1 to 100 as a number type styled with paramaters of style worksheet.cell(1,1).number(
I have been trying to install the command "make" in Windows but I couldn't. I tried with cygwin and GNU, but I think I am making something wrong somewhere. Can anyone give me some detailed steps please !