Categories
Development Linux Ubuntu

Clam take long time

Clam took over than six hours to finish. Apparently should exclude some files/folders and increase buffer size. But which method is recommended in the context of Ubuntu 18.04. https://drive.google.com/open?id=15nRyF1vPH2dG9FBEYVBLKODwz5PHf8aG ClamScanFile

Categories
Development

activeClassName for links with similar urls

I have a list of links <NavLink className=”item” activeClassName=”item-active” to=”/url?filter=1″>filter 1</NavLink> <NavLink className=”item” activeClassName=”item-active” to=”/url?filter=2″>filter 2</NavLink> <NavLink className=”item” activeClassName=”item-active” to=”/url?filter=3″>filter 3</NavLink> My problem is that all links have the item-active classname. is there a way to make it more specific? thank you

Categories
Development GitHub

How to modify dom attributes in Angular js when using ng-change?

<table class=”table table-sm table-inverse table-responsive table-striped”> <thead> <tr> <th>SL No.</th> <th>Repository Name</th> <th>Active</th> </tr> </thead> <tr ng-repeat=”eachData in lstRepositoryData”> <td></td> <td></td> <td> <label class=”switch”> <input id=”activeRepositorySlider” ng-if=”eachData.active == true” type=”checkbox” checked ng-model=”eachData.active” ng-change=’change(eachData.active,””)’ dataid=”” dataurl=””> <input id=”inactiveRepositorySlider” ng-if=”eachData.active == false” type=”checkbox” ng-model=”eachData.active” ng-change=’change(eachData.active, “”)’ dataid=”” dataurl=””> <span class=”slider round”></span> </label> </td> </tr> </table> I am […]

Categories
Development

Confused from ‘overflow’ definition vs examples (W3Schools)

I am confused by the use of overflow: hidden; in this example (it is a part of ‘pure’ HTML/CSS navigation bars by W3Schools – whole part is here) Reading about overflow, in W3schools as well as other pages it’s always explicitly stated that: The overflow property only works for block elements with a specified height. […]

Categories
Development

Calendar.getTime IllegalArgumentException

import java.util.Calendar; public class WeekYear { static String input = “202001”; //static String format = “YYYYMM”; public static void main(String[] args) throws ParseException { Calendar lCal = Calendar.getInstance(); System.out.println(lCal.isLenient()); lCal.setLenient(false); lCal.set(Calendar.YEAR, new Integer(input.substring(0, 4)).intValue()); lCal.set(Calendar.WEEK_OF_YEAR, new Integer(input.substring(4, 6)).intValue()); //lCal.setMinimalDaysInFirstWeek(5); System.out.println(lCal.isLenient()); System.out.println(lCal.getTime()); //lCal.set(Calendar.YEAR, new Integer(input.substring(0, 4)).intValue()); //lCal.set(Calendar.WEEK_OF_YEAR, new Integer(input.substring(4, 6)).intValue()); //System.out.println(lCal.getTime()); } } When this code […]

Categories
Development

dotnet command hangs in linux container

I’m facing an issue with a container on an specific machine. I built an image that uses microsoft/dotnet:2.2-sdk and executes a dll in the container. My image locally is working. And in another linux vm it works too. But there is a third environment where the image use to work but now it just stop […]

Categories
Development HTTP

How to send string to ESP32 using http

My python code which should be sending the “message” import requests r = requests.post(‘http://192.168.0.100:7777′,data=”Hello”) print(r.text) My ESP32 code, I think that the problem is caused because of wrong url, since I’m not sure what IP should I be using there. Is it the IP of the machine where the python code is running ? Or […]

Categories
Development SQL System & Network

Trying to speed up copying some Sql data files between two VM Data Disks

I need to move my Sql Server data from the existing Azure data disk to a new one. When I try and copy the existing files from the ‘old’ Disk over to the ‘new’ Disk it says it will take about 10 1/2 hours. URGH. That seriously hurts. Yep – the picture does say that […]

Categories
Development Python

pandas Getting just the mean (float) value of one column when another column matches value in python

Lets say I have a simple table manufacturer marbles shape blah A 169 square yada B 140 round yada C 420 round yada C 380 square random D 400 round dontmatter D 222 square lkj D 89 round asdf this is imported into a pandas data frame with index being manufacturer. In this example I […]

Categories
Development

How are FLT_DIG, DBL_DIG, and LDBL_DIG determined in C [duplicate]

This question already has an answer here: Why floating-points number's significant numbers is 7 or 6 3 answers FLT_DIG, DBL_DIG, LDBL_DIG are the number of decimal digits that can be accurately represented by float, double, and long double types respectively. #include <stdio.h> #include <float.h> int main(void) { printf(“%d, %d, %d\n”, FLT_DIG, DBL_DIG, LDBL_DIG); return 0; […]