jQuery selector for id starts with specific text
I have this jQuery code: ``` $( "#editDialog" ).dialog({ autoOpen: false, show: { effect: "blind", duration: 1000 }, hide: { effect: "explode", duration: 1000 } }); ``` But ...
- Modified
- 28 Sep at 14:31
programmatically add column & rows to WPF Datagrid
I want to know how should we add columns and rows programmatically to a DataGrid in WPF. The way we used to do it in windows forms. create table columns and rows, and bind it to DataGrid. I have No. o...
Equivalent of varchar(max) in MySQL?
What is the equivalent of varchar(max) in MySQL?
Playing a video in VideoView in Android
I can't figure out why I'm not able to play the video in my VideoView. All I'm getting for a message is: > Cannot Play Video : Sorry, this video cannot be played. I created an SD card for my emulat...
- Modified
- 9 Dec at 13:49
Is there any advantage of using map over unordered_map in case of trivial keys?
A recent talk about `unordered_map` in C++ made me realize that I should use `unordered_map` for most cases where I used `map` before, because of the efficiency of lookup ( vs. ). Most times I use a...
- Modified
- 1 Dec at 14:24
How to avoid the "Circular view path" exception with Spring MVC test
I have the following code in one of my controllers: ``` @Controller @RequestMapping("/preference") public class PreferenceController { @RequestMapping(method = RequestMethod.GET, produces = "tex...
- Modified
- 13 Apr at 08:45
Split string, convert ToList<int>() in one line
I have a string that has numbers ``` string sNumbers = "1,2,3,4,5"; ``` I can split it then convert it to `List<int>` ``` sNumbers.Split( new[] { ',' } ).ToList<int>(); ``` How can I convert str...
Unable to import svg files in typescript
In `typescript(*.tsx)` files I cannot import svg file with this statement: ``` import logo from './logo.svg'; ``` Transpiler says:`[ts] cannot find module './logo.svg'.` My svg file is just `<svg>....
- Modified
- 23 Jun at 08:54
How to control the line spacing in UILabel
Is it possible to reduce the gap between text, when put in multiple lines in a `UILabel`? We can set the frame, font size and number of lines. I want to reduce the gap between the two lines in that la...
- Modified
- 28 Apr at 22:0
warning: assignment makes integer from pointer without a cast
When I declare a `char *` to a fixed string and reuse the pointer to point to another string ``` /* initial declaration */ char *src = "abcdefghijklmnop"; ..... /* I get the "warning: assignment m...
VSCode -- how to set working directory for debugging a Python program
How do I run a Python program under debug and set the working directory for the run?
- Modified
- 9 Jun at 15:16
Searching a list of objects in Python
Let's assume I'm creating a simple class to work similar to a C-style struct, to just hold data elements. I'm trying to figure out how to search a list of objects for objects with an attribute equali...
- Modified
- 22 Dec at 15:41
What does "request for member '*******' in something not a structure or union" mean?
Is there an easy explanation for what this error means? ``` request for member '*******' in something not a structure or union ``` I've encountered it several times in the time that I've been learn...
CORS with spring-boot and angularjs not working
I am trying to call REST endpoints on one application (spring-boot application) from another (angularjs). The applications are running on the following hosts and ports. - `http://localhost:8080`- `ht...
- Modified
- 31 Aug at 22:33
Customize UITableView header section
I want to customize `UITableView` header for each section. So far, I've implemented ``` -(UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section ``` this `UITabelViewDe...
- Modified
- 14 Dec at 16:36
How to concatenate characters in java?
How do you concatenate characters in java? Concatenating strings would only require a `+` between the strings, but concatenating chars using `+` will change the value of the char into ascii and hence ...
- Modified
- 30 Nov at 00:32
Why does datetime.datetime.utcnow() not contain timezone information?
``` datetime.datetime.utcnow() ``` Why does this `datetime` not have any timezone info given that it is explicitly a UTC `datetime`? I would expect that this would contain `tzinfo`.
C++ Dynamic Shared Library on Linux
This is a follow-up to [Dynamic Shared Library compilation with g++](https://stackoverflow.com/q/483797/1288). I'm trying to create a shared class library in C++ on Linux. I'm able to get the librar...
- Modified
- 23 May at 10:31
What is the difference between i = i + 1 and i += 1 in a 'for' loop?
I found out a curious thing today and was wondering if somebody could shed some light into what the difference is here? ``` import numpy as np A = np.arange(12).reshape(4,3) for a in A: a = a + ...
Convert Decimal to Varchar
I have a decimal column in a table defined as decimal(8,3). I would like to include this column in a `Select` statement, convert it to a `Varchar` and only display two decimal places. I can't seem to ...
- Modified
- 20 Jul at 07:35
Remove items from one list in another
I'm trying to figure out how to traverse a generic list of items that I want to remove from another list of items. So let's say I have this as a hypothetical example ``` List<car> list1 = GetTheList...
Digital Certificate: How to import .cer file in to .truststore file using?
Has anyone came across where they have to deal with .truststore file? and knowing how to import .cer into .truststore file? I am not sure if I have to use Java Keytool or Linux command (such as open...
- Modified
- 17 Dec at 00:33
What is the difference between the dot (.) operator and -> in C++?
What is the difference between the dot (.) operator and -> in C++?
"And" and "Or" troubles within an IF statement
I'm trying to use "And" & "Or" within an If statement. I probably have my syntax wrong. the result comes back false when the data should make it true. Here is the code: ``` ElseIf (origNum = "006260...
Git says "Warning: Permanently added to the list of known hosts"
Every time I use git to interact with a remote, such as when pulling or pushing, I am shown the following message: > Warning: Permanently added '...' (RSA) to the list of known hosts. How can I prev...
- Modified
- 9 Sep at 15:15