I made a post earlier about this but apparently there weren't enough details and i didn't explain it well enough so i will try this again:  I have a circuit which runs on intervals of 0.75 seconds on/off. (for example, if i had a lightswitch/lightbulb, i turn the lightswitch on, but the bulb goes on for 0.75s then turns off for 0.75s then turns on for 0.75s etc. etc. for the entire time that the lightswitch is turned on, when the lightswitch is off, the bulb is constantly off)  This circuit (when on) runs at 12V and when i had the multimeter set to the 10A setting, it showed 0.07, so I'm guessing thats 0.07A?  This circuit is being connected to the signal coil on a relay.  This relay coil says on it 12VDC, when checking with a multimeter on the 2k ohm setting it showed 270, guessing thats 270 ohms?.  I checked with an adjustable power source and the minimum voltage that activated the coil was 6V, although it could only jump from 4.5V to 6V so that was the smallest it would switch at.  What I am trying to do is install a capacitor before the relay, so that during that 0.75 seconds of off, the capacitor discharges at a minimum 6V.  so my current problem is that if i just install that relay directly into that intermittent wire, the relay switches on/off at the same time as that wire, I need it to stay on.  To make a comparison: this circuit is kind of like the signal lights on your car, they blink on/off/on/off with some unknown time interval. Say you had a light that is able to work at 6V but typically works at 12V. I am trying to install a capacitor, so that when you turn the switch on (by your steering wheel) that light would be constantly on for the entire duration that the switch is turned on. instead of blinking on/off/on/off.

I’m looking to install a capacitor in a circuit which runs at 12V and <10A, and I want it to discharge in about 3 seconds.   The discharge voltage isn’t too important, but it’s probably best if it is as high as possible (not higher than 12V if that is even possible) for those 3 seconds.  The discharge time can be longer but probably should have an absolute minimum of 1.5 seconds.   Sorry if this sounds like gibberish. If I'm not giving enough info, please let me know what else i need to provide. I’m not an electrical guy; just working on a project and have no clue what I'm doing.


I have a laptop with Ubuntu installed and used the "Erase disk and install Ubuntu" option which means my system now only has 2 partitions: main and swap partition.   Now I need to install a new system,but want to keep some important data. I think the solution is creating a new partition a copy important data into that partition. But I don't know exactly what to do because I am new to Linux.

I want to reinstall Ubuntu keeping my data intact. I have 160 GB hardrive (sata or pata I don't know but it's slim and made in China) with a 40 GB ext3 partition, a 4GB swap memory and 3 other partition with a FAT32 file system. I have around 4GB space on my drive where Linux is installed.  I'd like to keep the data intact, especially the Downloads folder, desktop, and /var/www; And I no longer have access to any other machines or external storage devices.


I installed Ubuntu 16.04 LTS on my laptop about a month ago. The laptop has a 500Gb HD (483.9 actually shows up). I’ve applied all the updates (security, etc.), and as of today, I can no longer install updates. In searching for a way to make room, I’ve noticed that I cannot get any usable information on the HD, as I can with Mac and Windows. I cannot see how much of the HD is used, and how much is unused. Also, I cannot see how many backups have been archived (I’d like to remove the oldest ones to make room). What am I to do?

Is there a way to quickly check the amount of free / used disk space in Ubuntu?  I would assume you could right click on 'file system' in the file browser and choose 'properties' or something but there is no such option.


My hard disk drive stopped working. I have bought an external SATA to USB adapter and I have connected it and the disk makes noise and starts to spin. Nothing seems to be out of the ordinary. The computer detects it and opens the folder with the explorer, but instantly it stops working and does not detect it again until I disconnect and connect it again. What can the problem be? I’ve tried to put it in the fridge. Should I open it?

What steps can I take to try to recover lost or inaccessible data from any storage device?  Answers:   This applies to any computer storage device, e.g. internal/external hard drives, USB sticks, flash memory. The most important thing is to STOP using it, any type of I/O can ruin your chances of a recovery.     We have separate questions covering common problems with USB flash drives in greater detail:


In news reports, we often read or hear events introduced with the present perfect, and then the past simple like this:     The film star Jim Cooper has died of cancer. He was 68 and lived in Texas.   What's wrong if we use both first and second sentence in past simple?     The film star Jim Cooper died of cancer. He was 68 and lived in Texas.

To me, using Present Perfect form means the event can occur again. So, saying      someone has died   may not be grammatically correct.  Also, I noticed (it might be just coincidence):     passed away   is used more often than     has passed away   Is using Present Perfect correct here?


While repairing my soldering iron I damaged a resistor. I need to know the value of this resistor. How can I find the value from its colour code?

I have trouble with finding out resistance of a resistor. It has 5 bands but somehow I cant get the code right.


I find it very easy to screw up references.  Maybe I spelt a bibtex key wrong, or I updated the key for some reason (not knowing it was in use), or I put a space in the citation (\cite(a,b) vs \cite{a,b}). Or I decide to remove the entire section that I cross reffed elsewhere with \ref, but forgot to delete the reference to it. Or i forgot to compile the bibliography.  In these cases the output will normally contain a ? in the place of the reference.  Because I have become too close to being burnt by this before (After submitting an article, only realizing on "one final last minute check" that in my last revision I had broken something,.) I now make a habit of doing a Ctrl+F for ? to make sure there are none where they are not expected.  But ? is not a rare character in my documents, it likely occurs 2-5 times intentionally. It is quiet common in paper titles; and some times verious math symbols \star will be considered to be ? when I do a search.  I would much rather the output for a broken reference be something else. For example, !!BORKED!! that I could more easily search for and spot.  NB: a solution involving Biblatex rather than Bibtex would not be suitable. One of the main things that causes this for me is switching from BibLaTeX, to BibTex. BibLaTeX is always happy with spaces in \cite{a, b}; bibtex, not so much.

When a reference is undefined, LaTeX shows simply [??] which doesn't give much information. I would like it to show the label instead. This is useful when more collaborators work on the same preprint and the references are yet to be done.  I'm using neither biblatex nor natbib. I do use bibtex but it is irrelevant for this question.  MWE:  \documentclass{article}  \begin{document}  This: \cite{undef} should look like: [{\bfseries ?? undef}]  \end{document}


I need to do select data from a table based on some kind of priority like so:  select product, price from table1 where project = 1  -- pseudo: if no price found, do this: select product, price from table1 where customer = 2  -- pseudo: if still no price found, do this: select product, price from table1 where company = 3   That is, if I found 3 products with prices based on project = X, I don't want to select on customer = Y. I just want to return the resulting 3 rows and be done.  How are you supposed to do stuff like this in SQL? Use some kind of CASE-statement for the pseudo-if's? Do a union or some other smart thing?  Edit: I'm using MS SQL.  Thanks!

How do I perform an IF...THEN in an SQL SELECT statement?  For example:  SELECT IF(Obsolete = 'N' OR InStock = 'Y' ? 1 : 0) AS Saleable, * FROM Product


I want to rotate a sprite so that it faces the mouse cursor/screen touch location. Currently I'm using the following method to compute the angle of rotation. The input position is the target point the sprite must face:  - (void) moveToPosition: (CGPoint)pos {     moveTarget = pos;     const float targetX = (moveTarget.x - self.position.x);     const float targetY = (moveTarget.y - self.position.y);     const float angle   = atan2(targetX, targetY);     targetAngle = ClampF(CC_RADIANS_TO_DEGREES(angle), -180.0f, 180.0f); }   Then in the update method, which is called every frame, I do a linear interpolation between the target angle and the current, to ensure a smooth rotation:  - (void) update {     const float currentAngle = self.rotation;     if (currentAngle != targetAngle)     {         const float newAngle = LerpF(currentAngle, targetAngle, [self getTurnSpeed] * Time.deltaTime);         self.rotation = newAngle;     } }   This setup works OK, except when the target angle gets close to 180/-180 degrees. When it gets there the sprite just spins the whole way around in a very wacky manner. I've recorded a  to illustrate.  Which would be the best way to handle these cases, when the angle wraps, and fix this weird spin effect caused by it?

I'm trying to make the joint rotate smoothly around the center of the canvas, toward the angle of mouse pointer. What I have works, but I want it to animate the shortest distance possible to get to the mouse angle. The problem occurs when the value loops around at the horizontal line (3.14 and -3.14). Mouseover that area to see how the direction switches and it takes the long way back around.  Relevant Code   // ease the current angle to the target angle joint.angle += ( joint.targetAngle - joint.angle ) * 0.1;  // get angle from joint to mouse var dx = e.clientX - joint.x,     dy = e.clientY - joint.y;   joint.targetAngle = Math.atan2( dy, dx );   How can I make it rotate the shortest distance, even "across the gap"?


I'm trying to install ubuntu on my chromebook (acer 720) using the codestarter script here .   It seems to be stalling on the portion of the install script that has to do with installing updates.  I see the message "Installing updates..." from the script but then nothing happens after that.  log_msg "INFO" "Installing updates..." run_command_chroot "export DEBIAN_FRONTEND=noninteractive; apt-get -y -q update" run_command_chroot "export DEBIAN_FRONTEND=noninteractive; apt-get -y -q upgrade"   As near as I can tell from the chrome task manager nothing is happening - no network activity and almost no cpu use.  Advice on how to proceed?

I have installed Ubuntu 13.04 on my desktop (runs like a charm). Then I used Crouton to install Ubuntu 12. 04 on my chromebook samsung (ARM). It also works quite well.  Here comes my question. Can we have a true Ubuntu (preferably 13.04) on my ARM chromebook?  It seems that the Crouton/Ubuntu is not 100% the real thing.  The best option would be to have the full Ubuntu 13.04 and remove the Chrome OS.


I'm interested in learning IOS programming but at the moment i do not have access to a Macintosh system. Just wondering if there is an equivalent of IOS SDK for Windows? I do have an iphone though :)

Is there any way to tinker with the iPhone SDK on a Windows machine? Are there plans for an iPhone SDK version for Windows?  The only other way I can think of doing this is to run a Mac VM image on a VMWare server running on Windows, although I'm not too sure how legal this is.


If $x_1,x_2,\dots,x_n$ are positive real numbers and  if $x_1x_2\dots x_n=1$ then $x_1 + x_2 + \dots + x_n\ge n$   There is a step in which I am confuse. My proof is as follows (it must be proven using induction).  By induction, for $n=1$ then $x_1=1$ and certainly $x_1\ge1$. Suppose $x_1 + x_2+\dots+x_n\ge n$ (does this mean that $x_1x_2\dots x_n = 1$ also hold?) and $x_1x_2\dots x_n x_{n+1} = 1$ hold. Then  \begin{align} x_1 + x_2 + \dots+x_n+x_{n+1} &\ge n + x_{n+1} \\                               &=n+2-1/x_{n+1} \\                               &=n+2-x_1x_2\dots x_n. \end{align}  My problem is in the last step. As I wrote before, I don't think $x_1x_2\dots x_n = 1$  should hold, because if this is the case then $x_{n+1}=1$.  EDIT:  In the itermediate step I used that $x + 1/x \ge 2$, where $x>0$.

Suppose $x_1, \dots, x_n$ are positive real numbers such that $x_1 \cdot \ldots \cdot x_n = 1$. Prove $x_1 + \dots + x_n \ge n$.    I don't want to use the AM-GM inequality to prove this (from which this statement would follow).   I suppose induction is the way to go. The base case is true. The case for $n=2$ is true by  $$x_1 + x+2 - 2 \sqrt{x_1 x_2} = (\sqrt{x_1} - \sqrt{x_n})^2 \ge 0.$$  Now suppose the statement holds for $n$, then $$x_1 \cdot \ldots \cdot x_n = 1 \implies x_1 + \dots + x_n \ge n.$$  So if $x_1 \cdot \ldots \cdot (x_n x_{n+1}) = 1$, then  $$ x_1 + \dots + x_n x_{n+1} \ge n. $$  Then we also have $$ x_1 + \dots + x_{n-1} + x_n + x_{n+1}  \ge n - x_{n}x_{n+1} + x_n + x_{n+1}. $$  Now I'm not sure where else to go from here.


Both The Illusionist and The Prestige are about turn of the century performing magicians, and were released not even two months apart from each other; the former was released September 1st, 2006, and the latter on October 20th, 2006. The fact that they're both about turn of the century magicians -- and that there really aren't any other movies in 2006 that use this general plot -- it strikes me as somewhat unique that these two movies were created and released so close in time to one another. When looking to directors/production crews for similarities, I'm not able to find anything that stands out.. The Illusionist:  Bull's Eye Entertainment Bob Yari Productions Contagious Entertainment Michael London Productions Stillking Films  The Prestige:  Touchstone Pictures (presents) Warner Bros. (presents) Newmarket Productions (as Newmarket Films) Syncopy  So, how/why did these two magician films get created and released at nearly the same time? Is this purely coincidence (in which case, that's a perfectly acceptable answer), or, are these movies related in some way? Perhaps, one inspired the other, or, they were apart of a larger "movement/release" of magician films that didn't really take?

Everybody perhaps knows of Jon Favreau's movie  which is going to be released in 2016. But quite recently I learned (and to my utter surprise) that another Jungle book movie is coming in 2017 and it's called .   Now, this movie has big names too with Christian Bale as Baghera, Benedict Cumberbatch as Sher Khan, Cate Blanchett as Kaa and a young Indian boy in the live action role as Mowgli.   How often does this happen, with two big productions with big cast making a movie on the same subject? I want to ask why this is happening and if there are any really significant differences between the two (apart from the cast, of course).


I am working on a big project and have done a few drawings but I am noticing some weird stuff with my strokes and I just wanted to check if it is normal and just something that I am seeing on my screen but want show when printed.  You can see as I zoom in and out the irregularities in the lines change.  If I may ask and second question also, about saving these images for print (using inDesign), should I import the .ai files directly or save as PDF as import those. Are there any pros and cons.  Thank you,  Daniel

This has been puzzling me for a few days now, and I asked a graphic designer I knew before trying here and haven't been able to solve it yet. It's quite weird so please bear with me for a bit.  I am using Adobe Illustrator to create a logo, and I have something that can potentially work. I have used only the pen tool with strokes (no fill), but the issue is, when I view the logo at 100%, it looks pixellated! I know vectors should not even be able to appear pixellated, but they are. Here is the screenshot from AI, without exporting to anything:     That was just done using the snipping tool within Windows, and it's at 100% zoom.  I have anti-aliasing turned on from Edit > Preferences > General, and the document resolution is at 300 ppi (I get the same result with 72 ppi).   Could anyone help me with this?   If relevant: Using CS6, and have a 24 inch Dell U2412M at 1920x1200 resolution. I do have a 21.6" Samsung at 1680x1050 and I get the same result there as well. Let me know if you need any other settings, or if you would like the file, I'd be happy to provide it to be able to solve this problem.


Let a function $f(x)$, and $x$ not equal to zero be such that: $f(x)+f(1/x)=f(x)\cdot f(1/x)$ then $f(x)$ is ? I tried differentiating it but did not find any useful outcome. answer given at back of book is A)$1+x^n$, $n$ belongs to $\mathbb R$ B)$1-x^n$, $n$ belongs to $\mathbb R$ C)$\pi/(2\arctan|x|)$ D)$2/(1+k\ln|x|) $

Find a function $f(x)$ such that:  $$f(x)f(1/x)=f(x)+f(1/x)$$  with $f(4)=65$.  I have tried to let $f(x)$ be a general polynomial: $$a_0+a_1x+a_2x^2+\ldots a_nx^n$$  which leaves $f(1/x)$ as:  $$a_0+a_1{1\over x}+a_2{1\over x^2}+\ldots + a_n{1\over x^n}$$  On comparing the coefficients of both sides, we see that:  $$2a_0=(a_0)^2+(a_1)^2+(a_2)^2+\ldots+(a_n)^2$$  And  $$a_1=(a_0a_1)+(a_1a_2)+ \ldots +(a_{n-1}a_n)$$  I don't know how to proceed further. I know I need to compare coefficients and come to a conclusion based on their values, but I don't see what to do next.


Got a new grey iPhone SE for Christmas from the Verizon store. Seems to work fine except for one issue. When the phone is off (standby), any sudden motion turns the phone on, as if the home or power button were pressed.  Let me be clear: Nothing is in contact with the power button or home button when this happens. The phone isn't getting any calls or messages or other notifications.  There's a passcode, so nothing bad happens, but it's unsettling to open the pocketbook and see the phone screen all lit up.  Is this something deliberate? Can it be configured? Or is the phone just defective?

After installing iOS 10, I found that the screen on my iPhone 6s turned on at seemingly random times, and it slightly annoyed me. I now know that this feature does what it is supposed to (turn the screen on when the phone enters certain positions), but I want to disable it.  Is there a setting can I use to do so?


I discovered that the use by date of the chicken that I bought recently was two days ago. It is still sealed and looks fine. I have yet to conduct the sniff test as I'm unsure whether there is any point. Is it generally still safe to cook with?

I usually freeze all of my meat unless I plan to use it within one day, but I was just wondering whether I could keep some raw chicken in the fridge until Thursday (three days from now). I wanted to make sure it wouldn't go bad, so I did some searching and it seems that most sites recommend discarding raw poultry .  But the sell-by date on the package is August 6th, which is six days from today. The implication is that if I had boughten this chicken six days later, then it would somehow last in my fridge all the way until August 8th (6+2 days).   Why does the usual food safety advice seem to be suggesting that raw poultry/meat will degrade much more slowly while on grocery store shelves? Are they kept colder there than in conventional refrigerators? Or will my chicken actually be safe to eat for another week?


Let $m$ be the mass of a rocket in free space (including fuel) at the time $t$. Now suppose that the rocket ejects a mass $\Delta m$ during the interval $\Delta t$ with velocity $v_e$ relative to the rocket.   I was told that the correct ansatz is as follows:  $$ mv = (m - \Delta m) \cdot (v + \Delta v) + \Delta m \cdot (v + \Delta v - v_e). $$  If you work this out, it reduces to:  $$ m \Delta v - \Delta m v_e = 0. $$  However some books start with the equation  $$ mv = (m - \Delta m) \cdot (v + \Delta v) + \Delta m \cdot (v - v_e) $$  which reduces to   $$ m \Delta v - \Delta m v_e - \Delta m \Delta v = 0. $$  Then you need to "neglect" the higher order term $\Delta m \Delta v$ to get the correct result.   Is there any good conceptual reason why the first ansatz is the more correct one?  However if you use $\tilde m = m(t+ \Delta t)$ in the derivation, you get the correct result without the need of neglecting higher order terms in the line of the second derivation:  $$ (\tilde m + \Delta m) \cdot v = \tilde m (v + \Delta v) + \Delta m (v - v_e) $$  so why is the following equation the conceptually wrong ansatz:  $$ (\tilde m + \Delta m) \cdot v = \tilde m (v + \Delta v) + \Delta m (v + \Delta v - v_e)? $$

Newton's 2nd law of motion can't be applied for mass-varying systems. Another force, known as Thrust must come to play. It can be measured using law of conservation of linear momentum. $$\text{Thrust} M.\dfrac{dv}{dt} = v_{rel} .\dfrac{dm}{dt}.$$   where $M$ is the mass of the system;   $\frac{dm}{dt}$ is the rate at which the mass changes;    &    $v_{rel}$ is the relative velocity of the exhausted mass w.r.t to the main system.    This is what my book writes. Now, the left hand side of the eqn. represents force on mass $M$ whereas the right hand side represents the force due to variable mass. How can they be equal? During the application of thrust, $M$ does change and the equation had to be $$ (M - dm). \dfrac{dv}{dt} = v_{rel} .\dfrac{dm}{dt}$$ But that is not the book's equation. Why is mine wrong? What is the intuition?


In have this code: #include <iostream>  using namespace std;  int main() {     struct people {char name[50]; int tt; int gg;};          struct people p1;     cout << sizeof(p1);          return 0; }  the output is 60. Why?, I mean, the struct just would need to have 50+4+4=58 bytes. If we change the name[50] to name[20], we have the output: 28 as expected. It is not contradicting that the memory used by the members of the struct are contiguous?.

Why does the sizeof operator return a size larger for a structure than the total sizes of the structure's members?


Is it legal for customs and immigration officers to ask me the reason I travelled out of the country and return the same day?

As a US citizen, when I re-enter the US, I am often asked where I was, how long I was there, and the reason for my visit.  Why am I asked these things?  Am I required to answer? Don't I have a legal right to enter the US (as long as I'm not doing or carrying anything illegal)?  If I were to refuse to answer these questions, would I be permitted entry?  Note: I'm not really bothered by the questions (except when the agent asking them is especially rude), I'm just curious.


This might be a duplicate post but couldn't find one.  I'm looking for a way to run a shell script once at a specific time.  Like run it once at 16:00 then remove from queue. crontab has no setting for this as I can find since it runs on repeat and not like fire and forget kind I'm looking for.  Anyone got a good suggestion? I want it to be run on Ubuntu 18.04  server version.

What's a simple way to run a command, say, 8 hours from now? I can think of this way:  nohup bash -c "sleep 28800 ; ./mycommand.sh" &   Is there a more "proper" way?


I have been trying to understand the way a database system works. Digging through the internet, I have come to following picture.  Database system is required because we need a way to store data, mainly on large scale, so that we can update it, query it, delete it, manipulate it plus perform other operations easily. The traditional file system is not designed for this and fails to serve the purpose. We can implement the above database system in different ways, which leads to different data models, RDBMS being the most dominant one. There is a database management system, which is a software and is in a way like file management system, and it manages the requests of creation, deletion, insertion of data etc. Eg. SQLite. We interact with database using an interface, which is provided by database management system, and a language which is compatible with the database management system. Eg. SQL.  I hope my understanding till now is correct. Now, the database management system interacts with database and I am not able to understand what database is exactly. I used to think the collection of all the tables is termed a database and is just a name. But then I found out there are several databases possible and a database can be created using DBMS just like files. Further research indicated me that database is a file. My doubts are following:  If database is a file, how does it differ from ordinary files (in terms of implementation)? I believe that tables are also files. But tables are stored in a database. How can a file be inside a file and both can be considered separate. The implementation of different data models, like relations to store data in rdbms, objects to store data in OOP based database systems, are they implemented in database management system or database?  And if database is not a file what is it exactly and how tables, database and database management system are related in terms of implementation? I have tried to find answers to these but it seems like the content on these are not much and I have had no luck. Also, please explain it avoiding very involved code snippets, as I am an analys

I was reading book "Database System Concepts" (6th edition by Henry F Korth Abraham Silberschatz, S Sudharshan   There is slight confusion between database system and DBMS Are both term same or different?  A database system is a collection of interrelated data and a set of programs that allow users to access and modify these data.  A database-management system (DBMS) is a collection of interrelated data and a set of programs to access those data.  What I understand--- A database system (DBMS) means a set of programs to access and modify data.  A database-management system (DBMS) means a set of programs to only access data.


Command+Shift+I launches the Mail app (which can't be removed), but I can't find that shortcut in System Preferences -> Keyboard -> Shortcuts.  Where does that shortcut come from, and how can I remove it?

When in a browser (Chrome or Safari), the following keyboard shortcut will always bring up a window that says "Welcome To Mail":  Command+Shift+I  I would like to use this shortcut for another purpose.  Is there any way to disable this shortcut?


when i pull up bluetooth the toggle button is disabled.  description: Wireless interface    product: BCM43602 802.11ac Wireless LAN SoC    vendor: Broadcom Inc. and subsidiaries    physical id: 0    bus info: pci@0000:02:00.0    logical name: wlp2s0    version: 01    serial: 44:1c:a8:e2:e6:75    width: 64 bits    clock: 33MHz    capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless    configuration: broadcast=yes driver=brcmfmac driverversion=7.35.177.61 firmware=01-ea662a8c ip=10.0.0.79 latency=0 multicast=yes wireless=IEEE 802.11    resources: irq:137 memory:dd800000-dd807fff memory:dd400000-dd7fffff  [sudo] password for me:    ● bluetooth.service - Bluetooth service    Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled; vendor preset    Active: inactive (dead)      Docs: man:bluetoothd(8)

Bluetooth is on but can't find or be found by any other devices.  Output of sudo service bluetooth status:  ● bluetooth.service - Bluetooth service    Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled)    Active: active (running) since ხუთ 2015-06-04 22:33:18 GET; 13min ago  Main PID: 26678 (bluetoothd)    CGroup: /system.slice/bluetooth.service            └─26678 /usr/sbin/bluetoothd -n  ივნ 04 22:39:14 Rangoo bluetoothd[26678]: Endpoint registered: sender=:1.63 path=/MediaEndpoint/BlueZ4/HFPAG ივნ 04 22:39:14 Rangoo bluetoothd[26678]: Endpoint registered: sender=:1.63 path=/MediaEndpoint/BlueZ4/HFPHS ივნ 04 22:39:14 Rangoo bluetoothd[26678]: Endpoint registered: sender=:1.63 path=/MediaEndpoint/BlueZ4/A2DPSource ივნ 04 22:39:14 Rangoo bluetoothd[26678]: Endpoint registered: sender=:1.63 path=/MediaEndpoint/BlueZ4/A2DPSink ივნ 04 22:39:14 Rangoo bluetoothd[26678]: bluetoothd[26678]: Endpoint registered: sender=:1.63 path=/MediaEndpoint/BlueZ4/HFPAG ივნ 04 22:39:14 Rangoo bluetoothd[26678]: bluetoothd[26678]: Endpoint registered: sender=:1.63 path=/MediaEndpoint/BlueZ4/HFPHS ივნ 04 22:39:14 Rangoo bluetoothd[26678]: bluetoothd[26678]: Endpoint registered: sender=:1.63 path=/MediaEndpoint/BlueZ4/A2DPSource ივნ 04 22:39:14 Rangoo bluetoothd[26678]: bluetoothd[26678]: Endpoint registered: sender=:1.63 path=/MediaEndpoint/BlueZ4/A2DPSink ივნ 04 22:39:14 Rangoo bluetoothd[26678]: Adapter /org/bluez/26678/hci0 has been enabled ივნ 04 22:39:14 Rangoo bluetoothd[26678]: bluetoothd[26678]: Adapter /org/bluez/26678/hci0 has been enabled   Output of lsusb:  Bus 003 Device 005: ID 0a5c:21d7 Broadcom Corp. BCM43142 Bluetooth 4.0   How can I fix it?


How any EM wave travels in a vacuum or an empty space as the propagation of any wave needs a matter or disturbance. Any wave can propagate in a disturbance only. How can it travel in vaccum?  As wave's propagation needs to have any disturbance.

As I understand it, electromagnetic waves have two components which are the result of each other, i.e., when a moving electric charge creates a changing magnetic field at point X then a changing electric field is created at point Y and this repeating process is what creates EM waves, so therefore, it requires no medium. Is my understanding correct?  One thing that I'm surprised to know is that light is also called an electromagnetic wave.  Does this include light of any kind, for example: light from a bulb, a tube, and also from the Sun? How do they contain electric and magnetic fields?


Playing poker with and without money is very different. With money bets, people can get scared off when the bets get big and that is when a 'poker face' matters. Without money bets, there is little emotion involved.   In the Star Trek world, money does not exist, taking the fun and excitement away from poker. So why is poker still a favourite game among Star Trek TNG crew despite ?

Obviously, when gambling with Ferengi or other aliens, the stakes are usually latinum. But on the Enterprise (or in Federation space in general), are they still playing for latinum, or are they betting chores (as seen in Firefly) or maybe holodeck time or replicator credits? I did a quick check on , but it's not really spelled out what the poker players on the Enterprise-D are betting. I'm fairly sure they're not just playing for fun.  I'm asking about Star Trek in general, not just the poker games we see on TNG.


I find it confusing when there's a change of variable involved in a definite integral (double or triple) - in cases where the limits themselves are variable.  Here's an example to highlight my problem:  $$\int_0^1\int_0^{1-x}e^{\frac{x-y}{x+y}}~dx~dy$$  The change of variable to go for is $x-y=u$ and $x+y=v$  but now, what shall be the limits of the new integral?  A friend says that the same region in the $uv$ plane would be bounded by $u=-v$,$u=v$ and $v=1$. Could someone please explain exactly how this works? Any help is appreciated, thank you!

The Problem is to integrate the following double integral $\displaystyle\iint_\mathbf{D}\exp\left(\frac{x-y}{x+y}\right) dx\, dy$ using the technique of transformation of variables ($u$ and $v$).  There is a given $D$ with $D:= \{(x,y):\ x\geq 0,\ y \geq 0,\ x+y \leq 1\}$  My Approach: wasn't quite successful at all. I am quite familar with calculus, but i am stuck at multiple integrals. I thought about the following transformation:  $u = x-y$ and $v = x+y$  But i don't know the next step.  Another suggestion: i thought about the integration of the e-Function. I have in mind that $\int e^x dx = e^x$. So maybe: $$\iint_\mathbf{D} \exp\left(\frac{x-y}{x+y}\right) dx\ dy = \exp\left(\frac{x-y}{x+y}\right) ?$$


I upgraded to 14.10 from 14.04. And I use Ubuntu+Kubuntu. Temporary solution is, after freeze, I do Fn+F1 (Suspend), and then click Power button (Wake), and everything returns to normal, till next freeze.  Any permanent solutions?

All operating systems freeze sometimes, and Ubuntu is no exception. What should I do to regain control when...   just one program stops responding? nothing at all responds to mouse clicks or key presses? the mouse stops moving entirely? I have an    In what order should I try various solutions before deciding to pull the power plug?  What should I do when starting up Ubuntu fails?  Is there a diagnostic procedure I can follow?


How does one make a figure appear precisely where it is placed in the coding, as opposed to the top of the next page? This is an issue for me currently.

How to influence the position of float environments like figure and table in LaTeX?   This is a general question and should collect useful answers for all users. I hope we can use this as a reference


For a continuous $f(x)$ on $[0,1]$ I need to calculate $\lim_{n\to \infty}\int^1_0 f(x^n)dx\,$   Let $\epsilon>0$ then,$\quad \int^1_0 f(x^n)dx\,=\int^{1-\epsilon}_0 f(x^n)dx\, +\int^1_{1-\epsilon}f(x^n)dx\,$, Applying mean value theorem $\exists c_1, c_2 $ such that $\int^{1-\epsilon}_0 f(x^n)dx\,=f(c_1^n)(1-\epsilon)$ and $\int^1_{1-\epsilon}f(x^n)dx\,=f(c_2^n)\epsilon$ , then $\lim_{n\to \infty}\int^1_0 f(x^n)dx\,=\lim_{n\to \infty} (f(c_1^n)(1-\epsilon)+f(c_2^n)\epsilon)=f(0)$

Supose that $f\colon [0,1] \rightarrow \mathbb R$ is a continuous function. Show that: $$\lim \limits_{n \rightarrow+\infty} \int_{0}^{1}{f(x^n)dx}=f(0)$$  I'm studying the Riemann Integral theory and I have not idea to how do this. I need some hint to start because I do not see how to apply the Riemann sum or other theory concept to be able to help me.


I am trying to create a normalized frequency histogram. A minimal working example is adapted from  by @Jake (see code below). I know I can switch add density to hist={} but that is not doing what I want. I want to divide the frequency of the specific interval by the total number of observations (here it is 10). The goal is to always have a y-axis that is scaled between 0 and 1. I get    but I want (note the epic hand drawn paint zeros on the y-axis :D).   \documentclass[border=5mm]{standalone} \usepackage{filecontents} \usepackage{pgfplots, pgfplotstable} \usepgfplotslibrary{statistics}  \begin{filecontents}{data.csv} dist 0.00 0.15 0.15 0.25 0.25 0.25 0.40 0.40 0.40 0.40 \end{filecontents}  \begin{document} \begin{tikzpicture} \begin{axis}[     ybar,     ymin=0,     ymax=4 ] \addplot +[     hist={         density,         bins=4,         data min=0.0,         data max=0.4     }    ] table [y index=0] {data.csv}; \end{axis} \end{tikzpicture} \end{document}

I'd like to make a histogram with pgfplots showing percentages on the y-axis instead of the number of points falling into the bins, like so (the example is taken from the manual):  \documentclass[11pt]{scrartcl} \usepackage{tikz} \usepackage{pgfplots} \usepgfplotslibrary{statistics}  \usepackage{filecontents} \begin{filecontents*}{histdata.dat}   1   2   1   5   4   10   7   10   9   8   9   9 \end{filecontents*}  \begin{document} \begin{tikzpicture}[]   \begin{axis}[     ybar interval,     xticklabel={\pgfmathprintnumber\tick--\pgfmathprintnumber\nexttick},     yticklabel={\pgfmathparse{(\tick/12)*100}\pgfmathprintnumber{\pgfmathresult}\%},     yticklabel style={       /pgf/number format/.cd,       fixed, precision=0,       /tikz/.cd     },     ]     \addplot+ [hist={bins=3}]     table [y index=0] {histdata.dat};   \end{axis} \end{tikzpicture} \end{document}   However, I can only calculate the percentages if I know the number of total data values, in this case 12.   Is there a way in pgfplots or (lua)latex in general to count the number of data values, meaning the number of rows in the data file?


I have a grepped output of a file like so:  "name" "Andrew Spokes"   I want to extract the name by piping the output of grep through sed.   My expected output would be: Andrew Spokes  I require all white space thats not in between the quotation marks to be removed too.

I have a file that has a list of paths like so:  "1"       "/user/bin/share" "2"       "/home/user/.local" "3"       "/root/"   Is there a way to extract just the paths? I dont want the numbers or quotation marks. How can I sed or grep the paths out of the file? What regex would be required for such a task?


Have you seen the movie "Dirty Dancing"?  It's a 1987 American romantic drama, a feel‐good film for people of all ages.  Is the above sentence now a comma splice?

I thought I heard my teacher said: 'Don't construct a sentence without a verb.'  Is there such rule in english grammar?     She looks like 70 years old. Perhaps older.   How about the question above? Is it correct? Is there any book that can be used references for wide range of topics in grammar(including syntax, morphology et cetera)? I have finished oxford grammar in use recently and think it wasn't enough for me.


How do I clear a column in a double column document? I have two floats, and I want each to occupy a different column.  \clearpage before the second float puts it on a new page, while \pagebreak does nothing (puts the two floats on the same column).  MWE  \documentclass[twocolumn,english]{article} \begin{document}  \begin{figure} \caption{} \end{figure}  \newpage{}  \begin{figure} \caption{} \end{figure}  \end{document}

Similar to  I want to force a column-break in a two-column document.  \columnbreak   seems to be undefined without the multicol package.


I'm trying to ask a programming question about an internal IDE project file that is changed when files are added and removed from the project ().  To illustrate this I posted two lines of the git diff to compare the contents of the file from before and after the action.  After posting I realized that I couldn't find a syntax highlight for the output of a diff.  Is diff syntax highlighting available on Stack Overflow or on any other Stack Exchange site?

I noticed that sometimes my code gets highlighted in different colors when rendered.   What is syntax highlighting? How does it work? Why isn't my code being highlighted correctly? How do I report a bug or request a new language? How do I use syntax highlighting? What languages are currently available on Stack Exchange?


Just a heads up - please make this answer understandable to around 1st year degree level physics - not PhD research. So I can understand it - thanks.  1) In solid state physics, why is it that below a certain temperature (KE of the electrons) do the electrons form Cooper Pairs / a condensate via BCS Theory?  I know its something to do with their KE being less than the attraction energy between the two electrons.  But a book i'm readings says its 'at low temperatures the electrons prefer to condense into pairs and make the superconducting state, and this is because it costs them less energy to do so'. So according to the book - why is it that above a certain temperature it costs them more energy to form a cooper pair (instead of staying as individual entities)?? And what does this have to do with their attraction.  2) Lastly, why is there an attraction at all at any temperature - aren't the electrons both negatively charged?

We know that like charges repel each other. But my professor claimed that two electrons can attract each other as well. What he said was that due to screening an electron travelling at some speed won't repel another electron, but that they will, in some cases, attract each other due to weak phonon exchange. What does that mean? What is phonon exchange? Do two electrons really attract each other?


I was looking at getting a new Trek Domane SL 5 for commuting, but i don't see any way to mount a rack on it? I need to carry a laptop bag and a change of cloths. Is there any way to do this on that bike?

I got a carbon-framed  recently but I also want to use it for commuting to and from work and I want a place to put my lock and other stuff on the bike. Is it possible to have a rack on this kinda bike.


This is probably a noob question.   I want to add a text texture to a model. I've made the image in GIMP, if I use WHITE for the text color, it appears properly, but if  I change the color of the text to black, it doesnt show up. Everything in the PNG image is transparent except for the text. (Also, I need to give the model a specific color, as in different colors for the buttons)  I'm using Blender 2.80 Beta with EEVEE as renderer. (version date is 2019-04-09)

I'm designing this animal-type creature, and want to add a transparent .png image to its face with the face features (object has a subsurf). On the left is the image with the features, on the right is the part of the object where I want it to be.    I tried to import the image as a plane, but matching the shape of the plane with the face didn't work, and the lines of the face left shadows on the head, and could be seen as a different object from some angles (although it's the closest I've gotten yet). It looked like this:    So , I tried selecting the faces of the head that the features should go over, and create a new material for it. Unfortunately, since the .png is transparent, the result produced was this:    (where it's impossible to tell the transparency from a black background default color, and where I wouldn't know where to start to adjust size and position).  I also tried UV mapping, but then the whole object became black with the features repeated all over.   Is it something I have to go into Nodes for? I'm kind of stuck here. Creating a new material and applying it is simple, but applying a material that is an image is a bit more complex it seems... Ideally, I would reproduce the same technique for the adhesive bandage on its arm (seen on the right of image 1).


Today something weird happened to my Chrome browser. It started showing like this    I'm using a OSX Yosmite running on a virtual machine. It worked great for years but something happened Today and I'm uncertain what's that.  I tried to install it again but problem persists.  Is anyone familiar with this?

Any ideas why this is happening with Google Chrome?


I am trying to create a little script that check if a program is installed or not. I am trying with tmux, ...   `tmux --help` | grep "tmux: command not found" &> /dev/null if [ $? == 1 ]; then     echo "tmux is not installed"     exit fi   After installation of tmux, I get:  usage: tmux [-2lquvV] [-c shell-command] [-f file] [-L socket-name]             [-S socket-path] [command [flags]] tmux is not installed   If a program is not installed, appair the string "tmux: command not found". This could explain why I grep output of tmux --help command. Is a correct way to check if tmux is installed or not?  The script alwais echoes "tmux is not installed". Even if I install tmux. What's wrong with it?

How would I validate that a program exists, in a way that will either return an error and exit, or continue with the script?  It seems like it should be easy, but it's been stumping me.


in ROTJ leia tells Han he has "hibernation sickness," however in Empire they are unaware if Han would survive the freezing i guess my question is was carbonite freezing common or.?

We all know the story of Han Solo being a guinea pig for the planned freezing of Luke Skywalker, but how often are people "stored" in this way?


Let $X$ and $Y$ be independent random variables such that $X\sim \operatorname{Poisson}(\lambda_1 = 5)$ and $Y\sim \operatorname{Poisson}(\lambda_2 = 15)$. Let $Z = X + Y$ . Compute $\operatorname{Corr}(X, Z)$.  Answer:  $\operatorname{Var}(X) = 5$  $\operatorname{Var}(Y) = 15$  $\operatorname{Cov}(Z) = \operatorname{Cov}(X, X+Y) = \operatorname{Cov}(X, X) = \operatorname{Var}(X) = 5$  $\operatorname{Var}(Z) = \operatorname{Var}(X + Y) = V(X) + V(Y) = 5 + 15 = 20$  $$\operatorname{Corr}(X, Z) = \frac{\operatorname{Cov}(X, Z)}{\sqrt{\operatorname{Var}(X)} \sqrt{\operatorname{Var}(Z)}} = \frac{5}{\sqrt{5 \cdot 20}} = 0.5$$    I'm just wondering if this statement is true for all covariance values or just if independent.  $\operatorname{Cov}(Z) = \operatorname{Cov}(X, X+Y) = \operatorname{Cov}(X, X) = \operatorname{Var}(X) = 5$  Couldn't find it on wiki

Let $X$ and $Y$ be independent random variables such that $X\sim\mathrm{Poisson}(\lambda_1 = 5)$ and $Y\sim\mathrm{Poisson}(\lambda_2 = 15)$. Let $Z = X + Y$ . Compute $\mathrm{Corr}(X, Z)$.  Answer:  $\mathrm{Var}(X) = \lambda_1 = 5$  $\mathrm{Var}(Y) = \lambda_2 = 15$  $\mathrm{Cov}(Z) = \mathrm{Cov}(X, X+Y) = \mathrm{Cov}(X, X) = V(X) = 5$  $\mathrm{Var}(Z) = \mathrm{Var}(X + Y) = V(X) + V(Y) = 5 + 15 = 20$  $\mathrm{Corr}(X, Z) = \dfrac{\mathrm{Cov}(X, Z)}{\sqrt{\mathrm{Var}(X)} \sqrt{\mathrm{Var}(Z)}} = \dfrac{5}{\sqrt{5 \cdot 20}} = 0.5$    I get most of the solution but I'm confused on how they got $\mathrm{Cov}(Z)$  $\mathrm{Cov}(Z) = \mathrm{Cov}(X, X + Y) = \mathrm{Cov}(X + Y, X) = \mathrm{Cov}(X, X) + \mathrm{Cov}(X, Y) \neq \mathrm{Cov}(X, X)$   Could someone explain how they got $\mathrm{Cov}(Z)$?


I simply want to delete the bulk if not all of several hundred photos I have uploaded from my camera, to free up space as it is already full. However I cannot find how to delete them unless I do it one by one which requires at least three different actions and would take forever! Someone said highlight first and then delete, but I cannot find any control to highlight them! I went to the nearest Apple shop today. It is 125 kms from where I live. Apparently it does not open until 9.30 am and at 9.10 there are already 30-40 people patently waiting outside! I do not have time for this, and returned to pay $6 for parking my car!  I SIMPLY WANT TO KNOW HOW TO DELETE GROUPS OF PHOTOS. The photos I want are already transferred to my PC, so even it they are deleted from Cloud it does not matter, but at present when I go travelling I will not be able to download photos as I take them.

I previously used Image Capture (ie. this solution: ). It seems like the delete functionality was removed in Yosemite. Now what? I have 800+ photos and I don't want to select them one by one.  When I connect to iTunes, it says "iCloud Photos is On" - and does not allow me to sync through iTunes.


I'm practicing publishing of  How can I handle vertical alignment of div?      .header {   background: rgba(0, 0, 0, 0) linear-gradient(135deg, rgb(6, 68, 161) 0%, rgb(56, 205, 255) 100%) repeat scroll 0% 0%;   height: 668px; }  .header__nav {   padding: 20px; }  .header__nav__logo {   float: left; }  .header__nav__logo {   padding: 6.5px 20px 6.5px 0;   display: inline-block;   margin-left: -20px; }  .header__nav__logo img {   width: 150px;   height: 36px; }  .header__nav__list {   overflow: hidden;   float: right;   margin-right: -20px; }  .header__nav__list li {   float: left; }  .header__nav__list li a {   padding: 20px;   display: inline-block;   color: white; }  .header__nav__list__button {   background-color: #eb4336;   border-radius: 3px; }  .header__main {   text-align: center;   color: white;   background-color: green; }  .header__main__title {   font-size: 50px; }  .header__main__intro {   font-size: 20px;   margin-top: 20px;   margin-bottom: 10px; }  .header__main__button {   background-color: #eb4336;   border-radius: 5px;   padding: 15px 50px;   font-size: 20px;   margin-top: 20px;   display: inline-block; }  .header__main__signin {   margin-top: 10px; }  .contents {   background-color: yellow; }  .footer {   background-color: blue; } <!DOCTYPE html>      <meta charset="UTF-8">   <meta name="viewport" content="width=device-width, initial-scale=1.0">   <meta http-equiv="X-UA-Compatible" content="ie=edge">   <link rel="stylesheet" href="default.css">   <link rel="stylesheet" href="style.css">   <title>Project Management Software</title>

Features

Pricing

Sign-in

FREE TRIAL

           Manage your projects, tasks & team to get things done faster!

           A simple tool for project management, invoicing & time tracking.
         TRY IT FREE NOW!
           Already using Pareto.pm? Sign in

     Contents
        Footer           I wanna div of green space to align vertically in the blue background except nav bar. How can I handle this?? I searched solutions and tried lots of things, but I failed. Many solutions suggest display: table-cell for vertical alignment, but it didn't work.

I want to center a div vertically with CSS. I don't want tables or JavaScript, but only pure CSS. I found some solutions, but all of them are missing Internet Explorer 6 support.
Div to be aligned vertically
   How can I center a div vertically in all major browsers, including Internet Explorer 6?


I Am getting this error                                                                                java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.kosalgeek.android.androidphpmysql/com.kosalgeek.android.androidphpmysql.YoutubeActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'java.io.Serializable android.content.Intent.getSerializableExtra(java.lang.String)' on a null object reference There's something wrong with      Video_id   . I am getting Video_id value from another class that is product.java  from the following script  public class YoutubeActivity extends YouTubeBaseActivity implements     YouTubePlayer.OnInitializedListener { Product product = (Product) getIntent().getSerializableExtra("product"); TextView etName, etPrice, etQty, etImageUrl; ImageView ivImage; String VIDEO_ID;  private static final int RECOVERY_DIALOG_REQUEST = 10; public static final String API_KEY = ""; /**  * ATTENTION: This was auto-generated to implement the App Indexing API.  * See https://g.co/AppIndexing/AndroidStudio for more information.  */ private GoogleApiClient client;     @Override protected void onCreate(Bundle savedInstanceState) {     // TODO Auto-generated method stub     super.onCreate(savedInstanceState);     setContentView(R.layout.content_youtube);      YouTubePlayerView youTubeView = (YouTubePlayerView) findViewById(R.id.youtube_view);     youTubeView.initialize(API_KEY, this);      etName = (TextView) findViewById(R.id.etName);     etPrice = (TextView) findViewById(R.id.etPrice);     etQty = (TextView) findViewById(R.id.etQty);     if (product != null) {         etName.setText(product.name);         etPrice.setText("" + product.views);         etQty.setText("" + product.v);         VIDEO_ID = product.name ;       }       // ATTENTION: This was auto-generated to implement the App Indexing API.     // See https://g.co/AppIndexing/AndroidStudio for more information.     client = new GoogleApiClient.Builder(this).addApi(AppIndex.API).build(); }   @Override public void onInitializationFailure(YouTubePlayer.Provider provider,                                     YouTubeInitializationResult errorReason) {     if (errorReason.isUserRecoverableError()) {         errorReason.getErrorDialog(this, RECOVERY_DIALOG_REQUEST).show();     } else {         String errorMessage = String.format("YouTube Error (%1$s)",                 errorReason.toString());         Toast.makeText(this, errorMessage, Toast.LENGTH_LONG).show();     }  }  @Override public void onInitializationSuccess(YouTubePlayer.Provider provider,                                     YouTubePlayer player, boolean wasRestored) {     if (!wasRestored) {         player.cueVideo(VIDEO_ID);     } }

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


I have just made up a adjustable regulator circuit using the LM 317T, the input is approx 33 V, and output 16 V, but the LM 317T when cold regulates at 16 V, but once the LM 317T gets very hot the voltage drops to around 13 V, and is not regulating, my load is drawing approx 150 mA, can anyone please advise.

I'm using a 5 V / 2 A voltage regulator () without a heatsink. I'm testing the circuit with a microcontroller (PIC18FXXXX), a few LEDs and a 1 mA piezzo buzzer. The input voltage is aprox. 24 VDC. After running for a minute, the voltage regulator starts to overheat, meaning it burns my finger if I keep it there for more than a second. Within a few minutes it starts to smell like it's burnt. Is this a normal behavior for this regulator? What could cause it to heat that much?    Other components used in this circuit:  L1:   R2:   F1:


I have built 2 models: 1) precision: 0.80 - AUC ROC: 0.69 2) precision: 0.90 - AUC ROC: 0.94    I  have posted both them to Kaggle as Titanic competition, the first model scored 0.7 and the second one scored 0.4. So I know the second model has been over-fitted. How can I find it out before sending results to Kaggle using plots or python codes?  Does CAP curve do that? Can I find it out using ROC curve?  I have used train_test split for the Kaggle training dataset.

Can anyone tell me how to judge if a supervised machine learning model is overfitting or not? If I don't have an external validation dataset, I want to know if I can use ROC of 10 fold cross validation to explain overfitting. If I have an external validation dataset, what should I do next?


My brother started a character on destiny on my dads profile but now he has made his own profile an wants to play on his profile with that character even though he has made another character he still wants the other. Both profiles are on a home Xbox so is there any way he can play his character on his profile?

I already have a destiny character on my destiny game, but I was wondering if I take my brother destiny data and put it on my ps4 account will I have my character and his character.


I want to delete all *.o files in a directory and its sub-directories. However, I get an error: sashoalm@aspire:~/.Workspace.OLD$ rm -r *.o rm: cannot remove `*.o': No such file or directory  On the other hand, rm *.o works, but it's not recursive.

I am working through SSH on a WD My Book World Edition. Basically I would like to start at a particular directory level, and recursively remove all sub-directories matching .Apple*. How would I go about that?  I tried   rm -rf .Apple* and rm -fR .Apple*  neither deleted directories matching that name within sub-directories.


I use LyX 2.2. I would like to produce REVTeX 4.1 documents. When running LyX with a document open, I find, via Documents > Settings > Document Class, an item that says "Unavailable: REVTeX (V 4.1)". I found a revtex4-1.layout file in Windows (C:) > Program Files (x86) > LyX 2.2 > Resources > layouts. Please tell me (in detailed steps I can follow) how to to activate use of REVteX 4.1 as a document class. (I do not consider myself 'all that sophisticated' regarding 'how things work'. So I would like to obtain a well-specified process I can follow.) With appreciation.

I recently installed MiKTeX with the texmaker editor and cannot figure out how to update the packages. When I attempt to use the subfigure package with the following preamble  \documentclass[a4paper,12pt]{article} \usepackage[english]{babel} \usepackage{graphicx} \usepackage{subfigure}   I then get a prompt to install a new package, which I then set to the online directory at ctan. I then get the following error:   ! LaTeX Error: File `subfig.sty' not found.Type X to quit or <RETURN> to proceed,or enter new name. (Default extension: sty)Enter file name:! Emergency stop.<read >   How do I properly install packages to miktex? I'm absolutely confused. Thanks in advance for any help.


When you have a vast collection you might get confused. What happens if you try to activate a Steam powered game with a serial of a game you already owned? Does the key get lost? How can you tell if it was used?

I have a Steam product key for Just Cause 2 I got for free with the purchase of my video card. However, I already have a copy of this game attached to my Steam account. What will happen if I try to activate this other key on my account? Will Steam give me a copy of Just Cause 2 to gift to somebody else? Will it simply refuse to add it? Or will it eat the key rendering it worthless?  I don't want to try this only to have the latter happen, but it would be useful to be able to add it and gift it to somebody else.


so what I want to do is that I want to count the number if a string and be able to print for example: str = 'string' print(str.count(3))  and have return: >> str or stri  something to be able to count or maybe split till a specific part of the string?

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


I am working on a theme that runs code only once on theme activation (using the after_switch_theme hook). I am wondering if it's possible to safely prevent my theme from being activated if certain requirements are not met.  Specifically, I want to check if WPML is installed and activated or not, and if not, prevent my theme from being activated. Checking if WPML is activated is not an issue, my issue is how to safely stop my theme from being activated. I am afraid that using PHP's die() might cause issues with a half activated theme. Even if die() were to work properly, I would still need to activate another theme and then activate WPML, and finally then reactivate my theme.  Here's what the code would ideally look like:  add_action('after_switch_theme', 'theme_custom_install'); function theme_custom_install() {     if( $wpml_is_missing ) {         prevent_theme_switch();     } }   Is there a native WP way to do this, or does a plugin exist that does this?

So I am planning a theme that will depend on a plugin (for instance  or ).  So of course a theme will break if it can't use it's depending plugin's. So I would like a way to stop the user of activating a theme that needs a certain plugin to work and instead show an friendly error message containing the plugin that's needed.  So far I found out how to check if a plugin is installed or not (), but how to stop the theme from being activated if that's possible at all?  I also found out about the switch_theme and the after_switch_theme actions.  So what I am missing right now is a way to stop the actual activation. Is this possible?  edit: Found  for displaying admin notices/warnings.


Apologies if this is inappropriate - I'm new to scifi.se,  In the very first season of The Walking Dead, by covering themselves in blood, they were able to walk among the walkers without being detected.  Alas, it started to rain, afterall this is Atlanta, so they had to run for their lives.  Later, however, when going on a supply run or 'mission,' why don't they plug their noses, check that there aren't any rainclouds, and then douse themselves for the ten to thirty minutes it takes to undertake it?  It's not hard to wash clothes and selves later, or does it have some property that burns or something?  Why don't they use blood (on sunny days) on them to make a quick dash past the walkers?  EDIT: I understand there was a question asking something similar, and the response was that there are adverse effects and a disgust over time for wearing the guts of walkers.  An additional edit (40 mins ago) was made to an answer to say that some do.  So if I can edit my question to clarify: Why won't the main characters in Walking Dead in short-term timeframes, and with plugged noses, choose to cover themselves briefly in blood, instead of risking death/zombification by the walkers, when they go on a dangerous mission?

So, it is established that using the bodily fluids of a zombie hides you from zombies. The characters know this. (They also may know that keeping semi-disabled zombies also works).  Why don't they just keep the innards around to keep themselves safe?


In my clan we have 4 players who are almost fully maxed th10s. My question is after we are all 4 completelly maxed, who will be ranked 1st in clan wars? How is that determined?

I am #10 in my clan (cause I'm farming) but I am #2 in clan wars. I don't have the strongest troops in my clan. I'm just wondering how the order is set up, the only thing i can think of is that it is based off of your defense, but I'm not sure. Anyone know?


I am willing to install Linux Mint or Kubuntu OS on hp 4-1105dx model laptop. Have anyone tried linux previously on this model laptop. Does linux has device drivers for this model laptop.

I have a device on which I would like to install Ubuntu. How do I find out if Ubuntu will work on it?


How do you hook into javascript / popup functionality that is invoked after a user clicks?   We have javascript code that gets invoked by a user click.   This javascript code renders a popup dialog that contains an  choose file tag.  This  choose file tag is literally appended by doing something like:   output.append('<input type="file" ......'>   So the problem with this is if the user doesn't first click this  tag never gets rendered in the response.    We are currently using a jQuery $() function to execute our code that looks for  tags as soon as the web page loads, however our $() function does not get called when the user clicks the link rendering the popup.    Is there another hook we can use in jQuery besides $() that gets invoked when a popup gets rendered?

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


What makes searching not like seeking? What makes seeking not like searching?  How do we decide when to use one over the other?

I've been wondering, what is the difference between seek and search? When should one be preferred over the other?


I have a problem with Pokemon GO: I can catch Pokemon but when trying to spin Pokéstops it keeps saying try again later. What can I do to fix this? What went wrong?

Pokemon GO isn't working at all for me right now. I'm in one of the following circumstances and can't do anything:   My game is displaying a "Try Again" message I'm stuck on the Loading Screen When I sign in I get a message that the servers are experiencing problems. I see the map but nothing is loaded, and my team color is wrong The "loading" Pokeball just ends up spinning and I can't catch or interact with things When I try to catch a Pokemon, the Pokeball just sits on my screen doing nothing Gym opponents will drop to 1 HP and won't take any more damage or attack When I open a pokestop, the pokestop image and the name of the pokestop does not load.   What's causing this? Is there a way to fix it?


Consider a 3D object, like a sphere or a cube. What's the minimum number of cameras required to fully capture all sides of that object? And at what angles should those cameras be placed?  My initial thoughts were that you might 4 placed at the vertex of a tetrahedron.

Can 3 lights be placed on the outside of any convex N dimensional solid so that all points on its surface are illuminated?


My website loads from a few external sources (photos and movies in iframes, Youtube etc)  The code below is executed when my page is loaded but also if external sources are still loading.  $(function() {     //some code });   Which code should I use if I want a script to be executed when all the sources are loaded? (including external sources)

In jQuery when you do this:  $(function() {    alert("DOM is loaded, but images not necessarily all loaded"); });   It waits for the DOM to load and executes your code. If all the images are not loaded then it still executes the code. This is obviously what we want if we're initializing any DOM stuff such as showing or hiding elements or attaching events.  Let's say though that I want some animation and I don't want it running until all the images are loaded. Is there an official way in jQuery to do this?  The best way I have is to use <body onload="finished()">, but I don't really want to do that unless I have to.  Note: There is a  in Internet Explorer which actually does wait for all images to load before executing code inside $function() { }. So if you're using that platform you'll get the behavior I'm looking for instead of the correct behavior described above.


i'm not sure how much sense this question makes, but my physical education is not very great, so i'm just curious.  Normally, when we heat matter, it changes the state it at some level, but eggs don't - or at least in the "wrong" order, namely from liquid to solid. But why doesn't heating eggs make the "content" more liquid?  I know that heating kind of "extracts" the liquid in the matter, but i don't think that is relevant for that issue.   Anyways, is there a "higher" reason that eggs fall out of this principle?

When you add heat to a liquid (or a fluid), can it be solidified? If not, why in the world does an egg's stuffs become solid (or at least no more a liquid) when you 'boil' it in water?


The developer console is the most part rather useful however it does exhibit JS crashes; does anyone know where to report them to the team maintaining it?

I recently found a bug, which I mentioned on , as well as submitting a case, and after a few days fumbling around with the case, they closed it by saying that they only provide this type of support for Premier Support customers.  Is there a better channel for reporting bugs than by submitting a case, or is there something "special" we have to do? I realize this question is similar to , except that I've already gone the route of , as suggested by the answer there (i.e. submitting a case), to no avail.  How can I make sure that a bug like this can find its way to someone capable of at least confirming that the behavior was expected? This behavior isn't documented anywhere, and so I assume that it's a bug that needs to be addressed.


For the inverse of a matrix, we learned that to prove two matrices are inverses of each other, you must show that $AB = I = BA$. However, today in class someone claimed you only have to show either $AB = I$ or $BA = I$ to prove they are inverse. I know the commutative property doesn't apply to matrices, so can someone provide an example where $AB = I \ne BA$?  Edit: The question type goes as follows: Given matrix $A$ and matrix $B$, show whether or not the two are inverses. -For this question, do we need to show both $AB = I$ and $BA = I$ or will one or the other suffice?

If $A$ and $B$ are square matrices such that $AB = I$, where $I$ is the identity matrix, show that $BA = I$.    I do not understand anything more than the following.   Elementary row operations. Linear dependence. Row reduced forms and their relations with the original matrix.   If the entries of the matrix are not from a mathematical structure which supports commutativity, what can we say about this problem?  P.S.: Please avoid using the transpose and/or inverse of a matrix.


Let f be twice differentiable function on R with finite $\lim_{x \rightarrow +\infty} f(x)$ and $\lim_{x \rightarrow +\infty} f'(x)$. Then  $\lim_{x \rightarrow +\infty} f'(x) = 0$   I don't know how to prove this.

I've been trying to solve the following problem:  Suppose that $f$ and $f'$ are continuous functions on $\mathbb{R}$, and that $\displaystyle\lim_{x\to\infty}f(x)$ and $\displaystyle\lim_{x\to\infty}f'(x)$ exist. Show that $\displaystyle\lim_{x\to\infty}f'(x) = 0$.  I'm not entirely sure what to do. Since there's not a lot of information given, I guess there isn't very much one can do. I tried using the definition of the derivative and showing that it went to $0$ as $x$ went to $\infty$ but that didn't really work out. Now I'm thinking I should assume $\displaystyle\lim_{x\to\infty}f'(x) = L \neq 0$ and try to get a contradiction, but I'm not sure where the contradiction would come from.   Could somebody point me in the right direction (e.g. a certain theorem or property I have to use?) Thanks


I want to factory reset my ubuntu. Then I found about restter but when I run it i get an error that is: . I could not get how to fix it.  Is there any alternative.

I've had a lot of problems lately and now I'm having problems logging in at the login screen. I'm giving up and just want to reset and start over. How can I "factory reset" Ubuntu, in this situation, or, for future reference, in general?


In my website I use md5 to crypt password user in my database (and store session user)  $pswUser = md5($_POST["password"]);   But I have just been told that this way of encrypting has become obsolete  I did some research to find out how to do it but most of the posts dates from two or three years ago So what is the best way to encrypt password in 2017 ?  Thank you  Isn't duplicate discussion ...  => 2009 ...

It is currently said that MD5 is partially unsafe. Taking this into consideration, I'd like to know which mechanism to use for password protection.  This question,   suggests that hashing multiple times may be a good idea, whereas  suggests using salt.  I'm using PHP. I want a safe and fast password encryption system. Hashing a password a million times may be safer, but also slower. How to achieve a good balance between speed and safety? Also, I'd prefer the result to have a constant number of characters.   The hashing mechanism must be available in PHP It must be safe It can use salt (in this case, are all salts equally good? Is there any way to generate good salts?)   Also, should I store two fields in the database (one using MD5 and another one using SHA, for example)? Would it make it safer or unsafer?  In case I wasn't clear enough, I want to know which hashing function(s) to use and how to pick a good salt in order to have a safe and fast password protection mechanism.  Related questions that don't quite cover my question:


The open maping theorem between banach spaces says.  Let $T:X\to Y$ be a linear,continuous and surjective map between the banach spaces $X,Y$ then $T$ is an open map.  I need examples to show that the completeness assumption are important even in the presence of completeness of the other space. Thanks!

The Open Mapping Theorem says that a linear continuous surjection between Banach spaces is an open mapping. I am writing some lecture notes on the Open Mapping Theorem. I guess it would be nice to have some counterexamples. After all, how can you appreciate it's meaning without a nice counterexample showing how the conclusion could fail and why the conclusion is not obvious at all.  Let $\ell^1 \subset \mathbb{R}^\infty$ be the set of sequences $(a_1, a_2, \dotsc)$, such that $\sum |a_j| < \infty$. If we consider the $\ell^1$ norm $\|\cdot\|_1$ and the supremum norm $\|\cdot\|_s$, then, $(\ell^1, \|\cdot\|_1)$ is complete, while $(\ell^1, \|\cdot\|_s)$ is not complete.  In this case, the identity $$   \begin{array}{rrcl}     \mathrm{id}:& (\ell^1, \|\cdot\|_1)& \to &(\ell^1, \|\cdot\|_s)     \\                 & x & \mapsto & x   \end{array} $$ is a continuous bijection but it is not open.  I want a counterexample in the opposite direction. That is, I want a linear continuous bijection $T: E \to F$ between normed spaces $E$ and $F$ such that $F$ is Banach but $T$ is not open. This is equivalent to finding a vector space $E$ with non-equivalent norms $\|\cdot\|_c$ and $\|\cdot\|_n$, such that $E$ is complete when considered the norm $\|\cdot\|_c$, and such that $$   \|\cdot\|_c   \leq   \|\cdot\|_n. $$ The Open Mapping Theorem implies that $\|\cdot\|_n$ is not complete.  So, is anyone aware of such a counterexample?


Given the following three predicates: $A(x)$: $x$ is Emily $B(x)$: $x$ is student $C(x,y)$: $x$ is a book of $y$. Translate the following sentence into a predicate logic expression: Emilies' books are books of students. My ideas: I had trouble to translate "Emilies' books", since knowing that would be easy to construct given sentence. I think using two universal quantifiers would help, but unsure on how to construct "Emilies' books" part.

Assume that given three predicates are presented below: $H(x)$: $x$ is a horse $A(x)$: $x$ is an animal $T(x,y)$: $x$ is a tail of $y$ Then, translate the following inference into an inference using predicate logic expressions and prove whether inference is valid or not (for instance, using natural deduction): Horses are animals.  Horses' tails are tails of animals. My thoughts: I am quite good at translating predicate logic expressions, but here I struggled to come up with formula for Horses' tails. My initial idea was to consider similar sentence such as "w is a tail of a horse" to form required inference, but it was not successful. Would be welcomed to hear your ideas about this task.


Prove that $\mathbb{N}$ contains uncountably many infinite subsets $(N_{\alpha})_{\alpha \in \mathbb{R}}$ such that $N_{\alpha}\cap N_{\beta}$ is finite if $\alpha \neq \beta$.  I think we have to assume that $\mathbb{N}$ has only countably many subsets of that kind and then arrive at a contradiction due to the finiteness of the intersection of any two distinct subsets between them. But I am unable to find the correct argument. What will be the possible approach here?

Can a countable set contain uncountably many infinite subsets such that the intersection of any two such distinct subsets is finite?


Prove that if $x,y \in R$, and $1 \leq p < \infty$ then $|x+y|^p \leq 2^p(|x|^p+|y|^p )$   what I'm thinking is  $|x+y|\leq |x|^p+|y|\le 2\cdot\max\{|x|,|y|\}$   Without loss of generality , let $\max\{|x|, |y|\}=|x|$  hence and $|x+y|\leq 2|x| \Rightarrow |x+y|^p \le (2|x|)^p = 2^p|x|^p $  $|x+y|^p \le  2^p|x|^p $ and since $|y| \ge 0 $, we have  $ |x+y|^p \le 2^p(|x|^p+|y|^p )$   Is there any idea I could have used here?

For any real numbers $a$ and $b$ and $1 \leq p < \infty$, prove that   $$|a+b|^p \leq 2^p \{ |a|^p +|b|^p \}$$  This inequality is given in the the book Real Analysis by Royden, Chapter $7$, page $136$. I don't understand how the author comes to this inequality. Can anyone provide some hints?


I am a software developer but not much of an OS/Hardware Guy, I guess that's par for the course as they say.   I have a fully clean system here with 1TB. I have installed windows on a 500GB primary partition. I want to use the remaining space for Ubuntu.   Here is the deal. I want the system to just boot into windows, as it will be used by my wife 95% of the time. I want to be able to option at boot and select the Ubuntu drive when I need to.   To be clear, my current system is dual boot as well, but it goes to the grub screen to select my OS, I want to avoid this for her so she can just boot up.   What should I do before or when installing Ubuntu to accomplish successfully.

How do I set the bootloader so that in my dualboot with Windows 7/Ubuntu 11.04, Windows start up as standard instead of Ubuntu?


i have booked my online  ticket through irctc.co.in from Mumbai to chennai, but i forgot to change the boarding point to pune. will my seat will be empty when i board at pune. or else any procedure is there to change the boarding point,  if there is a procedure to change to which station i have to approach

I have booked a ticket on a train from Mumbai to Chennai and boarding at Pune. Since my schedules have changed, I will be in Mumbai on that day. Can I board the same train in Mumbai in my own ticket and claim the seat/berth?


Which of the followings is correct?      1) why you did not drink that juice?      2) why did not you drink that juice?   I think both of them are correct but I don't know which one is more formal! Any further explanations will be appreciated. :)

What is the difference between:        "How it works?"      and        "How does it work?"


Say there are several answers to a question, and I realize that if I borrow some information from other answers all the information addressing the question will be in one place. What should I do? Do people here care more about their reputation or about user experience?

I have noticed several times that when answering a question, someone who wrote an earlier answer will edit their answer by adding the content of my answer to theirs (as an alternate solution, or to make their answer more complete).  This is often a good thing for the community, because we want accepted answers to be as good as possible, but it seems unfair to the people who made the effort to provide the original content.  This is inherently a problem with the fact that answers are not collaborative (i.e. the site is not a wiki) but is it possible to solve this problem in some clever way? Or is it something we just need to deal with?


Hey I've recently started using Java, and I'm having trouble with a program I'm writing. Ive seen how the teacher has had his solution done but I dont see any difference in my solution compared to his except for me using a different equals in the if statements, and the names are different.  Can anyone tell me why I may be getting a 0.0 instead of a actual number grade?  * Grade Class *  public class Grade { private String grade;  public Grade(String getGrade) {     grade = getGrade; }  public double getNumericGrade() {  double total = 0;  double add = 0;      String firstLetter = grade.substring(0, 1);     if (grade.length() > 1)     {         String minusOrPlus = grade.substring(1, 2);         if(minusOrPlus == "+")             add = 0.3;         if(minusOrPlus == "-")             add = -0.3;     }      if (firstLetter == "A")     {         total = 4;         if (add < 0)              total = total + add;     }     else if (firstLetter == "B")         total = 3 + add;     else if (firstLetter == "C")         total = 2 + add;     else if (firstLetter == "D")         total = 1 + add;     else if (firstLetter == "F")         total = 0;      return total; } }   Ive tested to see if my tester is wrong but if I put in the teachers code my tester works fine so I know it isnt that. But here it is anyway..  * GradeTester *  import java.util.Scanner;  public class GradeTester { public static void main (String[] args){     Scanner in = new Scanner(System.in);       System.out.print("Hey what letter grade did you get ? : ");     String letterGrade = in.next();     Grade x = new Grade(letterGrade);      System.out.print("Your letter grade was " + letterGrade + " That means your number grade is "      + x.getNumericGrade());     System.out.println("");    } }   If you could help me out that would be awesome.  Thanks, Nathan

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


"One of the features that emerge" or  "One of the features that emerges"  Is 'one feature' the subject, therefore it emerges, or are 'features' the subject and they therefore 'emerge' ?  I keep looking at this sentence but can't decide! thanks.

Recently at work I was writing the following, and I have not been able to get a firm answer on which version is the most grammatically correct. The sentence is:     We would like to use one of the cables that _________ between rooms.   Is the correct conjugation run or runs?  I think 'run' is correct, because I think that the verb in the prepositional phrase is referring to 'cables' not 'one.' However, a number of colleagues have said that 'runs' is correct because one is singular.


I have seen similar question to mine, but have not been able to find an approach such as this approach to this question. So the problem is to prove that any complete metric space without isolated points, is uncountable. My attempt so far has been the following: From the definition of isolated point we know that all such elements belong to the set $ X\setminus X' $. Since there is no such element, we conclude that  $ X=X' $. Because $ X\neq\emptyset$, and $ X=X' $, we deduce that $ X $ is infinite. We maintain that $ X $ is uncountable. Suppose on the contrary that it is countable. Then we assume it to be $ X=\lbrace x_{1},x_{2},\cdots\rbrace $. Let $ x_{1}\neq y_{1}\in X $ and $ r_{1}<1 $ be respectively a point and a positive real number, such that $ x_{1}\notin N_{r_{1}}[y_{1}] $.(The notation $ N_{r_{1}}[y_{1}] $ simply means a close ball with center $ y_{1} $ and radius $ r_{1} $.) Then, we choose point $ x_{2}\neq y_{2}\in X $ and $ r_{2}<\frac{1}{2} $ to be a point and a positive real number such that$ N_{r_{2}}[y_{2}]\subset N_{r_{1}}(y_{1}) $(Should I state the usage of "Axiom of Choice" here?If yes,how?). Because $ X $ is an infinite set, we are allowed to repeat this process infinitely(Is this true?). Therefore we attain a chain of closed balls: \begin{align*}   N_{r_{1}}[y_{1}] \supset N_{r_{2}}[y_{2}] \supset\cdots\qquad;r_{n}<\frac{1}{n}  \end{align*} Let $ b_{n}=\lbrace N_{r_{n}}[y_{n}]\rbrace $ be a sequence in $ X $. We claim that $ \lbrace b_{n}\rbrace $ is Cauchy.(I have no idea how to proceed further.) Could you please assist me with the questions embedded in the text and suggest a way to complete the proof?

I was playing with Baire's Theorem, and seemed to deduce the following:     In a complete metric space $X$ that has no isolated points, any countable intersection of open dense sets is uncountable.   Proof: Let $S$ be the countable intersection of open dense sets $\{U_n\}$. By Baire's Theorem $S$ is dense thus $U_n$ are open and dense. This implies that $U_n^c$ are nowhere dense.  $$X = S\cup S^c = S\cup (\bigcap_n U_n)^c = S\cup \bigcup_n U_n^c.$$ If $S$ were countable, then $X = \bigcup_{s\in S}\{s\} \cup \bigcup_n U_n^c$. Since $X$ has no isolated points, every singleton set is closed and has empty interior, thus nowhere dense. We have just written $X$ has a countable union of nowhere dense sets. A contradiction to Baire's corollary.  As a corollary, any connected complete metric space, such as $\mathbb{R}$, must be uncountable (this gives a topological proof that $\mathbb{R}$ is uncountable). Also $\mathbb{Q}$ is not the intersection of open dense sets of $\mathbb{R}$.  I am a little bit suspicious about my proof, is it correct?


I went to an interview and there was a question that I couldn't solve, I am not $100$% sure about the exact wording, but I think was something like this:  Given $n$ different random numbers $\{a_1, a_2,...,a_n\}$, we want to find the maximum of these numbers. First let $m=a_1$. Then, we compare $m$ to $a_2$, if $m>a_2$, reassign $m$ to be $a_2$, but if $m<a_2$, then $m$ value doesn't change. With the same method, compare $m$ to the rest of the numbers. After we're done comparing all the numbers, $m$ would be the maximum value. What is the average number of assignments of $m$ to find the maximum of the list?"  P.S - I think that setting $m=a_1$ also counts as one assignment.

This is a problem of my homework. An asset price is modeled by using a sequence of independent and identically distributed continuous random variables $X_1,X_2,...$, with common density function $f(x)$. We say that a record price occurs at time $n$ if $Xn > \max(X_1,X_2,...,X_{n-1})$. Compute $P[a\ record\ price\ occurs\ at\ time\ n]$. Next, consider the variable $Y_i$ defined as: $Y_i = 1$ if a record occurs at time $i$. $Y_i = 0$ otherwise. Give the expected number of records by time n.  I already know the probability of a record price occurs at time $n$ is $\frac{1}{n}$. And let $Z_n$ be the number of records by time n. Then $Z_n = Y_1 + Y_2 + Y_3 +...+ Y_n$. Then the expected value of $Z_n$ should be $1 + 1/2 + 1/3 +...+ 1/n$. But in my homework, my professor suggested that "do not attempt to calculate the sum". Is calculating the sum here wrong? Or there is a better way to do the problem?  Thank you!


What people are doing is basically taking the UA-XXXXXX code that you normally get with analytics, and they are generating calls against it. This is skewing my analytics stats. On top of that, in Google WebMaster tools, it's also causing this:    It looks like somehow these pages, with my code on or at least with the generated code on, is making Google Webmaster tools think I have lots of 404's. This can't possibly be good for my rankings.  Anyone know if there is anything you can do to stop this?

Last months I have lots of referrer spammers in my GA statistics. Their count is ~10x higher than count of legit visitors (my site is not very popular yet). I've turned on an option to hide known spammers in GA settings, but it didn't help at all. It seems these spammers are using scripts to spam directly to GA (i.e. they are not logged in my IIS).  Is there anything I can do to stop these spammers?    UPD 10 months later, and they started spamming using fake target page names... and Google is still doing nothing about it.


Opening doors, offering to pay the tab, helping with a coat or a light of the smoke: we may describe these acts of a man to be gentlemanly.  In a word, how may we describe these acts of any person?

At my office when referring to customers or external vendors I often use the word gentleman. I do this in effort to show that I’m speaking respectfully about them so the content and tone of my statement is less likely to be mistaken. For example, “I spoke with the gentleman about the issue he was having and it turned out he forgot to turn his computer on.”  However, when the subject is a female the use of the word lady doesn’t seem to project the same level of intended respect.  Is there an alternative female or gender neutral word that I could use in these cases?


When someone suggests an edit I get a notification so I can approve. But it looks like if someone with enough reputation points edits my question, it doesn't send anything.  Shouldn't I get a notification? In case I don't agree with the changes, have a chance to rollback to original version.

Normally, when a user edits one of my posts, I receive a notification like on the following depending on the case   User has editing privilege (click to visit revision)   Users' edit is submitted to review queue (click to visit review queue)     The above notifications were received instantaneously (or less than 30 minutes, in case caching is supposed to be the answer) as the edit was done/suggested.  But I did not receive any such notification today (yet) on an edit made on my . I think it is a possible bug and should be looked at. The recent notifications list I have is shown below:


From Putnam and Beyond. My question is, how does this proof work? I'd like to know more about the intuition behind its mechanics.  Prove that there is no polynomial $P(x) = a_n x^n +  a_{n-1} x^{n-1} + \ldots  + a_0 $, with integer coefficients and of degree at least 1 with the property that $P(0), P(1), P(2), \ldots ,$  are all prime numbers.  Solution:     Assume the contrary. Let $P(0) = p$ with $p$ prime.Then $a_0 = p$. And $P(kp)$ is divisible by $p$ for all $k \geq 1$.Because we assumed that all these numbers are prime, it follows that $P(kp) = p$ for $k \geq 1$.Therefore, $P(x)$ takes the same value infinitely many times, a contradiction.Hence the conclusion.

Doing a discrete math review and am trying to solve problem 1.6 in the text found here:  - I believe I've gotten parts (a) and (b) correctly, but (c) is a bit tricky for me. Would appreciate a review of a/b and a hint for c if possible. Restatement here:  For n = 40, the value of polynomial $p(n)::=n^2 + n + 41$ is not prime, as noted in Section 1.1. But we could have predicted based on general principles that no nonconstant polynomial can generate only prime numbers.  In particular, let $q(n)$ be a polynomial with integer coefﬁcients, and let $c::=q(0)$ be the constant term of q.  (a) Verify that $q(cm)$ is a multiple of c for all $m \in Z$  Proof: Since q is a polynomial, it will be of the form: $q(x) = a_nx^n+a_{n-1}x^{n-1} + ... + a_1x + c$  If $x = cm$, then notice that cm will be inside every term of the polynomial, and since the final term is c, c can be factored out of every term. Hence, q(cm) is a multiple of c for all $m \in Z$.  b) Show that if q is nonconstant and c > 1, then as n ranges over the nonnegative integers, $N$, there are infinitely many $q(n) \in Z$ that are not primes.  Proof: Continuing from the result found in (a), it is easy to see that for all $m \in Z$, there will be an infinite number of multiples of c that will be generated by q. Since c > 1, these multiples are guaranteed not to be prime.  c) Conclude that for every nonconstant polynomial, q, there must be an $n \in N$ such that $q(n)$ is not prime. Hint: Only one easy case remains.  c = 0 is trivially easy to prove using the (b) above.  I assume the "easy" case is referring to c = 1, but in this case I'm not sure how to continue, since the result of (a) and (b) don't apply: I can't use them since adding 1 to any even number may make it prime. If the result of the terms not including c is odd, then adding 1 to that result makes it even and it is not prime. However, if the terms add up to an even number, I don't see a way of using the knowledge I have so far to prove conclusively that that number + 1 will NOT in fact be prime.


I recently got accepted into one of the schools in Europe. According to the anticipated date mentioned in the offer letter, my studies will start in Dec 2017. Now, the problem is that I've got two papers ready for submission at the moment and I don't have the faintest idea what to put for my affiliation. Any ideas?  Just to clarify that this question is not a duplicate: When I was working on the above-mentioned studies, I was not either employed by or affiliated with my former university. My former supervisor did help me out with some parts of the papers, but rather as a colleague or a friend than as a "supervisor" in the true sense of the word.   Thank you

Recently I've changed jobs, and consequently the field of research has also changed. But I'm still getting proposals for publications in the previous field, and it is interesting for me to accept some of them. My concern is about which affiliation to use: on one hand I gain all the knowledge in that field while working on the previous employer, also I hope they can cover my expenses related to the publication. On the other hand, I do not work for them anymore, and my current company has very little interest in my old field of research, and probably will not support it financially, but I think it is wise to mention them as well. As a compromise I'm thinking to put the previous employer in the affiliation, and the name of my new employer in the footnote, something like "currently at XYZ". Surely I'll discuss this issue with both, although the opinion of the community is also very valuable.


I just noticed I was able to vote on a question that was closed.  I found that a bit strange. Is there any time when you can't vote on a question/answer? i.e. does it ever get locked also?

A post can be locked.   What does it mean to lock a post? Who can lock a post? When should a post be locked?


Last night I received 500 points extra without any (to me know) particular reason.  I still had a browser open so here's a screenshot of my stats of yesterday:    and currently it's:    with no actual trace of any cause.  Does anybody know what could have happened?

My reputation on Stack Overflow suddenly raised from 35k to 45k! And it seems that on other sites as well! It must have been in the past hour!  What happened? I don't see any record in the reputation history or jump in the chart, everything is just smooth! And it seems it happened on other sites as well!  I'm not complaining, just curious! :-)  EDIT: The discussion was "it was in the banner, you should have read it", and when I replied that I am closing banners without reading, and important announcements like that should be in the notification box, I got comments like "Oh yeah not reading banners is bad".  Now look at this and tell me: is anyone still surprised that I got used to closing banners without reading?? ;-)


In light of the discovery of the Higgs boson. The Higgs Boson is a force particle which interacts with matter particles. My question is what does the Higgs Boson interact with to give itself mass.

If the Higgs field gives mass to particles, and the Higgs boson itself has mass, does this mean there is some kind of self-interaction?  Also, does the Higgs Boson have zero rest mass and so move at light-speed?


I don't know if you've ever experienced such a behavior from your mouse pointer but it's happened to me several times.    The thing is, when I buy a brand new mouse, everything is fine for some time (a year or two) but after that, the mouse pointer starts twitching sometimes.    I first thought it's because of those old ball mice and due to their mechanical nature that this happens. But it keeps happening to the optical mouses too. I wonder what might cause this problem and how to avoid it?    This happens when the mouse is idle. I mean I'm not touching it at all and I use a standard mouse pad.

I have noticed for a few months that my mouse will randomly jerk across the screen. I'm super paranoid about security. But this is just silly!  Has anyone else experienced this, and found out what causes it? It happens to me every couple of days. The cursor will jump across the screen about 1000+ pixels. I thought it was my mousepad - changed it, and that's not it.  I imagine it's just a hardware issue.  This is on a PC with a Razer Naga, wired mouse. The mouse worked for about a year before I started noticing these issues. They have persisted even after a reformat / reinstall.


What are the advantages/disadvantages of int and Int32? And Why should we use first instead of second?

In C#, int and Int32 are the same thing, but I've read a number of times that int is preferred over Int32 with no reason given. Is there a reason, and should I care?


I am searching fo an appropriate symbol in latex for the concatenation between two sets  Thanks,  I want a symbol like this in the  following image

I know what my symbol or character looks like, but I don't know what the command is or which math alphabet it came from. How do I go about finding this out?


I encountered a very strange problem. I wrote an enumerate after a long table, the enumerate text will be printed outside the bottom of a page, and some item text can not be shown. I simplified a latex code, only used a picture and a longtable.  I want to know why this happened, although I know how to avoid it this time, but I can't avoid every situation I will encounter later if I don't know the reason.  \documentclass[12pt]{article} \usepackage{graphicx} \usepackage{longtable}  \begin{document} \begin{figure}   \centering   \includegraphics[scale=1]{example-image}   \caption{aaa} \end{figure}  \begin{longtable}{ll} \hline   a & b\\   a & b\\   a & b\\   a & b\\   a & b\\   a & b\\   a & b\\   a & b\\   a & b\\ \hline \end{longtable}  a\\a\\a\\a\\a\\a\\a\\a\\ enumerate1 \begin{enumerate}   \item a   \item b   \item c   \item d   \item e   \item f   \item g   \item h \end{enumerate}  enumerate2 \begin{enumerate}   \item i   \item j   \item k   \item l   \item m   \item n \end{enumerate}  enumerate3 \begin{enumerate}   \item a   \item b   \item c   \item d   \item e   \item f   \item g   \item h \end{enumerate}  \end{document}   Look at the error picture as follows, enumerate1 is under the page number, beyond the bottom of the page; and enumerate2 can not be shown. The result of the typeset is wrong.

I noticed that the tabu package seems to have problems with its longtabu environment, if it is placed on a page, where a float already is placed.  Consider the following MWE:  \documentclass[10pt]{article} \usepackage{longtable,tabu} \usepackage{lipsum}  \begin{document}      \begin{table}         \begin{tabular}{ccc}             Row 1 & Row 1 & Row 1 \\             Row 2 & Row 2 & Row 2 \\             Row 3 & Row 3 & Row 3 \\             Row 4 & Row 4 & Row 4 \\             Row 5 & Row 5 & Row 5 \\             Row 6 & Row 6 & Row 6 \\             Row 7 & Row 7 & Row 7 \\             Row 8 & Row 8 & Row 8 \\             Row 9 & Row 9 & Row 9 \\             Row 10 & Row 10 & Row 10 \\         \end{tabular}     \end{table}      \lipsum[1-2]      \begin{longtabu}{X[l]X[c]}         Test & Test     \end{longtabu}      \lipsum[10]      {         \footnotesize         \begin{longtabu}{|X[-4,l]|X[r]|X[r]|X[r]|}             \hline             Col 1 & Col 2 & Col 3 & Col 4 \\\hline             Lorem ipsum dolor sit & 0.000019 & 0.000000 & 0.000000 \tabularnewline\hline             Lorem ipsum dolor sit & 0.000012 & 0.000000 & 0.000000 \tabularnewline\hline             Lorem ipsum dolor sit & 0.000173 & 0.000000 & 0.000000 \tabularnewline\hline             Lorem ipsum dolor sit & 0.000011 & 0.000000 & 0.000000 \tabularnewline\hline             Lorem ipsum dolor sit & 0.012992 & 0.000000 & 0.000000 \tabularnewline\hline             Lorem ipsum dolor sit & 0.000031 & 0.000000 & 0.000000 \tabularnewline\hline             Lorem ipsum dolor sit & 0.000068 & 0.000000 & 0.000000 \tabularnewline\hline             Lorem ipsum dolor sit & 0.000018 & 0.000000 & 0.000000 \tabularnewline\hline             Lorem ipsum dolor sit & 0.029689 & 0.000000 & 0.000000 \tabularnewline\hline             Lorem ipsum dolor sit & 0.000055 & 0.000000 & 0.000000 \tabularnewline\hline             Lorem ipsum dolor sit & 0.000004 & 0.000000 & 0.000000 \tabularnewline\hline             Lorem ipsum dolor sit & 28.276892 & 0.405603 & 1.560010 \tabularnewline\hline             Lorem ipsum dolor sit & 0.957158 & 0.234002 & 0.702005 \tabularnewline\hline             Lorem ipsum dolor sit & 0.000011 & 0.000000 & 0.000000 \tabularnewline\hline             Lorem ipsum dolor sit & 0.000002 & 0.000000 & 0.000000 \tabularnewline\hline             Lorem ipsum dolor sit & 0.000013 & 0.000000 & 0.000000 \tabularnewline\hline             Lorem ipsum dolor sit & 0.000336 & 0.000000 & 0.000000 \tabularnewline\hline             Lorem ipsum dolor sit & 0.000004 & 0.000000 & 0.000000 \tabularnewline\hline             Lorem ipsum dolor sit & 0.000003 & 0.000000 & 0.000000 \tabularnewline\hline             Lorem ipsum dolor sit & 0.000003 & 0.000000 & 0.000000 \tabularnewline\hline         \end{longtabu}     }  \end{document}   Note that the last table is broken in a wrong way at the bottom of page 1. I guess that the wrong offset for the table break is exactly the vertical dimension of the first table, which is enclosed in a floating environment.  However, I don't know how to fix the wrong table break. I have many pages containing floating tables, but at some places I would like to have long tables with longtabu, as exactly as in the MWE.  Can anybody tell me how to fix the wrong table break?