If I know the speed of an electron, how should I go about calculating its frequency?  For example, if the electron was travelling at $v$ $ms^{-1}$ there are two options I could take.   Calculate the momentum of the electron using $p=m_ev$. Then use the formula for de Broglie's wavelength to find the wavelength of the electron using $\lambda=\frac{h}{p}$. Then use the formula for wave speed, $v=f\lambda$ to get the frequency of the electron. Alternatively, I could find the kinetic energy of the electron using the formula $KE=(1/2)m_ev^2$. Then substitute the kinetic energy calculated into $E=hf$ to get the frequency of the electron.   The first method doesn't give me the right answer, but the second method does. Which step of the first method is incorrect and why?

I am studying quantum physics and there is something I don't understand:   I know that for any particle $E=hf$ (Einstein relation) and  $v=\lambda f$ ($v$ is the speed of the particle). I also know that the kinetic energy is $E_k=\frac{mv^2}{2}$.    Solving those 3 equations for $\lambda$:  $$h\frac{v}{\lambda}=\frac{mv^2}{2},$$ I finally find $$\lambda=\frac{2h}{mv}=\frac{2h}{p},$$ which is not consistent with the De Broglie relation $$\lambda=\frac{h}{p}.$$ Where am I wrong in my development?


I'm studying Group theory at the moment and am struggling to see how $$\mathbb{A}_3\cong Z/3Z$$ How can you form an isomorphism that sends say (ijk) $\in \mathbb{A}_3$ to either of {0,1,2} $\in Z/3Z$ ?

Let $G = \left\{e, a, b \right\}$  Since $G$ has $3$ elements, $a \not= e , \,b \not= e, \,a \not= b$  $G$ is closed so $ab \in G$  If $ab = a$, this means that $b = e$ and if $ab = b$, $ a = e $  So we are left with $ab = e$  Define a function  $\varphi (a) = [1]$  $\varphi (b) = [2]$  To show that this function is an isomorphism,   $\varphi (e) = \varphi (ab) = \varphi (a) + \varphi (b) = [1] + [2] = [0]$  So $\varphi (e) = [0]$  So this function takes the identity to the identity, so it's an isomorphism.


I understand staircases are very dangerous for babies.  We have only one staircase at our home. The staircase is 20 cm high.  Our baby is very curious and wants to go down that one staircase (20 cm high) and into the other room to explore it.  I'd like to safely introduce the staircase to my baby. How should I do this? How should I approach teaching a 10 months old baby about the staircase?

We have 14-month twins who are just starting to learn to walk. Our house is a split level townhouse with three short flights of stairs. We have several gates to keep them safe. They're pretty competent at climbing up steps when supervised, but getting down them is a huge worry.   Obviously, we don't want to let them loose on the stairs until we are certain they will be safe. How can we help them learn to climb and descend stairs on their own? What are the signals that they are ready to be alone on the stairs without too much danger?


I am using Ubuntu 17.04.  By mistake, I have changed the ownership of sudo. So now I can't make any changes as the chown command I could use to fix it needs sudo.   If I use sudo I get   sudo: /usr/bin/sudo must be owned by uid 0 and have the setuid bit set

Whenever I try to do anything at all that requires my password it returns this:  u7ur7l3@ubuntu:~$ sudo sudo: /usr/lib/sudo/sudoers.so must be owned by uid 0 sudo: fatal error, unable to load plugins u7ur7l3@ubuntu:~$   So I can't install anything from the Software Center / package manager or run any commands in terminal that require my password. I can log in, but that's pretty much it.  I accidentally changed the permissions of some files, then changed some more trying to fix it :/. Now I'm completely lost as to what to do.  This is what happened when I tried to get sudo working again using pkexec:  u7ur7l3@ubuntu:~$ pkexec chown root /usr/lib/sudo/sudoers.so Error getting authority: Error initializing authority: Error calling StartServiceByName for org.freedesktop.PolicyKit1: GDBus.Error:org.freedesktop.DBus.Error.Spawn.ExecFailed: Failed to execute program /usr/lib/dbus-1.0/dbus-daemon-launch-helper: Success   u7ur7l3@ubuntu:~$ sudo ls sudo: /usr/lib/sudo/sudoers.so must be owned by uid 0 sudo: fatal error, unable to load plugins   And to change permissions I was using Root Actions as a dolphin service/ plugin thing, so history doesn't show me the permission changes.  I just realized that sounds don't work at all anymore. When I go into Phonon my default settings and playback devices aren't even there. Also I don't have the option to shutdown, I can only log out or leave.


I have many threads (SwingWorker, Timer, Thread..) in different parts of the application. I need to call one method which pause all these threads.  What is the best approach to do this?   Thanks  Additional Info  I have a notepad in the app and it can paste images, draw arrow, lines, type text, you can write with stylus etc.. At the same time in the background this app does different things: check login time, check messages, updates something, works with database.   So when you try to write with stylus and app does all these things in the background, writing with stylus becomes a little bit slow. So I decided to pause all these threads in the background.  I think this should help and I wonder what is the best way to pause these threads. They should continue to work after I finish to write with stylus.

How do you kill a java.lang.Thread in Java?


Let $H$ be a separable Hilbert space, show that every bounded operator from H to itself  can be approximated in the strong operator topology by a sequence of finite rank operators.  I know we can find an orthonormal basis for the hilbert space. If we let $P_n$ the the projection on the first $\{e_i\}_{i=1}^n$ basis elements, how close can we come?

Let $H$ be a separable Hilbert space. Show that every bounded operator from $H$ to itself can be approximated in the strong operator topology by a sequence of finite rank operators.  Im not sure what the strong operator topology implies (that the evaluation map for the operator is continuous?) Is it enough to show to use projection to some subspace of some orthogonal sequence?


I was trying to execute a query on data.stackexchange.com without being logged in, and it throws up this error (screenshot):    The devs might want to look into it, since this may be happening elsewhere as well for other users/sites and is time bound.

According to this , I thought the new recaptcha API was used network-wide. Though today, when going to  (which for whatever reasons never recognized me automatically), I got this message instead of a usable captcha image.   V1 Unsupported Please direct siteowner to   (Doing a second try doesn't show this message anymore, and the recaptcha v1 works as intended.)  According to , the reCAPTCHA v1 API will stop working on March 31, 2018:  What happens to reCAPTCHA v1? Any calls to the v1 API will not work after March 31, 2018. Starting in November 2017, a percentage of reCAPTCHA v1 traffic will begin to show a notice informing users that the old API will soon be retired. Most websites around the world have already switched to reCAPTCHA v2, where humans pass effortlessly. With our advanced risk analysis engine, reCAPTCHA v2 can effectively separate humans from bots and always stay ahead of the attackers. If your site still uses reCAPTCHA v1, please upgrade to reCAPTCHA v2 immediately. We no longer support reCAPTCHA v1. Any calls to the v1 API will not work after March 31, 2018. Please register a new key and upgrade to v2.  I'm really hoping this will not take  to fix, because we've only got three and a half weeks left!


When navigating to the , in the comments section, by default there is no highlight for the nomination owner.  But when I click the "show n more comments" link at the end of the comments section, after all the comments are loaded, there is a highlight applied for the nomination user in their comments.  It seems owner CSS class is added after the click of "show n more comments" link, which caused the inconsistency.  GIF for the same

This is similar to , except it's a bug report, not a feature request.  Currently, the nominee's comments on his/her own post are not highlights, unless you click "add / show more comments"  When the page is loaded it looks like:    AfterI click "add / show more comments", it becomes:    Could we have the blue highlighting on the post owner's comments there all the time? It becomes difficult to see the nominees responses to questions, especially on nominations where there aren't enough comments to enable the "add / show more comments" features, like Matt's.


I seek a function $f(x)$ such that $f(f(x)) = \log(x) \forall x > 0$ .   If possible, $f$ should be monotonic and $\log(x) < f(x) < x, \forall x > 0$  How would I go about this? Does such a function exist?

Imagine a real-valued semilog function $\DeclareMathOperator{\sog}{sog}\sog$ with the property that     $$\sog(\sog(x)) = \log(x)$$   for all real $x>0$.   My questions:    Does such a function exist? How do I compute it?


I have traveled to the Ender "End" and beat the Ender Dragon at least 2 times. I have begun to notice that after killing the Ender Dragon, an egg appears near the Portal back to the Overworld. I guess it is the Ender Dragon egg, but when i hit it, the egg just "teleports" somewhere else. How do i get it to go to the overworld. When i am in creative mode, I looked in the spawn egg section and find no Ender Dragon spawn egg. So what do i do to spawn the ender dragon in the overworld?  And do i surround the ender dragon egg with tnt to destroy it?  Help please

So I finally killed the Ender Dragon! As I was climbing the portal back to the world, I noticed that on top of the column there was an egg. So I attacked, mined, clicked and nothing happened, it just teleported away. What does the egg do and how do I get it?


I am trying to execute a MySQL query from within a function being called by a search form, giving in 2 values, $Search & $dropdown.  To prevent MySQL injection I am trying to bind the values as below:  $database->query('SELECT * FROM equipment WHERE :dropdown like :Search'); $database->bind(dropdown, $dropdown); $database->bind(Search,$Search); $getServers = $database->fetchall();   In the MariaDB logs I found the query was executed as below:  SELECT * FROM equipment WHERE 'rackid' like '5';   The problem is that the column name:('rackid'), is executed with quotes which  give 0 output, if I manually execute the same code without the quotes as below I get the desired ouput.  SELECT * FROM equipment WHERE rackid like '5';   Is there a way to prevent the code from adding the single quotes to the variables in the mysql statement?

I am trying to refer to a column name to order a query in an application communicating with an Oracle database. I want to use a bind variable so that I can dynamically change what to order the query by.   The problem that I am having is that the database seems to be ignoring the order by column.   Does anyone know if there is a particular way to refer to a database column via a bind variable or if it is even possible?   e.g my query is   SELECT * FROM PERSON ORDER BY :1   (where :1 will be bound to PERSON.NAME) The query is not returning results in alphabetical order, I am worried that the database is interpreting this as:-  SELECT * FROM PERSON ORDER BY 'PERSON.NAME'    which will obviously not work.  Any suggestions are much appreciated.


while its a similar value to its neighbour - Z translation (and I wont say if thats above or to the left for fear of sparking a religious war!) and it only seems to change when the Z translation value changes, however the value is not quite the same  Normally I just see either this value ignored or just a 1 in all the tutorials I've seen  Can someone explain exactly what this last element does ?

To translate a vector by 10 unit in the X direction, why do we have to use a matrix?    We can just add 10 to the mat[0][0], and we got the same result too.


I wish to know if there is any options to boot android device automatically on connecting to power supply. i am not considering rooting options as i was planning for production application. I have tried to enter into fastbood mode without much success .. trying on samsung galaxy tab A.

Is it possible to automatically power on the device once the charger is connected given that the device is initially turned off?


I'm wondering if there is a keyboard short cut for examining and switching between multiple windows of the same application?  I know of Alt + Tab but that only shows different applications.

I'm looking to quickly switch between to windows of an application in Unity. I looked at  but I didn't get any answer.  The only option I've got is to long-click on the icon on the dash and click on the window when they're all shown. That's definitely too long ! I'm sure there is a shortcut, like an Alt+Tab but I don't find it.  So, how can I quickly switch between windows of an application ?


My opponent plays a . Can I  it before its ETB effect to stop my opponent from making a thopter?

Player A taps  targeting Player B; its "deals 1 damage to target player" ability is placed on the stack.  Player B gets priority and responds with , targeting Goblin Fireslinger.  Both players pass priority. Snap resolves, and Goblin Fireslinger is returned to its owner's hand.  Does Player B still take 1 damage from Goblin Fireslinger's activated ability?  I know that if the creature had been killed/sent to the graveyard, the ability would still resolve, but I was told recently that because a player's hand is a private zone it couldn't. If anyone could confirm or deny this for me, it would be most appreciated.


I have some element in div, using their class i have some jquery defined. When i add(append) new div with same class, the jquery is not working.  In snippet below, elements under 'old' are hard coded and jquery works fine but elements under 'new' are appended and same jquery is not working.    $(".ele").on("click", function() {   $(this).hide(); }); $("#more").on("click", function() {   $("

").appendTo("#all"); }); .ele {   width: 20px;   height: 20px;   margin: 10px;   background-color: #bbb;   display: inline-block; }
click to add box

Instruction: click the boxes to hide

Old Elements:

New Elements:

     I want to append div with same class on which predefined jquery would work. Please Help.

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.


When I enter the following command on a terminal session.  $ sudo ln -s /opt/utorrent-server-v3_0/utserver /usr/bin/utserver   It shows me the following message  ln: failed to create symbolic link ‘/usr/bin/utserver’: File exists   sudo ln -s /opt/utorrent-server-v3_0/utserver /usr/bin/utserver failed to create the symbolic link.  What should I do?

. When I try to install utorrent till this step it is fine  sudo chmod -R 777 /opt/utorrent-server-v3_0/   After this step when i proceed futher and giving the next command  sudo ln -s /opt/utorrent-server-v3_0/utserver /usr/bin/utserver   Then I get:  failed to create symbolic link ‘/usr/bin/utserver’: File exists   And the file in /usr/bin is broken.  Any idea how to fix this?


I am a UK citizen and will be flying to Toronto in September and spending 2 weeks in Canada before traveling by train from Montreal to New York for 4 days and then flying back to the UK form New York.  Will I need to apply for an ESTA and a I-94 for my trip to the US?

As a UK citizen, I will be flying to Vancouver (for which I will need an eTA) and then taking an AMTRAK train to Seattle. I will stay in Seattle for several days before returning to Vancouver and flying back to the UK. Do I need an ESTA for entering the US during this trip?


I'm trying to calculate a Mahalanobis-type pairwise distance matrix in R. I have 33 individuals, each with 10 variables. The idea is to get a distance matrix D, where   $$D_{i,j}=(\mathbf{X}_i-\mathbf{X}_j)W^{-1}(\mathbf{X}_i-\mathbf{X}_j)^T$$  However I haven't been able build proper code for it.

I need to calculate the sample Mahalanobis distance in R between every pair of observations in a $n \times p$ matrix of covariates. I need a solution that is efficient, i.e. only $n(n-1)/2$ distances are calculated, and preferably implemented in C/RCpp/Fortran etc. I assume that $\Sigma$, the population covariance matrix, is unknown and use the sample covariance matrix in its place.  I am particularly interested in this question since there seems to be no "consensus" method for calculating pairwise Mahalanobis distances in R, i.e. it is not implemented in the dist function nor in the cluster::daisy function. The mahalanobis function does not calculate pairwise distances without additional work from the programmer.  This was already asked here , but the solutions there seem incorrect.   Here is a correct but terribly inefficient (since $n \times n$ distances are calculated) method:  set.seed(0) x0 <- MASS::mvrnorm(33,1:10,diag(c(seq(1,1/2,l=10)),10)) dM = as.dist(apply(x0, 1, function(i) mahalanobis(x0, i, cov = cov(x0))))   This is easy enough to code myself in C, but I feel like something this basic should have a preexisting solution. Is there one?  There are other solutions that fall short: HDMD::pairwise.mahalanobis() calculates $n \times n$ distances, when only $n(n-1)/2$ unique distances are required. compositions::MahalanobisDist() seems promising, but I don't want my function to come from a package that depends on rgl, which severely limits others' ability to run my code. Unless this implementation is perfect, I'd rather write my own. Anybody have experience with this function?


Why code return string value is 19880420 instead of 19880320?  SimpleDateFormat template= new SimpleDateFormat("yyyyMMdd"); Calendar cal = Calendar.getInstance(); cal.set(1988, 3, 20, 18, 00);  return template.format(cal.getTime());

In java.util.Calendar, January is defined as month 0, not month 1. Is there any specific reason to that ?  I have seen many people getting confused about that...


I am trying to create a custom button on a Visualforce page which will invoke an Apex method. The goal of the button is for the user to click it to approve of any records that are waiting on their approval. The approval process has multiple steps and records are automatically submitted for approval on creation.  I know how to create a new approval process using Apex, but that's not what I need. If I try to start a new approval process I get an error saying that the record is already in an approval process.   The closest I got was this:      Approval.ProcessSubmitRequest approvalRequest = new Approval.ProcessSubmitRequest();     approvalRequest.setComments('Submitted for approval');     approvalRequest.setObjectId(caseResult.id);     Approval.ProcessResult approvalResult = Approval.process(approvalRequest);   This is the error I get:  Process failed. First exception on row 0; first error: ALREADY_IN_PROCESS, This record is currently in an approval process.   How can I just move the record to the next step of the currently running approval process?

I have an idea of approving/rejecting multiple records via apex. I read from  and I was able to approve/reject many records at a time.  My problem is that I used for loop for approving all of the records, which caused an error of Too many SOQL queries (which happened because each record(Account) is connected to 2 triggers and I used like 100 records for testing)and having the process caused the triggers to run once for every record.  Is there a way to approve/reject multiple ProcessWorkitemRequests at once? (like maybe putting them first in a list before using DML statements)  Here is my code:  Set<Id> accIds = (new Map<Id, Account>([SELECT Id FROM Account])).keySet(); Set<Id> pIds = (new Map<Id, ProcessInstance>([SELECT Id,Status,TargetObjectId FROM ProcessInstance where Status='Pending' and TargetObjectId in :accIds])).keySet(); Set<Id> pInstanceWorkitems = (new Map<Id, ProcessInstanceWorkitem>([SELECT Id,ProcessInstanceId FROM ProcessInstanceWorkitem WHERE ProcessInstanceId in :pIds])).keySet();  for (Id pInstanceWorkitemsId:pInstanceWorkitems){     system.debug(pInstanceWorkitemsId);         Approval.ProcessWorkitemRequest req2 = new Approval.ProcessWorkitemRequest();         req2.setComments('mRequest.');         req2.setAction('Reject');         req2.setNextApproverIds(new Id[] {UserInfo.getUserId()});          // Use the ID from the newly created item to specify the item to be worked         req2.setWorkitemId(pInstanceWorkitemsId);          // Submit the request for approval         Approval.ProcessResult result2 =  Approval.process(req2); }


Can the solutions for $\log_1(1)$ be $0$ and $1$?

What is $\log(1)$ to the base of $1$? My teacher says it is $1$. I beg to differ, I think it can be all real numbers! i.e., $1^x = 1$, where $x\in \mathbb{R}$.  So I was wondering where I have gone wrong.


While I was writing a status update today on social media I decided to do some grammar-learning. The status update was "Happy Labor Day everyone!" and I am now wondering if I should place a comma between "Day" and "everyone?" My grammar skills aren't great, and this may be staring me right in the face as I'm thinking about it, but researching on the web and Stack Exchange hasn't brought up the case yet. Help would be much appreciated.

I grew up learning that the comma must be placed there, but it seems like an unnecessary interruption in a phrase that isn't ever spoken that way.


The Hamiltonian is defined as the Legendre transform of the Lagrangian $$H = p\dot{q} -L .$$ In the Lagrangian formalism we are free to add the total derivative of an arbitrary function $F=F(q,t)$ to the Lagrangian $$ L \to L' = L + \frac{dF}{dt} $$ because such an additional term has no effect on the Euler-Lagrange equation.   For the momentum $ p =  \frac{\partial L}{\partial \dot{q}} $ such a shift of the Lagrangian implies $$ p \to p'= p +  \frac{\partial  F}{\partial q} .$$   If we combine these two observations, we find the following transformation law for the Hamiltonian \begin{align} H(q,p) \to H' &= p' \dot q' - L' \\ &= \left( p + \frac{\partial  F}{\partial q} \right) \dot q - \Big( L + \frac{dF}{dt} \Big) \\ &= H + \frac{\partial  F}{\partial q} \dot q - \frac{dF}{dt}  \end{align} Is this transformation law correct or am I missing something important? (In the literature I've only found several times the statement that the Hamiltonian like the Lagrangian is allowed at most to change be the total derivative of some function. But here it seem that there is an additional term...)

The following is exercise 8.2 in 3rd edition (and exercise 8.19 in 2nd edition) of Goldstein's Classical Mechanics.   Adding the total time derivative of a function of $q_i$ and t to the Lagrangian will not change the the Euler-Lagrangian equation. So if we make the following change to Lagrangian,   $$L'(q,\dot{q},t) = L(q,\dot{q},t) + \frac{dF(q_1,q_2,...,q_n,t)}{dt}$$ we can get  $$ \frac{d}{dt}\frac{\partial{L'}}{\partial{\dot{q_i}}} - \frac{\partial{L'}}{\partial{q_i}} = 0 $$ from  $$ \frac{d}{dt}\frac{\partial{L}}{\partial{\dot{q_i}}} - \frac{\partial{L}}{\partial{q_i}} = 0 $$  How can we get the corresponding Hamiltonian equation part? This is to prove  $$ \dot{p'_i} = \frac{\partial{H'}}{\partial q_i} $$ $$ -\dot{q_i} = \frac{\partial{H'}}{\partial p'_i}  $$  from   $$ \dot{p_i} = \frac{\partial{H}}{\partial q_i} $$ $$ -\dot{q_i} = \frac{\partial{H}}{\partial p_i}  $$ where $p'_i = \frac{\partial L'}{\partial \dot q_i}$.  Edit  The corresponding $H'$ is $$ H' = \sum_k{p'_k \dot{q_k}} - L' $$ where $p'_k = \frac{\partial L'}{\partial \dot q_k}$.


So I mainly code in Python however have coded using C# due to my major one thing in C# is being able to write on the same line using "Write" for example   int Num_Asteriks = 20.       for (int x = 0; x < NUM_ASTERIKS; ++x)      Write("*");//Creates the top boarder for the company motto  that was in C#. Im wondering if there is a way to do this in python ive tried the code listed below with no luck. It just prints on multiple lines x = 0 asteriks = 15 while x != asteriks:     print('*',)

I'd like to do it in Python. What I'd like to do in this example in C: #include <stdio.h>  int main() {     int i;     for (i=0; i<10; i++) printf(".");     return 0; }  Output: ..........  In Python: >>> for i in range(10): print('.') . . . . . . . . . . >>> print('.', '.', '.', '.', '.', '.', '.', '.', '.', '.') . . . . . . . . . .  In Python print will add a \n or space, how can I avoid that? Now, it's just an example, don't tell me I can first build a string then print it. I'd like to know how to "append" strings to stdout.


I am having some trouble in starting more then one process in a single terminal window..  like as i have started wvdial by   sudo wvdial   it shows all initiating process details but wont give back  pankaj@N5010:~$    until i press ctrl+c to terminate which causes terminate wvdial..   what i want is to start both wvdial and nautilus in same terminal window.Is it possible??

Some GUI apps launch cleanly via the Terminal command line, but some don't, and they cause the Terminal to wait for the app to terminate. Even then, some don't "release" the command line.  The mysterious ampersand & suffix seems to cause the terminal to put the process into the background (but I'm not sure what happens there).  Is there a way to launch an app via the Terminal so that there is no "hang on" effect, just like launching something via Alt+F2?  I'd like to have the command line available again immediately, without something still in the background and printing in the terminal.


i am trying to lock a certain text file with PERMISSION, and that the program and only the program could access the file & reading & changing it. even when the program is not wokring!  I've tried doing this with lockfile method but it locks the file while you are writing to it, and it is not what i need, also tried to change permission with os.chmod but i dont fully understand how it works even tho i looked up. I've tried something like that  os.chmod(stat.S_IXUSR | stat.S_IXGRP | stat.S_IXOTH)

I need to lock a file for writing in Python. It will be accessed from multiple Python processes at once. I have found some solutions online, but most fail for my purposes as they are often only Unix based or Windows based.


I am new to Drupal and new to twig. I am currently using Drupal 8.1.1. I would like to obtain two things, the directory path of the image and the image name. I can get the path to the image using twig:  {{ file_url(content.field_image['#items'].entity.uri.value) }}   Is there a way to do this? For example, I get /path/to/image.jpeg using file_url(), is there any function to return /path/to, the path to the image directory and the image name?

I want to render an image as a background image via an inline style in twig. I created a field called bg_image and attached it to the standard plain page.  After fiddling around for hours I was able to get the Image URL in node.html.twig  {{ file_url(node.field_bg_image.0.entity.uri.value) }}   but I could not get it to work inside field--field-bg_image.html.twig  Can I get the node from there anyhow, so I can then get the image?  How can I get the image URL to use as inline style? I thought maybe I can pass a variable from field--field-bg_image.html.twig to image.html.twig and then just render  {{ uri }}   instead of  <img{{ attributes.addClass(classes) }} />   but I could not get it to pass the variable there unless I use includes  {% include 'image.html.twig' with {'image': image, 'isFromField': isFromField} %}   (isFromField is true, when it comes from the field--field-bg_image.html.twig) But that didn't work either. The Image was never rendered that way.  Would be very glad if you can help - my php knowledge is very basic. Thanks


Consider two strings:  name = "Hello" mess = "Whats up"   Now to a tooltip class, I m trying to add an attr tag as follows:  $(this.el).find('.checkcalls').attr('title', "#{name}
#{mess}")   This prints:   "Hello
Whats up"   I do not want to print the break tag, rather execute it.  I've tried:    $(this.el).find('.checkcalls').attr('title', '#{name}
#{mess}')   and:   $(this.el).find('.checkcalls').attr('title', '"#{name}"
"#{mess}"')   They don't print the desired result.  How can I achieve this?

I'm currently adding verbose tooltips to our site, and I'd like (without having to resort to a whizz-bang jQuery plugin, I know there are many!) to use carriage returns to format the tooltip.  To add the tip I'm using the title attribute. I've looked around the usual sites and using the basic template of:  link with tip   I've tried replacing the ? with:
 &013; / &#13; \r\n Environment.NewLine (I'm using C#)   None of the above works. Is it possible?


I would like to understand what does formatting really remove.  When launching a computer, something shows up, resembling DOS. This can't possibly be stored on a hard drive ? Where is it stored then ?  I read that there is a boot sector on the hard drive, is there some leftover on the hard drive after formatting it ? Does it really ends up with 0 bytes left on a drive ?

From :     BIOS software is stored on a non-volatile ROM chip on the motherboard. ... In modern computer systems, the BIOS contents are stored on a flash memory chip so that the contents can be rewritten without removing the chip from the motherboard. This allows BIOS software to be easily upgraded to add new features or fix bugs, but can make the computer vulnerable to BIOS rootkits.   Since ROM means Read-Only Memory,  why can the BIOS contents be rewritten?  Does the "flash memory chip"  mean the same as the "non-volatile ROM", both meaning where BIOS is stored?


I've updated group access permissions of a directory. Users that belong to authorized group can access the contents of the folder when they login via SSH. However, they cannot access that folder within their VNC session unless the VNC session is killed and started again. Is there a workaround without killing the current VNC session? The OS is CentOS release 6.10.

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


I'm wondering whether there's a way that I can instantiate an object or call a utility function that will simply take in an object and perhaps a path to a view as parameters, and return a string that consists of the rendered view, using the object as the model.   I don't want to go through the usual ASP.NET request pipeline, or deal with dependency injection or even depend on the framework running to provide a bunch of services.  I simply want an easy way to render a view to a string in code.   Does this exist?   If anyone knows of any good sources on how view rendering in ASP.NET works under the hood, that would also be very helpful.

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


Current state of example: "Dotting i's and crossing t's can be the longest part sometimes." Sometimes I need plurals of things that are not necessarily words. Single letters, acronyms, that sort of thing. Intuitively, I append 's to the end and call it a day, allowing me to write i's  rather than is  which could be potentially confusing. Still, this does not feel like it is the correct way to do it. That is not what an apostrophe is supposed to do. How do I create proper plurals of such non-words?

When I was in high school back in the 1970s, I was taught that to make a plural of an acronym, a letter, or a number, one should add an apostrophe and "s". Like I would have written this sentence, "... back in the 1970's ..." I would write "one CD, two CD's". Etc. I followed this rule faithfully for years until a co-worker told me it was wrong. Now I can't find any source that agrees with what I was taught.  Is this a rule that has changed over time? Was the convention in the 70s that one should use an apostrophe but this has changed and now we do not? Or were my high school English teachers just confused?


I was using wine while after a while tried to use an exe and outputted wine: Bad EXE format for Z:\"AN APP.exe" This is the only exe that did that, now I know it's because I need to use 32 bit version of wine, so I want to uninstall wine and install it as a debian package file instead of a tarball, deleted the .wine folder, tarball, everything and it didn't work. I already viewed tons of problems, and all the commands they suggest doesn't work, any help? I use kubuntu 18.04 by the way.

I am using Ubuntu 18.04 and recently I have installed wine and it was not able to find the .dll files so I ran the command sudo apt-get remove winehq it showed that the wine has been uninstalled but when I type which wine I am getting the output /usr/bin/wine it seems it hasn't been uninstalled completely and when I try sudo apt-get purge wine* I am getting the following errors      E: Unable to locate package winehq.key E: Couldn't find any package by glob 'winehq.key' E: Couldn't find any package by regex 'winehq.key'   Output of apt list --installed | grep wine:  WARNING: apt does not have a stable CLI interface. Use with caution in scripts.  wine-devel/bionic,now 4.0~rc3~bionic amd64 [installed,automatic]  wine-devel-amd64/bionic,now 4.0~rc3~bionic amd64 [installed,automatic]  wine-devel-i386/bionic,now 4.0~rc3~bionic i386 [installed,automatic]  winehq-devel/bionic,now 4.0~rc3~bionic amd64 [installed] winetricks/bionic,bionic,now 0.0+20180217-1 all [installed]   What am I doing wrong and how to complete remove everying that is related to wine and install install it properly


I was just curious, why should we use  in the first place?  // Without reflection Foo foo = new Foo(); foo.hello();  // With reflection Class cls = Class.forName("Foo"); Object foo = cls.newInstance(); Method method = cls.getMethod("hello", null); method.invoke(foo, null);   We can simply create an object and call the class's method, but why do the same using forName, newInstance and getMthod functions?   To make everything dynamic?

What is reflection, and why is it useful?  I'm particularly interested in Java, but I assume the principles are the same in any language.


What are the differences between  and ? I am looking for a naive, non-mathematical explanation.

Initially I thought in  the velocity was constant, whereas  allowed treatment of accelerated frames as well.  But now I have heard that SR is only valid locally?


I need to listen for certain keypresses in a python terminal program without pausing execution with raw_input. I've seen people use a few windows specific ways of listening for keystrokes and I've seen people use large modules like tkinter and pygame which I want to avoid. Is there a lightweight module out there that does this cross platform (at least ubuntu, windows, mac)? or is there a way to use just the event system from tkinter, pygame, etc...? If not, how should I approach tackling this? My first thought is to redirect stdin to another process and keep checking to see if it contains one of my event keys.  edit Thank you @unutbu for taking the time to mark this question that is 3 years old and successfully answered as a duplicate of another question whose answers do not apply to this question because I specifically asked about a non-blocking solution.

Is there a way of reading one single character from the user input? For instance, they press one key at the terminal and it is returned (sort of like getch()). I know there's a function in Windows for it, but I'd like something that is cross-platform.


When using beamer for presentations, I notice that the rendering for math becomes quite different, and I really prefer the usual rendering, say, when typing a paper. The symbols look a bit less formal, and less aesthetically pleasing...    Is it possible to use the regular rendering of math symbols in the beamer package?     That is, I'd like:   to look more like:

In a LaTeX article, the math characters are more "curvy" than the text characters:  \documentclass[12pt]{article} \begin{document}  $x^2 + y^2 = z^2$ \end{document}     In a beamer presentation, the math characters do not have the same curves:  \documentclass{beamer} \begin{document} \begin{frame}  $x^2 + y^2 = z^2$ \end{frame} \end{document}     Question  How can I get the beamer math to look just like the article math?  I would prefer if the solution was a single line (that I could place at the top of my LaTeX file) as opposed to something that needs to appear next to every piece of math.


By table I mean that thing with rows and columns. How do I say correctly: "I'll add a record to the student table" or "I'll add a record to the students table"? Also what's right: "I'll add a record to the student list" or "I'll add a record to the students list"? What are grammar rules for these examples?  EDIT: Not the table that belongs to some student, table that contains information about students.

Is it correct to say user accounts or users account when referring to the accounts any user has on a site like this one?  In general, in the case of a noun that is used as adjective for the noun that follows, is it better to use <plural-noun> <singular-noun> or <singular-noun> <plural-noun>?


I would like to write formulas in word using LaTex, but I don't know how. I am new to LaTex. Can someone please help me?

Let's say I have a (comparatively) lovely-looking document in LaTeX, full of lovingly typeset, (relatively) complex equations. Now, let's say some barbarians come along one day and decide that the document has to be put into Microsoft Word (2007). ...after the usual mourning period associated with such events, let's say I value my job (more specifically, the bread it provides) enough to get all the text and tables formatted and references organised into the Word document. –...related questions  and – Now I'm looking at the equations with fear and dread. One option of course is to just lift screenshots from the original document, but this is painstaking if I need to refer to parts of the equation in the text. Also, I might need to edit equations on the fly. Anyone know of a free application which allows embedding LaTeX math into MS Word? I've looked at  and  which do roughly what I want... they build LaTeX images from source and embed them into the Word document, allowing to edit the source later... but both are commerical. ...any help in these troubling times will be greatly appreciated. EDIT: Just a note that  offers a 30-day free trial and is working out really nicely... but still, it's not free. Might be a good solution for those with short-term needs, or money.


I want to take Screenshot of the web-page at Runtime while screen-scraping with HtmlUnit or Jsoup in Java. Is there any way to do so?

Simple as the title states: Can you use only Java commands to take a screenshot and save it?  Or, do I need to use an OS specific program to take the screenshot and then grab it off the clipboard?


Let $V$ be a finite dimensional vector space, and let $T\in\mathscr{L}(V)$ (where $\mathscr{L}(V)$ is the set of linear maps $V\to V$). Show that $T$ is the identity multiplied by a scalar iff $TS = ST$ for all $S\in\mathscr{L}(V)$.   This problem is taken from , by Sheldon Axler (Ch 3), and is given before the concepts of eigenvalues, eigenvectors, operators and inner products are introduced. Up to this point only vector spaces, subspaces, bases (spanning and linear independence), linear maps, matrices and the correspondence between them are introduced.  I have no idea how to approach this problem, and looking for hints that may help me solve it. Any help will be appreciated.

The question is from Axler's "Linear Algebra Done Right", which I'm using for self-study.  We are given a linear operator $T$ over a finite dimensional vector space $V$. We have to show that $T$ is a scalar multiple of the identity iff $\forall S \in {\cal L}(V), TS = ST$. Here, ${\cal L}(V)$ denotes the set of all linear operators over $V$.  One direction is easy to prove. If $T$ is a scalar multiple of the identity, then there exists a scalar $a$ such that $Tv = av$, $\forall v \in V$. Hence, given an arbitrary vector $w$, $$TS(w) = T(Sw) = a(Sw) = S(aw) = S(Tw) = ST(w)$$ where the third equality is possible because $S$ is a linear operator. Then, it follows that $TS = ST$, as required.  I am, however, at a loss as to how to tackle the other direction. I thought that a proof by contradiction,  ultimately constructing a linear operator $S$ for which $TS \neq ST$, might be the way to go, but haven't made much progress.   Thanks in advance!


I have an urgent question. I am writing a document and I have equations (but they are more than 26). I get the error 'counter too large'. I saw in other topics that I need to use alphalph package but it does not work and I still get the same error. I would be so grateful if you help me solve this. I have copied and pasted a minimal example of my code and all packages which I am using:  \documentclass {article}  \usepackage[T1,T5]{fontenc} \usepackage{amsthm} \usepackage{latexsym} \usepackage[cmex10]{amsmath} \usepackage{amsfonts,amssymb,amsthm} \usepackage{graphicx} \usepackage{psfrag,balance,arydshln} \usepackage{rotating} \usepackage{mempatch} \usepackage{ifdraft} \usepackage[cp1252]{inputenc} \usepackage{acronym} \usepackage{textcomp}    \usepackage[swedish,english]{babel}  \usepackage{cleveref}    \usepackage{xr}      \usepackage{nomencl}   \usepackage{bibentry} \usepackage{color} \usepackage{url}     \usepackage{bbold}   \usepackage{paralist} \usepackage{enumitem} \usepackage{bm}      \usepackage{pgfplots}    \usepackage{epstopdf}    \usepackage{nameref}     \usepackage{dsfont}      \usepackage{verbatim} \usepackage{glossaries}  \usepackage{gensymb} \usepackage{algorithmic} \usepackage{enumerate} \usepackage{booktabs} \usepackage{amsmath} \usepackage{epsfig} \usepackage{cite} \usepackage{hhline} \usepackage{multirow} \usepackage{framed} \usepackage{lipsum} \usepackage{enumerate} \usepackage{graphicx} \usepackage{subcaption} \usepackage{capt-of} \usepackage{makecell} \usepackage{appendix} \usepackage[none]{hyphenat} \usepackage{pgfplots}    \usepackage{pgfplotstable}   \usepackage{mathtools} \usepackage{tikz}        \usepackage{xcolor}      \usepackage{alphalph,etoolbox}     \allowdisplaybreaks  \begin{document} \section{section 1} \begin{subequations} \label{equation1} \begin{align} & a=b+c \\  & a=b+c \\ & a=b+c \\ & a=b+c \\ & a=b+c \\ & a=b+c \\ & a=b+c \\ & a=b+c \\ & a=b+c \\ & a=b+c \\ & a=b+c \\ & a=b+c \\ & a=b+c \\ & a=b+c \\ & a=b+c \\ & a=b+c \\ & a=b+c \\ & a=b+c \\ & a=b+c \\ & a=b+c \\ & a=b+c \\ & a=b+c \\ & a=b+c \\ & a=b+c \\ & a=b+c \\ & a=b+c \\ & a=b+c  \end{align} \end{subequations} \end{document}   Thank you

I have several parent equations each with more than 30 subequations. When I write it normally with subequation command, I receive "counter too large" error.  I found out that there is a package named "alphalph" which can solve these numberings with different styles. I have seen  for subequations in StackExchange, but it doesn't work for me! I still get the error!! (since I want to refer to them later, I need to label them too).  Does anybody know where the problem is, or suggest an alternative?  Thanks


In Airbnb, I see that the user can 'sign up' with Facebook or 'sign in' with Facebook. What is the difference between sign up and sign in? Do these options actually perform different actions?

I am building a site and was thinking about if there should be a signup option at all.  I found the question about the  but there was neither an accepted answer nor enough responses.   What is the advantage of having to signup using Facebook/Google in the first place? As I see it, a direct login simply would imply checking if the email exists in your database and if not add that info. Since, this would be just a one time operation, I don't believe that a one time insert would take too much time or ruin user experience. Am I wrong on this part?  Then I see many major sites including SO using the signup with Google etc. so there must be something to signup before login.  Can somebody please explain why to sign up users at all?


I can not connect WFi with Ubuntu 16.04 Broadcom Corporation BCM4312 802.11b/g LP-PHY [14e4:4315] (rev 01)   alexey@alexey-Compaq-615:~$ lspci -knn | grep Net -A2 06:00.0 Network controller [0280]: Broadcom Corporation BCM4312 802.11b/g LP-PHY [14e4:4315] (rev 01)     Subsystem: Hewlett-Packard Company BCM4312 802.11b/g LP-PHY [103c:1508]     Kernel driver in use: b43-pci-bridge   alexey@alexey-Compaq-615:~$ lspci -vnn -d 14e4: 06:00.0 Network controller [0280]: Broadcom Corporation BCM4312 802.11b/g LP-PHY [14e4:4315] (rev 01)     Subsystem: Hewlett-Packard Company BCM4312 802.11b/g LP-PHY [103c:1508]     Physical Slot: 1-1     Flags: bus master, fast devsel, latency 0, IRQ 17     Memory at 92000000 (64-bit, non-prefetchable) [size=16K]     Capabilities: <access denied>     Kernel driver in use: b43-pci-bridge     Kernel modules: ssb   Can somebody give me advice. Thanks in advance Best regards Alex

I'm having serious problems installing the Broadcom drivers for Ubuntu. It worked perfectly on my previous version, but now, it is impossible.   What are the steps to install Broadcom wireless drivers for a BCM43xx card?  I'm a user with no advance knowledge in Linux, so I would need clear explanations on how to make, compile, etc.    lspci -vnn | grep Network showed:   Broadcom Corporation BCM4322 802.11a/b/g/n Wireless LAN Controller [14e4:432b]      iwconfig showed:  lo        no wireless extensions. eth0      no wireless extensions.   NOTE: Answer below is updated every time new information is added and confirmed working.


I am working on machine with XP Dutch version installed on it. Visual studio 2005 is installed in English. I'm having the annoying problem while debugging that all .NET Framework exception message appear in Dutch, which make them really worthless. I tried to change this to English by setting the regional settings in the control panel to US English and then reinstalling the .NET Framework 2.0 (English version) but apparently this did not solve the problem. Does anyone have an idea?    I think my question was missunderstood, I don't want to change the current culture of the thread. The problem i'm having is when you are debugging and stepping through the code when suddenly one of those exception windows appears with the exception-message in it. This exception message appears in Dutch and I would like it to appear English. I hope this clarifies the question.

We are logging any exceptions that happen in our system by writing the Exception.Message to a file. However, they are written in the culture of the client. And Turkish errors don't mean a lot to me.  So how can we log any error messages in English without changing the users culture?


In Illustrator I have a heart shape and the last anchor point is on the upper left side (by that I mean the anchor point that joins everything together).   I would like to have a stroke that comes to a point at the bottom of the heart shape and is thick at the top of the heart shape.   To do this I thought I'd give the 'Variable Width Profile" for strokes a go... but it finishes at the last / joining point at the upper top left which looks a bit crap.     Is there a way I can get it to finish at the base of the heart shape?

I'm trying to do some animations for my website with SVG images that I saved in Illustrator. I'm running into the issue that the animation is starting from the wrong part of the path, and I'd like to set the "start" of the path to a different anchor. I've searched and searched and I'm not sure that there's a way to do this without redrawing the path. It's a closed path so I can't just hit reverse.  Is there some option in Illustrator to select an anchor on a closed path and make it the "first" anchor on a closed path?


In bash, I have a directory that holds some file names that start with underscore _ and others that don't.   I want my script to check if a folder has any files that don't start with _. I write  if [[ -f $dir/[!_]* ]]   then echo "There are unmarked files."   else echo "All files marked." fi    But when I run using a folder with files that do and do not start with _, the if statement has the opposite effect of what I intended. I list the entries in the folder that clearly display files without _, but the output keeps saying, All files marked.  What am I missing?

I am trying to write an if statement to test whether there are any files matching a certain pattern. If there is a text file in a directory it should run a given script.  My code currently:  if [ -f /*.txt ]; then ./script fi   Please give some ideas; I only want to run the script if there is a .txt in the directory.


I'm making a website, and I'm trying to make the footer always at the bottom. I want it so that the footer is always at the bottom at the browser window, but if the content is long enough, it will push the footer out of sight and further bottom. Right now, the footer is always positioned immediately after the content above it.  I tried setting display: flex, flex-direction, align-items: flex-end, margin-bottom: 0px, but it didn't work. I'm also trying to avoid setting fixed heights. Relevant Code Footer.js

         Home         About         Blog         Contact

2020 Daniel Zhang. This site was made by Daniel Zhang from scratch with React.
   .footer {     align-items: center;     border-top: 1px solid grey;     border-width: 100%;     box-sizing: border-box;     display: flex;     flex-direction: column;     flex-shrink: 0;     font-size: 12px;     margin: 0px auto;     padding: 10px 0px;     text-align: center; }  .icons img {     display: inline-block;     padding: 10px;     width: 25px; }  .footer-link {     padding: 0px 5px; }  .footer-link a {     color: grey;     text-decoration: none; }  .footer-link a:hover {     color: black;     text-decoration: none; }  .footer-copyright {     padding: 5px 0px; }  App.js <NavBar /> <Router>   <Switch>     <Route exact path='/' render={() => <Home />} />     <Route exact path='/about' render={() => <About />} />     <Route exact path='/blog' render={() => <Blog />} />     <Route exact path='/contact' render={() => <Contact />} />     {/* Adds page not found. */}     <Route render={() => <Home />} />   </Switch> </Router>   App.css * {     font-family: 'Lato', sans-serif; }  html, body {     height: 100%;     margin: 0px; }  body {     display: flex;     flex-direction: column; }  .container {     flex: 1 0 auto;     margin: 0px auto;     width: 65%; }

I have a simple 2-column layout with a footer that clears both the right and left div in my markup.  My problem is that I can't get the footer to stay at the bottom of the page in all browsers.  It works if the content pushes the footer down, but that's not always the case.


Brought a new Think Centre Edge 71 because      The Lenovo ThinkCentre Edge71 desktop has been awarded the status of Certified for Ubuntu.    .    Spent the the past 2 days trying to get any Ubuntu 12.04 64bit to install and boot. All give me the same answer:      Error 1962: No operating system found   Here are a few of the links I've tried:  Just installed Ubuntu 12.04. When booting, all I get is a black screen with cursor. Some of the links report to solve the problem. None have worked.      Is there a relative simple way to install and boot Ubuntu 12.04 64bit on a Think Centre Edge 71?? I mean it is Certified for Ubuntu?

I just installed a fresh copy of 12.04 on a new Lenovo ThinkCentere from a USB drive, and when I restarted after installation, the boot sequence didn't find the OS. Instead I got the 'no operating system found' error. When I started Ubuntu from the USB, I could see the HDD and that it had all the installed files. I just couldn't boot into it. It appeared that GRUB was not at the right place... or that there was something funky with the MBR. What is the simplest way to fix these sorts of errors?  Thank you,  EDIT: It appears the problem might have to do with UEFI and GRUB...


Problem from Bak,Newmann -Complex Analysis:     Show that if $f$ is a continuous real valued function and $|f|\leq 1$. Then $|\int _{|z|=1} f|\leq 4$   What I did is :taking $C:z(t)=\cos t+i\sin t$ as the parametrized curve.  $|\int _Cf(z)|\leq \int _C |f|<$Length  of the curve $C$ since $|f|\leq 1 $ and Length of $C=1\implies |\int _Cf(z)|\leq 1$ ..  But I dont understand why the author has given the upper bound so large as $4$. Am I wrong or the author has been a bit casual in the question.  Please help.

I've encountered the following problem in a set of course notes on complex analysis, but I can't seem to solve it:     Prove that if f is a continuous real-valued function with $|f(z)| \leq 1$, then $\left|\int_{|z| = 1} f(z)\,dz\right| \leq 4$.   This is my work so far:     \begin{align*} \left|\int_{|z| = 1} f(z) \,dz \right| &= \left|\int_0^{2\pi}f\left(e^{i\theta}\right)ie^{i\theta}\,d\theta\right| \\ &= \left|\int_0^{2\pi}f\left(e^{i\theta}\right)\cos\theta\,d\theta + i\int_0^{2\pi}f\left(e^{i\theta}\right)\sin\theta\,d\theta\right| \end{align*}   I initially tried to use the triangle inequality at this point and then bound the real integrals, but this gives me an upper bound of $4\pi$. Using the estimation lemma on the initial integral gives me an upper bound of $2\pi$. I can't manage to get it any tighter.  The emphasis on real-valued makes it seem that this is a key point. Any ideas?


I come with a problem. Well, I wanted to make notifications about too high chmod file. Here is the code I wrote:  <?php defined('BASEPATH') OR exit('No direct script access allowed!'); $errors = FALSE; $config_file = "config.php";  if(is_writeable(APPPATH.'config/'.$config_file)) {     $errors = TRUE;      $_SESSION['chmod_error'] = "
 Configuration file (".$config_file.") is writeable!
"; } else {     $_SESSION['chmod_error'] = "
 Configuration file (".$config_file.") is not writeable
"; }   Unfortunately, it does not work properly. It still displays the same error even if the chmods are set to 777 or 644.  Photo here:   Is there a way to "get" what chmod file has? And can you show an error if the file has a higher chmod than eg 644? If so, how do you do it?  Thank you in advance for your help and sorry, but my English is not perfect, so I have to help myself Google Translate :D

How can I check file permissions, without having to run operating system specific command via passthru() or exec()?


I am asking if there is any method to decide if the following system of congruence is solvable or not: $x_{1}$≡$a_{1}$ $mod (y_{1})$ $x_{2}$≡$a_{2}$$mod (y_{2})$ $x_{3}$≡$(a_{1}+a_{2})$$mod (y_{3})$ Here $y_{1},y_{2},y_{3}$ are not necessarily coprime integers

How to prove that a congruence system with $n$ equations can be solved if and only if all the equations can be solved two by two?  \begin{cases} x \equiv a_1 \phantom ((mod\phantom mm_1) \\ x \equiv a_2 \phantom ((mod\phantom mm_2) \\ ... \\ x \equiv a_n \phantom ((mod\phantom mm_n) \end{cases}  I know that if $n=2$, the system can be solved if and only if $\gcd(m_1,m_2)\mid a_1-a_2$.  The thesis is: the system is solvable $\Longleftrightarrow$ $\gcd(m_i,m_j)|\mid a_i-a_j$ for all $i\neq j$.


I have successfully cleared PLAB1. My visa appointment to appear for PLAB2 was on 18 Dec 2018. My visa was denied under section 4.2 a,c and e. My brother (he is working in the US with a reputed company) is acting as my sponsor and I have submitted supporting letters from him as well. I work part time as a duty doctor in Bangalore with an annual salary of 250,000 INR.  For personal funds, I had shown around 250,000 INR in my bank account.  I had transferred a sum of 100,000 INR to my bank account through a cheque from my father's account on 13 Dec 2018. In order to explain this amount, I had attached a notarized affidavit explaining this amount as a gift from my father and mentioning that the gift is irrevocable. I had also mentioned the cheque number in the affidavit and mentioned that the amount is from my father's savings.  The visa officer has specifically called out the deposit of 100,000 INR in the refusal citing that we have not explained the source of these funds.  Now my questions are,    Do you think the visa officer overlooked the legal affidavit we had attached? Is there something else we can do to explain the 100,000 INR deposit apart from the affidavit? Should I re-apply with further explanation for the deposit?   We still have the balance in my amount and it is almost 1 month since the deposit.

I have applied recently for a general visitor visa to the UK to spend 10 days during Christmas with my British unmarried partner and it has been turned down.   The Entry Clearance Officer stated on his refusal notice the following:     I note that you have never previously travelled to the UK or any country with similar immigration requirements and you therefore do not have a history of travel and compliance to consider.      You have submitted an employment letter to confirm your occupation in KSA but I am required to also assess your personal, domestic and economic circumstances in determining whether you are genuine visitor travelling to the UK for the period and purpose you state.      You claim an income of SAR ........ per month which equal ........ GBP and from the evidence submitted this appears to be your sole source of income.   I note that this monthly income is reflected on your bank statements. However, the bank statement you have presented show a recent large deposit that are in excess of your stated income and inconsistent with the account history. You haven't provided evidence toward the origin of this recent deposit and in the absence of reasonable evidence I am not satisfied that these bank statements accurately reflect your personal circumstances.      In view of the above, I am not satisfied you have demonstrated that your circumstances are as you claim and therefore I am not satisfied that you're travelling to the UK for the period and purpose you stated. 41(i)and(ii).   Its true that I have deposited that sum of money right before I apply and it was a commission I received from work earlier this month.   So, could you please give me your advice on the above as I am planning to apply again soon. and how to avoid my application being refused again?


I want to launch a task through ssh and then exit my terminal and have my task continuing on my ssh server.  I have tried a bunch of things which did not work, such as :  laptop$ ssh server@ipaddress server$ mytask & [1] 12345 server$ logout   Or  laptop$ ssh server@ipaddress server$ mytask (then hit [Ctrl]+[Z]) server$ logout   Or even  laptop$ ssh server@ipaddress -f "mytask" (and then close my terminal)   But even in my last attempt, closing my terminal would stop the task.  How should I proceed?  Thanks in advance!!

Possible Duplicate:          I have a process which is basically a web-server, I start it during an SSH session. However, when I leave the session (by closing the PuTTY windows), it stops running and responding to requests. This is true even if I end the command with a &. With Apache, I don't have this problem, it comes with a stop, a start, and a restart script. I'd like to create something like that for this program.  How can I start a process, so that it will continue running even after I end the SSH session I started it in? Also how can I set it to restart itself if it stops for some reason?  Thanks!


I defrosted ground beef in cold water for burgers for dinner, but dinner is delayed..I don't need it for another 2 hours.  But instructions say "use immediately" what exactly does that mean? Is there any wiggle room?

If I left food out of the refrigerator for some period of time, is it still safe? If I left it out too long, can I salvage it by cooking it more?


Alright so kind of a long story, but basically I had a laptop with Windows 7 on it, and the hard drive failed. So I bought a cheap SSD and installed Ubuntu on it (because who wants to pay for windows for a test.) I've been using Ubuntu for a little bit now, and I'm just getting sick of it. I have no idea how to use the little terminal thing and whenever I want to install something I just copy and paste lines into it from whatever forum has an installation guide. I'm trying to upgrade back to Windows, but I can't seem to get anything to work. I bought a Windows 7 Home Premium Key, and I have an ISO downloaded on my computer, but I can't figure out how to format a USB stick to get it to boot. Is there any easy way to install Windows?  P.S. I don't need to backup anything on my computer, I have the few files that I need saved to my Google Drive, and I also don't want to do a dual-boot thing, just to switch completely from Ubuntu to Windows

I have absolutely no experience with Linux, and I desperately need to get my computer back up and running again with Windows.  How do I remove Ubuntu and reinstall Windows?    Editor's note: many of the answers are about removing Ubuntu from dual-boot but keeping Windows (which is a bit complicated), while other answers are about removing Ubuntu from single-boot (which is easy: basically just format the disk while installing Windows). The question as written is ambiguous between dual-boot or single-boot.


I have a full amount including VAT and i want to seperate the net price and the vat value.  The example is final price is 80.60 and the vat is 24%. What is the net price and what is the vat value?  The answer should be net price is 65.00 and the vat value = 15.60.  For some reason typescript calculates 65.00 and 15.599999999999994. At the moment i dont want to round, the result should be 15.60 clearly though. I know there are other ansers on how to calculate the Vat , but my question is pretty specific whats wrong with my code and generated this decimal instead of 15.60.  Here is my code: component.ts  import { Component, OnInit } from '@angular/core';  @Component({   selector: 'app-fpa',   templateUrl: './fpa.component.html',   styleUrls: ['./fpa.component.css'] }) export class FpaComponent implements OnInit {      public netPrice:number;     public fpaPercent:number=24;     public fpaValue:number=0;     public totalPrice:number;  public calc(calcType:string = ''){     this.netPrice = this.totalPrice / ((this.fpaPercent/100)+1);     this.fpaValue = this.totalPrice - this.netPrice; }  }   component.html                      <mat-form-field>                         <input [(ngModel)]="netPrice" (keyup)="calc('byNetPrice');" matInput placeholder="Net Price">                     </mat-form-field>                      <mat-form-field>                         <input [(ngModel)]="fpaPercent" (keyup)="calc();" matInput placeholder="% Vat">                     </mat-form-field>                      <mat-form-field>                         <input [(ngModel)]="fpaValue" (keyup)="calc('byFpaValue');" matInput placeholder="Vat Value">                     </mat-form-field>                      <mat-form-field>                         <input [(ngModel)]="totalPrice" (keyup)="calc('byFinalPrice');" matInput placeholder="Final Price" >                     </mat-form-field>

Consider the following code:   0.1 + 0.2 == 0.3  ->  false   0.1 + 0.2         ->  0.30000000000000004   Why do these inaccuracies happen?


I have been running MAMP Pro (1.9.6.1) on a 2011 MacBook Pro for the last three years. PHP 5.2.17 / MySQL 5.5.9  I wrote a .php-driven site to store info about my radio show. It has run without any problems or any errors.  I have upgraded to a new MacBook Pro running MAMP Pro 3.0.7.3 - PHP 5.6.2 / MySQL 5.5.38. The scripts that were running solidly, without error, in the first set up are producing unexpected results in the second set-up.  I am 90% certain that this is due to how either .php or MySQL are handling single quotes / apostrophes in my new set up.  INSERT queries that feature ' characters aren't being successfully inserted into the database.  e.g  INSERT INTO song_info      (artist_id, title_id, composer_id, publisher_id, album_id,      album_track, label_id, cat_no, format, howsent, song_rating,      duration, intro, fade, year, medium, release_date, recommended,      cymraeg) VALUES      ('2', '2', '2', '2', '2', '99', '2', 'voom001', 'album_track',      'direct', '6', '3'01', '0'36', '2'50', '2015', 'vinyl',      '2015-03-19', '0', '0')   The queries execute successfully if there are no ' characters within the values I want to insert into the database.  The queries with ' characters in the values I want to insert into the database execute successfully on the previous set-up.  The scripts are exactly the same.  I don't want to start changing the scripts - escaping the ' characters within the .php - because I'm pretty sure this is a config issue, I just don't know where / what to change.  These scripts run locally on the laptop. They're not accessible to anyone else, nor will they be.  So although I'm aware there are real security issues inherent in coding like this, I'll address those when I upgrade the (thousands of lines of) code in due course.  I need to quick temporary fix so that I can complete my work. Then I'll begin work on upgrading the code properly.  I'm using the mysql_ functions. Again, will upgrade to mysqli_ when I have an opportunity to do so.

If user input is inserted without modification into an SQL query, then the application becomes vulnerable to , like in the following example:  $unsafe_variable = $_POST['user_input'];   mysql_query("INSERT INTO `table` (`column`) VALUES ('$unsafe_variable')");   That's because the user can input something like value'); DROP TABLE table;--, and the query becomes:  INSERT INTO `table` (`column`) VALUES('value'); DROP TABLE table;--')   What can be done to prevent this from happening?


In this geometric sequence for an exponential model I will be graphing based on this data,     term $1 = 50,000$ and term $10 = 309,587$.   I do not know how to find the common ratio based solely on this data.  (This is not the same as "how to find the common ratio of a geometric sequence) because my question is on, how would you find the common ratio with a missing internal number, say, term 1 and term 10 as opposed to term 1 and term 2.  I know that if this were an arithmetic sequence, I would convert all of my data into an explicit equation $f(n)=f(1)+d(n-1)$ in this case,   $$ \begin{align*} 309,587 &= 50,000 + (10-1)d\\ \implies 309587 - 50000 &= 9d\\ \implies d &= 28843 \end{align*} $$  I do not think this would be the same for a geometric sequence for example $f(n) = f(1) * d(n-1)$ or in this case, $309,587 = 50,000 * (10-1)d$ and then do $309587 - 50000 = 9d$, $d = 28843$ as for the arithmetic sequence, because that is arithmetic(adding) and this is geometric (multiplying).  I need to know how to find the common ratio of a geometric sequence given term $1$ and term $10$.

A geometric sequence has its first term equal to $12$ and its fourth term equal to $-96$.   How do I find the common ratio? And find the sum of the first $14$ terms


I'm new to Ubuntu and I need a command line to follow a tutorial. How to do this?  I already tried searching for cmd but failed. Any one knows?  Please help me.

What is a terminal? How do I open a terminal window? How do I use the terminal?


I'm doing a market model calculation with OLS and I'm using R. I have a sample date with variable Rm and Ri. Its a market model off asset returns as $$    R_i = \alpha + \beta R_m $$ I have fitted a linear model, and now I have to run a Market Adjusted return model for $\beta = 1$, using t test statistics with hypothesis as H0: $\beta$ =1 ; H1: $\beta$ <>1 Please help how to perform a test that $\beta$ =1

In R, when I have a (generalized) linear model (lm, glm, gls, glmm, ...), how can I test the coefficient (regression slope) against any other value than 0? In the summary of the model, t-test results of the coefficient are automatically reported, but only for comparison with 0. I want to compare it with another value.  I know I can use a trick with reparametrizing y ~ x as y - T*x ~ x, where T is the tested value, and run this reparametrized model, but I seek simpler solution, that would possibly work on the original model.


Let $p$ be a prime number. Prove that for any field $k$ and any $a\in  k$, the polynomial $f(x)=x^p-a$ is either irreducible or has a root.  I think if $\operatorname{Char}k=0$ then $f$ is an irreducible polynomial and if $\operatorname{Char}k=p$ for $p$ a prime number then $f=(x-a)^p$ so $f$ has a root.  This problem is in Galois Theory, by Miles Reid.

Hungerford's book of algebra has exercise $6$ chapter $3$ section $6$ [Probably impossible with the tools at hand.]:     Let $p \in \mathbb{Z}$ be a prime; let $F$ be a field  and let $c \in  F$. Then $x^p - c$ is irreducible in $F[x]$ if and only if $x^p - c$   has no root  in $F$. [Hint: consider two cases: char$(F) = p$ and   char$(F)$ different of $p$.]   I have attempted this a lot. Anyone has an answer?


Let $S_g$ be the closed oriented surface of genus g. Let $C$ be a simple closed curve in $S_g$. Prove that $S_g$ retracts to $C$ if and only if $C$ does not separate $S_g$.  If $S_g$ retracts to $C$, by Alexander-Lefschetz duality, I can get $H_0(S_g-C)=\mathbb{Z}$, therefore $C$ does not separate $S_g$. But I have no idea how to prove another direction.

I'm trying exercise 9 on page 53 in  but I need some help with it. The exercise is:  In the surface $M_g$ of genus $g$, let $C$ be a circle that separates $M_g$ into two compact subsurfaces $M_h^\prime $ and $M_k^\prime$ obtained from the closed surfaces $M_h$ and $M_k$ by deleting an open disk from each. Show that $M_h^\prime$ does not retract onto its boundary circle $C$, and hence $M_g$ does not retract onto $C$. [Hint: abelianize $\pi_1$.] But show that $M_g$ does retract onto the nonseparating circle $C^\prime$ in the figure.    My first question is: assume there wasn't the hint, how would I think of abelianising? What does it mean exactly?  I thought I could do this by contradiction: if it retracts the induced map $i_\ast : \pi_1(C) \rightarrow \pi_1(M_h^\prime) $ is injective. I know $\pi_1(C) \cong \mathbb{Z}$, then I computed $\pi_1(M_h^\prime) \cong \mathbb{Z}$ and then I think I'm stuck. Right? Do you agree with $\pi_1(M_h^\prime) \cong \mathbb{Z}$ and being stuck after that?  What do I need to know to make progress? Many thanks for your help!


I am using QGIS 2.18.12 and I need to calculate the area of overlap between two shapefiles. Help I've already found for this problem says to use "Data management tools" under "Vector layer" but the former does not exist in my version of QGIS.  Can someone explain what I need to do?

I'm missing all the usual processing tools in the Vector menu in QGIS 2.16 (eg vector overlay, analysis, etc). They do appear in the processing toolbox but there's no sign of them in the Vector menu. Has anyone come across this issue?


I have the OccupancyResultList list   List<Occupancy> occupancyResultList = new List<Occupancy>();   of Occupancy  public partial class Occupancy {     public Nullable<System.DateTime> on_date { get; set; }     public string type_code { get; set; }     public Nullable<int> available { get; set; }     public Nullable<decimal> rate { get; set; }     public string rate_code { get; set; }     public string publish_flag { get; set; } }   I want to create another list that has the distinct values of on_date,type_code,available  Distinct() produces a distincted result of all columns which returns repeatitions.  Can you give me a hand plz?  Thanx in advance!

I am playing with LINQ to learn about it, but I can't figure out how to use Distinct when I do not have a simple list (a simple list of integers is pretty easy to do, this is not the question). What I if want to use  on a list of an Object on one or more properties of the object?  Example: If an object is Person, with Property Id. How can I get all Person and use Distinct on them with the property Id of the object?  Person1: Id=1, Name="Test1" Person2: Id=1, Name="Test1" Person3: Id=2, Name="Test2"   How can I get just Person1 and Person3? Is that possible?  If it's not possible with LINQ, what would be the best way to have a list of Person depending on some of its properties in .NET 3.5?


I'm running a GNOME/Wayland desktop environment, with GDM, on a Debian-based distro. I normally  with Super + L .  Is there a command to invoke the screen-lock from the terminal?

There is no "Lock" option showing up in the user menu, and the standard shortcuts (Ctrl+L or Ctrl+Alt+L) don't do anything.  I'm running Fedora 19 with Gnome Shell 3.8.3, and XDM 1.1.11.  I'm using XDM because of broken XDMCP support in GDM - but before I upgraded to Fedora 19, I did have the lock option, even when using XDM.     I've posted an answer reflecting the results of my own research. It basically says that it's not possible to have screen-lock integrated into Gnome 3.8 without running GDM.      I really hope there's a better answer available though - so please add your own answer if there's any way to do this that I overlooked.


I have learned that before phrases like the best, the latest, the smallest, etc, I have to use the definite article because the best is only one thing. Is this title of an article correct?      Shopping Guide for Best Women's Running Shoes   If I would write that, I would write for the Best Women's Running Shoes

What is the difference between the examples below?  Generally, in a newspaper, news is based on past tense (things which have already happened).   Then why are headlines written in ways that says: He Kills (shouldn't it be: He Killed)?  For example:  Parliament passes bill vs. Parliament passed bill  Also  He kills his friend vs. He killed his friend  Please help.


I understand that when we refer to Newton's third law, forces do not cancel out because action-reaction pair forces are acting on different objects. I tried to apply this to arm wrestling, but I am a little confused.   Let's say you have box A on the left and box B on the right (representing the arms). Box A exerts 50 N towards the right. Box B exerts 40 N to the left. I.e. $\text{Force}_{AonB} = 50N$ and $\text{Force}_{BonA} = 40N$. Applying Newton's third law now, $\text{Force}_{BonA} = 50N$ and $\text{Force}_{AonB} = 40N$. Thus there is a net force of 90N in each direction.   What is my misunderstanding here?

Given Newton's third law, why is there motion at all? Should not all forces even themselves out, so nothing moves at all? When I push a table using my finger, the table applies the same force onto my finger like my finger does on the table just with an opposing direction, nothing happens except that I feel the opposing force. But why can I push a box on a table by applying force ($F=ma$) on one side, obviously outbalancing the force the box has on my finger and at the same time outbalancing the friction the box has on the table? I obviously have the greater mass and acceleration as for example the matchbox on the table and thusly I can move it, but shouldn't the third law prevent that from even happening? Shouldn't the matchbox just accommodate to said force and applying the same force to me in opposing direction?


I have translated all my careers info to German because I primary target companies in Germany (or Swiss). But I would like to be able to apply to remote jobs in English speaking countries as well.  So I would like to be able to give the text in two languages, without having to put one underneath the other in the same field.

tl/dr : Is it/will it be possible to fill out our Careers CV with localized information ?  Is it/will it possible to have different versions of the CV posted at careers (not totally different but just translated)?  Being in non English oriented country, this can be very helpful if I send local companies a link to my Careers CV and they could read it in a language other than English. LinkedIn has an implementation of this feature where you can create your profile in another language and it's up to the user to fill in the information in that language (first and last name, past experiences, etc)  The reason for this is primarily because my CV on careers contains more than just a list of bullet points, it reveals who I really am as a software developer (top tags, top answers, links to github projects, etc).


Do you have to place the input and output capacitors on LOAD basis or the capacitors specified in the datasheet. I have a linear power supply that supplies 16 Volts with no load. The maximum load I want to apply to this regulator would be less than 2A and maximum Voltage, 9 Volts. I just need to know what values of capacitors to use. My supply does have a 4700uF filter capacitor but it is around 2 feet away. I want to make this regulator in separate box.

I'm trying to use an  linear voltage regulator to convert to 3.3v (input voltage will be 9 or 5 volts; not yet decided). The datasheet suggests using 10uF tantalum capacitors on the input and output. While I could just go with the suggestion, I find most of the tantalum capacitors that are available are considerably more expensive than other capacitors, and in a SMT form factor (I'd prefer through-hole). I'm thinking of using aluminum or ceramic caps instead.   This excerpt from the datasheet specifies what ESR ranges are acceptable:     8.2.2.1.3 Output Capacitor   The output capacitor is critical in maintaining regulator stability, and must meet the required conditions for both   minimum amount of capacitance and equivalent series resistance (ESR). The minimum output capacitance   required by the LM1117 is 10 µF, if a tantalum capacitor is used. Any increase of the output capacitance will   merely improve the loop stability and transient response. The ESR of the output capacitor should range between   0.3 Ω to 22 Ω. In the case of the adjustable regulator, when the CADJ is used, a larger output capacitance (22-µF   tantalum) is required.   As I understand it, ceramic caps have a very low ESR. Could I just add a 0.3 Ω to 22 Ω resistor in series with a ceramic capacitor? I've read what ESR is and isn't, and I don't understand it one bit, so right now it's just a range of numbers I'm trying to match. However, ceramic caps tend to have smaller capacitance, so it might not be as easy to get 10uF ceramic caps.   If I recall correctly, aluminum caps have a much higher ESR (though exactly what "higher" means I'm not sure). Additionally, it can be difficult to get a datasheet for a capacitor simply because they're such common components (I'm in China and purchasing online, but don't read Chinese). So I'm not sure how to make sure I'm within the ESR range specified.  Finally I should note that I don't have any of these components yet, but I'll probably get an assortment of capacitors when I do order.  So my question: What capacitors can be used in this situation, and with what value resistors (if any)? Note that I'm interested in the theory, not just this single situation, but not being experienced with capacitors some specific examples could be helpful.  Related:


All tag synonym requests should be exposed more for voting.

Before:  After:   The pros:  Speeds up the tag synonym voting process. Easier to locate (as opposed to navigating to each individual tag wiki page). Encourages users to vote on more than one at a time.  The cons:  Serial up/downvoting. But this really isn't even an issue because, (1) only experienced users can vote on tag synonyms, and (2) more than one vote is required to approve a tag synonym, so the occasional serial up/downvoter won't significantly impact the overall process.


We have the metric given by a matrix $g_{\mu\nu}$, however, some textbooks define it as: $$g_{\mu\nu} = \begin{pmatrix} -1 & 0 & 0 & 0\\ 0 & 1 & 0 & 0\\ 0 & 0 & 1 & 0\\ 0 & 0 & 0 & 1 \end{pmatrix}$$ And others as: $$g_{\mu\nu} = \begin{pmatrix} 1 & 0 & 0 & 0\\ 0 & -1 & 0 & 0\\ 0 & 0 & -1 & 0\\ 0 & 0 & 0 & -1 \end{pmatrix}$$ Is there is a specific physical significance to either one of the choices or is it simply a convenience?

I am studying General Relativity and some basic QFTs. It bothers me a lot that different books use different metric signatures, i.e. $(-+++)$ and $(+---).$ Can anyone tell me the advantages of using both of them, or why some people prefer the former while some prefer the latter? I would like to know which one should I while tackling different problems.


The D key on my built-in keyboard (MacBook Pro) is stuck and it keeps looping into self diagnostic when I boot up. I would like to disable the keyboard during computer startup and go straight to the external keyboard but have not found a way to do this.  If I install Karabiner on my MacBook Pro and disable in Karabiner settings the built in keyboard, after I turn off the MacBook Pro and start it up again with the external keyboard plugged in, would the built in keyboard function during the start up or would it be disabled?   If not is there another way to disable the builtin keyboard during startup?

This is an attempt to write a canonical QA for this issue, as per the Meta post:   I expect it to be periodically edited with the goal of becoming a comprehensive information resource.  I have a MacBook Pro that has a key(Shift, Return,   Command, P, etc.) that doesn’t respond when pressed or is stuck in the down position.    It's possible that my favorite beverage was spilled (or some other liquid damage).  It's also possible that I have no idea what happened.  It was working yesterday and suddenly today it's no longer working.  Is there any way to bypass or remap the key?  Can I  have the system ignore it completely?  (This question can also apply to external USB keyboards or the Bluetooth keyboards)


Is it possible to link "mydomain.com" to "app.iriscouch.com" using a CNAME record?  My service provider app says a CNAME record must have a subdomain.  And A record must link to an IP.

This is a  about CNAMEs at the apices (or roots) of zones   It's relatively common knowledge that CNAME records at the apex of a domain are a taboo practice.  Example: example.com. IN CNAME ithurts.example.net.  In a best case scenario nameserver software might refuse to load the configuration, and in the worst case it might accept this configuration and invalidate the configuration for example.com.  Recently I had a webhosting company pass instructions to a business unit that we needed to CNAME the apex of our domain to a new record. Knowing that this would be a suicide config when fed to BIND, I advised them that we would not be able to comply and that this was bunk advice in general. The webhosting company took the stance that it is not outright forbidden by standard defining RFCs and that their software supports it. If we could not CNAME the apex, their advice was to have no apex record at all and they would not provide a redirecting webserver. ...What?  Most of us know that  insists that A CNAME record is not allowed to coexist with any other data., but let's be honest with ourselves here, that RFC is only Informational. The closest I know to verbiage that forbids the practice is from :     If a CNAME RR is present at a node, no other data should be   present; this ensures that the data for a canonical name and its aliases   cannot be different.   Unfortunately I've been in the industry long enough to know that "should not" is not the same as "must not", and that's enough rope for most software designers to hang themselves with. Knowing that anything short of a concise link to a slam dunk would be a waste of my time, I ended up letting the company get away with a scolding for recommending configurations that could break commonly used software without proper disclosure.  This brings us to the Q&A. For once I'd like us to get really technical about the insanity of apex CNAMEs, and not skirt around the issue like we usually do when someone posts on the subject.  is off limits, as are any other Informational RFC applicable here that I didn't think of. Let's shut this baby down.


I want to find double values in a string. String like this :  ("A1K 90" AK2 90.0000 90.0000d nil nil (QUOTE ("90" "duz" nil nil 4.0)))  I only want 90.0000 and 4.0. Not 90.0000d.  My regex is -?[0-9]+\.[0-9]{1,6}+(?![a-zA-Z])   This works in notepad++. But in c# it errors nested quantifier +.  This problem {}+. Then I removed +. But now my pattern broken.  How can I solve this problem?

I have this regex I built and tested in regex buddy.  "_ [ 0-9]{10}+ {1}+[ 0-9]{10}+ {2}+[ 0-9]{6}+ {2}[ 0-9]{2}"   When I use this in .Net C#   I receive the exception  "parsing \"_ [ 0-9]{10}+ +[ 0-9]{10}+  +[ 0-9]{6}+  [ 0-9]{2}\" - Nested quantifier +."   What does this error mean? Apparently .net doesn't like the expression.  Here is the regex buddy so u can understand my intention with the regex...  _ [ 0-9]{10}+ {1}+[ 0-9]{10}+ {2}+[ 0-9]{6}+ {2}[ 0-9]{2}  Match the characters "_ " literally «_ » Match a single character present in the list below «[ 0-9]{10}+»    Exactly 10 times «{10}+»    The character " " « »    A character in the range between "0" and "9" «0-9» Match the character " " literally « {1}+»    Exactly 1 times «{1}+» Match a single character present in the list below «[ 0-9]{10}+»    Exactly 10 times «{10}+»    The character " " « »    A character in the range between "0" and "9" «0-9» Match the character " " literally « {2}+»    Exactly 2 times «{2}+» Match a single character present in the list below «[ 0-9]{6}+»    Exactly 6 times «{6}+»    The character " " « »    A character in the range between "0" and "9" «0-9» Match the character " " literally « {2}»    Exactly 2 times «{2}» Match a single character present in the list below «[ 0-9]{2}»    Exactly 2 times «{2}»    The character " " « »    A character in the range between "0" and "9" «0-9»   In short...  What is a Nested quantifier?


Given a set of observable facts, let's suppose that there are multiple hypotheses compatible with those facts that can explain them. Is there any way to tell which one of these hypotheses is ultimately true? Or are we doomed to use "rules of thumb" and heuristics to "rank" the hypotheses in an attempt to handle the uncertainty?

While studying I read about the principle of underdetermination of scientific theories. I made some researches online but I am more confused than before. I read about the Quine-Duhem holistic thesis, but I do not know if is the same as underdetermination.


I had restored my iPad Air 2 but now it says I need to activate it with the Apple ID used to set it up but I have forgotten my ID and password. The only way I can use it is to use the previous Apple ID and password. Is there any way I can change the Apple ID to a different new account?

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?


When I execute with biblatex, I have the cite reference :year and author as a single link. See the code below:  \documentclass[smallextended]{article}       % onecolumn (second format)  \usepackage[round]{natbib} % omit 'round' option if you prefer square brackets  \bibliographystyle{apa}  \usepackage{hyperref}  \hypersetup{  colorlinks   = true,  citecolor    = blue  } \begin{document} cite: \cite{Li2001}, \bibliography{my_bibtex} \end{document}   However, when I excecute with biber,I have only:     cite: ?,   and bibliogrphy doesn't displayed.  Another problem, see for example the code bellow, when I exceute with biber in the cite reference I have only the year as a link, where I want the author and the year as a single link. But when I excute with biblatex, I have an error that the file .bbl not created by biblatex.  \documentclass[smallextended]{article}       % onecolumn (second format) \bibliographystyle{apa} \usepackage[style=apa,natbib]{biblatex} \usepackage[american]{babel} \DeclareLanguageMapping{american}{american-apa} \usepackage{filecontents}% \begin{filecontents*}{apabibli1.bib}  @article{Li2001,  author = {Li,W and Jaroszewsk,L and Godzik,A},  year = {2001},  title = {Clustering of highly homologous sequences to reduce the size of large    protein databases},  volume = {17},  number = {3},  pages = {282-283},  journal = {Bioinformatics}  } \end{filecontents*} \addbibresource{apabibli1.bib}  \usepackage{hyperref}  \hypersetup{  colorlinks   = true,  citecolor    = blue  }  \begin{document}  cite: \cite{Li2001}, \printbibliography %\bibliography{my_bibtex} \end{document}   I don't understand what is the problem, I want to display the year and the author like a single link, any help please?!

I'm new here so I'm not sure if this is the right way to express my question:  I'm using the excellent biblatex package with the author-year style and want the links in my citations to include the name of the author as well as the parentheses. The answer presented at  did exactly what I wanted but it seems the solution is broken with the newest biblatex version 1.4b. Can anyone help me by adapting the code to the newest biblatex version?


I have a polygon layer of watersheds (N = 1950) for South Africa. Within each watershed is a value (number of people; POPULATION field). I need to find a way to automatically group contiguous watersheds so that when the summed values of a group of watersheds falls between 50 and 100, those watersheds are assigned a unique ID in a new attribute field called GROUP.   The code that I'm looking for would need to run through the entire polygon layer, essentially assigning ID's (i.e., groups) to each watershed in the layer. I'd imagine that in a polygon layer of 1950 watersheds, there would be ~300 unique groups.  Exactly the same question has been posted previously () but unfortunately they never posted their code.

I have a shapefile with 3800 polygons representing the smallest administrative areas in Ireland. Many of these, in rural areas, have tiny populations, under 100 people. In urban areas, all would have adequate populations.  For each area I have a population figure, and various other attributes, all of which can be intelligently summed to give valid results for areas produced by combining the smaller areas.  I need to merge the areas to get say, 500 or 600 areas of reasonable population. I need to leave the larger (in population) areas alone, where possible. I would greatly prefer to do this automatically. This is necessary for model fitting purposes, primarily.  I've looked at a number of the dissolve questions here:   'Batch Dissolve Polygons based on Attributes in QGIS or FWTools' I think would require me to know which areas to merge, when this is what I need to calculate. 'Practical way of managing polygons and unions of them' and 'How do dissolve polygons from shapefile using open source tools?' have the same issue.   Any suggestions?


When I try to join a massive server the minecraft client crashes with this error: EXCEPTION_ACCESS_VIOLATION. Anyone know how to fix this? Here's my log:  This is not a duplicite because it is only when I join a server.

When I try to launch Minecraft 1.7.4 or newer, the game crashes on startup, and the game output screen says this:  #  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=*, pid=*, tid=* # # JRE version: Java™ SE Runtime Environment (7.0_51-b13) (build 1.7.0_51-b13) # Java VM: Java HotSpot™ Client VM (* mixed mode, sharing windows-* ) # Problematic frame: # C  [ig4dev32.dll+0x3e88] OR # C  [ig4dev64.dll+0x55ec] OR # C  [ig4icd32.dll+0x104a77] OR  # C  [ig4icd64.dll+0x84930a]   This happens with both Java 7 and 8.  What causes this error, and what can I do to fix the issue?


I have this code:  String result = text;      String regex = "((\\(|\\[)(.+)(\\)|\\])){1}?";     Pattern pattern = Pattern.compile(regex);     Matcher matcher = pattern.matcher(result);      System.out.println("start");     System.out.println(result);     while (matcher.find()) {         System.out.print("Start index: " + matcher.start());         System.out.print(" End index: " + matcher.end() + " ");         System.out.println(matcher.group());     }     System.out.println("finish");   And I have a string that I want to match:  Some text sentence or sentences [something 234] (some things)   And the output I get when executing:  start some text sentence or sentences [something 234] (some things) Start index: 32 End index: 61 [something 234] (some things) finish   Now I actually want it to find the found cases in brackets separately, so to find: [something 234] in one match (some things) as the second match  Can anyone please help me build the regex accordingly? I am not sure how to put the reluctant quantifier for the whole regular expression, so I surrounded the whole bracketed elements in another brackets. But I don't understand why this reluctant quantifier is acting greedy here and what do I need to do to change that?

I have this gigantic ugly string: J0000000: Transaction A0001401 started on 8/22/2008 9:49:29 AM J0000010: Project name: E:\foo.pf J0000011: Job name: MBiek Direct Mail Test J0000020: Document 1 - Completed successfully  I'm trying to extract pieces from it using regex. In this case, I want to grab everything after Project Name up to the part where it says J0000011: (the 11 is going to be a different number every time). Here's the regex I've been playing with: Project name:\s+(.*)\s+J[0-9]{7}:  The problem is that it doesn't stop until it hits the J0000020: at the end. How do I make the regex stop at the first occurrence of J[0-9]{7}?


First off, I am pretty much a noob (have basically only done text-based Console Apps and basic graphics stuff), so bear with me.  I am trying to make a sound from a sine wave I defined using a short array. I have defined the array as follows:  int frequency = 1000, sampleRate = 48000; short[] sound = new short[sampleRate];  for (int i = 0; i < sound.Length; i++) {    sound[i] = Convert.ToInt16(2 * Math.PI * i * frequency / sampleRate); }   What I now want to do is somehow convert this to a 1 second long sound clip. How would I go about doing this? I have been told I should use a file stream, but I don't know how to, and the information I could find wasn't very beginner friendly. Are there any special libraries I should/have to use (I know about NAudio but, as I said, I am a noob and don't know what to do with it)?  Thanks in advance.

How do I generate an audio sine or square wave of a given frequency?  I am hoping to do this to calibrate equipment, so how precise would these waves be?