See what the Stackoverflow community is most excited about today.
Date: 2017-10-12
-
Change Name of Import in Java, or import two classes with the same name
tags: java, import
189 votes, 6 answers and 70869 views
\r\n In Python you can do a:\n\nfrom a import b as c\r\nHow would you do this in Java, as I have two imports that are clashing.\r\n
-
The use of Swift 3 @objc inference in Swift 4 mode is deprecated?
tags: swift, swift4, xcode9-beta
196 votes, 6 answers and 24597 views
\r\n Briefly, while using Xcode 9 Beta, I have run into the following warning:\r\n The use of Swift 3 @objc inference in Swift 4 mode is deprecated. Please address deprecated @objc inference warnings, test ...\r\n
-
How do you use NSAttributedString?
tags: ios, ios4, nsattributedstring
275 votes, 13 answers and 208936 views
\r\n Multiple colours in an NSString or NSMutableStrings are not possible. So I've heard a little about the NSAttributedString which was introduced with the iPad SDK 3.2 (or around 3.2) and is available on ...\r\n
-
TypeScript Converting a String to a number
tags: typescript
197 votes, 7 answers and 160143 views
\r\n Anyone a suggestion on how to convert a string to a number in TypeScript?\n\nvar aNumber : number = "1"; // --> Error\n\n// Could this be done?\nvar defaultValue = 0;\nvar aNumber : number = "1".toInt32(...\r\n
-
default select option as blank
tags: html
235 votes, 9 answers and 284713 views
\r\n I have a very weird requirement, wherein I am required to have no option selected by default in drop down menu in HTML. However,\n\nI cannot use this,\n\n
<select>
\n<option></option>
\n ...\r\n -
uncaught syntaxerror unexpected token U JSON
tags: json
189 votes, 7 answers and 167853 views
\r\n I get this error "uncaught syntaxerror unexpected token U" when I run my page in chrome. And in firefox I get, "JSON.parse: unexpected character". I'm returning the json data from a php file and the ...\r\n
-
Hiding elements in responsive layout?
tags: html, css, twitter-bootstrap, responsive-design
230 votes, 7 answers and 296177 views
\r\n Looking through bootstrap it looks like they support collapsing the menubar items for smaller screens. Is there something similar for other items on the page?\n\nFor example, I have a along with nav-...\r\n
-
How to get the absolute coordinates of a view
tags: android, android-tablelayout
291 votes, 7 answers and 188531 views
\r\n I'm trying to get the absolute screen pixel coordinates of the top left corner of a view. However, all methods I can find such as getLeft() and getRight() don't work as they all seem to be relative to ...\r\n
-
What is external linkage and internal linkage?
tags: c++, c++-faq
246 votes, 7 answers and 91200 views
\r\n I want to understand the external linkage and internal linkage and their difference. \n\nI also want to know the meaning of\r\n const variables internally link by default unless otherwise declared as ...\r\n
-
How to get the number of elements in a list in Python?
tags: python, list
1271 votes, 7 answers and 1909338 views
\r\n items = []\nitems.append("apple")\nitems.append("orange")\nitems.append("banana")\n\n# FAKE METHOD::\nitems.amount() # Should return 3\r\nHow do I get the number of elements in the list?\r\n