I have the classes  abstract class MyGeneric&lt;T&gt; {     ... }  class A : MyGeneric&lt;int&gt; {     ... }   How can I check, using the is operator, if any object is an instance of class MyGeneric?  Something like this:  bool isGeneric = anyObj.GetType() is MyGeneric;
I have a generic class in my project with derived classes.  public class GenericClass&lt;T&gt; : GenericInterface&lt;T&gt; { }  public class Test : GenericClass&lt;SomeType&gt; { }   Is there any way to find out if a Type object is derived from GenericClass?  t.IsSubclassOf(typeof(GenericClass&lt;&gt;))   does not work.
Sentence vs proposition I'm reflecting upon the distinction between a sentence and a proposition in logic and philosophy. I knew that a proposition is the meaning of a declarative sentence (i.e. the abstract content of a declarative sentence, the bearer of truth-value), whereas a sentence is simply a group of words (symbols, signs) ordered according to some grammatical rule in any natural or artificial language. A sentence isn't necessarily meaningful.   According to these definitions, you could say hat a predicate like "is interesting" is a sentence. Of course a sentence like "is interesting" wouldn't express a proposition, but still, it would be a sentence. This seemed ok to me until I remembered that propositional logic is sometimes called sentential logic. But then you cannot say that "is interesting" is a sentence, because it certainly isn't a sentence in the sense of sentential logic! As a result, I'm getting confused about what a sentence is according to sentential logic.   Can someone help? Should my flair be including sites with less than 200 reputation? Is it possible that your friends can join your Hamachi server when they don't have Hamachi? Does anyone know how to do that??!! Debian based system, only one gui program, nothing else I would like to make a debian system where you can only open one GUI program at boot, no other graphical interface, no minimize, or any X apart from that program, is there a way to do it on debian if possible, or any other custom distro? I just want to boot open the program and allow the user to only see and use that program. Ignore folders/files when Directory.GetFiles() is denied access I am trying to display a list of all files found in the selected directory (and optionally any subdirectories). The problem I am having is that when the GetFiles() method comes across a folder that it cannot access, it throws an exception and the process stops.  How do I ignore this exception (and ignore the protected folder/file) and continue adding accessible files to the list?  try {     if (cbSubFolders.Checked == false)     {         string[] files = Directory.GetFiles(folderBrowserDialog1.SelectedPath);         foreach (string fileName in files)             ProcessFile(fileName);     }     else     {         string[] files = Directory.GetFiles(folderBrowserDialog1.SelectedPath, "*.*", SearchOption.AllDirectories);         foreach (string fileName in files)             ProcessFile(fileName);     }     lblNumberOfFilesDisplay.Enabled = true; } catch (UnauthorizedAccessException) { } finally {} I have recently noticed that in chat when I type enough and the profile picture expands with my message, the hat stays the same size and it stays in the same place (I have the  app): Theme Activate Hook "There IS/ARE rice, meat and tomatoes on my plate" When a star becomes a black hole, does its gravitational field become stronger? I have installed Ubuntu alongside Windows 8.1. But the wifi is not working in Ubuntu (perhaps the drivers are not present), which worked fine in windows. Also I cant connect with Ethernet since my laptop does not have an Ethernet port. So is there any way for me to connect to the internet in ubuntu? Edit: Output of the terminal command  lspci -knn | grep Net -A2:  vikram@vikram-Inspiron-11-3148:~$ lspci -knn | grep Net -A2 01:00.0 Network controller [0280]: Broadcom Corporation BCM43142 802.11b/g/n [14e4:4365] (rev 01)     Subsystem: Dell Device [1028:0018]     Kernel driver in use: bcma-pci-bridge vikram@vikram-Inspiron-11-3148:~$    I did what Pilot6 suggested. Here is the output:    vikram@vikram-Inspiron-11-3148:~$ sudo dpkg -i *.deb [sudo] password for vikram:  Selecting previously unselected package bcmwl-kernel-source. (Reading database ... 163804 files and directories currently installed.) Preparing to unpack bcmwl-kernel-source_6.30.223.141+bdcom-0ubuntu2_amd64.deb ... Unpacking bcmwl-kernel-source (6.30.223.141+bdcom-0ubuntu2) ... Selecting previously unselected package dkms. Preparing to unpack dkms_2.2.0.3-1.1ubuntu5.14.04_all.deb ... Unpacking dkms (2.2.0.3-1.1ubuntu5.14.04) ... Setting up dkms (2.2.0.3-1.1ubuntu5.14.04) ... Setting up bcmwl-kernel-source (6.30.223.141+bdcom-0ubuntu2) ... Loading new bcmwl-6.30.223.141+bdcom DKMS files... First Installation: checking all kernels... Building only for 3.16.0-30-generic Building for architecture x86_64 Building initial module for 3.16.0-30-generic ERROR (dkms apport): kernel package linux-headers-3.16.0-30-generic is not supported Error! Bad return status for module build on kernel: 3.16.0-30-generic (x86_64) Consult /var/lib/dkms/bcmwl/6.30.223.141+bdcom/build/make.log for more information. modprobe: FATAL: Module wl not found. update-initramfs: deferring update (trigger activated) Processing triggers for man-db (2.6.7.1-1ubuntu1) ... Processing triggers for initramfs-tools (0.103ubuntu4.2) ... update-initramfs: Generating /boot/initrd.img-3.16.0-30-generic vikram@vikram-Inspiron-11-3148:~$ How to find basis of intersection of 2 vector spaces with given basis? Suppose we have vector spaces $\mathbb W$ and $\mathbb V$.  A given basis for $\mathbb W$ is $\{(1, 1, 0, -1), (0, 1, 3, 1)\}$, and a given basis for $\mathbb V$ is $\{(1, 2, 2, -2), (0, 1, 2, -1)\}$.  How to find a basis for $\mathbb W\cap\mathbb V$? Given, $\{x_n\}$ and $\{y_n\}$ are two real valued sequences such that $\lim_{n\to\infty} (x_{n}^{3}-y_{n}^{3})=0 $ Then is it always true that $\lim_{n\to\infty} (x_n-y_n) =0 $ ? I tried by splitting $ (x_{n}^{3}-y_{n}^{3}) $, but that didn't help as $\lim_{n\to \infty} (x_{n}^{2}+x_{n}y_{n}+y_{n}^{2}) $ can be $0$ or non zero or doesn't exist. Keep iphone active while running program how to set iPhone device to stay active ( to not lock ) while my app is running ? Any idea How many numbers of 6 digits, that can be formed with digits 2,3,9. And also divided by 3? How many numbers of 6 digits, that can be formed with digits 2,3,9. And also divided by 3?  $$$$ I was trying to to add 2^6 (when there is no 2)+ C(6,2)2^2 (when 2 can be in two places)+C(6,3)2^3 (when 2 can be in three places)... Where are executables for programs stored in Ubuntu?  An application (Komodo Edit) is asking me to identify an application to be used as a web browser. I've become used to just entering the application name as a command for situations such as these, but this scenario got me thinking.   I know in Windows it would just be the relevant application folder in the 'program files' folder, but I'm assuming things are a bit different on Linux?  I thought somewhere like bin would be logical but this appears to standard Linux/Unix applications. Where would I find the binary executable for applications stored on my system? "There are no shortage of applications" I've been having an argument with a colleague about this sentence, could you please let me know which one of us is correct:     There are no shortage of applications for our product in this   space.   She is convinced that are should be replaced by is, and I think it should stand as it is. Thanks for your help! What is the cause of this sudden drop in CV queue size? At Sat, 30 Nov 2013 14:51:01 GMT, there was a sudden drop in the close votes review queue size from 98932 to 98314. This is about 600 questions over the course of one minute.  It doesn't seem like a routine cleanup script. If it was, this is a very odd time for it to run. Also, the drop occurred over the span of a minute, so it's highly unlikely there was simply increased review activity. So, I ask: What was its cause?         (yes please don't shoot me I know my freehand circle is blue) (it's actually a dark teal look again) (the source for this script I  (slightly modified), found through  post)  Raw data:  Epoch time  CV Size 1385822821  98932 1385822881  98932 1385822941  98932 1385823001  98932 *** 1385823061  98932 *** 1385823121  98314     [author's note: the difference between iterations is 60 seconds] 1385823181  98314 1385823241  98314 1385823301  98314 1385823361  98314 Method always returns true? Showing that $a^n - 1 \mid a^m - 1 \iff n \mid m$ Let $a\ge 2$ be an integer. Show that for positive integers $m,n$, we have $a^n - 1$ divides $a^m - 1$ if and only if $n$ divides $m$.   I am having trouble showing this. I've seen a similar problem on here but it only shows one direction for the proof. I would like to see both directions.  This is what I have so far: Let $m = nq + r$, then $a^m - 1 = a^{nq + r}- 1 = a^{nq}a^r - 1 = a^{nq}a^r - a^r + a^r - 1 = a^r(a^{nq} - 1) + a^r - 1$. Since $0\le r\lt n$, $r = 0$ then $a^m - 1$ = $a^{nq} - 1$ so $a^m$ = $a^{nq}$ . Thus $m = nq$ hence $n\mid m$. How do I install gfortran? I am trying to install gfortran in my computer with Ubuntu 12.04 by using these commands,  sudo -i apt-get update apt-get install gfortran   but I found the program saying "unable to locate package gfortran". Then on a Ubuntu page I found some question regarding the same problem and I went through the solution from them but again I couldn't install the gfortran package.  Can anybody tell me how to install it?