Is it possible to add the field field_tags in mymodule_install() like the body field? I added a body field with node_add_body_field. I can see the field in field_config_instance table. Is there a posibility to add field_tags in hook_install() without doing it in the GUI?  Is it done by field_create_field?  if (!field_info_field('my_field')) {   field_info_cache_clear();    $field = array(     'field_name' =&gt; 'my_field',     'type' =&gt; 'custom_field_type',     'cardinality' =&gt; 1   );   field_create_field($field); }   But how to set the values for a default article or gui custom like tags field?
How can I approach implementing the following in Drupal 7?  What I need to do is create a module which defines a new fieldable entity, called 'Company'. I have a list of, let's say, 20 fields that need to be filled out by each Company instance. These questions are predefined and some may contain custom validation.  At the moment, I'm at the point when I can add new fields to the Company entity. This works fine at the moment. My issue is that I need all these fields to be there as soon the module is installed, so adding them via the interface isn't an option.  I was wondering how can I approach this? I'd assume it comes down being able to do what can be done using the 'Manage Fields' UI programmatically.
I haven't filed 2020 taxes yet. On my last return (2019) my adult daughter was on my return as a dependent. When I file 2020, I will not put her on my return as a dependent, because she finished college in 2019. I had her file her 2020 return early this year so she would be sure to get a stimulus check in case they did another one (I assumed they would exclude adult dependents as they had with previous stimulus payments). Today, she got the $1,400 deposited to her account by the Treasury. However, I was surprised to see $4,200 deposited to my account, when I expected only $2,800 (for me and my wife). They paid for my daughter twice, $1,400 to her (based on her 2020 return) and $1,400 to me (based on my 2019 return that showed her as a dependent). They have the social security numbers, so I assumed the IRS and Treasury would have figured this out. I have searched and searched, but am unsure whether this overpayment will be clawed back or not. I can't even find a mechanism for returning it (and getting credit for doing that if they later do say I owe it to them). I've read if your 2019 income made you eligible, but your 2020 income (if you file after the stimulus) would have made you ineligible, they won't claw back the stimulus they sent. Stimulus money for people that died between the tax return and the stimulus disbursement does have to be returned to the treasury. I can't find guidance for our situation. There must be a fair number of people with college kids that have the same scenario. This question  seems at first to ask the same thing, but it doesn't include the key point of overpayment by the Treasury. Why does 1+++2 = 3? How does Python evaluate the expression 1+++2?  How many ever + I put in between, it is printing 3 as the answer. Please can anyone explain this behavior  And for 1--2 it is printing 3 and for 1---2 it is printing -1 Why is the Star Trek 2009 reboot called a reboot? Which groups have precisely two automorphisms Which groups $G$ have precisely two automorphisms, i.e., precisely one non-trivial automorphism?  Examples: $G= C_3, \mathbf{Z},\ldots$.  I think $G$ has to be abelian. In fact, we have $ \vert G\vert \geq 3$. Therefore, if $G$ is not abelian, we have at least two non-trivial inner automorphisms.  If we can show that $G$ is cyclic the above examples are all of them. Using something like this:  try:    # Something... except Exception as excep:    logger = logging.getLogger("component")    logger.warning("something raised an exception: " + excep)    logger.info("something raised an exception: " + excep)   I would rather not have it on the error-level cause in my special case it is not an error. A "failed to fetch" error occurs when apt-get update is run. How do I fix this? How can I `alias sudo !!`? I'm trying to set an alias for sudo !! in Bash. I tried alias sbb='sudo !!', but it interprets that as a literal  !! and prints   sudo: !!: command not found   If I use double quotes, it substitutes the double bang in the string itself, so that doesn't work.  Is there any way to make this work? Or an alternative alias? ` How many "polygons" does my model have? I have my model and in the info bar its show this   May I need to know how many polygons it has, but  there is no option to find polygons. Verts, Edge and Faces nothing polygon option there. In the website its say that the upload limit is 400,000 polygons. I did not get over that limit or how many polygons my model has? Agreement in "[Singular Noun] Is/Are [Plural Noun]"? Is it possible in Ruby to get a reference to methods of an object ( I would like to know if this can be done without procs/lambdas ) , for example , consider the following code :   class X   def initialize     @map = {}     setup_map   end    private   def setup_map     # @map["a"] = get reference to a method     # @map["b"] = get reference to b method     # @map["c"] = get referebce to c method   end    public   def call(a)     @map["a"](a) if a > 10     @map["b"](a) if a > 20     @map["c"](a) if a > 30   end    def a(arg)      puts "a was called with #{arg}"   end    def b(arg)      puts "b was called with #{arg}"   end    def c(arg)     puts "c was called with #{arg}"   end end   Is it possible to do such thing ? I would like to avoid procs/lambdas because I want to be able to change the behaviour of A,B,C by subclassing . I have a long line of code that I want to break up among multiple lines. What do I use and what is the syntax?  For example, adding a bunch of strings,  e = 'a' + 'b' + 'c' + 'd'   and have it in two lines like this:  e = 'a' + 'b' +     'c' + 'd' How to get the file name and a line number of a function call? While drawing a simple 3D (fake 3D in fact) cube, I realized that the corners end up with unwanted extensions of the line. I understand this is related to the width of the lines themselves, but how can I remove them? An alternative solution of drawing the desired figure is also welcomed.  Example:  \documentclass{article} \usepackage{tikz}   \begin{document} \begin{tikzpicture}  \draw[draw=black,fill=gray!20] (0,0) --(4.8,0)-- (4.8,5)--(0, 5)--cycle; \draw[draw=black,fill=gray!20] (4.8,5) -- (4.9,4.8)--(4.9,-0.1)--(4.8,0)--cycle; \draw[draw=black,fill=gray!20] (0,0) -- (0.1,-0.1)--(4.9,-0.1)--(4.8,0)--cycle; \draw[dashed,draw=black] (4.8,5) -- (4.9,4.8)--(0.1,4.8)--(0.,5)--cycle; \draw[dashed,draw=black] (0.1,-0.1)--(0.1,4.8)--(0.,5)--(0,0)--cycle; \end{tikzpicture} \end{document} Is “I medalled in volleyball” a grammatically correct sentence? According to OED, medal is a verb and a noun. I haven't seen any usage of the word as a verb, but I am assuming the above sentence is correct. How can I make my Photoshop text appear like it does on the web? Do I really have to design everything in Photoshop with anti-aliasing set to "none"?  I'm sure there is a better way.    I'd like to have a setting so that when picking a basic web-safe (such as Tahoma) in Photoshop so I can see what it will actually look like when on the web.  For example: The difference between Tahoma with anti-aliasing set to "crisp" in Photoshop and how it renders in Firefox is major.  It looks nice and smooth in Photoshop and looks like crap on the web.  Is there a anti-aliasing choice that is best to start with (that has the most similar outcome) when planning to have the content live on the web? How to show that $\int_0^1 \left(\sqrt[3]{1-x^7} - \sqrt[7]{1-x^3}\right)\;dx = 0$ View history of commands run in terminal Is there a way to save all my typed terminal commands and view it like history in a log book? Morphing only a part of a full path in tikz This might be a tikz newbie question but I have some trouble solving this.  I want to draw and fill a rectangular path where path morphing should be applied only to the upper side of the shape, more specifically I want to have an upper part with random steps. The rest of the path (left, lower and right sides) should just be straight lines. The shape should be closed and filled with one color.   My problem is that I cannot figure out how to apply the morphing only to the upper side and I suppose I cannot break up the path into different subpaths since I want to fill the final shape. Is there a way to use the morphing only on a part of the full path? Another problem is that the cycle command does not really close the shape at the upper left corner.  I tried to find a solution in the tikz manual but there was nothing that really helped me.  Here is some example code:  \documentclass[tikz, border=10pt]{standalone} \usepackage{tikz}  \begin{document}  \usetikzlibrary{decorations.pathmorphing} \begin{tikzpicture}  \draw[decorate, decoration={random steps,segment length=3.0mm, amplitude=2.0mm}, thick, rounded corners=1ex, fill=brown!70] (0,0) -- (4,0) -- ++(0, -1) -- ++(-4,0) -- cycle;   \end{tikzpicture} \end{document} What is the difference between class and instance attributes? So the complex number z is given as   $z=1-cos(2\theta)-isin(2\theta)$  And the question is to find the argument of z in terms of $\theta$.   So, I used the formula for calculating the argument of a complex number:  $arg(z)=arctan (\frac{sin(2\theta)}{1-cos(2\theta)})$  $=arctan (\frac{2sin\theta cos\theta}{1-(1-2sin^2\theta)})$  $=arctan (\frac{2sin\theta cos\theta}{2sin^2\theta})$  $=arctan (\frac{cos\theta}{sin\theta})$  $=arctan (cot\theta)$  $=arctan (tan(\frac{\pi}{2}-\theta))$  $=\frac{\pi}{2}-\theta$  But apparently the answer is $\theta-\frac{\pi}{2}$.  Where might have I gone wrong?  Edit: the domain given in the question for $\theta$ was $0≤\theta≤\pi$