How do I copy an entire directory of files into an existing directory using Python?
Run the following code from a directory that contains a directory named `bar` (containing one or more files) and a directory named `baz` (also containing one or more files). Make sure there is not a ...
Java Array Sort descending?
Is there any EASY way to sort an array in descending order like how they have a sort in ascending order in the [Arrays class](http://docs.oracle.com/javase/7/docs/api/java/util/Arrays.html)? Or do I ...
Maven command to determine which settings.xml file Maven is using
How do I use maven command line to determine which settings.xml file Maven is picking up?
- Modified
- 4 Oct at 12:4
Setting a property by reflection with a string value
I'd like to set a property of an object through Reflection, with a value of type `string`. So, for instance, suppose I have a `Ship` class, with a property of `Latitude`, which is a `double`. Here's ...
- Modified
- 6 Aug at 08:46
Cross-platform way of getting temp directory in Python
Is there a cross-platform way of getting the path to the `temp` directory in Python 2.6? For example, under Linux that would be `/tmp`, while under XP `C:\Documents and settings\[user]\Application ...
- Modified
- 26 Jan at 09:27
How do I make a batch file terminate upon encountering an error?
I have a batch file that's calling the same executable over and over with different parameters. How do I make it terminate immediately if one of the calls returns an error code of any level? Basical...
- Modified
- 19 Sep at 10:13
How do you rotate a two dimensional array?
Inspired by [Raymond Chen's post](https://devblogs.microsoft.com/oldnewthing/20080902-00/?p=21003), say you have a 4x4 two dimensional array, write a function that rotates it 90 degrees. Raymond links...
- Modified
- 22 Feb at 17:25
Cypress: Test if element does not exist
I want to be able to click on a check box and test that an element is no longer in the DOM in Cypress. Can someone suggest how you do it? ``` // This is the Test when the checkbox is clicked and the e...
- Modified
- 16 Dec at 00:12
tsconfig.json: Build:No inputs were found in config file
I have an ASP.NET core project and I'm getting this error when I try to build it: ``` error TS18003: Build:No inputs were found in config file 'Z:/Projects/client/ZV/src/ZV/Scripts/tsconfig.json'. Sp...
- Modified
- 10 Apr at 22:33
How do I display a text file content in CMD?
I want to display the content of a text file in a CMD window. In addition, I want to see the new lines that added to file, like `tail -f` command in Unix.
- Modified
- 4 Nov at 08:49
How to send a "multipart/form-data" with requests in python?
How to send a `multipart/form-data` with `requests` in python? How to send a file, I understand, but how to send the form data by this method can not understand.
- Modified
- 13 Oct at 16:7
How to redirect both stdout and stderr to a file
I am running a bash script that creates a log file for the execution of the command I use the following ``` Command1 >> log_file Command2 >> log_file ``` This only sends the standard output and not t...
- Modified
- 15 Dec at 12:48
How to delete an item in a list if it exists?
I am getting `new_tag` from a form text field with `self.response.get("new_tag")` and `selected_tags` from checkbox fields with ``` self.response.get_all("selected_tags") ``` I combine them like t...
When saving, how can you check if a field has changed?
In my model I have : ``` class Alias(MyBaseModel): remote_image = models.URLField( max_length=500, null=True, help_text=''' A URL that is downloaded and cached for the image. O...
- Modified
- 10 Jun at 22:56
Hide text using css
I have a tag in my html like this: ``` <h1>My Website Title Here</h1> ``` Using css I want to replace the text with my actual logo. I've got the logo there no problem via resizing the tag and putti...
- Modified
- 14 Sep at 04:50
What are the uses of "using" in C#?
User [kokos](https://stackoverflow.com/users/1065/kokos) answered the wonderful [Hidden Features of C#](https://stackoverflow.com/questions/9033/hidden-features-of-c) question by mentioning the `using...
- Modified
- 28 Jan at 15:50
Difference between OpenJDK and Adoptium/AdoptOpenJDK
Due to recent [Oracle Java SE Support Roadmap](https://www.oracle.com/technetwork/java/javase/eol-135779.html) policy update (end of $free release updates from Oracle after March 2019 in particular), ...
- Modified
- 18 Dec at 19:28
How can I use String substring in Swift 4? 'substring(to:)' is deprecated: Please use String slicing subscript with a 'partial range from' operator
I have the following simple code written in Swift 3: ``` let str = "Hello, playground" let index = str.index(of: ",")! let newStr = str.substring(to: index) ``` From Xcode 9 beta 5, I get the follo...
How to list all versions of an npm module?
In order to see all the versions of a node module [webpack], I have executed below command in windows command prompt ``` npm view webpack versions ``` This command only displays first 100 versions ...
Sort collection by multiple fields in Kotlin
Let's say I have a list of People which I need to sort by Age first and then by Name. Coming from a C#-background, I can easily achieve this in said language by using LINQ: ``` var list=new List<Pe...
- Modified
- 25 Mar at 21:59
Using env variable in Spring Boot's application.properties
We are working on a Spring Boot web application, and the database we are using is MySQL; - the setup we have is we first test it (means we need to install MySQL on our PC);- then we push to Bitbucket...
- Modified
- 2 Jan at 11:42
How do I block comment in Jupyter notebook?
I want to comment out a block of multiple lines in Jupyter Notebook, but can't find out how to do that in this current version. It used to be in one of the drop down menus but is no longer there. How...
- Modified
- 12 Jan at 21:26
RecyclerView vs. ListView
From android developer ([Creating Lists and Cards](http://developer.android.com/training/material/lists-cards.html)): > The RecyclerView widget is a more advanced and flexible version of ListView. ...
- Modified
- 5 Mar at 10:35
"for line in..." results in UnicodeDecodeError: 'utf-8' codec can't decode byte
Here is my code, ``` for line in open('u.item'): # Read each line ``` Whenever I run this code it gives the following error: > UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe9 in position 289...
- Modified
- 30 Jan at 16:27
TypeError: $.ajax(...) is not a function?
I'm attempting to create an AJAX request. Here's my function definition: ``` function AJAXrequest(url, postedData, callback) { $.ajax({ type: 'POST', url: url, data: posted...