Microsoft windows needs an anti virus program to protect system from virus and other programs which are harmful for the system. Is there any need of such type program for Ubuntu OS? If not then why?
I thought that there was no need to scan for viruses either in Ubuntu or any Linux distros until I found virus scanner packages clamtk and klamav in Ubuntu software center yesterday.  This leads to the following questions:   How do viruses differ between Linux and Windows? How do the strategies for protection differ between Linux and Windows? Should a virus scanner package be installed on my system? If so, which would be a better option?
php SimpleXML check if a child exists What I get:  host:~ user$ cat example.txt some texthost:~ stas$   What I want to get:  host:~ user$ cat example.txt some text host:~ stas$   Is there a way I can make cat behave like this?  I'm using bash on Mac OS X. Does a polymorphed creature remember who his friends are? In my custom Drupal 8 plug-in I perform such query:  $select = db_select('my_table', 'e'); $select-&gt;addField('e', 'field1');  $select-&gt;condition('field3', 'NULL', '!='); $select-&gt;condition('field4', array(11, 12, 31, 32, 33), 'IN');  $select-&gt;groupBy("e.field1"); $select-&gt;orderBy("e.field1"); $select-&gt;orderBy("e.field5"); $entries = $select-&gt;execute()-&gt;fetchAll(\PDO::FETCH_ASSOC);    And it works fine. It returns me all records grouped by field1 that meets the condition, orderered. But it returns only field1 column.  I wanted to get more columns, so I have added another $select-&gt;addField('e', 'field2'); just after first one:  $select = db_select('my_table', 'e'); $select-&gt;addField('e', 'field1'); $select-&gt;addField('e', 'field2');  $select-&gt;condition('field3', 'NULL', '!='); $select-&gt;condition('field4', array(11, 12, 31, 32, 33), 'IN');  $select-&gt;groupBy("e.field1"); $select-&gt;orderBy("e.field1"); $select-&gt;orderBy("e.field5"); $entries = $select-&gt;execute()-&gt;fetchAll(\PDO::FETCH_ASSOC);    This time I get error:     Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[42000]: Syntax error or access violation: 1055 Użyto 'my_database.e.field2' bez umieszczenia w group by:   Which means "my_database.e.field2 has been used without putting in into group by". But I don't want to group by every column I select.  Unfortunatelly Drupal 8 added ONLY_FULL_GROUP_BY :( Then, how can I use groupBy and select more then one column at the same time? Do comic characters sometimes get drawn like the actor playing them? I noticed in Spider-Man's recent cameo in Captain Marvel, he appeared an awful lot like Andrew Garfield who is playing Spider-Man in the recent movie.    Irrelevant of whether it is just my imagination, do some depictions of comic characters morph to be more like an actor who plays them around the time a corresponding movie is released?  By comparison, here is Spider-Man's depiction in the Spider-Men crossover: Tips and resources for beginning designers Thanks to the internet, graphic design and programming are becoming increasingly overlapping fields.   As a programmer, I constantly find myself needing basic knowledge of Graphic Design, but have trouble locating thorough yet concise graphic design learning resources, and instead usually find bits and pieces of knowledge applicable to the task at hand.  Can you guys offer some tips or recommend some good books, tutorials, blogs, and websites which provide a beginner level overview of web design that have been, in your experience, effective and high quality learning materials. I'm not looking for tips on how to use image editing tools, but assuming a basic grasp of those, which resources and advice will best help a new designer create professional looking designs? Load external php library in custom module I’ve read a lot of topic on this but i can’t figure why it is not working for me.  I’ve built a custom module. It is working fine since return $output; in my controller class is working : I can see in front-end a page with my custom html.  I’ve written a script outside Drupal in order to test. Basically, i connect to a webervice and retrieve all the datas. It’s working fine.  Now, i want to execute that script inside the controller class.  I need to load an external php library to instantiate an object.  In my test php file (outside Drupal) a simple require_once is working.  require_once('nusoap.php');   But it is not working in my controller class.  So, i’ve activated the library module and do :  $path = libraries_get_path('nusoap') . DRUPAL_ROOT . '/modules/contrib/webservices_tr/webservices_dc/src/Controller/nusoap.php';  require($path);   It’s still not working.   Error message indiquactes :     Error: Class 'Drupal\webservices_dc\nusoap_client' not found   I’m sur the file path is correct because if i do this, i can see the content of the file.  echo file_get_contents(DRUPAL_ROOT . '/modules/contrib/webservices_tr/webservices_dc/src/Controller/nusoap.php'); die();   I’ve also tried this :  in nusoap.php (where there is the class i need to include),    namespace Drupal\webservices_dc;   and in module controller class :  use Drupal\webservices_dc\nusoap_client;   But it is still not working.  Finally, i’ve copied the content of the external php library inside the module controller and it is working.  So i’m nearly sure the issue is related to the loading of that external library.  What is the correct way to load external php library (and wait it is fully loaded) in order to use it in a custom module ? This is a spin-off question from .   says this on the subject of storage order (clustered index) and the output order     A lot of people believe that a clustered index guarantees a sort order on output. But that's not what it does; it guarantees a storage order on disk.   See, for example, .   I've read the blog post by Hugo Kornelis and understands that an index doesn't guarantee that the sql server reads the records in a specific order. Yet I have a hard time accepting that I can't assume this for my scenario?  CREATE TABLE [dbo].[SensorValues](   [DeviceId] [int] NOT NULL,   [SensorId] [int] NOT NULL,   [SensorValue] [int] NOT NULL,   [Date] [int] NOT NULL, CONSTRAINT [PK_SensorValues] PRIMARY KEY CLUSTERED  (   [DeviceId] ASC,   [SensorId] ASC,   [Date] DESC ) WITH (     FILLFACTOR=75,     DATA_COMPRESSION = PAGE,     PAD_INDEX = OFF,     STATISTICS_NORECOMPUTE = OFF,     SORT_IN_TEMPDB = OFF,     IGNORE_DUP_KEY = OFF,     ONLINE = OFF,     ALLOW_ROW_LOCKS = ON,     ALLOW_PAGE_LOCKS = ON)   ON [MyPartitioningScheme]([Date])   My original query was this:  SELECT TOP 1 SensorValue   FROM SensorValues   WHERE SensorId = 53     AND DeviceId = 3819     AND Date &lt; 1339225010   ORDER BY Date DESC   But I suggest that I could as well use this one (read below for my explanation):  SELECT TOP 1 SensorValue   FROM SensorValues   WHERE SensorId = 53     AND DeviceId = 3819     AND Date &lt; 1339225010   As you can see, my table rows are small (16bytes) and I've got only one index, a clustered. In my scenario, the table consists of 100.000.000 records at this moment (and this will most likely increase tenfold).  When the database server queries this table it has two ways of finding my rows, either it seeks the primary key and thereby reading and returning my values in desc. order of Date, or it has to do a full table scan. My conclusion is that a full table scan on all those records will be way too slow and the database server will therefore always seek the table via its primary key and thereby returning the values sorted by Date DESC Are the tags shown in a particular order? I noticed that, sometimes, the tags I add to a question are not shown in the same order I wrote them, when the question is saved. Are they shown in a particular order? If they are, in which order they are shown? How to create script with auto-complete? When I use program like svn and I type in Gnome Terminal:  svn upd   and hit Tab it's autocompleted to:  svn update   Is it possible to do something like that in my custom bash script? I have seen many questions like:      My question is: what happens if you receive this money (without doing anything or giving your bank account number) but do not do anything scammer wants?  I especially want to know about what happens with the money you got and possible legal consequences.    Is it considered yours because scammer transfered it to you? Do you have to return it? If yes, to whom and in what form? And finally, how is it that scammers are just sending money to random people? Aren't they scared that someone will simply not return it? I understand that this may be stolen money, but it surely took some effort (cash/time) to "acquire" it, so why are they just sending it away? Must present perfect tense be used if the action takes place more than once? I was told that if an action is completed once in the past, the simple past is used. Ex:  I saw that movie.  If the action is completed more than once, the present perfect tense must be used. Ex:  I have seen that movie twelve times.    So, "I have seen that movie twelve times on Tuesday." is correct and "I saw that movie twelve times on Tuesday." is incorrect? Science fiction short story: beam transporting people into the distant future Using sed what is an one liner to print the first n characters?  I am doing the following:  grep -G 'defn -test.*' OctaneFullTest.clj  | sed .... Proof that Limit of the Log is the Log of the Limit Proof that Limit of the Log is the Log of the Limit. What is the intuition behind this statement? Overdispersion and Underdispersion in Negative Binomial/Poisson Regression I was performing a Poisson regression in SAS and found that the Pearson chi-squared value divided by the degrees of freedom was around 5, indicating significant overdispersion. So, I fit a negative binomial model with proc genmod and found the Pearson chi-squared value divided by the degrees of freedom is 0.80. Is this now considered to be underdispersed? If so, how does one go about handling this? I have read a lot about overdispersion and believe I know how to handle this but information on how to handle or determine if there is underdispersion is scant. Can anyone assist?  Thanks. Change the size of a math symbol How can I get something like in the figure, where G in the middle is larger than normal letters in math mode? Finding the limit of $\frac{Q(n)}{P(n)}$ where $Q,P$ are polynomials Suppose that $$Q(x)=a_{n}x^{n}+a_{n-1}x^{n-1}+\cdots+a_{1}x+a_{0} $$and $$P(x)=b_{m}x^{m}+b_{m-1}x^{m-1}+\cdots+b_{1}x+b_{0}.$$ How do I find $$\lim_{x\rightarrow\infty}\frac{Q(x)}{P(x)}$$ and what does the sequence $$\frac{Q(k)}{P(k)}$$ converge to?  For example, how would I find what the sequence $$\frac{8k^2+2k-100}{3k^2+2k+1}$$ converges to?  Or what is $$\lim_{x\rightarrow\infty}\frac{3x+5}{-2x+9}?$$   This is being asked in an effort to cut down on duplicates, see here: Coping with  duplicate questions.  and here: . Drawing a triangle from medians Not getting email alerts on answers on Stack Overflow Not getting email alerts on answers on my questions on stackoverflow.com   Used to get it earlier (>1 month back), but not getting alerts in recent times Email field in profile is filled  In prefs, "I'd like email notifications of activity on questions I've asked" is ticked.   What is missing?  Is it possible that signing up on another Stack Exchange community (say, Server Fault), on which by default, "I'd like email notifications of activity on questions I've asked" is unchecked affects same preference on stackoverflow.com? If so, it is a bug.