body1
stringlengths
20
4.1k
body2
stringlengths
23
4.09k
I'm trying to create a tikz picture along the lines of only with the blue colour fading out as it gets to the edge of the blue strip. Ideally, the blue bar should be fully blue in the middle (at the point (-1,0) to be precise), and white at the outer edges (the points (0,1) and (0,-1)). The picture above was created as follows. \documentclass{article} \usepackage{tikz,xcolor} \begin{document} \begin{tikzpicture} \draw[line width=0.25cm, blue] (90:1) arc [start angle=90, end angle=270, radius=1]; \draw[thick] (0,0) circle [radius=1]; \end{tikzpicture} \end{document}
How can I shade a path witout filling? In particular, I wand to draw a curved arrow that starts colored blue and ends colored green, where in between it gradually changes its color. I can't find a way to shade a path without filling it. The following code does not work, as it shades the filling area, although it compiles. \documentclass{article} \usepackage{tikz} \usetikzlibrary{calc,automata,patterns,decorations,decorations.pathmorphing} \usetikzlibrary{fadings} \begin{document} \begin{tikzpicture} \draw[path fading=south,very thick,top color=blue!80!white, bottom color=green!80!white,->] (0,0) .. controls +(0,-1) and +(0,1) .. (1,-2); \end{tikzpicture} \end{document}
Solve the equation $\cos^n(x) - \sin^n(x)=1,n \in \mathbb{N}-\{0\}$ If $n$ is even then $\cos^n(x) = \sin^n(x)+1$ is only possible if $\sin(x)=0$ therefore the solution is $x=k\pi, k \in \mathbb{Z}$. I'm having problems with $n$ odd case. UPDATE For $n=1$ we have $\cos(x) - \sin(x)=1$ and by squaring we get $sin(x)cos(x)=0$ which leads to $x=k\pi$ or $x=\pm \frac \pi 2 + k\pi$. From these solutions, only $x=2k\pi$ and $x=- \frac \pi 2 + 2k\pi$ are valid. Also $x=2k\pi$ and $x=- \frac \pi 2 + 2k\pi$ are solutions for all odd $n$
Solve $\cos^{n}x-\sin^{n}x=1$ with $n\in \mathbb{N}$ I have no idea how to deal with this crazy question. One idea came into my mine is factorization, but I can't go on... Can anyone help me please? Thank you.
Question: Find the integral $$I=\int\dfrac{1}{\sin^5{x}+\cos^5{x}}dx$$ my solution: since \begin{align*}\sin^5{x}+\cos^5{x}&=(\sin^2{x}+\cos^2{x})(\sin^3{x}+\cos^3{x})-\sin^2{x}\cos^2{x}(\sin{x}+\cos{x})\\ &=(\sin{x}+\cos{x})(1-\sin{x}\cos{x})-(\sin{x}+\cos{x})(\sin^2{x}\cos^2{x})\\ &=(\sin{x}+\cos{x})[1-\sin{x}\cos{x}-\sin^2{x}\cos^2{x}) \end{align*} then let $$\sin{x}+\cos{x}=t\Longrightarrow \sin{x}\cos{x}=\dfrac{1}{2}(t^2-2)$$ then $$\sin^5{x}+\cos^5{x}=t[1-\dfrac{1}{2}(t^2-2)-\dfrac{1}{4}(t^2-2)^2]=-\dfrac{1}{4}t(t^4-2t^2+4)$$ $$x+\dfrac{\pi}{4}=\arcsin{\dfrac{t}{\sqrt{2}}}\Longrightarrow dx=\dfrac{1}{\sqrt{2-t^2}}dt$$ so $$I=-4\int\dfrac{dt}{t\sqrt{2-t^2}(t^4-2t^2+4)}=-2\int\dfrac{1}{u\sqrt{2-u^2}(u^2-2u+4)}du$$ where $u=t^2$ Then I can't, because this wolf can't Thank you for you help
Solve the following indefinite integrals: $$ \begin{align} &(1)\;\;\int\frac{1}{\sin^3 x+\cos^3 x}dx\\ &(2)\;\;\int\frac{1}{\sin^5 x+\cos^5 x}dx \end{align} $$ My Attempt for $(1)$: $$ \begin{align} I &= \int\frac{1}{\sin^3 x+\cos ^3 x}\;dx\\ &= \int\frac{1}{\left(\sin x+\cos x\right)\left(\sin^2 x+\cos ^2 x-\sin x \cos x\right)}\;dx\\ &= \int\frac{1}{\left(\sin x+\cos x\right)\left(1-\sin x\cos x\right)}\;dx\\ &= \frac{1}{3}\int \left(\frac{2}{\left(\sin x+\cos x\right)}+\frac{\left(\sin x+\cos x \right)}{\left(1-\sin x\cos x\right)}\right)\;dx\\ &= \frac{2}{3}\int\frac{1}{\sin x+\cos x}\;dx + \frac{1}{3}\int\frac{\sin x+\cos x}{1-\sin x\cos x}\;dx \end{align} $$ Using the identities $$ \sin x = \frac{2\tan \frac{x}{2}}{1+\tan ^2 \frac{x}{2}},\;\cos x = \frac{1-\tan ^2 \frac{x}{2}}{1+\tan^2 \frac{x}{2}} $$ we can transform the integral to $$I = \frac{1}{3}\int\frac{\left(\tan \frac{x}{2}\right)^{'}}{1-\tan^2 \frac{x}{2}+2\tan \frac{x}{2}}\;dx+\frac{2}{3}\int\frac{\left(\sin x- \cos x\right)^{'}}{1+(\sin x-\cos x)^2}\;dx $$ The integral is easy to calculate from here. My Attempt for $(2)$: $$ \begin{align} J &= \int\frac{1}{\sin^5 x+\cos ^5 x}\;dx\\ &= \int\frac{1}{\left(\sin x+\cos x\right)\left(\sin^4 x -\sin^3 x\cos x+\sin^2 x\cos^2 x-\sin x\cos^3 x+\cos^4 x\right)}\;dx\\ &= \int\frac{1}{(\sin x+\cos x)(1-2\sin^2 x\cos^2 x-\sin x\cos x+\sin^2 x\cos^2 x)}\;dx\\ &= \int\frac{1}{\left(\sin x+\cos x\right)\left(1-\sin x\cos x-\left(\sin x\cos x\right)^2\right)}\;dx \end{align} $$ How can I solve $(2)$ from this point?
I'm making an adventure map in Minecraft. I've been trying to make a key that opens a door and then deletes itself from your inventory. I got it to work flawlessly without NBT tags, using a trip-wire hook as a key. After I assigned NBT tags to it thusly, tripwire_hook {display:{Name:"Key",Lore:["Opens one door"]}} the tripwire is now called a "Key" and describes exactly what it does and it even works to open the door. The command block that tests for the key in the players hand still works. Unfortunately, the /clear @p command block will not recognize the item whether I add the NBT tag after "tripwire_hook" or not. Here is the command that I've used: /clear @p tripwire_hook 1 {display:{Name:"Key",Lore:["Opens one door"]}} Just to be safe, I tried the following: /clear @p tripwire_hook 1 1 {display:{Name:"Key",Lore:["Opens one door"]}} /clear @p tripwire_hook 0 1 {display:{Name:"Key",Lore:["Opens one door"]}} And it will still not clear the item. I'm using Minecraft 1.8.3. Can anyone please advise?
Recently I've been messing around with making a few minigames, and have used a few plugins to help make it easier to create and run them. However, a newer one I'm making requires me to use the /summon command in order to spawn zombies. However, no matter what I put in, I can't spawn hostile mobs. All other entities still spawn perfectly fine. Strangely, the /spawnmob command which comes with Essentials can summon hostile mobs fine. I would rather use /summon since it's more customizable though. Here's a list of plugins I have installed. Essentials EssentialsChat HolographicDisplays PermissionsEx setspawn [A plugin I have made, just a simple timer] Vault VoxelSniper WorldEdit WorldGuard Please let me know if you have any ideas on what I'm doing incorrectly or isn't functioning the way it should.
I installed Ubuntu 14.04 and I would like to know what the best way is to update my drivers? My machine is a XPS 8700 Graphics card AMD Radeon. And why after install of Ubuntu on this machine I hear a sound on the PC like a ventilator like it's running very hard? By the way this ventilator works fine.
I am using a laptop and ubuntu 11.04. I would like the easiest way possible because I am new to linux. here is my display information: *-display description: VGA compatible controller product: Core Processor Integrated Graphics Controller vendor: Intel Corporation physical id: 2 bus info: pci@0000:00:02.0 version: 18 width: 64 bits clock: 33MHz capabilities: msi pm vga_controller bus_master cap_list rom configuration: driver=i915 latency=0 resources: irq:41 memory:d0000000-d03fffff memory:c0000000-cfffffff ioport:e080(size=8) *-communication UNCLAIMED description: Communication controller
thanks in advance for your help. I mentioned most of what was on each adapter, I know some will not be of any help but didn't want to miss anything. His computer model is: ASUS G47VW-BHI5N43 The original adapter (the one that was packed with his brand new computer) shows the following values: Model ADP180 HB D Input 100-240V ~ 2.25A 50-60Hz Output 19V 9.5 A Roman numeral value "V" C.C.: B REV. 3 S/N H00W2AN04FL The one that a seller has on ebay list for this same computer model shows the following values: (It is OEM ASUS adapter/charger and otherwise appears exactly like the original) Model ADB-150NB D Input 100-240V ~ 2.0A 50-60Hz Output 19.5V - 7.7A Roman number value "V" C.C. A REV. 3 S/N W6W0944061108 The both show N193V85, not sure what that is. It would be helpful to know whether or not this would work (and knowing why or why not would be even better)! Thank you!
I have a Toshiba Satellite laptop. My charger has stopped working. I have access to a Lenovo charger. Can I use this charger on my laptop?
Let $n \in \mathbb{N}$. How to compute the splitting field of $x^n-2$ over $\mathbb{Q}$? I did it like this: $x^n-2=0 \Leftrightarrow x=\sqrt[n]{2}$ Then $x=\sqrt[n]{2}$ is the root of $x^n-2$. So the splitting field is $\mathbb{Q}(\sqrt[n]{2})$. I'm not sure if this is complete. Or can another root be found here?
Show that the splitting field of $X^n-a$ over a field $K$ is $K(\alpha, \zeta_n)$, where $\alpha$ is a $n$-th root of $a$ and $\zeta_n$ is a primitive $n$-root of unity.
If I told her I love her now, she'd probably not take it seriously. If I told her I loved her now, she'd probably not take it seriously. In the above sentences the speaker loves the person they're talking about as of the present, so i was wondering whether both the sentences would be applicable in this context, and whether both of them could be deemed grammatically correct.
Which is correct? She was told that it was against the law to steal. Or She was told that it is against the law to steal. Background information: The original context is that I was relating an incident via email, where my colleague told a customer that some of our actions were part of the organisation's policy. The policy is still valid, but the statement I used to relate the incident in my email went like this: "Mr Jay was informed that it was our policy to do this." And I received feedback that it should go like this instead: "Mr Jay was informed that it is our policy to do this."
Here's what I know about dark matter: Astrophysicists realized the movements of galaxies and other astronomical bodies cannot be explained by the gravitational effects of matter known to be there, so either there is a lot of matter missing that doesn't react with light or general relativity needs to be fixed. For the purpose of this question, assume the former. I've read that this "dark matter" can't be composed of baryons (quarks and leptons). My question is how do we know that it can't be baryonic? After all, air is invisible. Maybe that's a bad analogy, but you get my point: Why can't there be matter that is invisible, yet composed of baryons?
There's more gravitational force in our galaxy (and others) than can be explained by counting stars made of ordinary matter. So why not lots of dark planetary systems (i.e., without stars) made of ordinary matter? Why must we assume some undiscovered and unexplained form of matter?
I have a Tensorflow.js model making predictions and I want to send a certain websocket message each time the predicted label changes. I have tried to store the latest label in a variable and compare that to the newest one. However, my "cat" websocket message is still activated each second even if the predicted label stays the same. Problem is probably some newbie mistake regarding the use of async function or storing the values - I would really appreciate any directions! Thank you so much. Code (cleaned to include only relevant bits): let newLabel; let oldLabel; async function app() { const model = await tf.loadGraphModel(MODEL_URL); console.log('Successfully loaded model'); const labels = ["cat", "dog", "human"]; console.log(labels); const webcam = await tf.data.webcam(video); var myPredict; async function predictFunction () { myPredict = setInterval (predictLoop, 1000); } async function predictLoop () { ... const result = await model.predict(t4d); result.print(); result.as1D().argMax().print(); const labelIndex = result.as1D().argMax(); const predictionLabel = result.as1D().argMax().dataSync()[0]; newLabel = labels[predictionLabel]; const predict = await result.data(); const value = predict[predictionLabel]; document.getElementById("demo").innerHTML = ` I can see a: ${newLabel}\n Confidence is: ${value}\n `; if (newLabel== "cat" && newLabel !==oldLabel){ var data = { speed: 100 } socket.emit("cat", data); sendParam ("/sound", 1); } else { socket.emit("other"); sendParam ("/sound", 2); } img.dispose(); result.dispose(); smalImg.dispose(); resized.dispose(); t4d.dispose(); tf.engine().endScope(); await tf.nextFrame(); } oldLabel = newLabel; predictFunction(); } app();
What is the scope of variables in javascript? Do they have the same scope inside as opposed to outside a function? Or does it even matter? Also, where are the variables stored if they are defined globally?
I often see signals like this: nickname > heroname is missing nickname > heroname is back To make call heroname is missing I click on hero icon. How to make call heroname is back? Are there more signals?
I know that there's a "Missing" command in the Chat Wheel that will report your lane missing, but that only does "Missing Top!" or "Missing Middle!" messages it seems. I've seen people call specific heroes missing before though: How are they doing this? Is it some kind of hotkey I haven't found? Is it some complicated custom bind? Is it just something simple that I'm missing?
SETLOCAL EnableDelayedExpansion FOR %%A IN (1 2 3) DO ( IF %%A EQU 1 ( SET CHOICE1=ABC ECHO CHOICE1=%CHOICE1% ) ) Output: CHOICE1= Why is CHOICE1 not getting set?
I have two examples of very simple batch files: Assigning a value to a variable: @echo off set FOO=1 echo FOO: %FOO% pause echo on Which, as expected, results in: FOO: 1 Press any key to continue . . . However, if I place the same two lines inside an IF NOT DEFINED block: @echo off IF NOT DEFINED BAR ( set FOO=1 echo FOO: %FOO% ) pause echo on This unexpectedly results in: FOO: Press any key to continue . . . This shouldn't have anything to do with the IF, clearly the block is being executed. If I define BAR above the if, only the text from the PAUSE command is displayed, as expected. What gives? Follow up question: Is there any way to enable delayed expansion without setlocal? If I were to call this simple example batch file from inside another, the example sets FOO, but only LOCALLY. For example: testcaller.bat @call test.bat @echo FOO: %FOO% @pause test.bat @setlocal EnableDelayedExpansion @IF NOT DEFINED BAR ( @set FOO=1 @echo FOO: !FOO! ) This displays: FOO: 1 FOO: Press any key to continue . . . In this case, it appears that I have to enable delayed expansion in the CALLER, which may be a hassle.
For a conference paper I have to use a custom package provided by the conference. This package contains the following line: \renewcommand{\thesection}{\arabic{section}.} which puts a dot after the number in a section title. Now, when I add a reference to a section, the dot is shown in the reference as well. MWE: \documentclass{article} % real code: % \usepackage{myconference} % MWE code: \renewcommand{\thesection}{\arabic{section}.} \begin{document} \section{First section} \label{sec:first} In Section~\ref{sec:first} the reference does not look good. \end{document} The style guide of the conference does not specify the appearance of section references. Therefore, I would like to remove the dot in the reference (while keeping the dot in the title itself). I am not allowed to change the conference package, but I can modify the code of my own paper, including redefining \ref (or using a custom command for referencing) if necessary. Any ideas?
I wonder is there any way to change the format of section numbering from 1.1 to 1.1. ? I know this is trivial, but I really need to add one more dot after the section number. Does anybody know how to do that? Thanks a lot
I am hitting a huge wall here. I got this code which checks on database result : chosenSlotDAO.open(); Log.d("id", chosenSlotDAO.getId()); Log.d("isParked", chosenSlotDAO.getIsParked()); Log.d("parkedRow", chosenSlotDAO.getParkedRow()); Log.d("selectedSlot", chosenSlotDAO.getSelectedSlot()); String idStatus = chosenSlotDAO.getId(); String isParkedStatus = chosenSlotDAO.getIsParked(); String parkedRowStatus = chosenSlotDAO.getParkedRow(); String selectedSlotStatus = chosenSlotDAO.getSelectedSlot(); final String outputA = this.getOutput(this, slotA); if(idStatus == id && isParkedStatus == isParked && parkedRowStatus != parkedA && selectedSlotStatus != slotA) { arriveTView.setText(alreadyParked + chosenSlotDAO.getParkedRow()); } else if(idStatus == id && isParkedStatus == isNotParked && parkedRowStatus != parkedA && selectedSlotStatus != slotA) { Toast.makeText(getApplicationContext(), wrongParkingRow, Toast.LENGTH_LONG).show(); chosenSlotDAO.updateSlot(id, slotA, parkedA, isParked); } else if(idStatus == id && isParkedStatus == isParked && parkedRowStatus == parkedA && selectedSlotStatus == slotA) { chosenSlotDAO.updateSlot(id, slotA, setEmpty, isNotParked); dbUpdateAdd.execute(slotA); Intent myIntent = new Intent(ParkAArrive.this, ParkLeaving.class); ParkAArrive.this.startActivity(myIntent); } else if(outputA.isEmpty()) { arriveTView.setText(isFull); } else { Toast.makeText(getApplicationContext(), nowParked, Toast.LENGTH_LONG).show(); chosenSlotDAO.updateSlot(id, slotA, parkedA, isParked); arriveTView.setText(chosenSlotDAO.getSelectedSlot()); dbUpdate.execute(slotA); } The class is started by tapping an NFC tag. LogCat returns : 06-15 04:35:10.818: D/id(12294): 1 06-15 04:35:10.818: D/isParked(12294): 1 06-15 04:35:10.819: D/parkedRow(12294): ParkedA 06-15 04:35:10.819: D/selectedSlot(12294): SlotA 06-15 04:35:10.829: D/link(12294): http://parkit.byethost9.com/db_show_slot.php?slot_name=SlotA 06-15 04:35:11.681: D/line(12294): 14 It clearly shows that user is parked, parkedRow is ParkedA, and SlotA is SlotA. But the if does not work. But when I start the activity again, nothing except else if(outputA.isEmpty()) { arriveTView.setText(isFull); } else { Toast.makeText(getApplicationContext(), nowParked, Toast.LENGTH_LONG).show(); chosenSlotDAO.updateSlot(id, slotA, parkedA, isParked); arriveTView.setText(chosenSlotDAO.getSelectedSlot()); dbUpdate.execute(slotA); } works. Where in the code am I doing wronggg?? Tell me if I left any required info untold.. UPDATE : It seems that I need to change my code so that it can compare String, and yes it's the problem I'm facing.
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?
In the instructions for Munchkin it says: "You can discard a Race card at any time, even in combat" "You can discard a Class card at any time, even in combat" but it doesn't state whether this applies to your hand, cards in play, or both. Does the rule apply to both? Also, does this mean that a player may discard these cards during any phase, even when it's not there turn?
In Munchkin (or any of its various sets) the rules say that "You can discard a Class card at any time, even in combat: "I don't want to be a wizard anymore." When you discard a Class card, you become classless until you play another Class card." It also says the same thing for Races, Accents, etc. for the various game sets. This wording suggests that the intent is that you can discard an "in play" Class at any time, but it isn't clear about such cards in the player's hand. I would prefer to discard the extra Elf card in my hand so that my opponent doesn't get it during the Charity phase. Can I discard the card rather than give it away? Note: The rules I am using are the most current rules from the 1st Edition, 23rd printing of Munchkin published May 2012.
I am unable to install a new software or upgrade the existing ones. I have been getting insserv warning () Please help.
I am seeing errors while trying to install Inkscapeor install any software for that matter. When I try to use sudo apt-get install language-pack-en-base it shows the same . I also tried sudo dpkg-reconfigure locales and then tried to installInkscape - but it is not working. abhilash@abhilash-Inspiron-3542:~$ sudo apt-get install inkscape [sudo] password for abhilash: Reading package lists... Done Building dependency tree Reading state information... Done The following additional packages will be installed: gawk libgsl2 libgtkmm-2.4-1v5 libgtkspell0 libimage-magick-perl libimage-magick-q16-perl libmagick++-6.q16-5v5 libwmf-bin python-numpy transfig Suggested packages: gawk-doc pstoedit dia | dia-gnome libsvg-perl libxml-xql-perl python-uniconvertor ruby gsl-ref-psdoc | gsl-doc-pdf | gsl-doc-info | gsl-ref-html imagemagick-doc gfortran python-dev python-nose python-numpy-dbg python-numpy-doc xfig The following NEW packages will be installed: gawk inkscape libgsl2 libgtkmm-2.4-1v5 libgtkspell0 libimage-magick-perl libimage-magick-q16-perl libmagick++-6.q16-5v5 libwmf-bin python-numpy transfig 0 upgraded, 11 newly installed, 0 to remove and 158 not upgraded. 8 not fully installed or removed. Need to get 0 B/16.9 MB of archives. After this operation, 107 MB of additional disk space will be used. Do you want to continue? [Y/n] y Setting up util-linux (2.27.1-6ubuntu3.3) ... insserv: warning: script 'K01runlcactivator' missing LSB tags and overrides insserv: warning: script 'runlcactivator' missing LSB tags and overrides insserv: There is a loop between service plymouth and procps if started insserv: loop involving service procps at depth 2 insserv: loop involving service udev at depth 1 insserv: Starting runlcactivator depends on plymouth and therefore on system facility `$all' which can not be true! insserv: Starting runlcactivator depends on plymouth and therefore on system facility `$all' which can not be true! insserv: Starting runlcactivator depends on plymouth and therefore on system facility `$all' which can not be true! insserv: Starting runlcactivator depends on plymouth and therefore on system facility `$all' which can not be true! insserv: loop involving service networking at depth 4 insserv: There is a loop between service plymouth and urandom if started insserv: loop involving service urandom at depth 4 insserv: loop involving service mountdevsubfs at depth 2 insserv: There is a loop at service runlcactivator if started insserv: Starting runlcactivator depends on plymouth and therefore on system facility `$all' which can not be true! insserv: Starting runlcactivator depends on plymouth and therefore on system facility `$all' which can not be true! insserv: Starting runlcactivator depends on plymouth and therefore on system facility `$all' which can not be true! insserv: Starting runlcactivator depends on plymouth and therefore on system facility `$all' which can not be true! insserv: There is a loop between service runlcactivator and dns-clean if started insserv: loop involving service dns-clean at depth 1 insserv: Starting runlcactivator depends on plymouth and therefore on system facility `$all' which can not be true! insserv: exiting now without changing boot order! update-rc.d: error: insserv rejected the script header dpkg: error processing package util-linux (--configure): subprocess installed post-installation script returned error exit status 1 Errors were encountered while processing: util-linux E: Sub-process /usr/bin/dpkg returned an error code (1) abhilash@abhilash-Inspiron-3542:~$ I have been told - the problem is that you are stuck at the boot sequencing. I see when I viewed the file [runlcactivator] Now please suggest how do I "completely purge the program and scripts from /etc/init.d/ and /etc/rc? files." - as is suggested in the answer? What is the command line to do this? I am not familiar with codes, so if instructions are specific I can just follow them as it is. Thanks for helping!
I just got serial downvoted, and I suspect it's . When do the scripts run, and would this instance be detected? It also looks like someone serial un-upvoted said nemesis, which is also poor behavior, as much as I dislike the guy. Is that detected as well?
I just noticed that I lost a bunch of points from my reputation score, and I used the "reputation" tab on my user profile page to try and track down the cause. During my investigation, I noticed there was an unusual event of type "reversal". In the normal place of a question title, it says "voting corrected". What does this mean, and what caused it? Did I do something wrong? Why did I lose all of that reputation? Is the system punishing me for leaving too many good answers? Is there any way to earn it back?
Hi I was going through closure concept in JavaScript. I am finding it difficult to understand it. Can someone please help me? function a(name) { return function () { console.log( "Hello "+ name); } } var b = a("MyName"); b(); According to closure, inner function will have access to its outer function's variables even after the execution of outer function is compeled and it's no more present in stack. Can some one please explain how inner function is able to access its variable even after execution for outer function is completed. I have tried above code and it's working as expected but I am confused?
How would you explain JavaScript closures to someone with a knowledge of the concepts they consist of (for example functions, variables and the like), but does not understand closures themselves? I have seen given on Wikipedia, but unfortunately it did not help.
I'm thinking of running a Pathfinder campaign for Skype (text only) and I don't have a group of players. How can I go about recruiting people for play-by-chat games instead of in-person? Are there any online sites in which you can look for people that are looking to play in an online play-by-chat RPG Campaign?
I'd really like to learn how to play pen-and-paper RPGs. I know that it takes a few players to actually sit down and play, but I'm not at all sure where to find more gamers. How do I find existing groups to join? Or, are there any resources online that may help me find existing RPG groups or players?
Please change the tag search to be case insensitive. Also, optionally set that text entry field to be lower case since tags are predominantly lower case. The screen shot show what happens if you start typing i, o, s...
Selecting the tags for this question is kind of annoying in the iOS app because the tag search is case-sensitive and my iPhone keeps "correcting" ios when I type on the dash. The site tag search seems to be case insensitive, so I'd expect the app to behave the same. the text entry field should be programmed to not be sentence case even if caps are entered intentionally, the internal search should be case insensitive. This fix is also needed on the tags search on the main site feed browsing pane.
I attached an image with a limit, how can I solve that limit? If I use mean value theorem for integral it will be indeterminate form infinity * zero.
$$f(x)=\lim_{n\to\infty}\biggl(n\int_0^{\pi/4}(\tan x)^n\,dx\biggr)$$ I try to this way, $\tan x\ge x$, when $x\in(0,\frac\pi4)$, but this turns out to be $\tan x\ge0$, which is obvious even without calculation. I think it can be solved by using the squeeze rule but I can't find a proper scaler to meet $A=g(x)\le f(x)\le h(x)=A$ when $n\to\infty$ $\color{red}{Edit}$: According to@Khallil's advice, I can solve that $f(n)+f(n+2)=\frac1{n+1}$, and it's trivial that $\frac1{n+1}=f(n)+f(n+2)\le 2f(n)\le f(n-2)+f(n)=\frac1{n-1}$. So $f(x)=\frac12$. This is easy and quick. Btw, is there any other idea? $\color{red}{Edit[2]}$: I find that @Byron Schmuland 's method is especially useful in a specific kind of problem. $$f(x)=\lim_{n\to\infty}\int_0^1\frac{x^n}{1+x}dx$$,for example, Let $X_,...,X_n$ be i.i.d. random variables with density$f(x)=1$ on $(0,1)$, CDF(cumulative density function) of $X$ is $F(x)=x$. Now let $M=\max(X_1,\dots,X_n)$, its density function is: $f_M(x)=nx^{n-1}$ for $x\in(0,1)$ Also, it's also not hard to see that $M\to1$ in distribution as $n\to\infty$. So,$$f(x)=\lim_{n\to\infty}\int_0^1\frac{x^n}{1+x}dx=\lim_{n\to\infty}\frac1n\int_0^1{f_M(x)\frac{x}{x+1}dx}=\lim_{n\to\infty}\frac1nE(\frac{M}{M+1})=0$$ Although this simple example can be solved by other ways more easily, but this gives us another perspective.
I am new in php, I have 3 arguments in a function function cal($x,$y,$op){ $z=$x.$op.$y; return $z; } echo cal(3,4,'/'); And I also try this: $z=$x$op$y; and I am getting 3/4 as answer but I want 0.75
I have 3 variables like this: $first = 2; $second = 5; $operation = '*'; how can I programaticly assign the solution to this math problem to the $answer variable? I have tried eval(), but that does not work.
Prove that if M and N are closed linear spaces and $M \perp N$, then $M \oplus N$ is a closed linear space. I'm having trouble starting this one. Do I need to consider cauchy sequences in each M and N?
I'm working on the following problem set. Let $\mathcal{H}$ be a Hilbert space and $A$ and $B$ orthogonal subspaces of $\mathcal{H}$. Prove or disprove: 1) $A \oplus B$ is closed, then $A$ and $B$ are closed. 2) $A$ and $B$ are closed, then $A \oplus B$ is closed. I could prove 1) and if my proof is correct, it even holds if $\mathcal{H}$ is just an inner product space. Unfortunately, I can't manage to prove 2). Since $\mathcal{H}$ is by assumption a Hilbert space and I didn't use that fact to prove 1), I should probably use it here. It means that $A$ and $B$ are also complete. Given some convergent sequence in $A \oplus B$, I want to show that the limit is also in $A \oplus B$. Here I'm stuck. I want to use the completeness of $A$ and $B$, but I don't see how to obtain suitable Cauchy sequences. Can anyone drop me a hint? Or is my approach all wrong?
All cells containing a nucleus present MHC-I, while some specialized cells present MHC-II in addition to that. Since erythrocytes lack any MHC why do natural killer cells not attack them? It is my understanding that any cell which starts presenting foreign peptides on MHC-I will undergo apoptosis after Th finds them, or if they stop presenting anything at all, they will be eliminated by the NKs. So what mechanism prevents erythrocytes from being destroyed by the immune system?
Do red blood cells have no MHC? (I have often heard that they do not.) If so why are they not destroyed by immune cells?
In Heisenberg's book "The Physical Principles of the Quantum Theory", he presents the following derivation of the Schrödinger Equation from his own, Matrix-based, Quantum Mechanics. A matrix $x$ has components $x(a'a'')$ (the indices indicate that in this coordinate system the matrix $a$ is diagonal, that is, the basis vectors are eigenvectors of $a$). He starts by proposing the existence of matrices of continuous indices, such that matrix multiplication $$xy(a'a'')=\sum_{a'''}x(a'a''')y(a'''a'')$$ is replaced by $$xy(a'a'')=\int_{-\infty}^{\infty}x(a'a''')y(a'''a'')da'''$$ He then proposes that the continuous correspondent of the Identity Matrix $I$ is the Dirac-Delta function, such that $$I(a'a'')=\delta(a'-a'')$$ His derivation of the Schrödinger Equation is as follows. To transform the Hamiltonian Matrix $H$ from a coordinate system in which the coordinate matrix $q$ is diagonal into a system in which the Hamiltonian is diagonal, in which the Hamiltonian will be denoted $W$, the components of which are the system's allowed energy levels. The equations for this transformation are: $$S^{-1}HS=W$$ or $$HS=SW$$ such that $$\int H(q'q'')S(q''W')dq''=S(q'W')W'$$ with $W'$ being $W$'s diagonal components He then proposes (in one dimension) the following forms for the $q$ and $p$ matrices in the position basis" $$q(q'q'')=q'\delta (q'-q'')$$ $$p(q'q'')=\frac{\hbar}{i}\delta'(q'-q'')$$ He then shows they obey the Commutation Relation $pq-qp=\frac{\hbar}{i}$ but his proof of the commutation relation uses integration by parts incorrectly, having the integral of the Dirac Delta's derivative be $$\int f(\xi)\delta(a-\xi)d\xi=f'(a)$$ instead of $$\int f(\xi)\delta(a-\xi)d\xi=-f'(a)$$ Usingintegration by parts incorrectly once again, he argues that $$qS(q'W')=\int q'\delta(q'-q'')S(q''W')dq''=q'S(q'W')$$ and $$pS(q'W')=\frac{\hbar}{i}\int \delta'(q'-q'')S(q''W')=\frac{\hbar}{i}\dfrac{d}{dq'}S(q'W')$$ So we replace in $H(q,p)S=SW$ $$H\left(q',\frac{\hbar}{i}\dfrac{d}{dq'}\right)S=W'S$$ Which is evidently the Time-Independent Schrödinger Equation, which can be solved for the energy Eigenvalues $W'$ But this is derived with a wrong value for $p$ because the derivation uses a wrong process of integration by parts. The immediately obvious choice would be to have $p(q'q'')=-\frac{\hbar}{i}\delta'(q'-q'')$, so that integrated with the transformation matrix it becomes$\frac{\hbar}{i}\dfrac{d}{dq'}$, but I just can't seem to make it fit the Commutation Relation. Can anyone help solve this?
I am reading and following along the appendices of , and trying to learn how he derives Schrödinger's Equation from his Matrix Mechanics, but I have run into a bit of trouble. It seems like for his derivation to work, it must be necessary for the integral of a function times the Dirac Delta Function's derivative be: $$\int^{\infty}_{-\infty}f(\xi)\delta'(a-\xi)d\xi=f'(a). \tag{36}$$ But the actual identity is $$\int^{\infty}_{-\infty}f(\xi)\delta'(\xi-a)d\xi=-f'(a).$$ Does anybody care to explain why it is like this in Heisenberg's book, or provide a derivation along the same vein, but with the correct identity for the delta function?
As a standard for my file/dir naming I use something like putting date and tags string into the file name separated by underscore, eg: 2015_03_10_usa_nyc_vacations_album_pictures For a long time I have used software's like Recoll, but usually it gives much more records than I need. Since my naming is pretty consistent I think there should be a way to scriptsize it using find command. Although I know how to perform find searches for single conditions I am not sure how to find multiple criteria/conditions. That is, how do I find all the files whose names satisfy certain conditions. Let consider the following examples that contain {2015} AND { {album} OR {picture} } {album} AND {vacations} AND NOT {2015}
I would like to search for files that would not match 2 -name conditions. I can do it like so : find /media/d/ -type f -size +50M ! -name "*deb" ! -name "*vmdk" and this will yield proper result but can I join these 2 condition with OR somehow ?
I have two raster layers. They come with the same cell size (100x100m), the same extent and are projected in the same CRS (+proj=utm +zone=33 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs). My problem is, that they are not exactly congruent, they are off by ca. 50m. How can I make them congruent using ArcGIS 10.3 on Windows 10?
I have a raster file that is projected not detailed enough. Every pixel in the raster should be replaced, just a bit. With ArcGIS I calculated the offset per pixel. I couldn't find a way to do this offsetting in ArcGIS, so I switched to python. I found out that I can get the current envelope with ogr with : env = geom.GetEnvelope() print "minX: %d, minY: %d, maxX: %d, maxY: %d" %(env[0],env[2],env[1],env[3]) And now I have to change these to the (already calculated) new origin. Here is some sample code: ## From gdal info page wkt = "LINESTRING (1181866.263593049 615654.4222507705, 1205917.1207499576 623979.7189589312, 1227192.8790041457 643405.4112779726, 1224880.2965852122 665143.6860159477)" geom = ogr.CreateGeometryFromWkt(wkt) env = geom.GetEnvelope() I have to say that I don't entirely understand the envelope function. Is this a function that returns the minX etc from the projection? Or does it just calculates this all from the geometry? Does anybody now how to change this or knows another workaround?
So I'm doing some random practice for an upcoming exam, and I don't know if it's the fact that I've been reviewing for hours and my brain isn't functioning, or something in this code is wrong. I'm attempting to make a very simple java program that asks the user for the amount of numbers they wish to enter (totalNum), create an array that long, and then ask the user for each individual value. After it asks the user for each value in the array, it prints the array. Here is my code: import java.util.Scanner; public class Practice1 { public static void main(String[] args) { Scanner s = new Scanner(System.in); System.out.println("How many numbers would you like to store?"); int totalNum = s.nextInt(); int[] numbers= new int[totalNum]; for (int i = 0; i>totalNum; i++) { System.out.println("Number" + i + " :"); numbers[i] = s.nextInt(); i++; } numbers.toString(); System.out.println(numbers); } } When I run it it asks the user for the numbers I want to store, then prints [I@33909752 and stops. I've done dozens of programs like this and for the life of me I can't figure out where I went wrong. Any help would be appreciated, thanks!
In Java, arrays don't override toString(), so if you try to print one directly, you get the className + '@' + the hex of the of the array, as defined by Object.toString(): int[] intArray = new int[] {1, 2, 3, 4, 5}; System.out.println(intArray); // prints something like '[I@3343c8b3' But usually, we'd actually want something more like [1, 2, 3, 4, 5]. What's the simplest way of doing that? Here are some example inputs and outputs: // Array of primitives: int[] intArray = new int[] {1, 2, 3, 4, 5}; //output: [1, 2, 3, 4, 5] // Array of object references: String[] strArray = new String[] {"John", "Mary", "Bob"}; //output: [John, Mary, Bob]
I am new to Spring Boot and JPA in general. I've seen examples of adding JPA annotations on field declarations such as this: @Entity public class Fizz { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; // other fields public Fizz(Long id) { super(); setId(id); } // setter defined here public Long getId() { return this.id; } } ...as well as examples putting the same annotations on the getters like this: @Entity public class Fizz { private Long id; // other fields public Fizz(Long id) { super(); setId(id); } // setter defined here @Id @GeneratedValue(strategy = GenerationType.IDENTITY) public Long getId() { return this.id; } } I'm wondering if they are semantically equivalent or if there are different use cases where you'd choose one over the other. I ask because I'm actually writing my Spring Boot/JPA app in Groovy where you typically don't define getters: @Canonical @Entity class Fizz { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) Long id }
This question is somewhat related to . But I want to know which is better? Access via properties or access via fields? What are the advantages and disadvantages of each?
The following packages have unmet dependencies: vlc : Depends: vlc-nox (= 2.2.1-3) but 3.0.0~~git20151218+r62827+34~ubuntu15.10.1 is to be installed Recommends: vlc-plugin-notify (= 2.2.1-3) but it is not going to be installed Recommends: vlc-plugin-samba (= 2.2.1-3) but it is not going to be installed What do I do?
I've added many PPAs using the add-apt-repository command. Is there a simple way to remove these PPAs? I've checked in /etc/apt/sources.list for the appropriate deb lines but they aren't there. This is on a server system so a command line solution would be great!
I am trying to prove that $A-(B-C)=(A-B) \cup (A\cap C)$ For the first statement, I do: Let $x \in A-(B-C)$ means that $x \in A$ and $x \notin (B-C)$ $x \notin (B-C)$ means that $x \notin B$ or $x \in C$ $(*)$ Therefore $x \in A-(B-C)$ means that $x \in A$ AND ($x \notin B$ or $x \in C$) For the second statement, I do: Let $x \in (A-B)$ means that $x \in A$ and $x \notin B$ $x \in (A \cap C)$ means that $x \in A$ and $x \in C$ Therefore, $x \in (A-B) \cup (A\cap C)$ means that $x \in A$ AND ($x \notin B$ or $x \in C$) $(*)$ Those two are the same so these sets are equal. I'm not sure if I did the $(*)$ parts correctly. Can someone give me some guidance?
Show that $A \setminus ( B \setminus C ) \equiv ( A \setminus B) \cup ( A \cap C )$ This is an exercise I was trying to do ( not homework ) and I got stuck as follows: Working from $A \setminus ( B \setminus C )$: $x \in A \wedge x \notin ( B \setminus C )$ $x \in A \wedge ((x \in B \wedge x \in C) \vee (x \notin B \wedge x \in C) \vee (x \notin B \wedge x \notin C) )$ At this point I'm not sure how to proceed. Working from the other side $ ( A \setminus B) \cup ( A \cap C ) $: $ x \in ( A \setminus B) \cup ( A \cap C ) $ $ x \in ( A \setminus B) \vee x \in ( A \cap C ) $ $ ( x \in A \wedge x \notin B ) \vee ( x \in A \wedge x \notin C ) $ $ x \in A \wedge (x \notin B \vee x \notin C ) $ $ x \in A \wedge x \notin ( B \cap C ) $ $ A \setminus ( B \cap C ) $ I could also use some formating tips like how display logical not and how to get the lines to display properly without blank lines inbetween. :-)
I am trying to make a program where I enter the name of a shape and it tells me how many sides it has. I cannot seem to get it to work. Can anyone explain how to do this? import java.util.Scanner; public class Shapes { public static void main(String[] args) { Scanner reader = new Scanner(System.in); String shape; System.out.print("Enter shape: "); shape = reader.next(); if (shape == "hexagon") { System.out.println("A hexagon has 6 sides."); } if (shape == "decagon"); { System.out.println("A decagon has 10 sides."); } } }
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?
I have 13 inch mid 2010 macbook pro. Just installed new 1T hard drive but now am hesitating on what to do next. I have my old hard drive converted to external drive and a back up drive as well.
I will be installing a new 500GB hard drive in my macbook. It is a late 2008, aluminum, 13-inch screen. Once I install it, how do I get an operating system that's 10.7 or newer (downloaded from the App Store) on to the bare/unformatted drive?
I have an input of type file. 'Choose File' will be displayed on the button and beside it, 'No file chosen' will be displayed. But i want to change the button color and text of the button. <form action="demo_form.asp"> Select a file: <input type="file" name="img" class='customBtn'> <input type="submit"/> </form> I tried adding some css .customBtn input[type='file'] { color:#f00 } Can some one help me on this?
How do you style an input type="file" button?
In category theory, we always use many composition notation. And in computer science, we often use category theory to describe problems. Usually, we use g ∘ f to stand the composition of "g after f" Also, we use f ; g to stand the composition of "f before g" But the ; is a common used syntax of line end in computer program, is there any substitutable notation of ; ?
We have $ (f \circ g) = x \mapsto f(g(x)) $ however since I read left to write it always seems backwards to me. Is there a symbol like $ ( g \ggg f) = x \mapsto f(g(x)) $. It is especially grating in situations like. $$ \require{AMScd} \begin{CD} X @>{f \circ g}>> Y \\ @VVgV @AAfA \\ g(X) @>{id}>> g(X)\end{CD} $$
Which one is better in case of a phonon calculation and does DFPT also have small negative frequencies near Gamma due to the numerical noise? What are their advantages and disadvantages?
When proposing or predicting new materials, whether in the bulk or in two dimensions, it is important to discuss the stability of the system. This is usually done through thermodynamics and(or) lattice dynamics. A feasible way to determine the dynamical stability of a material is by modeling its phonon band structure. I see that two popular methods of modeling the phonon band structure are: (a) the frozen phonon / finite displacement method (as implemented in phonopy) (b) Linear Response Theory / Density Functional Perturbation Theory (as implemented in Quantum ESPRESSO (ph.x) Are the two methods equivalent or is one more reliable/accurate than the other, and if so, why?
A duplicate question probably exists, but I couldn't find one. Please let me know if one is found and I'll delete this. We know that: $$\sum_{r=0}^n r=\frac12n(n+1)$$ and that: $$\sum_{r=0}^n r^3 =\frac14 n^2(n+1)^2$$ and these are easily proven by induction: $$\frac{n(n+1)}{2}+(n+1)=\frac{n^2+n+2n+2}{2}=\frac{n^2+3n+2}{2}=\frac12(n+1)(n+2)$$ and: $$\frac{n^2(n+1)^2}{4}+(n+1)^3=\frac{n^2(n+1)^2+4(n+1)^3}{4}$$ $$= \frac{(n+1)^2(n^2+4n+4)}{4}=\frac 14(n+1)^2(n+2)^2$$ We can see that, from the results obtained, $$\sum_{r=0}^n r^3 =\bigg(\sum_{r=0}^n r\bigg)^2$$ What I am curious to know is, is there a reason why this is the case, other than the numbers just showing this? Thanks in advance.
Using induction it is straight forward to show $$\left(\sum_{k=1}^n k\right)^2=\sum_{k=1}^n k^3.$$ But is there also a geometrical interpretation that "proves" this fact? By just looking at those formulas I don't see why they should be equal.
I want OneDrive to have the exact files and folder structure of a folder on my local computer. Syncing OneDrive causes the files in the cloud to download and only uploads files that I add to the local folder while the OneDrive app is running. How can I make the local folder unchangeable and the Cloud folder mirror from the local folder by uploading local files that aren't in the cloud and replacing or duplicating the files into the cloud from local files that have the same name and location in both local and cloud drives and different hash values? Please note: The folder is almost 160 gigs and I currently only have access to a very slow connection so I have to keep the files that are already uploaded and can't just recopy the entire folder into the cloud like when I had fiber optic. The folder contains 18,873 Files so manually comparing files is also not possible. To future readers with the same problem: Using the command net use described in the duplicate problem will not allow replacing the cloud version with the local version because it maps the drive as if using the onedrive app(where OneDrive automatically downloads synced folders: Whereas the way described below maps the drive as I needed:
I'm a web developer and I have Windows 10 installed on a very small SSD (128GB). The problem is, when I want to save my file to a cloud service, I need to store the files on my computer, so that the OneDrive or the Google Drive client can synchronize them. My free space is very low, so I can't afford that. Is it possible to save files to the cloud (directly), without them needing to first download them to my computer?
Yesterday I did an update on IOS that was available in my iPad 2 (I think it was 9.3.2). After that it's asking me to configure and take some steps to reopen but after trying a while it says that the activation server is not available and won't open. Not even the home page. I have done an update before without problems. What can I do?
After just accepting the iOS 7.0 upgrade dialog on my iPad, the gears spin for a moment and it looks like the download will start, but then the install fails. Is this something I can fix?
I just arrived in Amsterdam (by train) and realized I left my passport home in Switzerland. I am a US citizen residing in Switzerland, and I have my Swiss resident permit with me. I have a flight back to Zurich in a few days, and I'm wondering if I'll have any trouble with passport checks when flying. In theory because both countries are part of Schengen and I have a residence permit in a Schengen country, it should be fine, but I'm wondering if anyone has firsthand experience about this situation. Is there any real risk?
I am currently located in the Netherlands and have lived here for 4 years. I have a working visa for the Netherlands and would like to go on vacation to another country in Europe. I however do currently not have my passport as i sent it to an embassy for a visa application. Will I still be able to travel inside of Europe without a passport if I have my residency ID? I have a resident permit, not a true Dutch ID. And I own a passport that is currently in transit. I have called with the KLM and the service employee's conclusion was that I do need to carry my passport with me when i am going to fly, so it seems all I can do is wait and hope my passport is returned to me in the next few days as the amsterdam US consulate (who currently holds my passport) is incredibly difficult to contact for urgent matters.
To prove that two processes $(X_t)$ and $(Y_t)$ has the same distribution, I proved that $X_t\sim Y_t$, but my teacher said that it's not enough, I have to prove that they I the same finite dimensional distribution, i.e. that $(X_{t_1},...,X_{t_n})$ and $(Y_{t_1},...,Y_{t_n})$ has same distribution for all $t_0<...<t_n$. So could you give me an example of processes s.t. $X_t\sim Y_t$ for all $t$, but $(X_t)$ and $(Y_t)$ has not the same finite dimensional distribution ? I can't find any.
Would someone be able to offer a layman's explanation of what is means when two stochastic processes are a Modification of each other and when they are Indistinguishable? My Stochastic Analysis notes define the following: a) $\textit{The stochastic processes X and Y are called a modification of each other if}$ \begin{align} P(X(t) = Y(t)) = 1 \quad \textit{for all t $\in$ I} \end{align} b) $\textit{The stochastic processes X and Y are called indistinguishable}$ \begin{align} P(X(t) = Y(t) \,\,\,\textit{for all $t \in I$}) = 1 \end{align} I interpret this to mean that: (a) for each $t$ in $I$ the probability that the processes are equal is equal to 1. (b) the probability that the entire path of the processes X is equal to the entire path of the process Y, is equal to 1. I don't understand the difference between the two statements. The first seems to examine the processes at each point. The second examines the paths of the processes (which are made up of the points!). Is anyone able to provide a motivational explanation as to why (a) does not mean that the paths are the same? I find it counter intuitive since if the processes are equal at each point then surely their paths are the same? The classic example I've been given which (apparently) shows the two processes to be a modification and not indistinguishable is: $\textbf{Example:}$ Let $\Omega = [0,\infty), \mathcal{A} = \mathcal{B}([0,\infty))$ and $P$ be a probability measure on $\mathcal{A}$ which has a density. Define two stochastic processes $(X(t): t \ge 0)$ and $(Y(t): t \ge 0)$ by \begin{align} X(t)(\omega) = \begin{cases} 1, \text{ if $t = \omega$},\\ 0, \text{ otherwise} \end{cases} \quad Y(t)(\omega) = 0 \quad \text{for all $t \ge 0$ and all $\omega \in \Omega$.} \end{align} Then $X$ and $Y$ are modifications of each other but $X$ and $Y$ are not indistinguishable. $\textbf{Question:}$ With regard to the example above if $t = 0$ and $\omega = 0$ then $X(0)(0)= 1$ but $Y(0)(0) = 0$, then how can their probability be equal to 1 at this point? Hence how can they be a modification of each other? Many thanks, John
I have a rank-ordered logit model in which the various independent variables are pertinent for some cases but not others. For example, cases 1, 2, 3, & 4 might have variables A & B that are relevant whereas cases 5 & 6 might have variables B, C, & D that are relevant. My question is, prior to running the regression, do I need to code the data in any special way to indicate that only certain variables are applicable to certain cases, or will the regression extract the correct coefficients to use on the applicable cases. I appreciate any specific or conceptual guidance you may have on this. Thank you!
Consider a statistical problem where you have a response variable that you want to describe conditional on an explanatory variable and a nested variable, where the nested variable only arises as a meaningful variable for particular values of the explanatory variable. In cases where the explanatory variable does not admit a meaningful nested variable, the latter is usually coded either as NA in the data set, or if it is coded with a value, that value is merely a placeholder that does not have any meaningful interpretation. This situation tends to arise whenever you have an explanatory variable indicating the existence of a thing, and one or more nested variables describing the characteristics of that thing. Some examples of this kind of situation in statistical problems are the following: The explanatory variable is an indicator of whether a survey participant is married, and the nested variable is some characteristic of the spouse (e.g., education, age, etc.); The explanatory variable is an indicator of the presence of an item in a space, and the nested variable is a measure of some characteristic of the item (e.g., size, distance, etc.); The explanatory variable is an indicator of the occurrence of an event and the nested variable is a description of some characteristic of the event (e.g., duration, magnitude, etc.). In these kinds of situations, we often want to build a regression-type model (in the broad sense that includes GLMs, GLMMs, etc.) describing the relationship between the response variable and the other variables. It is not obvious how to deal with the nested variable in this type of model. Question: How do we deal with the nested variable in this type of model? Note: This question is designed to give a generalised answer to a recurring question on regarding nested variables in regression (see e.g., , , and ). This question is designed to give a generalised context-independent example of this problem.
I am new to Java. I was reading someone's solution to a question and I encountered this: int[] ps = new int[N]; for (int i = 0; i < N; i++) ps[i] = input.nextInt(); int[] counts = new int[1005]; for (int p : ps) counts[p]++; What do the last two lines do?
Consider: List<String> someList = new ArrayList<String>(); // add "monkey", "donkey", "skeleton key" to someList for (String item : someList) { System.out.println(item); } What would the equivalent for loop look like without using the for each syntax?
I need a script which will list out all the users with the database owner permission for a specific database.
I've searched around all over and haven't found a conclusive answer to this question. I need a script that can give ALL permissions for an associated role. Any thoughts, or is it even possible? This gets me CLOSE - but I can't seem to flip it around and give the summary for roles, rather than users. WITH perms_cte as ( select USER_NAME(p.grantee_principal_id) AS principal_name, dp.principal_id, dp.type_desc AS principal_type_desc, p.class_desc, OBJECT_NAME(p.major_id) AS object_name, p.permission_name, p.state_desc AS permission_state_desc from sys.database_permissions p inner JOIN sys.database_principals dp on p.grantee_principal_id = dp.principal_id ) --role members SELECT rm.member_principal_name, rm.principal_type_desc, p.class_desc, p.object_name, p.permission_name, p.permission_state_desc,rm.role_name FROM perms_cte p right outer JOIN ( select role_principal_id, dp.type_desc as principal_type_desc, member_principal_id,user_name(member_principal_id) as member_principal_name, user_name(role_principal_id) as role_name--,* from sys.database_role_members rm INNER JOIN sys.database_principals dp ON rm.member_principal_id = dp.principal_id ) rm ON rm.role_principal_id = p.principal_id order by 1
Knowing that $9a^2+8ab+7b^2 \le 6$, prove that $7a+5b+12ab \le 9$. I have found the same question , but the answer looks wrong. You can't just add two inequalities like him. It's like you would multiply the second one with $-1$, which changes its sign, and then add them. Here is my try: $$9a^2 + 9b^2 + 18ab - 2b^2 - 10ab - 6 \le 0 \Longleftrightarrow\\ (3a+3b)^2 - 2(b^2+5ab+3) \le 0 \Longleftrightarrow\\ b^2+5ab+3 \ge 0 \Longleftrightarrow\\ 25a^2 - 12 \le 0 \Longleftrightarrow\\ a \in \left[-\frac{2\sqrt{3}}{5}, \frac{2\sqrt{3}}{5} \right]$$
If we assume that $a,b$ are real numbers such that $9a^2+8ab+7b^2\le 6$, how to prove that : $$7a+5b+12ab\le9$$
From the technical details it seems that HTC one (m7) has 2Gb of RAM, but if I check the RAM usage the smartphone shows that I am using around 900 Mb of 1.5Gb. There is something that I do not understand?
I bought a new tablet, but Android (2.3.1) shows that it has only 150MB free of 256MB, and it should have 512MB. I checked the file /proc/meminfo, MemTotal information. It only shows 256MB. Is there a possibility that the Android "hid" 256MB of RAM from the user?
I have been exploring this website for my queries and many times I find stuff mentioned as update-grub2 and update-grub Surprisingly, many of the things to be updated for grub2, I update in grub and it works. Then what is the difference between them (in Ubuntu 18.04)?
I'm making some changes on my grub file under /etc/default/grub. In some tutorials I have seen sudo update-grub and others sudo update-grub2. What is the difference?
Someone recently downvoted something on stackoverflow, and then the user was deleted. Because of the deletion, I'm not sure what was downvoted or why, as there is no link provided like there are for every other action in my timeline. is there a way to figure out what was downvoted? this seems like a pretty easy way to troll someone.
Message appearing when a user was removed. It seems I lost 1765 reputation points on Stack Overflow yesterday. The reason given in my history is "removed", with the description of "User was removed ()". I don't understand what that means. What caused this?
I want to prove Schröder–Bernstein theorem for 2 finite sets $A, B$ of the same cardinal. I do it with induction on the cardinal number of $A, B$. In the inducative step, I write: Let $A, B$ sets such that $|A|=|B|=n+1$ for some $n\in\omega$. Here, I want to use the the inducative assumption for the sets $A-\{a\}, B-\{b\}$ for some $a\in A, b\in B$. For choosing the above $a,b$, do I need to use the axiom of choice?
I recently read a proof that had the following in it: "since $A$ is non-empty, we can find an element $x$ in $A$." This proof did not mention the axiom of choice, but it seems to me that it would be required to make the proof formal. Would I not require a choice function to allow me to find/pick some element $x$ from $A$ after noting that A is non-empty? Thanks
Is there a word for an acronym whose first word is identical to the acronym? There are real-world examples. However, none come to mind so I will fabricate one here. Face Acuity Characteristics Expressions F.A.C.E. If there is already word for it I think it should be called an 'initialistic initialism'. Or an 'initialised initialism'. Edit: I am aware I have used' acronym' and 'initialism' interchangeably, my question applies to both. EDIT: Although "GNU: GNU Not Linux" is a case of this and is known as a recursive acronym. The example I use as well as "IRIS: Iris Recognition Immigration System" are not recursive as the word Iris actually means something. Said another way "GNU: GNU Not Linux" could just as easily be "PNU: PNU Not Linux", the same is not true of IRIS.
The example I am thinking of is GNU, which stands for "". It may be that there are no other examples. And maybe that's the whole joke. I was just wondering.
Please see i am not asking what is immutability, i understand immutability but question is more how to make an immutable class when you are giving reference to a mutable object. Moreover my class failed the check with mutability detector project, hence requesting your view. I have created a Immutable class EmpAndAddress.java and it has reference to a mutable class EmpAddress.java which is cloneable. I have followed the java rules and tried to test my class using mutability detector but my class is failing the immutable test. Just want to check if I am missing something. In my Immutable i am always creating new Object of type EmpAddress mutable to follow the rules. 1. Mutable EmpAddress.java public class EmpAddress implements Cloneable{ public String empCity; public int zipCode; public EmpAddress(String empCity, int zipCode) { super(); this.empCity = empCity; this.zipCode = zipCode; } public String getEmpCity() { return empCity; } public void setEmpCity(String empCity) { this.empCity = empCity; } public int getZipCode() { return zipCode; } public void setZipCode(int zipCode) { this.zipCode = zipCode; } protected Object clone() throws CloneNotSupportedException { EmpAddress clone=(EmpAddress)super.clone(); return clone; } } public final class EmpAndAddress implements Cloneable { private final int empId; private final String empName; private final EmpAddress eAddr; public EmpAndAddress(int empId,String empName,EmpAddress eAddr){ super(); this.empId = empId; this.empName = empName; this.eAddr = new EmpAddress(" ", -1); } public int getEmpId() { return empId; } public String getEmpName() { return empName; } public EmpAddress geteAddr() throws CloneNotSupportedException { return (EmpAddress) eAddr.clone(); } }
This could be the dumbest question ever asked but I think it is quite confusing for a Java newbie. Can somebody clarify what is meant by immutable? Why is a String immutable? What are the advantages/disadvantages of the immutable objects? Why should a mutable object such as StringBuilder be preferred over String and vice-verse? A nice example (in Java) will be really appreciated.
In the most recent Stack Overflow Podcast, announced in this , it is claimed that the CEO talks about the future of our company and community. The title of the blogpost is: Podcast: A chat with our CEO about the future of our company and community I don't mind listening to a podcast, when I have the time. Currently I don't and would like to be able to quickly glance through what is being discussed and read parts I find interesting/relevant when I have a few minutes to spare. Is there anywhere this podcast is transcribed? I know in the past there were discussions about transcribing tools doing a decent job. It doesn't have to be an official SO transcription.
There has been some level of effort to provide written transcripts of official Stack Exchange podcasts. Transcripts for the first four Unicorn Meta Zoo podcasts were posted on , and the received a transcript as an . Some podcasts don't seem to have transcripts at all anywhere, and for those that do, their locations are inconsistent. Externally-hosted transcripts can decay at any time. Let's have an official process or practice to create transcripts of official podcasts. This would benefit several groups: Users with hearing or auditory processing disabilities Users for whom English is a foreign language and that prefer reading at their own pace Users in areas where listening to a podcast is socially inappropriate and/or potentially disruptive, such as a public library, classroom, or workplace Users with low bandwidth and/or high-latency connections As SolveIt mentioned, this would also greatly aid searchability. If I have a vague recollection that there was a podcast that happened to venture into best practices in how much unicorn sparkle dust to feed moderators after midnight, I can check it out myself with a single search rather than listening through hours of podcasts or asking the community to do so for me.
I have to dynamically call a class and a function based on variables sent from a form. is there a way to do this like $className= 'form1'; $functionName = 'function2456'; {className}->{$functionName} Prior to this as well, I need to check if that specific function exists within that particular class. Any help please?
How can I dynamically invoke a class method in PHP? The class method is not static. It appears that call_user_func(...) only works with static functions? Thanks.
Yesterday I updated my Ubuntu from 14.10 to 15.04 but sadly i had to conclude that Spotify doesn't work anymore. Today I installed 15.04 and Spotify again but nothing has changed - Spotify isn't working. For installing Spotify I have used the instructions on this Page: How can I fix this? (Sorry for my bad English, but I hope, this is understandable...)
I installed the latest Ubuntu today, 15.04. Spotify has stopped working. How can it be made to work again? The Unity bar flashes green 4 or 5 times and then stops flashing. There are no error messages. It was installed successfully and played well on 14.10 till the upgrade a few hours ago. It just does not appear on the screen.
Problem: Make edit Realize, later, that you should have added an edit summary and did not (or that you just want to change it). Add or change edit summary. Press 'Save Edits'. Edit summary is not saved. Possible solutions: Make it so that edit summary changes are saved (already asked for here: ) Make it clearer when it will not be saved (and give the warning before a user goes to the trouble of typing out a new edit summary). The way it works now a person could make new edits in order to save a new edit summary, but that should not be required as it just encourages fake edits. For 2., all that would be needed is an pop-up alert when the user clicks on in the edit summary field without having made any new changes. Something along the lines of "This edit summary will not be saved unless new edits to the post are made." Here are some more details, in case this is not the way it works all of the time: I made an edit (actually a roll-back on my own post), but did not know there was a comment field for that. About an hour later, I found out there was such a thing as an edit summary, so I hit "edit", added one for the roll-back, and pressed "save". I happened to think I should make sure the edit summary stuck (since I really wanted to make sure the original editor got to read why I did the roll-back) and when I hit "edit" again it turned out that no, it didn't. The edit summary was gone.
It often occurs to me to add an edit summary to a question-edit immediately after submitting the edit, especially if the changes aren't obvious (formatting etc.). So I: Click "edit" again. Fill in the summary Click on "Save Edits". The 'edit' (no actual change has been made to the title/body/tags) is accepted, but the summary doesn't show up, i.e. it is silently rejected. I don't think it should work this way because the summary has been added by the original editor within the original edit's edit-window. In fact if I remember correctly, it to used to work as expected earlier; so perhaps this is a recent change.
I came across a physics experiment video showing three balls released from a point A, going down three different kinds of ramps leading to a point B () Assuming no friction and a point mass for simplicity, is there an ideal curve to get it from point A to B in the shortest time (e.g. is it parabolic)? Assuming this significant simplification, can it be proven that for any curve between A and B, the point mass should pass B at the same velocity? I.e. a different curve will only affect the time it takes to get to B, but not the velocity?
I was at my son's high school "open house" and the physics teacher did a demo with two curtain rail tracks and two ball bearings. One track was straight and on a slight slope. The beginning and end points of the second track were the same but it was bent into a dip with a decending slope and an ascending slope. The game was to guess which ball bearing wins the race. At first blush ("the shortest distance between two points is a straight line") one might think the straight wins, but in fact the bent track wins easily (because the ball is going very fast for most of the time). His point was that nature doesn't always work that way our antediluvian brains think it should. So my question (and I do have one) is what shape of track give the absolute shortest time? I think it's a calculus of variation problem or something. For simplicity, let's assume a) no friction b) a point mass and c) that the end point is a small delta below the start point. I played around with some MATLAB code and it seemed to give a parabola of depth about 0.4 times the distance between the start and stop point. The value of g and the mass didn't seem to matter. But I don't know if my code was right or wrong and I couldn't figure out the significance of 0.4. I Googled around for an answer but couldn't find one. Thanks for any pointers!
What were they doing differently that had led to this dramatic improvement? I saw a sentence having the same structure as the one above. But I am not sure that this sentence is grammatically correct. I would like to know your opinions. The "that" in the sentence seems a relative pronoun, but where is the antecedent? When I speculate what it says, the antecedent could be the "what". Is it possible?
I'm not sure about the sentence structure below: All kinds of problems arise that smaller animals or plants do not have to cope with. It looks like that works as a relative pronoun for all kinds of problems, but I couldn't find such usage in my dictionary or online. This sentence could be divided into There are all kinds of problems. Smaller animals or plants do not have to cope with all kinds of problems. But, I can't figure out where 'arise' fits. If you have any thoughts, please share them.
I've noticed that it is not only in English that the word "right" can be used both as a noun (when talking about liberty) and an adjective (when talking about direction) It's slso like that in Spanish (derechos/derecha), Portuguese (direitos/direita) and French (droit/droite) What caused this connection between the two "rights" and why?
Does anyone know of a connection, or some sort of established historical/etymological explanation why in a few languages, "the opposite of left" and "truthful claim to" are the same or seemingly related words? Do they all have a common root? Did they develop independently? Examples: English: right - right French: droit - droit German: rechts - Recht Polish: prawo - prawo Russian: право - право Portuguese: direita - direito Maybe some people can enhance this list by adding more examples? My question also on .
I asked the other day and got a sufficient answer: that given $X$~$\mathsf{Poisson}(rate=\lambda_1)$ and $Y$~$\mathsf{Poisson}(rate=\lambda_2)$, $X|(X+Y=n)$~$\mathsf{Binomial}\left(n,\cfrac{\lambda_1}{\lambda_1+\lambda_2}\right)$. However, the way it was done was not using moment generating functions, and indeed I got a moment generating function for $X|(X+Y=n)$: $e^{tn}\cdot e^{\lambda_2(e^{-t}-1)}$. Knowing that a binomial's MGF looks like $(pe^t+1-p)^n$, I tried to prove the same result using the moment generating function I got, and I got close but got stuck. Here's what I did: $\left(\cfrac{\lambda_1}{\lambda_1+\lambda_2}e^t+1-\cfrac{\lambda_1}{\lambda_1+\lambda_2}\right)^n \stackrel{?}=e^{tn}\cdot e^{\lambda_2(e^{-t}-1)}\iff n=\mathsf{log}_{\cfrac{\lambda_1}{\lambda_1+\lambda_2}\cdot(e^t-1)+1}(e^{\lambda_2(e^{-t}-1)+tn}) \\ = \cfrac{\mathsf{ln}(e^{\lambda_2(e^{-t}-1)+tn})}{\mathsf{ln}\left(\cfrac{\lambda_1}{\lambda_1+\lambda_2}(e^t-1)+1\right)} = \cfrac{\lambda_2(e^{-t}-1)+tn}{\mathsf{ln}\left(\cfrac{\lambda_1(e^t-1)}{\lambda_1+\lambda_2}+\cfrac{\lambda_1+\lambda_2}{\lambda_1+\lambda_2}\right)} = \cfrac{\lambda_2(e^{-t}-1)+tn}{\mathsf{ln}\left(\cfrac{\lambda_1e^t + \lambda_2}{\lambda_1+\lambda_2}\right)} = \cfrac{\lambda_2(e^{-t}-1)+tn}{\mathsf{ln}(\lambda_1e^t+\lambda_2) - \mathsf{ln}(\lambda_1+\lambda_2)} = \cfrac{\lambda_2(e^{-t}-1)+tn}{\mathsf{ln}(e^t)+\mathsf{ln}(\lambda_1+\lambda_2e^{-t}) - \mathsf{ln}(\lambda_1+\lambda_2)} = \cfrac{\lambda_2(e^{-t}-1)+tn}{t+\mathsf{ln}(\lambda_1+\lambda_2e^{-t}) - \mathsf{ln}(\lambda_1+\lambda_2)}$ Multiplying both sides by the denominator, $tn+n\cdot\mathsf{ln}(\lambda_1+\lambda_2e^{-t})-n\cdot\mathsf{ln}(\lambda_1+\lambda_2) = \lambda_2(e^{-t}-1)+tn \iff n\cdot\mathsf{ln}(\lambda_1+\lambda_2e^{-t})-n\cdot\mathsf{ln}(\lambda_1+\lambda_2) = \lambda_2(e^{-t}-1)$ This is where I'm stuck. I can't seem to get rid of the $\lambda_1$. Thanks for the help.
Let $X$~$\mathsf{Poisson}$$(rate=\lambda_1)$ and $Y$~$\mathsf{Poisson}$$(rate=\lambda_2)$. Let $Z=X+Y$. Find the distribution of $X|Z=n$ and name it. Here's what I tried: $$\begin{align}\mathsf{M_{X|X+Y=n}}(t) &\stackrel{?}{=} \mathsf{E}[e^{tX}|X+Y=n]\tag 1 \\[1ex]&= \mathsf{E}[e^{tX}|X=n-Y]\tag 2 \\[1ex]&\stackrel{?}{=} \mathsf{E}[e^{t(n-Y)}] \tag 3\\[1ex]&= \mathsf{E}[e^{tn}e^{-tY}] \tag 4\\[1ex]&\stackrel{?}{=} e^{tn}\mathsf{E}[e^{(-t)Y}]\tag 5 \\[1ex]&= e^{tn}\mathsf{M_Y}(-t)\tag 6 \\[1ex]&= e^{tn} \cdot e^{\lambda_2(e^{-t}-1)}\tag 7\end{align}$$ And this is where I am stuck. I don't see how I can work the $tn$ in with the other exponent in such a way that I have a moment generating function that I recognize as the MGF of a distribution I know. I am also uncertain about some of the steps I took to get this MGF, so I put question marks over those equals signs. Lastly, my homework does not include the information that $X$ and $Y$ are independent, but if this information is necessary to make the problem workable then I intend to assume that my instructor forgot to include it. Thanks for the help.
From a custom Winforms component that is embedded in a form, how to I get the parent/owner control? I have an IContainer and the Site property is not null, but I have no idea how to get to the "real" parent. (this is a followup to , atm I am trying to add a handler to the parents VisibleChanged, but that's not the first time I face this question)
I have a non-visual component which manages other visual controls. I need to have a reference to the form that the component is operating on, but i don't know how to get it. I am unsure of adding a constructor with the parent specified as control, as i want the component to work by just being dropped into the designer. The other thought i had was to have a Property of parent as a control, with the default value as 'Me' any suggestions would be great Edit: To clarify, this is a component, not a control, see here :
I need to keep numbers of linked-lists in an array. I have followed similar questions but confused about implementation and cannot allocate the array correctly. I debugged, found, and simplified my problem: The array is always sized as 1 instead of N. As a result, I'm getting segmentation fault when try to use nodes. Simplified code: typedef struct Node { int data; struct Node *next; } node; int main(int argc, char** argv) { node **array; int N = 5; array = (node **)calloc(N,sizeof(node*)); printf("Size of array = %d", sizeof(array)/sizeof(array[0])); return 0; } And the output is: Size of array = 1 Here when I use static size for array as node *array[5] the output is: Size of array = 5 Thanks for suggestions.
First off, here is some code: int main() { int days[] = {1,2,3,4,5}; int *ptr = days; printf("%u\n", sizeof(days)); printf("%u\n", sizeof(ptr)); return 0; } Is there a way to find out the size of the array that ptr is pointing to (instead of just giving its size, which is four bytes on a 32-bit system)?
I found this really weird bug just now... In here the question link is redirected to wrong question when you are not logged-in, but when you log in again everything seems fine... take a look here... Steps:- Visit in logged off condition Find a question Q:Review queue in the topbar makes a man sad when he can't act upon it [duplicate] Click on that question.. It redirects to Now loggin again.. you are then redirected to correct question.
Duplicate questions that use different words to describe the same problem are important for people to find the content via search engines. But the user experience when an anonymous user arrives at a duplicate is less than ideal. They have to notice the duplicate link and understand that the answer they are looking for is likely behind that link. I don't think this is all that obvious to someone without experience with an SE site. I propose to just redirect users to the duplicate automatically if the closed duplicate has zero answers. In that case they need to follow the link to the duplicate in any case, so we might as well redirect them to it in the first place. I could imagine this being problematic with search engines, as we would be displaying different content than what the search engines see. If that is too problematic I would suggest to show a very obvious link to the duplicate in the answers section for anonymous users.
I am planning to travel from Chicago to Delhi via London with intention of ~36 hrs in transit. I am Indian resident, with valid US visa (until 2015). Going by UK border agency information I will be needing land side visa. I have following queries: Is it possible to get the land side visa on arrival or do I need to apply prior to leaving US? If it is on arrival, and for some reason I am denied, will I need to wait for connecting flight within airport for that long? What is the procedure and fees? I scanned through the UK border agency site, but could not find a procedure, and further details. It seems very scattered. I see that one of the flight option has 48 hrs 15 min difference. Can landside visa be applied for this case?
I am traveling from the US to India via London Heathrow on November 6. I will be at LHR on 7th at 6:20 am and departing at 9:25 pm. I'm an Indian national and have a valid US visa. Do I need a transit visa to stay airside? I have been scared that British Airways have stopped a few people from boarding flights (no details just rumors). Do I need a transit visa to stay landside? I want to do some sightseeing. What are the chances of getting past officials using transit without visa concession? Real stories will help a lot to calm the butterflies in my stomach.
For a fleeting instant, Harry thought he saw a gleam of something like triumph in Dumbledore's eyes. But next second Harry was sure he had imagined it, for when Dumbledore had returned to his seat behind the desk, he looked as old and weary as Harry had ever seen him. This happens right after... Dumbledore questions Harry about the events in the graveyard and the coming back of the Dark Lord. Why would Dumbledore display a "gleam of triumph" in that specific moment? Is there any references in canon explaining what was going on in Dumbledore's mind?
In the Goblet of Fire, Harry is cut in the arm by Pettigrew. When Dumbledore learns it, he's extremely worried and wants to check Harry's arm. Why? When Harry told of Wormtail piercing his arm with the dagger, however, Sirius let out a vehement exclamation and Dumbledore stood up so quickly that Harry started. Dumbledore walked around the desk and told Harry to stretch out his arm. Harry showed them both the place where his robes were torn and the cut beneath them. "He said my blood would make him stronger than if he'd used someone else's," Harry told Dumbledore. "He said the protection my - my mother left in me - he'd have it too. And he was right - he could touch me without hurting himself, he touched my face." For a fleeting instant, Harry thought he saw a gleam of something like triumph in Dumbledore's eyes. But next second. Harry was sure he had imagined it, for when Dumbledore had returned to his seat behind the desk, he looked as old and weary as Harry had ever seen him. "Very well," he said, sitting down again. "Voldemort has overcome that particular barrier. Harry, continue, please. Edit: Plz explain this sentence specifically: "Dumbledore walked around the desk and told Harry to stretch out his arm."
When booting into Ubuntu 16.04 (even with no USB devices plugged in) I get confronted with the following: [ 1.931104] usb 3-7: new low-speed USB device number 4 using xhci_hcd [ 7.043191] usb 3-7: device descriptor read/64, error -110 [ 17.259287] usb 3-7: device descriptor read/64, error -110 [ 17.475280] usb 3-7: new low-speed USB device number 5 using xhci_hcd [ 22.587338] usb 3-7: device descriptor read/64, error -110 [ 32.803433] usb 3-7: device descriptor read/64, error -110 [ 33.019425] usb 3-7: new low-speed USB device number 6 using xhci_hcd [ 33.020984] usb 3-7: Device not responding to setup address. [ 33.224987] usb 3-7: Device not responding to setup address. [ 33.427426] usb 3-7: device not accepting address 6, error -71 [ 33.539431] usb 3-7: new low-speed USB device number 7 using xhci_hcd [ 33.540989] usb 3-7: Device not responding to setup address. [ 33.744991] usb 3-7: Device not responding to setup address. [ 33.947431] usb 3-7: device not accepting address 7, error -71 I tried booting in a Live session as well, same problem (no USB devices connected). I have no idea where to begin to debug because this error pops up even with no USB devices connected to the computer. Here's my lsusb output (with some USB devices connected): $ lsusb Bus 002 Device 002: ID 8087:8001 Intel Corp. Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 001 Device 002: ID 8087:8009 Intel Corp. Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 003 Device 008: ID 1af3:0001 Bus 003 Device 003: ID 5986:066d Acer, Inc Bus 003 Device 002: ID 0582:012f Roland Corp. QUAD-CAPTURE Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub $ lsusb -t /: Bus 04.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/6p, 5000M /: Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/14p, 480M |__ Port 1: Dev 2, If 0, Class=Vendor Specific Class, Driver=snd-usb-audio, 480M |__ Port 1: Dev 2, If 1, Class=Vendor Specific Class, Driver=snd-usb-audio, 480M |__ Port 1: Dev 2, If 2, Class=Vendor Specific Class, Driver=snd-usb-audio, 480M |__ Port 1: Dev 2, If 3, Class=Vendor Specific Class, Driver=snd-usb-audio, 480M |__ Port 1: Dev 2, If 4, Class=Vendor Specific Class, Driver=snd-usb-audio, 480M |__ Port 6: Dev 3, If 0, Class=Video, Driver=uvcvideo, 480M |__ Port 6: Dev 3, If 1, Class=Video, Driver=uvcvideo, 480M |__ Port 9: Dev 8, If 0, Class=Human Interface Device, Driver=usbhid, 12M /: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/2p, 480M |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/8p, 480M /: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/2p, 480M |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/6p, 480M Anything else I can provide for you guys?
I have a 16GB flash drive. I'm running Ubuntu 14.04. I can't open my flash drive and I can't see it in GParted. After running tail -f /var/log/syslog . After inserting my flash: USB disconnect, device number 10 Jul 3 16:39:55 rihanna-VGN-Z56GG-B kernel: [ 3309.712166] usb 2-3: new high-speed USB device number 11 using ehci-pci Jul 3 16:39:55 rihanna-VGN-Z56GG-B kernel: [ 3309.846591] usb 2-3: New USB device found, idVendor=090c, idProduct=1000 Jul 3 16:39:55 rihanna-VGN-Z56GG-B kernel: [ 3309.846601] usb 2-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3 Jul 3 16:39:55 rihanna-VGN-Z56GG-B kernel: [ 3309.846609] usb 2-3: Product: Silicon-Power Jul 3 16:39:55 rihanna-VGN-Z56GG-B kernel: [ 3309.846615] usb 2-3: Manufacturer: UFD 2.0 Jul 3 16:39:55 rihanna-VGN-Z56GG-B kernel: [ 3309.846622] usb 2-3: SerialNumber: 1401208423400131 Jul 3 16:39:55 rihanna-VGN-Z56GG-B kernel: [ 3309.847176] usb-storage 2-3:1.0: USB Mass Storage device detected Jul 3 16:39:55 rihanna-VGN-Z56GG-B kernel: [ 3309.847309] scsi12 : usb-storage 2-3:1.0 Jul 3 16:39:55 rihanna-VGN-Z56GG-B mtp-probe: checking bus 2, device 11: "/sys/devices/pci0000:00/0000:00:1d.7/usb2/2-3" Jul 3 16:39:55 rihanna-VGN-Z56GG-B mtp-probe: bus: 2, device: 11 was not an MTP device Jul 3 16:40:17 rihanna-VGN-Z56GG-B kernel: [ 3332.176107] usb 2-3: reset high-speed USB device number 11 using ehci-pci Jul 3 16:40:33 rihanna-VGN-Z56GG-B kernel: [ 3347.288080] usb 2-3: device descriptor read/64, error -110 Jul 3 16:40:48 rihanna-VGN-Z56GG-B kernel: [ 3362.504081] usb 2-3: device descriptor read/64, error -110 Jul 3 16:40:48 rihanna-VGN-Z56GG-B kernel: [ 3362.720076] usb 2-3: reset high-speed USB device number 11 using ehci-pci Jul 3 16:40:52 rihanna-VGN-Z56GG-B kernel: [ 3366.812110] usb 2-3: reset high-speed USB device number 11 using ehci-pci Jul 3 16:41:07 rihanna-VGN-Z56GG-B kernel: [ 3381.924082] usb 2-3: device descriptor read/64, error -110 Jul 3 16:41:23 rihanna-VGN-Z56GG-B kernel: [ 3397.356093] usb 2-3: reset high-speed USB device number 11 using ehci-pci Jul 3 16:41:38 rihanna-VGN-Z56GG-B kernel: [ 3412.468057] usb 2-3: device descriptor read/64, error -110 Jul 3 16:41:54 rihanna-VGN-Z56GG-B kernel: [ 3428.664065] usb 2-3: reset high-speed USB device number 11 using ehci-pci Jul 3 16:42:09 rihanna-VGN-Z56GG-B kernel: [ 3443.776100] usb 2-3: device descriptor read/64, error -110 Jul 3 16:42:24 rihanna-VGN-Z56GG-B kernel: [ 3458.992085] usb 2-3: device descriptor read/64, error -110 Jul 3 16:42:25 rihanna-VGN-Z56GG-B kernel: [ 3459.208063] usb 2-3: reset high-speed USB device number 11 using ehci-pci Jul 3 16:42:40 rihanna-VGN-Z56GG-B kernel: [ 3474.320039] usb 2-3: device descriptor read/64, error -110 Jul 3 16:42:50 rihanna-VGN-Z56GG-B kernel: [ 3484.516109] usb 2-3: reset high-speed USB device number 11 using ehci-pci Jul 3 16:42:50 rihanna-VGN-Z56GG-B kernel: [ 3484.768108] usb 2-3: reset high-speed USB device number 11 using ehci-pci Jul 3 16:43:05 rihanna-VGN-Z56GG-B kernel: [ 3499.880081] usb 2-3: device descriptor read/64, error -110 Jul 3 16:43:20 rihanna-VGN-Z56GG-B kernel: [ 3515.096081] usb 2-3: device descriptor read/64, error -110 Jul 3 16:43:21 rihanna-VGN-Z56GG-B kernel: [ 3515.312048] usb 2-3: reset high-speed USB device number 11 using ehci-pci Jul 3 16:43:36 rihanna-VGN-Z56GG-B kernel: [ 3530.424032] usb 2-3: device descriptor read/64, error -110 Jul 3 16:43:46 rihanna-VGN-Z56GG-B kernel: [ 3540.505230] scsi 12:0:0:0: Device offlined - not ready after error recovery
I have Ubuntu 12.04 LTS, and I want to install Windows 7 (I have no interest in keeping Ubuntu on the computer). I have a Windows 7 installation DVD, but when I tell my computer to boot from the CD/DVD Drive in the BIOS, it doesn't work. It bypasses it and starts booting Ubuntu instead. I have used this Windows installation disk in the past, so I know that it works.
I have absolutely no experience with Linux, and I desperately need to get my computer back up and running again with Windows. How do I remove Ubuntu and reinstall Windows? Editor's note: many of the answers are about removing Ubuntu from dual-boot but keeping Windows (which is a bit complicated), while other answers are about removing Ubuntu from single-boot (which is easy: basically just format the disk while installing Windows). The question as written is ambiguous between dual-boot or single-boot.
The above is a line in my textbook. $G, \delta, $ and $a$ are constants, the inner integral is just $$\int_0^{\pi/2} \cos\phi \sin\phi\, d\phi$$ Shouldn't the antiderivative of that be $\frac{(\sin\phi)^2}{2} $ and not $ -\frac{(\cos\phi)^2}{2}$?
I've been thinking about integration lately, and I've come up with a question that I'm not sure how to address. Consider $$ \int \sin x\cos x \, \mathrm dx = - \int -\sin x \cos x \, \mathrm dx $$ I started with the integral on the left hand side, which suggests a typical $u$-substitution. Let $u=\sin x$ then $\, \mathrm du=\cos x \, \mathrm dx$. So the integral evaluates to $$ \int \sin x\cos x \, \mathrm dx = \frac{\sin^2(x)}{2} $$ But the original integral also suggests an alternate substitution. Let $u=\cos x$ and then $du=-\sin x \, dx$. So now $$ \int \sin x\cos x \, \mathrm dx =- \int -\sin x \cos x \, \mathrm dx= -\frac{\cos^2(x)}{2} $$ So now I have that the integral evaluates to two different functions. I've tried playing with some different trigonometric identities, but I haven't been able to show that this is true and I'm fairly certain I haven't had any success because the statement itself isn't true. What am I doing wrong? How do you evaluate $\int \sin x\cos x \, \mathrm dx$?
I have Fallout3-GOTY (steam-app #22370) and wish to change the game's language from german to english. My steam-account is configured in english and steam correctly downloads the game in english. When I launch F3, the "Pre-loader" (Settings, Data-files, etc.) is in english, but the game itself is in german. (I already wiped it, restarted steam and redownloaded) From what I gathered through googling is, that I need to change the language in GFWL. Therefore I open the GFWL-overlay and browse through it all, but cannot find anything. Some options are blocked though by the fact, that I am not "connected to LIVE" and to do that I need a key, to connect the game to my LIVE-account. Now here's the problem: Steam does not provide me with a key, but LIVE won't go on without it. Is there a way to otherwise change the in-game language or do I need that key? If so: How can I get it? EDIT: same question, also no solution. From what I am getting all over the web, it seems that this is intentionally impossible. Yay, great.
I have Fallout 3 GOTY on Steam and it's in German. Low-violence version doesn't bother me, but the fact that I can't change the game's language to English. I want to play the game as it was intended to be and not with the poor German replacements of word jokes, etc. So does anybody know how to change the language to English? This could be through an English language patch or mod, or the English game files. EDIT: There is no option in Steam to change the language. EDIT 2: I have already tried all "legitimate" options, the only possible way would be to replace game files or apply a language patch EDIT 3: Steam provides me only with the german low-violence gamefiles.
I have the following example. I use \lstinline{} command to provide code within latex text. However the font size seems to be small. Please if you know how to to trigger this please let me know. SETUP: \documentclass[bsc]{bangorcsthesis} \title{title} \author{name name} \date{\today} \degreeScheme{BSc} \supervisor{Prof. prof prof} \bibliographySetup[compressed] \addbibresource{references.bib} \usepackage{soul} \newcommand{\lk}[1]{\textcolor{red}{#1}} \newcommand{\mk}[1]{\textcolor{green}{#1}} \newcommand{\question}[1]{\textcolor{blue}{#1}} \usepackage{float} \usepackage{listings} \usepackage{color} \definecolor{lightgray}{rgb}{.9,.9,.9} \definecolor{darkgray}{rgb}{.4,.4,.4} \definecolor{purple}{rgb}{0.65, 0.12, 0.82} \lstdefinelanguage{JavaScript}{ keywords={typeof, new, true, false, catch, function, return, null, catch, switch, var, if, in, while, do, else, case, break}, keywordstyle=\color{blue}\bfseries, ndkeywords={class, export, boolean, throw, implements, import, this, image, createCapture}, ndkeywordstyle=\color{darkgray}\bfseries, identifierstyle=\color{black}, sensitive=false, comment=[l]{//}, morecomment=[s]{/*}{*/}, commentstyle=\color{purple}\ttfamily, stringstyle=\color{red}\ttfamily, morestring=[b]', morestring=[b]" } \lstset{ language=JavaScript, backgroundcolor=\color{lightgray}, extendedchars=true, basicstyle=\footnotesize\ttfamily, showstringspaces=false, showspaces=false, numbers=left, numberstyle=\footnotesize, numbersep=9pt, tabsize=2, breaklines=true, showtabs=false, captionpos=b } \renewcommand\lstlistingname{Code Snippet} \begin{document} ... The layout is displayed as soon as the page loads on the user's screen. There are three main parts of the web-page's content. The first one is the original video feed (left canvas) which would be loaded frame by frame according to \lstinline{function draw()} of Processing5 library. The second part (middle of the figure) is where all the events are represented by image buttons and would be executed when mouse event listeners are called for each button individually. The third and final part, is where the 3-Dimensional environment is set (right canvas), using all the necessary WebGL libraries and self-invoking functions are called, such as \lstinline{function animate()} \& \lstinline{function render()}. ... \end{document}
I have a java lstlisting and it is too big and does not mach a single page. Is there any way to specify font for specific listing, not all listings in document?
Running an Ubuntu Trusty 14.04.1 LTS server at Rackspace but recently after running updates for bash, then with the reboots for the xen host vulnerability, I have the following weird issue. Some random auth.log entries are popping up out of date sync, for example: Oct 14 12:12:10 myserver sshd[2097]: pam_unix(sshd:session): session closed for user Oct 13 12:58:30 myserver sshd[2522]: Failed password for foo from 21.21.21.21 port 1490 ssh2 Oct 14 12:21:28 myserver sshd[3389]: Accepted password for bar from 22.22.22.22 port 61173 ssh2 I have a seperate cron.log running too, (I changed the configs for rsyslog) but have random out of date sync entries there too, for example: Oct 14 07:11:01 myserver CRON[32099]: (root) CMD Oct 13 03:16:01 myserver CRON[32226]: (root) CMD Oct 14 07:12:01 myserver CRON[32226]: (root) CMD EDIT TO ADD: I've noticed that it looks like some log entries are delayed being added to the *.log by rsyslog. Some entries show the following pattern: Oct 12 09:19:07 myserver sshd[4792]: pam_unix(sshd:auth): authentication failure; Oct 12 09:19:09 myserver sshd[4792]: Failed password for x Oct 14 12:21:32 myserver su[3484]: pam_unix(su:session): session open Oct 12 09:19:12 myserver sshd[4792]: Failed password for x from 20.20.20.20 port 2158 ssh2 The above example shows the first two entries came in on time, but the last one (12 seconds) was actually delayed by two days! I have checked the date on the server is correct, restarted SSH processes, restarted rsyslog. Everything else on server is running fine - Apache, sync, varnish etc etc Any ideas on what I'm missing here?
Have you ever seen wrong order in /var/log/syslog ? I think that it causes only crontab. Jun 28 22:20:01 alex CRON[2327]: (root) CMD (something > /dev/null) Jun 28 22:21:01 alex CRON[2700]: (root) CMD (something > /dev/null) Jun 21 03:49:01 alex CRON[2753]: (root) CMD (something > /dev/null) Jun 28 22:23:01 alex CRON[2754]: (root) CMD (something > /dev/null) Jun 27 05:08:01 alex CRON[2813]: (root) CMD (something > /dev/null) Jun 26 00:19:01 alex CRON[2816]: (root) CMD (something > /dev/null) Jun 28 22:25:01 alex CRON[2816]: (munin) CMD (if [ -x /usr/bin/munin-cron ]; then /usr/bin/munin-cron; fi) Jun 28 22:25:01 alex CRON[2821]: (root) CMD (something > /dev/null) Jun 28 22:27:01 alex CRON[3225]: (root) CMD (something > /dev/null) Jun 28 22:28:01 alex CRON[3240]: (root) CMD (something > /dev/null) Jun 28 22:30:01 alex CRON[3290]: (root) CMD (something > /dev/null) Jun 26 12:03:01 alex CRON[3291]: message repeated 2 times: [ (root) CMD (something > /dev/null)] Jun 28 22:30:01 alex CRON[3291]: (munin) CMD (if [ -x /usr/bin/munin-cron ]; then /usr/bin/munin-cron; fi) Jun 28 22:31:01 alex CRON[3659]: (root) CMD (something > /dev/null) Jun 28 22:32:01 alex CRON[3754]: (root) CMD (something > /dev/null) Jun 16 06:41:01 alex CRON[3846]: (root) CMD (something > /dev/null) Jun 28 22:35:58 alex cron[909]: (CRON) INFO (pidfile fd = 3) Jun 28 22:35:58 alex cron[944]: (CRON) STARTUP (fork ok) Jun 28 22:35:58 alex cron[944]: (CRON) INFO (Running @reboot jobs) Jun 28 22:36:01 alex CRON[1428]: (root) CMD (something > /dev/null) Jun 28 22:37:01 alex CRON[3050]: (root) CMD (something > /dev/null) Jun 28 22:38:01 alex CRON[3082]: (root) CMD (something > /dev/null) Jun 28 22:39:01 alex CRON[3114]: (root) CMD (something > /dev/null) As you can see, there is bad time order between lines. It is just crontab error, or there is some problem with system clock, or something? I am running the latest Ubuntu 14.04 kernel: Linux alex 3.13.0-30-generic #54-Ubuntu SMP Mon Jun 9 22:45:01 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
Would this proof work? Let $N$ be a nilpotent in a commutative ring and let $X$ be a unit. Let $Y$ be an element in the ring. Proof by contradiction: Assume $$Y(X+N) \neq 1$$ Then $$YX + YN \neq 1 $$ Then $$YXN^{n-1} \neq N^{n-1} $$ A contradiction since since $Y$ can be the inverse of $X$ and thus the equation can hold above.
I can't tell where I went wrong, am still a beginner. Let N be a nilpotent in a commutive ring , let X be any element. I'll will be showing X + N is a unit . Assume Y(X+N) =1 Then YX(N^n-1) = N^n-1 Multiplying both side by X+N We get X(N^n-1) = X(N^n-1) Thus nilpotent summed with any element gives unit.
I've searched past posts and have not seen an answer to this specifically, perhaps because it is assumed to be known so it was not stated in previous related posts. I have a very simple single variable model with a negatively skewed dependent variable Y. The residuals from Y = b0 + b1X are non-normal, which, by my understanding will violate regression assumptions and impact my residuals and hence inferences but should not affect the properties of unbiassedness or consistency of my estimate 'b1'. (correct me where I am wrong) To make correct inferences it seems the practice is to reflect and log the dependent variable as such Y* = ln(1 + max(Y) -Y) and run the following regression: Y* = b0 + b1X. If I am correct so far then my primary question is do we interpret b from the model above the same as a traditional log lin model: i.e. if ln(Y) = b0 + b1x Then b1 is interpreted as the b1*100% change in Y due to a 1 unit change in x. or exp(b1) = the change in the 'geometric' mean of Y due to a 1 unit change in x. If this is correct, does the same interpretation apply in the reflected and transformed case? Thank you.
I have a question regarding interpretation of regression results based on data where I have some negative values. Since the residuals were positively skewed I needed to log-transform my data, and because of negative values my log transformation looked like $\ln(Y-\min(Y)+1)$. Normally, if we have $\ln$ in both sides of the equation, then our $b$ coefficient means a percentage change of DV for 1 % change of IV. But I have big doubts whether the same is valid for such log-transformed data, where I added a constant to my DV in order to make the minimum value equal to 1. I can't also find any literature on this topic. Does anyone know for sure what would be the correct interpretation in such a situation?
I was following Blender Guru's tutorial on making a cup and I ran into this issue with the mesh. I deleted the interior faces and for some reason it still doesn't look good. I'm not sure what else would be wrong?
While rendering a mesh with smooth shading on, I get a dark region/shadow on certain faces. The effect is more evident when smooth shading is applied to a mesh containing ngons, with the ngons turning black when rendered. The blackening effect is visible in the viewport too. How can I solve this problem?
I'm currently saving for a first home down payment (in USA), but don't want to keep a large pile of money sitting in a low-yield savings account while I'm looking for the right home. I want to find a place to earn some returns but where that money isn't subject to volatility risk and still easy to liquidate when the time comes. I'd also rather not have to dip into existing 401k or IRA accounts in the process (I'm still making contributions to these while I'm saving). I'm unsure when I'll be buying a home, but possible not for another year or two, depending on various factors. I've been looking at online bond sellers like , which promises 5.0% interest (APR) and no-fee withdrawals any time. It seems low-risk, low-hassle, and obviously better than any standard bank savings account. Before I invest, I just want to know: A) Are these types of bond sellers as secure as they purport to be? and B) Are there better options that I'm not considering with similar security and liquidity?
I'm a US resident and I've saved > $100k cash for a home deposit. I expect to finance a home in the next 12 months. Currently the cash is split between Bank savings account and a couple of money market accounts (like FMOXX). Are there higher yield, short term alternatives for this type of saving? Note I'm not after specific product recommendations, but general investment strategies for this type of situation.
I have a Schengen visa that has a 90 days validity and will be expiring by the 25th of February, 2015. I got an Internship and thought I could renew or extend my visa from here (Geneva) but was told that I have to go back to my country (Nigeria) for a new visa. The visa procedure takes a month and there is a conference that I would like to attend by March which means if I should go back end of this month, I may not make it to the conference due to the long application period. Is there any way possible for me to have the extension here until March?
My daughter applied at the Italian Consulate in Philadelphia, and they gave her two entries for 20 days (we thought it was for 20 days each entry). She was in Italy 12 days, then went to England for 1 week and flew to Venice to take a 10-day cruise. She couldn't make it because they said she has only 8 remaining days, but she still has a land tour already paid this week. What can she do? Can she extend the Schengen visa for 12 more days? Right now, she is in Madrid, but next week she has to fly from Barcelona to Paris to start with the tour. What would happen if she decides to take the tour with the expired visa? She is a US permanent resident.
If $Y$ is $\text{Poisson}(λ)$ distributed, how do we obtain this confidence interval for $λ$: $\:l=\frac14 [(\sqrt{Y}+\sqrt{Y+1}-z_{α/2} )^2-1]$ $u=\frac14 [(\sqrt{Y}+\sqrt{Y+1}+z_{α/2} )^2-1]$
If $Y$ is Poisson$(\lambda)$ distributed, how do we obtain this confidence interval for $\lambda$: $$ \left (\frac{(\sqrt Y+\sqrt{Y + 1}-z_{(α⁄2)} )^2 - 1}{4},\ \frac{(\sqrt Y+\sqrt{Y +1}+z_{(α⁄2)} )^2 - 1}{4} \right ) $$
Is “to” in the following examples a preposition, or does it act as part of the verb (to obtain, to sign, to complete)? Many thanks! ▻ I finally managed to obtain a copy of the report. ▻ Both governments have agreed to sign the treaty. ▻ You're allowed half an hour to complete the test.
If you're interested in grammar, as I am, I am sure you have delved into a thought process about infinitive to, and like me, you have probably questioned what it is, or what it could be defined as. My mind always wants to place it in the Eight Parts of Speech, and I know this is foolish of me to some regard, so I stray from it, but I still wish to designate it under something that can be explain it. So, this is the motivation for this post, this question: What is the infinitive to, and why? Here are my thoughts: There are three real possibilities, going back through the times. First, we can say that it is part of the verb that comes after it (to go, to run, etc.). This could be supported by the claim that you are not supposed to "split" infinitives ("To boldly go"), but only that. Secondly, we could consider it a subordinator. I came across this designation most recently in my studies of modern and transformational grammar. As of right now, it is still the one I accept, especially as a result of the trend of designating more phrases as clauses. It works, except it's weird. Do we call this a unique subordinator as a result of how it operates? For example, to-infinitive clauses call for non-finite verb forms, which typically have an implied subject as a part of their clause. For example, "I want to go to the store." In the infinitive clause, "I" is the implied subject, as a understand. So, again, this works. However, things get a little weird when other subordinators come into play. For example, "I'm excited for you to win the competition." Now, if I'm right, those of you will say that "for" is a preposition here, as a result of the new-grammar stuff, but I'm going to count it as a subordinator, as defined by my own beliefs and that of a lot of other grammars. So, how do the clauses work in such a sentence? According to transformational grammar, "for you to win the competition" is defined as an ordinary clause. So, does that mean that it also contains a secondary clause within itself (the infinitive clause part)? If so, how do those two clauses work in conjunction to each other when one is so integrated? "For you to win the competition" looks to just be one clause, but if that's the case, doesn't "to" have to represent something else? This moves us on to the third way to look at things, which is to consider "to" as auxiliary verb, a defective one at that. There are a lot of things to support this, and it even allows for the split infinitive. Furthermore, it calls for a non-finite verb form to follow, like an auxiliary. But, as I said before, it's defective in the way that is all it can function as. As I said, I still accept to as a subordinator, but I want to be proven wrong or right. Wrong by showing evidence of it being something else, or right by showing how clauses operate when it seems to be layered up.
rida@rPC:/var/www/html$ wget https://github.com/joomla/joomla-cms/releases/download/3.4.3/Joomla_3.4.3-Stable-Full_Package.zip Output is : Joomla_3.4.3-Stable-Full_Package.zip: Permission denied Cannot write to ‘Joomla_3.4.3-Stable-Full_Package.zip’ (Success).
I installed the on my Ubuntu 11.04 (Natty Narwhal) with sudo apt-get install lamp-server^ Now I navigate to /var/www and use wget http://ftp.drupal.org/files/projects/drupal-7.x-dev.tar.gz I get the following error. --2011-08-03 13:59:00-- http://ftp.drupal.org/files/projects/drupal-7.x-dev.tar.gz Resolving ftp.drupal.org... 64.50.233.100, 64.50.236.52 Connecting to ftp.drupal.org|64.50.233.100|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 2757101 (2.6M) [application/x-gzip] drupal-7.x-dev.tar.gz: Permission denied Cannot write to `drupal-7.x-dev.tar.gz' (Permission denied). How do I resolve this error? I tried to download the same file in the downloads folder, and it went on without an issue. So it seems to be some permission error, but I'm not sure about that or how to solve it.
How to evaluate $$\lim_{x \to \infty} \dfrac {\bigg(\displaystyle\int_{0}^x e^{t^2} dt \bigg)^2} {\displaystyle\int_{0}^x e^{2t^2} dt} =\ ?$$ Can we apply L'Hospital's rule?
I've tried to apply L'hopitals rule on this one, as this get's $\frac{\infty}{\infty}$ $$\lim_{x \rightarrow +\infty} \frac{[\int^x_0 e^{y^2}\mathrm{d}y]^2}{\int^x_0 e^{2y^2}\mathrm{d}y}$$ $\frac{\mathrm{d} }{\mathrm{d} x}[\int^x_0 e^{y^2}\mathrm{d}y]^2 = 2[\int^x_0 e^{y^2}\mathrm{d}y] * [\frac{\mathrm{d} }{\mathrm{d} x}\int^x_0 e^{y^2}\mathrm{d}y]=2(e^{x^2}-1)(e^{x^2})$ and $\frac{\mathrm{d} }{\mathrm{d} x}[\int^x_0 e^{2y^2}\mathrm{d}y]=e^{2x^2}$ so $\lim_{x \rightarrow +\infty} \frac{[\int^x_0 e^{y^2}\mathrm{d}y]^2}{\int^x_0 e^{2y^2}\mathrm{d}y} = \lim_{x \rightarrow +\infty} \frac{2(e^{x^2}-1)(e^{x^2})}{e^{2x^2}} = 2\lim_{x \rightarrow +\infty} \frac{(e^{x^2}-1)}{e^{x^2}}=2\lim_{x \rightarrow +\infty} (1-\frac{1}{e^{x^2}})=2$ But the answer is $0$, so I think I've done a mistake somewhere I can't figure out where.
I am interested to learn a concise and complete theoretical overview of the currently accepted Standard Model of particle physics. Standard Model books that I have encountered so far (like Bjorken and Drell if I recall correctly?) contain a lot of historical (and maybe outdated) stuff, like parton models, some weird form factors etc. So I wonder if there exists a modern exposition of just the currently up to date theory (with references to relevant experiments, but no attempt to delve deeper into them within the book itself)?
I know classical physics, quantum mechanics, special relativity, and basic nuclear physics. I would like to get into some particle physics. Where can I find a good introduction? It might be useful to segment books by whether they require quantum field theory or not.
I have troubles trying to nest verbatim environment inside my \newenvironment definition one so I can include my source code faced to its result as on the most latex books printed. I can do it in a mechanical way: \begin{minipage}[b]{5in} \fbox{\begin{minipage}[t]{2.5in} \makebox[0mm]{gorilla gorilla}\\ \framebox[2mm][l]{gorilla gorilla}\\ \framebox[2mm][r]{gorilla gorilla}\\ \end{minipage}}\hfill \begin{minipage}[t]{2.5in} \begin{verbatim} \makebox[0mm]{gorilla gorilla}\\ \framebox[2mm][l]{gorilla gorilla}\\ \framebox[2mm][r]{gorilla gorilla}\\ \end{verbatim} \end{minipage}\mbox{} \end{minipage} But I'm not able do it in an automatic way by means my \newenvironment: \newenvironment{exe}[1]{\begin{minipage}{5in} \begin{minipage}{2.5in} #1 \end{minipage}\hfill \begin{minipage}{2.5in}\begin{verbatim}#1\end{verbatim}\end{minipage}} {\end{minipage}} \newcommand{\bex}{\begin{exe}} \newcommand{\eex}{\end{exe}} %Inside the body: \bex{\framebox[2mm]{gorilla gorilla}\\ \framebox[2mm][l]{gorilla gorilla}\\ \framebox[2mm][r]{gorilla gorilla}\\ }\eex The macro works if I remove \verbatim environment from the definition... I'm desperate. Anyone can help me? Thanks in advanced Best Regards! P.S.: For any extrange reason squared brackets are missed on the \newenvironment definition.
When documenting a style file, it would be nice to be able to easily put side by side different examples of code, side-by-side with the output they produce. What recommendations to people have to do this efficiently, and æsthetically?
I used Karabiner to map f2 to return_or_enter, so that F2 can rename files in the Finder. The configuration is "for all devices", not specific keyboards and is taken directly from Karabiner on-line configuration options "Use F2 as Rename." This works on my external keyboards (Apple and Microsoft), but not in the touch bar. Apparently touch bar F2 is not being detected as such--even though Karabiner EventViewer shows its events as code 59, f2, just like the external keyboard. Touch bar configuration is shown below. How can I configure this correctly in Karabiner?
I've configured my touch bar to always show function keys in one program where I use those frequently (IntelliJ IDEA, code editor). Many hotkeys in IDEA are triggered using a function key together with shift, alt or control, e.g. for renaming a variable, I use Shift+F6. With the emulated function keys, this does not work, the program acts as if I had just hit F6 without holding down the alt key. It was no problem with the hardware function keys on my old MacBook. Is this a known bug, or a limitation one has to live with? Or is there some way to work around it? Perhaps I'm just to stupid and missing something obvious? This is a major pain for me as a software developer…
After upgrading to ubuntu 16.04 when I boot into ubuntu I can see a black screen asking for a username and password,when I entered all these details it shows welcome to ubuntu 16.04 and all those. But still I am not able to see the desktop. It still in the position of accept commands from me as in the terminal we used to get
I am trying to boot Ubuntu on my computer. When I boot Ubuntu, it boots to a black screen. How can I fix this? Table of Contents:
I want to select data from following tables for a Jasper report. AA_COLUMN_NAMES AA_PAYMENT_DETAILS DDL + DML CREATE TABLE SLPAYROLL_LIVE.dbo.AA_COLUMN_NAMES( id int PRIMARY KEY NOT NULL, name varchar(500) NOT NULL, active bit ); INSERT INTO SLPAYROLL_LIVE.dbo.AA_COLUMN_NAMES (id, name, active) VALUES (1, 'col_1', 1); INSERT INTO SLPAYROLL_LIVE.dbo.AA_COLUMN_NAMES (id, name, active) VALUES (2, 'col_2', 1); INSERT INTO SLPAYROLL_LIVE.dbo.AA_COLUMN_NAMES (id, name, active) VALUES (3, 'col_3', 1); INSERT INTO SLPAYROLL_LIVE.dbo.AA_COLUMN_NAMES (id, name, active) VALUES (4, 'col_4', 0); CREATE TABLE SLPAYROLL_LIVE.dbo.AA_PAYMENT_DETAILS( id int PRIMARY KEY NOT NULL, username varchar(500), col_1 varchar(500), col_2 varchar(500), col_3 varchar(500), col_4 varchar(500) ); INSERT INTO SLPAYROLL_LIVE.dbo.AA_PAYMENT_DETAILS (id, username, col_1, col_2, col_3, col_4) VALUES (1, 'chathura', '500', '200', '300', '0'); INSERT INTO SLPAYROLL_LIVE.dbo.AA_PAYMENT_DETAILS (id, username, col_1, col_2, col_3, col_4) VALUES (2, 'gihan', '300', '100', '100', '0'); I want to select only active columns from AA_PAYMENT_DETAILS. The active column names can be get from the AA_COLUMN_NAMES table. I have googled my question and found the following solution. Since I want to use that query in a Jasper Report, above solution does not worked. Does anyone know a solution?
Also how do LEFT JOIN, RIGHT JOIN and FULL JOIN fit in?
So, I heard that all speed is relative. And that nothing can travel faster than light. Then I guess it is OK for a spaceship to leave Earth at 0.6c constant speed. And what if an other spaceship were to leave Earth at 0.6c in the opposite spacial direction. Then the relative speed between the two ships would be 1.2c, which is greater than c. How would that work out? Maybe something with time dilation?
Let's say I fire a bus through space at (almost) the speed of light in vacuum. If I'm inside the bus (sitting on the back seat) and I run up the aisle of the bus toward the front, does that mean I'm traveling faster than the speed of light? (Relative to Earth that I just took off from.)
I am wondering if it it as the title suggests, it is bad form to suggest edits that remove the main tag from the title of a question. I am banned from suggesting edits, which is fine, but the accept/reject seems to have been applied somewhat inconsistently. I thought I was doing some useful curation, but it would be good to know if this is not the cas to avoid future bans. Recent examples: Rejected Approved And rejection by the community bot I don't understand at all. So what is the accepted etiquette? Is it ok to remove tags in titles so long as you make some other edits to the content too? I guess the problem is that some post don't require any other editing. In my examples you can see the reject/accept has been quite inconsistently applied. I'd like to know to better avoid future bans, and to make sure I am making useful contributions to the site. Thanks.
I've seen questions edited to remove the language name from the title. Won't search engines - and folks using search engines - have an easier time finding them if these "tags" are kept as part of the title?
In this case I am not able to escape the quotes I think. I am trying this from last one day var obj = deals[i]; var1 = "my var" var url = "index.html?name="+obj['a']+"&user="+var1+"+obj['a']; var div = document.createElement('div'); div.innerHTML = '<div style="width: 100%; overflow: hidden" >' + '<div style="width: 10%; float: left;" >' + '<div><img src="assets/img/userimg.png" style="height: 35;margin-left: 10; margin-right: 5px;"/></div> <div id="toro" style="color: black">' + obj['a'] + '</div>' + '</div>' + '<div style="margin-left: 25%;">' + '<div style="margin-top: 7;font-weight: bold; color: black">' +obj['b']+'</div> <div style="color: black" >' + '</div><div style="float: right" id="time">'+'</div></div></div> '+'<hr class=\"hr-clas-low\" />'; document.getElementById('deals').appendChild(div) How do I add the url as onclick href url to the newly created div? OK I am rewriting this question again to convey where I am stuck exactly var obj = deals[i]; var1 = "my var" var url = "index.html?name="+obj['a']+"&user="+var1+"+obj['a']; var div = document.createElement('div'); div.innerHTML = '<div style="width: 100%; overflow: hidden" onclick="location.href='+url+'>' + '<div style="width: 10%; float: left;" >' + '<div><img src="assets/img/userimg.png" style="height: 35;margin-left: 10; margin-right: 5px;"/></div> <div id="toro" style="color: black">' + obj['a'] + '</div>' + '</div>' + '<div style="margin-left: 25%;">' + '<div style="margin-top: 7;font-weight: bold; color: black">' +obj['b']+'</div> <div style="color: black" >' + '</div><div style="float: right" id="time">'+'</div></div></div> '+'<hr class=\"hr-clas-low\" />'; document.getElementById('deals').appendChild(div) I have added onclick="location.href='+url+' to the external div but its not working?
I have a bit of code where I am looping through all the select boxes on a page and binding a .hover event to them to do a bit of twiddling with their width on mouse on/off. This happens on page ready and works just fine. The problem I have is that any select boxes I add via Ajax or DOM after the initial loop won't have the event bound. I have found this plugin (), but before I add another 5k to my pages with a plugin, I want to see if anyone knows a way to do this, either with jQuery directly or by another option.
I'm curious as to what the distinction for 'not a real question' on Stack Overflow is. It seems like if it's about 'what are the pros and cons of something' or 'could you suggest a resource', it gets flagged as not a real question. What the criteria for a 'real question' is and where these types of questions should be asked? Maybe this one will be closed as not being a real question?
Note: This close reason is old and only applies to old questions that were closed prior to the closing overhaul. This has been replaced by the reasons "unclear what you're asking" for unclear questions and "too broad" for overly broad questions. Older questions that have been closed as "not a real question" will remain closed under this reason, so this question is left here for reference. Questions used to be closed as "not a real question." What makes a question a "real" question? What are new users expected to know about asking "real" questions? Why does SE treat questions differently from other online forums?
I've been trying to make a Minecraft shop but I only want myself accessing it, I've tried multiple variations of: /testfor (nameofplayer) {score_ka1:1} (ka1 is just another objective for amount of kills a player has) Also, I don't want to replace (nameofplayer) with something like @p because it wouldn't work.
I am trying to make a command block that when powered, it will looks for a specific player in a 5 block radius of the command block. I tried /testfor @p[r=5][name=<name of player>] but it doesn't work.
When the language bar is in English mode, it types English characters as normal. But when I switch to Chinese mode, it continues to type English characters, and does not let me use Chinese characters. Is there a way to fix this?
To test 'text boxes' in an application of mine, I need the physical keyboard to output Japanese to the screen. Does anyone know how this can be done? The application is in a Virtual Machine (VMPlayer) running Windows Server 2008 R2. VMPlayer is on a Windows 7 64 bit machine to which the keyboard is connected too. I've already tried the set the following 'Keyboard and Languages' option in Control Panel of the Windows 7 machine but the keyboard still outputs English on screen of the Windows 7 screen. So getting this to work on the VM is still far away.
I need to highlight some parts of code containing both text and numbers using the siunitxpackage but I get an invalid-token-in-number, the token being a number! Here's my mwe: \documentclass{article} \usepackage{soul} % Enables highlighting \usepackage{siunitx} \begin{document} %% Error: %% siunitx error: "invalid-token-in-number" and "Invalid token '6' in numerical input." \hl{ Dummy text to avoid SI as very first argument of hl \SI{666}{\nm} Dummy text just in case} \end{document} Thanks for your help.
Since I wanted a better readability of highlights of a would be black & white-printed document, I needed to change both the highlighting color (gray) AND the font color (white). Depending which command you implement inside the other will compile or not: \hl{\textcolor{white}{Fail}} does not work, compiling returns Package xcolor Error: Undefined color '{white}'. Here's the mwe: \documentclass{article} \usepackage{xcolor} \usepackage{color} \usepackage{soul} % Enables highlighting \sethlcolor{gray} \begin{document} \textcolor{white}{\hl{Success}} %% Error: %% Package xcolor Error: Undefined color `{white}'. \hl{\textcolor{white}{Fail}} \end{document} So, in the end, the problem is sorta solved but I thought you might have an answer as to what happens.
We all know that speed of light is $3\times 10^8$ $\text{ }\mathrm{ms^{-1}}$. The speed of electron inside the atom is $2.7\times 10^8$ $\text{ }\mathrm{ms^{-1}}$, which is close to speed of light. So there is a machine that can accelerate the particle. Then when the particle move very fast, the resultant velocity of electron inside the particle should exceed the speed of light right?
Let's say I fire a bus through space at (almost) the speed of light in vacuum. If I'm inside the bus (sitting on the back seat) and I run up the aisle of the bus toward the front, does that mean I'm traveling faster than the speed of light? (Relative to Earth that I just took off from.)
I'm running man in non interactive mode from bash and I'm displaying the result on the webpage. I have number of character per line calculated on a page, how can I inform the man command about number of characters per line?
I'm on FreeBSD, using a wide xterm with, say, 132 characters per line. When running $ man man the manual page is formatted to fit an 80 character per line terminal width. Is there a way to make the formatter (groff, grotty) use a line width I specify? I read the manuals for man(1) and groff(1) but could not find an appropriate option. I know it can be done, since I have seen it work on some Linux distro.
My update manager on 12.04 will not find the upgrade to 13.04. I would like to know why I can't see it.
I am currently using Ubuntu 10.04. I know there is a 10.10 release, but can I upgrade directly to 11.04? Could you walk me through the steps please?
I have registered a .buzz domain and after a week my registrar, blocked my account and changed the who-is info and name servers. When I got in touch with them, they told me that because they cannot work with my country, I live in Iran for clarification, they have blocked me out and I should wait until the registration period ends like a full year, if I want to register it with other registrars, and they will not either let me to transfer my domain!!! As I have found out they have parked my domain and are showing they own ads and there is also a button for getting more information about how to buy it!!! What should I do now to get back my domain from them?! I should have some rights on that domain anew because I have registered it for the first time, and its not seems logical that they can hold my domain name just because they don't want to work with me. Please help me. I should also say that they have refunded my money but the problem is that I need my domain name not my money.
I have registered a .buzz domain and after a week my registrar, GoDaddy, blocked my account and changed the who-is info and name servers. When I got in touch with them, they told me that because they cannot work with my country, I live in Iran for clarification, they have blocked me out and I should wait until the registration period ends like a full year, if I want to register it with other registrars, and they will not either let me to transfer my domain!!! As I have found out they have parked my domain and are showing they own ads and there is also a button for getting more information about how to buy it!!! What should I do now to get back my domain from those thieves?! Please help me. I should also say that they have refunded my money but the problem is that I need my domain name not my money.
I am working on an application written solely in Java which will often be using very large amount of data (at most 500 GB). The program will be saving data not currently in use in a database. However, I want to keep as much data as possible within the application since a lot of it is reused often. In order to not get any out-of-memory errors I want to be able to check how much memory the application as a whole is using at any one moment, so that I can store it when the application approaches a predefined limit. Something like this; long memoryUsage = SomeClass.getCurrentMemoryUsage();
I need to check CPU and memory usage for the server in java, anyone know how it could be done?
Thanks! A very simple but great way to estimate mean curvatures@NathanReed answer. For my case, I also need an estimate of triangular mesh curvature, and I support this is what i was looking for. However, could you please show me (or any recommended literature) how is the following equation derived? $$\frac{(n_1 - n_0).(p_1 - p_0)}{||p_1 - p_0||^2}$$
I have a mesh and in the region around each triangle, I want to compute an estimate of the principal curvature directions. I have never done this sort of thing before and does not help a lot. Can you describe or point me to a simple algorithm that can help me compute this estimate? Assume that I know positions and normals of all vertices.
I have a large dataset of global .nc files and I am trying to clip them to a smaller area. I have this area stored as a .shp file. I have tried using GDAL from QGIS but needs to do this by converting each variable and I must select each variable and same shape for all files one by one and with 400 files going trough each variable seems not the best idea. Also this returns .tiff files separated and not the .nc file that I am aiming for. I had this little script but its not doing what I need: import glob import subprocess import os Shapefile = 'NHAF-250m.shp' # Create output directory OutDir = './Clipped_Rasters/' if not os.path.exists(OutDir): os.makedirs(OutDir) for Image in ImageList: print('Processing ' + Image) OutImage = OutDir + Image.replace('.nc', '_BurnedArea_Clipped.tif') # Defines Output Image # Clip image subprocess.call('gdalwarp -q -cutline /Users/path/to/file/NHAF-250-vector/ -tr 0.25 0.25 -of GTiff NETCDF:'+Image+":burned_area "+OutImage, shell=True) print('Done.' + '\n') print('All images processed.') I have also tried with import geopandas import xarray import rasterio import glob shapefile = 'NHAF-250m.shp' def shapefile_mask(shapefile) -> np.array: import pyproj with fiona.open(shapefile, 'r') as src: collection = list(src) geometries = [] for feature in collection: geom = shape(feature['geometry']) geometries.append(geom) mask = geometry_mask( geometries, out_shape=(1440, 720), transform=(1.0, 0.0, 0.0, 0.0, 1.0, 0.0), all_touched=True, invert=True) shape_mask = xarray.DataArray(mask , dims=("lon", "lat")) return shape_mask ImageList = sorted(glob.glob('*.nc')) print('number of images to process: ', len(ImageList)) shape_mask = shapefile_mask(shapefile) file_list = sorted(glob.glob('*.nc')) for file in file_list: nc_file = xarray.open_dataset(file) # Then apply the mask masked_netcdf_file = nc_file.where(shape_mask == True, drop=True) # store again as netcdf or do what every you want with the masked array masked_netcdf_file.to_netcdf(OutImage) But it is returning NaN or 0 for all values in all bands.
I have a 3-D time-series precipitation data (187 x 1800 x 3600), stored in a NetCDF file. I need to obtain the precipitation data for a shapefile. import matplotlib.pyplot as plt from netCDF4 import Dataset, num2date, from matplotlib.pyplot import figure from datetime import datetime, date, timedelta import numpy as np import xarray as xr import pandas as pd import geopandas as gpd MSWEP_monthly = 'D:\G3P\DATA\Models\MSWEP\MSWEP_monthly.nc4' MSWEP_monthly = Dataset(MSWEP_monthly, 'r') Pre_MSWEP = MSWEP_monthly.variables['precipitation'][:] MSWEP_monthly2 = xr.open_dataarray('D:\G3P\DATA\Models\MSWEP\MSWEP_monthly.nc4') Lon_MSWEP = MSWEP_monthly2.lon Lat_MSWEP = MSWEP_monthly2.lat Africa_Shape = gpd.read_file('D:\G3P\DATA\Shapefile\Africa_SHP\Africa.shp') from osgeo import gdal,osr,ogr def makeMask(lon,lat,res): source_ds = ogr.Open(shapefile) source_layer = source_ds.GetLayer() # Create high res raster in memory mem_ds = gdal.GetDriverByName('MEM').Create('', lon.size, lat.size, gdal.GDT_Byte) mem_ds.SetGeoTransform((lon.min(), res, 0, lat.max(), 0, -res)) band = mem_ds.GetRasterBand(1) # Rasterize shapefile to grid gdal.RasterizeLayer(mem_ds, [1], source_layer, burn_values=[1]) # Get rasterized shapefile as numpy array array = band.ReadAsArray() mem_ds = None band = None return array shapefile = 'D:\G3P\DATA\Shapefile\Africa_SHP\Africa.shp' source_ds = ogr.Open(shapefile) # calculate the cellsize cellsize = Lon_MSWEP[:][1] - Lon_MSWEP[:][0] # create the mask mask = makeMask(Lon_MSWEP,Lat_MSWEP,cellsize) Now if I implement the following code, the precipitation data for the first day (from the time-series) can be obtained with shape of 1800x3600: precip = np.ma.masked_where(mask==0,Pre_MSWEP[0,:,:]) I tried to use a for loop to mask the precipitation data for the entire time series (time, lon, lat) over the area of interest. however, the below code gives me a 2-D data, probably for the last day. Why is that? for i in range(len(Pre_MSWEP)): precip = np.ma.masked_where(mask==0,Pre_MSWEP[i,:,:])
I have a social app, where users can post to the school they chose on registration. Each post can have a hashtag and a school (all pointers, (hashtag is optional, school is not)). Users see posts based on school or hashtag. Now we want to introduce a new feature, Polls. Polls are another type of post... Users will be seeing them in their feed among other posts! Besides other properties, they too have a hashtag and a school. Right now when a user asks for posts, I'm just making a query to the Post collection, comparing only the school or hashtag field (depending on the screen they're at). So if they're on the Home screen, I'm going to have something like: find all documents in Post, where school equals <some_value> And if they are on the Hashtag screen, we have something like: find all documents in Post, where hashtag equals <some_value> Since we are going to have the new Poll collection, I'm wondering what implementation would be best... Here's what I have so far: 1st implementation We keep the posts query as is and we add another one, pretty much the same, for the polls and we combine the results. Have in mind here, that our app fetches data with pagination, so we bring the posts 20-by-20. I'm saying this because in case we have a page and the responses of the 2 queries bring 20 documents each, we'll have to compare dates to know what the response should be... eg 16 posts and 4 polls. 2nd (and last) implementation We create a new collection, Feed, which would combine both collections and it would look like this: Feed post: <Pointer to Post> poll: <Pointer to Poll> creator: <Pointer to User> // we need this for block checking or if you open your profile school: <Pointer to School> hashtag: <Pointer to Hashtag> Every time a post or poll will be created, their triggers will create a Feed document, with all the necessary values. I believe the second solution is the best, as it is much cleaner than the first. I also think they're pretty much the same complexity-wise. Any ideas on which one is better? If you have any other implementation to suggest, please do so! NOTE: All collections are indexed.
I have a social app, where users can post to the school they chose on registration. Each post can have a hashtag and a school (all pointers, (hashtag is optional, school is not)). Users see posts based on school or hashtag. Now we want to introduce a new feature, Polls. Polls are another type of post... Users will be seeing them in their feed among other posts! Besides other properties, they too have a hashtag and a school. Right now when a user asks for posts, I'm just making a query to the Post collection, comparing only the school or hashtag field (depending on the screen they're at). So if they're on the Home screen, I'm going to have something like: find all documents in Post, where school equals <some_value> And if they are on the Hashtag screen, we have something like: find all documents in Post, where hashtag equals <some_value> Since we are going to have the new Poll collection, I'm wondering what implementation would be best... Here's what I have so far: 1st implementation We keep the posts query as is and we add another one, pretty much the same, for the polls and we combine the results. Have in mind here, that our app fetches data with pagination, so we bring the posts 20-by-20. I'm saying this because in case we have a page and the responses of the 2 queries bring 20 documents each, we'll have to compare dates to know what the response should be... eg 16 posts and 4 polls. 2nd (and last) implementation We create a new collection, Feed, which would combine both collections and it would look like this: Feed post: <Pointer to Post> poll: <Pointer to Poll> creator: <Pointer to User> // we need this for block checking or if you open your profile school: <Pointer to School> hashtag: <Pointer to Hashtag> Every time a post or poll will be created, their triggers will create a Feed document, with all the necessary values. I believe the second solution is the best, as it is much cleaner than the first. I also think they're pretty much the same complexity-wise. Any ideas on which one is better? If you have any other implementation to suggest, please do so! NOTE: All collections are indexed.
\documentclass[a4paper, 12pt]{article} \usepackage{amsmath,latexsym, amssymb} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage[frenchb]{babel} \usepackage{times} \begin{document} On différentie l'égalité: $f(a,b) = f(x,y) = f(x, \phi (x))$ par rapport à $x$: \begin{align} df_{(x, \phi x)} & \circ \begin{bmatrix} \text{Id}_X \\ d\phi_x \end{bmatrix} = 0 \Leftrightarrow \big( df_{(x,\phi(x))|X},df_{(x,\phi(x))|Y} \big) \circ \begin{bmatrix} \text{Id}_X \\ d\phi_x \end{bmatrix} = 0 \end{align} \end{document} I got this output: Why is there "(1)" at the end of the line even though it didn't appear in the code? How to get rid of it?
After some brief searching I can't find the difference between align and align*. Google summarily ignoring the * is making it harder I think. Can you tell me the difference between these two? Moreover, can you tell me where you generally go for this type of information? As a relatively new user I'm still building up my resources.