on-internet

There is no package called devtools in R even after installing devtools

I am trying to follow this guide to get R as a usable language in jupyter notebook. The first step is to run: install.packages(c('repr', 'IRdisplay', 'evaluate', 'crayon', 'pbdZMQ', 'devtools', 'uuid', 'digest')) But even after running this command, I still cannot execute the next step: devtools::install_github('IRkernel/IRkernel') returning the error: Error in loadNamespace(name) : there is no package called ‘devtools’ If you look at the comment section of the link I posted someone else seems to also have run into this problem. Update: Scott Richie suggested I rerun install.packages('devtools

Join the discussion →

Set up Neovim integration in VS code

Currently a (neo)vim user, I read that VS Code supports neovim backend integration, but after searching I cannot find how to set it up. How to set up neovim integration in VS Code? I use both linux and windows so if there are some OS specifity you could mention it.

Join the discussion →

Can i enable Group Policy to Launch an App as an Admin?

I want all my users to run an App as admin by default. So when the app launches, the Credentials box will not appear to enter an Admin Domain Account. so basically I would like to whitelist the app (if that's the correct terminology?) Is there a Group Policy setting to enable a specific app to run as Admin? Or set the app up to launch as Admin? For arguments sake, I would like to run the Notepad app as Admin for all my users so they can edit some Admin Text files. Thanks,

Join the discussion →

JSch Socket timeout - Connection timeout

I am trying to establish an SFTP session using JSch. The code is working correctly and I am able to establish a session with multiple servers. However, today I am encountering an issue with one of the server. Caused by: com.jcraft.jsch.JSchException: java.net.ConnectException: Connection timed out: connect at com.jcraft.jsch.Util.createSocket(Util.java:349) ~[jsch-0.1.54.jar:?] at com.jcraft.jsch.Session.connect(Session.java:215) ~[jsch-0.1.54.jar:?] at com.jcraft.jsch.Session.connect(Session.java:183) ~[jsch-0.1.54.jar:?] After debugging, I see that the issue is happening in Session.class. tm

Join the discussion →

openpyxl: password protect entire excel file (xlsx)

I am trying to find pythonic ways to encrypt/password-protect excel xlsx files. Came across openpyxl, where in their documentation (https://openpyxl.readthedocs.io/en/stable/protection.html) states that it can do so. However, an error message AttributeError: 'NoneType' object has no attribute 'workbookPassword' is prompted when I executed the following. Help anyone? from openpyxl import workbook file = 'test.xlsx' // an existing xlsx wb = load_workbook(filename = file) wb.security.workbookPassword = 'test_password' wb.security.lockStructure = True Edit: I believe I have used the function impro

Join the discussion →

How can I implement interrupt for serial USART communication for ATmega328P/Arduino Nano?

I have a small project for school that requires me to load data in the EEPROM of an ATmega328P through the USART serial communication. I'm going to figure out the EEPROM read/write myself. I have problems sending data using interrupts. Basically, I want to have the Arduino Nano loop through code and when I send something through the USART serial communication using the serial monitor of the Arduino IDE, an interruption will occur and the data that was send will be saved in a variable. My clock is 16 MHz, with a baud rate of 9600; and as I've said I'm using the Arduino IDE. Here is what I've tr

Join the discussion →

Convert Microsoft Word document to PDF using Python

I have tons of Word and Excel files. I want to convert many Word files in folders by sub folders to PDF, and I try following code. This code is not active (I mean there aren't Word convert to PDF) although no error. What could be the problem? Is there another solution? This is my code: import os from win32com import client path = 'D:\programing\test' word_file_names = [] word = client.DispatchEx("Word.Application") for dirpath, dirnames, filenames in os.walk(path): print (dirpath) for f in filenames: if f.lower().endswith(".docx") and re.search('Addendum', f): new_name = f.replace(".docx", r".

Join the discussion →

Time zones `Etc/GMT`, why is it other way round?

Time zones in php work like this https://www.gsp.com/support/virtual/admin/unix/tz/gmt/ and when it named Etc/GMT+11 it actually GMT-11 and when it named Etc/GMT-11 it actually GMT+11 Why? And what does it mean Etc/GMT? I find it in PHP, is it a bug in PHP or is it everywhere?

Join the discussion →

Time zones `Etc/GMT`, why it is other way round?

Time zones in php work like this https://www.gsp.com/support/virtual/admin/unix/tz/gmt/ and when it named Etc/GMT+11 it actually GMT-11 and when it named Etc/GMT-11 it actually GMT+11 Why? And what does it mean Etc/GMT? I find it in PHP, is it a bug in PHP or is it everywhere?

Join the discussion →

How to make post request in apache camel rest

I am new apache rest dsl with spring boot, have made following changes Main Class package com.javaoutofbounds.pojo; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication(scanBasePackages = {"com.ccs.batchfile"}) public class BatchFileApplication { public static void main(String[] args) { SpringApplication.run(BatchFileApplication.class, args); } } Service class package com.ccs.batchfile.service; import org.apache.camel.builder.RouteBuilder; import org.apache.camel.model.rest.RestBindingMode; import org.spr

Join the discussion →

Hide/Show side editor in VS Code?

I love the editor splitting in VS Code. But I'm also used to Xcode, where the Assistant Editor can be opened/closed, or rather hidden/shown, maintaining what it last showed. (okay technically that may not be true but just imagine it is, or just ignore that and move on with my actual question haha) Could I possibly hide/show side editors without closing and then having to reopen all their tabs? Like say I have File A on the left and File B on the right and I want to focus on just A, so I want to hide B on the right but then be able to show it again without having to explicitly select File B and

Join the discussion →

How can I disable webRTC local IP leak with puppeteer?

I tried: const browser = await puppeteer.launch({args: ['--enable-webrtc-stun-origin=false', '--enforce-webrtc-ip-permission-check=false']}); But this is not working. Next I tried: const targets = await browser.targets(); const backgroundPageTarget = targets.find(target => target.type() === 'background_page'); const backgroundPage = await backgroundPageTarget.page(); await backgroundPage.evaluateevaluateOnNewDocument(() => { chrome.privacy.network.webRTCIPHandlingPolicy.set({ value: "default_public_interface_only" }); }); But got: TypeError: Cannot read property 'page' of undefined EDIT: Need

Join the discussion →

How to smooth ugly jitter/flicker/jumping when resizing windows, especially dragging left/top border (Win 7-10; bg, bitblt and DWM)?

THE PROBLEM: When I grab the resize border of my Windows app, especially the top or left borders, and resize the window, the contents of the window do resize "live" as I drag, but they resize in a hideous manner that looks like a blatant bug to even the most novice user: the contents at the opposite edge of the window from the edge I am dragging jitter/flicker/jump back and forth wildly. Depending on the situation, the phenomenon may look like: contents that seem to walk off the edge of the window and snap back when we slow down or stop dragging contents that seem to pull into the window, inte

Join the discussion →

ImageMagick security policy 'PDF' blocking conversion

The Imagemagick security policy seems to be not allowing me perform this conversion from pdf to png. Converting other extensions seem to be working, just not from pdf. I haven't changed any of the imagemagick settings since I installed it... I am using Arch Linux, if the OS matters. user@machine $ convert -density 300 -depth 8 -quality 90 input.pdf output.png convert: attempt to perform an operation not allowed by the security policy `PDF' @ error/constitute.c/IsCoderAuthorized/408. convert: no images defined `output.png' @ error/convert.c/ConvertImageCommand/3288.

Join the discussion →

How to handle character encoding in spring RestController

I'm trying to find some information on how I should handle character encoding in my RestController. Spring seems to completely ignore the charset sent in the Content-Type header. No matter which charset is sent to the server using this header, the server tries to read it as UTF-8 and sends response with charset UTF-8. Here is a GitHub repository with a demo reproducing this scenario: https://github.com/hawk1234/characterEncodingTest Can someone point me where is it described in spring documentation? I came across Content Negotiation but I think it is more about response format rather then enco

Join the discussion →

The SSL connection could not be established

I am using a third party library (Splunk C# SDK ) in my ASP.NET Core application. I am trying to connect to my localhost Splunk service via this SDK, but I get an exception saying: System.Net.Http.HttpRequestException: The SSL connection could not be established, see inner exception. And the inner exception says: The remote certificate is invalid according to the validation procedure. This SDK uses HttpClient under the hood, but I don't have access to this object to configure HttpClientHandler. All my search on Google ends up using ServicePointManager to bypass the SSL validation, but this sol

Join the discussion →

How to get Mailbox list in batches of 100 using -ResultSize

I have to fetch Exchange Mailboxes in batches of 100 (there are total 1m+ mailboxes in organization). I am using the following powershell command: Get-Mailbox -ResultSize Unlimited This gives me all the mailboxes which is taking long time. I can process the result in batches of 100 so I hit this command: Get-Mailbox -ResultSize 100. Seems to work fine but I'm stuck on how to bring the next 100 mailboxes. PS: You can assume that the mailboxes are static and no changes will be made on them for indefinite time...

Join the discussion →

Python SSH script to extract Cisco switches information in preparation for network migration

I have a list of Cisco Nexus5548 IP addresses and FQDNs. I need help with a Python script to SSH to each and extract the following in order to import it into an Excel column format: IP Name Port Number Port Description Port Type Vlans Optic Type Medium Type 172.x.x.x hqcr1-swx-x E1/x The actual port description (Access or Trunk) 300-305,2276,… 1g-sr, 10g-sr, 1g-glct (copper fiber, or twinax) This is what I have so far: import paramiko, getpass, time devices = {'device1': {'ip': 'xx.xx.xx.xx'}} 'device2': {'ip': 'xx.xx.xx.xx'}} commands = ['show version\n', 'show run\n'] username = input('Usern

Join the discussion →

MySQL update fields based on value in another field

I need to update a field based on the presence of a string in another field. I need to do this for hundreds of search strings. This is what I have thus far: SET SQL_SAFE_UPDATES=0; UPDATE business_table SET `chain` = '7-Eleven' WHERE business_name LIKE BINARY '%7-Eleven%' OR business_name LIKE BINARY '%7 Eleven%'; UPDATE business_table SET `chain` = 'A&W' WHERE business_name LIKE '%A & W%' OR business_name LIKE '%A&W%'; UPDATE business_table SET `chain` = 'Blenz Coffee' WHERE business_name LIKE BINARY '%Blenz Coffee%'; UPDATE business_table SET `chain` = 'Booster Juice' WHERE business_name LIK

Join the discussion →

Emulator: failed to initialize WHPX: Function not implemented

While trying to run the emulator on the android studio I am getting the following error Emulator: Warning: Quick Boot / Snapshots not supported on this machine. A CPU with EPT + UG features is currently needed. We will address this in a future release. Emulator: failed to initialize WHPX: Function not implemented Emulator: Warning: requested RAM 1536M too high for your system. Reducing to maximum supported size 512M Emulator: qemu-system-x86_64.exe: Could not load library WinHvPlatform.dll. while running the emulator I am getting Notification as Emulator: Process finished with exit code 0 ente

Join the discussion →

How to setup Spring JDBC Connection Pooling with Spring Boot?

Am using Spring Boot 1.5.4 with Spring JDBC. Have a Spring Boot Microservice which uses Spring JDBC has the following issue when trying to conduct an HTTP PUT (after a bunch of users try conducting an HTTP PUT) which trickles to this Spring JDBC call: 2018-10-10 19:40:02 [http-nio-8081-exec-4] ERROR c.v.r.RepositoryImpl - Problem in updateData() method: "org.springframework.dao.DataAccessResourceFailureException: PreparedStatementCallback; SQL [select a.user_id,b.user_id, from user a join user_profile b where a.user_id=b.user_id and a.date=?;]; No operations allowed after connection closed.; n

Join the discussion →

Angular 6 - display component as modal dialog from a component.ts

I am attempting to display a modal confirmation popup after I perform a submit action from my component. The onSubmit() method in my home.component.ts: onSubmit() { var response = new Response(1, this.name, this.phone, this.email, this.optIn, this.responses); this.questionsService.saveResponse(response).subscribe( data => response = data) // show popup confirmation dialog here this.ngOnInit(); } My confirmation-modal component: import { Component, Input } from '@angular/core'; import { NgbModal, NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; @Component({ selector: 'confirmation-modal', te

Join the discussion →

Vector coefficients based on similarity

I've been looking for a solution to create a recommendation system based on vectors similarity. Basically, i have a few vectors per user for example: User1: [0,3,7,8,5] , [3,5,8,2,4] , [1,5,3,9,4] User2: [3,1,6,7,9] , [2,4,1,3,8] , [7,8,3,3,1] For every vector i need to calculate a coefficient and based on that coefficient differentiate a vector from another. I've found formulas that would calculate coefficients based on similarity of 2 vectors which i don't really want that.I need a formula that would calculate a coefficient per vector and then i do some other calculations with those coeffici

Join the discussion →

Mapping an "import" name to a PyPI name?

This is for work on pydeps --externals (https://github.com/thebjorn/pydeps) which lists the external packages imported by a module, e.g.: c:\github\pydeps> pydeps --externals pydeps [ "configparser", "enum", "stdlib_list", "yaml" ] meaning that these four modules are the only imports of dependent packages that needs to be installed(*). This can e.g. be fed into something that creates (or checks) a requirements.txt file. I realize there are problems with all four lines, but this question relates to the last two (stdlib_list and yaml) which come from packages(*) named stdlib-list and PyYAML resp

Join the discussion →

How can I generate html reports in jenkins

Image of post build action step for "Publish HTML Reports plugin" in maven based project After adding the plugin also I am getting http 404 error. Is there anything required to write any shell script or any code in pipeline to generate html reports or directly we can generate html reports? Can you please help me out in resolving the error....??

Join the discussion →

Flutter Console Windows Batch File Not Opening

I have recently downloaded flutter from here and followed the setup instructions after extraction. I have set the path in environment variable to C:\Flutter\flutter at the root of my C drive. The problem then occurs when I try opening flutter_console batch file as specified in the docs. The terminal window only flashes open and disappears, sometimes when it manages to be stable, a key stroke will send it closing again. I want to know if anyone else is facing this and how we can resolve this issue.Thanks.

Join the discussion →

Cannot read property 'subscribe' of undefined angular

I have a service UserService that has a method getUsers() and this service is shared among different angular components. The method calls an API and returns the data. I want to hold the result/state of last API call so I used BehaviorSubject to hold the last state so that if different components call getUsers() there should be only one API call otherwise hold state must be returned. This is how I am implementing this private _users$: BehaviorSubject<User[]>; constructor(private http: HttpClient) { this._users$ = new BehaviorSubject([]); } getUsers(): BehaviorSubject<User[]> { if (!this._getUse

Join the discussion →

How to validate Envato Purchase Code in PHP

I'm working on Envato API to verify Purchase Code I used plugin sample code from GitHub https://github.com/codehaiku/Envato-Purchase-Code-Verifier here I added token and AUTHOR_SALES_ENDPOINT_URI = 'https://api.envato.com/v2/market/author/sale?code=' also when I used to try I'm getting error "Invalid Purchase Code" when to the valid purchase code. Did I miss anything here? Can anyone suggest me. Is there any other alternative way to do. <!DOCTYPE html> <html> <head> <title>Sample Envato Purchase Code Verifier</title> <link rel="stylesheet" type="text/css" href="style.css"> </head> <body> <div

Join the discussion →
Older stories