I have some attribute that i define.  I want to write some generic method that will get  where this  contain this attribute.   How to implement this ?
I want to make a generic class that accepts only serializable classes, can it be done with the where constraint?  The concept I'm looking for is this:  public class MyClass&lt;T&gt; where T : //[is serializable/has the serializable attribute]
Prove Equivalence Relation in G Hei, guys!  I'm having some trouble with the next problem:  Let $A$ and $B$ be subgroups of $G$. Show that $\sim$ is an equivalence relation when it is defined as follows: $g\sim g'\Leftrightarrow g' = agb$ for some $a$ from $A$, $b$ from $B$.  Should I prove this is valid for any a and b? It says for some elements a and b. But I might as well take the unit element.   Could you give me a clue on how to solve it?  Cheers! static variables in an inlined function I have a function that is declared and defined in a header file. This is a problem all by itself. When that function is not inlined, every translation unit that uses that header gets a copy of the function, and when they are linked together there are duplicated. I "fixed" that by making the function inline, but I'm afraid that this is a fragile solution because as far as I know, the compiler doesn't guarantee inlining, even when you specify the "inline" keyword. If this is not true, please correct me.  Anyways, the real question is, what happens to static variables inside this function? How many copies do I end up with? How do you use Batch for send more than 10 emails? Does a Nikon DX lens on a FX camera get subjected to the 1.5X crop factor? How do I change the mode of perspective? I'm working on a scene that, currently, is much more convenient when the view is.. not the correct perspective. There's a word for this, but I have no idea how to phrase it and my tries to look it up has all come up with weird results. (usually directions on how to make your view point from a certain direction) This has probably already been answered here, so please bear with me; I just cannot find anything that has to do with the problem I'm having. I drew a photo to make it easy: (excuse my crappy mouse-drawing skills)  Thanks! I went into Live CD and activated Terminal.  Then, I typed gksu nautilus to gain temporary access to my root directory. Once the Manager window opened, I clicked on File System and navigated to the /etc/default/grub directory. I then double clicked on the Grub file to make changes to the TIMEOUT and TIMEOUT_QUIET.  I saved the file after I made the changes. Then I went back to the terminal mode and typed:  gksu update-grub   The error message I got was:     Can not find a device for / (is /dev mounted?)   I'm not sure what to do at this point. How can I run update-grub to update the changes? Thanks in advance for your help. Please be very detailed and specific with your response as I am totally new to this environment. Set up a scheduled job? I've been working on a web app using Django, and I'm curious if there is a way to schedule a job to run periodically.   Basically I just want to run through the database and make some calculations/updates on an automatic, regular basis, but I can't seem to find any documentation on doing this.  Does anyone know how to set this up?  To clarify:  I know I can set up a cron job to do this, but I'm curious if there is some feature in Django that provides this functionality.   I'd like people to be able to deploy this app themselves without having to do much config (preferably zero).  I've considered triggering these actions "retroactively" by simply checking if a job should have been run since the last time a request was sent to the site, but I'm hoping for something a bit cleaner. Today I was cut off in the middle of the following sentence:     Between Cook, Strauss, and Pietersen—   My friend said I was wrong. He said that for more than two entities, among/amongst are used, and that between is only for two entities.   I vaguely remember some rule like this, but I asked him to hear the whole sentence, which was:     Between Cook, Strauss, and Pietersen, they’ve notched up 56 centuries in Test cricket.   Should I have used among here? Seems correct to me to use between, but my friend was certain.   Another friend pointed out the following sentence:     I’m still choosing between Harvard, Yale, and MIT.    Certainly among doesn’t seem to fit here, and she, to me, was correct in using between. "Oriented" vs. "orientated" What are the origins of the word orientated?  As far as I know, the correct spelling is oriented and orientated is not an alternative spelling but an error that is in common use.  Is it for example more commonly used in a certain country or by a certain people? Is there a reason for people choosing to say or write orientated instead of oriented? How to reduce the thickness of letters Smooth transition between two materials What does "Ubuntu" mean, and why did they choose that particular name? How to use early stopping properly for training deep neural network? I have a deep neural network model and I need to train it on my dataset which consists of about 100,000 examples, my validation data contains about 1000 examples. Because it takes time to train each example (around 0.5s for each example) and in order to avoid overfitting, I would like to apply early stopping to prevent unnecessary computation. But I am not sure how to properly train my neural network with early stopping, several things I do not quite understand now:   What would be a good validation frequency? Should I check my model on the validation data at the end of each epoch? (My batch size is 1) Is it the case that the first few epochs might yield worse result before it starts converging to better value? In that case, should we train our network for several epochs before checking for early stopping? How to handle the case when the validation loss might go up and down? In that case, early stopping might prevent my model from learning further, right?   Thank you in advance. How do I create a link? Say I am extending The blockBase class to create a custom block, and I am implementing the blockBuild method to create some markup for my block. Something like this:   class YourModuleBlock extends BlockBase {     /**      * Implements \Drupal\block\BlockBase::blockBuild().      */      public function build() {       return array(         '#markup' =&gt; 'This is a block!',       );      }    }   If I wanted to provide a link in this markup, in D7 I would have used the l function, but this is no longer available (). So, I need to make available the new D8 method for generating links. I could just use an &lt;a&gt; tag, but this was never best practice in D7.  So, what is the right method to use for creating links and how do I make it available to my function? How to ask "If you have any problem then ask me" in polite manner Overheating results in system shutdown "invalid EFI file path" while booting Windows How to access "The grimm Troupe" and "Hidden dreams" content in Hollow Knight? In these two official announcements from Team Cherry, it's said:       Grimm’s quest, and all other new features can be accessed at any point   in your Hollow Knight journey.        Hollow Knight: Hidden Dreams content is accessible at any point in the   game, whether starting fresh or scouring for completion.   I still haven't find any way to start the quests from the menus or during beginning of the game. Some sources say the content can only be accessed late in the game from specific locations.  So, is Team Cherry simply lying in our faces? Permanently blocking a domain in iptables Suppose I want to block Facebook permanently. To do this, I have followed following processes:     #host -t a www.facebook.com   Sample output:     www.facebook.com has address 69.171.224.40   Find CIDR     #whois 69.171.224.40 | grep CIDR   Sample output:     CIDR:           69.171.224.0/19   To prevent outgoing access to www.facebook.com  Approach 1:     #iptables -I FORWARD -p tcp -d 69.171.224.0/19 -j DROP   Approach 2:     #iptables -I FORWARD -p tcp -d www.facebook.com -j DROP   Both Approaches work well. In approach 1, IP address may be changed so it will not block Facebook permanently. I don't know about approach 2 whether it will block Facebook permanently or not. If above approaches are not right way to block a domain permanently, how can I do it? Cardinality of order types in $\mathbb{N}$ Let be the next equivalence relation on $B= \{R \subseteq \mathbb{N}\times\mathbb{N} \ | \ R \ is \ a \ well-order \ on \  \mathbb{N}\}$ : $$"R \equiv R' \leftrightarrow \ (\mathbb{N},R) \cong (\mathbb{N},R') \ are \ well-ordering \ sets \  isomorphic" $$  Which is the cardinality of $B/\equiv$?  Firstly, we can notice that each well-ordering set is isomorphic to an ordinal $\alpha \ $such that $\alpha &lt; \aleph_{1}$, and so it is enough to count how many ordinals are isomorphic to a subset of $\mathbb{N}$. For example, if we consider $A$ the set of the even numbers and $B$ the set of odd numbers with the usual order relation, $A \oplus B$ is isomorphic to $\omega + \omega$. Another example could be: if we consider the order of $\mathbb{N}$ that we use in Sharkowski Theorem, that order is isomorphic to $ \omega^{2} + \omega$. Working with prime numbers we could build also $\omega^{n} \ \forall n \in \mathbb{N}$, and so $\omega^{\omega}$ and maybe something bigger. However, we know that each countable ordinal is isomorphic to a subset of $\mathbb{Q}$, but I bet that the same result is not true for $\mathbb{N}$ because it is "too small".  What can I do?