Check if generic parameter type derives from some class X
Vote count: 0 What is the proper way of check if the type parameter if of type (or derives from) some type X? E.g. Function MyFunc(Of T As BaseClass)() As T If TypeOf T Is GetType(ChildClass1) Then 'Do something specific to ChildClass1 End If 'Do things common to all BaseClass objects End Function T...
Grouped context menu items in a Chrome extension
Vote count: 0 I have the following data structure (sample): Folder1 - Folder2 - Snip1 - Snip2 - Folder3 - Snip3 - Snip4 - Folder4 - Snip5 There is no limit on nesting of folders inside one another I need to allow the user to insert a particular snip whenever he/she right-clicks on a textarea. Now, I...
Constructor is Underfined
Vote count: 0 I am getting an error saying my constructor Book(String, int) is undefined. I check everything else and try to redo my programs still has an error. Any solutions of fixing this issue? Book Class: public class Book extends SaleItem{ private String author; private int numPages; public Bo...
Reverse GeocodeLocation Crashes
Vote count: 0 I am receiving a few crash reports from a live version of my app. They all are focused around the following lines of code in update location. Please let me know if you see anything wrong with it. All reports specifically point to the reverseGeocodeLocation portion. Thanks for any help ...
My android stuck with page in Chinese
Vote count: 0 my device is HTC desire 816 dual sim, and now the android system stuck on form with Chinese language. even after i made factory setting it still stuck with the same screen. so what does it need to get back to normal factory setting? asked 2 mins agomohamad salama Let's block ads! (Why?...
why odata specs return 204 and 404 for those two similar cases
Vote count: 0 In http://docs.oasis-open.org/odata/odata/v4.0/odata-v4.0-part1-protocol.html 11.2.7 Requesting Entity References If the resource path terminates on a single entity, the response MUST be the format-specific representation of an entity reference pointing to the related single entity. If...
Calling function in static member variable
Vote count: 0 I'm trying to call a function in a static class variable but I have some problems This is the minimal example #!/usr/bin/php <?php class Foo { public static $func; public static function call() { echo "calling funcn"; if ( isset(self::$func) && is_callable(self::$func)) self::$func(); ...
FacebookFacebook cyrillic symbols issue
Vote count: 0 I get user name by this code. If user name is in Russian (Cyrillic) it will always something like: Р?лья Мартьянов if (isset($accessToken)) { // echo "Request"; $response = $fb->get('/me?fields=id,name,email,hometown', $accessToken); $user = $response->getGraphUser(); } How...
how to get dark image overlay upon hover
Vote count: 0 currently trying edit my tumblr theme, and my goal is to have some type of overlay that darkens over the post images on upon hover. so basically, when you hover over the post it'll just tu dark so that you'll be able to see the text/ links i'll put over the image later. no matter what ...
How does the browser download the source file from a video tag
Vote count: 0 I am looking at a website that displays a video tag plays an m4a file. In the html the source url of the m4a file is given. The source url and the url that the player is being displayed are the same. If I load up the source url in the browser it just loads up the same player. I can dow...
Go: declaring a slice inside a struct?
Vote count: 0 I have the following code: type house struct{ s := make([]string, 3) name string roomSzSlice := make([]roomSz, 3) } func main() { } And when i try to build and run it i get the following errors: c:gosrctestmain.go:10: syntax error: unexpected := c:gosrctestmain.go:11: non-declaration s...