npm ERR! Error: EPERM: operation not permitted

Uncategorized
Question: Running from a Windows Powershell as Administrator, I have tried all of the below. Nothing works. Not only that, it takes like 20 minutes to get to the error. Upgrading node Upgradeing npm Turning off AntiVirus Cleaning the mpm cache Verifying the npm cache Here is the output from trying to create a project:PS D:Documentsjs> create-react-app socket-io-client Creating a new React app in D:Documentsjssocket-io-client. Installing packages. This might take a couple of minutes. Installing react, react-dom, and react-scripts... > uglifyjs-webpack-plugin@0.4.6 postinstall D:Documentsjssocket-io-clientnode_modulesuglifyjs-webpack-plugin > node lib/post_install.js npm ERR! path D:Documentsjssocket-io-clientnode_modulesfseventsnode_modules npm ERR! code EPERM npm ERR! errno -4048 npm ERR! syscall rmdir npm ERR! Error: EPERM: operation not permitted, rmdir 'D:Documentsjssocket-io-clientnode_modulesfseventsnode_modules' npm ERR! { Error: EPERM: operation not permitted, rmdir 'D:Documentsjssocket-io-clientnode_modulesfseventsnode_modules' npm ERR! stack: 'Error: EPERM: operation not permitted, rmdir…
Read More

Unable to start up Confluence

Uncategorized
Question: I have a server with two atlassian product: jira and confluence. I've updated both of them but the confluence unable to start anymore with error message: java.net.BindException: Address already in use (Bind failed) The jira starts without any problem. The confluence's port 8090 and the jira's port 8070. I ran netstat to check the ports before startup. netstat -nap |grep :80 tcp 0 0 xx.xxx.xxx.xx:80 0.0.0.0:* LISTEN 606/nginx -g daemon tcp 0 0 xx.xxx.xxx.xx:80 yy.yyy.yyy.yy:53708 ESTABLISHED 609/nginx: worker p tcp6 0 0 127.0.0.1:8005 :::* LISTEN 738/java tcp6 0 0 :::8070 :::* LISTEN 738/java tcp6 0 0 xx.xxx.xxx.xx:8070 xx.xxx.xxx.xx:59576 TIME_WAIT - tcp6 0 0 xx.xxx.xxx.xx:8070 xx.xxx.xxx.xx:59575 TIME_WAIT - As I see there is nothing on 8090 port but it cannot start up. Here the logs and the server xmls:Confluence server.xml…
Read More

Dynamic title not displaying in POWERBI

powerbi
Question: I am new to PowerBI. I was trying to create a dynamic title for my POWERBI project. I went through some videos. All videos asks me to create measure. I did as the video suggested and the code that I put in was:Measure = IF(ISCROSSFILTERED('Dash_ER'[County]),"Visted county -" & FIRSTNONBLANK('Dash_ER'[County],TRUE()), "ER Utilization") I have a Tree map with different counties. When I click on one of the county I want the title to change to - Visited county - 'county name selected' and if none selected I want to print 'ER Utilization' as my title. I did this but nothing seems to happen. When I drag and drop the measure into the white area it just displays measure. When I click on ...(three dots) on top the box and clicked…
Read More

‘undefined index’ in PHP from radio button value sent via POST request?

php
Question: I think the ajax call is working. However, when I open the php page, it says undefined index:gender. HTML code below: Male Female ALL Ajax call:$(document).ready(function() { $(document).on('click', '#update', function() { var gender = $('input[type="radio"]:checked').val(); $.ajax({ type: "POST", url: "http://localhost:8888/link", data: { gender : gender } }); }) }) Basic update statement below:require("database.php"); $gender = $_POST["gender"]; $sql = "UPDATE interests SET genderChoice= ? "; $stmt = $dbCon->prepare($sql); $stmt->execute(array($gender)); Answer: First check if the form is posted liked this:if(isset($_POST["gender"]){ $gender = $_POST["gender"]; $sql = "UPDATE interests SET genderChoice= ? WHERE ... "; $stmt=$dbCon->prepare($sql); $stmt->execute(array($gender)); } This way the first time when you open the page you will not get any error. Only when you actually post the form your php code will check for gender. Read more
Read More

Angular4.0 ngOnDestroy is not triggered when components loaded/unloaded through ngSwitch

Uncategorized
Question: In our project, we show different components(load/unload) based on the ngSwitch case result as below, But it is noticed that ngOndestroy() is not getting triggered whenever the component is unloaded can you please assist if you have any idea on this? Basically, it is to hide and show the components within a page. The page is updated real time through web socket messages. Answer: Read more
Read More

simplify pandas dataframe after groupby operation

Uncategorized
Question: I have the foll dataframe as result of groupby operation:region year 1.0 2015.0 6.775457e+05 2016.0 6.819761e+05 2017.0 6.864065e+05 How can I convert it into the foll:region year val 1.0 2015.0 6.775457e+05 1.0 2016.0 6.819761e+05 1.0 2017.0 6.864065e+05 I tried using unstack() but that does not work Answer: You need reset_index for convert Series to DataFrame:df = df.groupby(['region', 'year'])['val'].sum().reset_index(name='val') print (df) region year val 0 1.0 2015.0 677545.7 1 1.0 2016.0 681976.1 2 1.0 2017.0 686406.5 Or if aggregate by sum, mean add parameter as_index=False:df = df.groupby(['region', 'year'], as_index=False)['val'].sum() print (df) region year val 0 1.0 2015.0 677545.7 1 1.0 2016.0 681976.1 2 1.0 2017.0 686406.5 Read more
Read More

Why the number of files shown in the computer folder and the mobile are not same?

Uncategorized
Question: I connected my mobile to the computer using USB and copied and pasted a folder from the mobile to the computer. To ensure everything was copies to the computer, I checked the size of the folder and the no. of files in it first in the mobile storage folder using Folder Properties and then checked the copied folder in the computer. The size was different and even the no. of files contained was also different by a small margin. What can be the reason for it? I repeated the procedure and still the no. of files and the size seemed different. Answer: can you list all the files in both the folders (computer and usb)? 'GET-CHILDITEM x: -FORCE -RECURSE' in powershell, where X: is the path of folder. Read…
Read More