Blender 2.75a: No Compute-Device for Cycles under GTX 750 Ti

I'm using Ubuntu 14.04 LTS, with a brand-new graphics card, GTX 750 Ti. I have even updated the drivers, but for some reason Blender (2.75a) doesn't seem to be allowing Cycles to render with my GPU. Even under User Preferences > System > Compute Device it says "None", with the only option in the drop-down menu being "CPU".   I'm pretty sure I purchased a decent graphics card because I bought this specially for Blender's Cycles. How can I resolve this? How do I get Blender to work with the card?   EDIT: It looks like I managed to find the answer by referring to this thread:   It seems Blender won't detect the card even if I switched to proprietary drivers. In this case, I did this:   Switch to proprietary drivers,  Installing nvidia-modprobe by typing sudo apt-get install nvidia-modprobe Then, in the same way, I installed nvidia-cuda-toolkit   I did not need to restart the system. Just restarted Blender, and it works!


Reporting Which Button Was Clicked when Clicked

When I click on a button, I want to get the id of the button that was clicked. How can I do that with JavaScript?  For example:  <input type="button" id="1" class="buttonID" value="answer" onClick=myFunction() /> <input type="button" id="2" class="buttonID" value="answer" onClick=myFunction() /> <input type="button" id="3" class="buttonID" value="answer" onClick=myFunction() />


Why do people go to the Wall in Game of Thrones?

Is the wall a bad or a good place to be? Some people are sent there as punishment, others go because they want to (Jon Snow), others to get away from harm (Arya).  If I am not completely correct, it is because I have only started watching the series recently, and it is a bit confusing!  Please also correct me if I am wrong with any facts!


Open subspaces of locally compact Hausdorff spaces are locally compact

Let $X$ be locally compact and Hausdorff. I want to prove the following:     If $Y\subset X$ is open then $Y$ is locally compact.   I have proved that closed subsets of $X$ are locally compact, but how can one prove this?  I also want to use these two lemmas to conclude the following:     If $Y\subset X$ is locally closed then $Y$ is locally compact.


How to create a multi-partition USB drive that also acts as the bootable ubuntu.iso?

This old question sounds like what I want:  It's marked as a duplicate of:  But the answers all answer a different question, how to create a bootable USB with multiple partitons. I don't want something that is simply bootable; I want to have something that can be used to install Ubuntu (what I would get if I simply used dd to copy the iso) but the USB stick should also have one or more writable partitions in addition to what is in the iso.


Temperature behavior over time of black or white cars in hot, sunny regions

How does the color of a car influence its inner temperature change over time when parked outside in windless, hot and sunny regions?  I know what's the common idea about that: black cars are supposed to build up high temperatures faster because black objects absorb radiations instead of reflecting them off. Is it true? And then, what happens during the steady state? Some claim the black car will stay hotter, some others claim it will be the same whatever the color. Do all cars have the same temperature inside in the long run, or are some of them hotter?  I've Googled it but the best I could find was . It claims to be based upon ~20 articles. But there's not even a mention of absorption or emission spectrums. A priori, a black car could absorb all visible radiations and emit it as infrared while reflecting all of the Sun's infrared. And it's still only qualitative. I've found nothing on Physics stackexchange, the closest being .


How to assign a variable to select and update a field with it

I have two columns in my table, and I am trying to update the second column with the result of first col like this.   SET @pg = (SELECT ID FROM wp_posts WHERE post_name = 'y' AND post_status = 'x' LIMIT 1)   Now the above query works the (SELECT ...) as in it returns an ID from the query, so I am trying to use that ID to update another column like this.   UPDATE wp_posts SET post_type = 'foo' WHERE ID = @pg;    But for some reason the above does not work.   and I get the following error.   1 queries executed, 0 success, 1 errors, 0 warnings  Query: set @pg = (SELECT ID FROM wp_posts WHERE post_name = 'y' AND post_status = 'x' LIMIT 1) SELECT * ...  Error Code: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'SELECT * FROM wp_posts WHERE id = @pg' at line 3  Execution Time : 0 sec Transfer Time  : 0 sec Total Time     : 0 sec   EDIT/UPDATE:  I am also trying to execute this staetment, which is simpler and does the same thing  UPDATE wp_posts SET post_type = 'x' WHERE ID = (SELECT ID FROM wp_posts WHERE post_name = 'y' AND post_status = 'z' LIMIT 1)   but for some reason, it doesn't work.


How do I calculate the height of a regular tetrahedron having side length $1$ ?  Just to be completely clear, by height I mean if you placed the shape on a table, how high up would the highest point be from the table?


Best approach to Windows Forms rolling log output in TextBox

In a Forms application I'm displaying log output from a long running command-line application that generated a lot of output. I start the program in the background, and capture its output and currently display it in a TextBox using AppendText. I prefer to only display for example the last 1000 lines. Removing lines from a TextBox is expensive, and a TextBox does not really feels like the best approach for rolling log display.  Any ideas on the best Control to do a rolling log window in Windows Forms?


XML Syntaxhighlight highlights elements in CDATA

If you manually declare code to be XML, code within CDATA is still highlighted, even though it should be treated as text.  Example:  <element test="test">       <![CDATA[

Lorem ipsum

]]> </element>


I've met the following phrase:     Something happened on February 12-25, 2010.    It means that some event started on February 12th and ended on February 25th. Actually the text was about the Olympic Games. Is it correct to use the preposition on here? And how should it be pronounced in oral speach? Thank you in advance.


How to install Dropbox on Ubuntu 14.04 (October 2015)

I make this answered question because it took me a while to find the right solution so I hope it helps somebody (I am a quite new to Linux so I was trying to use the "secure" way to do it):   Dropbox has some kind of update/compatibility issues with ubuntu (or the other way around). Solutions that I see on forums from months and years ago do not work after some months (after reading the comments). This worked for me on Ubuntu 14.04 on october 2015 Dropbox installed from the ubuntu software center won't work/start Downloaded .deb file from the dropbox website requires a daemon to be installed. After installing it, dropbox still does not work and gives a lot of error messages (about the daemon)   Solution: Just use the command line (terminal)  sudo apt-get install nautilus-dropbox   I found the command here:   I found a detailed explanation on this issue on the answer of this question (hard to find if you don't know about the problematic update):


How to merge MANY lines within same layer that meet (join at some point)?

I have a line dataset. The dataset is vast and the lines are single features in the data layer. I would like to merge the lines which join at some point. How can I do this using ArcGIS 10.1?  For example: This is the layer, where line fragments are individual records:   Where separate lines meet other separate lines, I would like to join these to form 1 single line record:


Today I found out this site while searching for some clarification regarding NSBundle . Googled for:   It seems to be a copy of this SO question:  If you visit that webpage, you can find it is copying quite a few questions(listed on right hand side).     Not just this, the home page of that site shows a complete list of questions copied from various SE sites.   Is this legal?


How to perform orthogonal regression (total least squares) via PCA?

I always use lm() in R to perform linear regression of $y$ on $x$. That function returns a coefficient $\beta$ such that $$y = \beta x.$$  Today I learned about total least squares and that princomp() function (principal component analysis, PCA) can be used to perform it. It should be good for me (more accurate). I have done some tests using princomp(), like:  r <- princomp( ~ x + y)   My problem is: how to interpret its results? How can I get the regression coefficient? By "coefficient" I mean the number $\beta$ that I have to use to multiply the $x$ value to give a number close to $y$.


Two textures in the same object (not using assign)

I have an ball as an object and i would like to use a plastic like texture (the red one in the picture) and also to add a logo as a image texture. But when i combine the two of them, it's render just one or another. I try to use two different UV maps, or with a mix node, but nothing is working. Here is the image with the image texture applied.


US to Canada by air - minors passport expired

We (adults, 3 children ages 9-14) are traveling by airplane from the US to Canada on 7.21.15 for 1 week. Our 3 children's (ages 9-14) passports all expired on 7.18.15.  3 days before our departure. Will our children be able to enter Canada with a US birth certificate with a seal accompanied by us, their legal parents, with our still valid passports as well as their only 72 hour expired passports? Thanks


VMware Linux Server -- how can you tell if you are a vm or real hardware?

An interesting question.  I have logged into a Linux (most likely SuSE) host.  Is there some way that I can tell programmatically that I am a VM host or not?    Also assume that the vmtools are not installed.


PHP CSV import getting strange charators

I'm trying to import a product csv using PHP to MySQL. When i try to import I got strange characters which also not add properly to database table.  Product Name on CSV File   Alva Cook'on Braadpan Lavendelblauw ovaal 24 cm – 4,2 Liter  Product name i got when import function execute  Alva Cook'on Braadpan Lavendelblauw ovaal 24 cm â€“ 4,2 Liter  my code is like  while (($emapData = fgetcsv($filepath, 10000, ",")) !== FALSE) {     $pd_name=  ($emapData[1]); }   i used this function as a solution this shows product name correctly on import page  $pd_name=mb_convert_encoding(($emapData[1]), 'UCS-2LE', 'UTF-8');  Output ~ Alva Cook'on Braadpan Lavendelblauw ovaal 24 cm – 4,2 Liter   But when i use mysql_real_escape_string as below for insert the name to db table, it added lots of slashes and not work properly.  $pd_name=mysql_real_escape_string(mb_convert_encoding(($emapData[1]), 'UCS-2LE', 'UTF-8'));   Output ~ A\0l\0v\0a\0 \0C\0o\0o\0k\0\'\0o\0n\0 \0B\0r\0a\0a\0d\0p\0a\0n\0 \0L\0a\0v\0e\0n\0d\0e\0l\0b\0l\0a\0u\0w\0 \0o\0v\0a\0a\0l\0 \02\04\0 \0c\0m\0 \0 \04\0,\02\0 \0L\0i\0t\0e\0r\0   SQL database table supports UTF and when we add products normally using form we don't face this problem, anyone know how to fix this issue. Thank You


What is the best practice between using ${var} or $var?

I know that ${var} and $var does the same thing. I also know that you can use brace for advanced options like ${var:=word} or ${var#pattern}. It's also explained .   But I see in some bash scripts the use of braces in the simplest form : ${var} and sometimes I see only this notation $var.   Is there any reason to prefer this syntax over the simple $var as it does the same thing ? Is it for portability ? Is it a coding style ?   As a conscientious developer, which syntax I should use ?


A section on a website has a list of links to PDF files (containing end user content).  When a user clicks on one of these links should it open in a new tab on the browser? Or should it open in the current tab/window?    I notice that when you click on external links on Twitter or Facebook they open in a new tab, but I am unsure about best practices for internal links to PDF documents.


Quoting the output of a backtick command

I'm trying to run an expect script that runs a telnet session to automate the sending of an email, I'm trying to pass the contents of a file as a single argument to my script but when the backticks are interpreted the white space in that file are causing multiple arguments to be passed.  Here's my command...   runTelnet `cat test_results.txt`   Is there a way to quote the output of a backtick expression?


Sorry for asking a lots of questions... I got a SanDisk X110 128SSD that I want to clone all the stuff to a Corsair Force GT 240. How can I do that?


I'm kind of new to latex and I keep having the error: 'missing $ inserted' in the following piece of code:   \sigma$_1$  and \sigma$_3$ horizontal   anyone knows what I'm doing wrong?


Should we have another site for frameworks (and alike) recommendations?

There is . Is the site appropriate for stuff related to requesting frameworks and libraries? Or should we have another site for that (e.g. name it Frameworks Recommendations or stuff alike)?  I can ask stuff there like: I need a software satisfying W, X, Y, and Z, but I'd like -some day- ask like: I need a Python library satisfying W, X, Y, and Z. The audience may be (and perhaps will be) different.    Is that website on-topic for stuff like that? Or should we open another proposal for that?  No: It's not about asking for a giga-dump for subjectivish questions. The linked-to-dupe question was written and answered with an old mindset and without Software Recommendations in mind. Also it does not consider this specific kind of questions but all the crap in one place. So, no,  is not an appropriate dupe mark for this question.


For features that are heavily skewed, the Transformation technique is useful to stabilize variance, make the data more normal distribution-like, improve the validity of measures of association.  I am really having trouble understanding the intuition behind Box-Cox transform. I mean how to configure data transform method for both square root and log transform and estimating lambda.  Could anyone explain in simple words (and maybe with an example) what is the Intuition behind Box-Cox transform


Is there a single word for "one who speaks/boasts a lot about everything"?

I'm looking for a single word to most aptly describe a person possessing the following "qualities":   Appears to be superior in every technology/skill under the sun, which he deems worthy of knowing On being questioned/assigned the task, is found to have only superficial/no knowledge of the said skill. Inherent tendency to "one-up" anyone and everyone - example: "I didn't work hard at all in my undergrad days, but yet I have better/equal grades than you have! "   Could someone help?  Edit: I've got some very good responses, but despite popular opinion for "braggart", I'm going with "pretentious" as it suits what I was looking for more aptly IMHO.


Warning "You are currently using the RemoteFX 3D Video Adapter"

I have received warning popup box "You are currently using the RemoteFX 3D Video Adapter. We no longer support this adapter ..." after I installed new graphic card. I tried to open link provided in this message:  But it seems it describes a Windows update which supposed to disable this feature. Not how to disable it by hand. Googling yielded two results - Remove-VMRemoteFx3dVideoAdapter - which is not applicable in my case - I have Hyper-V running on my machine but I have no VMs. And this command works with VMs. Another one - Disable-VMRemoteFXPhysicalVideoAdapter - it requires name. So I ran get first: PS C:\Windows\system32> Get-VMRemoteFXPhysicalVideoAdapter WARNING: We no longer support the RemoteFX 3D video adapter. If you are still using this adapter, you may become vulnerable to security risks. Learn more (https://go.microsoft.com/fwlink/?linkid=2131976)   Id                          : pci#ven_10de&dev_1d01&subsys_375d1458&rev_a1#4&2ae1b128&0&0019 Name                        : NVIDIA GeForce GT 1030 GPUID                       : 4318_7425_928846936_161 TotalVideoMemory            : 36392450048 AvailableVideoMemory        : 36392450048 DedicatedSystemMemory       : 0 DedicatedVideoMemory        : 2078662656 SharedSystemMemory          : 34313787392 Enabled                     : False CompatibleForVirtualization : True DirectXVersion              : 12.1 PixelShaderVersion          : 5.0 DriverProvider              : NVIDIA DriverDate                  : 2019-07-24 02:00:00Z DriverInstalledDate         : 2019-07-24 02:00:00Z DriverVersion               : 26.21.14.3200 DriverModelVersion          : 2.6 CimSession                  : CimSession: . ComputerName                : xxxxx IsDeleted                   : False   then: PS C:\Windows\system32> Disable-VMRemoteFXPhysicalVideoAdapter -Name "NVIDIA GeForce GT 1030" WARNING: We no longer support the RemoteFX 3D video adapter. If you are still using this adapter, you may become vulnerable to security risks. Learn more (https://go.microsoft.com/fwlink/?linkid=2131976)  My OS is W10 v 2004 build 19041.572 and Windows Update shows that everything is up to date.. How do I make sure this "RemoteFX 3D" is securely disabled?


Dual Boot On Galaxy Note 2 ? ( Android / Ubuntu )

I want to buy a Galaxy Note 2 tablet/phone and I just wanted to know: how can I have both of these OS's on it at the same time?  If there is a way, how can I do it?  Is there anyone who can help me?  (I'm not a Linux programmer so the method would have to be for an Ubuntu beginner.)  I'm not talking about "Ubuntu for android"! I'm thinking something like having Meego and Android on a NOKIA N9, choosing the OS while starting up (dual boot). I want to run the full version Of Ubuntu along side the full version of Android.


Bounty - Does that reward reputation points or will cost my reputation points?

I've never used bounty on one of my questions. I've read that I can set a bounty and they will appear prominent.   I should then award the best question.  So, will they (who awarded) get same reputation points as I've set bounty? Will the same reputation points of mine be cut from my account if I award another?


How to get a new profile page for our community?

I really like the intuitive profile page of Meta Stack Exchange. Is there a way to upgrade the same in a different community, for example, ?


If $a,b$ is an $R$-sequence, then $(ax-b)$ is prime

If $R$ is an integral domain, $a, b\in R, a\neq 0$ and $\bar b$ is not a zero divisor in $R/(a)$. I'm trying to prove $(ax-b)\in R[x]$ is prime.   This question seems easy but I couldn't prove it, maybe there is some trick which I could solve this problem easily?  Thanks


Quantum mechanics in terms of density operators as the fundamental object?

So I've done a two courses in undergrad quantum mechanics, the first began with wave mechanics and then went on to bras and kets, the second course went more into detail regarding bras, kets, hilbert spaces and so on (they retouched on wave mechanics towards the end). But near the end of the second course, they also went into density operators/matrices.  They were presented as another layer of abstraction on top of the more fundamental hilbert space, a convenient tool when dealing with classical statistic ensembles of pure states.  However, reading the textbook and other sources, I've seen it described as more fundamental than pure states, a natural description of subsystems of larger entangled systems, and having the very suggestive and appealing property that there is a one-to-one correspondence between states and operators, unlike in the hilbert space formalism where the correspondence is only up to a phase factor.  So, is there a description of quantum mechanics which takes density operators as the foundational objects, in the same way that the bra-ket formalism begins with rays of a complex space? If so, what does it look like, why isn't QM taught in terms of density operators, and where can I find resources to study it? Also, I have generally heard it is more awkward to work with than bras and kets, why is it?  Finally, if we are representing states by operators, and treating pure states as special cases of density operators, what are they operations on? Or is this just another case of representing abstract mathematical objects as operators for convenience, and there is no meaning to asking what they operate on?


How to prove that $X^{T}X$ is singular if $X$ is singular.

Let's suppose $X$ is $n \times m$ not full rank matrix (ie any column vector in $X$ can be expressed as linear combination of others column vectors). If $$B = X^TX$$ why $B$ is singular?   The question is inspired from the statistics, wherein, if vector of independent variable is linearly dependent, then it is assumed that $X^TX$ is also dependent (or singular). It is difficult to grasp if $X$ is dependent then how $X^TX$ is dependent?


A hemispherical tank of radius 2 metres is initially full of water and has an outlet of 12 cm$^2$ cross-sectional are at the bottom. The outlet is opened at some instant.  The flow through the outlet is according to the law  $v(t) = 0.6 \sqrt{2gh(t)}$, where $v(t)$ and $h(t)$ are respectively the velocity of the flow through the outlet and the height of water level above the outlet at time $t$, and $g$ is the acceleration due to gravity. Find the time it takes to empty the tank.   I know to write a differential equation by relating the decrease of water level to the outflow in order to solve. But don't know how and as we are not not given the initial height how can we solve it.


I have not idea how to approach this differential equation.   $$y'-\int_0^xy(t)dt=2$$.  Basically, I did,  $$F''(t)-F(x)+F(0)=2 \;\;\;\;\;\;\; F'=y$$  I am stuck.  Thank You.


Word for "scary thing that's about to occur"?

I have the feeling I'm forgetting a very simple word. But anyway, is there a word for that? Example:     The [...] that haven't occurred yet are the most scary ones.


Word that means not being upfront about your intentions in the beginning of your stated goals

I'm looking for a word that means not being upfront about your intentions in the beginning of your stated goals. Emphasis on the word stated, a goal has to be explicitly stated. It should be an adjective. Below are example sentences.  Richard Nixon passed laws and policies against drugs, but he was _____ in his public appearances, as he failed to disclose he wanted to target the anti-war hippies against the Vietnam war and also black people.   Theresa May claimed that the Investigative Powers Act would prevent and tackle serious crime and organized crime, but she was being ____ as the amount of government departments with access to data was excessive and people could be subpoenaed without there being suspicion of a crime.   In Kyle's attempts to seduce Kathy to be his girlfriend, he decided to be ______ in his seduction attempts by going to the after school computer club and playing multiplayer flash games with her on a pally level.  The words disingenuous, secretive and deceitful isn't suitable. Secretive isn't suitable because to use it in the example sentences above, it would imply that the person (or speaker) already had a preconceived intention that they kept a secret while implementing new plans, when it's more likely that someone other than them who would change the spirit of the law, procedure or rules. Deceitful isn't suitable because to gain something from deception, whether financial or not, it is fraud, and no fraud is going on. Disingenous is too broad a word with too much scope than my desired word is for, also it's not about pretending to know less than you actually do, but instead doing more in future then you say you're going to do.


I always get told off for saying I wrote an email and told I should say I have written an email. Why? When should you use these different tenses. Or point me towards a good cheat sheet.


Run as administrator under normal account windows xp

We have the students logging in under their own accounts. however, they are not set up as administrators. However, this one application requires admin to run.  Is there a way to run only this application as admin without having to type in the password?


Wilson's Theorem and quadratic Congruence $x^2 + 1 \equiv 0 \pmod p$

Using Wilson's theorem, we show that if $p$ is an odd prime $x^2 + 1 \equiv 0 \pmod p$ has a solution if and only if $p\equiv 1\pmod 4$ . Why cant $p$ be of the form $4n+3$ ?


Window failed to start. A recent hardware or software change might be the cause. To fix the problem: 1. Insert your window installation disc and restart your computer. 2.choose your language,and then click next. 3.click repair your computer. If you don't have this docs , contact your system administrator or computer manufacturer for assistance. Status: 0xc000000f Info : the boot selection failed because a required device is inaccessible.


Php SQL doesn't work. but in phpmyadmin SQL tab it works in GoDaddy servers

I am using goDaddy server. This page doesn't work but when I copy paste SQL output to phpmyadmin SQL tab, it works. Some pages have same status. Some pages which has "insert into" query, it works. This page works on my computer seamlessly  include('database.php');  $resimurl="some url";  $sql = "INSERT INTO gruplar (grupadı,resim,uyesayı,gelenkutusayı) SELECT '" . $adı ."','" . $resimurl ."',1,0 FROM dual WHERE NOT EXISTS (SELECT idi FROM gruplar WHERE grupadı='". $adı. "')";          $result = mysqli_query($conn, $sql); die($sql);   databese.php  $servername = "bla bla"; $username = "bla"; $password = "bla"; $dbname = "db name";  $conn = new mysqli($servername, $username, $password, $dbname); if ($conn->connect_error) {     die ("HATA"); //die("Connection failed: " . $conn->connect_error); }   I want to remind that some pages which use this database.php works seamlessly.  Thanks for your help.  I solved problem with chancing table column name "ı" to "i". ex(grupadı => grupadi ) It was not about undefined variable. I think it is about comminication of databese and php works with $adı variable.  Thanks for help


How can light speed be measured relatively?

Following scenario:  Two rockets leave a planet, heading opposite direction. Assuming the rockets are capable of accelariting highly - when would there be a barrier? Einstein said, nothing can be faster than light. But if both rockets flew with c/2 relatively to the planet, wouldn't they fly with c relatively to each other (which is not possible)?  Time is said to be faster for a moving object, but how is it determined whether an object is moved or not? I mean, there is no absolute place this can be measured from...


What is the best practice to make division return double in C#

In c# when you want to divide the result of a method such as below, what is the best way to force it to return a double value rather than the default integer.   (int)Math.Ceiling((double)(System.DateTime.DaysInMonth(2009, 1) / 7));   As you can see I need the division to return a double so I can use the ceiling function.


Can I travel from the USA to Spain without buying a round trip ticket? What are my options?

I'm a circus artist and plan on heading to Barcelona in late July. I have open ended plans but hope to stay there until my three months are up and then head to Ireland.  Because Ireland is part of the EU is this still possible without obtaining a work or student visa?  Would it be better for me to go somewhere else?  If I would like to stay in Spain longer is it possible to leave the EU for a few days and then return to start my 3 months over?  In a perfect world I would buy my one way ticket to Barcelona now and then buy my next ticket after arrival.  Is this possible or do I need proof of travel after three months in order to enter Spain?


Do not ask "Run or Display" for certain file extensions

I'm pretty new to Ubuntu and already stuck on something simple: When trying to open a plain text file with the file extension .txt, it always asks whether i want to run or display the file.   Now, if the file has the ending .txt, I ALWAYS want it to be displayed in gedit. I never want to run it. Is there a way to skip that dialogue? I think the file manager is Nautilus.  To be specific: I don't want to skip the dialogue for all plain text documents! Just for those with the ending ".txt".   Glad if someone could help me, its pretty annoying since I'm editing a lot of text files :-)


Numbering for Gather Equation: I want to remove the chapter number from equation numbering

I am novice to Lyx. I have used standard report for the document class. I created a gather equation. The equation numbering includes the number of the chapter which I do not want. I just want to number my equations 1,2,3 .........


Performing administrative test cases in Selenium IDE

For a Drupal site, I have written a test script in Selenium IDE that logs in as the administrator, adds a new user and peforms a series of tests on the registration page.  Once this user has been added, I would like to add to this script so that it then goes to the user panel, and removes it again. Getting to the user admin page is simple, and I have the username field stored from earlier, say "test user 2".  In the user admin panel, we have this:    What I need to do is find a way to select the checkbox next to the appropriate user. The problem is that the checkbox is marked up as such:  <input type="checkbox" class="form-checkbox" value="4" id="edit-accounts-4" name="accounts[4]">   Now, as mentioned before, the only information I have about the user is the username. Unfortunately the id of the checkbox references the internal user id, which is 4. That's information I don't have. However, the username link I can locate because I have the value stored. I can just locate any anchor element containing the username string "test user 2". Markup is:  test user 2   Since I have "test user 2" as the username already stored, I can select this element in my test case. But what I want to do is select the checkbox next to it. There's two ways that I think this can be done:  1) Extract the number "4" from the href attribute and use that to select the checkbox, since all checkbox ids will be of the form "edit-accounts-x" where x is a number.  2) Use some funky xpath to determine that the checkbox is on the same row as the username I have stored.  Thoughts?


How to find a global minimum for $\frac{1}{2}x^tQx-b^tx$

Let $f(x) = \frac{1}{2}x^tQx-b^tx, Q\in\mathbb{R}^{n\times n}$   symmetric definite positive and $b\in\mathbb{R}^n$. Let $x^0, x^1,  \cdots, x^n\in\mathbb{R}^n$ and define $\delta^j = x^j-x^0$, $\gamma^j  = \nabla f(x^j)-\nabla f(x^0)$, $j=0,1\cdots,n$. Prove that the vectors $\{\delta^j\}_{j=1}^n$ are linearly independent, then   $$\overline{x} = x^n-[\delta^1\cdots \delta^n]\cdot[\gamma^1\cdots  \gamma^n]^{-1}\cdot\nabla f(x^n)$$ is a global minimizer of $f$   So, that's what I did:  $$\nabla f(x) = Qx-b^t\implies \gamma^j = Qx^j-b^t-(Qx^0-b^t) = Q(x^j-x^0)\implies\\\gamma^j = Q\delta^j\implies\delta^j = Q^{-1}\gamma^j$$  So  $$\overline{x} = x^n-[Q^{-1}\gamma^1\cdots Q^{-1}\gamma^n]\cdot[\gamma^1\cdots  \gamma^n]^{-1}\cdot\nabla f(x^n) =\\ x^n -Q^{-1}[\gamma^1\cdots \gamma^n][\gamma^1\cdots \gamma^n]^{-1}\cdot\nabla f(x^n) = x^n-Q^{-1}\nabla f(x^n) \implies \\\overline{x} = x^n-Q^{-1}(Qx^n-b^t) = x^n-x^n+Q^{-1}b^t = Q^{-1}b^t$$  So I need to prove $\overline{x} = Q^{-1}b^t$ is a global minimizer? Also, I need to use linear independence of $\{\delta^j\}$ to something. I guess it is related with the inverse matrix. Maybe linear independence of $\{\delta\}^j$ implies that that matrix has an inverse, but I don't know why.  Also, as I recall, $f(x)$ is quadratic and therefore convex. So shouldn't it has only one minimum? (therefore, since it is convex, it's the global?) So I should need to prove only that $\overline{x}$ is a local minimum? In that case I should only have to calculate $\nabla f(\overline{x}) = Q(Q^{-1}b^t)-b^t = 0$. The second derivative is just $Q$ and is definite positive. So: first derivative zero, second derivatie def. positive. Therefore this point $\overline{x}$ should be a minimum.  Even though I think I solved the exercise I don't know what all this means. It could just have asked if $Q^{-1}b^t$ is a global minimum. I think it is trying to show me a process of finding a global minimum for a quadratic function but I don't see the motivation.


Could a ship warp into Borg cube and destroy it?

During the Wolf-359 incident, 39 starships were destroyed, and 11,000 people were killed or assimilated.  Why didn’t one of the smaller ships warp into that one Borg cube? Doesn’t warping into it destroy anything?  Even if it just warps through without touching, one could program the navicom to self destruct while the ship is in the middle of Borg cube.


More space between main text and footnote

I want to add some space between text on the page and footnotes. I need to have "one missing line" above the black line of footnotes. Thank you for any help!


Does anybody know how to make a 'always-on-bottom'-windows, or a window pinned to the desktop? It should receive focus and mouseclicks, but should stay at the bottom of the Z-order. It would also be great if it could stay on the desktop even when user do a minimize all or show desktop operation.  Both delphi and c# solutions (or partial solutions/hints) would be great.


Prove that if G is a graph with  $\chi$(G-v-w)=$\chi$(G)-2 for every pair of vertices v and w in G, then G is complete.   I think I can use contradiction method but I don't know how to do.


I have a string containing time stamp in format      (DD/MM/YYYY HH:MM:SS AM/PM), e.g."12/20/2014 15:25:05 pm"   .  The time here is in 24 Hrs format.  I need to convert into same format but with time in 12-Hrs format.  I am using python version 2.6.  I have gone through time library of python but couldn't come up with any solution.


Prove that differentiable monotonic function's inverse is differentiable

Suppose $f'(x)>0$ in (a,b). Prove that $f$ is strictly increasing in $(a,b)$, an let $g$ be its inverse function. Prove that $g$ is differentiable, and that $g'(f(x))=\frac{1}{f'(x)}\text{ (a<x<b)}$.  I've managed to prove the second part, but have difficulty proving that $g$ is differentiable. We know that for some neighborhood of $t$, we have $$\mid\frac{f(x)-f(t)}{x-t}-f'(t)\mid<\epsilon$$ I want to bound $$\mid\frac{g(f(x))-g(f(t))}{f(x)-f(t)}-\frac{1}{f'(t)}\mid$$ by using the above inequality. I only know that $g(f(x))=x$ and $g(f(t))=t$. But then I'm not sure how to proceed. Could you tell me if this is the right approach, and give me any hint to manipulate this inequality? Thanks!


How to set a SELECT control using text instead of value using jquery?

I have the following HTML  <SELECT id='cars'>    <OPTION value='1'>Car One</option>    <OPTION value='2'>Second Car</option>    <OPTION value='3'>Another Car</option> </SELECT>   And I know that I can change the selected value of the drop-down control to any value using:  $('#cars').val(2);   // This will make the combo text: Second Car   But how can I select a value using the text rather than the value?  What I need to do is something like:  $('#cars').val('Another Car');   or   $('#cars').text('Another Car');   but that has no effect...  Any help?


Is it possible to reconstruct the Hamiltonian from knowledge of its ground state wave function?

Is it possible to "construct" the Hamiltonian of a system if its ground state wave function (or functional) is known? I understand one should not expect this to be generically true since the Hamiltonian contains more information (the full spectrum) than a single state vector. But are there any special cases where it's possible to obtain the Hamiltonian? Some examples would be really helpful.


Any good reason to noindex /page/2/ in archives?

In the WordPress SEO plugin by Yoast, there is an option that could noindex the subpages of archives. From example, it would noindex the following:  http://example.com/page/2/ http://example.com/page/3/ http://example.com/page/4/   … and so on. Is there a good and legitimate reason to do this, in terms of SEO? Would it benefit me in any way?


Why use RMS values instead of "mean of absolute"

Why do we use rms values? I can't get my head around why these values are used. I am doing an intro course to elec eng and we get given some values (normally voltages) in rms and others not, and we are expected to calculate other values but I don't know when to calculate rms or when to calculate something else.  I realise that the root-mean-square is different from the mean-root-square or mean of absolute but it seems logical to me to use the mean-root-square not the rms. Why do we want to use the rms? And when do we want to calculate rms instead of another "interpretation" of the value?  I have seen a similar question to this that addresses only power calculations where voltage is squared but we seem to use rms even when we don't square anything and we aren't interested in calculating power...


Why electron-positron annihilation releases two gamma photons?

I have heard that a gamma photon can convert into an electrons positron pair( I don't know how that works), but see when the reverse thing happens shouldn't a single photon be release but in books it is given that during the annihilation two gamma photons are generated,  does it have to do something with momentum conservation?


Even order group, contains element of order 2

Show every finite group of even order contains an element of order 2.  I have tried using Lagrange's theorem, but I am unsure if this is the right path.


What happens to a sell order that doesn't have enough bid matches on it's ask price?

A stock has a bid of 100.00 for 500 shares. I issued a sell order for 1000 shares of the same stock for 100.00.  What will happen? Will the sell order wait until there's 500 shares available at 100.00 or will it sell to the next available bid?


Term for words with identical spelling but different meaning and different pronunciation

What do you call words with identical spelling but different meaning and different pronunciation? A couple examples are bass and resume.


Can root kill init process (the process with pid 1)? What would be its consequences?


This is a pretty well known quote from the Star Wars movies. But isn't it a bit paradoxical?   It in itself is an absolute, and it was said by a Jedi (Obi-Wan if I recall correctly?). If this holds true, then is he leaning towards the Sith himself? If it isn't true, then both Jedi and Sith can deal in absolutes and the statement is pointless.  Surely it should be phased along the lines of "Jedi's should avoid dealing in absolutes" or something similar?


Request to Reopen someone's duplicate tagged question

I found a question that is marked as duplicate, even though it seems to not be a duplicate and has a different intent. How can I get the question reopened? The question was posted by someone else (not me).


Layout switching hotkeys are lost in WIndows 10

I have 3 languages tied to Left Alt+Shift + 1, 2 and 3. They are reset to 'None' after sleep every couple of days.  Why is this? And what can I do about it?


Prove that ${n \choose k} + {n \choose k+1} = {n+1 \choose k+1}$.  I can prove it using numeric examples, but i need a broader proof. I think it might have to do with Pascal's Triangle.


How do I format a date in ruby to include "rd" as in "3rd"

I want to format a date object so that I can display strings such as "3rd July" or "1st October". I can't find an option in Date.strftime to generate the "rd" and "st". Any one know how to do this?


R - Analysis of a Qualitative Predictor with 30 levels

I'm running a multiple linear regression in R.  In my linear regression I have 'country' as a qualitative predictor, which dramatically increases the adjusted R^2 value, and lowers my BIC. I want to include it in my regression model, but only around 2/3 of the counties I've mentioned are statistically different from the dummy variable.   Is it correct to bundle these countries together to have "zero" weight when compared to the dummy variable?  When I run my training model on some test data, how can I stop it using these from adding 'artificial statistically insignificant weights' to the model.  For example, Australia adds 2.6 to the model, but its p value is 0.34. I would like it to add 0 instead of 2.6.  Thank you very much!


jQuery access element not yet loaded in DOM

How do I write a click event that acts on an element not yet loaded into the DOM?  Scenario:   native-btn is a div loaded at document ready. ajax-loaded-element is a div that appears after an ajax form executes a series of client-side events   My event is as follows:  $(".native-btn").click(function() {     $(".ajax-loaded-element").fadeOut();         });   I can't seem to get the .ajax-loaded element to respond. I know that .live() is deprecated, and the .on() event only applies to interacting directly with a newly inserted element, not acting on it by means of a secondary action. Is there another usage of .on() that I'm missing?  Thanks!  UPDATE  I am now using the .on() event to access the . ajax-loaded-element div. However, while it responds to basic events like .hide() and .css(), it doesn't respond to .trigger(), which is what I ultimately need it to do.  $(document).on("click", ".native-btn", function() {      $('.ajax-loaded-element').trigger('click');      $('.ajax-loaded-element').css("background-color","red");  });   Background changes to red, but trigger doesn't fire. I should add that the default functionality of the .ajax-loaded-element that is being loaded by the CMS advances a page on an ajax form. I am trying to trigger it remotely because I want to add custom animations before and after the default functionality.   THE WHOLE SCOOP  I am using a multipage webform in Drupal, which shows up as a block on a page. Because I've assigned ajax client-side functionality to it, it dynamically inserts "PREV" and "NEXT" divs to advance the form as needed.   From a UX perspective, I want to fade the whole form out, let the form advance to the next page, then fade the form in, instead of a blink-of-an-eye change wherein the user may not perceive that the form has advanced. I don't have access to the webform functionality, so I'm trying to do it with jQuery and trigger. The basic markup is:
     ...form code...
Next

Prev

NEXT

PREV
  $(document).on("click", ".native-btn-next", function() {      $('#webform').fadeOut();      $('#webform .ajax-loaded-next').trigger('click');      $('#webform').fadeIn();  });  $(document).on("click", ".native-btn-prev", function() {      $('#webform').fadeOut();      $('#webform .ajax-loaded-prev').trigger('click');      $('#webform').fadeIn();  });   Looks like this: (ajax NEXT/PREV are white, native NEXT/PREV are black)    As you can see, it starts with only the Next button, which works like a charm. Webform fades out, the ajax-loaded-next trigger clicks, the page advances, webform fades in.  But on page 02, the ajax-loaded-prev button shows up:    This was obviously not in the DOM when the form loaded. My native-btn-prev fades the webform in and out, but doesn't trigger click.  Hope that makes sense...


What are the advantages of filling tires with Nitrogen instead of air?

I am completely new to riding bikes and know that are usually filled with air but nowadays some people fill them with Nitrogen instead.  I don't know why they prefer to fill their tires with nitrogen as it is more costly than filling them with air.  What are the benefits of filling tires with Nitrogen?


why do we need to install Ubuntu when we already enable WSL in Win10

Why do we need to install ubuntu when we already enabled WSL?


How to find the directory from where the script is invoked without using $pwd in the my script

suppose there is a script "/home/abc/test.go". Someone else went to another directory lets assume "/etc/random/" and executed the script "test.go".  Now I want to know from where the script was invoked.   Can anyone help me with the command to know from where the script was invoked(/etc/random/)??  I tried "lsof" but it gives the files that the script is working on and the location of the script(/home/abc/) but not from where it is invoked.  Note:- I don't want to use $pwd in the script. I am looking for a command that can just display the directory from where the mentioned script was executed(invoked).


Get domain without subdomain in javascript

How can I get the domain without subdomain in JS without jQuery?   I saw a lot of solutions with split and regular expressions that doesn't work in all this cases:   http:// subdomain.domain.com.br  http:// subdomain.domaincom http:// www.domain.com http:// www.domain.com.br   The result may be: domain.com / domain.com.br


I am trying to change color of iconName="utility:check" on close of modal popup.I have written CSS also.  My Icon:   <lightning:buttonIcon iconName="utility:check" class="icn" variant="bare" onclick="{!c.openapproveModel}" value="{!idf.Base_Invention_Disclosure__c}" alternativeText="Approve Invention Disclosure"/>&nbsp;      My CSS:  .THIS.icn svg{fill : red;}   I have tried this also .THIS.icn.svg{fill : red;}


How to sum different digits in one integer? For example: int = and 411; I want to pull out the numbers and sum them: 4 + 1 + 1 = 6, tried in various ways, but I gather ASCII value in the table, and I do not want it?


Can the program counter on Intel CPUs can be read directly (that is without 'tricks') in kernel mode or some other mode?


Are there any specific examples in Lord of the Rings that are influenced by WWII?

I know that Tolkien is greatly influenced by folklore of many cultures and WWI directly. However, I wonder if there are any specific examples that show influence from WWII?  The best conjecture so far I have obtained from web is possible influence of Hitler in the creation of Saruman, especially on Saruman's speech to the Uruk Hai. Although this passes as a very possible inspiration, to the best of my knowledge, Tolkien did refute any influence of WWII in LOTR.  Any interview with Tolkien should be considered as primary proof, however I am willing to accept criticism of historians, literature professors and academicians in any related field. Lastly, your own conjectures if justified properly are welcome as well.


NullPointerException when getting text from a specific element

I'm learning how to use selenium by using java. I got a problem. Having html code:
Laptop Dell XPS 13 2015 13.3inch Touch (Xám) - Hàng nhập khẩu
   And this is my code to get text:  By productName = By.className("cart-popup-product__title"); public String ProductName(){     String pn = driver.findElement(productName).getText();     return pn; }   Eclipse display error message: NullPointerException. I have tried to use xpath, cssSelector but it's not working.  *Update: I've solved my problem. I just add this.driver = driver; to constructor. I forgot to add when initialize constructor.  Thanks all for helping me improve.


How can a company reduce my number of shares?

I purchased 1000 shares of ACB stock a little over a year ago. I have now learned I have only 83 shares of stock. How can the company take away over 900 shares of my stock?


How to insert horizontal line between list items

I need to insert a line between two particular items in a list. The way I do it (below) creates too much vertical space around the line, and the line is not in the middle between bottom of previous item and top of next item. How can I fix it?  \begin{itemize}     \item text     \item text\\           \rule[0cm]{8cm}{0.4pt}     \item text     \item text \end{itemize}   I'd like the horizontal line to be evenly spaced between bottom of previous item and top of next item. The vertical distance between items separated by line can be increased a bit to accommodate the line.


CPU Limit Exceeded because of nested for loops

This is a question which I really can't find an answer to. In a trigger before insert or update, I like to compare 4 field values from the object named Calculation__c with 4 field values of Driver_Course__c.  The fields on Calculation__c are named:    Course__c  Cup__c  Tour__c   Driver__c   Those 4 fields i like to compare with the following fields of the object Driver_Course__c:   Course__c  Course__r.Cup__c Course__r.Cup__r.Tour__c Driver__c   With nested for loops it's easy, but I don't want to run into any governor limits, which I will regarding my test class, which gives me the error: CPU Limits exceeds.  I know how to get the data prepared for matching, but the matching itself I really dont know what to do. There is no exact field to match both objects. So it's purely those 4 fields which have to match. After removing and adding stuff this is what i got:  public without sharing class AutoFillCalculations { public static void FillOut(List<Calculation__c> calcList) {      // Id nodig van Course     Set<Id> courseIdSet = new Set<Id>();     // Id nodig van Cup     Set<Id> cupIdSet = new Set<Id>();     //Id nodig van Tour     Set<Id> tourIdSet = new Set<Id>();     // Id nodig van Driver     Set<Id> driverIdSet = new Set<Id>();     Map<Id, Driver_Course__c> driverCourseById = new Map<Id, Driver_Course__c>();       // Add the Ids to the sets     for(Calculation__c calc : calcList){         courseIdSet.add(calc.Course__c);         cupIdSet.add(calc.Cup__c);         tourIdSet.add(calc.Tour__c);         driverIdSet.add(calc.Driver__c);      }      // Query  ids met junction object Driver Course      for(Driver_Course__c driverCourse : [SELECT Id, Driver__c, Course__c, Course__r.Cup__c, Course__r.Cup__r.Tour__c                                             FROM Driver_Course__c                                            WHERE Course__c IN :courseIdSet                                             AND Course__r.Cup__c IN :cupIdSet                                             AND Course__r.Cup__r.Tour__c IN :tourIdSet                                             AND Driver__c IN :driverIdSet]){          for(Calculation__c calc : calcList){              If(driverCourse.Course__c == calc.Course__c &&             driverCourse.Course__r.Cup__c == calc.Cup__c &&             driverCourse.Course__r.Cup__r.Tour__c == calc.Tour__c &&             driverCourse.Driver__c == calc.Driver__c){                  calc.Driver_Course__c = driverCourse.Id;                 //calcUpdateList.add(calc);             }          }      } }   }


Reg: What's that you have got Meggie? Reg: Show us. Meggie: No, she's mine! I got her for my birthday! Reg: We just want to have a look.  Reg used the present perfect have got in the first sentence; instead, Meggie used the past tense got. If Meggie used have got, would the sentence be correct?


Is Essos a safe place when the winter comes?

In other words, are the white walkers able to cross the Narrow Sea? We do know that they cannot swim, but could the freeze it?


Is it possible to output positive numbers in c# with the plus sign '+', without writing a char code like this?:  Console.WriteLine("+" + 5);   This is what I mean: For example, n = 5: I want the algorithm to output +5 like this:    Thanks for your help.


Example where partial derivatives commute but are not continuous.

I am looking for an example of a function $f:\mathbb R^2\to\mathbb R$ such that there is a point $x\in\mathbb R^2$ with the following properties:  1) All partial derivatives of second order exist in a neighborhood of $x$.  2) At least one of those partial derivatives is not continuous in $x$.  3) The Hessian matrix of $f$ in $x$ is symmetric.  I think it should be possible to find such a function but I wasn't very successful in finding one. If we drop the first property it is easy, with it however, I didn't find any example yet. Any help appreciated.


I want to copy all images on my computer to a single folder

I want to copy all images of any file extension like .jpg, .png, .gif, etc. from all folders and subfolders in my PC hard drive (which has two partitions) to a single folder.  The total number of images I have is 250,000.


I am making a game that has objects that shoot other objects. I need the enemies to follow a path. The easiest way I can think of doing this is by having an array of coordinates and they move between them. But when I make a curve in the path, I don't want to have to put in 100 coordinates. There must be a better way.


Minimum value of $\frac{2-\cos(x)}{\sin(x)}$ without differentiation

I have to find the minimum value of the expression  $$\frac{2 - \cos x}{ \sin x}$$ Also $x$ lies between $0$ to $\pi$. One way is to find the minima using differentiation. But it is not taught in my grade so my teacher asked me to do it without differentiation.  Here's what I did   Let$$\frac{2 - \cos x }{ \sin x} = y~,$$ so that $$ (2-y \sin x)^2 = 1 - \sin^2(x) \\ \implies \sin^2(x) \cdot (y^2 +1) - 4 y \sin x +3=0$$  Now I am struck. I tried using Discriminant $\ge{0}$ but no use as our variable $\sin x$  lies between $0$and $1$. Please help.


how do you make commands not show up on the chat

I am making a server, and I put a comparitor clock down to constantly have clear weather. How do I silence the commands?


Some annoying websites (like Stack Exchange) contain dialogs.   It's annoying.  So how can I permanently disable these dialogs on Chrome?


Parse a number from a string with no space separating a letter from the number

I'm trying to learn RegEx and tried to solve the below scenario:  Assume the the below string is a cell in a data input with thousands of rows:  "He who sleeps on the floor will not fall off the bed.Robert Gronock16-APR-2005This is a valid record."   I wrote the Regex ".+\s*(\d+-.+-\d+|[[:alpha:]]{3}\s*\d+,*\s\d+)" to extract the date only from the string but what I get is 6-APR-2005 missing the 1 at the beginning.  I don't want to use {2} as some rows has single digit like 8-Apr-2005 and it would return Null.  What I am doing wrong in the RegEx?


python reading multiple lines to 1 dimension in 2D list from file

I have text file which looks like this:  Cat Beth 12 female Dog Bob 10 male ... .. .   I want to store it like this:  myList = [["Cat", "Beth", "12", "female"],["Dog", "Bob", "10", "male"], ...] I came up with this idea.My question: Is there a shorter way to do this?  with open("sample.txt") as myFile:    myList = []    temp = []    bit = 1    for line in myFile:        temp.append(line.strip())        if bit % 4 == 0:            myList.append(temp)            temp = []        bit += 1


How can I compile and run c# program without using visual studio?

I am very new to C#. I have just run C# 'Hello World' program using Visual Studio.  Can I run or compile a C# program without using Visual Studio?  If it is possible, then which compiler should I use?  Thanks


I have group of object and i want to make it mirror effect

I have a group of object and i want to mirror that object how is possible and to make a group of object mirror effect


With an outcome variable and two correlated regressors...  set.seed(321)  sampleSize <- 10000 x1 <- rnorm(sampleSize) x2 <- 0.3*x1 + rnorm(sampleSize) y <- 1 + 2*x1 + 3*x2 + rnorm(sampleSize)   ...I compute the Ridge estimates first analytically...  $\hat{\boldsymbol{\beta}}_{ridge}=(\boldsymbol{X}'\boldsymbol{X}+\lambda \boldsymbol{I}_k)^{-1}\boldsymbol{X}'\boldsymbol{Y}$  xMatrix <- cbind(rep(1,sampleSize),x1,x2) lambdaMatrix <- matrix(c(3000,0,0,                          0,3000,0,                          0,0,3000),3,3) ridgeEstimates <- solve(t(xMatrix)%*%xMatrix + lambdaMatrix)%*%t(xMatrix)%*%y  ridgeEstimates  #         [,1] #    0.7654183 # x1 1.6649745 # x2 2.4254723   ...then with glmnet:  ridgeFit <- glmnet::glmnet(xMatrix, y, alpha = 0, lambda = 3000) coef(ridgeFit)  #4 x 1 sparse Matrix of class "dgCMatrix" #                     s0 #(Intercept) 0.956700441 #            .           #x1          0.004089457 #x2          0.005014845   Why are they so different?


Can't get ID of post that relates to the comment

I added custom checkbox to the comment form. I am trying to write the post ID of this comment in the database. But without success. I'm trying with something like this:  add_action( 'comment_post', 'save_chbox_in_db' );  function save_chbox_in_db() {      $post_id = ??? // Can't get id...      insert_to_db ( $email, $post_id ); // custom function }   I tested these options:  global $post; $post_id = $post->ID();  global $wp_query; $post_id = $wp_query->post->ID;  $post_id = get_queried_object_id();  $post_id = get_the_ID();   As a result, I get zero or nothing. Where is the problem? Something with "comment_post" action? Or do I make some stupid mistake?


Javascript doesn't work on dynamic form generated by jQuery

I have a php page with a form for a login.   <form role="form" id="contactForm">     <input type="text" id="inputName" required>     <input type="password" id="inputPassword" required>     <button type="submit">ACCEDI</button>  </form>

   On the bottom of the page I load a .js to execute this form in jQuery and the page, on success return a new form on div #risposta but this form cannot be executed like the first. When I click on the submit button of the 2nd form it reload the page and do nothing. 1st form works as needed.   js code:  $("#contactForm").on("submit", function (event) {     event.preventDefault();     submitForm(); }); $("#conferma").on("submit", function (event) {     console.log( 'Conferma Dati' );     event.preventDefault();     submitConfermaDati(); });   hmtl of 2nd form generated by first:  <form role="form" id="conferma" class="form-signin">     <input type="hidden" id="utf_id" value="1">     <input type="text" id="rag_sociale" class="form-control"  value="">     <input type="text" id="utf_nome" class="form-control" value="" required="">     ----- more input -----           <button type="submit">CONFERMA</button> </form>


Converting MapInfo TAB and/or MIF to SHP using free tools or ArcGIS for Desktop core product?

How do I convert MapInfo TAB and/or MIF files to SHP using only free tools or ArcGIS itself?   I've not had much luck trying to do this in the past and I don't want to have to shell out for the ArcGIS Data Interoperability extension which seems to be the 'official' way to go about this.


Postgresql extremely slow count (with index, simple query)

I need to run these simple queries on a table with millions of rows:  SELECT COUNT(*) FROM "subscriptions" WHERE "subscriptions"."project_id" = 123;   SELECT COUNT(*) FROM "subscriptions" WHERE "subscriptions"."project_id" = 123 AND "subscriptions"."trashed_at" IS NULL;   The count result for both queries, for project 123, is about 5M.  I have an index in place on project_id, and also another index on (project_id, trashed_at):  "index_subscriptions_on_project_id_and_created_at" btree (project_id, created_at DESC) "index_subscriptions_on_project_id_and_trashed_at" btree (project_id, trashed_at DESC)   The problem is that both queries are extremely slow and take about 17s each.  These are the results of EXPLAIN ANALIZE:        QUERY PLAN                                                                                --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------  Aggregate  (cost=2068127.29..2068127.30 rows=1 width=0) (actual time=17342.420..17342.420 rows=1 loops=1)    ->  Bitmap Heap Scan on subscriptions  (cost=199573.94..2055635.23 rows=4996823 width=0) (actual time=1666.409..16855.610 rows=4994254 loops=1)          Recheck Cond: (project_id = 123)          Rows Removed by Index Recheck: 23746378          Heap Blocks: exact=131205 lossy=1480411          ->  Bitmap Index Scan on index_subscriptions_on_project_id_and_trashed_at  (cost=0.00..198324.74 rows=4996823 width=0) (actual time=1582.717..1582.717 rows=4994877 loops=1)                Index Cond: (project_id = 123)  Planning time: 0.090 ms  Execution time: 17344.182 ms (9 rows)         QUERY PLAN                                                                                --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------  Aggregate  (cost=2047881.69..2047881.70 rows=1 width=0) (actual time=17557.218..17557.218 rows=1 loops=1)    ->  Bitmap Heap Scan on subscriptions  (cost=187953.70..2036810.19 rows=4428599 width=0) (actual time=1644.966..17078.378 rows=4994130 loops=1)          Recheck Cond: ((project_id = 123) AND (trashed_at IS NULL))          Rows Removed by Index Recheck: 23746273          Heap Blocks: exact=131144 lossy=1480409          ->  Bitmap Index Scan on index_subscriptions_on_project_id_and_trashed_at  (cost=0.00..186846.55 rows=4428599 width=0) (actual time=1566.163..1566.163 rows=4994749 loops=1)                Index Cond: ((project_id = 123) AND (trashed_at IS NULL))  Planning time: 0.084 ms  Execution time: 17558.522 ms (9 rows)   What is the problem?  What can I do to improve the performance (i.e. count in a few seconds)?


I'm out of status but want to travel from Los Angeles to New York, USA

I'm currently out of status and want to travel to New York from Los Angeles. I came here in the US with a tourist visa. I've been out of status for five years. I got married recently with a immigrant resident here is US. I have a valid driver's license because of the law that was given last year for non immigrant visa to obtain a driver's license. I also have a valid passport but my visa and status are no longer up to date.  I'm scared to travel by plane because they might question me regarding my status because President Trump has a lot of new policies and laws being enforced. The travel is for our honeymoon I just want to make sure I can pass through the airport without being questioned about my status.


If light was 2 parts per trillion slower than gravitational waves, would we know this from Gauss' law?

In the recent neutron star merger. The gravitational waves started 100 seconds before the collision, which is when they reached a max and STOPPED. The mass quadrupole had stopped changing, which means the objects had physically collided. Only being 10 km in diameter or so. THEN it took 1.7 more seconds for the first gammas from that collision to arrive. Fishy. Where could gamma rays hang out that long?  Tell me why we are not looking at direct evidence that light is slower than gravitational waves by 2.5 parts per trillion = 2.7 seconds over 130 million light years.  So far as I can tell, nothing requires gravitational waves to travel at EXACTLY the speed of light. They only have do so approximately. There’s universal maximum information speed in SR, but it can just as well be the speed of gravitational waves, and doesn’t have to be exactly c, so long as it’s very close to it. Would we know if Gauss’ law is off by a factor of 1 in a trillion? Suppose photons had a very very tiny rest mass, far smaller than neutrinos. Would there be physical consequences? The range of electric fields would look the nearly the same at those differences. So would the rest of physics.   Einstein’s derivation of the speed of g-waves has two problems. One is that it is in the weak field limit. It might not be applicable to gravitational waves so strong we can detect them from 130 million light years away. These are STRONG gravitational waves.  Even worse, Einstein also makes standard assumptions in his g-wave speed derivation, one of them being explicitly that "c," the maximum velocity in GR from the GR field equation, IS the speed of light. Maybe it's just "c"-- the maximal speed in space time. If you put that c is the speed of electromagnetic radiation in as an assumption, you’ll get that out as an answer. Garbage in, garbage out = GIGO. In fact we may be looking at GIGO from LIGO. ;'p


How are (landing) doors kept open in Star Wars?

My question is a possible duplication but I am trying to be specific from this question ""   My question is when space ships are docking into big stations like the Death Star, the doors/hanger are open how is this possible in space? They have open doors of the atmosphere and no one is forced out?  See picture for example


What's the term for when you replace "http://" with "myapp://" and have it open an external app?

Sites like Steam and Rhapsody use steam://xxx and rhapsody://xxx in web pages, and when you click on them they cause specific actions in their (locally installed) client applications.  I would like to do this for something I'm working on and I just don't know what the search term is so it's hard to get started. What is this called?


Add ebd. if there are several quotation from the same author

I am using Biblatex and Historische Zeitschrift style. Its a great style and I am happy with it but there is one small change I would like to make and its connected with citing different books from the same author. If I cite 3 books from the same author this is what I get in the footnote:        Cf. William Welsington, An Introduction to LaTeX. Bd. 47. (Latex Guides.) Berlin/New York 1997, P. 82.   Cf. William Welsington, An Introduction to Bibtexf. Bd. 48. (Latex Guides.) Berlin/New York 1998, P. 5.   Cf. William Welsington, An Introduction to Biblatex. Bd. 449. (Latex Guides.) Berlin/New York 1999, P. 13.      I would like to get this instead:        Cf. William Welsington, An Introduction to LaTeX. Bd. 47. (Latex Guides.) Berlin/New York 1997, P. 82.   Cf. ebd., An Introduction to Bibtexf. Bd. 48. (Latex Guides.) Berlin/New York 1998, P. 5.   Cf. ebd., An Introduction to Biblatex. Bd. 449. (Latex Guides.) Berlin/New York 1999, P. 13.      Does anyone know how to achieve this?  Thanks in advance for your answers!  Here is my MWE:  \documentclass[a4paper,11pt]{scrartcl} \usepackage[latin1]{inputenc} \usepackage{csquotes} \usepackage{blindtext} \usepackage{filecontents} \begin{filecontents}{\jobname.bib}  @book{welsington1997,     Address = {Berlin/New York},     Author = {William Welsington},     Title = {An Introduction to LaTeX},     Publisher = {Oxford University Press},     Series = {Latex Guides},     Shortauthor = {Wel.},     Shorttitle = {Intr.},     Volume = {47},     Year = {1997}} @book{welsington1998,     Address = {Berlin/New York},     Author = {William Welsington},     Title = {An Introduction to Bibtexf},     Publisher = {Oxford University Press},     Series = {Latex Guides},     Shortauthor = {Wel.},     Shorttitle = {Intr.},     Volume = {48},     Year = {1998}} @book{welsington1999,     Address = {Berlin/New York},     Author = {William Welsington},     Title = {An Introduction to Biblatex},     Publisher = {Oxford University Press},     Series = {Latex Guides},     Shortauthor = {Wel.},     Shorttitle = {Intr.},     Volume = {449},     Year = {1999}} \end{filecontents}  \usepackage[ngerman]{babel} \usepackage[style=historische-zeitschrift, maxnames=2, hyperref=true, backref=true, backrefstyle=none, backend=bibtex]{biblatex} \bibliography{\jobname}  \begin{document} \blindtext\footcite[Cf.][P. 82]{welsington1997} \blindtext\footcite[Cf.][P. 5]{welsington1998} \blindtext\footcite[Cf.][P. 13]{welsington1999} \printbibliography  \end{document}


Prove that the only eigenvalue of a nilpotent operator is 0?

I need to prove that:      if a linear operator $\phi : V \rightarrow V$ on a vector space is nilpotent, then its only eigenvalue is $0$.   I know how to prove that this for a nilpotent matrix, but I'm not sure in the case of an operator. How would I be able to relate $\phi$ to a matrix?  Note: A nilpotent operator $\phi$ has been defined as an operator that satisfies $\phi^{n} = 0$ for some $n \geq 1$.


8 GB RAM installed, only 7.5 GB usable. Windows 7 64-bit

I just upgraded my computer's RAM, adding another 4 GB to the computer.  Windows 7 acknowledges that 8 GB is installed, but says only 7.5 GB is accessible.  Any idea why? I thought since I had the 64-bit Professional version this wouldn't be an issue.


Disable upstream response buffering nginx

Nginx keeps logging below message on my error log  [warn] 16387#16387: *1117 an upstream response is buffered to a temporary file /var/cache/nginx/fastcgi_temp/1/32/0000000321 while reading upstream, client: 173.245.54.175, server:  this fills up my log files , i want to disable buffering completely , i've tried turning proxy_buffering proxy_buffering off; but the logs keeps showing that nginx/fastcgi is buffering responses How do i turn off buffering all together ?


SQL Server 2005 database log size increasing drastically?

My friend works in a company (pretty small in size) that is running SagePro ERP which has a SQL server 2005 database. Now the problem is, the database size (over the period of 7 years) has increased to 9 GB which is nothing really but the log file of the database is increasing drastically day by day and has now reached 124 GB.  He is worried that eventually their server might run out of storage if the log size keeps increasing. Upon googling, I found the "shrinkfile" method.    The question is why is the log file keeps increasing? How do I stop it? is "ShrinkFile" method the best method (I believe its not a permanent solution)?  P.S. They daily take full back-up of database.


Deciding which server best for geospatial data servicing?

I want to serve both vector and raster data sets of large volume (ex: for a country).  Right now I'm using GeoServer for vector and MapServer for raster.   Is there any literature or reference such that which server is better for servicng vector data and raster datasets?   I got some reference from  and .


Is our genome decaying (see "Genetic Entropy"), and, if so, is this evidence for our genome being "young"?

In the book Genetic Entropy & the Mystery of the Genome the author says that the genome cannot be old because the genome is "decaying". Decay is a very subjective term, but in this case he means that the fitness of humans is going down not up. Is it true that our genome is decaying over time, and that the fitness of humans is decreasing? Here is a quote from the book, that might explain his argument:      Kondrashov, an evolutionist who is an expert on this subject, has advised me that virtually all the human geneticists he knows agree that man is degenerating genetically. The most definitive findings were published in 2010 in the Proceedings of the National Academy of Science by Lynch.4 That paper indicates human fitness is declining at 3–5% per generation.There is really no debate on current human genetic degeneration.   Perhaps this more shines more enlightenment in my question. This idea of human fitness going "down" is my main concern. Essentially, in his book he claims that because we are going "down" (meaning fitness is declining) not "up" (whatever that means) our genome must therefore be young. If I understand the issue correctly, mutations "create new information" by creating different proteins or leading to an abnormal protein products. However, I thought that the force of natural selection should be strong enough to get a rid of those genes that are so and so responsible for our fitness declining.    Feel free to point me to similar questions that may been helpful or are similar to this one.


I have an Android phone and I recently downloaded the Pokemon Go app. Every time I open the app and get to the start screen where it shows the picture of Gyarados the pop-up box comes up and asks that the user be aware of their surroundings. Everytime I click the okay box, the app freezes up a little bit and goes back to the home screen on its own without me doing anything. None of the people I have talked to have had this issue. I'm just wondering if there's an issue with my app, my phone, or if it's just the servers?


Why does Captain Antilles in a New Hope say they're on a diplomatic mission?

Given the ending of Rogue One...      ...it is obvious that the Imperials and Vader know that the Tantive IV ship was just engaged in a rebellion battle.   Therefore why does Captain Antilles, while getting choked by Darth Vader, say:     We intercepted no transmissions. ... This is a consular ship. We're on a diplomatic mission.   Why would he say such an obviously false lie? Especially when it is his last words?


C# How to catch empty rows in a CSV file using CSVReader?

I'm using C# 2005 and the CSVreader class, all works well apart from when the CSV file contains an empty row at the end:  Example:  1,2,3,4,5 2,3,5,6,7 ,,,,   My program errors as there are no values here, the problem is that not all columns are contain a value so the 2 rows below would be valid.  1,2,,4,5 2,,5,6,7   but an empty row such containing ,,,, would not. A final hurdle is I don't know for sure how many columns there will be.  How would you suggest I test for an empty row?


I need to show proof that r^2 is equal to R^2 given the defined r is the sample correlation between two vectors x and y.


Equivalence of convergence in products of sequences.

Let $\{x_{n}\}_{n \in \mathbb{N}}$ and $\{y_{n}\}_{n \in \mathbb{N}}$ be two convergent sequences.  I am trying to show that  \begin{align} \lim_{n \rightarrow \infty} \frac{1}{n+1}\sum_{k = 0}^{n} x_{k}y_{n - k} &= \left(\lim_{n \rightarrow \infty} x_{n}\right)\left(\lim_{n \rightarrow \infty} y_{n}\right). \end{align}  I think I just need some fancy application of summation by parts but I haven't quite figured it out yet.


Proving by strong induction that $\forall n \ge 2, \;\forall d \ge 2 : d \mid n(n+1)(n+2)...(n+d-1) $

I'm trying to prove by induction the following statement without success: $$\forall n \ge 2, \;\forall d \ge 2 : d \mid n(n+1)(n+2)...(n+d-1) $$  For the base case: $n = 2$, $d = 2$ $2\mid 2(2+1)$ which is true.  Now, the confusion begins! I assume I would need to use the second induction principle to proof this because $P(n)$ and $P(n+1)$ are not related at all. It is also the first time I am dealing with more than one variable so it makes it harder for me.  I tried the following: - Trying to prove by simple induction. I did not go very far. - Trying to split my induction step in 2 parts: If $d\mid n$, I'm done.   If $d$ does not divide $n$, then I would need to do a second proof and this is where I'm blocked.  Anyone could tell me what's wrong in the approach I take to solve this problem?  Any help would be appreciated!


I am having problems with the su command. I know my password and I am typing it correctly but su indicates authentication failure.  So I checked on the internet and then went into recovery mode and changed my username's password to what I was entering before.  Even now entering the same password on su gives me authentication failure.  Please suggest what am I doing wrong??


Unable to center align two divs on a page

I'm having some difficulty aligning two divs in the center of a page. Instead, it remains left. I've combed through this site, and others, and have tried several of the suggestions. I am thinking maybe I've bungled it by taking from several different examples and putting it to one, and something is negating the other? The divs just aren't aligning center on the page. I have the masking gif in one div, and the writing in another div, and placed those two divs within a container.    body {   background-color: #000;   color: white;   font-family: "Cutive One", monospace;   font-size: 13px;   text-align: justify;   line-height: 1.5; }  .container {   margin: 70px;   width: auto; }  .one {   width: 35%;   max-width: 300px;   min-width: 300px;   padding: 5px;   text-align: center;   float: left; }  .two {   width: 35%;   padding: 5%;   max-width: 300px;   min-width: 300px;   float: left;   background: black;   font-family: "Cutive One", monospace;   font-size: 13px;   text-align: justify;   line-height: 1.5; }  .gif {   background: url("http://78.media.tumblr.com/072a9aee9e56415e20ffd06c3260c49d/tumblr_n85ga7OASY1qmxnvuo2_500.gif") repeat;   background-position: 10px;   -webkit-background-clip: text;   color: transparent;   font-size: 200px;   font-family: Fjalla One;   font-weight: bold;   text-align: center;   letter-spacing: 3;   background-position-x: 50%;   background-position-y: 50%; }

TXT

Test //

Test

Test

Test


The older apprentices in my company use "this." a lot.  Two weeks ago I started coding object-oriented and still don't get for what it is being used.


I need to count all orders that have a datediff  <= 1. I use the COALESCE function, because sometimes the Date1 can be null.   SELECT COUNT(*) FROM Orders WHERE DATEDIFF(dd,COALESCE(Date1, Date2),Date0) <= 1   Is there a way I can count only the business days (Mon-Fri)?  Thanks.


L versus LL in British versus US English

Possible Duplicate:          Is there any guidance on the usage of doubled consonants, particularly L, in British versus US English? For example 'Travelled' v. 'Traveled', 'Cancelled' v. 'Canceled', but then 'Enrolment' v. 'Enrollment'. Then there's 'Travelling' v. 'Traveling' etc.  In each case I've put what I consider to be the British standard first.  Just wondering if there's any consistency, for example 'in present and past participles ending in L the British usage is to add a second L'?


Does changing the password for Apple ID make iCloud and Find My iPhone stop working?

My phone has recently been stolen. I have been trying to locate it. I had previously set up the Find My iPhone app and after the theft, I have changed all my iCloud and Gmail passwords.  Can the person with my iPhone change it over to his iCloud account so that the Find My iPhone app won't work for me?


I want to delete the selected element in an array in java, for example deleting 3,5,8 in   int[]={3,2,5,6,4,8,9}


PDO query method with bindValue() seems not to be working

It never works. And when I do a var dump on the sql query I see that the question marks are still in it. Which means that the values have not been binded right?  I don't understand why it's not binding the values.  Can anybody help me out?  PHP  $ruleValue = "value1"; $input = "value2"; $inputValue = "value3";  $this->_db->query('SELECT * FROM ? WHERE ? = ?', array($ruleValue, $input, $inputValue));   Method  public function query($sql, $params = array()) {     $this->_error = false;      if($this->_query = $this->_pdo->prepare($sql)) {         $x = 1;         if(count($params)) {             foreach($params as $param) {                 $this->_query->bindValue($x, $param);                 $x++;             }         }          if($this->_query->execute()) {             $this->_results = $this->_query->fetchAll(PDO::FETCH_OBJ);             $this->_count = $this->_query->rowCount();         } else {             $this->_error = true;         }         var_dump($this->_query);     }      return $this; }   var_dump  object(PDOStatement)#5 (1) { ["queryString"]=> string(27) "SELECT * FROM ? WHERE ? = ?" }


Any idea why it is said that, if electron is a particle it'll spiral into the nucleus and disintegrate in 10^-14 seconds?   to


Making text difficult (but not impossible) to read?

I'm making a file of exercises, and I occasionally leave hints next to some of the problems.  The issue is that if the hint follows directly after the problem, I find myself immediately and unconsciously jumping to the hint without thinking about the problem first.    In order to prevent myself from doing this, I was hoping there'd be a good way to make the text just hard enough to read that I wouldn't be able to do this unconscious jumping.  Ideally I would be able to click a "Hint" button which would show the hint, but more realistically I think doing something like flipping the text of the hint upside down would do the job.  Of course, there's probably other reasonable solutions to my problem which I'd be more than happy to hear as well!


What encryption is used in a default Ubuntu full hard drive encryption and is it possible to specify another?


symbolic links that will not break even after copying

I want to create a symbolic link which will not break even after copying the entire directory( which includes the link and its target) in a pendrive/sd-card and using the pendrive/sd-card in other system.  For ex:   S70pppd-dns -> ../init.d/pppd-dns    S77hello_init -> /home/silviya/package/rootfs/etc/init.d/hello_init     Here, the link for hello_init is created by me, other one is there by default. How can I create the symbolic link as shown below ?? S70hello_init -> ../init.d/hello_init    NOTE: I created the link using the command:   ln -s 'target_file' 'symbolic_link'


I'm not sure whether to put is (number agreeing with the singular her whole family) or are (number agreeing with plural biologists) in this sentence:     Her whole family is/are biologists.     After some more searching, it seems to make it correct, the whole would need to be removed.  Based on , I think "Her family are biologists." is technically correct but "All of her family are biologists sounds better."  Still not certain.


Find $\displaystyle\int_0^\infty\frac{\sin^4x}{x^4}$ using the fact that $\displaystyle\int_0^\infty\frac{\sin^2x}{x^2} = \frac{\pi}{2}$. The graph of $\dfrac{\sin^4x}{x^4}$ was also given, I tried to integrate by parts repeatedly but it got too messy and confusing. Is there a clever way around this?


I've voted $q$ times on questions and $a$ times on answers?

Of the votes cast, 45 were up-votes and 25 were down-votes. Undo voted on questions $q$ times and $a$ times on answers.   Seen on the mobile site; on the overview of my profile.   Pretty self-explanatory. It's borked!


Why is this user's profile picture served from a facebook server? (fbcdn.net)

While looking at a question, I noticed that the asker's profile photo didn't load. So, I opened the image in a new tab and noticed it was hosted at fbcdn.net.  Turns out my browser had blocked the image from loading on the SE because it was considered a tracker. (it loads fine when opened in its own tab)  I don't meant to single out this user in particular, but it's the only time I've seen something like this on the site.  Here's the  () and the  ().   How did this image get added to this user's profile? (I can't seem to find the add-facebook-image button in my profile) Can I make my profile image one that's hosted on a remote server? Was I warned about SE sending data to third parties and just missed it while signing up?


Simply as the title says. I've done some research, but still haven't arrived at an answer I am satisfied with. I know the answer varies in different fields, but in general, why would someone study linear algebra?


a. My cousins who have cars like the new regulation. Can I use use (a) if all my cousins who are car-owners own one car each?  b. My cousins who have a car like the new regulation. Can I use (b) if all of my cousins who are car-owners have more than one car each? Can I use (b) if some of my cousins who are car-owners have more than one car each?


Can you combined two sources with difference variance to reduce error?

I have two samples of data each estimates of a position x, y with Gaussian noise. One source has a larger variance than the other. Is this source in any way useful in providing a better estimate of the true position than the source with lower variance or should it just be discounted?


How can i enlarge icon in browse menu? When i want to upload some pictures to sites, and when a window opens for finding and selection images, icons are to small, i need to enlarge them so i can see pictures right away (dont want to click on every one to see preview). See image attached.


Let, $f(z)$ be an analytic function. Then the value of $$\int_{0}^{2\pi}f\bigl(e^{it}\bigr)\cos t dt= ?$$ (a) 0 (b) $2\pi f(0)$ (c)  $2\pi f'(0)$ (d)  $\pi f(0)$. $\mathcal{My}{Attemt}:$  First I put $e^{it}=z$. Then integration becomes $$\int_{|z|=1}f(z)\frac{z+z^{-1}}{2}\frac{dz}{iz}$$ $$=\frac{1}{2i}\int_{|z|=1}\frac{f(z)(z^{2}+1)}{z^{2}}dz$$ $$\frac{1}{2i}2\pi if'(0)=\pi f'(0)$$  But the answer does not match any option. Where my mistake??


Add packages to Ubuntu Distro installation

I wanna create small change to Ubuntu Install CD. I want to add a few packages so when Ubuntu is installing, those packages also would be installed. So I wondering if it has some maybe post-installation script?  All this just for personal use. I need to install same software on about 30 computer and I want to automate this process as possible.  Thanks


I'm thinking of getting the 2018 mac mini(32 gb of ram) with 3 monitors, one 32 4k, the second 27" HD(1920) and the third 23" (1920), it will be possible without lag and an external egpu?


I write a base class and two derived classes:  class Base     {         public virtual void fn()         {             Console.WriteLine("base fn");         }     }  class Derived1 : Base     {         public override void fn()         {             Console.WriteLine("derived1 fn");         }     }  class Derived2 : Derived1     {         public new void fn()         {             Console.WriteLine("derived2 fn");         }     }   then create an instance of derived2, referenced by a Base variable. Then call the fn() method:  class Program     {         static void Main(string[] args)         {             Base b = new Derived2();             b.fn();             Console.Read();         }     }   the result is that the fn() of Derived1 Class is called.  As far as I know, if a virtual method is called, CLR will look for the method in the method table of the runtime type, which is Derived2; if a non-virtual method is called, ClR will look for it in the method table of the variable type which is Base. But why it calls the method of Derived1?  The Answer "Because Derived1 overrides the fn() of Base" is not enough to clarify my puzzle. Please give me more detail.


Key binding in Python Turtle Graphics succeeds as individual statements, fails in a loop

I am writing a subclass of Turtle to make it simulate a typewriter.  The following code works fine, and types the letters "a" through "e" on the screen, when the user presses them. from turtle import *  class TypewriterTurtle(Turtle):      def __init__(self):         super().__init__()         self.getscreen().listen()                             self.getscreen().onkey(lambda: self.typeLetter("a"), "a")         self.getscreen().onkey(lambda: self.typeLetter("b"), "b")         self.getscreen().onkey(lambda: self.typeLetter("c"), "c")         self.getscreen().onkey(lambda: self.typeLetter("d"), "d")         self.getscreen().onkey(lambda: self.typeLetter("e"), "e")          self.getscreen().onclick(self.goto)         self.up()          def typeLetter(self, ch):         self.write(ch, font = ("Arial", 32))         self.goto(self.xcor()+20, self.ycor())  tt = TypewriterTurtle()  However, to make this code more clean (and easier to extend to 26 letters), I tried writing it using a loop instead, as shown. from turtle import *  class TypewriterTurtle(Turtle):      def __init__(self):         super().__init__()         self.getscreen().listen()          for ch in "abcde":              self.getscreen().onkey(lambda: self.typeLetter(ch),ch)          self.getscreen().onclick(self.goto)         self.up()          def typeLetter(self, ch):         self.write(ch, font = ("Arial", 32))         self.goto(self.xcor()+20, self.ycor())  tt = TypewriterTurtle()  only to discover that all five keys "a" through "e" now print "e" on the screen when pressed. Why does this behavior occur?  And is there a good way to fix it, while still keeping the loop for the binding statements? UPDATE:  This  answered my question!  In the second example, I wrote this line of code instead: self.getscreen().onkey(lambda ch=ch: self.typeLetter(ch),ch)  which worked the way I wanted it to.  But now I have another question:  Why does the local variable created also have to be named ch?  When I wrote this instead: self.getscreen().onkey(lambda n = ch: self.typeLetter(n),n)  I got the error "name 'n' is not defined."  But in the examples I saw online, it seemed to be OK to use a different variable name.


I'm having some problem with my mac (MacBook Pro (Retina, 15-inch, Late 2013)). I freed some spaces by deleting some folders but when I analyse mac HD I get the following:  Available: 79.29 GB (44.52 GB purgeable)   Installing windows 10 on bootcamp still returns the error "not enough space" so I started looking at tutorials on how to get rid of that "purgeable" space. I have tried everything, enabling store optimisation, apple cloud, disabling everything, nothing worked.  I stumble upon a tutorial that suggested to create fake files to fill the hard disk and then remove them (with iCloud disabled).  The problem is that the command suggested in the tutorial:  mkfile -n 10g ./test   Doens't work, it creates a file, but if I analyse the file:  Size: 10,737,418,240 bytes (4 KB on disk)   So it should occupy 10 gigs but in reality it occupies almost no space at all.   What can I do to get rid of that space?


How can I create an instance of an arbitrary Array type at runtime?

I'm trying to deserialize an array of an type unknown at compile time. At runtime I've discovered the type, but I don't know how to create an instance.  Something like:  Object o = Activator.CreateInstance(type);   which doesn't work because there is no parameterless constructor, Array doesn't seem to have any constructor.


Set Header Spacing Not Aligning with Data

System.out.printf(currForm.format(monthPay) + "        ");  I am trying to figure out how to format this code so that it aligns with the header which is outside this output. image of what the code appears as:  Basically the user controls the all the inputs, so I am trying to do my best to accommodate 3 and 4 digit monthly payment amounts and their spacing. As you can see, the column allignment gets progressively more misaligned from the header as we get into the more right columns. I also did use "\t" but a difference between the 3 and 4 digit monthly payments makes major alignment issues. Thanks!


os.system unable to call file with left parenthesis '(' in filename

I'm trying to call an executable that has parentheses in the name (e.g. 'test(1).exe').  With Python 3.6.2, when I try the following:  os.system('test(1).exe')   I get:  'test' is not recognized as an internal or external command, operable program or batch file.  But if I change the filename to 'test1).exe' by removing '(', then the following works successfully:  os.system('test1).exe')   Any ideas why the left parenthesis is causing an issue with os.system?


Why must parameters for inner macro definitions double each #?

Or "When would an expression like ###1 be useful?"  In macro programming, it's a well-known rule that you need to double your parameter identifiers with each successive layer:  \def\insult#1#2{%   #1 says #2 is a quack.%   \def\response##1##2{%     #2 refutes #1's claim, saying, ``#1 is a ##1 ##2''.     \def\response####1{#1 says,       ``I'm not a ##1 ##2, but a simple ####1.''       (#1 leaves.)}%     Rock on, #2.}}   Why must each layer of definitions double the number of #s necessary?  The only reason I can think of is to allow 'variadic parameter insertion', but this fails on the first case:  \def\use#1#2#3#4#5#6#7#8#9{I want ##1.} \use{3}cbdefghi   obviously does not expand to I want b.  So why is this doubling necessary?


If $a,b,c$ are positive real numbers and $(1+a+b+c)\left(1+\frac{1}{a}+\frac{1}{b}+\frac{1}{c}\right)=16$, then $a+b+c=3$

Let $a,b,c$ be positive real number such that    $$(1+a+b+c)\left(1+\frac{1}{a}+\frac{1}{b}+\frac{1}{c}\right)=16$$   then $a+b+c=3$   I think this is trivial but I don't know how to prove this fact.  Any Help will be appreciated


$\lim_{x\to0}\frac{\sin x-x}{x^3}$ without de l'Hospital's Rule?

I know, how to calculate $$ \lim_{x\to0}\frac{\cos x-1}{x^2} $$ without differential calculus. Calculating $$ \lim_{x\to0}\frac{\sin x-x}{x^3} $$ using de l'Hospital's rule or Taylor expansion is also easy.  Is there a method to calculate the previous limit without de l'Hospital's rule or stronger tools?


can you please tell me how can I execute the following command automatically on startup, instead of having to type it manually each time:  sudo thinkfan -n


(I posted this with my brother's ubuntu computer) Before you start telling me to do stuff take note that I'm twelve so I do not have access to a-lot. My computer has ubuntu 14.04 LTS.   when i use lsusb in the terminal,(I'm only typing the port that has the adapter)  Bus 001 Device 007: ID 0846:9011 NetGear, inc. WNDA3100v2 802.11abgn [Broadcom BCM4323]   anyway I can set this up so I can get a network connection out of it, and keep in mind that I have no internet connection right now


Notation for repeated application of function

If I have the function $f(x)$ and I want to apply it $n$ times, what is the notation to use?  For example, would $f(f(x))$ be $f_2(x)$, $f^2(x)$, or anything less cumbersome than $f(f(x))$? This is important especially since I am trying to couple this with a limit toward infinity.


Is there a command line tool to get the list of content of current kernel used in my Ubuntu?

I am using Ubuntu 18.04 LTS (Bionic Beaver).  by this command   uname -r   I got the version of current kernel used in my Ubuntu.  4.19.0-041900-generic    I would like to know more detail, such as the type of the version of file system, VFS, device drivers, etc contained in the kernel.  Is there a command line tool for that? or I have to check this out on launchpad.net?


How do I create a custom collision map for clickable areas on a map?

Say I had a map like the one displayed above. What would be the best method of creating a collision map for each individual state where I can click individually?


How can I fix the output width using printf?  This is an example script:  #!/bin/bash OK=$(printf '\t%+50s\n' OK) FAIL=$(printf '\t%+50s\n' FAIL) for i in a aa aaa aaaa aaaaaa aaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaa; do         echo "$i $OK" done   Output:  a                                                       OK aa                                                      OK aaa                                                     OK aaaa                                                    OK aaaaaa                                                  OK aaaaaaaaaaaaaaaaa                                                  OK aaaaaaaaaaaaaaaaaaaaaaaaaa                                               OK   I want something like:  a                                                       OK aa                                                      OK aaa                                                     OK aaaa                                                    OK aaaaaa                                                  OK aaaaaaaaaaaaaaaaa                                       OK aaaaaaaaaaaaaaaaaaaaaaaaaa                              OK


Minecraft LAN connecting to server for long time

Whenever I try to play with my frined on LAN we get 2 problems. THe first being that if I  open an LAN world it doesnt even shop up on his server list, The second is when HE opens a world, It shows up but when I try to log in, It displays the message "Connecting to server" for around 20 seconds, then Shows the message "java.net.connectexception.minecraft" Ive tried allowing both computers through the firewall, and we're both playing on the same Wifi. Please help!!


Does an Echo Knight fighter's echo provoke an opportunity attack when it moves? The 's  feature says, in part (EGtW, p. 183; emphasis mine):  At 3rd level, you can use a bonus action to magically manifest an echo of yourself in an unoccupied space you can see within 15 feet of you. This echo is a magical, translucent, gray image of you that lasts until it is destroyed, until you dismiss it as a bonus action, until you manifest another echo, or until you're incapacitated. Your echo has AC 14 + your proficiency bonus, 1 hit point, and immunity to all conditions. If it has to make a saving throw, it uses your saving throw bonus for the roll. It is the same size as you, and it occupies its space. On your turn, you can mentally command the echo to move up to 30 feet in any direction (no action required). If your echo is ever more than 30 feet from you at the end of your turn, it is destroyed.  The rules on  state (emphasis mine):  You can make an opportunity attack when a hostile creature that you can see moves out of your reach. To make the opportunity attack, you use your reaction to make one melee attack against the provoking creature. The attack occurs right before the creature leaves your reach.  The description of the Manifest Echo feature does not state that the echo is a creature, so am I correct to conclude that the echo wouldn't trigger an opportunity attack?


Do I have to pay capital gains tax if proceeds were immediately used for another investment?

Let's suppose one sells an asset for a $200,000 profit after holding it for 10 year but then immediately sinks the entire sale price into another asset. Is one still expected to pay the capital gains tax? What cash is one expected to pay the taxes from? How do tax liabilities work in this scenario?


I understand that [ didn't = did not].  But is it correct to write the following?     Why didn't he come to work?   Why did not he come to work?   And can it be written as follows?     Why he didn't come to work?   Why he did not come to work?    Are both ways correct? Kindly explain a little.


Prob. 18, Chap. 2 in Baby Rudin: Any non-empty perfect set of real numbers which contains no rationals?

Here's Prob. 18 in the Exercises after Chapter 2 in the book Principles of Mathematical Analysis by Walter Rudin, 3rd edition.      Is there a non-empty perfect set in $\mathbb{R}^1$ which contains no rational number?   Here's Definition 2.18 (h) in Baby Rudin.      Let $X$ be a metric space. A subset $E$ of $X$ is said to be perfect if $E$ is closed and if every point of $E$ is a limit point of $E$.    And, here's Definition 2.18 (d) in Rudin.      Let $X$ be a metric space. A subset $E$ of $X$ is said to be closed if every limit point of $E$ is a point of $E$.    Moreover, I know that the Cantor set --- discussed in 2.44 in Rudin --- is an example of a perfect set in $\mathbb{R}^1$ which contains no segment (i.e. no open interval).   Of course, any non-empty perfect set in a metric space must necessarily be infinite.   How to go about finding an answer to Rudin's question?


Is this set countable? (intervals in $\mathbb{R}$)

A set consists of intervals in $\mathbb{R}$. They have no intersection, their starting point and end point can be any numbers(not limited to rational number), and the union all intervals should cover all real numbers. For example, the first interval is $[0,1)$ then the next interval can be $[1,6)$, but not $[0.5,2)$. How many such intervals? Is it countable infinity?