I recently update my ubuntu kernal to 5.10.13-051013-generic after the installation , when i press my brightness key to increase it will decrease the screen brightness , graphical control slider also like that? What happened here please Help neofetch              .-/+oossssoo+/-.               rjay@rjay-HP-15-Notebook-PC          `:+ssssssssssssssssss+:`           ---------------------------        -+ssssssssssssssssssyyssss+-         OS: Ubuntu 20.04.2 LTS x86_64      .ossssssssssssssssssdMMMNysssso.       Host: HP 15 Notebook PC 096E10000040     /ssssssssssshdmmNNmmyNMMMMhssssss/      Kernel: 5.10.13-051013-generic    +ssssssssshmydMMMMMMMNddddyssssssss+     Uptime: 1 hour, 1 min   /sssssssshNMMMyhhyyyyhmNMMMNhssssssss/    Packages: 2100 (dpkg), 17 (snap)  .ssssssssdMMMNhsssssssssshNMMMdssssssss.   Shell: bash 5.0.17  +sssshhhyNMMNyssssssssssssyNMMMysssssss+   Resolution: 1366x768  ossyNMMMNyMMhsssssssssssssshmmmhssssssso   DE: GNOME  ossyNMMMNyMMhsssssssssssssshmmmhssssssso   WM: Mutter  +sssshhhyNMMNyssssssssssssyNMMMysssssss+   WM Theme: Adwaita  .ssssssssdMMMNhsssssssssshNMMMdssssssss.   Theme: Yaru-dark [GTK2/3]   /sssssssshNMMMyhhyyyyhdNMMMNhssssssss/    Icons: Yaru [GTK2/3]    +sssssssssdmydMMMMMMMMddddyssssssss+     Terminal: gnome-terminal     /ssssssssssshdmNNNNmyNMMMMhssssss/      CPU: Intel Pentium N3530 (4) @ 2.582      .ossssssssssssssssssdMMMNysssso.       GPU: Intel Atom Processor Z36xxx/Z37        -+sssssssssssssssssyyyssss+-         Memory: 1555MiB / 3810MiB

I use the last Ubuntu version (18.10) on my laptop (Compaq 15-s020nf) and the brightness button are inverted. I got the same behavior when I control the backlight with the command line:  echo 1000 > /sys/class/backlight/intel_backlight/brightness  # I got a bright screen echo 6000 > /sys/class/backlight/intel_backlight/brightness  # I got a dark screen   Do you have any advice to resolve that ?


I have a raster where null values are stored as -9999. I want to change these to 0. Googling suggests this can be done in the raster calculator, but e.g. (layer name = -9999) * 0 doesn't work. And indeed other pages suggest that any formula including a null will return a null. I've also tried r.reclass, reclassify by table and by layer, but none are giving me what I need - which is simply to change -9999 values to 0.

I'm having problems with QGIS. I have some rasters that appear to have NULL values, even though I reclassified them to obtain a Boolean raster. How can I change the NULL values to 0?


I have a polynomial $p(z) = (z+i)^{100} - (z-i)^{100}$ and I am trying to show that all roots should be real. I was thinking I should use the Fundamental Theorem of Algebra which says that every non-constant polynomial has at least one zero in C. I thought maybe I needed to prove that $p(z)$ has no complex coefficients and hence no zeros would be in C. However I am not sure if I am on the right track and if I am, where can I go from there. If the exponents were smaller, I would probably expand the function and check the coefficients like that. The number being too big here, I am guessing I am missing a more elegant solution. Another idea would be to try to find a root or two and and see if there is a pattern whereby I can show that all roots are real. Is this possible? How would I proceed to find any such root?

How does one prove that all the coefficients of this polynomial: $$(x+i)^{10}+(x-i)^{10}$$ are real numbers, without using Newton's Binomial Theorem?


I am implementing an offline html to pdf printing function.  I want to get the html that would be returned by a view and save it to a file on the server side.      public JsonResult MyReportOfflinePrint(MyParameters p)     {         ActionResult res = MyReportPrintMethod(p);         using (StreamWriter sw = new StreamWriter("myreport.html")) {             sw.Write(res.GetTheHtmlString???)          }          return Json("it worked");   I could use http as a web service and call self, but since this view is already available in the same controller that seems like a waste.  I have seen questions about calling a different controller, and returning a raw string as a view, but I want to capture the html string produced by razor engine.

I want to output two different views (one as a string that will be sent as an email), and the other the page displayed to a user.  Is this possible in ASP.NET MVC beta?  I've tried multiple examples:  1.      If I use this example, I receive the "Cannot redirect after HTTP   headers have been sent.".   2.      If I use this, I seem to be unable to do a redirectToAction, as it   tries to render a view that may not exist. If I do return the view, it   is completely messed up and doesn't look right at all.   Does anyone have any ideas/solutions to these issues i have, or have any suggestions for better ones?  Many thanks!  Below is an example. What I'm trying to do is create the GetViewForEmail method:  public ActionResult OrderResult(string ref) {     //Get the order     Order order = OrderService.GetOrder(ref);      //The email helper would do the meat and veg by getting the view as a string     //Pass the control name (OrderResultEmail) and the model (order)     string emailView = GetViewForEmail("OrderResultEmail", order);      //Email the order out     EmailHelper(order, emailView);     return View("OrderResult", order); }   Accepted answer from Tim Scott (changed and formatted a little by me):  public virtual string RenderViewToString(     ControllerContext controllerContext,     string viewPath,     string masterPath,     ViewDataDictionary viewData,     TempDataDictionary tempData) {     Stream filter = null;     ViewPage viewPage = new ViewPage();      //Right, create our view     viewPage.ViewContext = new ViewContext(controllerContext, new WebFormView(viewPath, masterPath), viewData, tempData);      //Get the response context, flush it and get the response filter.     var response = viewPage.ViewContext.HttpContext.Response;     response.Flush();     var oldFilter = response.Filter;      try     {         //Put a new filter into the response         filter = new MemoryStream();         response.Filter = filter;          //Now render the view into the memorystream and flush the response         viewPage.ViewContext.View.Render(viewPage.ViewContext, viewPage.ViewContext.HttpContext.Response.Output);         response.Flush();          //Now read the rendered view.         filter.Position = 0;         var reader = new StreamReader(filter, response.ContentEncoding);         return reader.ReadToEnd();     }     finally     {         //Clean up.         if (filter != null)         {             filter.Dispose();         }          //Now replace the response filter         response.Filter = oldFilter;     } }   Example usage  Assuming a call from the controller to get the order confirmation email, passing the Site.Master location.  string myString = RenderViewToString(this.ControllerContext, "~/Views/Order/OrderResultEmail.aspx", "~/Views/Shared/Site.Master", this.ViewData, this.TempData);


We know that  is generally a one-way function where we can't retrieve the original message. On the other hand, encryption is a two-way-function where we get the original message from the encrypted message or vice versa. So, in a normal sense, we can't use hash function to construct an encryption algorithm.  What I want to know is, if it’s theoretically possible to somehow create an encryption algorithm using a hash function, or if any encryption algorithm uses hash function in any part of their algorithm?

Say I have an embedded device which is only capable of doing HMAC-SHA1 transformations (that device is, in fact, a YubiKey).  Would it be secure to feed it like a block cipher in counter mode to get a random pad suitable as an stream cipher?  Of course, I'm talking about not repeating the counter value ever to encrypt data (so this construction would also need some random IV or treating the counter value as a nonce forever).


The errors:  Nov 30 04:58:26 serverm postfix/anvil[32747]: statistics: max connection rate 1/60s for (smtp:*.*.*.*) at Nov 30 04:48:26  Nov 30 04:58:26 serverm postfix/anvil[32747]: statistics: max connection count 1 for (smtp:*.*.*.*) at Nov 30 04:48:26  Nov 30 04:58:26 serverm postfix/anvil[32747]: statistics: max cache size 2 at Nov 30 04:53:26   The attachment size is 75 MB. Any idea ?

When sending large email to a new CentOS6 server running Postfix as the MTA, the following message is returned:  tried to deliver your message, but it was rejected by the recipient domain. We recommend contacting the other email provider for further information about the cause of this error. The error that the other server returned was: 552 552 5.3.4 Error: message file too big (state 18)  I found the following , but am unclear as to where it needs to be added in the main.cf file:  This was caused by Postfix and it's limit on not only messages but mailbox sizes. I had to add this setting in /etc/postfix/main.cf: message_size_limit = 31457280  How can the maximum mail size (including attachments) be increased in Postfix?


Problem  I just received the Nvidia laptop I ordered specifically for coding and deep learning. So I just erased Windows while installing Ubuntu.  The installation procedures follow Ubuntu community listed below.        I initially thought there would be no much pain since I do not need dual boot (as I said, I ordered this machine solely for coding and deep learning). However, I am get stuck in purple screen that looks like    It seems that this issue is releated to Nvidia GPU driver, which governs the display. However, all the workarounds I could find assume users could access GRUB, which is not my case since I erased Windows.  Could some help me? Thank you in advance!  Update  I would like to clarify several things   I burned the USB correctly, and could see GRUB like the following, and finally could boot into USB by setting nouveau.modeset=0   I completed all the steps in the Ubuntu installation and probably installed it correctly. After the Ubuntu installation, I tried to reboot the machine but initially it is all purple, and then the image shown before.

I know that editing the boot options line and adding 'nomodeset' solves the problem of my laptop during LiveCD mode, what I don't know is how to set it at boot up through Grub2 after I've installed Ubuntu.  So, my question is; how do I set nomodeset before I boot into Ubuntu?


In advance, I'd like to apologize if it's a duplicate question... I can't find a direct answer, probably because I'm not a native english speaker.  Straight to the subject:  I have 2 tables: company, which contains some companies (of course) and service, which contains general services that can be provided by the companies. Now I need to create another table in order to build the link between company and service, since it's a many-to-many relationship.   Which is the best choice for primary key in this case (considering conventions and performance)?  - like this, making use of an "independent" unique field id   CREATE TABLE IF NOT EXISTS `mydb`.`company_service` (   `id` INT NOT NULL,   `company_id` INT NOT NULL,   `service_id` INT NOT NULL,   PRIMARY KEY (`id`)) ENGINE = MyISAM   or  - like this, with the two fields that represents the foreign keys composing the primary key?   CREATE TABLE IF NOT EXISTS `mydb`.`company_service` (   `company_id` INT NOT NULL,   `service_id` INT NOT NULL,   PRIMARY KEY (`company_id`, `service_id`)) ENGINE = MyISAM   ... or none of these, maybe a third design?  My working environment is MySQL.

I have a junction table like this:  CREATE TABLE `entitytagjunction` (      `EntityId` bigint(20) NOT NULL,      `TagId` bigint(20) NOT NULL,       PRIMARY KEY (`EntityId`,`TagId`),      KEY `IX_EntityId` (`EntityId`) USING HASH,      KEY `IX_TagId` (`TagId`) USING HASH,       CONSTRAINT `FK_EntityTagJunction_Entities_EntityId`          FOREIGN KEY (`EntityId`) REFERENCES `entities` (`Id`)          ON DELETE CASCADE ON UPDATE CASCADE,      CONSTRAINT `FK_EntityTagJunction_Tags_TagId`          FOREIGN KEY (`TagId`) REFERENCES `tags` (`Id`)          ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8;   I have EntityId and TagId as composite primary key to ensure uniqueness, and SQL Server and MySql will both use the primary key as clusteredId.   As far as I could read from the other posts, Guid is not good to be a primary key because the randomness make fragments for clusteredIds, poor for performance if the table consist of millions of rows. Apparently the combination of EntityId and TagId has some randomness. Will this have impact on performance when using them as a composite primary key and clusteredId by default? or should I add an int column as a surrogate primary key though it will not be used in applications?


I'm getting really worried as I realized my firstname and lastname were reversed on my flight tickets from Geneva (Switzerland) to Boston (USA). I tried to call the website from which I got the ticket (opodo UK), and the airline company (TAP Portugal): both are saying they can't change these names and ask me to see with each other. I tried 3 times each so I'm becoming crazy!!!! Finally Opodo told me they'll check with the company and will let me know in 3 days if it's possible or not.  My flight is leaving in 5 days so I really don't know what to do. Do I need to buy another ticket? It'll cost a lot but I'm thinking it's my last option... Is it really risky to travel with reversed firstname and lastname? If it won't be for the USA I'll me a bit more quiet, but it's not the case .  Thanks in advance for your help.

I'm flying to Peru with my girlfriend next week and I realized that her name is incorrect on the reservation.  Instead of Sally Marie Jones it's Jones Marie Sally.  We're flying into Houston, then Lima, and in Lima we switch airlines for our flight to Cajamarca.  I booked the ticket with Orbitz who made the reservation with United. United booked the flight with LAN air, the Peruvian airline.  Both companies say that they are unable to change the name because of TSA restrictions not allowing a name change. I asked if I could just cancel and re-book, but United said they could not do this because there are multiple airlines involved.  A note has been attached to the reservation explaining the issue, and the United rep said that they would be able to print her boarding pass with the correct name. However, he said there are no guarantees that she'll be able to fly because although the boarding pass will be correct, the ticket will still have the reversed name.  I was prepared to just take the chance that it will all work out, seeing how it's really obvious the name is just backwards, but with recent events I'm worried that US airport security is going to be extra strict for the next little while.  Is this something I need to worry about, or are chances good that this will work out fine?  The United rep said there's a chance we could cancel the United flights and get a new ticket with the correct name for no cost, but we'd have to pay for new tickets within Peru ($500 out of the total $1300 ticket cost). I'd rather not do this unless there's a reasonable chance we'll have trouble at the airport.


I read some of the posts here about lightsaber physics, but I never found an explanation to a question someone just asked me:  When a lightsaber duel is happening, is it a useful tactic to turn off one's saber for a split second, allowing you to avoid certain obstacles (like the opposing saber)?

Since my early childhood I've been wondering about the answer to one question about Star Wars:   Why, when fighting with lightsabers, do they use them to parry attacks rather than turning the lightsaber off momentarily?   It seems like they would be able to use this to unbalance their opponent (who is expecting to make contact) then re-activate their lightsaber when their opponent's head is above the handle.


After upgrading from kernel linux-image-3.13.0-49-generic to linux- image-3.13.0-51-generic, I am getting this error message in dmesg on startup:  [ 6.352555] mei_me 0000:00:16.0: irq 47 for MSI/MSI-X [ 6.355708] mei_me 0000:00:16.0: version message write failed: ret = -5 [ 6.355712] mei_me 0000:00:16.0: hbm_start failed ret = -5 [ 6.355714] mei_me 0000:00:16.0: reset failed [ 6.355716] mei_me 0000:00:16.0: link layer initialization failed. [ 6.355717] mei_me 0000:00:16.0: init hw failure. [ 6.355880] mei_me 0000:00:16.0: initialization failed.   What do I do to correct this?

The following lines are getting displayed while Ubuntu is booting.  [   27.981086] mei_me 0000:00:16.0: irq 60 for MSI/MSI-X [   27.985007] mei_me 0000:00:16.0: version message write failed: ret = -5 [   27.985071] mei_me 0000:00:16.0: hbm_start failed ret = -5 [   27.985123] mei_me 0000:00:16.0: reset failed [   27.985166] mei_me 0000:00:16.0: link layer initialization failed. [   27.985224] mei_me 0000:00:16.0: init hw failure. [   27.987404] mei_me 0000:00:16.0: initialization failed.   I've been using it for around 4-5 months now and this is the first time I got this message. I'm able to log in and everything seems to be working fine. But this error message is bugging me.  Is there a way to fix this.  I'm using Ubuntu 14.04 LTS.  Thanks in advance.    UPDATE #1  Added blacklist mei to /etc/modprobe.d/blacklist.conf but the error is still being displayed on boot.


Why is it that:  a = [1, 2 ,3] b = [3, 4, 5] t= np.vstack([a,b]) print(t)        # 1D array of 2 elements each of size 3 print(t[0])     # first elem of 1D array print(t[0:])    # first row of 1D array print(t[1:])    # ? u = np.array([[6, 7 ,8], [9, 10, 11]]) print(u)        # 1D array of 2 elements each of size 3 print(u[0])     # first elem of 1D array print(u[0:])    # first row of 1D array print(u[1:])    # ?   prints in last line entire array instead of only first row?  [[1 2 3]  [3 4 5]]   [1 2 3]     [[1 2 3]  [3 4 5]] [[3 4 5]] [[ 6  7  8]  [ 9 10 11]] [6 7 8] [[ 6  7  8]  [ 9 10 11]] [[ 9 10 11]]   Why the t[1:] in each case gives the second elem. of 1D array as it should give the second row of multidim array?

I need a good explanation (references are a plus) on Python's slice notation.   To me, this notation needs a bit of picking up.   It looks extremely powerful, but I haven't quite got my head around it.


My Windows\System32\DriverStore\FileRepository is 48 Gigabytes in size.  That is way bigger than I have ever seen anywhere else, and is way out of proportion for a 128GB SSD.  I know how to list the files in it, and I know how to delete them individually.  What I do not know is Which drivers are unnecessary, and which can I delete?  I use Windows 7, Home Premium, with Service pack 1, and fully up to date.  Windows Disk Cleanup and PrivaZer have not reduced the file size.  The question  is not a duplicate of this one because it does not ask How do I know a driver in the driver store CAN be safely deleted?

I am having a problem getting a specific device to work, and I am trying to start from square one by making sure there are absolutely no leftover files from driver installs on my system. Specifically I'm trying to get rid of the UC-Logic drivers for a Monoprice 10x6 tablet.   However, I have found copies of the driver files in the windows DriverStore\FileRepository. But windows will not let me delete any folders from that location.  The best info I have found so far is to use pnputil.exe, however, since the drivers are not currently installed, it is not listed as an inf file that I can remove.   I could, as a scorched earth policy, jump into OS X and just delete them from there, but I'm worried that this may cause me issues. I would much rather find the 'proper' way of doing it.


Why is 'that' in 'beyond that of"? I think it is clear without 'that'. Can we  omit 'that' here?     The nature of peace-keeping operations had evolved rapidly and   expanded beyond that of traditional military observer missions.

"Look into the motives which have induced men, once united by their   common needs in a general society, to unite themselves still more   intimately by means of civil societies: you will find no other motive   than that of assuring the property, life and liberty of each member by   the protection of all."   Would anyone please tell me what the following means?, or what does than that of assuring mean?     ... than that of assuring the property, life and liberty of each member   by the protection of all."   And, Would you possibly elaborate this:assuring the property, life and liberty of each member by the protection of all.


I have an old Samsung N148 Plus netbook (Intel Atom 1.66GHz, 1GB RAM, 250GB). I want to install Ubuntu alongside my Windows 7 Home Premium.   Any Ideas as to what flavor or what version of Ubuntu to install?

For a given hardware configuration, how do I find out if Ubuntu will run on it? What considerations should I take into account when choosing an Ubuntu version and  such as:    with a lighter desktop than the usual Gnome and Unity  with the even lighter LXDE desktop   Obviously Ubuntu does not run on some processor architectures. So how do I go about choosing the right version and derivate. How can I find out the minmal system requirements?


I was wondering if there's a way to restrict road access based on time of day (i.e., create a time restricted road). I'm familiar with restricting roads based on vehicle weight/height, but time restriction is a little different-- there's no time unit in ArcGIS (or at least I'm not aware of it).  I was thinking of using python to script the restrictions. I'd create 2 new fields (double) in the road network attribute table, 1 for when the time restriction starts and 1 for when it ends (restrict_tstart, restrict_tend). For example if the road is restricted between 10am - 2:30pm, I would put 10 in restrict_tstart and 14.5 in restrict_tend. Then I'd write a python code that returns True when the real time falls between restrict_start and restrict_tend.  Does that work? I'm not even sure where to put that script in ArcMap.  Suggestions, anyone?

I'm trying to use train tracks as a network in ArcGIS Network Analyst.   We are trying to create a model for security agents on board our trains and we'd like to optimize their daily "route". For now, it's all made by hand.   My approach is to take our gtfs data and create a network using stop times to determine when the train segment is "traversable". When there's a train on the segment, it's open, if not, it's restricted.   The problem is I can't set a restriction based on time in Network Analyst (or wasn't able to). I would like to be able to say by a formula or script than you can take that segment only from 7:03 AM to 7:10 AM for example.  Is it possible?  Thanks!


I have previously asked a question about comparing 2 strings and was told that I should always use .equals.  However, I do not understand why this then works:   String y= "Mary";  String x= "Mary";  System.out.print(x==y);   This will print true, and I do not understand why.

I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug.  Is == bad? When should it and should it not be used? What's the difference?


Let $A$ and $B$ be two nonempty disjoint subsets of $\mathbb{R}^{n}$. Put $d(A,B)=inf\left \{ ||a-b||:a\in A, b\in B  \right \}$.  a) Show that if one of the sets $A$ and $B$ is compact then $d(A,B)>0$.  b) Let $n=2$, $A=\left \{ (x,1/x):x>0 \right \}$ and $B=\left \{ (x,0):x>0 \right \}$. Show that the sets $A$ and $B$ are closed in $\mathbb{R}^{2}$, $A\cap B=\emptyset$ but $d(A,B)=0$.  My thoughts: Let $A$ be compact then it is not only closed but also bounded. Assume $d(A,B)=0$, so $inf||a-b||=0$. So $a=b$ for some $a$ and $b$. (I think  $A$ and $B$ being closed is the reason of that, but I'm not sure how to show this.) but that contradicts the fact that the sets are disjoint.  for part b:$ d(A,B)=\sqrt{((x-x)^{2}+(1/x)^{2})}$, as $x$ increases distance decrases, since $lim_{x\rightarrow \infty}(1/x)^{2}=0$, $d(A,B)=0$. For showing their intersection is an empty set $1/x\neq 0$ if $x\in \mathbb{R}$. I need to show every convergent sequence converges to a point in the sets, for showing $A$ and $B$ are closed, but I couldn't find how to.

Claim: Let $X$ be a metric space. If $A,B\in X$ are disjoint, if A is compact, and if B is closed, then $\exists \delta>0: |\alpha-\beta|\geq\delta\;\;\;\forall\alpha\in A,\beta\in B$.  Proof. Assume the contrary. Let $\alpha_n\in A,\beta_n\in B$ be chosen such that $|\alpha_n-\beta_n|\rightarrow0$ as $n\rightarrow \infty$.  Since A is compact, there exists a convergent subsequence of $\alpha_n\;(n\in\mathbb{N})$, $\alpha_{n_m}\;(m\in\mathbb{N})$, which converges to $\alpha\in A$.  We have   $$|\alpha-\beta_{n_m}|\leq|\alpha-\alpha_{n_m}|+|\alpha_{n_m}-\beta_{n_m}|\rightarrow0 \;\;\;as\;\;m\rightarrow\infty.$$ Hence $\alpha$ is a limit point of B and since B is closed $\alpha\in B$, contradiction.  Is my proof correct? I feel as though I am missing something simple which would trivialize the proof.


I have the following script: ip = input('Enter your string: ') if 'tree' in ip:    print('Correct string')  I would like to print 'Correct string' even if the user input is 'TREE' or 'tree' based on the case. How do I do that (optimally rather than using else or elif)? If the input from the user is 'TREE' then the script should give an output: CORRECT STRING  If the input from the user is 'tree' then the script should give an output: correct string  How do I do that?

How can I do case insensitive string comparison in Python?  I would like to encapsulate comparison of a regular strings to a repository string using in a very simple and Pythonic way. I also would like to have ability to look up values in a dict hashed by strings using regular python strings.


I've got a map with ~2000 villages on it & have a layer of points that corresponds to them. I'd now like to enter some information about them (the names). It would be a huge pain to do this manually by scrolling around the layer in Arcmap.  One idea would be to programmatically take screenshots in a little box around each point. I could then do data entry based on the screenshots pretty easily.   Is it possible to do this with ArcGIS Desktop?   I have a .tif image I've georeferenced and placed points on, sample as image below. I'd now like to do some data entry for each of the points. The simplest thing would be to take a screenshot of a certain area around each point and scroll through them.  The ideal final product would be:   2000 individual image files Each a screenshot centered around a point in my file with a certain zoom factor applied The below example would generate 8 image files, each centered around a red dot with a certain zoom (example output below)

How could I adapt the following code to enable me to zoom to each individual selected Geometry one after the other?   import arcpy mxd = arcpy.mapping.MapDocument('CURRENT') df = arcpy.mapping.ListDataFrames(mxd, "Layers") [0] df.zoomToSelectedFeatures() arcpy.RefreshActiveView()


I've been using Blender for a while now and recently when I import my logo which has a transparent background in image texture and plug it to my diffused colour, it doesn't overlay my logo on the diffused, rather, it adds my logo and change the whole object material to black.  I.e my alpha logo now appears to have a black background.

After converting to nodes in order to render using Cycles I've no idea where to enable the z-transparency. I guess the image textures alpha channel needs to be pluged somewhere but I've no idea which node would be suitable.   The question is how could I correctly setup the nodes to have the same effect as when using z-transparency in BI?      The materials original settings for BI are:    Which renders like:    I had no luck with DarenWs suggestion:


I m travelling from India to Casablanca and I m booked ticket from Mumbai to Casablanca and my flight is mumbai Paris Paris to Rome and Rome to Casablanca should I need transit visa  My layover is 4 hours

I found many related questions on this site but I am still not sure about the rules. How can I decide if I need a visa to transit? Schengen members as of May 2021 are as follows:  Austria Belgium Czech Republic Denmark (excluding Greenland and the Faroe Islands - but an open border with the Schengen Area is maintained) Estonia Finland France (excluding overseas departments and collectivities) Germany Greece Hungary Iceland Italy Latvia Liechtenstein Lithuania Luxembourg Malta Netherlands (excluding Aruba, Curaçao, Sint Maarten and the Caribbean Netherlands) Norway (excluding Svalbard) Poland Portugal Slovakia Slovenia Spain (except Ceuta and Melilla) Sweden Switzerland


I have a fragment layout which is the drawer and looks like this:  fragment_overview.xml  <?xml version="1.0" encoding="utf-8"?> <android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/drawer_layout" android:layout_width="match_parent" android:layout_height="match_parent">  <!-- The main content view --> <FrameLayout     android:id="@+id/content_frame"     android:layout_width="match_parent"     android:layout_height="match_parent"     android:background="#ffe887" />  <!-- The navigation drawer --> <ListView android:id="@+id/left_drawer"     android:layout_width="240dp"     android:layout_height="match_parent"     android:layout_gravity="start"     android:choiceMode="multipleChoice"     android:divider="@android:color/transparent"     android:dividerHeight="0dp"     android:background="#111"/> </android.support.v4.widget.DrawerLayout>   And the java class for that fragment:  OverviewFragment.java  @Override public View onCreateView(LayoutInflater inflater, ViewGroup container,                          Bundle savedInstanceState) {     View root = inflater.inflate(R.layout.fragment_overview, container, false);      mlistOptions = getResources().getStringArray(R.array.list_options);     mDrawerLayout = (DrawerLayout) getActivity().findViewById(R.id.drawer_layout);     mDrawerList = (ListView) getActivity().findViewById(R.id.left_drawer);      // Set the adapter for the list view     mDrawerList.setAdapter(new ArrayAdapter<String>(getActivity(),             R.layout.simple_list_item_1, mlistOptions));      mDrawerList.setOnItemClickListener(new DrawerItemClickListener());      return root; }   With this code in the resources folder:  <string-array name="list_options">     <item>Ship</item>     <item>Map</item>     <item>Mail</item>     <item>Settings</item>     <item>Logout</item> </string-array>   And this as a list item:  simple_list_item_1.xml  <?xml version="1.0" encoding="utf-8"?> <TextView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:padding="15dp" android:textColor="@android:color/black" android:textStyle="italic">     However when the setAdapter method runs in the java class it generates this error:  java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.ListView.setAdapter(android.widget.ListAdapter)' on a null object reference   What could have actually gotten wrong in that method call? It is a fragment so we need getActivity as the first parameter, the layout file is just a reference to a simple file and the optionslist is just an arraylist from the resources folder.. what can be null?  Thanks in advance!

What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them?  What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?


During my PhD I have developed two different research projects in parallel. This was not planned from the beginning, it just happened this way. I am sure each of these could be presented as a PhD and I am thinking on the possibility of presenting both, one after the other one. Would that make sense?  I had a quick talk with my Professor although I didn't ask him about this option because I had the fear he would find it a bit arrogant. So first of all, I wanted to get to know if it is meaningful.   Thanks in advance

I am studying a combined bachelor of engineering (electrical) and bachelor of mathematics; I just started this year and will graduate in 2018. The reason why I am doing double degrees and not a single degree is because I love both electrical engineering and mathematics and I could not ignore any of them. So with this in mind, I am thinking of doing two PhDs when I graduate (one in electrical engineering and one in mathematics). Is this a good path or I should concentrate on only one of them?


If Automorphhic group of Group G is  trivial group then how will you  show that order of group G is less than or equal 2.

Well, this is an exercise problem from Herstein which sounds difficult:   How does one prove that if $|G|>2$, then $G$ has non-trivial automorphism?   The only thing I know which connects a group with its automorphism is the theorem, $$G/Z(G) \cong \mathcal{I}(G)$$ where $\mathcal{I}(G)$ denotes the Inner- Automorphism group of $G$. So for a group with $Z(G)=(e)$, we can conclude that it has a non-trivial automorphism, but what about groups with center?


This is for Windows 10, and I'm nearing the end of the trial.  I do know that there is a way. If this requires administrative access, how can you get that?

The Windows Server 2012 R2 Evaluation edition had the feature of being able to be rearmed with the following command:  slmgr /rearm   This would give you 10 more days to use the machine, and could be done 4 or 5 times as needed, to gain another 10 days each time.  I installed Windows 10 Enterprise Evaluation, and ran the same command. However, upon reboot, the evaluation does not seem to want to be activated again.  slmgr /dlv reports that the grace period has expired. Attempting to manually activate windows gives an error code stating that the grace period has expired.  Are the Windows 10 Evals not rearmable to regain grace days at all?  The reason I'd like to do these rearms is so that I could make an image for machines that could be used in something similar to a lab environment for a week.


I wanted to flag a question for migration to , but there were only Meta Stack Overflow, Super User, ,  and  in the list.  Maybe it's a good idea to add an autocomplete field (or something) to enter other Stack Exchange sites?

Wouldn't it be a good idea to be able to vote for questions to be moved to any Stack Exchange site? For example, I just voted  as off topic, but that was all I could do. I wish I could've voted it be moved to .  It's OK to have the predefined list of sites that is now when voting to move, but it would be nice to have a more link, where we could pick any Stack Exchange site.  Here's a quick mockup of how I see this implemented:    When the more link is clicked, a list of all the Stack Exchange sites should appear.


My iPhone 4S is suddenly locked and it asks for Apple ID and Password. When I added them, it says my Apple ID can't activate my phone.  I can't see my iPhone listed on Find My Phone page on iCloud.com. But on my phone it is bound to that Apple ID.  Are there other ways to activate?

I bought a used iPhone 4.  The previous owner re-set the phone, but did not remove the device from their iCloud.  It is asking me for their iCloud information when I try to set-up the phone.  I don't have contact with the previous owner anymore.  Is there a way to remove the device from their iCloud so I can use a new one?


is there any way implementing this behaviour?  template < typename... Args > class MyClass { public:     typedef std::tuple < Args... > my_tuple;       template < int n >     static int bar () { return -5; };  };   What I need is this - I have variadically templated MyClass that contains method foo which is templated by another type (in my case only integer). Is this even possible? I have found simmilar solution but only for non-variadic class.  But this can't be compiled due to bar.  EDIT: I compile on gcc 4.7.2  One should run the method like this MyClass<int, int>::bar<4>()  Could anyone possibly help me please?  Thanks in advance  EDIT2: full code  #include <stdio.h> #include <stdlib.h> #include <math.h> #include <queue> #include <set> #include <vector> #include <string> #include <cstring> #include <algorithm> #include <stack> #include <map>  template < typename... Args > class MyClass { public:     typedef std::tuple < Args... > my_tuple;       template < int n >     static int bar () { return -5; };  };  template < class A, int N > static void foo() {     A::bar < N > (); }   int main() {       foo< MyClass<int, int>, 4> ();      return 0; }   EDIT3: error  $g++ -Wall -std=c++11 -g -o test.out test.cpp test.cpp: In function ‘void foo()’: test.cpp:28:16: error: expected primary-expression before ‘)’ token test.cpp: In instantiation of ‘void foo() [with A = MyClass<int, int>; int N = 4]’: test.cpp:34:30:   required from here test.cpp:28:2: error: invalid operands of types ‘<unresolved overloaded function type>’ and ‘int’ to binary ‘operator<’ make: *** [test] Error 1

In templates, where and why do I have to put typename and template on dependent names? What exactly are dependent names anyway?    I have the following code:  template <typename T, typename Tail> // Tail will be a UnionNode too. struct UnionNode : public Tail {     // ...     template<typename U> struct inUnion {         // Q: where to add typename/template here?         typedef Tail::inUnion<U> dummy;      };     template< > struct inUnion<T> {     }; }; template <typename T> // For the last node Tn. struct UnionNode<T, void> {     // ...     template<typename U> struct inUnion {         char fail[ -2 + (sizeof(U)%2) ]; // Cannot be instantiated for any U     };     template< > struct inUnion<T> {     }; };   The problem I have is in the typedef Tail::inUnion<U> dummy line. I'm fairly certain that inUnion is a dependent name, and VC++ is quite right in choking on it. I also know that I should be able to add template somewhere to tell the compiler that inUnion is a template-id. But where exactly? And should it then assume that inUnion is a class template, i.e. inUnion<U> names a type and not a function?


I´m having trouble automatically centering the p element without the use of margin-left. The body element is center aligned but since there is a background color on the p element it doesn´t work on it...       p {       background-color: dimGray;       width:250px;       margin-left: 630px;            }          h3 {       margin: 20px;     }          h1 {       margin-top: 30px     }          a {       color: red;     }          body {       background-color: black;       color: white;       text-align: center;       font-family: "Verdana", sans-serif;     }      <!DOCTYPE html>                 <meta charset="UTF-8">       <meta name="viewport" content="width=device-width, initial-scale=1.0">       <title>Netflix</title>       <link rel="stylesheet" href="style/style.css">
See what´s next

Watch anywhere, but mostly from home
       Try 30 Days Free
Watch TV shows and movies
                            It´s the grey box I have trouble with centering automatically. I can´t seem to find a way to do it.

How can I horizontally center a
 within another
 using CSS?

Foo foo


Let $R$ be a ring with unit and let $M(R)$ be a collection of all non invertible elements in $R$. If $M(R)$ is a ideal in $R$, prove that this is the only and maximal ideal  My thoughts: suppose there is a bigger ideal choose some invertible element in the bigger ideal so the bigger ideal is the whole ring because there are two elements such that $u\cdot v=1$.

My question is how would I go about proving this?     Prove that $R$ is a local ring if and only if all elements of R that are not units form an ideal.   I understand that I need to prove both directions so:  $(\Rightarrow)$ Local ring means has a unique maximal ideal, so I want to show that this implies the elements are not units.  $(\Leftarrow)$ non unit elements of $R$ form an ideal, so if I show this is unique maximal ideal I can then conclude local ring?  Any hints would be appreciated.


I am using  library for performing git operations, retrieve git info from python code. I want to retrieve all revisions for a specific file. But couldn't find a specific reference for this on the .   Can anybody give some clue on which function will help in this regard? Thanks.

How can I view the change history of an individual file in Git, complete details with what has changed?  I have got as far as:   git log -- [filename]   which shows me the commit history of the file, but how do I get at the content of each of the file changes?  I'm trying to make the transition from MS SourceSafe and that used to be a simple right-click → show history.


This is a question link from a previous question   The proposed answer is using:  \multirow{-4}{*}{\thead{Pair number \\   I could not understand the meaning of -4. usually is positive number.    Basically, I want to have the content to be a center, so the table looks nicer    The MWE:  \documentclass[12pt,oneside]{book}  \usepackage[showframe]{geometry} \usepackage{amsmath} \usepackage{ragged2e} \usepackage{booktabs, makecell, multirow, tabularx,             threeparttable, tabulary} \renewcommand\theadfont{\small\bfseries} % for bold in table using \small \renewcommand\theadgape{} \usepackage[svgnames, table]{xcolor} \usepackage{siunitx} %for table spacing to second row \usepackage{graphicx}  \usepackage[font=small,             labelfont={bf,sf}, textfont={sf},              justification=centering]{caption}  \begin{document}      \begin{table}[ht] \centering  \begin{tabular}{lrr}     \toprule     &       &           \\  % fake line     \addlinespace     &   \multicolumn{2}{c}{\thead{Accuracy Accu Accuracy (\%)}}\\      \cmidrule{2-3}  \multirow{-4}{*}{\thead{Pair number \\                         (Class 11 sample sample \& \\                         Class 22 sample sample \\                         Reference X sample sample)}}     & \textbf{Accuracy} & \textbf{Inaccuracy}                   \\      \midrule Pair 11 (A8  \& B35) & 0    &   0 \\ Pair 12 (A10 \& B42) & 0    &   0 \\ Pair 13 (A8  \& B32) & 0    &   0 \\         \bottomrule     \end{tabular} \end{table}  \end{document}   Below is the solution I tried to move around.  (1) If I delete our the & & \\ %fake line, and add in several \addlinespace  \begin{table}[ht] \centering  \begin{tabular}{lrr}     \toprule      &       &           \\  % fake line      \addlinespace       \addlinespace        \addlinespace              \addlinespace     &   \multicolumn{2}{c}{\thead{Accuracy Accu Accuracy (\%)}}\\      \cmidrule{2-3}  \multirow{-4}{*}{\thead{Pair number \\                         (Class 11 sample sample \& \\                         Class 22 sample sample \\                         Reference X sample sample)}}     & \textbf{Accuracy} & \textbf{Inaccuracy}                   \\      &  &    \\  % fake line      \midrule     (2) I tried to add in & & \\ %fake line at the bottom. But looks ugly.   \begin{tabular}{lrr}     \toprule     % &       &           \\  % fake line      \addlinespace       \addlinespace        \addlinespace              \addlinespace     &   \multicolumn{2}{c}{\thead{Accuracy Accu Accuracy (\%)}}\\      \cmidrule{2-3}  \multirow{-4}{*}{\thead{Pair number \\                         (Class 11 sample sample \& \\                         Class 22 sample sample \\                         Reference X sample sample)}}     & \textbf{Accuracy} & \textbf{Inaccuracy}                   \\     % &  &    \\  % fake line      \midrule     (3) I am taking of using  \multirow and \multicolumn together.  &   \mutlirow{0}{*}{\multicolumn{2}{c}{\thead{Accuracy Accu Accuracy (\%)}}}\\    But couldn't make it up.

I had tried to increase the number from 2 to 4 where I need 4 lines  \multirow{4}{*}{\thead{Pair number \\ (Class 11 sample sample \& \\ Class 22 sample sample \\ Reference X sample sample)}} &      \documentclass[12pt,oneside]{book}  \usepackage[showframe]{geometry} \usepackage{amsmath} \usepackage{ragged2e} \usepackage{makecell, multirow, tabularx} \renewcommand\theadfont{\small\bfseries} % for bold in table using \small \renewcommand\theadgape{} \usepackage[svgnames, table]{xcolor} \usepackage{hhline, boldline} \usepackage{seqsplit, caption} %for table spacing to second row \usepackage{booktabs, ragged2e} % Use booktabs rules and get rid of vertical rules, ragged2e to ragged text \usepackage{siunitx} %for table spacing to second row \usepackage{threeparttable} %to add footnote below table \usepackage{tabulary} \usepackage{graphicx}  \usepackage[font=small,labelfont={bf,sf}, textfont={sf}, justification=centering]{caption}  \begin{document}   \begin{table}[h!] \centering \sisetup{table-format=3.0, table-number-alignment=center, table-column-width=2.0cm}  \begin{tabular}{lrr}     \toprule      \multirow{4}{*}{\thead{Pair number \\ (Class 11 sample sample \& \\ Class 22 sample sample \\ Reference X sample sample)}} &  \multicolumn{2}{c}{\thead{\makebox[0pt]{Accuracy Accu Accuracy (\%)}}}\\ \cmidrule{2-3}     &{\textbf{Accuracy}}      & {\textbf{Inaccuracy}} \\      \midrule     Pair 11 (A8 \& B35) & 0  &   0 \\     Pair 12 (A10 \& B42) & 0   &  0 \\     Pair 13 (A8 \& B32) & 0   &  0 \\         \bottomrule     \end{tabular} \end{table}   \end{document}


Please refer to the image below. The question asks: 'The effective capacitance between terminals A and B in the network shown in the adjoining figure is?'    Here is my working: (C5 and C6 connected in series.. in parallel to C2 and C4 connected in series).. connected in series with C1 and C3. Series(C5+C6) = 1 microFarad Series(C2+C4) = 1.5 microFarads Parallel (1+1.5) = 2.5 microFarads Series(C1+C3+2.5) = 15/26 microFarads (Answer)    The correct answer from the marking scheme is 8/3 microFarads. Could someone please explain how to get to this answer? I am really confused.    Thanks

I simply can't figure out what the capacity of this circuit is.  I can do the math myself, I just need a hint how to create an equivalent circuit where it is obvious what is parallel and what is in series...


I'd like to know the necessary assumptions of maximum likelihood estimation for a linear regression. Hope to hear some explanations.

Can someone briefly explain for me, why each of the six assumptions is needed in order to compute the OLS estimator? I found only about multicollinearity—that if it exists we cannot invert (X'X) matrix and in turn estimate overall estimator. What about the others (e.g., linearity, zero mean errors, etc.)?


Question about  states, chapter 8.4.2!  We have $I[w] := \int_U \frac{1}{2}|Dw|^2 - fw\, dx$,  among all functions $w$ belonging to the set  $$\mathcal{A}  : = \{w \in H_0^1(U) : w \geq h \, \mbox{ a.e. in } U\}$$  with smooth $h$ and $f$.  And we have:      Theorem: Assume the admissible set $\mathcal{A}$ is nonempty. Then there   exists a unique function $u \in \mathcal{A}$ satisfying      $$I[u] = min_{w \in \mathcal{A}} I[w]$$   I don't understand how we can say that $L$ is weakly lower semicontinuous. And I think we need to have this for the proof of the existence.

I am studying calculus of variation, and I need to prove that  $I[w] = \int_U \frac{1}{2} |Dw|^2 - fw \, dx$ with $f \in L^2(U)$  is weakly lower semicontinuous on $H_0^1(U)$.  In classes, I only learned that     Assume L is bounded below, and in addition $L(p,z,x)$ is convex in $p$,    for each $z \in \mathbb{R}$, $x \in U$. Then $I[.]$ is weakly lower semicontinuous on $W^{1,q}(U)$, where $I[w] = \int_U L(Dw, w, x)$.   And I think my $L$ isn't bounded below.   I don't know how I can solve the problem.


I have got several cases in my article with a brief description of each. I would like to add a drawing wrapped with text.   To highlight my cases I use enumerate package.  Unfortunately it doesn't work.   Here is my code      \begin{enumerate}     \item Case 1 \\     A brief discription of case one.     \begin{wrapfigure}{r}{0.5\textwidth}             \includegraphics[width=0.48\textwidth]{Case_1.png}         \caption{Fig1:Case_1}     \end{wrapfigure}     \end{enumerate}   Is there any way to fix it?

My code are as follows:   \documentclass{article}     \usepackage[utf8]{inputenc}     \usepackage{lipsum}     \usepackage{booktabs}     \input{insbox}     \makeatletter     \@InsertBoxMargin = 12pt     \makeatother     \usepackage{nccmath}     \usepackage[showframe, nomarginpar]{geometry}     \usepackage{etoolbox} \usepackage{graphicx}     \newcommand*{\wrapitem}{\apptocmd{\labelenumi}{\hskip\leftmargin}{}{}\item\apptocmd{\labelenumi}{\hskip-\leftmargin}{}{}}     %     \newcommand{\InsertListL}[3][]{%     \setlength{\leftskip}{\leftmargin}\mbox{}\vspace*{-\baselineskip}%     \InsertBoxL{#2}{#3}[#1]\par \hspace{\itemindent}     }%     \newcommand{\InsertListR}[3][]{%     \mbox{}\vspace*{-\baselineskip}\setlength{\leftskip}{\leftmargin}%     \InsertBoxR{#2}{\hskip-\leftmargin#3\hskip\leftmargin}[#1]     }%      \begin{document}      \begin{enumerate}%      \wrapitem%     \InsertListL[2]{2}{\includegraphics{./images/c01uf006.pdf}}%     \lipsum[1]       \item     \InsertListR[12]{-40}{\includegraphics{./images/c01uf007.pdf}}     \lipsum[2]      \wrapitem%     \InsertListL[2]{2}{\includegraphics{./images/c01uf006.pdf}}%     \lipsum[1]      \end{enumerate}      \end{document}   Please suggest the below:   How can I move the wrap images vertically (upper and down movement)? How can I control unnecessary vertical white spaces?   Also, please correct any errors in coding.


I am having problems migrating my site to a production server. It's build in Drupal 7. I used the backup and migrate plugin to export the DB. The development server is Windows with Wamp installed and the production server is CentOS with Cpanel.  These are the errors I am getting:     Error The website encountered an unexpected error. Please try again   later. Error message PDOException: SQLSTATE[42S02]: Base table or view   not found: 1146 Table       'fosagams_co_za.semaphore' doesn't exist:   SELECT expire, value FROM   {semaphore} WHERE name = :name; Array (   [:name] => variable_init ) in    lock_may_be_available() (line 167 of   /home/balabalab/public_html/includes/lock.inc). Uncaught exception   thrown in shutdown function.      PDOException: SQLSTATE[42S02]: Base table or view not found: 1146   Table      'fosagams_co_za.semaphore' doesn't exist:   DELETE FROM  {semaphore} WHERE (value = :db_condition_placeholder_0) ;   Array (      [:db_condition_placeholder_0] =>   191980980751f69eddeb26b7.24464293 ) in  lock_release_all() (line 269   of /home/balabalab/public_html/includes/lock.inc).   I did however verify that the semaphore table exists. I am out of ideas, any help would be appreciated.  Thanks in advance.

I have Drupal running on MariaDB 5.5.33. When I run update.php (after upgrade to Drupal 7.28 from Drupal 6) I get an error:     Failed: PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'webdb.location_country' doesn't exist: CREATE TABLE {location_country} ( code CHAR(2) NOT NULL COMMENT 'Primary Key: Two letter ISO Country Code', name VARCHAR(255) NOT NULL DEFAULT '' COMMENT 'Full Country Name ', PRIMARY KEY (code) ) ENGINE = InnoDB DEFAULT CHARACTER SET utf8 COMMENT 'Country data managed by location.module.'; Array ( ) indb_create_table() (line 2720 of /home/web/public_html/includes/database/database.inc).   When I try to run command     CREATE TABLE {location_country} ( code CHAR(2) NOT NULL COMMENT 'Primary Key: Two letter ISO Country Code', name VARCHAR(255) NOT NULL DEFAULT '' COMMENT 'Full Country Name ', PRIMARY KEY (code) ) ENGINE = InnoDB DEFAULT CHARACTER SET utf8 COMMENT 'Country data managed by location.module.';   in phpMyAdmin I get an error     #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '{location_country} ( code CHAR(2) NOT NULL COMMENT 'Primary Key: Two letter IS' at line 1   But I wasn't able to find out where is the problem.


Prove that $~a,~b~$ are integers and $~a \ge2~$, then either $~b~$ is not divisible by $~a~$ or $~b+1~$ is not divisible by $~a~$.   Should I use contradiction of uniqueness of prime factorisation to prove or simply prove by mathematical induction?

This one is killing me, any help is greatly appreciated!


I hear that observation is what causes the wave function collapse, but that doesn't make sense considering that an eye or camera is just a physical system with no particularly special properties. In explanations it say that light causes the collapse if that's the case why do you need an observer? If you shined a light while not in the room of the double silt experiment would it still act as a particle?

So if I understood correctly, Schrödinger's Cat is a thought experiment that puts a cat inside a box, and there's a mechanism that kills the cat with 50% probability based on a quantum process. The argument is that the cat now must be in a superposition of dead and alive.  This makes sense at first, but the state of the cat inside the box will affect the outside world in an observable way, right? For example if the cat dies, it might meow loudly which would be audible. If it didn't meow, it would produce a thud on the ground when it dies. And even if the ground was very solid, the redistribution of mass inside the box will affects its gravity field which means the whole universe theoretically immediately observe's the cat's death.  So extending this argument to all superpositions, the different states would cause different effects on the rest of the universe, usually a slight change in the gravity field is the minimum. This gravity perturbation would propagate throughout the universe, and even all the experimenters go to sleep with thick, thick earplugs, somebody or something in the universe is going to inadvertently observe the event and the superposition immediately collapses. Thus superpositions cannot exist beyond an extremely short amount of time.  What's wrong with my reasoning?


My site has several static pages and several custom post types. I'm trying to create a custom user role called students and give students access to ONLY certain custom post types and certain specific static pages.   I understand how to do this with custom post types by using add_cap() and populating the 'capability_type' and 'map_meta_cap' fields passed to register_post_type for that custom post type.   However, I don't understand how to do this for generic pages (which are not custom, but have been populated with different content). Specifically, I would like to take a parent page called internal-resources and give the student users editing capability for that specific page. There are some child pages of the internal-resources page they should be able to edit too. Finally, I would like them to be able to create new child pages under internal-resources. However, other static pages like Research and People they should NOT be able to edit. This shouldn't be too difficult, right?  Thanks for the help!!

I would want to allow certain user to edit only one page and it's subpages. How would this be possible? I tried the old Role Scoper, but it seems to have a lot of problems and bugs.


Is there any particular reason why adding an additional join to an ordered table would reorder the result set?  Using a left join on the existing result set  table-valued function is similar to below (function returns @table):  conditional     BEGIN         INSERT @table                (col1)         select col1 from table1         order by col1, x, y     END   ELSE     BEGIN         INSERT @table                (col1)         select col1 from table1         order by col1, x, y, z     END

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 < 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 < 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


i want to clear my concept of alligation. a vessel is filled with liquid, 3 parts of which are water and 5 parts are syrup. how much of the mixture must be drawn of and replaced with water so that the mixture may be half water and half syrup?? ti i solved this question. and i got my correct answer 1/5...but i am confused how it works in allegation to get ratio of two elements using one elements in question??  like  i have used this method and got my ratio 5:1 but dont know how????? plz help....thanks

A vessel is filled with liquid,3 parts of which are water and 5 parts syrup.How much of the mixture must be drawn off and replaced with water so that the mixture may be half water and half syrup?  What is the best possible way to solve this question?


Suppose $a,b,c$ are positive numbers. I would like to prove the following inequality in the most elementary way:  $$\frac{a}{b}+\frac{b}{c}+\frac{c}{a}\ge 3.$$  I think I can prove using derivatives but I need to find a more simple proof.

Disclaimer: The statement may be false, but for now I'm operating under the assumption it's true and trying to prove it.   My workings:  I got a common denominator and expressed it as:  $$\frac{ab^2 + bc^2 + ca^2}{abc} \ge 3$$ $$ab^2 + bc^2 + ca^2 \ge 3abc$$  This is where I'm stuck. I feel as if I keep encountering this same result in various different problems and always am stumped on how to show it is true.   I tried to look at similar problems and it seems AM-GM inequality is the usual line of attack, so using that I reasoned, $$a^2 + b^2 + c^2 \ge 3abc$$, and now I need to establish $$ca^2 + ab^2 + bc^2 \ge a^2 + b^2 + c^2$$  However, this doesn't seem like it'd be true for general positive $a,b,c$.


I've created a wrapper collection for ObservableCollection that subscribes to each items PropertyChanged event and rethrows it as its own event ItemPropertyChanged.  I did this using a similar method to what I described .  Is there a better way?  Am I missing another .NET collection that already has this type of behavior?

Is there a collection (BCL or other) that has the following characteristics:  Sends event if collection is changed AND sends event if any of the elements in the collection sends a PropertyChanged event. Sort of an ObservableCollection<T> where T: INotifyPropertyChanged and the collection is also monitoring the elements for changes.   I could wrap an observable collection my self and do the event subscribe/unsubscribe when elements in the collection are added/removed but I was just wondering if any existing collections did this already?


I am running a webserver on a RedHat 6 box that I don't have root access to.  Because I need ports 80 and 443, I require root access to start and stop the server. I am not allowed root access, but I am able to ask someone with root access to set something up to forward the ports for me.  So is it possible to forward port 80 to 8080 and port 443 to 8443, so that I am able to start and stop my server without root access?

I have a web service running on debian 7 and listening on port 8080. I want to redirect 80 to 8080 for inbound connections and allow only port 80. Here is my iptables configuration:  root@localhost:~# iptables -v -L --line-numbers Chain INPUT (policy DROP 76 packets, 6266 bytes) num   pkts bytes target     prot opt in     out     source               destination          1       90  8898 ACCEPT     all  --  lo     any     anywhere             anywhere             2        0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere             tcp dpt:http 3     4515 3113K ACCEPT     all  --  any    any     anywhere             anywhere             state RELATED,ESTABLISHED  Chain FORWARD (policy ACCEPT 0 packets, 0 bytes) num   pkts bytes target     prot opt in     out     source               destination           Chain OUTPUT (policy ACCEPT 4858 packets, 587K bytes) num   pkts bytes target     prot opt in     out     source               destination        and nat table:  root@localhost:~# iptables -L -n -v -t nat Chain PREROUTING (policy ACCEPT 14 packets, 2288 bytes)  pkts bytes target     prot opt in     out     source               destination              0     0 REDIRECT   tcp  --  *      *       0.0.0.0/0            0.0.0.0/0            tcp dpt:80 redir ports 8080     0     0 REDIRECT   udp  --  *      *       0.0.0.0/0            0.0.0.0/0            udp dpt:80 redir ports 8080  Chain INPUT (policy ACCEPT 0 packets, 0 bytes)  pkts bytes target     prot opt in     out     source               destination           Chain OUTPUT (policy ACCEPT 841 packets, 53415 bytes)  pkts bytes target     prot opt in     out     source               destination           Chain POSTROUTING (policy ACCEPT 841 packets, 53415 bytes)  pkts bytes target     prot opt in     out     source               destination    i can't establish a connection from outside on port 80. What are likely deficiencies?


I have an object in blender that I am trying to rotate by importing values from a csv file. The values are in rows 4-6 of the csv file and they are in degrees so I want to use euler rotation. However, even though the object is set to euler rotation and when I add the property to the object through the script it is using euler rotation when I view the resulting animation it shows the wrong value. For instance if 39 degrees x is put in it shows 2236 degrees because it thinks it is getting radians. How can I make it know that it is receiving euler values?      rotation = [float(x) for x in row[4:7]]     ob.rotation_euler = rotation     ob.keyframe_insert("rotation_euler", frame=frame+1)

I want to create a lamp in blender using python. I want to give the lamp some rotation. As per the  I can set the initial rotation using a tuple of numbers in the function call like this rotation=(0.0, 0.0, 0.0) this is the specifc documentation for the rotation parameter:  rotation: (float array of 3 items in [-inf, inf], (optional)) – Rotation, Rotation for the newly added object  What units is this parameter specified with? It does not seem to be in degrees or radian.  When I try with my example code here where I use rotation=(0, 1, 0) to get 1 degree on the y axis. I end up getting 57.296 degrees after running the code.  import bpy  bpy.ops.object.lamp_add(type='AREA', view_align=False, location=(0, 0, 0), rotation=(0, 1, 0), layers=(True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False))


Fermat's little theorem states that if $p$ is a prime number and $\operatorname{gcd}(a,p)=1$, then $a^{p-1} -1$ s a multiple of $p$. Here's my attempt to find the remainder when $5^{99999}$ is divided by 53. $5^{99999} = 5^{52}\equiv 1\pmod{53} \implies 5^{99999}\equiv5^{99999\bmod52}=5^{3}.$ Is this the correct approach? How do I proceed from here?

I've read about Fermat's little theorem and generally how congruence works. But I can't figure out how to work out these two:   $13^{100} \bmod 7$ $7^{100} \bmod 13$   I've also heard of this formula:  $$a \equiv b\pmod n \Rightarrow a^k \equiv b^k \pmod n $$  But I don't see how exactly to use that here, because from $13^1 \bmod 7$ I get 6, and $13^2 \bmod 7$ is 1. I'm unclear as to which one to raise to the kth power here (I'm assuming k = 100?)  Any hints or pointers in the right direction would be great.


Suppose I create a tex and a bib file. They work fine. Then I rename the tex file, and keep the same (old) name for the bib file. When I compile the new tex file, the bibliography does not work - just comes up with "?" signs.  Why does this happen, and how do I rectify this?  Thanks

I've browsed the forums and found a number of posts that have addressed this issue, but none of the solutions seem to work for me. I have the following script that I just copied from the bibtex home page to get familiar with it. Instead of the citation number I get a question mark. I compile using Latex+Bibtex+Latex+Latex+PDFLatex+ViewPDF just as has been previously suggested and the problem persists.   \documentclass[11pt]{article} \usepackage{cite}  \begin{document}  \title{My Article} \author{Nobody Jr.} \date{Today} \maketitle  Blablabla said Nobody ~\cite{Nobody06}.  \bibliography{mybib} \bibliographystyle{plain} \end{document}   My bibliography (Bib.bbl)  @misc{ Nobody06, author = "Nobody Jr", title = "My Article", year = "2006" }    Looking at previous posts one thing that is concerning is that my .bbl looks empty as shown below. Further, I don't have a .blg  \begin{thebibliography}{}  \end{thebibliography}


Not sure what's going wrong here, but for some reason I can't render my character; I just get a blank image plane. I don't believe my camera and scene settings have been changed, so I'm not sure what the problem is. I even tried adding a new camera, but that didn't work either. Does anyone have any ideas?

A scene I made is not rendering, at all. This grey screen stays the same and nothing changes.  Here are my settings:  [


I have come back to study geometry a bit and I'm kind of stuck at deriving the volume formula for a cone. I have read the calculus-based derivation and it totally makes sense, but calculus has been around for 200+ years, cones have been around forever. Intuition leads me to believe that there must be a way for people to logically explain that a cone in 1/3th the volume of a cilinder of the same size before calculus was even a thing. (similarly to the way that the area equation of a circle can be derived from breaking down the circle into infinite triangular slices.) Is there any logical way to get to a cone's volume equation without calculus? can't it be explained using some geometrical argument? How did civilizations wrap their heads around a cone's volume before calculus?

The volume of a cone with height $h$ and radius $r$ is $\frac{1}{3} \pi r^2 h$, which is exactly one third the volume of the smallest cylinder that it fits inside.  This can be proved easily by considering a cone as a , but I would like to know if it can be proved or at least visual demonstrated without using calculus.


I am typesetting my MATLAB code with package matlab-prettifier. However, the - sign are gone. How can I get it back?  MWE  \documentclass[12pt]{article}  % For MATLAB code \usepackage[framed]{matlab-prettifier} \usepackage[T1]{fontenc} \lstMakeShortInline[style=Matlab-editor]" % For inline shortcut  \usepackage{breqn}  \begin{document}  \begin{lstlisting}[style=Matlab-editor,basicstyle=\mlttfamily\footnotesize]  >> a(2, 3) ans =     1.6606e-04  \end{lstlisting}   \end{document}   Output    P.S.: I am aware of the existence of , but none of them works for me.

When using listings and breqn, the minus signs (or dashes, according to the unix.SX site then there's some controversy about which it is) disappear from code listing.  Here's an example:  \documentclass{article} \pagestyle{empty} \usepackage{breqn} \usepackage{listings}  \begin{document}   \lstset{language=Perl} \begin{lstlisting} #! /usr/bin/perl -w  if ($ARGV[0] =~ /^-/) {     print "Option given"; } \end{lstlisting} \end{document}   with result:    Changing the order of package loading doesn't help.  breqn does warn that it might break other packages, but it would be really useful to have both working.  If it helps, the code listings are in appendices so happen after the equations which breqn is meant to help with so I can happily reset anything that got changed.


In resolver , it said:  The address may optionally have a trailing dot followed by a port number.  For example, 10.0.0.17.55 specifies that the nameserver at 10.0.0.17  uses port 55.  But it doesn't work, in /etc/resolv.conf or files under /etc/resolver/.  208.67.222.222.5353  Can I specify non-default port number for nameserver in osx?  Update:   osx don't use /etc/resolve.conf, but use files under /etc/resolver/. I have wrote a file dev with content '127.0.0.1' to route all dns queries for *.dev domains to a local dns server (127.0.0.). But I cannot specify dns server's port here. (It uses 53 anyway)  Maybe there is no way to specify port number under osx?

If I cat my resolv.conf, I see this message:  # # Mac OS X Notice # # This file is not used by the host name and address resolution # or the DNS query routing mechanisms used by most processes on # this Mac OS X system. # # This file is automatically generated. #   I am trying to add a DNS entry. I edited my hosts file and flushed the dns cache, but the name is not resolving if I use host servername. I thought perhaps that host was not configured to look at the hosts file. How can I get my new entry to resolve, and what is OSX using if not resolv.conf?


Can someone explain to me why the second function within the first function is undefined?  var a = 1  function abc () {      alert(a);          function xyz () {              alert(a);          }  }

What is the scope of variables in javascript? Do they have the same scope inside as opposed to outside a function? Or does it even matter? Also, where are the variables stored if they are defined globally?


So i created a list like this:  my_list = [1, 3, 5] number = input("Choose a number from 1 to 5: ")   Now I want to say:  if the number is inside the list: print("ERROR"), if the number is not inside the list: print(number)  So if I type 2 it will print me the 2, if I type 1 it will print me ERROR   How am I doing that?

Given a list ["foo", "bar", "baz"] and an item in the list "bar", how do I get its index (1) in Python?


In the Android app, the "View XX Answers" button displays the correct number of answers, but only the first 30 answers are viewable. For example, on my , the button says "View 34 Answers" but only the first 30 questions are shown. (Note: this is not  a duplicate of )

The answer list only displays first 30 answers, for questions with lots of answers - no pagination or lazy-loading once you reach the bottom, to view the other answers.  Personally counted every answer twice.


Regex:  \b(\(\d{3}\)|\d{3})?[-.]?\d{3}[-]?\d{4}\b   My input file has two types of phone numbers. One, whose first 3 digits are enclosed in parenthesis and the other with no parenthesis.  Eg:  "(201)-450-4479" ,"234-345-3456"   I want to match both type of phone numbers using alternate operator.  Please suggest me. What modification is required for above mentioned expression to get the intended result?

I'm trying to put together a comprehensive regex to validate phone numbers. Ideally it would handle international formats, but it must handle US formats, including the following:   1-234-567-8901 1-234-567-8901 x1234 1-234-567-8901 ext1234 1 (234) 567-8901 1.234.567.8901 1/234/567/8901 12345678901   I'll answer with my current attempt, but I'm hoping somebody has something better and/or more elegant.


The domain of a function $f$ is the set of natural numbers. The function is defined as follows:             $f(n) = n + \lfloor{\sqrt{n}}\rfloor$. Prove that for every natural number $m$ the following sequence contains at least one perfect square $m, f(m), f^{2}(m), f^{3}(m),...$

Let $m$ be a natural number. Define $f(m) = m + \lfloor\sqrt{m}\rfloor$. Prove that at least one of the number among $m, f(m), f^2(m), \ldots$ is a perfect square. Here $f^k(m)$ denotes the composition of $f$ over itself $k$ times.  I tried the question, but the greatest integer along with square root is creating trouble.


For a ring $R$ and an ideal $I$ of $R$, the primes of the form $\sqrt{(I:a)}$ for some $a\in R$ are called associated prime ideals of $I$ (Here $(I:a)=\{r\in R:ar\in R\}$). Let $\text{Ass}(I)$ denote the set of such associated prime ideals of $I$.      How is it possible to prove that if $R$ is Noetherian, then    $$\text{Ass}(I)=\{P\text{ prime}:P=(I:a)\text{ for some }a\in R\}?$$   (In other words, it is not necessary to take radicals).   I guess that one should use the fact that for Noetherian rings there exists always a minimal primary decomposition of any ideal $I$ of $R$, but so far I have failed to prove the claim.

Maybe this question is too obvious to everyone.      In Noetherian ring $R$, ideal $I\subset R$, $P\in\mathrm{Ass}(I)$, then $P=I:a$ for some $a\in R$ where $\mathrm{Ass}(I)$ denotes associated primes of $I$.   This is an exercise 8.29 in Gathmann's Commutative Algebra notes. I am supposed to find this statement obvious. However, up to now, I still did not find this statement obvious. Can someone explain intuitively why noetherianness here allows me removing radical $\sqrt{I:a}$ without going into details?  If $Q$ is a primary ideal of $I$, then certainly $\sqrt{Q:a}=P$ for $a\not\in P$. It seems taking $(p_1,\dots, p_n)=P$, $p_i^{n_i}a\in Q$. Since $Q$ primary, I must have $p_i\in Q$ and $p_i^{n_i}\in Q$. (This argument seems very wrong as this deduces the same conclusion without noetherian property.)


Prove the following statement is true: $$\binom{r}{r}+\binom{r+1}{r}+\cdots+\binom{n}{r}=\binom{n+1}{r+1}$$.  Since $\binom{r}{r}=\binom{n}{r}=\dfrac{n!}{r!(n-r)!}$, is that to form a basis step? If so, how do I induce k+1 for n+1 and r+1 (where n ≥ r and both positive integers)? At the same time, or in two steps?

How to prove the following? Should I use induction or something else?     Let $n$ and $r$ be positive integers with $n \ge r$. Prove that   $$\binom{r}{r} + \binom{r+1}{r} + \cdots + \binom{n}{r} = \binom{n+1}{r+1}.$$   Attempted start:  Basis step: ${\binom{1}{1}} = {\binom{2}{2}}$ true.  Where do I go from here?


I always thought it would be end of the day, but I'm not sure.

From what I understand, the word "midnight" is usually interpreted incorrectly.  Midnight is written as "12am" which would imply that it's in the morning.  Therefore, it should be at the start of the day.  On the other hand, both  and the  define it as "twelve o'clock at night".  Some examples:   "Midnight on the 10th of December" "Midnight Thursday" "Midnight tonight"   are usually interpreted as:   Straddling the 10th and the 11th of December Straddling Thursday and Friday Straddling today and tomorrow   but should they technically mean:   straddling the 9th and the 10th of December? straddling Wednesday and Thursday? This is much less clear. Technically is there a midnight "tonight", or is midnight "tomorrow morning"?   What do you think? How should "midnight" be interpreted?


I'm using my own way of enums since older versions of PHP doesn't support them. My implementation of enums:   class ModeOfTransport{     const Land = 0;     const Naval= 1;     const Air= 2;          function GetClassVars()      {          return array_keys(get_class_vars(get_class($this))); // $this      }       static function getConstants() {          $oClass = new ReflectionClass(__CLASS__);          return $oClass->getConstants();      }       static function getValues(){          return ModeOfTransport::getConstants();      }       static function getDisplayText(int $val){          $key=array_search($val,ModeOfTransport::getConstants());          return $key;      } }   And since I'm having many other enums which feature also the same methods "getConstants()" etc. So i thought instead of repeating the same methods in every single class i can just use inheritance to apply it to all of them. But it didn't work as i expected. When i try: class CustomEnum {     const aa="test";     public static function getConstants() {         $oClass = new ReflectionClass(self::class);         return $oClass->getConstants();     }      public static function getValues(){         return self::getConstants();     }      public static function getDisplayText(int $val){         $key=array_search($val,ModeOfTransport::getConstants());         return $key;     } }      class DocumentMainType extends CustomEnum {     const VehicleDocument = 0;     const DriverDocument= 1;  }   //And calling the related method: $var=DocumentMainType::getConstants(); //$var is: {"aa":"test"} //Expected $var: {"VehicleDocument":0,"DriverDocument":1}   How can i get it to work so that those classes who inherit CustomEnum class can easily reflect their variables through inherited getConstants() method. Thank you

I have two classes: Action and MyAction. The latter is declared as:  class MyAction extends Action {/* some methods here */}   All I need is method in the Action class (only in it, because there will be a lot of inherited classes, and I don’t want to implement this method in all of them), which will return classname from a static call. Here is what I’m talking about:  Class Action {  function n(){/* something */} }   And when I call it:  MyAction::n(); // it should return "MyAction"   But each declaration in the parent class has access only to the parent class __CLASS__ variable, which has the value “Action”.  Is there any possible way to do this?


In a brand new system, I mistakenly deleted /etc/bash.bashrc, by creating and redirecting to it, instead just appending.  How could I restore it without reinstalling the system?  As the experts here know, this is an important file in the system and I need it for proper working of the system as well as aliases.  I tried rebooting assuming it will be recreated but it isn't. In a quick Google search I found nothing (I found many results regarding restoring ~/.bashrc but of course it's different).  How could I restore it fast without copying from another PC?   A same-PC minimal, fast, solution.

I would like to restore LightDM to its default state, because for some reason /etc/lightdm/unity-greeter.conf is now an empty file.  Deleting /etc/lightdm/unity-greeter.conf and then running sudo apt-get install --reinstall unity-greeter doesn't create a new config file as you might expect.   How can I restore a missing config file?


In overleaf tutorial ,   \newcommand{\R}{\mathbb{R}}  The set of real numbers are usually represented  by a blackboard bold capital r: \( \R \).   I know the usage of newcommand, but what is necessity of of \( and \)?

Along the lines of , what reasons are there (if any) to favor \( ... \) over $ ... $?


Consider the following (with sh being /bin/dash):  $ strace -e trace=process sh -c 'grep "^Pid:" /proc/self/status /proc/$$/status' execve("/bin/sh", ["sh", "-c", "grep \"^Pid:\" /proc/self/status /"...], [/* 47 vars */]) = 0 arch_prctl(ARCH_SET_FS, 0x7fcc8b661540) = 0 clone(child_stack=NULL, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7fcc8b661810) = 24865 wait4(-1, /proc/self/status:Pid:    24865 /proc/24864/status:Pid: 24864 [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 24865 --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=24865, si_uid=1000, si_status=0, si_utime=0, si_stime=0} --- exit_group(0)                           = ? +++ exited with 0 +++   There's nothing unusual, grep replaced a forked process (here done via clone()) from main shell process. So far so good.  Now with bash 4.4:  $ strace -e trace=process bash -c 'grep "^Pid:" /proc/self/status /proc/$$/status' execve("/bin/bash", ["bash", "-c", "grep \"^Pid:\" /proc/self/status /"...], [/* 47 vars */]) = 0 arch_prctl(ARCH_SET_FS, 0x7f8416b88740) = 0 execve("/bin/grep", ["grep", "^Pid:", "/proc/self/status", "/proc/25798/status"], [/* 47 vars */]) = 0 arch_prctl(ARCH_SET_FS, 0x7f8113358b80) = 0 /proc/self/status:Pid:  25798 /proc/25798/status:Pid: 25798 exit_group(0)                           = ? +++ exited with 0 +++   Here what's apparent is that grep assumes pid of the shell process and no apparent fork() or clone() call. Question is, then, how does bash achieve such acrobatics without either of the calls ?   Note, however, that clone() syscalls appears if the command contains shell redirection, such as df > /dev/null

After running the command     { sleep 5; } &     output of ps is   (output 1)   PID TTY           TIME CMD   972 ttys000    0:00.27 -bash  2556 ttys000    0:00.00 -bash  2557 ttys000    0:00.00 sleep 5      while for    ( sleep 5 ) &       out of ps is  (output 2)   PID TTY           TIME CMD  972 ttys000    0:00.28 -bash 2566 ttys000    0:00.00 sleep 5     () causes a subshell environment and I expect "output 1" for this case as it results in forking a child process while I expects "output 2" for { sleep 5; } & as it executes in the current shell. This might look a silly question but I really do not understand this behavior. What I am missing here?


I am trying to write a program that will remove names from an ArrayList if the name has specific value, but I am unable to do this.  class UserNamesTest {     public static void main(String[] args) {         ArrayList<String> names = new ArrayList<>();         names.add("John");         names.add("Jerry");         names.add("Jim");         names.add("Todd");          for(String name : names) {             if(name.equals("John")) {                 System.out.println("true");                 names.remove(names.indexOf(name));             }         }     } }   When I execute this code, I am getting an exception:  Exception in thread "main" java.util.ConcurrentModificationException         at java.util.ArrayList$Itr.checkForComodification(Unknown Source)         at java.util.ArrayList$Itr.next(Unknown Source)         at UserNamesTest.main(UserNamesTest.java:13)   How can I accomplish this?

We all know you can't do the following because of ConcurrentModificationException:  for (Object i : l) {     if (condition(i)) {         l.remove(i);     } }   But this apparently works sometimes, but not always. Here's some specific code:  public static void main(String[] args) {     Collection<Integer> l = new ArrayList<>();      for (int i = 0; i < 10; ++i) {         l.add(4);         l.add(5);         l.add(6);     }      for (int i : l) {         if (i == 5) {             l.remove(i);         }     }      System.out.println(l); }   This, of course, results in:  Exception in thread "main" java.util.ConcurrentModificationException   Even though multiple threads aren't doing it. Anyway.  What's the best solution to this problem? How can I remove an item from the collection in a loop without throwing this exception?  I'm also using an arbitrary Collection here, not necessarily an ArrayList, so you can't rely on get.


Suppose $X,Y\sim U(0,1)$ are iid random variables and $Z=\min(X,Y)$. Find the pdf and expected value of $Z$.   I've worked this out before when $Z=\max(X,Y)$, but I can't even start here with the maximum replaced with the minimum. Any help?

Problem: Let $X$ and $Y$ be independent and suppose that each has a $\text{Uniform}(0,1)$ distribution. Let $Z = \min\{X, Y\}$. Find the density $f_Z(z)$ for $Z$. Hint: It might be easier to first find $\mathbb{P}(Z > z)$.  Attempted Solution:  Given that $X, Y \sim \text{Uniform}(0,1)$, how do we not just have the following?  $$ f_Z(t) = f_X(t) = f_Y(t) = \begin{cases} 1 & \text{if } 0 \le t \le 1 \\                                           0 & \text{otherwise}                             \end{cases} $$  Of course I'm highly suspicious of this answer because it's not making use of the fact that $X$ and $Y$ are independent, nor is it making use of the provided hint.


I want to break a surface into pieces of square shapes like in the image below. How do I do that?  The blue is a mesh surface with one face (object) and the squares are a subdivided mesh.    Thanks

I need to do this for displacement mapping, subdivision gives a bad result and makes triangles distinguishable.    Related to:   But I get the error "No other selected object found to use for projection".


I have a string var (path) that represents a path:  printfn "Please enter a path" let path = System.Console.ReadLine()   Is there a way of knowing wheter this path is for a directory or a regular file?

I have a path and I need to determine if it is a directory or file.    Is this the best way to determine if the path is a file?  string file = @"C:\Test\foo.txt";  bool isFile = !System.IO.Directory.Exists(file) &&                           System.IO.File.Exists(file);   For a directory I would reverse the logic.  string directory = @"C:\Test";  bool isDirectory = System.IO.Directory.Exists(directory) &&                              !System.IO.File.Exists(directory);   If both don't exists that then I won't go do either branch.  So assume they both do exists.


I have a regression problem where I don't want the coefficients to be negative. Is setting negative coefficients of OLS to zero the same as constraining the coefficient to be non-zero and solving it through a convex optimiser as a quadratic problem? I've thought about this from a geometric perspective. In OLS, $\beta^TX$ is the shadow of $y$ onto column space of $X$. The solution is where $y - \beta^TX$ is perpendicular to $X$. Thus, $y - \beta^TX$ is minimised. If one of the coefficients in $\beta$ is constrained (by replacing a negative value with zero, call this new vector $\theta$), $y - \theta^TX$ is still the vector with the smallest norm?

My problem is how to find the best decreasing 3rd degree polynomial regression in R. I have data, lets say  x <- x <- c(1:5, 17, 23, 30, 35, 36) x <- x/max(x) y <- c(600, 555, 400, 333, 332, 331, 330, 214, 210, 190)   Here I want to find best polynomial fitting these points, with a constraint, that polynomial must be in whole interval decreasing (here the is interval from 0 to 1). When I use simple lm  m <- lm(y ~ I(x^3) +I(x^2) + x)   the polynomial is not strictly decreasing.   Simple math: I want to find a polynomial $$ y = ax^3 + bx^2 +cx + d $$   This polynomial is decreasing when   $$ dy / dx < 0 $$,  which means  $$ 3ax^2 + 2bx + c < 0 $$.  From here I can find the constraints, that are   $ a < (-2bx - c)/3x^2 $, $ b < (-3x^2 - c)/2x $, $ c < -3ax^2 - 2bx $.   Is there any way how to input these constraints into lm ?   PS: I found  with similar question, but my problem is little more complex. Hope somebody can help!  EDIT: I tested the current answer on this new data set and it doesn't work, why?  x1 <- c(0.01041667, 0.30208333, 0.61458333, 0.65625000, 0.83333333) y1 <- c(772, 607, 576, 567, 550)


I am in an argument about the phrase "either A or B". I believe it is necessarily exclusive, meaning it refers the possibilities of A or B but not both. But, after scouring the internet, I can't find a reliable source to back me up. How could I definitively determine whether I am right or not? (I found  by the way, but it refers to "either-or" and not the longer phrase "either [one thing] or [another thing]")

In mathematics, "A or B" includes "A and B". Does "either" mean "A or B but not (A and B)" or does it include the possibility of "A and B"? The context might be mathematics, formal logic or ordinary language.


I know the is operator compares the id of the two, not the value but why is id([1][::-1])==id([1]) returning True while [1][::-1] is [1] is returning False? id([1][::-1]) ==id([1]) #True [1][::-1] is [1] #Fasle  id([1]) ==id([1][::-1])#Fasle [1] is [1][::-1]#False

My  has failed me.  In Python, are the following two tests for equality equivalent?  n = 5 # Test one. if n == 5:     print 'Yay!'  # Test two. if n is 5:     print 'Yay!'   Does this hold true for objects where you would be comparing instances (a list say)?  Okay, so this kind of answers my question:  L = [] L.append(1) if L == [1]:     print 'Yay!' # Holds true, but...  if L is [1]:     print 'Yay!' # Doesn't.   So == tests value where is tests to see if they are the same object?


Accepting the speed of light in vacuum and infinite mass and all that, I wonder why light does not have infinite speed?  I know light does not have rest mass, but people use the term infinite mass when taking about the speed of light in vacuum so I am assuming that is kind of correct in this case.  Some background to my question:  I am sure there have been lots of experiments that slow light down. I even believe there was one that used a gas that managed to slow light down to almost 0 for a small fraction of time.  That's all easy to understand (I think) but once the light is free from restriction, i.e. after it makes it though the gas (or whatever is slowing it down) its speed increases back to light speed. So firstly, how is its speed increasing back to light speed? What force is involved in getting it back up to speed? Then, why is it stopping at that speed?  Aside from all the business of slowing light down or speeding it up, why is it so slow in the first place? what is keeping it from going faster?  Is it possibly going faster but we are only able to observe and measure the sub-light part?  Is there something in the universe that makes it difficult for the light to move, some sort of friction if you will?

I will try to be as explanatory as possible with my question. Please also note that I have done my share of googling and I am looking for simple language preferable with some example so that I can get some insight in this subject.  My question is what is so special about $c$? Why only $c$. Its like chicken and egg puzzle for me. Does Einstein reached to $c$ observing light or does he got to light using some number which turned out equal to $c$.   Why is $c$ not relative. If something has zero rest mass like a photon why they only travel at $c$ in vacuum and not with $c+1$ or $c-1$?


I just want to make one SphereCastAll with a center and a radius.   I don't want unnecessary sweeping in a desired direction with a desired length. How is this achievable? My solution is pretty unreliable, I think.  var hits = Physics.SphereCastAll(center, radius, forward, 0.0001f, mask);

I needed a way to check for all gameobjects within a set sphere of my player object.  I found Physics.SphereCastAll which will return a RaycastHit[], exactly what I wanted. But, I am having trouble understanding the method signature/docs.  Basically, it's the two things in the title I am confused on right now:  From Unity docs:    radius    - The radius of the sphere. maxDistance - The max length of the sweep.   Is 'max length of the sweep' a measurement of time (or degrees?)? I would have thought the length would be the same as the radius (or at least you could calculate it from the radius) but it obviously isn't what I think length means.


I tried $ whoami dims $ groups dims adm cdrom sudo dip plugdev sambashare lpadmin lxd $ sudo usermod -a -G audio dims $ groups dims adm cdrom sudo dip plugdev sambashare lpadmin lxd  and I am still not in the audio group. Why and how to force?

I changed permissions of a file (chmod g+w testfile) and running ls -l testfile gives:  -rwxrwxr-x 1 user1 user1 0 2011-01-24 20:36 testfile   I then added a user to that group ("/etc/group" has user1:x:1000:user2 line), but am failing to edit that file as user2. Why is this so?


Are there groups $G$ and $H$ such that $G$ and $H$ are not isomorphic but $G \times \mathbb Z$ and $H \times \mathbb Z$ are?

I already know that if groups $G,H,K$ are finitely generated abelian groups, following is true.  If $G\times K$ is isomorphic to $H\times K$, then $G$ is isomorphic to $H$. I prove this by uniquness of factorization of finitely generated abelian groups.  My questions are   If group $G$ is finite,$G\times K$ is isomorphic to $H\times K$, then $G$ is isomorphic to $H$? Can you give me a easiest proof and it can be proved by projection function on external direct product? If $G,H,K$ are groups.  If $G\times K$ is isomorphic to $H\times K$, then $G$ is isomorphic to $H$. This statement is false. What is a counterexample?   *$\times$ is external direct product


In the Harry Potter series, there is a lot of talk about the curriculum at Hogwarts but they never talk about learning math, Muggle history, advanced reading/writing, etc.   Are we to believe they are learning these as well, but they are just less interesting as topics for a book/movie? Or do magical people have no use for learning those past the age of 10?

I always wondered if children who graduate from Hogwarts have an education that is actually worth while in the real world.  Do the children learn math and English?  I can see History of Magic as practical. I know of Arithmancy, but that's the study of the magical properties of numbers, not math.   Since Hogsmead is one of the very last all-magical towns, it's a fair assumption that a majority of the students at Hogwarts will be living in non-magical towns or cities. If practical classes (like math or English) aren't taught, then how do these students function in the non-magical cities?


Let $D$ be a UFD and let $a,b,c \in D$ be pairwise coprime, i.e. $\gcd(a,b)=\gcd(b,c)=\gcd(a,c)=1$. I would like to prove that then $(a,b) \cap (c) = (a,b) \cdot (c) = (ac,bc)$. Note that $(a,b)$ and $(c)$ are not necessarily comaximal ideals, so this does not follow immediately.  Here is my approach: $(ac,bc) = (a,b) \cdot (c)  \subseteq (a,b) \cap (c)$ as this holds for all ideals. Now let $x \in (a,b) \cap (c)$. Since $x \in (a,b)$ there exist $d_1, d_2 \in D$ with $x=d_1a + d_2b$. As $x \in (c)$ we know that $c|x$, but how can I use that the elements being coprime of means that $c$ divides $d_1$ and $d_2$?

Can anyone provide a simple concrete example of a non-arithmetic commutative and unitary ring (i.e., a commutative and unitary ring in which the lattice of ideals is non-distributive)?


So, I'm learning about Latex, I've read the entire TeX and LaTeX wikipedia pages, trying to understand what is this all about. Already installed TexWorks and MikTex in my windows. I know how to create PDF articles with nice math notation, and beamer presentations, but in essence I don't really know what I'm doing. I know that TexWorks isn't really necessary, I could use only the MikTex.   What I want to know is: what's the difference of TeX and LaTex, and what's the really minimum setup that I could use to just display a simple math equation. I don't really need complicated editors, it could be just via command line. I'm asking this because I want to understand the inner working of TeX or LaTex so I can develop something that I'm thinking would be nice. So, I'm here to learn.  I don't know where or what type of program I'm running on my computer, who or what compiles the .tex file, and how my article is transformed to PDF. I'm really lost. I appreciate any kind of help. I'm tired of installing programs and lots of packages without knowing what they do, so I would really love to learn about the LaTeX inner workings.

I know LaTeX and I've heard that LaTeX is a set of macros in TeX. But what does it exactly mean?


I am trying to render only the background and the reflections of the car and I don't know how. In the outliner tab layer 1 is the car, layer 2 is the background, and the rest of the layers are various lights. Blender 2.9 and in cycles.

I a lot of VFX breakdown that uses something they call "render passes". From what I see, they are rendering the clip in seperate ways (like rendering the ambient occlusion, specular, shadows, depth of field, etc individually and then combine it). Is there any way I can do this?


I just exploring the sequential analysis with ARIMA (2-month data, period = 15 minutes, lags=360)   I struggle with understanding the charts I receive after applying acf and pcf operations.  My suggestion: As ACF is a measure of the correlation between the timeseries with a lagged version of itself, so it seems like each observation is correlated to its adjacent observations. Also I can see the downwards trend but that indicated the correlation decreasing after certain period.    Any help and thoughts are appriciated Data available

Following are acf and pacf plots of a monthly data series. The second plot is acf with ci.type='ma':    The persistence of high values in acf plot probably represent a long term positive trend. The question is if this represent seasonal variation?  I tried to see different sites on this topic but I am not sure if these plots show seasonality.           Edit: following is the graph for lag upto 60:     Following are plots of diff(my_series):     And upto lag 60:     Edit: This data is from:  Here the contributors did not consider acf and pacf plot of original or differenced series worth mentioning (so it must not be important). Only acf/pacf plots of residuals was referred to in a couple of places.


I am tring to do if() for String[] args to check if the string is between 1 to 5  here is my code:  public static void main(String[] args) {     System.out.println(args[0] == "1" || args[0] == "2" || args[0] == "3" || args[0] == "4" || args[0] == "5"); }   the code is returning false when I type anything.  thx for help

I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug.  Is == bad? When should it and should it not be used? What's the difference?