I have a sheet with statistical data to which I had applied color scale conditional formatting. Some rows I set to have green for highest and red for lowest number in row and other rows the other way around because I lower score would be better than lower.  But when applying a filter to the sheet and changing the order, I noticed that the conditional formatting got messed up and rows that I had set to have the highest number green had become red and visa versa.   Is it possible to solve this with a conditional formatting that is only applied when cell in another column has a certain value?  for example:   If the cell in column C in the same row has value "metric A" then apply color scale green to lowest en red to highest number.   and  if the cell in column C in the same row has value "metric B" then apply color scale red to lowest and green to highest number.   or is there a better way, or some basic google sheet conditional formatting rule that applies when using filters that I am not aware of?

In my example I would like to conditionally format column B cells. Those marked with x should be formatted according to value in column A (in the example the value is 1):  A | B 1 | x 2 |  3 |  1 | x 1 | x 4 |  8 |  // x can be any value and is here merely to mark the cell that should be formatted   IMPORTANT 2014 NOTE: Conditional formatting based on formula that may include other cells is now possible in Google Sheets, and works very similarly to how Excel spreadsheets work.  explains its use.


I have this   But running it in the python2.7 it gives None, why is that?  >>> fo = re.match('\.(\d+)\.', '/players/player.34360.html') >>> type(fo) <type 'NoneType'> >>>

What is the difference between the search() and match() functions in the ?  I've read the  (), but I never seem to remember it.  I keep having to look it up and re-learn it.  I'm hoping that someone will answer it clearly with examples so that (perhaps) it will stick in my head.  Or at least I'll have a better place to return with my question and it will take less time to re-learn it.


I added js files in the header of my drupal 7 site by using drupal_add_js as the example below: drupal_add_js(drupal_get_path('theme', 'ims') .'/js/qc2.js', array('group' => JS_THEME, 'scope' => 'header', 'weight' => 1)); drupal_add_js('//cdn.yyy.com/tech/omg.js', array('type' => 'external', 'group' => JS_THEME, 'async' => TRUE, 'scope' => 'header', 'weight' => 2));  The following code is producing an src="..." tag and I would like to convert it to data-cmp-src or add a custom param data-cmp-src  along with src tag. Any ideas?

How can I add the following meta tag inside the <head> tag? <meta http-equiv="X-UA-Compatible" content="IE=edge" />  I am trying to add it to a Drupal 8 site.


I have a content type, which has three reference fields to three different content types. I want to create secondary task links to those referenced entities.   Let's say that I have a Product content type which reference fields to Manufacturer, Distributor and Technical Details content types.  If you visit a content of type Product, I want to show three secondary tabs to Manufacturer, Distributor and Technical Details contents which are referenced from that specific node (Product).  Fore example, we have a product with following fields:  Product X (node/1):   Manufacturer A (reference to node id: 2) Distributor B (reference to node id: 3) Technical Details X (reference to node id: 4)   If I visit Product X (node/1), I want to get three tabs to node/2, node/3, and node/4.   How can I achieve this?

I've created a module called hotel_reviews.  I've created the route node/{node}/reviews using .   hotel_reviews.content:   path: '/node/{node}/reviews'   defaults:     _controller: '\Drupal\hotel_reviews\Controller\ReviewsController::content'     _title: 'Reviews'   requirements:     _permission: 'access content'   I then tried to add a local task using .  hotel_reviews.content:   route_name: hotel_reviews.content   title: 'Reviews'   base_route: node.view   weight: 100   I can now access the content defined by my controller at node/1/reviews, however when I go to node/1 I don't see a reviews tab.  What am I doing wrong?  I've been using the following documentation so far:


Does anyone knows the fastest and easiest way to hole the curved side of a cylinder in blender 2.8? thanks!

Whenever I try to cut out a circular hole in either a cylinder or sphere the polygons around the circular hole always have distorted normals after smoothing. Is there anyway to fix this. I've tried using the remesh modifier but wind up with some pretty ugly results.


The Lagrangian-density (as a function of the "independent fields" $\Psi$ and $\Psi^*$ which leads to the Schrödinger-equation is: $$ \frac{i \hbar}{2}(\Psi^* \dot{\Psi} - \Psi \dot{\Psi^*}) - \frac{\hbar^2}{2 m_0} \nabla\Psi \nabla\Psi^* $$ For this lagrangian density, the Euler-Lagrange-Equations will yield the correct formulas of $\Psi$ and $\Psi^*$. However, calculating the canonical momentum will yield: $$\pi = \frac{\partial L}{\partial \dot{\Psi}} = \frac{i \hbar}{2}\Psi^* $$  And the other way arround for $\pi^*$. This gives me a hard time to calculate the hamiltonian density as a function of $\Psi$, $\Psi^*$,$\pi$, $\pi^*$, $\nabla \Psi$ and $\nabla \Psi^*$. I mean, I want the hamiltonian density to satisfy: $$ H = \pi \dot{\Psi} + \pi^* \dot{\Psi^*} - L $$ But I can satisfy this condition with different choices, since the momentum $\pi$ doesn't differ from the the conjugate field $\Psi^*$. I could choose a hamiltonian that doesn't depend on $\pi$ at all, with every instance of $\pi$ being replaced by $\Psi^*$.   Where is my Mistake? Is there a mistake? If yes, where did the mistake start? Has it allready been wrong to assume $\Psi$ and $\Psi^*$ to be independent.   My maybe most important question here is: Is there an unambigous definition of the link between Lagrangian and Hamiltonian, which will lead to a) the right Euler Lagrange equations, and at the same time to b) the right canonical equations in the hamiltonian-fields formalism?

The usual Schrodinger Lagrangian is $$ \tag 1 i(\psi^{*}\partial_{t}\psi ) + \frac{1}{2m} \psi^{*}(\nabla^2)\psi, $$ which gives the correct equations of motion, with conjugate momentum for $\psi^{*}$ vanishing. This Lagrangian density is not real but differs from a real Lagrangian density  $$ \tag 2 \frac{i}{2}(\psi^{*}\partial_{t}\psi -\psi \partial_{t}\psi^{*} ) + \frac{1}{2m} \psi^{*}(\nabla^2)\psi $$ by a total derivative.  My trouble is that these two lagrangian densities lead to different conjugate momenta and hence when setting equal time commutation relations, I am getting different results (a factor of 2 is causing the problem). I can rescale the fields but then my Hamiltonian also changes. Then applying Heisenberg equation of motion, I don't get the operator Schrodinger equation.   Is it possible to work with the real Lagrangian density and somehow get the correct commutation relations? I would have expected two Lagrangians differing by total derivative terms to give identical commutation relations (since canonical transformations preserve them). But perhaps I am making some very simple error. Unless all conjugate momenta are equivalent for two Lagrangians differing by total derivatives, how does one choose the correct one?   I guess the same thing happens for other first order systems like Dirac Lagrangian also.


In order to be nicer to new participants I think it could be nice if they should not experience a negative vote total for the first question. I think it is one of the most discouraging things to experience if you are just entering the site. When we are new (and not so new) we tend to focus on the number and a negative vote total can make you feel like you have failed. And it is hard to write a Stack Exchange question. So I think the we should be a little less strict to new users on the platform. And I think the quality/integrity of the site is not compromised by having some first question having a zero vote total instead of a negative vote total. So to be clear I want to remove the downvote button for first questions only and only if the voting total is 0 (or less). If others have upvoted you should be able to downvote. What do you think?

I always see Stack Overflow users giving -1 to new users' questions. This is not how you welcome a new user to the community. A new user does not know the rules yet.    I suggest that if one wants to give -1 to a new user, you prevent that and ask the downvoter to write a comment instead. new user = 2 first questions    I see the credit rating on my question is now at -9?  My question, is she not well formed or formatted? If you don't agree with the content of a question do you down-rate it? If an Ubuntu user asks a question that might not be reasonable, will you also down-rate it?  No. You post an answer that will present your thinking and correct him? I think that is part of the problem. When you first go to a community like Facebook, and you don't know the faces, you don't feel like any of those people are your relations. Newbies exist here as well, especially in a professional community.    First, welcome the new user in more appropriate way. And most importantly, force them to see/read how to post a good question.


Question  Recently, I have been looking at complex limits, The most famous being $e^{ix}$=$\lim\limits_{n \rightarrow \infty}{(1+{ix\over n})^n}$. An example would be that when $x = \pi$ we know that the answer will be -1. But how do you determine this due to the fact that you can always $+1$ which will determine the outcome.  I am fully aware that you are able to do this via the $i\cdot \sin(a \ln b) +\cos(a\ln b)$ however, how can you prove this via a limit, because if you test it on a calculator, most of the time you'll end up with some imaginary part.   Specifically I have been looking at the representation of $\sin x={ie^{-ix}\over 2}-{ie^{ix}\over 2}$. Everyone would be safe to assume that $\sin x$ is always real, but when you apply a limit then how can you determine if it is only real or imaginary and real?

The question is     Do the polynomials $p_n(x)=(1+z/n)^n$ converge compactly (or uniformly on compact subsets) to $e^z$ on $\mathbb{C}$?   I thought about expanding $$p_n(z)=\sum_{k=0}^n a_k^{(n)}z^k$$ where $$a_k^{(n)}=\binom{n}{k}\frac{1}{n^k}=\frac{1}{k!}\prod_{j=0}^{k-1}\left(1-\frac{j}{n}\right)$$ and trying to show that $\frac{1}{k!}-a_k^{(n)}$ decreases sufficiently fast on any closed ball. That is, I tried to show $$\lim_{n\rightarrow\infty}\max_{z\in\overline{B_0(A)}}\left|\sum_{k=0}^n\frac{z^k}{k!}-p_n(z)\right|=0$$ for any fixed $A>0$, but I had difficulty with this approach.  Any help is appreciated.


I was reading this paper   and I came across this part    I didn't get how the third line came from the second line. Any suggestions?

I was reading this method related to proximal newton methods  . I came across this page    I didn't get what this part means  $ \frac{1}{2}||y-x||^2_H $ what does H signify here and how do I calculate $ \frac{1}{2}||y-x||^2_H $ given x and y.


In python, I am trying to create an algorithm that will use characters from an email address and search the page to calculate the likelihood the string is the actual name of the person.  I wrote a regex expression to grab all emails on a page, but then I want to write another to try and find the persons name from the email (since it is a subset or some characters of the name make it up).    I am using:    self.reEmail = re.compile(r"\b(?!(?:.\B)*(.)(?:\B.)*\1)[char]+\b", re.IGNORECASE)   However this is giving me all single characters.    email: bjoel@email.edu  Name : Billy Joel  - is what I want to scrape.    However it is not always the first letter of the email is the first name...

Over the years I have slowly developed a  that validates MOST email addresses correctly, assuming they don't use an IP address as the server part.  I use it in several PHP programs, and it works most of the time.  However, from time to time I get contacted by someone that is having trouble with a site that uses it, and I end up having to make some adjustment (most recently I realized that I wasn't allowing 4-character TLDs).  What is the best regular expression you have or have seen for validating emails?  I've seen several solutions that use functions that use several shorter expressions, but I'd rather have one long complex expression in a simple function instead of several short expression in a more complex function.


does anybody know how to write integral signs in LaTex that are slanted to the left, and not the right. See here if you do not know what I mean:    (From )  This is how it is written in Bulgaria and Russia and many other places so I am curious.  Thank you.  My problem is that the integral sign now is  $$ \int ... $$   and is leaning to the right, not the left like shown in the picture I attached.  I want to know how to write it so that it is slanted to the left.  Thank you

What font package do I use to get the vertical Russian/German style integral signs? (subject says all)


I have a laptop with Ubuntu 16.04 dual booted with Windows 10 (UEFI system).  Is it safe for the Ubuntu bootloader to upgrade Windows (to the April creators update) ?  I have already both Windows and Ubuntu installed, so this is not a duplicate of how to install Ubuntu alongside Windows in UEFI. I am just asking whether upgrading Windows may corrupt the grub or the Ubuntu installation

I'm absolutely new to Linux. I would like to know how to install Ubuntu alongside the pre-installed Windows 8+ OS.  Should I do it with Wubi, or through the Live USB/DVD?  What steps do I need to take to correctly install Ubuntu?


While revising an existing blender file, I realized it was getting way too big as it approached 1GB.  This didn't look right since the objects were relatively simple.  I copied/pasted all the objects to a new file which is under 300MB.  Why the difference?

I made a huge project, wanted to reduce file size from 1.3GB to below 1GB. Compressing did not help. I removed objects from scene. Also textures. I then realized, the file size even was the same when I delete ALL objects. Why?  Download of sample:   Before deleting all: 1.2GB, after: 1.1GB.


Why does the first block of code get highlighted but not the second one?  Is the second code block being interpreted as part of the second list item?  If so, how do I close the second list item so I can start marking code with only 4 spaces?  Sub HereIsSomeCode()  End Sub    First list item. Next list item.  Sub HereIsSomeCode()  End Sub  (code prefixed by 8 spaces) Sub HereIsSomeCode()  End Sub

Consider the following piece of Markdown code:  This is some regular text.      >>> def factorial(n):     ...     return 1 if n < 2 else n * factorial(n - 1)     ...   * This is a list item.      >>> def factorial(n):     ...     return 1 if n < 2 else n * factorial(n - 1)     ...    Notice that the second code block is preceded by a list item.   Why is the factorial code not properly formatted under these circumstances? To demonstrate the problem, I'll insert the Markdown code show above:    This is some regular text.  >>> def factorial(n): ...     return 1 if n < 2 else n * factorial(n - 1) ...     This is a list item                 def factorial(n):       ...     return 1 if n < 2 else n * factorial(n - 1)       ...               This applies to numbered as well as unnumbered lists.


I am developing a multiplayer RPG-like strategic combat game.  If I use the formulas of Pokemon games in this game for damage calculation, does I risk any copyright issue ? What areas of the game is copyrighted ?

Most games build on other games' successes and many are downright clones. Where is the limit of imitation before legal issues come into play? Is it down to literary or graphic work like characters and storyline that cause legal problems, or can someone actually claim to own gameplay mechanics?  There are so many similar clone games out there that the rules are probably very slack or nonexistent, but I'd like to hear the views of more experienced developers / designers.


I've recently switched from Windows XP to Ubuntu 14.04 and I'm happy using Ubuntu, with one small exception.   I've been unable to work out how to minimise windows using the mouse and the launch pad, and after coming from Win XP I really miss the task-bar icon to show or hide the desk top.  Looking on the internet I've found CompizConfig, but I've also found dire warnings that it can seriously damage your system.  So what is the best way to add the option of minimising a window and show desktop using the mouse?

I don't know if this is a feature or a bug, but clicking on an active application's launcher icon doesn't minimize it. It is terribly inconvenient for folks using a persistent Unity bar to click minimize button every time. Is there any way to add minimize functionality to the launchers?


I know this question is going to make me unpopular here – but I feel I have no other options.  I have been concerned by the size of the close votes review queue for quite a while.  When I started reviewing (less than a year ago) this queue already had ~30K questions pending review. Time passes and the queue only gets bigger. It is close to 95K now and increasing all the time.  This queue size issue has troubled many users, that . Yet it seems like SO dev team is doing close to nothing to handle this pressing matter.  Therefore, I see no other option but to go on a strike: I will not review any close vote question until a serious effort will be made by SO dev team to address the close vote queue size issue.  Where do you stand on this matter?    Making this question more concrete: The vote-to-close queue size has actually two issues:     A one-time effort to bring its size to (or very close to) zero. A long-lasting solution that will reverse the trend of more questions entering the queue than leaving it, thus keeping this queue at manageable size.   Without addressing the second issue, any solution that covers only the first one will be only a temporary patch and will not last long.    Edit/Update: I do not ask SO dev team to drop everything they are doing and work 24/7 on this issue. However, I do expect to get some long-term attention of the team: to take the time to implement one (or even several) solution(s) and follow up on them to see if they have the right impact.    What's up? (Dec 3rd,2013)  I started my strike two weeks ago with queue size ~95K. Today it hit 100K!           A lot of words were written (and put on hold/marked as duplicate) questions were asked, answers were given - but we see little action actually taking place to reverse this worrying trend, the steady growth of the close-vote review queue. So, I see no reason to quit my strike just yet...     A note regarding marking this post as duplicate: Well, I looked into , apparently it is also a duplicate of . All these questions were asked to raise the flag "Hey, we SO users are CONCERNED by the HUGE queue size". Since no significant change has been made, and the queue is just getting longer, this red flag needs to be raised OVER and OVER again. Closing these questions only sends the message "we don't care about this issue" – which judging by the lively discussion here is not the message you want to send. So please, consider not closing this question as a duplicate of those questions.


Is it possible to downgrade from ubuntu 15 to ubuntu 14?  We would like to stay on 14 until we have decided on a distro to replace ubuntu that does not use systemd.  How is that done?

I just installed a new version of Ubuntu and I want to roll it back to the previous version.  How can I do that? Is that even possible?


I'm kind of new to Blender and I ran into a problem.  I am creating modular segments for a house.  For some reason when I created the segment with a window in it, blender split the front face into 2 faces when I go into edit mode.  Is there a way to rectify this?  I created the segment using 2 cubes.  One cube is the size of the wall, the other i used to cut out the window using a boolean modifier. I tried the "f" key and that didn't work for me.

So, I'm working on a control station that has buttons. It is a one-mesh creation, that means, I don't want to create buttons and things like that separated from the main mesh, but as you can see, I have problems. I would like to make the highlighted parts to be one with the main part around them. I've tried everything, and I have this problem on multiple creations. Any idea?  Update: I've added another example of the problem. I want them to be one face, instead of two. (2nd picture)


I know that for a mass to be in static equilibrium two things have to be satisfied: $\sum F=0$ and $\sum T=0$, where $T$ represents torque. However, I am not sure how the latter can apply in a situation such as this     Here, a beam is is static equilibrium with only two forces acting on it (let us only consider the y-axis for simplicity's sake), $F_g$ and $F_t$. Clearly the rule of $\sum F=0$ holds and this can be proven with a simple $F_{net}$ statement. However, if the pivot is placed at the very end on the right hand side $\sum T = F_t \sin(55)\cdot0 - F_g\cdot x$, where $x$ is some arbitrary non-zero distance. How can this be if we need $\sum T = 0$?

It is true that under equilibrium condition, no matter what pivot point one choose, the resulting net torque will always be zero. I wonder if this principle apply to non-equilibrium scenarios as well, namely, the net torque of the system being the same regardless of choice of pivot point? For example, if we put a sphere on a inclined smooth ramp, we would expect the sphere to slip down the ramp without rolling. However, if we choose the point of contact between the sphere and the surface of the ramp as the pivot point, we will have a torque due to gravity. Apparently this contradicts our assumption. What's the mistake here?


there is a theorem on Galois theory that  if F is a finite dimensional extension field of K (say [F:K]=n) then F is algebraic over K  I'm thinking about the converse of this statement. is the converse false? can anyone give me an example that contradict the converse

In I. Martin Isaacs Algebra: A Graduate Course, Isaacs uses the field of algebraic numbers $$\mathbb{A}=\{\alpha \in \mathbb{C} \; | \; \alpha \; \text{algebraic over} \; \mathbb{Q}\}$$ as an example of an infinite degree algebraic field extension. I have done a cursory google search and thought about it for a little while, but I cannot come up with a less contrived example.   My question is     What are some other examples of infinite degree algebraic field extensions?


Many pages get a triangle-shaped warning icon even when connected over HTTPS due to the presence of insecure content. This is annoying and probably ought to be fixed.  Are there any plans to fix this annoying message?

So it looks like Stack Exchange now supports HTTPS (to some extent). Which is awesome! But there are a few problems, the main one being that some content is delivered over the CDN, which is plain HTTP. This causes browsers to complain about "unsecured content":


I have a relatively simple blender image (walls of a house), and my computer is reasonably top-shelf.  However, blender is not showing me the entire image while I'm editing it.  What's worse is that the part it's not showing is the part that's closest to me, so I can't even get to the part of the image that I'm trying to work on.  I've includes two pictures: one of my system's specs and one of my house design with portions of the wall (nearest to you) that are missing from the image.  Video card is NVIDIA GeForce.  This seems to be a memory issue to me, like blender is not using all of the memory my system will allow it to use.  I have the memory limit (userpref/editing) set to "0" (which my system says means "unlimited").  Any thoughts as to what I can check/look at/etc. to keep it from doing this?  Thanks in advance for your help.

I'm having an odd issue - When I try to zoom in on a detail using my MMB, the "camera" in the 3D view seems to be cutting off the exterior surface of my object and showing me the inside instead. I'd expect this behavior, but only when I was much more zoomed in.  If I zoom out a bit (one click on the scroll wheel) then I can see the exterior as I intend.  Is there any way to adjust this behavior?  Thanks!


I'm new to solving functional equations and found the following functional equation from a collection of functional equations. Find all functions $f: \mathbb{Q}\to \mathbb{R}$ for $$f(x+y)=f(x)f(y)-f(xy)+1$$ for all $x,y\in \mathbb{Q}$. By substituting $x,y\to 0$, we get $$f(0)=f(0)^2-f(0)+1$$ $$f(0)^2-2f(0)+1=0$$ $$f(0)=1$$ And then doing the substitution $x\to 1,\ y\to -1$, we get $$f(0)=f(1)f(-1)-f(-1)+1$$ $$f(1)f(-1)-f(-1)=0$$ $$f(-1)(f(1)-1)=0$$ $$f(-1)=0\vee f(1)=1$$ So, no we have three possible cases to consider and I have no idea on how to proceed on any of them. I would appreciate any hints before giving the full solution as in the best case that's all I need right now.

Define a function $f\colon\mathbb{R}\to\mathbb{R}$ which satisfies $$f(xy)=f(x)f(y)-f(x+y)+1$$ for all $x,y\in\mathbb Q$. With a supp condition $f(1)=2$. (I didn't notice that.)  How to show that $f(x)=x+1$ for all $x$ that belong to $\mathbb{Q}$?


i am making a plant and i have run into some problems. I have here some grass blade texture:     And since i want the whole pot to be filled with grass blades, i duplicated them until it filled the whole pot:     but as you can see, some of the image planes look like they have a black background:     Here is my node setup:

Having problems with hair transparency using cycles. I ported over a model from daz studio (have done this a few times before with no issues).   Using a simple mix shader, transparent top, diffuse bottom, black/white texture in the fac.  Heres the blend  with images packed.


I'm running 14.04 Trusty Tahr, and after a recent update my system has an issue (I want to be clear that I mess with settings a lot, so this may not be directly the fault of the update, but the problem didn't occur before then, and I don't recall making any other changes at the time).  The problem is that after loading up, Ubuntu will only open a few programs. After it has opened about 3-4, or after it has been running for a while, other programs will refuse to launch (even if all the current programs are closed. After closing they won't reopen.) Trying to launch them will sometimes result in a loading icon on the cursor, and other times, nothing. Strangely, this doesn't seem to affect synaptic package manager or nautilus, but does affect the terminal - which I have strong negative feelings about. It's a pain because I can't check to see if opening them from terminal will work.  I can switch programs by restarting my computer, but obviously this isn't an ideal solution. I should also mention I have a dual-boot, in case this has to do with memory.  Is this a known problem? Are other people experiencing it now?

I'm hitting a problem whereby X prevents processes from creating windows, uttering something like the following into ~/.xsession-errors:  cannot open display: :0.0 Maximum number of clients reached   Searching around there are lots of examples of people facing this problem, and sometimes people identify which program they are running is using up all the client slots. See e.g.  (Firefox),   (gnome-screensaver).  For what it's worth, I run gnome-terminal, thunderbird, chromium-browser, empathy, tomboy and virtualbox nearly all the time, on top of the normal stuff you get with the GNOME desktop, and occasionally some other bits and pieces.  However my question is not "which of my programs is causing this problem" but rather, how can one go about diagnosing this problem?  In the above (and other) bugs, forum reports, etc., a number of tools are suggested:   xlsclients - lists the client applications for the given display, but I don't think that corresponds to 'X clients' xrestop - a top-style X resources tool, one row per X client. Lots of '' clients, not shown in xlsclients output xwininfo -root -children lists X window objects   From what I can gather, the problem might not be too many clients at all, but rather resources kept around in the X server for clients who have long-since detached.  But it would also appear that you cannot (easily?) relate X resources back to their client.  Can one effectively diagnose this issue once it has started to occur, or is a tedious divide-and-conquer approach for the apps I run the only approach open to me?  Update Jan 2011: I think I have resolved this issue.  For the benefit of anyone stumbling across this, nautilus and/or compiz or something in that chain of software was segfaulting due to a wallpaper I had.  I had chosen an XML file as my wallpaper, which defined a rotating gallery of images.  It was hand-made, but based on /usr/share/backgrounds/contest/background-1.xml or similar.   Disabling the wallpaper and I have not had a crash since.  I'm not marking this as answered yet, since the actual specific problem was not my question, but how to diagnose it was.   Unfortunately this was mostly trial-and-error which sucks.


My udev rule is not working. I've added information about the udev rule:  udev rule:  $ cat /lib/udev/rules.d/95-monitor.rules  KERNEL=="card0", SUBSYSTEM=="drm", RUN+="/bin/bash /home/koko/Desktop/monitor.sh"   executed:  sudo udevadm control --reload sudo udevadm trigger   monitor.sh  #!/bin/bash notify-send "Monitor Connected."   Udev is running:  $ service --status-all .. [ + ]  udev ..   udev info  $ sudo udevadm info -a -p /devices/pci00:00/0000:00:02.0/drm/card0  Udevadm info starts with the device specified by the devpath and then walks up the chain of parent devices. It prints for every device found, all possible attributes in the udev rules key format. A rule to match, can be composed by the attributes of the device and the attributes from one single parent device.    looking at device '/devices/pci0000:00/0000:00:02.0/drm/card0':     KERNEL=="card0"     SUBSYSTEM=="drm"     DRIVER==""     ATTR{error}=="no error state collected"    looking at parent device '/devices/pci0000:00/0000:00:02.0':     KERNELS=="0000:00:02.0"     SUBSYSTEMS=="pci"     DRIVERS=="i915"     ATTRS{boot_vga}=="1"     ATTRS{broken_parity_status}=="0"     ATTRS{class}=="0x030000"     ATTRS{consistent_dma_mask_bits}=="36"     ATTRS{d3cold_allowed}=="1"     ATTRS{device}=="0x0046"     ATTRS{dma_mask_bits}=="36"     ATTRS{driver_override}=="(null)"     ATTRS{enable}=="1"     ATTRS{irq}=="26"     ATTRS{local_cpulist}=="0-3"     ATTRS{local_cpus}=="0f"     ATTRS{msi_bus}=="1"     ATTRS{numa_node}=="-1"     ATTRS{subsystem_device}=="0x0410"     ATTRS{subsystem_vendor}=="0x1028"     ATTRS{vendor}=="0x8086"    looking at parent device '/devices/pci0000:00':     KERNELS=="pci0000:00"     SUBSYSTEMS==""     DRIVERS==""   udevadm monitor:  $ sudo udevadm monitor --environment --udev monitor will print the received events for: UDEV - the event which udev sends out after rule processing  UDEV  [26447.971745] change   /devices/pci0000:00/0000:00:02.0/drm/card0 (drm) ACTION=change DEVNAME=/dev/dri/card0 DEVPATH=/devices/pci0000:00/0000:00:02.0/drm/card0 DEVTYPE=drm_minor HOTPLUG=1 ID_FOR_SEAT=drm-pci-0000_00_02_0 ID_PATH=pci-0000:00:02.0 ID_PATH_TAG=pci-0000_00_02_0 MAJOR=226 MINOR=0 SEQNUM=3035 SUBSYSTEM=drm TAGS=:uaccess:master-of-seat:seat: USEC_INITIALIZED=21623159

I use Linux Mint 13 MATE, and I'm trying to set up notifications when I plug/unplug devices.  First of all, I found  package, but unfortunately it almost doesn't work for me: it works for very little time (1-2 minutes), and then, if I connect/disconnect any device, it crashes:  Traceback (most recent call last):   File "./udev-notify.py", line 319, in <module>     notification.show() glib.GError: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name :1.1061 was not provided by any .service files   I haven't found any solution, so I had to remove it. (filed  also)  Surprizingly, there're no similar utilities I've found so far. Then I tried to write udev rules that should match all devices. I have added new file /etc/udev/rules.d/notify.rules :  ACTION=="add",    RUN+="/bin/bash /home/dimon/tmp/device_plug.sh" ACTION=="remove", RUN+="/bin/bash /home/dimon/tmp/device_unplug.sh"   And two scripts:  device_plug.sh:  #!/bin/bash  export DISPLAY=":0" notify-send "device plugged"  /usr/bin/play -q /path/to/plug_sound.wav &   device_unplug.sh:  #!/bin/bash  export DISPLAY=":0" notify-send "device unplugged"  /usr/bin/play -q /path/to/unplug_sound.wav &   It works, but it works very dumb. My questions are:   How to get actual title of the device attached, the same as I can see in lsusb output? Currently, I just got notifications like "plugged" and "unpugged", and I can't find how can I retrieve the name of the device in my udev rule (If I can, then I'd pass it to my script as a parameter) Currently, too many notifications are activated. Say, when I attach my USB stick, I got about 15 notifications! But, if I run lsusb, attached USB stick is displayed as just single device. So, it seems I should add some more argument to rule filter, but I can't find it out. Probably there's some better solution for device plug/unplug notifications? Please suggest if you know something.


I have my own VPS and I want to block/reject all incoming packets from Asia. Is it possible to do it? My server is on Ubuntu.

I have a web app that has no users in the Philippines, but is constantly bombarded by spammers, carders testing cards, and other undesirable activity from there. I can see in the logs that they have IPs in the Philippines and are initially finding my site via google.ph or other .ph sites.  I have pretty good filters and security checks in place, so they don't really cause much damage, but nonetheless, I'm really getting tired of it.  They use up bandwidth, fill up my database, abuse logs, and security logs with crap, waste my time terming accounts, etc.  While the vast majority of Philippine citizens aren't spammers, and I can't just block every country that annoys me, at this point, I think the solutions is simply to block all traffic from the Philippines to my webapp. (I know blocking entire countries' IP blocks is not a great practice, and has many problems, but for this country, I want to make an exception.)  (I know they could spoof their IP address, but at least I can make them work for it a bit.)  I know there are a few geoip services out there.  Anyone know of any free or inexpensive services?  Or any other way to filter out traffic from a specific country?  I'm running PHP on Apache 2, if it matters.


I'm trying to mount a Nokia 620 phone running Win8 on my Ubuntu 12.10 box. I can see the device using lsusb, but from what I can see it's not listed under sudo blkid. I'm trying to follow the instructions here:   Has anyone done this successfully?  Just for clarity, I want to be able to copy files from my computer onto the phone.  I've tried using a Win8 image on Virtualbox - no luck. I have all USB devices enabled for the virtual machine.

Since Ubuntu 13.04 storage access to external devices via MTP is supposed to work out of the box via a GVFS-MTP module.      While this question is about the Galaxy Nexus, other Android devices as well as Windows Phones and MTP enabled media players are also supported.      For troubleshooting see .     I am having quite a bit of problems getting file-transfers working over MTP with the Galaxy Nexus. I am using Kubuntu 11.10 64-bit, and this is what I have done and the results I get:   Added rule for device in /etc/udev/rules.d/51-android.rules. The rule is the following and works for adb:  SUBSYSTEMS=="usb", ATTRS{idVendor}=="04e8", ATTRS{idProduct}=="6860", MODE="0666", OWNER="leob" #Galaxy Nexus  Restarted udev (and computer just to make sure).   Adb works, and all methods for reading from the device via MTP seems to work (I have tried mounting with mtpfs, gmtp and using the mtp-tools package directly). When I try to write to the device however, nothing I have tried works.  As an example, running mtp-newfolder test_dir 0 0 gives the following output:  libmtp version: 1.1.0 Device 0 (VID=04e8 and PID=6860) is a Samsung GT-P7510/Galaxy Tab 10.1. Folder creation failed. ERROR: Could not close session!   If I run mtp-folders after a failed mtp-newfolder without re-plugging the device, I get the following output:  Attempting to connect device(s) Device 0 (VID=04e8 and PID=6860) is a Samsung GT-P7510/Galaxy Tab 10.1. PTP_ERROR_IO: failed to open session, trying again after resetting USB interface LIBMTP libusb: Attempt to reset device mtp-folders: Successfully connected Friendly name: (NULL) Error 1: Get Storage information failed. Error 2: PTP Layer error 02fe: get_all_metadata_fast(): could not get proplist of all    objects. Error 2: (Look this up in ptp.h for an explanation.) Error 2: PTP Layer error 02fe: get_handles_recursively(): could not get object handles. Error 2: (Look this up in ptp.h for an explanation.) LIBMTP_Get_Storage() : Resource temporarily unavailable OK.   Accompanied by the following in dmesg:  [ 1000.912082] usb 2-4: reset high speed USB device number 7 using ehci_hcd [ 1001.045877] usb 2-4: usbfs: process 3166 (mtp-folders) did not claim interface 0 before use   Does anyone have any idea about what to do?  EDIT:  I also tried the PTP mode. Again, reading works fine, but I cannot write anything to the device.


$f$ be non-constant holomorphic function in unit disc $\{|z|<1\}$ such that $f(0)=1$. Then prove that it is necessary that there are infinitely many points $z$ in the unit disc such that $|f(z)|=1$.  Please help me out with the question..

Let $f$ be a non-constant holomorphic(analytic) function in the unit disc$\{|z|<1\}$ such that $f(0)=1$ then it is necessary that  $(1)$ there are infinitely many points $z$ in the unit disc such that $|f(z)|=1 $  $(2)\  f$ is bounded  $(3)$ there are at most finitely many points in the unit disc such that $|f(z)|=1$  $(4)$ $f$ is rational function.  I tried the if (2)is true then and it is given that $f$ analytic then it will be constant.Am I right? How to disprove of prove other option($\textbf{ Here answer is unique}$).please help me.thanks in advance.


I need to do some testing that involves setting the clock into the future, and I can't see how to disable ntp syncing with timedatectl or anything else so I can change the clock and not have it sync to real time.  This is ubuntu 16.04

I want to set a custom time in ubuntu 14.04   lets say : 8 OCT 2010 18:00:00  wrkstn@wrkstn-VirtualBox:~$ sudo date --set="8 OCT 2006 18:00:00" Sun Oct  8 18:00:00 PETST 2006 wrkstn@wrkstn-VirtualBox:~$ date Fri Sep  2 01:21:51 PETT 2016 wrkstn@wrkstn-VirtualBox:~$    But i am not able to set custom date with Date command. Please Tell me how can i accomplish this.


I can't figure out how to get rid of this red dotted line in the middle of the viewport.

I was editing my mesh and I wanted to only see a part of my mesh, so I pressed alt+B to only show a selected area. However, I did ctrl+B and created a red rectangle on my screen (I don't know what it does). Does anybody know how to get it off?


I was following a tutorial and thought why not...let me brush up on the man command...and low and behold I learned a few things after years working with different flavours of Unix.  On my RHEL7 however, trying out the new trick to be able to look-up keywords failed!  It sounds crazy, but having tried it under root and under my own username the following shows no results...now man has dozens of entries with time as a keyword...any help would be appreciated, as I think the keyword facility is very useful for and admin.  $ man -k time time: nothing appropriate.

I'm running CentOS 7.0 build 1503. I'm trying to search for commands I don't know the name of by searching the man descriptions for multiple keywords using AND (e.g. search for a command containing the both words "create" and "group" in the description).  So I came across the command apropos (which is an alias for man -k). The default behaviour when given multiple keywords is to return any command matching any of the keywords, which isn't what I want. According to the man page the option -a specifies using AND, to return matches only when all words match.  But this isn't what I'm seeing in practice, so I need some help here - e.g. using Centos 7, if I do:  apropos create user   I see a huge list of commands, seemingly matching any command with create or user in the description, as expected. Noting the list includes an entry for the command 'useradd (8) - create a new user...'.  If I do:  apropos -a create user   I only get 2 commands (environ and open). This is what I'm confused by - I would expect it to return the command 'useradd (8) - create a new user', because i can see from the previous search that command does contain those words in the description. Also the 2 returned commands don't obviously seem to be anything about creating users. What am I doing wrong? I'm sure it's something embarrassingly obvious, for that I apologise in advance.  Thanks


My website got hacked recently and recovered it. It was populating casino ads on my website. There were virtually made URLs where casino pages were displayed.  I suspected the code came through a plugin and by taking help from the communities I was able to recover my website. But Google still has the pages (a lot of them) indexed. I resubmitted a request to crawl the full site a few weeks back, but still those are there. A site: search with casino keyword still displays the URLs. I am worried that my website's reputation will go down. Already a fall in traffic is noticeable.  I have removed everything from the database tables, disavowed links etc. But there are lots of links and I really do not want the contents to be removed from Google. To make you clear, the contents of the pages are there, the bug only changed the description and the title of the pages.

As a matter of optimization, a few weeks ago I modified the way the titles of my blog posts are displayed (I made a change also in the title of the blog). Then I used the Google Webmaster Tools to re-index the old pages and update titles. Immediately I could update the titles and posts appear correctly on Google.  The problem is that now the titles of posts began to appear incorrectly in the search, using the old blog title. Some posts continue to display the updated title, but many recent posts show the old title.  I've tried re-index the pages with Google Webmaster Tools, but the titles remain unchanged in the search results.  Is there any way to "force" Google to display the correct titles?


Hi I have question in Python, If my question is duplicate. Please link to the solution that have the similarity between mine I have this function which set idinput from input() however, the value don't change and from another function it read it as 0, and AddStudents() Function doesn't change it value. It append to the list correctly but in another function it read it as initial 0 materials = {} student = {} sidlist = [] idinput = 0    # Add Students def AddStudent():  idinput = int(input("ID: "))  name = input("Name: ")  lastname = input("LName:")  student.update({idinput: {name: lastname}})  # Append ID To ID List  sidlist.append(int(idinput))  AddMaterial()   def AddMaterial():  materialinp = input("MAT:")  degreeinp = int(input("DEGREE:"))  sidlist.append(idinput)  materials.update({idinput: {materialinp: degreeinp}})   askUserToContinue = input("Do you like to add more materials?: y/n")  if askUserToContinue.lower() == "y":   AddMaterial()  else:   print("Do you like to add more student or do search y/n")   askUserChoice = input(": ")   if askUserChoice.lower() == "y":    AddStudent()   else:    GetInfo()   and Thank you.

How can I create or use a global variable in a function?  If I create a global variable in one function, how can I use that global variable in another function? Do I need to store the global variable in a local variable of the function which needs its access?


I am getting the response as mentioned below:  AFMomFormDetails now has {\"sigName\":\"qwer\",\"contName\":\"asdf\",\"signature\":\"zxcv\"} after the move  var resStr = response; var retStr = resStr.substring(resStr.indexOf("{"), resStr.indexOf("}")+1); var strObj  = retStr.replace(/\\/g, ""); $scope.fdetails=JSON.stringify(strObj);   I am unable to bind the values in angularjs. Can anyone please help me?

Given a string of JSON data, how can I safely turn that string into a JavaScript object?  Obviously I can do this unsafely with something like:  var obj = eval("(" + json + ')');   but that leaves me vulnerable to the JSON string containing other code, which it seems very dangerous to simply eval.


I have just completed my first large project and have a camera fly through the scene. I started rendering the animation to .png files as there were quite a few but after several hours I had to pause it to do something else. When I try to start again from the next image file and render the animation, all I get is a series of place holder files with nothing on them. Any idea what I am doing wrong?

I went to animate a project, Blender was returning a blank screen.  I have attempted to restart both Blender and my laptop, as well as re-downloading the program.  With each attempt, Blender exported a black movie, which I attempted to watch multiple times.  I even attempted to reanimate one of my older Blender files, and even that reexported as a black movie.  I have attached a picture of what I see when I render. Please Help! Thank you!😀


I'm running a green white Commander deck and wanted to know if I could.

The official deck construction rules for Commander (nee EDH) at  say that 'A card's colour identity is its colour plus the colour of any mana symbols in the card's rules text.'  How does this apply to dual-faced cards with faces of different colors, such as  out of Innistrad or  from Dark Ascension, where the color of the transformed face of the card is different from the color of the 'main face'?  The spirit of the rules would seem to suggest that these cards are the colors of both faces for deck construction purposes, but not only are these spells always cast as the front face, the front face is the only one 'seen' in other game zones: for instance, when the card's in the library, you could find Elbrus by searching your library for an artifact, but you couldn't find Withengar Unbound by searching your library for a creature card.  Could Elbrus then, for instance, be played in any Commander deck, or just one with a (partly) Black general?


Is there a way to compute the proximal operator for the composition of two functions $f \circ g(x)$ using $\mathrm{prox}_{f}$ and $\mathrm{prox}_{g}$? If $g(x) = A x$ is a semi-orthogonal linear map ($A A^* = I$), one has  $$  \mathrm{prox}_{f \circ A}(x) = A^*\ \mathrm{prox}_{f}(A x). $$  Is there a similar result for weaker conditions on $g(x)$?

Consider a proximable function $f$ where the proximal operator is defined as follows, $$\operatorname{prox}_{\lambda f}(x) = \arg \min_z \frac{1}{2\lambda}\left\| z - x \right\|_2^2 + f(z)$$   $\lambda \geq 0$. With an additional constraint the problem is $$\arg \min_{z \ge 0} \frac{1}{2\lambda}\left\| z - x \right\|_2^2 + f(z)$$   which we can rewrite as $$\arg \min_z \frac{1}{2\lambda}\left\| z - x \right\|_2^2 + f(z) + I_{\left\{z \ge 0\right\}}(z)$$  $I_C(z)$ is an indicator function. The function $g$ defined as $$g(z) = I_{\left\{ {z \ge 0} \right\}}(z)$$ is also proximable and the resultant prox operator for $g$ is just a projection on the non-negative orthant. Combining all the above our unconstrained problem is defined as  $$\arg \min_z \frac{1}{2\lambda} \|z - x\|_2^2 + f(z) + g(z)$$  Consider a toy example $f\left(x\right) = \|x\|_1$, then the solution of the constrained problem is obtained from component-wise thresholding, $z_i = \max(\max( |x_i| - \lambda, 0) \operatorname{sgn}(x_i),0)= \max\left(x_i-\lambda,0\right)$.  The solution seems like a composition of two proximal operators,  $\operatorname{prox}_{g} \circ \operatorname{prox}_{\lambda f}$. Stated differently, it is also projection on the intersection of two sets, $\ell_1$-norm ball and the positive orthant. It is also similar to the idea of projected subgradient descent algorithm. Are there any general results/conditions where prox operator can be applied to composition of two proximable functions.


I've searched all over Google and couldn't find a suitable answer so I thought I'd go to the source. How would you go about pricing for global packaging rights on illustrations you create? Pricing for the actual work carried out and the time spent on putting the illustrations together is not a problem. But when it comes to figuring out how much you should charge for the full rights to reproduce the illustrations on packaging globally is where my problem is. I have no idea where to start with coming up with a figure for that.    It's the first time I've been asked by a client to provide a quote for the rights to my work and just wondered if there was a rule of thumb or a formula to help come up with a ballpark. Any help anyone could provide would be really appreciated. Thanks!

I was hoping I would find some people in the industry that could help me decide what's the best price to charge to design (in this case) business cards.  What are standard prices for professional designers?  From a firm point of view? From a freelancer?  I don't want to overcharge clients but I don't want to ruin the industry by underselling my services.


I am planning on submitting a paper to a mechanical or materials science journal. I am looking at these two journals  (IF 4.6) and  (IF 6.2). First one is published by Elsevier and is an old journal, while second one by The Journal of the Chinese Society for Metals and is a recent one. Considering, my paper fits the scope of both the journals, should a decision of submitting a paper be made solely on the basis of the impact factor? Is the second journal better than the first one?

While trying to select the journals I can submit my present work and future work, I realize the time between the date the authors send the article to the journal and when the revised article is submitted. Usually this is something between 6 months and more than 12 months.  Althought I am focusing on the Impact Factor (IF) to select journals, I think that 12 months to have a feedback that might include "add more variables analysis","this article will be more valuable if you test also model x,y and z", can have a huge impact on you work. It will make you stop what you are currently doing and possible spend up to 2 months making the changes. This might make a big mess on your work if you have deadlines to respect, however this happens to everyone in academia.  My question is, besides the IF journal based selection, how can we select a journal with enought quality with lower IF? What alternative criteria should one use to select the journal? Should we choose newly created Journals?


I store info into a MySQL Database via a PHP Form, the problem is that is a person inputs into the name field José Molína in the database it saves JOSé MOLíNA so it convert the accent mark into a non legible name and when I displys the info of the database in a form it shows Jos Molna (doesn´t show the letters with the accent marks).  the info of my table is ENGINE=MyISAM DEFAULT CHARSET=latin1 and the forms captures the info from a Wordpress site, could you please tell me what is the problem?  this is the way I sent the info to the database  $strNombres = htmlspecialchars(rtrim($_POST['nNombres']));      $Nombres= filter_var($strNombres, FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH);   the I tried with this one but no solution  $strNombres = strtoupper((rtrim($_POST['nNombres'])));      $Nombres = htmlentities($strNombres, ENT_QUOTES,'UTF-8');   to the manager: since you closed this question, can you tell me where is the duplicate sign where the question was edited? besides of that I would like to close my account, how come you close a question?  I just send a message via twitter for this.

I'm setting up a new server and want to support UTF-8 fully in my web application. I have tried this in the past on existing servers and always seem to end up having to fall back to ISO-8859-1.  Where exactly do I need to set the encoding/charsets? I'm aware that I need to configure Apache, MySQL, and PHP to do this — is there some standard checklist I can follow, or perhaps troubleshoot where the mismatches occur?  This is for a new Linux server, running MySQL 5, PHP, 5 and Apache 2.


Right now, I have 0 votes left on PPCG.  However, Vox Populi says I have voted 33 times.  Is this a bug?

I've hit the 40 daily vote limit wall and yet can see on my profile I have 7 votes yet to give to actually reach that ceiling. The votes remain and I am unable to cast them. According to a recent :  The daily vote limit used to be 30 votes per day; we’ve increased that to 40 votes per day. But the last 10 of those votes can only be cast on questions.  This does not work for me. I cannot upvote any more questions although I have only done 33 votes today.


I have a list of +-8000 items which is the result after applying numerous techniques to remove duplicates (the list started at over 10000 items).  I now have the following issue -   Example 1. Jack Daniel 2. Jack Daniels 3. Jack Daniel's  Clearly all of the above relate to one item but they are still technically unique.  I tried pulling the first 4 letters and checking for matches however there were +-4000 and most of them were false positives i.e.    Jack Dxxx Jack Bxxx   Both would pull Jack but would not be a valid duplicate.  Any thoughts?

I am currently trying to reconcile “Name” fields from two separate data sources.  I have a number of names that are not an exact match but are close enough to be considered matched (examples below).   Do you have any ideas of how I can improve the number of automated matches?    I am already eliminating middle initials from the match criteria.    Current Match Formula:  =IFERROR(IF(LEFT(SYSTEM A,IF(ISERROR(SEARCH(" ",SYSTEM A)),LEN(SYSTEM A),SEARCH(" ",SYSTEM A)-1))=LEFT(SYSTEM B,IF(ISERROR(SEARCH(" ",SYSTEM B)),LEN(SYSTEM B),SEARCH(" ",SYSTEM B)-1)),"",IF(LEFT(SYSTEM A,FIND(",",SYSTEM A))=LEFT(SYSTEM B,FIND(",",SYSTEM B)),"Last Name Match","RESEARCH")),"RESEARCH")


I have some important files and software in my HP Windows notebook. How can I get Ubuntu to dual boot in my notebook without loosing any data?

I'm absolutely new to Linux. I would like to know how to install Ubuntu alongside the pre-installed Windows 8+ OS.  Should I do it with Wubi, or through the Live USB/DVD?  What steps do I need to take to correctly install Ubuntu?


I have a chapter title that is too long to fit onto one line in the table of contents, but LaTeX does keep it in one line, producing an overfull line in the TOC.  How can I insert a line break into this title so that to break it only in the TOC, not when it appears as a chapter heading?  I tried \protect\linebreak[1], but it did the opposite: it broke the line in the chapter heading but not in the TOC.  Here is a simplified version of my source (not quite a minimal example though):  \documentclass[a4paper,12pt]{scrbook}  \usepackage[utf8]{inputenc}  % UTF-8 input encoding \usepackage[T1]{fontenc}     % for hyphenation to work with                              %   accented letters, etc. \usepackage{lmodern}         % modern latin font  \usepackage[french]{babel}   % language support  \usepackage[hmargin=3.5cm,vmargin=3.5cm]{geometry}  \usepackage{tocstyle}  \usetocstyle{KOMAlike} % defined in tocstyle package  \renewcommand{\thechapter}{\Roman{chapter}}  \begin{document}  \frontmatter  \tableofcontents  \mainmatter  \chapter{Un chapitre}  \chapter{Deux chapitre}  \chapter{Systèmes d'équations différentielles   linéaires à coefficients \protect\linebreak[1]constants}  \section{Généralités}  \section{Résolution d'un système d'ordre $1$   par diagonalisation ou par triangularisation}  \end{document}

I'm writing a pretty long document, and at some point this happened with the table of contents:        I would like to be able to force a line break between 'complex' and 'space', either directly or by imposing suitable limits on line lengths or the separation between the lines and the numbers, or any such relevant lengths.  A minimal working example is below,   \documentclass[pdftex,11pt,twoside,a4paper]{report}  \usepackage[a4paper, left=3cm, right=3cm, top=3cm, bottom=2cm]{geometry} \usepackage[T1]{fontenc} \usepackage{lmodern} % load a font with all the characters \usepackage[colorlinks,linkcolor=blue,final]{hyperref} \usepackage{tocloft}  \usepackage{lipsum}   %%% Headers \usepackage{fancyhdr} \pagestyle{fancy} \fancyhf{} \setlength{\headheight}{14pt}  \fancyhead[LE]{\thepage} \fancyhead[RE]{Electron dynamics in complex space and complex time} \fancyhead[LO]{\nouppercase{\leftmark}} \fancyhead[RO]{\thepage}  \renewcommand{\chaptermark}[1]{\markboth{\thechapter.\ #1}{}}   \begin{document}  \tableofcontents   \setcounter{page}{100} \chapter{Quantum orbits as trajectories through complex time and complex space} \lipsum[1-16]  \end{document}   including the headers in use in the document; obviously all of the non-lipsum packages are necessary in the larger document. How can I fix this ugliness?


Today I noticed on one of the sites that I moderate that a user account was removed due to inactivity. What are the conditions for being removed for inactivity? I was not aware that this was grounds for account deletion, so I was surprised to see this.

Prior to May 2017, accounts used to be automatically deleted if they met . However, in May 2017, we stopped culling inactive users (see ).  Today, in the , it says:     As part of our new data-retention policy, we will now delete accounts that have been inactive for more than two years and where the user has never engaged in any meaningful activity.   What is the definition of "meaningful activity" here?


i got a raspberry 4B 8GB. and in the Raspbian OS Blender 2.79 works super fine. But the OS performance its terrible. So i installed Ubuntu 20.10 and came with Blender 2.83 but DOESN'T RUN, so i want to install the 2.79 version but doesn't exist in the Ubuntu Repository. So. How i can install Blender 2.79 without call Blender 2.83 instead? Thanks a lot

Where to download Blender 2.80?  I downloaded Blender 2.82a but it always crashes. So I'd like to try 2.80 but I can't find it on the official Blender site.


OS:Mac + android-studio   httpsURLConnection.connect() Cannot evaluate com.android.okhttp.Headers.toString()  package com.mar.android.photogallery;  import android.net.Uri; import android.util.Log;  import java.io.BufferedReader; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.net.HttpURLConnection; import java.net.MalformedURLException; import java.net.URL; import java.security.cert.X509Certificate;  import javax.net.ssl.HttpsURLConnection; import javax.net.ssl.SSLContext; import javax.net.ssl.TrustManager; import javax.net.ssl.X509TrustManager;  import org.apache.commons.lang3.StringUtils;  /**   Created by marares on 2018/4/9. */   public class FlickrFetchr {     private static final String TAG = "FlickrFetchr";     private static final String API_KEY = "****";  public void fetchItems() {     HttpsURLConnection httpsURLConnection = null;     BufferedReader reader = null;     try {         URL url = new URL("https://api.flickr.com/services/rest/?method=flickr.photos.getRecent&api_key=***&format=json&nojsoncallback=1&extras=url_s");         System.out.println("1====================");         httpsURLConnection = (HttpsURLConnection) url.openConnection();         httpsURLConnection.setConnectTimeout(5000);         httpsURLConnection.setDoInput(true);         httpsURLConnection.setUseCaches(false);         System.out.println("2====================");          httpsURLConnection.connect();//<----Cannot evaluate com.android.okhttp.Headers.toString()         System.out.println("3====================");         System.out.println(httpsURLConnection.getResponseCode());         System.exit(0);          reader = new BufferedReader(new InputStreamReader(httpsURLConnection.getInputStream()));         StringBuilder sBuilder = new StringBuilder();         String line;         while ((line = reader.readLine()) != null) {             sBuilder.append(line);         }         Log.e("TAG", "content=" + sBuilder.toString());     } catch (MalformedURLException e) {         e.printStackTrace();     } catch (IOException e) {         e.printStackTrace();     } finally {         if (httpsURLConnection != null) {             httpsURLConnection.disconnect();         }          if (reader != null) {             try {                 reader.close();             } catch (IOException e) {                 e.printStackTrace();             }         }     }  }   }

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?


I have the following LaTex code:  \begin{figure}[H]   \begin{subfigure}[b]{0.2\textwidth}       \includegraphics[width=\textwidth]{imgs/high_accuracy_Low_precision.png}     \caption{low accuracy, low precision}   \end{subfigure}   %   \begin{subfigure}[b]{0.2\textwidth}      \includegraphics[width=\textwidth]{imgs/high_precision_Low_accuracy.png}     \caption{low accuracy, high precision}   \end{subfigure}   \label{fig:4foldcross} \end{figure}   The output result is:    How can I make some space in between these images?

I want to reduce the space between two subfigures and use that space to make those subfigures large. How to do that? My code is as follows:  \begin{figure}[htp]   \centering   \subfigure[1a]{\label{fig1:a}\includegraphics[width=1.6in]{./fig1a.eps}}\hfill   \subfigure[1b]{\label{fig1:b}\includegraphics[width=1.6in]{./fig1b.eps}}   \label{fig1} \end{figure}


I want the following situation:   trunk/my_sv_code  trunk/my_tb_code/my_sv_code    In which the copy of my_sv_code in  my_tb_code is an external.  How do I write an svn:externals property that is relative to the my_tb_code directory?  The Red Book, sadly, has few good examples of this.

Is there any way to use Relative path when configuring subversion externals.  For example    Trunk       - directoryA       - directoryB       - projectA {external DirectoryB}   For configuring ProjectA we have to configure full path in the external property which is causing problems or forcing us to do change the properties when we do branches.  Any way to automate the branching process or fix with absolute path will be useful


So why is for example the magnetic field orientated counterclockwise when the electrons are going down in a current wire (or current going up)? Why is the magnetic field not going clockwise, is there a more fundamental reason for?  Probably why-questions are often not appropriate in physics but perhaps sometimes you can ask for deeper causes?!

At school I learnt the  to remember the resulting direction of different phenomena, such as geometrical cross products, mechanical torque, or the direction a screw will move when turning it. This directions are however decided by humans, and we could have easily defined the directions in the opposite way.  However the right hand rule also predicts phenomena which is not arbitrarily set by humans, but is intrinsic to the nature. If you have a coil in which you put some current, and the nature creates a magnetic field in a direction perpendicular to it, the direction depends on the right hand rule.  My question is, why this direction and not the opposite? Nature tends to be symmetric and not have apparent preferences for two equal options, so in a so why is one direction preferred over the other one? Why doesn't a "left hand" rule apply?


Quoting from item 45 in C++ Gotchas:     First a dynamic_cast is not necessarily dynamic, in that it may not   perform a runtime check. When performing a dynamic_cast from a derived   class pointer (or reference) to one of its public base classes no   runtime check is needed, because the compiler can determine statically   that the cast will succeed. Of course, no cast of any kind is needed   in this case, since conversion from a derived class to its public base   classes is predefined.   I thought the above description is where a dynamic_cast is normally used (and therefore would do run-time checks??).   Could someone please explain the difference between the above quote and the "typical" need to use a dynamic_cast? This got me confused as to when I need to use dynamic_cast and why I don't need to use it for the above scenario.

What are the proper uses of:   static_cast dynamic_cast const_cast reinterpret_cast C-style cast (type)value Function-style cast type(value)   How does one decide which to use in which specific cases?


It's a Pre-Owned Phone, I bought it from a Market Place.  Seller forgot to reset the iCloud Account, and I lost the Owner Contact details...  I've seen many Bypass Tricks Online, Nothing worked for me...  Finally My hope is here...  is there any experts here, Know How to Bypass the iCloud Lock to Turn OFF the Find My iPhone.

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?


I have a WFS GET Request, created by A WFS Layer in QGIS. However, for my program I need to have a POST Request. How do I convert the WFS GET request to a WFS POST request?

So I'm new to GIS and I'm missing some of the basic concepts in this field, what I need to do is to write a POST method to add or delete or update some map services I'm working on an ArcGIS server, I can modify the URL to use a GET method, put I have no idea how and where to write a POST method to modify the services.  The URL I keep on modifying is something like this:  https://someserver.domain.com/webserver/services/FAT_Testing/demokmz03/MapServer/WFSServer?SERVICE=WFS&VERSION=1.1.0&REQUEST=GetFeature&typeName=Buildings&BBOX=0,0,100,100&   This works just fine, I also learned all these things from this site:


I mistakenly forgot to include the name of a function when writing a statement. Only in debugging did I find this out as everything compiled fine. I am surprised that gcc did not produce a warning for a C program like this.  int x =0, a=1, b=2, c=3, d=4, e=5, f=6, g=7;      printf("\n%d %d %d %d %d %d %d %d\n",x,a,b,c,d,e,f,g);  x = (a,g=b+c,d,e,f);      printf("\n%d %d %d %d %d %d %d %d\n",x,a,b,c,d,e,f,g);  x = a,g=b+c,d,e,f;      printf("\n%d %d %d %d %d %d %d %d\n",x,a,b,c,d,e,f,g);   The code should have read functionName(a,g=b+c,d,e,f) but was missing the function name.  The syntax  x = (a,g=b+c,d,e,f) results in x = f The syntax  x = a,g=b+c,d,e,f   results in x = a  In both cases g was properly calculated as b+c.  Wouldn't a warning of the first version x = (...) been in order? What valid stand alone expression would appear with (...) in this way. The byproduct is the inclusion or exclusion of the parens also results in two different values for x. Setting x=f due to the parens looks like a fall out from the way the machine code was generated as opposed to being syntactically driven.   Seems that a warning should have been flagged that perhaps this grouped expression was really the parameters of a missing function call. Better to catch a warning like this than having to discover the issue during debugging.


I did a standard installation of drupal 8 varbase and added this into Aqucia Dev Desktop 2.  Where can I find the username/password which is used for the database access from Drupal for the database? I looked into the settings.php but could not find any of this.  To be more specific. Below is the COMPLETE settings.php file without all the comments.  $databases = array(); $config_directories = array(); $settings['hash_salt'] = ''; $settings['update_free_access'] = FALSE; $settings['container_yamls'][] = $app_root . '/' . $site_path . '/services.yml';  $settings['file_scan_ignore_directories'] = [   'node_modules',   'bower_components', ];  $settings['entity_update_batch_size'] = 50;  // <DDSETTINGS> // Please don't edit anything between <DDSETTINGS> tags. // This section is autogenerated by Acquia Dev Desktop. if (isset($_SERVER['DEVDESKTOP_DRUPAL_SETTINGS_DIR']) && file_exists($_SERVER['DEVDESKTOP_DRUPAL_SETTINGS_DIR'] . '/loc_inzicht_dd.inc')) {   require $_SERVER['DEVDESKTOP_DRUPAL_SETTINGS_DIR'] . '/loc_inzicht_dd.inc'; } // </DDSETTINGS> $settings['install_profile'] = 'varbase';   As the site name is named "Inzicht" I expect to find an option in devdesktop but could not find it.  [SOLVED] I did a long scan over the complete HDD and found the connection string in C:\Users\.acquia\DevDesktop\DrupalSettings

I'd like to send my Drupal installation to a colleague, but I don't want him to see the username and the password of my database. Where are these informations stored?  I've seen that the username and the password are written in sitename/sites/default/settings.php, but is it the only file with these informations? Is it sufficient if I change the username and the password in this file and then send my colleague all my Drupal files and my database?


I've coded up my own neural network that I'm experimenting with. I'm curious about the implementation of L2 regularization I've seen in most literature.   Generally a weight update looks something like this:  $$w_i^{\prime} = w_i - \eta \frac{\partial C}{\partial w_i} - \frac{\eta \lambda}{n}w_i$$  That is: The weight update is the previous weight, minus a step in the gradient direction, minus the L2 regularization term. Where $w$ are the weights, $C$ is the cost function, $\eta$ is the learning rate, $n$ is the dataset size, and $\lambda$ is the tuneable regularization parameter.  I feel uneasy about the way the L2 regularization term is calculated: $\frac{\eta \lambda}{n}w_i$  $\eta$ makes sense, and I'm comfortable with $\lambda$ as a tuneable parameter. But dividing by the dataset size $n$ concerns me. This means that the entire regularization effect is dependent on the input dataset. Why wouldn't I just define a simple hard coded percentage, such as: "reduce the weights by 0.1%"?   The dependency on the dataset size seems cumbersome as lambda has to be adjusted whenever the dataset size is changed. I'm often using smaller subsets of the main dataset for quick trial and error before training on the full dataset. I might also try continuously sampling from random perterbations of the original dataset, rendering $n$ rather ambiguous.  Incidentally I'm using minibatch gradient descent for training, with batch sizes typically from tens to thousands.  My question:  Is there a good reason to use $n$ as shown here over subtracting off a small fixed percentage of the weights? E.g. eliminating $n$ from the regularization. What am I not thinking of here? Why is this common?

In a typical neural network, which way is the common way to add regularization?   Assuming regression task, regression error loss is Mean-squared-error   Then we can have two choice of regularization on weights:   $\lambda$ * $\sum ||W||^2$ $\lambda$ * $\textbf{average} ||W||^2$    I have seen most people use the first option, just being curious to ask.


Every time I try to log into one particular server with my main account it says Bad Login, but I can log in fine using my other Minecraft account.   I also tried logging into that server from another computer, but it also says Bad Login!  Why is just one account getting a Bad Login from this one server?

When I try to play multiplayer I type in the only server I know, which the game says was right, then click Play and it loads. Then it says Can't connect to server: bad log in. How can I fix this?


If $A\subseteq B$, is then $A\setminus B = \emptyset$?  If we take a some $x\in A$, then also $x\in B$. Right?  So, if we take all the elements of $B$ away from $A$, we have nothing left?

I need to prove that $A ⊂ B$ if and only if $A − B = ∅$. I have the following "proof":  $$ A \subset B \iff A - B = \emptyset$$ proof for $\implies:$  $$\forall x \in A, x \in B$$  Therefore,  $$A - B = \emptyset$$  proof for $\impliedby$:  If $$A - B = \emptyset$$ then $$\forall x \in B, x \in A$$ since $\forall x \in B, x \in A$,   $$ A \subset B $$  However the whole thing seems to be incredibly "fragile" and relies on circular logic (see how I just switched the sets in the for all statements)  Is this a valid proof? Is there a better way to write it?


I can not find anything about this, is it a known file? I am using a CYGWIN based terminal on windows 10  Here are their locations and the commands I used.  $ find -name [* ./bin/[.exe ./usr/bin/[.exe    $ ls -l -a -r /* | grep [-.*\>] ...all other files that match this... -rwxr-xr-x 1 X 197121   67134 Nov  6 14:22 [.exe drwxr-xr-x 1 X 197121       0 Apr  2 18:15 .. drwxr-xr-x 1 X 197121       0 Jan 26 03:20 .   I would like more information on this file and whether or not I can remove it.

I see there is an executable called "[" in /usr/bin. What is its purpose?


I am having trouble with a seemingly simple Jquery function.  Basically, the small/med/big etc. buttons create a grid of >div>s within a >div>. They all have a class of .colorblock I want to add a class or change the background color upon hovering over these divs.  I've included the jsfiddle (but I'm creating this on my own computer - ignore the fact that the button box butts into the grid on jsfiddle, I can fix that...eventually), and copied the 'problem areas' below. The grid is created successfully, but I can't get anything to interact with the <\div class="colorblock"> after that.   Also - is there a way to use a variable defined earlier in jQuery directly in the    .append('

')   ? It's simpler to calculate the size and put it in the loop instead of making different loops for each div. I tried changing all the divs after they were created but it kept lagging/freezing.  HTML____________

  CSS____________  .colorblock {   float: left;   outline: 2px solid blue; }  .black {  background-color: black; }  .smallcolorblock {   width: 21.875px;   height: 21.875px; }  JQUERY____________  var smallH = '

'  $('#small').click(function(){     $('.colorblock').remove();     for (var i = 1; i <= 32*32 ; i++) {              $('#colorspace').append(smallH);         };  $('.colorblock').hover(function(){     $(this).css("background", getRandomColor()),     function(){         $(this).css("background", "white");     };   $('.colorblock').hover(function() {      $(this).addClass("black");    });

I have a bit of code where I am looping through all the select boxes on a page and binding a .hover event to them to do a bit of twiddling with their width on mouse on/off.  This happens on page ready and works just fine.  The problem I have is that any select boxes I add via Ajax or DOM after the initial loop won't have the event bound.  I have found this plugin (), but before I add another 5k to my pages with a plugin, I want to see if anyone knows a way to do this, either with jQuery directly or by another option.


I live and work in the United States but I have several loans in Canada that I need to pay on a regular basis, so I'm constantly moving money to Canada.  Right now, I have an American Royal Bank account linked to my Canadian Royal Bank account. I transfer money from my Chase Bank account to my American Royal Bank account. Then, a few days later when the transfer has taken place, I transfer it between the two Royal Bank accounts.  I'm wondering if there's a cheaper way for me to move my money, maybe with a better exchange rate or less fees. When I first looked into this, I remember there being a significant fee for an international wire transfer, but maybe the exchange is better?  Right now, I'm moving about $1000 every month or two. I'm wondering what I'll do if I get a big bonus and I want to move ten or twenty thousand dollars at once. Maybe there's a dollar amount when it becomes cheaper to use another method?

I am a Canadian that will be working in US for some time. I will still have Canadian bills to pay, so I would need to regularly transfer US dollars from some US bank to my Canadian bank account in $CAD. What is the least expensive and easy way of doing this?


I know increasing the size of the photo (S,M,L) does not affect the dpi, but refers only to the pixels.  My camera shoots at 300 by default, but sometimes I want a crisper look when I get larger prints.  I can print a 4x6, then scan it and save at the higher resolution, but that is SO time consuming.  Does anyone have a solution to changing the camera setting?  It might not even be possible, or maybe I need a newer, updated camera.  (I use a Nikon D40x, with a AF-S 70-300mm lens for most pictures.)

I often see statements in discussions about web displayed image quality that go something like this: "I only upload pictures at 72 dpi and 1200 pixels on the long edge, so if someone copies and prints the image it won't look as good as if it were 300 dpi."  What? Have I missed something here?  Does an image edited and saved/exported with 1200x800 pixels at 300 ppi look any different online than the same image saved/exported with 1200x800 pixels at 72 ppi? Other than the metadata regarding ppi, is there any difference in the two images at all? If so, what is the difference? If I tell my printer to print the images at 4R (4X6 inches) will there be any difference at all in how the printer creates a print from the 1200x800 @ 300 dpi image versus the 1200x800 @ 72 dpi image?


I frequently find that I want to make a macro, say a derivative macro for example with the following syntax:  \def\dd #1;#2;{ return... }   However, I want it to check if it is inline math such as when math is wrapped between two dollar symbols $ ... $  or if it is in a block of math such as an \[...\] or align or equation environment. If the latter is the case then I want it to typeset  \frac{\mathrm{d} #1 }{\mathrm{d} #2 }   if it is inline math such as $ ... $ then I want it to typeset  \mathrm{d} #1 / \mathrm{d} #2.   How can I do this?

Is there a test for the different styles within maths mode?  What I really want is to be able to save the current style to reinvoke it later on, but a \if along the lines of \ifmmode would work just as well.  In the specific example, I want to measure how big something will be when displayed in maths mode, so I do:  \settoheight{\mathheight}{some bit of maths}   except that it complains because the some bit of maths gets put in a box and measured, and the box doesn't know that it's maths.  So instead I put:  \settoheight{\mathheight}{\(some bit of maths\)}   except that then I get the wrong answer if this is used in displayed maths.  So ideally, I want:  \ifdisplaystyle  \let\currentstyle\displaystyle \else  \iftextstyle   \let\currentstyle\textstyle  ...  \fi \fi \settoheight{\mathheight}{\(\currentstyle some bit of maths\)}   and then I'll be happy.  Is there such a test?    Okay, so \mathchoice is clearly the way to go (thanks Martin!), but its behaviour is a little odd and since I want to use it to define a macro depending on which mode I'm in, this oddity is quite important.  Here's the code:  \newcommand{\mathtest}{% \gdef\name{a}% \mathchoice{% \name \gdef\name{b}% }{% \name \gdef\name{c}% }{% \name \gdef\name{d}% }{% \name \gdef\name{e}% }% \name}  \[ \mathtest \]   If \mathchoice behaved like \if, this ought to print ab.  But it prints ae.  All the options to \mathchoice get processed (which makes me wonder a bit how it works, but that's by-the-by).  So, is there an obvious way to make \mathchoice behave a little more like \if?


I am trying to install oracle database in Ubuntu 16.04 LTS. I had unzipped the oracle database file in opt folder,but now when I am trying to give execute right to the sqldeveloper file using chmod +x sqldeveloper.sh, it's throwing this error:  chmod: changing permissions of 'sqldeveloper.sh': Operation not permitted

I am trying to install SQL Developer on Ubuntu 14.04. I have followed some tutorials but none of them worked. So I am asking you if you know how to install SQL Developer.


There are lots of places where I can compare flight fare costs, where the listed prices include all taxes and fees.    This capability is eroding due to practices like route-dependent carry-on bag fees that are very hard to locate in order to quantify.  I've had searches where I wind up finding a list of flight options, then spending a half an hour per option to try to quantify the baggage fees, and once you value that time you're not really saving anything by doing a price comparison.    I'd like to be able to enter into a search engine whether or not I plan to bring a carry-on and how many bags I plan to check, so that I can see the price of the ticket as I plan to take it, and not have to search for the modifiers every time.  Does this exist?     Related:

I am looking for a flight search engine that includes a luggage calculator in the price. I recently booked a trip and had the choice between two carriers at the time, and not feeling very stupid I chose the cheaper one.  The crux is that after I had paid I found out that the more expensive airline had vastly different rules for baggage. In fact it allowed twice the amount of baggage without extra charge.  After having found the price for extra luggage very extreme I had already decided I will send the extra baggage as separate freight, because the speed is not important. But of course had I known this from the start I could have saved myself a lot of work and money.  I am aware that this information can be found on respective carrier website, but even within a single company it can differ from route to route. Would be handy if I didn't have to try and calculate it all myself.  So my question is simply, is there any flight search engine/price comparison site where I can also enter my total baggage needs to have it included in the price comparison between carriers?


I am befuddled by the announcement of a rights offering in which stockholders were given the right to purchase the stock at a price of 5.50$ when the market price was at 4.40$. This seemed very unrealistic, I mean who would do that? But to my immense surprise the market price increased to 5.50$ in the following week! Why is that? None of the company fundamentals have changed and there were no other news. If the company had set a price of 6.00$ in the rights offering, would the price have increased to 6$? Obviously the company thinks that their shares are worth that much but why did the market suddenly agree?  Here are some more details:  I am long a micro-cap stock with ticker symbol LGL (). Two months ago they announced they would hold a rights offering in which stockholders will receive transferable rights to purchase additional shares (). Not much happened after that and as I expected the stock price fell a little due to the upcoming dilution. However last week they announced () that they would offer the shares for a price of 5.50$ a share (going into effect on September 5). At the time of the announcement the stock was trading around 4.40$. I saw that and was like huh? I couldn't understand why they set the price of the offering so markedly above market price. Over the last week I watched with astonishment a steady increase until the market price hit 5.48$ yesterday. Why did this happen? Obviously management thinks that the company is worth that much, but why did the market simply believe this statement without any additional information?

A company has made an application for new Ordinary Shares. The new Ordinary Shares will rank pari passu with the existing Ordinary Shares. Also the company issues Ordinary Shares in respect of the satisfaction of the initial tranche of deferred consideration for an acquisition to vendors at a strike price of 12.5 per Ordinary Share.   My understanding is that the above mentioned sellers bought the new issued shares at the price of 12.5. However the market price at the time was 8.37. Could you please explain what happened here as it is not likely that one will buy shares at a much higher price than one can buy on market.


I have a batch job that delete records from object that were created more than 13 month ago. Please help me to write unit test for this batch. Thanks  @IsTest private class ABI_CXC_DeleteNVMData_Batch_Test {  public String query;  @TestSetup static void setup() {     List<NVMContactWorld__InteractionEvent__c> testEvent = new List<NVMContactWorld__InteractionEvent__c>();     testEvent.add(new NVMContactWorld__InteractionEvent__c(Name = 'Test Event'));     insert testEvent;     Datetime createDate = Datetime.now().addMonths(-13);     Test.setCreatedDate(testEvent[0].Id, createDate); }  @IsTest static testMethod void positiveTestMethod() {     Test.startTest();     ABI_CXC_DeleteNVMData_Batch records = new ABI_CXC_DeleteNVMData_Batch(query);     Database.executeBatch(records);     Test.stopTest();     System.assertEquals(1, [SELECT Id FROM NVMContactWorld__InteractionEvent__c WHERE Name = 'Test Event']); }   }

This is a canonical question and answer developed by the community to help address common questions. If you've been directed here, or your question has been closed as a duplicate, please look through the resources here and use them to shape more specific questions. To browse all canonical questions and answers, including more unit test resources, navigate to the  tag.  I'm testing asynchronous code - like Batch Apex, Queueable Apex, @future methods, or Scheduled Apex - and I'm getting unexpected results. It seems like portions of my code aren't running, or I'm getting confusing errors about batch invocations. How do I effectively test this kind of code?


I am writing my final degree but I can´t find on the web something that could help me. I would like to do a table like this. I tried to use \multirow{}{}

In a table, how can I draw a horizontal line that goes only through some of the cells? I mean a line like the one in the Foo and in the Bar area of this table:  +----+-----+ |Foo |1 |2 | |    |1 |2 | |    +--+--+ |    |1 |2 | |    |1 |2 | +----+-----+ |Bar |1 |2 | |    |1 |2 | |    +--+--+ |    |1 |2 | |    |1 |2 | +----+--+--+


I have a rough idea of how this works intuitively, $V/W$ and $W$ being finitely generated means that they both have a finitely generating subset, we put $\{a_1, \dots, a_n\}$ to be $W$'s basis, and $\{b_1, \dots, b_m\}$ to be $V/W$'s. Any element $c \in V/W$ can be written as a linear combination of $\{b_1, \dots, b_m\}$ and as $a + b$ such that $a \in W$ and $b \in V$, $a$ is written as a linear combination of $\{a_1, \dots, a_n\}$. $b = c - a$ with $c$ and $a$ being linear combinations of finitely generated elements, this forces $b$ to be finitely generated?

I know this must be easy. I'm new to modules, so perhaps I must be missing  something important.     Let $M$ be an $R$-module. Show that if there exists a submodule $N$ such that $N$ and $M/N$ are finitely generated, then $M$ is finitely generated.   If the exact sequence $0 \longrightarrow N \longrightarrow M \longrightarrow M/N \longrightarrow 0 $ (where the second and third arrows are inclusion and projection respectively) splits then $M$ would be isomorphic to the direct sum of $M$ and $M/N$ and the conclusion would follow (I think). But I can't show that it splits.  Thank you.


The problem is:     If $f(x)\in C[0,+\infty)$, $\displaystyle\lim_{x\to+\infty}f(x)=k\in\mathbb R$, and $b>a>0$, prove:   $$\int_{0}^{+\infty}\frac{f(ax)-f(bx)}{x}dx=[f(0)-k]\ln(\frac ba)$$   My attempt: This integral has two singularities, one at $x=0$ and the other at $x=+\infty$, so we'd better split it into two parts, each with only one singularity. Let $A>0$, and let $I$ denote the integral, then $$\begin{align} I&=\Big(\int_{0}^{A}+\int_{A}^{+\infty}\Big)\Big(\frac{f(ax)-f(bx)}{x}dx\Big) \\&=\Big(\int_{0}^{A}+\int_{A}^{+\infty}\Big)\frac{f(ax)}{x}dx-\Big(\int_{0}^{A}+\int_{A}^{+\infty}\Big)\frac{f(bx)}{x}dx \\&=\Big(\int_{0}^{aA}+\int_{aA}^{+\infty}\Big)\frac{f(x)}{x}dx-\Big(\int_{0}^{bA}+\int_{bA}^{+\infty}\Big)\frac{f(x)}{x}dx \\&=\Big(\int_{0}^{aA}+\int_{bA}^{0}+\int_{aA}^{+\infty}+\int_{+\infty}^{bA}\Big)\frac{f(x)}{x}dx \end{align}$$ If I keep going and cancel these integral limits out (and I know it's probably not doable because infinity is involved here and may play tricks on us), I simply get $I=0$,  of course that's not the desired result. What's more, I hope to get the limit $k$ involved, but there seems no obvious way to do so. Can you help me? Any help or hint (if not too obscure) will be appreciated. Best regards!

How can I prove the Theorem of Frullani? I did not even know all the hypothesis that $f$ must satisfy, but I think that this are  Let $\,f:\left[ {0,\infty } \right) \to \mathbb R$ be a a continuously differentiable function such that $$ \mathop {\lim }\limits_{x \to \infty } f\left( x \right) = 0, $$ and let $ a,b \in \left( {0,\infty } \right)$. Prove that $$ \int\limits_0^{\infty}  {\frac{{f\left( {ax} \right) - f\left( {bx} \right)}} {x}}dx  = f\left( 0 \right)\left[ {\ln \frac{b} {a}} \right] $$  If you know a more general version please give it to me )= I can´t prove it.


We have in and out degree of a directed graph G. if G does not includes loop (edge from one vertex to itself) and does not include multiple edge (from each vertex to another vertex at most one directed edge), we want to check for how many of the following we have a corresponding graph. the vertex number start from 1 to n and the degree sequence are sort by vertex numbers.  a) $d_{in}=(0,1,2,3), d_{out}=(2,2,1,1)$  b) $d_{in}=(2,2,1), d_{out}=(2,2,1)$  c) $d_{in}=(1,1,2,3,3), d_{out}=(2,2,3, 1,2)$  I want to find a nice way instead of drawing graph.  for (C):


I getting the "Attempt to invoke virtual method 'java.lang.String[] android.os.Bundle.getStringArray(java.lang.String)' on a null " error in some devices:  Stack Trace:  Exception java.lang.RuntimeException: Unable to start activity     ComponentInfo{com.facebook.misstest/com.facebook.misstest.LoveMeterResultActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String[] android.os.Bundle.getStringArray(java.lang.String)' on a null object reference android.app.ActivityThread.performLaunchActivity (ActivityThread.java:3254) android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:3350) android.app.ActivityThread.access$1100 (ActivityThread.java:222) android.app.ActivityThread$H.handleMessage (ActivityThread.java:1795) android.os.Handler.dispatchMessage (Handler.java:102) android.os.Looper.loop (Looper.java:158) android.app.ActivityThread.main (ActivityThread.java:7229) java.lang.reflect.Method.invoke (Method.java) com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run        (ZygoteInit.java:1230) com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1120) Caused by java.lang.NullPointerException: Attempt to invoke virtual method    'java.lang.String[] android.os.Bundle.getStringArray(java.lang.String)' on a null object reference com.facebook.misstest.LoveMeterResultActivity.onCreate       (LoveMeterResultActivity.java:133) android.app.Activity.performCreate (Activity.java:6876) android.app.Instrumentation.callActivityOnCreate (Instrumentation.java:1135) android.app.ActivityThread.performLaunchActivity (ActivityThread.java:3207) android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:3350)   Here is the code which is send data to the next activity:              //send this result to LoveMeterResultActivity             final Bundle basket = new Bundle();             basket.putStringArray("key", loveData);                     Intent intent = new Intent(LoveMeterActivity.this, LoveMeterResultActivity.class);                     intent.putExtras(basket);                     startActivity(intent);

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?


I know that there are already similar questions to this on stack exchange, but I am working in R studio with the Stargazer library and I want to be able to directly copy and paste my tables into overleaf and have them be centered (the problem is that they are often too big and fall off the edge of the page). Is there some easy way to center these tables without having to recode the tables in any way? A lot of other responses I have seen are hard for me to follow because I am trying not to have to recode the tables. The whole perk of using Stargazer is that it makes the tables for you... :/ Below is an example table (obviously fake results): \begin{table}[!htbp] \centering    \caption{}    \label{}  \begin{tabular}{@{\extracolsep{5pt}}lccccccc}  \\[-1.8ex]\hline  \hline \\[-1.8ex]  Statistic & \multicolumn{1}{c}{N} & \multicolumn{1}{c}{Mean} & \multicolumn{1}{c}{St. Dev.} & \multicolumn{1}{c}{Min} & \multicolumn{1}{c}{Pctl(25)} & \multicolumn{1}{c}{Pctl(75)} & \multicolumn{1}{c}{Max} \\  \hline \\[-1.8ex]  Marriage & 10000 & 100000 & 10000 & 10000 & 1000 & 10000 & 1000000 \\  Real Income & 10000 & 100000 & 10000 & 10000 & 1000 & 10000 & 1000000 \\ Unemployment & 10000 & 100000 & 10000 & 10000 & 1000 & 10000 & 1000000 \\ \hline \\[-1.8ex]  \end{tabular}  \end{table}   EDIT: I am not sure why the table is not showing up correctly here, but it will in overleaf.

I have a table that I want to insert on a page, but at least one (perhaps both) of the following conditions are met:   The table is too wide to fit within the text block or page. That is, I'm exceeding some horizontal restriction. The table is too tall to fit within the text block or page. That is, I'm exceeding some vertical restriction.   What are my options to make this table fit? If it doesn't fit, regardless of my attempts, what other options exist?


I have never used MPAndroidChart before. I am just testing it out for a project I'm doing. What might be causing the null object reference error? The following code is below. java.lang.NullPointerException: Attempt to invoke virtual method 'void com.github.mikephil.charting.charts.LineChart.setScaleEnabled(boolean)' on a null object reference         at com.example.fishfindergraphicsnobtinputdata.MainActivity.onCreate(MainActivity.java:35)      public class MainActivity extends AppCompatActivity {     MyCanvas myCanvas;     String TAG;     Context context;     private LineChart lineChart;              @Override         protected void onCreate(Bundle savedInstanceState) {             super.onCreate(savedInstanceState);             myCanvas = new MyCanvas(this);             myCanvas.setBackgroundColor(Color.GRAY);             setContentView(myCanvas);             context = getApplicationContext();             Utils.init(context);             lineChart = findViewById(R.id.linechart);             lineChart.setScaleEnabled(false);             lineChart.setDragEnabled(true);                  ArrayList<Entry> dataset1 =  new ArrayList<>();             dataset1.add(new Entry(10, 10f));             dataset1.add(new Entry(30, 30f));             dataset1.add(new Entry(50, 50f));                  LineDataSet lineDataSet = new LineDataSet(dataset1, "linechart");                  ArrayList<ILineDataSet> dataSets = new ArrayList<>();             dataSets.add(lineDataSet);                  LineData data = new LineData(dataSets);                  lineChart.setData(data);              }  }


What is meant by "strings are immutable in c#". I need some examples to understand this.I can not find some proper examples to understand this

Why is it that they decided to make String immutable in Java and .NET (and some other languages)? Why didn't they make it mutable?


In the example bellow, is it possible to set the Classname type parameter dynamically?  UpdateAndSave<Classname>>().Execute(sql)

What's the best way to call a generic method when the type parameter isn't known at compile time, but instead is obtained dynamically at runtime?  Consider the following sample code - inside the Example() method, what's the most concise way to invoke GenericMethod<T>() using the Type stored in the myType variable?  public class Sample {     public void Example(string typeName)     {         Type myType = FindType(typeName);          // What goes here to call GenericMethod<T>()?         GenericMethod<myType>(); // This doesn't work          // What changes to call StaticMethod<T>()?         Sample.StaticMethod<myType>(); // This also doesn't work     }      public void GenericMethod<T>()     {         // ...     }      public static void StaticMethod<T>()     {         //...     } }