How to get a ListBox ItemTemplate to stretch horizontally the full width of the ListBox?
I want to have the ListItems to extend with their orange background the full width of the Listbox. Currently they are only as wide as the FirstName + LastName. I've set every element I can to: Horiz...
- Modified
- 8 May at 08:37
Best way to extract a subvector from a vector?
Suppose I have a `std::vector` (let's call it `myVec`) of size `N`. What's the simplest way to construct a new vector consisting of a copy of elements X through Y, where 0 <= X <= Y <= N-1? For exam...
How can I toggle word wrap in Visual Studio?
Does Visual Studio .NET have a way to toggle word-wrap on and off? I am used to this feature in Eclipse which allows you to right click and toggle word wrap on and off so that when you have long line...
- Modified
- 31 May at 03:9
How can I use inverse or negative wildcards when pattern matching in a unix/linux shell?
Say I want to copy the contents of a directory excluding files and folders whose names contain the word 'Music'. ``` cp [exclude-matches] *Music* /target_directory ``` What should go in place of [e...
- Modified
- 19 Oct at 17:24
How to create number input field in Flutter?
I'm unable to find a way to create an input field in Flutter that would open up a numeric keyboard and should take numeric input only. Is this possible with Flutter material widgets? Some GitHub discu...
How do I initialize Kotlin's MutableList to empty MutableList?
Seems so simple, but, how do I initialize Kotlin's `MutableList` to empty `MutableList`? I could hack it this way, but I'm sure there is something easier available: ``` var pusta: List<Kolory> = emp...
- Modified
- 7 Mar at 08:7
Images can't contain alpha channels or transparencies
Apple has released new version of iTunes Connect & I got an error message when I tried to set Screenshots on itunes connect for my app. ``` "Images can't contain alpha channels or transparencies." ``...
- Modified
- 6 Sep at 06:36
Synchronously waiting for an async operation, and why does Wait() freeze the program here
: I'm looking for an explanation, not just a solution. I already know the solution. Despite having spent several days studying MSDN articles about the Task-based Asynchronous Pattern (TAP), async and...
- Modified
- 21 Jan at 03:16
Convert one date format into another in PHP
Is there a simple way to convert one date format into another date format in PHP? I have this: ``` $old_date = date('y-m-d-h-i-s'); // works $middle = strtotime($old_date); /...
- Modified
- 5 Jun at 19:7
How to get the device's IMEI/ESN programmatically in android?
To identify each devices uniquely I would like to use the IMEI (or ESN number for CDMA devices). How to access this programmatically?
How to set initial value and auto increment in MySQL?
How do I set the initial value for an "id" column in a MySQL table that start from 1001? I want to do an insert `"INSERT INTO users (name, email) VALUES ('{$name}', '{$email}')";` Without specifying...
- Modified
- 30 Dec at 04:4
How can I suppress all output from a command using Bash?
I have a Bash script that runs a program with parameters. That program outputs some status (doing this, doing that...). There isn't any option for this program to be quiet. How can I prevent the scri...
Determine device (iPhone, iPod Touch) with iOS
Is there a way to determine the device running an application. I want to distinguish between `iPhone` and `iPod Touch`, if possible.
- Modified
- 4 Jan at 10:18
Hibernate: hbm2ddl.auto=update in production?
Is it okay to run Hibernate applications configured with `hbm2ddl.auto=update` to update the database schema in a production environment?
Polymorphism vs Overriding vs Overloading
In terms of Java, when someone asks: > what is polymorphism? Would or be an acceptable answer? I think there is a bit more to it than that. I think is not the right answer for sure.
- Modified
- 29 Oct at 07:18
How to get a file's Media Type (MIME type)?
How do you get a Media Type (MIME type) from a file using Java? So far I've tried JMimeMagic & Mime-Util. The first gave me memory exceptions, the second doesn't close its streams properly. How would...
Context.startForegroundService() did not then call Service.startForeground()
I am using `Service` Class on the Android O OS. I plan to use the `Service` in the background. The [Android documentation](https://developer.android.com/guide/components/services#StartingAService)...
- Modified
- 11 Mar at 12:39
Powershell Invoke-WebRequest Fails with SSL/TLS Secure Channel
I'm trying to execute this powershell command `Invoke-WebRequest -Uri https://apod.nasa.gov/apod/` and I get this error. https requests appear to work ("[https://google.com](https://google.com)") ...
- Modified
- 30 Nov at 04:51
Error: Node Sass does not yet support your current environment: Windows 64-bit with false
``` E:\A Prem World\Team_Work_Tasks\Anjali\Anjali_20160524\QuizApp_20160524_01_Anj>ionic serve -l (node:4772) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs...
- Modified
- 30 Dec at 18:14
Ignore duplicates when producing map using streams
``` Map<String, String> phoneBook = people.stream() .collect(toMap(Person::getName, Person::getAddress)); ```...
- Modified
- 12 May at 09:50
go get results in 'terminal prompts disabled' error for github private repo
I created the private repo examplesite/myprivaterepo using the Github UI from my browser. Then I went to my go directory (on the desktop) and cloned it: ``` $ cd $GOPATH $ go get github.com/examples...
Using psql how do I list extensions installed in a database?
How do I list all extensions that are already installed in a database or schema from psql? See also - [Finding a list of available extensions that PostgreSQL ships with](https://dba.stackexchange.co...
- Modified
- 4 May at 16:40
400 BAD request HTTP error code meaning?
I have a JSON request which I'm posting to a HTTP URL. Should this be treated as `400` where `requestedResource` field exists but `"Roman"` is an invalid value for this field? ``` [{requestedResou...
- Modified
- 10 Nov at 20:51
How do I set the maximum line length in PyCharm?
I am using PyCharm on Windows and want to change the settings to limit the maximum line length to `79` characters, as opposed to the default limit of `120` characters. Where can I change the maximum ...