Questions

MySQL Error 1093 - Can't specify target table for update in FROM clause

I have a table `story_category` in my database with corrupt entries. The next query returns the corrupt entries: ``` SELECT * FROM story_category WHERE category_id NOT IN ( SELECT DISTINCT cat...

Android Fragment handle back button press

I have some fragments in my activity ``` [1], [2], [3], [4], [5], [6] ``` And on Back Button Press I must to return from [2] to [1] if current active fragment is [2], or do nothing otherwise. What...

21 Mar at 11:7

Maven: Failed to read artifact descriptor

I am hoping someone can help me with a problem I am struggling with. When I try to build my project from the terminal I get this error: ``` Failed to read artifact descriptor for com.morrislgn.merch...

23 Jun at 04:30

What is "export default" in JavaScript?

File: [SafeString.js](https://github.com/wycats/handlebars.js/blob/583141de7cb61eb70eaa6b33c25f475f3048071b/lib/handlebars/safe-string.js) ``` // Build out our basic SafeString type function SafeStrin...

3 Oct at 19:28

HTML span align center not working?

I have some HTML: ``` <div align="center" style="border:1px solid red"> This is some text in a div element! </div> ``` The Div is changing the spacing on my document, so I want to use a span for th...

5 Dec at 21:56

Create a rounded button / button with border-radius in Flutter

I'm currently developing an Android app in Flutter. How can I add a rounded button?

How to change or add theme to Android Studio?

I have just installed Android Studio in my Window 7 64bit. When I launch the application the background of the screen where we write the code is white. I would prefer black or any other color. I am no...

27 Feb at 16:0

How to make an ImageView with rounded corners?

In Android, an ImageView is a rectangle by default. How can I make it a rounded rectangle (clip off all 4 corners of my Bitmap to be rounded rectangles) in the ImageView? --- Note that from 2021 on...

How can I format a decimal to always show 2 decimal places?

I want to display: `49` as `49.00` and: `54.9` as `54.90` Regardless of the length of the decimal or whether there are are any decimal places, I would like to display a `Decimal` with 2 decimal places...

23 Sep at 14:0

How to add a delay for a 2 or 3 seconds

How can I add a delay to a program in C#?

9 Jul at 20:25

How can I determine installed SQL Server instances and their versions?

I'm trying to determine what instances of sql server/sql express I have installed (either manually or programmatically) but all of the examples are telling me to run a SQL query to determine this whic...

8 Oct at 15:42

Invalid postback or callback argument. Event validation is enabled using '<pages enableEventValidation="true"/>'

I am getting the following error when I post back a page from the client-side. I have JavaScript code that modifies an asp:ListBox on the client side. How do we fix this? Error details below: ``` S...

How to push a docker image to a private repository

I have a docker image tagged as `me/my-image`, and I have a private repo on the dockerhub named `me-private`. When I push my `me/my-image`, I end up always hitting the public repo. What is the exact ...

29 Apr at 17:40

Centering in CSS Grid

I'm trying to create a simple page with CSS Grid. What I'm failing to do is center the text from the HTML to the respective grid cells. I've tried placing content in separate `div`s both inside and ...

9 Aug at 19:34

CORS: Cannot use wildcard in Access-Control-Allow-Origin when credentials flag is true

I have a setup involving Frontend server (Node.js, domain: localhost:3000) <---> Backend (Django, Ajax, domain: localhost:8000) Browser <-- webapp <-- Node.js (Serve the app) Browser (webapp) --> A...

Is there a label/goto in Python?

Is there a `goto` or any equivalent in Python to be able to jump to a specific line of code?

23 Sep at 04:29

How can I break out of multiple loops?

Given the following code (that doesn't work): ``` while True: # Snip: print out current state while True: ok = get_input("Is this ok? (y/n)") if ok.lower() == "y": break 2 # Th...

How to resize an Image C#

As `Size`, `Width` and `Height` are `Get()` properties of `System.Drawing.Image`; How can I resize an Image object at run-time in C#? Right now, I am just creating a new `Image` using: ``` // objIma...

1 Sep at 11:47

Run PostgreSQL queries from the command line

I inserted a data into a table....I wanna see now whole table with rows and columns and data. How I can display it through command?

31 Jul at 21:15

How do I write a "tab" in Python?

Let's say I have a file. How do I write "hello" TAB "alex"?

10 May at 17:47

How can I disable landscape mode in Android?

How can I disable landscape mode for some of the views in my Android app?

Download File to server from URL

Well, this one seems quite simple, and it is. All you have to do to download a file to your server is: ``` file_put_contents("Tmpfile.zip", file_get_contents("http://someurl/file.zip")); ``` Only t...

31 Mar at 14:17

Why is my Spring @Autowired field null?

I have a Spring `@Service` class (`MileageFeeCalculator`) that has an `@Autowired` field (`rateService`), but the field is `null` when I try to use it. The logs show that both the `MileageFeeCalcula...

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 ...

26 Dec at 04:1

How to update RecyclerView Adapter Data

I am trying to figure out what is the issue with updating `RecyclerView`'s Adapter. After I get a new List of products, I tried to: 1. Update the ArrayList from the fragment where recyclerView is cre...

21 Jun at 23:23