on-internet

Retrying 'FindPackagesByIdAsync' for source

I have a dotnet core project which builds fine locally but throws the following error many times: Retrying 'FindPackagesByIdAsync' for source 'https://mycontrol.pkgs.visualstudio.com/_packaging/f8292c33-blah-blah-blah-e5e14bb9ba87/nuget/v3/flat2/microsoft.net.test.sdk/index.json'. Response status code does not indicate success: 401 (Unauthorized). This error appears in the VSTS build log for every package used in the project. Opening the link shows this: { $id: "1", innerException: null, message: "Can't find the package 'microsoft.net.test.sdk' in feed 'MyFeeds'.", typeName: "Microsoft.VisualS

Join the discussion →

Load data with base64 encoding with loadDataWithBaseURL

I have an app which use WebView to show some local html to users. The app worked fine in last 2 years, but recently I'm getting too many reports that the app is showing some kind of error like this: "Web page not available The web page at data:text/html; charset=utf-8;charset=utf-8;base64, could not be loaded because: net::ERR_INVALID_RESPONSE" obviously something changed in android or WebView, and it did, the doc is saying: Stricter UTF-8 decoder In Android 9, the UTF-8 decoder for Java language is stricter and follows the Unicode standard. so, I tried to load my data with base64 encoding to

Join the discussion →

How to set FontFamily globally for all controls in the project with text property in Xamarin.Form app?

I'm creating a Xamarin.Form app for Android and iOS, and some users replace system default font with their own fonts, and FontSize property in Xaml doesn't work with these fonts, and these fonts are not so readable in my App. 1. So can I force the font used in my App to be system default font even the user changed font in their system config page? 2. If I can't do the above, can I set the FontFamily of all controls in my App with a text property to the font I included in my Android and iOS assets folder globally once and for all? I've searched for some global font solution, but found no Xamari

Join the discussion →

kotlin : unit test with mock injection (mockK)

I followed step by step instructions from many blogs for implementing a mock with MockK: class SWServiceImplTest { @MockK lateinit var externalApi: ExternalApiService @InjectMockKs lateinit var SWService: SWServiceImpl @Before fun setUp() = MockKAnnotations.init(this) @Test fun SWCharacterReturnsCorrectValues() { every { externalApi.get<Characters>(Utils.SW_API) } returns mockCharacters() val result = SWService.swCharacter!! assertEquals("blue", result.first().color?.toLowerCase()) assertEquals(result.size, 3) } } I want to inject externalApi into my SWService service and mock the get method o

Join the discussion →

Export Distribution Groups, Members and Email Addresses

I'm trying to get this command to list all distribution groups to include all email addresses (not just primary) and this works, although I'd like it comma delimited instead of space delimited if possible. The only thing that's missing are the Members which I'd also like to include the in the results. Can someone tell me how to do that? Get-DistributionGroup -Resultsize unlimited | Select Name,PrimarySmtpAddress, @{L="EmailAddresses";E={$_.EmailAddresses | ? {$_.PrefixString -ceq "smtp"} | % {$_.SmtpAddress}}} | Export-Csv c:\Results.csv -NoTypeInformation Essentially I should have the require

Join the discussion →

Errno 61: Connection refused error when trying to connect to python server

I've recently been trying to experiment with creating simple online multiplayer games with python's socket module. I made a first draft of a server and client program, and though they work perfectly when I run them both from the same computer, my attempts to connect the client when running on another computer results in the following error message: Traceback (most recent call last): File "/Users/Admins2-Admins_In_Space/Downloads/gameclient.py", line 22, in <module> client.connect((host,port)) ConnectionRefusedError: [Errno 61] Connection refused (both computers are connected to the same router

Join the discussion →

How to force GTM to add tag in the ?

I've followed the below steps for adding AdSense script inside of my website: Now that you have the code head over to GTM. Create a new tag. Provide a name. Select custom HTML as the tag template. Copy and paste the code into the text field. Set the trigger to fire on All pages or the pages you want to serve ads on. Click Save and Submit to push the code live. I did it and all fine. Here is my full code: (define as a tag in google tag manager) <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> <script> (adsbygoogle = window.adsbygoogle || []).push({ go

Join the discussion →

How to name the list of the group_split output in dplyr

I have the following process which uses group_split of dplyr: library(tidyverse) set.seed(1) iris %>% sample_n(size = 5) %>% group_by(Species) %>% group_split() The result is: [[1]] # A tibble: 2 x 5 Sepal.Length Sepal.Width Petal.Length Petal.Width Species <dbl> <dbl> <dbl> <dbl> <fct> 1 5 3.5 1.6 0.6 setosa 2 5.1 3.8 1.5 0.3 setosa [[2]] # A tibble: 2 x 5 Sepal.Length Sepal.Width Petal.Length Petal.Width Species <dbl> <dbl> <dbl> <dbl> <fct> 1 5.9 3 4.2 1.5 versicolor 2 6.2 2.2 4.5 1.5 versicolor [[3]] # A tibble: 1 x 5 Sepal.Length Sepal.Width Petal.Length Petal.Width Species <dbl> <dbl> <d

Join the discussion →

TypeScript: Error: Cannot find module when using paths

I have a monorepo containing the Back-end(NodeJS), Front-end(Angular) and Shared directory (container models shared by the front-end and back-end.) preagree-mono/ preagree-api/ preagree-app/ preagree-shared/ The angular app is working perfectly and being build correctly using the shared types, after adding the folder into the paths preagree-app/tsconfig.json { "compileOnSave": false, "compilerOptions": { "baseUrl": "src", "declaration": false, "emitDecoratorMetadata": true, "experimentalDecorators": true, "importHelpers": true, "lib": ["es2018", "dom"], "module": "es2015", "moduleResolution":

Join the discussion →

Redshift: 500310 Invalid Operation

I am using talend to insert data into a table on Amazon Redshift. The java code is producing by talend but today() function is not supported by Amazon Redshift. I am trying to load a table from Salesforce and put it in Redshift using talend. When I am running the job from talend I have following error: Exception in component tRedshiftOutput_1 java.sql.SQLException: [Amazon](500310) Invalid operation: function today() does not exist; at com.amazon.redshift.client.messages.inbound.ErrorResponse.toErrorException(ErrorResponse.java:1830) at com.amazon.redshift.client.PGMessagingContext.handleError

Join the discussion →

What is the difference between a function and an object literal?

In JS functions belong to the object type. Objects can be converted to primitive types with [Symbol.toPrimitive](hint). This pure-object conversion works fine: let obj = { [Symbol.toPrimitive](hint) { switch(hint) { case "string": return "all right"; case "number": return 100; default: return "something else"; } } }; alert(obj); // all right alert(+obj); // 100 However, something is wrong with function conversion: function fun() { [Symbol.toPrimitive](hint) { // JS engine starts to complain here switch(hint) { case "string": return "all right"; case "number": return 100; default: return "somet

Join the discussion →

Schengen Visa Photo requirement - conflict

I visited Schengen visa photo requirement on their official website. I found the photo size to be 35–40mm in width. On some other websites, I have seen the photo requirement to be 35 - 45 mm , 32 - 45mm. People who have successfully applied for Schengen visa recently, what is the photo size pls ? Thank you.

Join the discussion →

Pickle encoding utf-8 issue

I'm trying to pickle a pandas dataframe to my local directory so I can work on it in another jupyter notebook. The write appears to go successful at first but when trying to read it in a new jupyter notebook the read is unsuccessful. When I open the pickle file I appear to have wrote, the file's only contents are: Error! /Users/.../income.pickle is not UTF-8 encoded Saving disabled. See console for more details. I also checked and the pickle file itself is only a few kilobytes. Here's my code for writing the pickle: with open('income.pickle', 'wb', encoding='UTF-8') as to_write: pickle.dump(ne

Join the discussion →

Solving 'Unrecognized Token' Error While Using SQLite Insert Command

I keep getting an OperationalError: Unrecognized Token. The error hapens when I'm attempting to insert data into my SQLite database using an SQLite Insert command. What do I need to do to correct this error or is there a better way I should go about inserting data into my database? The data is water level data measured in meters above chart datum and is gathered from water level gauge data loggers throughout the Great Lakes region of Canada and the US. The script uses the Pandas library and is hardcoded to merge data from water level gauging stations that are located in close proximity to each

Join the discussion →

Why would Amazon Athena throw an "Access denied when writing to location" error?

Access denied when writing to location: s3://[bucket]/queryDailyInventory/Unsaved/2019/07/10/4da06507-a43f-4db0-bd46-81660e58fe35.txt This query ran against the "default" database, unless qualified by the query. Please post the error message on our forum or contact customer support with Query Id: 4da06507-a43f-4db0-bd46-81660e58fe35. Hi all, Above is the error message in its entirety, unchanged except removing the bucket name which contains some private information. This bucket is public, and I have demonstrated my write access to this bucket by creating files and folders to it. However, my at

Join the discussion →

How to do countifs in powerbi

I want to do countif in PowerBI (Example: count of total item with condition #1: having transaction of 2 or more, condition #2: year) I have sample data comprised of PO (transaction) #, item #, date (year), item description, ship to location. I can achieve the result through Excel - Pivot a matrix table of rows of items, columns of year and the value is count of PO/transactions. A separate table on the side is utilized to count the total item within Column (Years) that has transaction count > 2. I can't figure out what DAX to use in PowerBI to achieve the same thing as I could with Excel: Samp

Join the discussion →

How to detect, when a juul started charging? Over ubs (vb.net)

I have a juul, a charger, and a pc. The pc has usb ports. Thats clear. When i plug a mouse, keyboard or any HID device, the pc can recognise these, but when i plug the charger, nothing happened. I'm try to watch the connected usb devices, with the "USBDeview" by NirSoft. The software cant list the charger. How can I detect, when any specified stuff connected via usb? Now the "stuff" is the juul charger. Thanks for any help, I tried to make it simple.

Join the discussion →

Warning: free hotel wifi is a hacker’s dream (alleged)

Is this article correct? A little bit? A lot? Or is it all bollox? Sure using public or near-public wifi (internet cafe or hotel) you should expect your browsing history to be visible to the world, but ... Specifically three questions: Does the hotel's wifi asking for a password make any difference to the visibility of your internet traffic? (A guest/hacker in another room would also get that password and could detect your traffic.) If you log into your bank over hotel wifi, that's encrypted. (Presuming your bank's site is https://... -- and if it isn't, change your bank.) Sure a hacker could

Join the discussion →

Select-Object Data Failure From Succesful Invoke-RestMethod

I have a working call to a rest service using Invoke-RestMethod -Uri https://.... The call's result, in JSON, can be piped the data to Format-Table -Property ... and data is shown. But when Select-Object -Property ... is used after the invoke with the same parameters, the PSObject has the columns but no data for them. If I use a different webservice the call will work. What could be causing the PSObject to not show any values? Working Example on public rest web services Invoke-RestMethod -Uri https://jsonplaceholder.typicode.com/todos/1 | Select-Object -Property title Result @{title=delectus a

Join the discussion →

How to keep same date when refreshing the page?

I'm getting data on button click from WebAPI and navigate the component to other component to show this data and this trick is working fine for me but the issue is when I refresh the page my data is empty, Please provide me some solution or example to keep same data. Thanks in advance component.ts //where I'm getting data onClick onSubmit(){ this.departmentService.GetDepartmentSearchResults(this.modelSearch1.value.Department, this.modelSearch1.value.Year, this.modelSearch1.value.No).subscribe(res => { this.objDepartmentsSearchedResults = res as DepartmentsSearchedResultsModel[]; this.departmen

Join the discussion →

Is performing a mapping operation without using returned value an antipattern? [closed]

Lets say I have a list and I want to add some values into it using a mapping function: const arr = [1, 2, 3, 4, 5]; const anotherArr = []; I do this using a functional approach: arr.map((item) => anotherArr.push(item)); Is this an antipattern / bad logic - that is, not using the mapping operation return value for anything? Are there any good resources on this? (I know this logic is silly and I can just copy the list - that is not the point of my question)

Join the discussion →

NestJS typeorm - can't create entity

I'm trying to add an Idea entity to my TypeOrm (configured to mysql), and it seems like the imports refuse to work. With the file added, the typeorm doesn't initialize successfully. I've reinstalled typeorm package, and I have no idea where to start debugging. I'm following a tutorial ( https://www.youtube.com/watch?v=EHlhvy-fh90), in which this error does NOT appear. I've deviated from it by replacing a postgresql database with a dockerized mysql. I've had some trouble setting up the node -> mysql connection, eventually opting to run a dockerized mysql 5 to account for auth errors (following

Join the discussion →

Add Service Reference in Visual Studio 2019

I am working on a C++ tool in Visual Studio 2019. Now I want to use a function from a WebService to get a value. I have two URLs: one related to the WebService and an other one for WSDL. How can I call my WL function? I have no option in Visual Studio 2019 to set "Add Service Reference" for my C++ Code. What do I wrong?

Join the discussion →

What is the location of .sh file of the jenkins job?

I am looking for the location of .sh file which is generated my jenkins job and can be found in console output. This .sh files starts with jenkins word. I am using AWS instance for jenkins. i was looking for /temp folder, but didn't get into /tmp folder. sample of the .sh file name: [first_gitbuild] $ /bin/sh -xe /tmp/jenkins8581903656897699418.sh

Join the discussion →

Implementing ping/pong for userData websocket

According to the Binance API: "The websocket server will send a ping frame every 3 minutes. If the websocket server does not receive a pong frame back from the connection within a 10 minute period, the connection will be disconnected. Unsolicited pong frames are allowed." So here's the problem I am having, I do have a websocket implementation however after that 10 minute period, it disconnect. My on('close') does not return me anything but I just stop getting any messages from the socket. This is the code I have to send back the pong: ws.on('ping', (data) => { console.log("ping: " + data); ws.

Join the discussion →

How to convert Map to array of objects?

I'm trying to convert a Map into array of objects Lets say I have the following map: let myMap = new Map().set('a', 1).set('b', 2); And I want to convert the above map into the following: [ { "name": "a", "value": "1", }, { "name": "b", "value": "2", } ]

Join the discussion →

Error "invalid_grant / Invalid JWT Signature." to get the access token using Oauth

For a long time I have tried to solve this problem. I need to generate a token access with a service account to use the Google calendar application. First I do the JWT with the library firebase / php-jwt based on a pem certificate where it stores the private key provided by the Google service account After doing a curl in Google to get the aforementioned token, but it throws me the following error "" invalid_grant / Invalid JWT Signature " $time = time(); $key = file_get_contents("./certs/certificado.pem"); $token = array( "iss" => "*****@*******.iam.gserviceaccount.com", "aud" => "https://www

Join the discussion →

A Python interview question which I faced

The question is to print the numbers mentioned below without using any conditional statements? The set of numbers are var=01120221011202210112. Is there a way to do the same without using conditional statements ?

Join the discussion →

The Swagger UI doesn't work when "spring.resources.static-locations" is used

I would like to ask for your help regarding the following problem. Unfortunately, the Swagger doesn't work, I get 404 page not found exception (http://localhost:8080/swagger-ui.html) when I use "spring.resources.static-locations" to specify the UI. Does anybody face this problem? Could you help how I can manage this issue? Thanks for your help in advance

Join the discussion →

Dropdown Select with Multiselect in Kendo-ui

Does anyone know if there is a multi-select for kendo UI like the ones we have for Angular Material? I looked up some of the Kendo controls and all I have is multiselect with keyword select. Not the ones I need. This is what I exactly need: [ but this is what I see:

Join the discussion →
Older stories