What should a "unit" be when unit testing?

On Proggit today I was reading the comment thread on a submission entitled, "Why Unit Testing Is A Waste of Time". I'm not really concerned with premise of the article so much as I am with a...

Aligning text and image on UIButton with imageEdgeInsets and titleEdgeInsets

I would like to place an icon left of the two lines of text such that there's about 2-3 pixels of space between the image and the start of text. The control itself is Center aligned horizontally...

can i be notified of cookie changes in client side javascript

Can I somehow follow changes to cookies (for my domain) in my client side javascript. For example a function that gets called if a cookie gets changed , deleted or added In order of...

Color by Column Values in Matplotlib

One of my favorite aspects of using the ggplot2 library in R is the ability to easily specify aesthetics. I can quickly make a scatterplot and apply color associated with a specific column and I...

How to have a custom URL for an icon on the iOS home screen

Is it possible to make a custom URL for an icon on the iOS home screen? Or at least have a way for the user to edit the URL themselves? UPDATE: To be more specific, here's what the client...

Why isn't .ico file defined when setting window's icon?

When I tried to change the window icon in the top left corner from the ugly red "TK" to my own favicon using the code below, Python threw an error: from tkinter import * root = Tk() #some...

SAP Crystal reports (Failed to load database information)

favorite There is a problem i have been facing for couple of days. The problem is that i have developed C# Winform application using windows 7 professional sp1,mysql5.5 and SAP crystal report....

Saving strings with SharedPreferences

I'm trying to make a listview maked with clicks on a button that includes favorites. This listview items are created with 1 image, title and subtitle. My problem is this: It seems that when saving...

How do I get *change* file time in Windows?

I am trying to use FreeNAS CIFS share with Windows (synchronizing files from Windows to FreeNAS) and hit a problem that robocopy.exe thinks that some files need to be copied again every time I run...

IntelliJ terminal cursor shape

So, I am obsessed with Vim. I use vi mode everywhere - in all the editors and IDEs that support it. I use it it my browser (vimium, wasavi). I use 'hjkl' navigation everywhere thanks to awesome...

Windows Special and Known Folders from python (Start Menu, Downloads, ...)

What is the best method to determine the path of Windows [tag:special-folders] and [tag:known-folders] in python? I've uncovered a couple of popular methods for SpecialFolders, a.k.a CSIDL, but...

Adding Maven archetype in Intellij failing (does not exist)

This is driving me nuts. I created a spring boot project using Maven a week ago and when I went to create another today the archetype was not listed. I tried using the "Add Archetype" option, but...

Schedule the launch of a cordova app

Is it possible to have a cordova app start at a specific date and time, without any user interaction? Imagine for example a "wake up" app that would automatically start every morning and play your...

React - How to add "key" when pushing to an array

React v15.1 I am creating a table with a variable number of rows, depending on the data provided via props. Here is where I am (and it works fine): getRows = () => { const rows = []; for...

Exchange 2016 - Unable to Send As on Mail Public Folder

Exchange 2016 using Outlook 2016 client Created a new Public Folder titled Mail-enabled the public folder: Enable-MailPublicFolder -Identity "\PublicFolder" Added Send As...

Authorisation in microservices - how to approach domain object or entity level access control using ACL?

I am currently building microservices based system on java Spring Cloud. Some microservices use PostgreSQL and some of them MongoDB. REST and JMS is used for communication. The plan is to use SSO...

Check if contact is favourite in android

I try to check if contact is favorite(starred) in Android. Here what I do: String starred = cur.getString(cur.getColumnIndex(ContactsContract.Contacts.STARRED)); Boolean isFavorite; ...

Order Firestore data by TimeStamp in Ascending order

I am storing Ideas posted by the application in Firestore. The data is stored in Firestore like this Ideas/{documentID}/IdeaObject. The issue is when I retrieve the data it is not sorted w.r.t...

Python selector.select returning empty socket as readable

I'm having problems implementing a basic HTTPServer in Python 3.6 on windows 10 Pro x64. Essentially the selector being used in the base implementation of socketserver.serve_forever() uses a...

microsoft graph BETA add Microsoft Teams channel with isfavoritebydefault

I am trying to create channels in Microsoft Teams using the Microsoft Graph Beta API. In the docs, it says that the channel entity has a property IsFavoriteByDefault that indicates Whether the...

Excel - We found extra characters at the end of JSON input

I am trying to import my json file to excel via the get data function. When doing this i get an error saying that "We found extra characters at the end of JSON input" i ran the json file in...

Set Toggle color in SwiftUI

I've implemented a toggle after following Apple's tutorial on user input. Currently, it looks like this: This is the code that produces this UI: NavigationView { List { Toggle(isOn:...

Is there a way to get all documents in a subcollection (Firestore)

I'm having difficulties querying all documents inside a subcollection in my Firestore database. (I am using Node.js) My goal is to get all the data from every document inside the subcollection...

Module not found: Error: Can't resolve 'fs' in node_modules\dotenv\lib'

I'm trying to use dotenv with an angle, but when it comes to requiring dotenv require('dotenv').config() or const Dotenv = require('dotenv-webpack'); I get the following error: ERROR in...

Material ui Autocomplete press enter to create new chips

I wish I could do such a thing using Autocomplete of material ui: [wertarbyte] 1 That is, inserting text (string) without having a list of elements from which you must select. Therefore the...

How to bind appsettings.json setting with dots in the setting name

After watching/reading some tutorials about the option pattern in .net for binding your settings to a c# model, I had this particular question about binding the setting...

Ionic ion-back-button only navigating to defaultHref

I am having issues with my ion-back-button under Ionic v5 with Capacitor and Angular. I am trying to achieve the following: Tab1 has a button that navigates to Tab2. Tab2 has a ion-back-button in...

VSCode Settings: Python > Data Science category missing

I love VSCode, and one of my favorite features randomly disappeared this week with the new version of VSCode. In Settings, under Python, there used to be a "Data Science" category where I could...

Google: inactive OAuth redirect URIs and JavaScript origins

I got Mail from Google: We are writing to let you know that you have inactive OAuth redirect URIs and JavaScript origins in your Google Cloud project that are not in compliance with Google’s...

RecyclerView duplicating items after deletion from contextual action mode

In this part of my app, I am trying to implement deleting of selected favorite items via contextual action mode/bar, the problem is when I select an item then delete, it's deleted from the...