body1
stringlengths
20
4.1k
body2
stringlengths
23
4.09k
According to the truth table, If $P$ is false,then $P->Q$ is true. if pigs fly, then $1+1=3$. Why is this implication true? How do you prove it?
In propositional logic, the statement "If pigs can fly, then elephants can lay eggs." validates to true because the antecedent validates to false. In other words, given $a \rightarrow b$, if a is false, the entire statement is true. Why? Just because the antecendent is false doesn't mean that another fact depends on it, right?
I became good friend with the man I met yesterday. I became good friend{s} with the man I met yesterday. Should "friend" be in plural or singular? Which one is right: "friend" or "friends"?
I was reading BBC culture page ( See ). In the middle of the text, we see: He became firm friends with the Shakespeare and Company owner in a relationship that lasted until his death 40 years later. Q1: Does the writer make a mistake? Q2: Why has the writer used the plural form of "friend"?
I'm trying to add a regex pattern to a HTML5 input which has the type of email. I want to invalidate the input if the proceeding character after the @ symbol doesn't contain at least a single character or number, followed by a dot followed by another character or number, e.g: [email protected] // valid because of "e.c" example@example. // invalid because "e." I want to retain the default browser validation for email and thus so far have this pattern that seems to match the first valid example I pasted? But looks untidy? \@([a-zA-Z0-9\/.&\s-].[a-zA-Z0-9\/.&\s-])
Is there a regular expression to validate an email address in JavaScript?
Is it possible to construct confidence intervals for a mean of weighted means using standard errors? I have 4 different weighted means ($p_t = \sum_{i=1}^{n} w_ip_i $ where $w_i$ is the respective weight) for $t = 1,2,3,4$ time periods, with $n = 16$: \begin{equation} \bar p_1 = 378.0494 \quad \bar p_2 = 349.1045 \quad \bar p_3 = 339.0127 \quad \bar p_4 = 338.8679 \end{equation} with corresponding standard errors: \begin{equation} s_1 = 43.668 \quad s_2 = 42.133 \quad s_3 = 40.465 \quad s_4 = 40.084 \end{equation} Calculating a moving average ($\hat P_m$) of these: \begin{equation} \hat P_m = 351.2586 \end{equation} Corresponding standard error: \begin{equation} s_{\hat p} = 9.246 \end{equation}
Imagine that you repeat an experiment three times. In each experiment, you collect triplicate measurements. The triplicates tend to be fairly close together, compared to the differences among the three experimental means. Computing the grand mean is pretty easy. But how can one compute a confidence interval for the grand mean? Sample data: Experiment 1: 34, 41, 39 Experiment 2: 45, 51, 52 Experiment 3: 29, 31, 35 Assume that the replicate values within an experiment follow a Gaussian distribution, as does the mean values of each experiment. The SD of variation within an experiment is smaller than the SD among experimental means. Assume also that there is no ordering of the three values in each experiment. The left-to-right order of the three values in each row is entirely arbitrary. The simple approach is to first compute the mean of each experiment: 38.0, 49.3, and 31.7, and then compute the mean, and its 95% confidence interval, of those three values. Using this method, the grand mean is 39.7 with the 95% confidence interval ranging from 17.4 to 61.9. The problem with that approach is that it totally ignores the variation among triplicates. I wonder if there isn't a good way to account for that variation.
I partitioned my hard drive and installed Debian on second partition. In order to do this I had to switch from BIOS to UEFI after basically destorying the MBR. Everything works great. However when I choose to boot to Windows 10 my various images within Hyper-V are not starting. The error states that hypervisor is not running. Any ideas? I tried this but no joy. Any suggestions on why this would have stopped working? C:\Users\User\Desktop>Coreinfo.exe -v Coreinfo v3.31 - Dump information on system CPU and memory topology Copyright (C) 2008-2014 Mark Russinovich Sysinternals - www.sysinternals.com Intel(R) Core(TM) i5-3340 CPU @ 3.10GHz Intel64 Family 6 Model 58 Stepping 9, GenuineIntel Microcode signature: 00000020 HYPERVISOR - Hypervisor is present VMX * Supports Intel hardware-assisted virtualization EPT * Supports Intel extended page tables (SLAT)
I've created and run Hyper-V guests on this machine in the past. VT extensions are enabled in the BIOS; no changes made there. I've changed my boot device order recently. How can I ensure that Hyper-V's host hypervisor is started on Windows startup? When attempting to start a VM, the Hyper-V Manager error shows: An error occurred while attempting to start the selected virtual machine(s). Failed to restore virtual machine state. Virtual machine 'Windows 10 Tech Preview' could not be started because the hypervisor is not running. The Hyper-V Virtual Machine Management service is set to Automatic. I've previously run bcdedit /set hypervisorlaunchtype auto as Administrator. No other VM products like VMWare or Virtualbox is installed.
ALright I have the netbook. I recently did a reset and now I cannot load any apps. It's telling me the internal memory is full and I do not know how to erase things and clear it since it won't let me even download an app to debug/clear cache/clean it. Who has some helpful suggestions?
Currently, my internal storage is running low on space. What can I do besides moving applications to the external memory, as to free up more space, but preserve my current applications and avoid uninstalling? (Some of them won't be moved)
I am relatively new to Ubuntu. I have been trying to run sudo apt-get update only to get a error. This has not happened to me before. $ sudo apt-get update Ign:1 http://dl.google.com/linux/chrome/deb stable InRelease Hit:2 http://dl.google.com/linux/chrome/deb stable Release Hit:3 http://ppa.launchpad.net/jonathonf/python-3.6/ubuntu bionic InRelease Hit:5 http://packages.microsoft.com/repos/vscode stable InRelease Hit:6 http://ppa.launchpad.net/linuxuprising/java/ubuntu bionic InRelease Hit:7 http://in.archive.ubuntu.com/ubuntu bionic InRelease Hit:8 http://in.archive.ubuntu.com/ubuntu bionic-updates InRelease Hit:9 http://in.archive.ubuntu.com/ubuntu bionic-backports InRelease Get:10 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB] Fetched 88.7 kB in 9s (9,888 B/s) Traceback (most recent call last): File "/usr/lib/cnf-update-db", line 8, in <module> from CommandNotFound.db.creator import DbCreator File "/usr/lib/python3/dist-packages/CommandNotFound/db/creator.py", line 11, in <module> import apt_pkg ModuleNotFoundError: No module named 'apt_pkg' Error in sys.excepthook: Traceback (most recent call last): File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 63, in apport_excepthook from apport.fileutils import likely_packaged, get_recent_crashes File "/usr/lib/python3/dist-packages/apport/__init__.py", line 5, in <module> from apport.report import Report File "/usr/lib/python3/dist-packages/apport/report.py", line 30, in <module> import apport.fileutils File "/usr/lib/python3/dist-packages/apport/fileutils.py", line 23, in <module> from apport.packaging_impl import impl as packaging File "/usr/lib/python3/dist-packages/apport/packaging_impl.py", line 24, in <module> import apt File "/usr/lib/python3/dist-packages/apt/__init__.py", line 23, in <module> import apt_pkg ModuleNotFoundError: No module named 'apt_pkg' Original exception was: Traceback (most recent call last): File "/usr/lib/cnf-update-db", line 8, in <module> from CommandNotFound.db.creator import DbCreator File "/usr/lib/python3/dist-packages/CommandNotFound/db/creator.py", line 11, in <module> import apt_pkg ModuleNotFoundError: No module named 'apt_pkg' Reading package lists... Done E: Problem executing scripts APT::Update::Post-Invoke-Success 'if /usr/bin/test -w /var/lib/command-not-found/ -a -e /usr/lib/cnf-update-db; then /usr/lib/cnf-update-db > /dev/null; fi' E: Sub-process returned an error code What could be causing this problem, and how can I fix it?
I run below command on ubuntu 16.4 : sudo add-apt-repository ppa:noobslab/apps of below question: and get below error: Traceback (most recent call last): File "/usr/bin/add-apt-repository", line 11, in <module> from softwareproperties.SoftwareProperties import SoftwareProperties, shortcut_handler File "/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 27, in <module> import apt_pkg ModuleNotFoundError: No module named 'apt_pkg' Error in sys.excepthook: Traceback (most recent call last): File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 63, in apport_excepthook from apport.fileutils import likely_packaged, get_recent_crashes File "/usr/lib/python3/dist-packages/apport/__init__.py", line 5, in <module> from apport.report import Report File "/usr/lib/python3/dist-packages/apport/report.py", line 30, in <module> import apport.fileutils File "/usr/lib/python3/dist-packages/apport/fileutils.py", line 23, in <module> from apport.packaging_impl import impl as packaging File "/usr/lib/python3/dist-packages/apport/packaging_impl.py", line 23, in <module> import apt File "/usr/lib/python3/dist-packages/apt/__init__.py", line 23, in <module> import apt_pkg ModuleNotFoundError: No module named 'apt_pkg' Original exception was: Traceback (most recent call last): File "/usr/bin/add-apt-repository", line 11, in <module> from softwareproperties.SoftwareProperties import SoftwareProperties, shortcut_handler File "/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 27, in <module> import apt_pkg ModuleNotFoundError: No module named 'apt_pkg' Thanks for help
I am a US permanent resident and I am currently studying abroad in England with a student short-term visa. I went to apply for a Schengen visa to VFS, but I got told that I would need to go back to the States and apply from them (as you can imagine, I cannot do this because it's costly to return). I did some research and found out that I can enter Belgium without a visa if I have a US Refugee Travel Document, which I do have. I was wondering if there is a way I can travel to other Schengen countries without a visa. Thanks for your assistance--I appreciate it. I am open to any suggestions.
I just want to double check to make sure I won't run into any issues at the border of entry. I'm a permanent resident of the USA with a green card and I have a travel document issued by the USA (I-571). Will I have any issues traveling around in the Schegen countries? Do I need a visa? Do I have to pay any fees?
I just changed my project coordinate reference frame to WGS 84 EPSG:4326. Additionally, I set the coordinate reference frame for each layer to EPSG:4326-WGS 84. However, the two layers don't line up. There appears to be some kind of vertical shift going on. Any ideas on what could be causing this discrepancy in their vertical position? In my second image I added the 'OpenStreetMap' layer and changed it's coordinate reference to WGS84, and as you can tell my layers are not lining up with Oklahoma. How to I make them line up with where they should be?
How do I change the projection of my shapefile using QGIS? The default projection is set to EPSG:3003, I want to change it to WGS84 EPSG:32632. When I do a reprojection or I change projection in the properties mask I don't have the correct result. On the left, I have the plan coordinates but they are not correct for the EPSG shown on the right:
I know how to separate the real and imaginary parts of $\ln z$ and $\arctan z$: $$\begin{align}\ln(x+iy)&=\frac{1}{2}\ln(x^2+y^2)+i\arctan\frac{y}{x}\\ \arctan(x+iy)&=\frac{1}{2}\arctan\frac{2x}{1-x^2-y^2}+\frac{i}{2}\operatorname{artanh}\frac{2y}{1+x^2+y^2}\end{align}$$ and I know how to prove both of these; in particular for the second one we can make use of the fact that $\arctan z=-i\operatorname{artanh}(iz)$. I would now like to know how to separate the real and imaginary parts of $\arccos(x+iy)$; I've thought of using the identity $\arccos(z)=\operatorname{arcosh}(iz)$, but I don't know how to use this, as the argument of the $\ln$ becomes very complicated. Thank you very much for your help.
Beginning with $$i \cos \left[ \frac{1}{n} \arccos \left( \frac{i}{\epsilon} \right) + \frac{m \pi}{n} \right]$$ where $m,n \in \mathbf{Z}$, $\epsilon >0$, $\epsilon \in \mathbf{R}$ and $i$ is the imaginary unit, I would like to obtain separately the real and imaginary part of the cosine argument: (1) $$\frac{1}{n} \arccos \left( \frac{i}{\epsilon} \right) + \frac{m \pi}{n} = x + iy$$ By simply applying the : (2) $$\frac{1}{n} \arccos \left( \frac{i}{\epsilon} \right) = \frac{\pi}{2n} + i \frac{1}{n} \ln \left[ \frac{1}{\epsilon} (\sqrt{1 + \epsilon^2} - 1) \right]$$ Similarly, if we apply the of complex $\arcsin$, we obtain: $$\arcsin \left( \frac{i}{\epsilon} \right) = -i \ln \left[ \frac{1}{\epsilon} (\sqrt{1 + \epsilon^2} - 1) \right]$$ Remembering (as stated ) that $$\mathrm{arsinh}(z) = -i\arcsin(iz)$$ we obtain $$\mathrm{arsinh} \left( \frac{1}{\epsilon} \right) = - \ln \left[ \frac{1}{\epsilon} (\sqrt{1 + \epsilon^2} - 1) \right]$$ So we can write $$x + iy = \frac{m \pi}{n} + \frac{\pi}{2n} + i\frac{1}{n} \ln \left[ \frac{1}{\epsilon} (\sqrt{1 + \epsilon^2} - 1) \right]$$ $$x + iy = \frac{\pi}{2} \left( \frac{2m + 1}{n} \right) - i\frac{1}{n} \mathrm{arsinh} \left( \frac{1}{\epsilon} \right) = \frac{\pi}{2} \left( \frac{2m - 1}{n} \right) - i\frac{1}{n} \mathrm{arsinh} \left( \frac{1}{\epsilon} \right)$$ But the correct result should be (3) $$x + iy = \frac{\pi}{2} \left( \frac{2m - 1}{n} \right) + i\frac{1}{n} \mathrm{arsinh} \left( \frac{1}{\epsilon} \right)$$ So, are there any errors? How to obtain (3) from (1)?
My domain is not new at all, in fact I have waited for quite a long time now for Google to show some love. If I do a search for my domain name, it shows the website is listed, but if I try to search for even a year-old post on Google, using my website name too, it never returns it. Instead it says some results have been omitted and asks if those omitted results should be included in the search results. The following is the message it returns: In order to show you the most relevant results, we have omitted some entries very similar to the 8 already displayed. If you like, you can repeat the search with the omitted results included. Why are my posts are never returned in search results even though I have original and ample content on my website?
This is a general, community wiki question and answer pair intended to address any questions concerning the reasons a site or specific site contents do not appear in search engine results. If your question was closed as a duplicate of this question and you feel that the information provided here does not provide a sufficient answer, please open a discussion on . My site (or specific pages on my site) is not appearing in search engine results. Why isn't my content indexed and what can I do about it?
I'm a high school senior interested in pursuing a major in quantitative economics, which I understand is heavily math-intensive. However, as it stands, my academic strengths are more verbal (780 on SAT) than mathematical (630 on SAT). Therefore, I'd much like to increase my skills at math and plan to devote a great deal of my summer studying from a precalculus textbook or two. That's where you good people at Math Stack Exchange come in. I'm hoping some of you could recommend a precalculus level textbook that has the potential to initiate a neophyte such as myself to the math world. Bonus points if you can recommend a textbook that somehow also has applications to economics. By the way, I actually have already purchased a precalculus level textbook, the University of Chicago School Mathematics Project's Precalculus and Discrete Mathematics, but am of the understanding that it is more of a primer text and thus would be wisely supplemented by something a little more in-depth. This might be helpful to take into consideration as well. I asked this same question at Math Overflow and was told that the site is more reserved for research-level mathematics, and was referred here instead, so I hope this is the right domain for this sort of question. Many thanks for any and all replies.
I'm working my way through Calculus, 9th ed. by Larson and Edwards in independent study. The problem is that many of the exercises and examples use a lot of algebra tricks that are glossed over and assumed knowledge on the part of the student. Now, when I took precalc in high school I was a total layabout and didn't really absorb many of the finer points as far as some specific topics go (nested absolute value inequalities, for instance) and I'm having a hard time working through many of the exercises. I have no trouble understanding the calculus aspect of the problems, but fail miserably on some of the harder algebraic aspects. I know I'm not the only one struggling with this, though -- an overarching criticism I've found of this book is that it assumes too much algebra knowledge of undergrad math students and doesn't fully explain any steps. What I'm really looking for is a precalc-level algebra reference with good examples that I can turn to for specific topics in algebra when I encounter a question I have trouble with. Can anyone recommend such a thing? Edit: I'd also like to point out that I have a kindle, so cheaper suggestions for good kindle books are welcome. That's assuming, of course, that kindle is a satisfactory medium for such a thing. I'm not sure.
Why has the question been protected by Community? Is that a bug or really community found it very useful?
I noticed in particular, which has 5 deleted answers on it. The most recently deleted answer was deleted by a diamond mod 3 minutes prior to the time it was protected by Community ♦ Is there an automated process that causes a question to be protected by Community ♦ instead of a human? If so, what are the qualifications that it checks for in order apply the protection? Related:
I have just downloaded a google-font. I want to use it in a specific section of the page. I think I am using the font in an incorrect manner. .page-header { font-family: 'Calligraffitti', cursive; src : url('../fonts/Calligraffitti/Calligraffitti-Regular.ttf'); } If this is incorrect, could you tell me the correct way of using a font that is not installed on a system?
Is there a way to add some custom font on a website without using images, or some other graphics? For example, I was working on a wedding website, and I found a lot of nice fonts for that subject. But I can't find the right way to add that font on the server. And how do I include that font with CSS into the HTML? Is this possible to do without graphics?
I am using pdflatex to document as my program runs. My program prints out some tikz commands in a file, which is compiled by pdflatex offline. In some cases the order of the commmands is not what I like, because the events in my program triggering printing tikz commands occur in the order which is dictated by the program logic, rather than in the order appropriate for preparing the plot. For example, I put a help grid on the figure, but I can find out the size of the grid only when the program is about to terminate, so the help grid will be on the top of other objects; or I am putting some labels on top of a filled rectangle, before the rectangle is drawn. I can work with the figure, but for publication, only for beauty, I need to rearrange manually the order of the objects in the prepared file. Can I use layers for this goal, i.e. I would need three layers, to prepare the plot in a way that my program, in addition to the commands, also names the target layer, and at the end I arrange the three layers, as I want to plot them?
This is an idle question, but neverthless, I think it's interesting. Does TikZ have a simple way to implement a "z-level" specification. By this, I don't mean 3D drawing, I mean specifying which parts of the picture are on top of what. So I'd write something like this: \draw[fill, blue,zlevel=1] (0,0) circle (2); \draw[fill,red,zlevel=2] (0,0) circle (1); and have the red circle appear on top of the blue one (since it has a higher z-level). I know I could just reverse the order, but I can imagine that being able to specify things this way round might make incremental changes to a TikZ picture in beamer easier by simplifying the overlay specifications... I suppose you could do something with remember picture, but it seems a "z-level" key would be the easiest solution (from the end user perspective). Is there anything like this? Is it possible?
I'm working on an exercise about Big O notations and I was wondering if there are any experts here who could help me determine the notation for the following code. so far, I am assuming that it is O(N^2). because a for loop is called in another loop. What do you guys think? public static Double average(Integer[] values) { Integer sum = 0; for (int i = 0; i < values.length; i++) { sum += values[i]; } return sum / values.length; } public static IDeque < Integer > slidingAvg( Stack < Integer > values, int width ) { IDeque < Integer > window = new ArrayDeque < > (width); IDeque < Double > averages = new ArrayDeque < > (values.size()); for (int i = 0; i < width; i++) { window.pushFirst(0); } for (int value: values) { window.pullLast(); window.pushFirst(value); Integer[] roll = window.toArray(new Integer[0]); Double average = average(roll); averages.push(average); } return averages; }
Most people with a degree in CS will certainly know what . It helps us to measure how well an algorithm scales. But I'm curious, how do you calculate or approximate the complexity of your algorithms?
find . -type f -print0 | xargs -0 ls -ltr | head -n 10 | awk '{print $NF}' | xargs rm This command is giving me this: xargs: 'ls' terminated by signal 13 However, it's executing fine. It's supposed to delete the 10 oldest files on the specific folder. Is there something to worry about? Is there a fix? Server is running BuildRoot.
I have a directory with ~1M files and need to search for particular patterns. I know how to do it for all the files: find /path/ -exec grep -H -m 1 'pattern' \{\} \; The full output is not desired (too slow). Several first hits are OK, so I tried to limit number of the lines: find /path/ -exec grep -H -m 1 'pattern' \{\} \; | head -n 5 This results in 5 lines followed by find: `grep' terminated by signal 13 and find continues to work. This is well explained . I tried quit action: find /path/ -exec grep -H -m 1 'pattern' \{\} \; -quit This outputs only the first match. Is it possible to limit find output with specific number of results (like providing an argument to quit similar to head -n)?
Then can we say that Int(f(A)) a subset of f(Int(A))? Can we prove or provide counterexample for this claim? The space is (R,d), where d is the absolute value metric, and R is the set of real numbers, f is a continuous function from R to R. A be a subset of R. If yes, can you extend in for any arbitrary metric spaces I am very new to metric space and topology, so any help will be appreciated.
Suppose consider the space (R,d), where d is the absolute value metric, and f is a continuous function from R to R. Let A be a subset of R. Then is Cl(f(A)) a subset of f(Cl(A))? Prove or provide counterexample. If yes, can you extend in for any arbitrary metric spaces I am very new to metric space and topology, so any help will be appreciated.
I have read the following example online: The journey there took three hours. (correct) (A) The trip took three hours (wrong) All dictionaries defined a trip as a short distance travel while journey it takes a lot time to achieve, i.e. to travel for a distant area by a vehicle. This already is understood and no question to ask more but I had this example: (B) We went on a three-week trip to Scotland. Now my question is: Why do they limit the use of the term (trip) to be for a short-time travel as in A sentence, then it is for three-week tip to _______ as in B? Here apparently confusion will occur not only to a non-native speaker but to the native speaker as well. I wonder how this duality in English language! I fear and wary off! This is a mistake, the very error to deal with "A trip to Scotland lasts three weeks" is (correct) but to say: "The trip took three hours" (wrong)! Another question: Does the trip in the sentence We went in three-week trip to Scotland mean going and returning home?
As they always were interchangeable in an article, I just want to know the difference.
I am trying to install the OpenSSH client on my Ubuntu system since I still receive the following error message: Reading package lists ... Done Building the dependency tree Reading status information ... Done Openssh-client package is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source E: 'openssh-client' package has no installation candidate I checked several forums and thought it was a problem updating my system. So I tried to update and I get this message that some packages can not be installed. I do not know what to do. Here is the answer: Err http://sunsite.rediris.es xenial Release.gpg   Can not resolve "sunsite.rediris.es" Err http://sunsite.rediris.es xenial-updates Release.gpg   Can not resolve "sunsite.rediris.es" Err http://sunsite.rediris.es xenial-backports Release.gpg   Can not resolve "sunsite.rediris.es" Err http://sunsite.rediris.es xenial-security Release.gpg   Can not resolve "sunsite.rediris.es" W: Can not retrieve http://sunsite.rediris.es/mirror/ubuntu-archive/dists/xenial/InRelease W: The download of some index files failed, they were skipped, or the old ones were used instead.
I'm trying to install KDE 5 on my Ubuntu 16.04 system as per the instructions in , but I'm getting the below error message when running sudo apt-get install kubuntu-desktop. Is there something I can do to resolve this? Need to get 682 kB/326 MB of archives. After this operation, 1,272 MB of additional disk space will be used. Do you want to continue? [Y/n] y Err:1 http://ir.archive.ubuntu.com/ubuntu xenial/universe amd64 gtk2-engines-oxygen amd64 1.4.6-1ubuntu1 Temporary failure resolving 'ir.archive.ubuntu.com' Get:2 http://ir.archive.ubuntu.com/ubuntu xenial/universe amd64 libkf5sendlater5 amd64 4:15.12.3-0ubuntu1 [45.2 kB] Get:3 http://ir.archive.ubuntu.com/ubuntu xenial/universe amd64 libthreadweaver4 amd64 4:4.14.16-0ubuntu3 [46.6 kB] Get:4 http://ir.archive.ubuntu.com/ubuntu xenial/universe amd64 libfarstream-0.2-5 amd64 0.2.7-0ubuntu1 [192 kB] Fetched 284 kB in 1min 9s (4,093 B/s) E: Failed to fetch http://ir.archive.ubuntu.com/ubuntu/pool/universe/g/ gtk2-engines-oxygen/gtk2-engines-oxygen_1.4.6-1ubuntu1_amd64.deb Temporary failure resolving 'ir.archive.ubuntu.com' E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
Most of the abstract algebra books are full of theorems and less examples . Can you please suggest me some sources where I can get the concepts with examples ?
I am taking abstract algebra in this semester. I find that my lecturer didn't provide enough examples for understanding. So I would like to ask what are the recommended books which has lots of solved problems and exercises? The lecturer said in this semester, he will cover group theory, ring theory and a bit of field theory. Which book contains extensive information in these three fields?
I was told that current has a direction but does not follow vector-laws, so it is a scalar quantity. That's okay. I thought it through Kirchoff's junction law: assume two currents joining at 90 deg, but they will not add vectorially, but algebraically. Now, I am told that current density is a vector quantity. Solving for this, two current densities maybe added at 90 deg or 45 deg they will definitely give same result and will definitely not add vectorially. So, why is current-density considered as vector? $$i = j A$$ $i$ is current, $j$ is current-density, and $A$ is the area of cross-section
Current is a scalar $I$ with units of $\mathrm{[J/s]}$. It is defined as $I=\frac{\mathrm{d}Q}{\mathrm{d}t}$. Current density is a vector $\vec{J}$ (with magnitude $J$) with units of $\mathrm{[J/s/m^2]}$. It is current per unit cross-sectional area, and is defined as $\vec{J}=nq\vec{v_d}$ (where $n$ is the number of moving $q$-charges with drift velocity $v_d$). Why is $I$ defined to not have a direction? Current density $\vec{J}$ is defined as a vector, so why is current $I$ not? There are many questions about current vs. current density ... like , and , but none answers my question about one being vector and the other being scalar. Is it simply just a definition? It just seems so obvious to define current as a vector too. of current density is $I = \int \vec{J} \cdot d\vec{A}$. Mathematically, the dot product gives a scalar. But, for me this doesn't give much explanation still, as we could just as well have mathematically defined current as a vector and then used the area in scalar form in an equivalent formula like: $\vec I = \int \vec{J} \cdot dA$. Is it just a definition without further reason, or is there a point in keeping $I$ in scalar form?
When I try sudo apt command I get the following message: libopencv-highgui2.4v5 : Depends: libpng12-0 (>= 1.2.13-4) but it is not installed E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution). When I try apt --fix-broken install I get: libpng12-0 0 upgraded, 1 newly installed, 0 to remove and 74 not upgraded. 5 not fully installed or removed. Need to get 0 B/116 kB of archives. After this operation, 285 kB of additional disk space will be used. Do you want to continue? [Y/n] y (Reading database ... 213917 files and directories currently installed.) Preparing to unpack .../libpng12-0_1.2.54-1ubuntu1_amd64.deb ... Unpacking libpng12-0:amd64 (1.2.54-1ubuntu1) ... dpkg: error processing archive /var/cache/apt/archives/libpng12-0_1.2.54-1ubunt u1_amd64.deb (--unpack): unable to install new version of '/lib/x86_64-linux-gnu/libpng12.so.0': No suc h file or directory No apport report written because the error message indicates an issue on the lo cal system Errors were encountered while processing: /var/cache/apt/archives/libpng12-0_1.2.54-1ubuntu1_amd64.deb E: Sub-process /usr/bin/dpkg returned an error code (1)```
For I need to install libpng12-0 package on the Ubuntu 19.10 system. I know that it is available . So I have decided to download this package manually and install it by hand. On previous Ubuntu versions (such as 18.04 LTS) this trick ends with success, but here on 19.10 it fails in very strange way: wget http://mirrors.kernel.org/ubuntu/pool/main/libp/libpng/libpng12-0_1.2.54-1ubuntu1.1_amd64.deb sudo apt-get install ./libpng12-0_1.2.54-1ubuntu1.1_amd64.deb 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 0 B/116 kB of archives. After this operation, 285 kB of additional disk space will be used. Get:1 /home/user/libpng12-0_1.2.54-1ubuntu1.1_amd64.deb libpng12-0 amd64 1.2.54-1ubuntu1.1 [116 kB] Selecting previously unselected package libpng12-0:amd64. (Reading database ... 212864 files and directories currently installed.) Preparing to unpack .../libpng12-0_1.2.54-1ubuntu1.1_amd64.deb ... Unpacking libpng12-0:amd64 (1.2.54-1ubuntu1.1) ... dpkg: error processing archive /home/user/libpng12-0_1.2.54-1ubuntu1.1_amd64.deb (--unpack): unable to install new version of '/lib/x86_64-linux-gnu/libpng12.so.0': No such file or directory No apport report written because the error message indicates an issue on the local system Errors were encountered while processing: /home/user/libpng12-0_1.2.54-1ubuntu1.1_amd64.deb E: Sub-process /usr/bin/dpkg returned an error code (1) What is wrong here? How can I get libpng12-0 installed on Ubuntu 19.10 system? Note: the same happens on 19.04, but it is near EOL.
I mount C:/, and I create a link from my Ubuntu desktop to Windows desktop. However, when I restart the computer, mount C again, and double click on the link, I get the error message This link cannot be used because its target “/media/me/209A9ACE9A9AA038/Users/me/Desktop” doesn't exist. So I guess the 209A9ACE9A9AA038 part is some kind of hash that changes every time I mount C. So how can I make a link that will work persistently? P.S. : I don't need auto-mount, but I want a link that will work whenever I mount the drive. Thanks for any help!
I'm using ubuntu 14.04 LTS. When I start my pc and click on any bookmark from the file manager it shows this error: Unable to find the requested file. Please check the spelling and try again. Unhandled error message: Error when getting information for file '/media/angel/DOC/edu': No such file or directory But when I open DOC drive and again clink on the same bookmark it works properly. Can anybody tell me why is this happening and how to solve this issue? Edit: Output of lsblk is following: (ubuntu is installed in sda5) NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 119.2G 0 disk ├─sda1 8:1 0 91.3G 0 part ├─sda2 8:2 0 1K 0 part ├─sda5 8:5 0 24.1G 0 part / └─sda6 8:6 0 3.8G 0 part [SWAP] sdb 8:16 0 465.8G 0 disk ├─sdb1 8:17 0 93.2G 0 part ├─sdb2 8:18 0 1K 0 part ├─sdb5 8:21 0 93.2G 0 part ├─sdb6 8:22 0 89.3G 0 part ├─sdb7 8:23 0 93.2G 0 part ├─sdb8 8:24 0 93.2G 0 part └─sdb9 8:25 0 3.8G 0 part sr0 11:0 1 1024M 0 rom After opening the disk drive the output of lsblk is bellow: NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 119.2G 0 disk ├─sda1 8:1 0 91.3G 0 part ├─sda2 8:2 0 1K 0 part ├─sda5 8:5 0 24.1G 0 part / └─sda6 8:6 0 3.8G 0 part [SWAP] sdb 8:16 0 465.8G 0 disk ├─sdb1 8:17 0 93.2G 0 part ├─sdb2 8:18 0 1K 0 part ├─sdb5 8:21 0 93.2G 0 part ├─sdb6 8:22 0 89.3G 0 part /media/angel/DOC ├─sdb7 8:23 0 93.2G 0 part ├─sdb8 8:24 0 93.2G 0 part └─sdb9 8:25 0 3.8G 0 part sr0 11:0 1 1024M 0 rom The output of sudo blkid gives the following information about sdb6: /dev/sdb6: LABEL="DOC" UUID="04280A22280A12FA" TYPE="ntfs"
I own a domain name that uses the .co extension and I'm located in France. Someone just advise me to get a .fr domain because it would make my local searches in France better. I personally thought that Google likes brandnames and would'nt care much about extension but do you have any advice on that? Does anyone has back up numbers to back that up?
Because I'm still living like it's 2008, I run a website with a .in TLD. The website has nothing to do we India and does not target Indian users. Unfortunately, when I go to Google Webmaster Tools I see that Google have locked my geotargeting status to India: On the , Google state that: Sites with country-coded top-level domains (such as .ie) are already associated with a geographic region, in this case Ireland. In this case, you won't be able to specify a geographic location. This seems implausibly inflexible, so I want to know if there are any sneaky ways of removing auto-geotargeting, or changing it to a more appropriate region?
i have 24gb RAM and 4 core LEMP server for run one application with Websocket PHP/Mysql but the problem is cpu going over 10-18% for just one user I dont know if server can crash with many users (over 100 in the same time) ? Im on Debian 7 My config (i add random number) key_buffer = 800M max_allowed_packet = 16M thread_stack = 192K thread_cache_size = 8 myisam-recover = BACKUP max_connections = 1000 query_cache_limit = 10M query_cache_size = 124M log_slow_queries = /var/log/mysql/mysql-slow.log long_query_time = 1 #log-queries-not-using-indexes #innodb_read_io_threads=4 #innodb_write_io_threads=8 #To stress the double write buffer #innodb_buffer_pool_load_at_startup=ON #innodb_log_file_size = 32M #Small log files, more page flush #innodb_log_files_in_group=2 #innodb_file_per_table=1 #innodb_log_buffer_size=8M #innodb_flush_method=O_DIRECT #innodb_flush_log_at_trx_commit=0 skip-name-resolve innodb_buffer_pool_size=1G innodb_buffer_pool_size = 3G innodb_thread_concurrency = 12 [mysql] #no-auto-rehash # faster start of mysql but no tab completition fpm/php.ini memory_limit = 1024M memcached.conf -m 1024 Nginx worker_processes 3; This configuration is good or i need to decrease ? Thanks you
This is a about Related: I have a question regarding capacity planning. Can the Server Fault community please help with the following: What kind of server do I need to handle some number of users? How many users can a server with some specifications handle? Will some server configuration be fast enough for my use case? I'm building a social networking site: what kind of hardware do I need? How much bandwidth do I need for some project? How much bandwidth will some number of users use in some application?
I am fololowing but this did not work for me . My start up script is: #!/bin/bash java -jar AppDemo.jar My stop script is: #!/bin/bash #Grabs and kill a process from the pidlist that was the word app pid=ps aux | grep AppDemo | awk '{print $2}' kill -9 $pid Myscript for init.d is: !/bin/bash # AppDemo # # description: Start Jar on system boot case $1 in start) /bin/bash /usr/local/bin/AppDemo-start.sh ;; stop) /bin/bash /usr/local/bin/AppDemo-stop.sh ;; restart) /bin/bash /usr/local/bin/App-Demo.sh /bin/bash /usr/local/bin/App-Demo.sh ;; esac exit 0 this is now working for me. I don't know what I did wrong can anybody please help?
I have no idea where to start looking. I've been reading about daemons and didn't understand the concept. More details : I've been writing a crawler which never stops and crawlers over RSS in the internet. The crawler has been written in java - therefore its a jar right now. I'm an administrator on a machine that has Ubuntu 11.04 . There is some chances for the machine to crash , so I'd like the crawler to run every time you startup the machine. Furthermore, I'd like it to keep running even when i logged out. I'm not sure this is possible, but most of the time I'm logged out, and I still want to it crawl. Any ideas? Can someone point me in the right direction? Just looking for the simplest solution.
How can I add a custom form menu link to the administrative menu programmatically? I am trying to add this form as admin menu link like content, structure and module.
I'm working on a module in Drupal 7. I've added a hook_menu implementation: $items['admin/config/content/mymodule'] = [ 'title' => 'MyModule', 'description' => 'Configure MyModule settings.', 'page callback' => 'mymodule_get_form', 'page arguments' => ['mymodule_admin_settings'], 'file' => 'mymodule.admin.inc', 'access arguments' => ['administer mymodule'], 'menu_name' => 'mymodule', ]; ...and a configure line to mymodule.info: configure = admin/config/content/mymodule A Configure link for MyModule now appears the admin/modules page, but how can I also have the module listed on the admin/config page? Or is the admin/config page reserved for only core modules?
Suppose that in an observational study with $N$ units, we have that $X_i$ are our covariates. I have read in several places that in order to calculate an unbiased treatment effect, the $X_i$ are assumed to be iid. I am wondering why this is necessarily the case, and specifically why the independence part is needed. What happens if we do not have: $$ X_i \overset{iid}{\sim} F $$ for some distribution $F$? What if it is the case that there is a dependency structure for $X_i$ and $X_j$? The unbiased estimation procedure I am referring to is from . Thank you.
In the textbook "Causal Inference for Statistics" by Rubin and Imbens, the following argument is made on pg. 39: "In part of this text we view our sample of size N as a random sample from an infinite super-population. In that case we employ slightly different formulations of the restric- tions on the assignment mechanism. Sampling from the super-population generates a joint sampling distribution on the quadruple of unit-level variables (Yi(0), Yi(1), Wi, Xi), i = 1, . . . , N. More explicitly, we assume the (Yi(0), Yi(1), Wi, Xi) are independently and identically distributed draws from a distribution indexed by a global parameter." I am wondering why the bolded portion is needed to be assumed. In the context of observational studies what happens if 1) we have dependence, and 2) if the tuple is not jointly identically distributed. Is this a general assumption that can be relaxed? Where do we really need it? Specifically: 1) What happens if we have dependence? 2) What happens if they are NOT identically distributed?
I am new to Quantum Mechanics, and very much eager to know the secret of it but I don't know from which book I could read. I wonder how the equations are predicted and as well as understand all the physical significance and the concept.I am from India, a student of 11th standard.I have learned calculus but do not know anything about vector space or (Analytical Algebra), in Physics I am well equipped with Mechanics, and other topics of electricity and magnetism. Please suggest a good book.
I'm really interested in quantum theory and would like to learn all that I can about it. I've followed a few tutorials and read a few books but none satisfied me completely. I'm looking for introductions for beginners which do not depend heavily on linear algebra or calculus, or which provide a soft introduction for the requisite mathematics as they go along. What are good introductory guides to QM along these lines?
I am currently looking to study Algebraic Geometry. As I am totally new to the subject any reference for books to follow will be helpful, thanks in advance....
I tried to learn Algbraic Geometry through some texts, but by Commutative Algebra, I left the subject; many books give definitions and theorems in Commutative algebra, but do not explain why it is needed. Can one suggest a good reference to learn this subject geometrically, which would also give ways to translate geometric ideas in algebraic manner, possibly through examples? Particularly, I am interested in differentials on algebraic curves, Riemann-Roch theorem, various definitions of genus and their equivalences, and mainly groups related to complex algebraic curves such as group of automorphisms, monodromy group etc.
I want to invite my grandfather from Pakistan to Europe (he has positive visa history for Schengen). As you may know most of Pakistanis living in the west reside in the UK and I would like to give him the opportunity to visit our family there. Can he apply for a UK visa whilst being a non-resident of a Schengen country? We would like to use the service of a certified visa agent here in a Germany because the processing times are much better than in Pakistan.
I am a Zimbabwean passport holder travelling to Denmark. I wanted to confirm if it is possible for me to apply for a UK visa while in Denmark?
I broke my iPhone 4s while I was travelling. So, I put it in my locker. I repaired it yesterday and connected it to iTunes. Unfortunately, My iPhone activated Activation Lock. Only one way to enter my Apple ID is to reset my password but, there is email that i don't know. It looks like g*****@m*****.com. g***** should be my email and I don't remember signing up with this kind of email. What should I do?
I bought a used iPhone 4. The previous owner re-set the phone, but did not remove the device from their iCloud. It is asking me for their iCloud information when I try to set-up the phone. I don't have contact with the previous owner anymore. Is there a way to remove the device from their iCloud so I can use a new one?
While installing any software or updating I am facing this malformed error. It is showing Malformed entry 58 in the list files /etc/apt/sources.list(component) The list of sources could not be read.
I have unistalled and reinstalled the Ubuntu Software Center as per info I found in a similar thread and I got the same response about line 91 or something like that. I just tried to upload a screen shot but since I'm new it won't allow me to. I also can not figure out how to cut and paste anything so I have to hand type what the error screen says, both when I attempt to open the software center and nothing happens, when I try to enter commands into the terminal to uninstall, reinstall, whatever I get the same following: COULD NOT INTITIALIZE THE PACKAGE INFORMATION An unresolvable problem occured while initializing the package information Please report t:his bug against the 'update-manager' package and include the following error message: 'E: Malformed line 91 in source list/etc/apt/sources.list (dist parse) E: The list of sources could not be read., E: The package list of status file could not be parsed or opened. How do I report bugs? What can be done about this. I have searched and everything everyone says to do leads me back to the same line error message. So, I don't know how to get to line 91 in the source list; to tell you what it says. Sorry, I'm really new to this. That is what I need is to find out how to get there and fix what it says. I would really like to NOT have to re partition my hard drive and start from scratch, so I'm really looking forward to getting this problem solved. I need to be able to install new software.
StackExchange articles such as "" seem to state that the gravitational force is only exerted by very large celestial objects that bend the space-time. StackExchange articles such as "" seem to cite the which apparently showed that two relatively small objects exert a gravitational force on each other. What is the current scientific consensus on this? Do small objects (like my pencil) exert forces on other small objects (like my eraser), or is it only large celestial objects that can exert a gravitational force?
As the title suggests, Can the effects of a person's mass upon the local gravitational field be detected and measured remotely? I am aware any mass produces and effects gravity but couldn't find anything in my searching if it is possible or theoretically possible to detect this effect remotely.
Is there any shorter notation for the following test? (typeof x != "undefined") ? x : y; A kind of x || y but that operates on undefined only (and not falsey values) Something like ?? of C#
Is there a null coalescing operator in Javascript? For example, in C#, I can do this: String someString = null; var whatIWant = someString ?? "Cookies!"; The best approximation I can figure out for Javascript is using the conditional operator: var someString = null; var whatIWant = someString ? someString : 'Cookies!'; Which is sorta icky IMHO. Can I do better?
I was getting too many soql queries, so decide to split the unit test. Now i am getting the error variable doesn't exist:rtmap @isTest(SEEALLDATA=true) public class test_createCaseFromOppt { public Map<String, Id> rtmap = CommonUtilities.getRecordTypeNames('Opportunity'); public Id recordTypeOpptPayroll = rtmap.get('Payroll'); static testMethod void myUnitTest1() { // Id recordTypeOpptPayroll = rtmap.get('Payroll'); Account account = new Account(BillingStreet='2510 Dixie Hwy. Ste. 8', BillingCity='Fort Mitchell', BillingState='KY', BillingCountry='USA', BillingPostalCode='41017', BillingCountryCode='US'); account.Name = 'xyz'; account.Source_System__c = 'abc'; insert account; system.debug('** 2: '+limits.getQueries()); Opportunity oppt1 = new Opportunity(); oppt1.Name = 'sample1'; oppt1.AccountId = account.id; oppt1.RecordTypeId = recordTypeOpptPayroll; oppt1.StageName = 'Propose'; oppt1.CloseDate = date.today().addYears(1); insert oppt1; test.startTest(); oppt1.StageName = 'Closed Won'; update oppt1; test.stopTest(); static testMethod void myUnitTest2() {............ }}
I'm having issues with creating a pretty simple test Utility Class. I want to create two records: an account and a related child contact. The error I see in the developer console is: Variable does not exist: a.ID My code, based on the Salesforce Apex Workbook, is as follows. I've played around with various things, but it's not working. Where am I going wrong? Thanks in advance. @isTest public class AccountSaveTestSuite { public static Account createOneAccount(){ Account testAccount = createAcct('ABC Computing inc.'); Contact testContact = createContact(); return testAccount; } // Helper methods // // private static Account createAcct(string accountName) { Account a = new Account( Name=accountName); insert a; return a; } private static Contact createContact(){ Contact c = new Contact ( FirstName = 'Jane' , LastName = 'Smith' , Account = a.ID); // *** Error is here *** insert c; return c; } }
I have a PC A behind proxy server S. A can use the internet with browser + proxy login, or terminal + export http command. Now I have another PC B that's connected to A. How can I access A's internet from another PC B, provided I can ssh between A and B? Edit: In , what I understand is that the PC (A) is directly connected to internet. In my case, however, A has to login to another proxy server S before it can use internet. Can I make a tunnel for this?
Assume I have access to an SSH server that supports tunneling, and I am on a PC that is running *ubuntu, how do I set up a local SOCKS proxy that tunnels the traffic through that SSH server before reaching the Internet?
I'm new with Cucumber... I've been getting a NullPointer Exception when I try to run my code. The java version works fine though... Could someone please tell me where I'm going wrong? public class Stepdefs { protected WebDriver driver; @Before public void setup() { DesiredCapabilities capabilities = DesiredCapabilities.firefox(); capabilities.setCapability("marionette", true); System.setProperty("webdriver.gecko.driver","/Users/sajupt/Documents/geckodriver"); WebDriver driver; driver = new FirefoxDriver(); driver.get("localhost"); } @After public void after() { driver.quit(); } @Given("^I am on the Preconditions Page$") public void i_am_on_the_preconditions_page() { } @When("^I click on the continue button$") public void I_click_on_the_continue_button() { driver.findElement(By.xpath(".//*[@id='root']/div/div/div/section/div[2]/div/section/form/section[2]/div[2]/div/div/button")).click(); WebElement continueButton = driver.findElement(By.className("RadioButton__button--2mnYd")); continueButton.click(); This is the error Trace [31mWhen [0m[31mI click on the continue button[0m [90m# Stepdefs.I_click_on_the_continue_button()[0m [31mjava.lang.NullPointerException at skeleton.Stepdefs.I_click_on_the_continue_button(Stepdefs.java:71) at ✽.When I click on the continue button(skeleton/belly.feature:5) [0m [36mThen [0m[36mI should go to the registered owner page[0m [90m# Stepdefs.i_should_go_to_the_registered_owner_page()[0m [31mFailed scenarios:[0m [31mskeleton/belly.feature:3 [0m# Scenario: Accessing the Quotes page 1 Scenarios ([31m1 failed[0m) 3 Steps ([31m1 failed[0m, [36m1 skipped[0m, [32m1 passed[0m) 0m6.000s java.lang.NullPointerException at skeleton.Stepdefs.I_click_on_the_continue_button(Stepdefs.java:71) at ✽.When I click on the continue button(skeleton/belly.feature:5) java.lang.NullPointerException at skeleton.Stepdefs.I_click_on_the_continue_button(Stepdefs.java:71) at ✽.When I click on the continue button(skeleton/belly.feature:5) Here is the feature file Feature: Getting a Quote Scenario: Accessing the Quotes Feature Given I am on the Preconditions Page When I click on the continue button Then I should go to the registered owner page When I click on the continue button Then I should go to the Enter HSN TSN page Then I should go to Select make page When I select a make and click continue Then I should go the Select model page When I select a model and click continue Then I should go the select fuel page When I select the fuel and click on continue Then I should go to the select Engine page When I select the Engine and click on continue Then I should go to the Registration page. When I enter the year and click on continue Then I should go to the Date of Birth page.
What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them? What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?
In the ninth episode of the sixth season of Game of Thrones "Battle of the Bastards" when the giant Wun Wun broke the gate of the castle, he got shot many times by archers and finally killed by the shot of Ramsay Bolton, my question is why did Ramsay wasted that shot on the giant when he has the chance to put it in Jon Snow's heart?
In , after the battle, inside Winterfell, the giant is on his knees and Jon Snow is standing besides him when Ramsay strikes the giant in the eye with an arrow. The giant was already fatally wounded and was unlikely to get back on his feet. Why did Ramsay aim for the giant then and not Jon Snow?
I made a script in Ajax that simply recovers data from MySQL and gives it back to PHP when a select option is changed: $country = $_POST['country']; $sql = "SELECT id,name FROM regions WHERE idcountry='$country' ORDER BY name ASC"; $result = mysqli_query($connexion->db, $sql); $count_row = $result->num_rows; $regions_arr = array(); while( $row = mysqli_fetch_array($result) ){ $idregion = $row['id']; $nameregion = htmlentities($row['name']); $regions_arr[] = array("id" => $idregion, "name" => $nameregion); } // encoding array to json format echo json_encode($regions_arr); And in my PHP page I have this script: <script> $(document).ready(function(){ $("#sel_country").change(function(){ var countryid = $(this).val(); $.ajax({ url: '/include/ajax/getRegions.php', type: 'POST', data: {country:countryid}, dataType: 'json', success:function(response){ var len = response.length; $("#sel_region").empty(); for( var i = 0; i<len; i++){ var id = response[i]['id']; var name = response[i]['name']; $("#sel_region").append("<option value='"+id+"'>"+name+"</option>"); } } }); }); }); </script> Everything works at is has to, except for some of the names recovered that have special characters, for instance "Genève" or "Zürich". Those values are not showed at all, my option has the correct value for the id but it looks empty in the name. I searched and I tried with uriencode but it doesn't seem to change, any idea how to fix this? Thank you! UPDATE AND SOLUTION I solved this by changing my tables to utf8m64 in this way (for each table): ALTER TABLE `table_name` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; Then in my script Ajax I added this: mysqli_set_charset($link, 'utf8mb4'); And then it finally works :)
I'm setting up a new server and want to support UTF-8 fully in my web application. I have tried this in the past on existing servers and always seem to end up having to fall back to ISO-8859-1. Where exactly do I need to set the encoding/charsets? I'm aware that I need to configure Apache, MySQL, and PHP to do this — is there some standard checklist I can follow, or perhaps troubleshoot where the mismatches occur? This is for a new Linux server, running MySQL 5, PHP, 5 and Apache 2.
I've been trying to work through the exercises in my book where you have to prove certain things are the case. It has been going okay so far, however I've gotten stuck on the following exercise, and I am not sure where to start. How can you prove that an $m \times n$ matrix $A$ has rank 1, if and only if $A$ can be written as the outer product uv$^T$ of a vector u in $\mathbb{R}^m$ and v in $\mathbb{R}^n$ I really don't know how to even start with this.
Let $A$ be an $n\times m$ matrix. Prove that $\operatorname{rank} (A) = 1$ if and only if there exist column vectors $v \in \mathbb{R}^n$ and $w \in \mathbb{R}^m$ such that $A=vw^t$. Progress: I'm going back and forth between using the definitions of rank: $\operatorname{rank} (A) = \dim(\operatorname{col}(A)) = \dim(\operatorname{row}(A))$ or using the rank theorem that says $ \operatorname{rank}(A)+\operatorname{nullity}(A) = m$. So in the second case I have to prove that $\operatorname{nullity}(A)=m$-1
What is the minimum sensor size need to get a separation between the subject and the background (bokeh) ? Print size A5 Not using a DSLR . Assuming max aperture is f/2.8 at wide end.
This is a somewhat theoretical question. Suppose I first take a photo of a subject using a full frame sensor DSLR, with a given lens (say 50mm prime lens at f/3.5). Now suppose I exchange the camera for an APS-C sensor DSLR (with a 1.6× crop factor). I keep the same lens (same focal length, same aperture) and I step back a few meters in order to maintain the field of view (at least keep the same magnification of the subject). I now take a second photo. Clearly depth of field will have increased between the two photos. But what about background blur (for example, trees at infinity)? Will I have the same amount of background blur, or will that have changed? I have read somewhere that background blur depends on the physical aperture size. In this case the physical aperture (physical focal length divided by f/stop) stays the same. But should this number be taken in relation to the sensor size? In which case with the smaller APS-C sensor, the physical aperture will be relatively bigger, which would mean more background blur. This would be rather counter-intuitive as we usually consider it to be more difficult to get background blur on an APS-C camera. Please give the reasoning behind the answer. I would answer the question myself using this but I can't manage to get it to run on my computer.
A typical statistics course will define the standard deviation as "the average of the difference between the data set and the mean ". So if we tried to describe the definition mathematically we should derive this equation (∑(|x-mean|))/n while, the known law for standard deviation is sqrt((∑(x-mean))^2⁄n) which doesn't make sense to me why we take the square root of all the variance function[(∑(x-mean))^2⁄n] instead the square root of only the squared part. Example if I have a list of 2 numbers [14,6] the arithmetic mean = 10 the average of distance of each value from the mean should = 4 , (14-4 = 10, 6+4 = 10) while the standard deviation law will calculate the value 4 x sqrt(2) ( 14 - 4sqrt(2) != 10) So, regarding the results shown can someone define a solid definition for the standard deviation and the intuition behind it?
Let's take the numbers 0-10. Their mean is 5, and the individual deviations from 5 are -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5 And so the average (magnitude of) deviation from the mean is $30/11 \approx 2.72$. However, this is not the standard deviation. The standard deviation is $\sqrt{10} \approx 3.16$. The first mean-deviation is a simpler and by far more intuitive definition of the "standard-deviation", so I'm sure it's the first definition statisticians worked with. However, for some reason they decided to adopt the second definition instead. What is the reasoning behind that decision?
I am a little confused about the way JavaScript treats objects passed as arguments to functions. For example, in the following code: var a = { val: "old" }; var b = { val: "old" }; function update(a, b) { a.val = "new"; b = { val: "new" }; } update(a, b); console.log(a, b); The output comes as: The val property of a is changed but that of b is not. I read somewhere that Objects are passed by reference to functions. Can anyone please explain this behaviour. Thanks in advance.
The primitive types (number, string, etc.) are passed by value, but objects are unknown, because they can be both passed-by-value (in case we consider that a variable holding an object is in fact a reference to the object) and passed-by-reference (when we consider that the variable to the object holds the object itself). Although it doesn't really matter at the end, I want to know what is the correct way to present the arguments passing conventions. Is there an excerpt from JavaScript specification, which defines what should be the semantics regarding this?
how should I approach this? "Prove or disprove that if a sequence does not have a converging subsequence then the sequence tend to infinity or negative infinity."
How to prove that the sequence $\{a_n\}$ has no convergent subsequence if and only if $|a_n|$ approaches infinity? The forward direction is obvious, how to prove the other direction?
By using generating functions and snake-oil I got to Also what is the implication of $\sum \limits_ {k<={n}}$? I am told that this is equivalent to: But I'm not sure how to do that step, thanks for the help!
I got quite some trouble trying to prove this. $$\sum_{k=m}^{n}(-1)^k\binom{n}{k}\binom{k}{m}=0, n>m\geq 0$$ I tried using $$\binom{n}{m}\binom{m}{k}=\binom{n}{k}\binom{n-k}{m-k}$$ and then changing the summation boundaries as $k=0, n=n-m$, but that took me nowhere... I would really appreciate help. Thank you.
Could anyone clarify what does the sudo apt-get install -y <package> do? what exactly does the -y stand for?
I always see commands like this apt-get -y install What is the -y tag for and what is the difference between apt-get install with and without the -y tag?
In StackOverFlow, sometimes question asker obviously uses comment idea, or answer solution but without giving resonse to the comment and the answer, is that responsible manner? what should we do for those kind of question asker?
On stackoverflow, there seem to be quite a few programmers who ask a question, usually with one line like: "How do I release memory after memory warning? My app crashes. Thanks and welcome for reply." And a bunch of us will ask questions like what platform? give us some more detail about the crash. Weeks will go by and the original poster never adds any more details. In the meantime, some respondents go ahead and answer the question thoroughly, covering possible platforms/scenarios, etc. Of course no answer is ever selected by the OP. Then the OP shows up again, and asks another question, sometimes its the same question asked differently, sometimes not. What is going on here? Do they have one chance every so often to get a query out on the Internet and they get through and they post and then they can't get back? Or are they forgetful, since they are posting the same question to tens or hundreds of sites? I'm just curious. Seems like they shoot themselves in the foot when they have a captive audience waiting for more details of their problem, yet they never provide those details.
Let $G$ be a finite group and $S$ a nonempty subset of $G$. I want to prove (or disprove) that $S^{|G|}$ (that is products of length $|G|$ of elements of $S$) is a subgroup. My work so far : Since we are in a finite group, it suffices to show that $S^{|G|}$ is stable under the group product. When $e\in S$, we have $S^{|G|} = \bigcup_{k=0}^{|G|}S^{k}$ and this is the subgroup generated by $S$. However I'm having issues solving this when $e\notin S$. I've tried to consider the monoid $C\subset \Bbb N$ of length of products of elements equal to the neutral element. If $S^{|G|}$ is not a group, then there exists $k\notin C$ smaller than $|G|$ such that $k+|G|\in C$. However I don't know where to go from here. Any help is appreciated ! Edit : Note that I want products of exactly $|G|$ elements of $S$, not products of at most $|G|$ elements of $S$
Let $G$ be a group with $|G| = n$ and let $ \emptyset \ne S \subseteq G$. I want to show that $S^n$ is a subgroup of $G$ where by $S^n$ I mean the set $\lbrace s_1\cdots s_n \; | \; s_i \in S\rbrace$.
It would make looking for the answers we have deleted so much easier...
I just tried to find a recent answer I wrote (or comment, can't remember), but I couldn't. I assume the question was deleted. Can the deleted:1 be enabled to 10k users? We can see deleted posts, so why can't we at least target them in search? I understand that allowing us to search for all deleted posts from someone else can be problematic. Quoting Yannis Rizos' comments: if deleted:1 becomes available to 10K+ users there should be a restriction on coupling it with a user id (except perhaps when you are searching for your own deleted posts). So, user:<userID> deleted:1 would be disallowed (except for your own user id), but something like [tag] deleted:1 would be allowed.
I am writing my dissertation and I need to type around 15/20 examples in Chinese. I am using the CJKutf8 package but the document crashes each time I have Chinese characters. When I follow the suggestions online, and use the code (and some others) below, everything works: \documentclass{article} \usepackage{CJKutf8} \begin{document} \begin{CJK*}{UTF8}{gbsn} 文章内容。 \clearpage\end{CJK*} \end{document} But, when I use this part only: \begin{CJK*}{UTF8}{gbsn} 文章内容。 \clearpage\end{CJK*} in my already existing document (which is 50 pages), it doesn't work. I am putting the codes in my preamble here. \documentclass[a4paper,12pt]{report} \usepackage{CJKutf8} \usepackage{graphicx} \usepackage{float} \usepackage{natbib} \usepackage{qtree} \usepackage[linguistics]{forest} \usepackage[normalem]{ulem} \usepackage{gb4e} \usepackage{setspace} \doublespacing \renewcommand\bibname{References} \begin{document} \title{Representation and acquisition of kind reference in L2 English} \author{Yılmaz Köylü} \date{\today} \maketitle \chapter{Introduction} \chapter{Genericity} I think it has to do with the preamble. Any ideas? Also, do you think I am doing something wrong with uploading the CJKutf8 package? I am using a Mac, and I would really appreciate if you could help. Thank you!
I'm trying to include Japanese and English text in the bibliography of LaTeX document while also using the package gb4eand no matter what Japanese text I input it comes out in the pdf as "0123456789abcdef0123456789abcdef0123456789abcdef01234". I'm using CJKutf8 with pdflatex (texlive2014) and have wadalab and CJK and the necessary fonts installed. I would use XeLaTeX but I would have to change too much of the earlier code to make it work properly. Any suggestions of why it is not working properly and why gb4e causes these problems? I need to keep the gb4e package for linguistic inter-linear glossing in the document. Here is my sample code: %!TeX encoding = UTF-8 %!TeX program = pdflatex \documentclass{article} \usepackage{CJKutf8} \usepackage[TS3,T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{gb4e} \begin{document} \begin{exe} \ex Make sure that ^{super}_{sub}scripts in \texttt{gb4e} work fine. \end{exe} \begin{thebibliography}{99} \bibitem{1} Inui, Hideyuki. 2005. \begin{CJK}{UTF8}{min} バスケト語の文法概観 \end{CJK} [A grammatical survey of the Basketo language]. \emph{Cushitic-Omotic Studies} 2004, 1--40. \end{thebibliography} \end{document} Here is a brief selection of the error text: ! Use of ^ doesn't match its definition. <argument> ^^c 0 l.16 ...ui, Hideyuki. 2005. \begin{CJK}{UTF8}{min} バスケト語の文法�... ?
I am creating an app Where the user can search database with inputs provided by user through edittext boxes.I am passing them to the database file as string argument to query and I am getting error.attaching the code This is the button click listener and autoname is Autotextview b1.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { MyDatabase m =new MyDatabase(getActivity()); Cursor c=m.searchname(autoname.getText().toString()); simpleCursorAdapter = new SimpleCursorAdapter(getActivity(), R.layout.custom_layout_row, c, new String[]{"_id", "name", "phone", "email", "subject"}, new int[]{R.id.rownumber, R.id.rowname, R.id.rowphone, R.id.rowmail, R.id.rowsubject}, 0); listView.setAdapter(simpleCursorAdapter); } }); This is the code in Mydatabase.java(Database file) public Cursor searchname(String argument) { Cursor cursor = null; cursor = s.query("student", null, "name=?", new String[]{argument}, null, null, null); return cursor; } I am getting error in the query string if i run raw query Cursor cursor = db.rawQuery("select * from student where name =?", new String[]{argument}); i got this error: java.lang.NullPointerException: Attempt to invoke virtual method 'android.database.Cursor android.database.sqlite.SQLiteDatabase.rawQuery(java.lang.String, java.lang.String[])' on a null object reference at com.techpalle.miniproject.MyDatabase.searchname(MyDatabase.java:107) at com.techpalle.miniproject.SearchFragment$2.onClick(SearchFragment.java:71)
What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them? What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?
I'm helping my father today to update his Google account. Below is a step-by-step procedure of what we did, and where we got in trouble.   1.  The procedure step-by-step First we logged in with his usual emailaddress [email protected]. We got into his Google account, and pressed on the icon representing the Gmail:   Google immediately showed us a message, encouraging us to add a Gmail to this Google-account. I've taken a screenshot, and added translations from Dutch to English in green ink: As you can see, the username karelmulier is already in use! This is very worrying to us, because my father never created a gmail address. We fear that someone with bad intentions created this account on my fathers name. I search for account recovery on Google, and got onto this link: I get a form where I can fill in the 'lost' account that I want to recover. Here is a screenshot: As you can see, Google claims that the account [email protected] doesn't exist.   2.  Our confusion When I attempt to add the Gmail address [email protected] to my fathers existing account, Google refuses because it "is already in use". When I try to recover it (from some bad guy abusing my fathers name), Google tells me it doesn't exist. How is this possible?
Being at I enter a desired username (without @gmail.com which is supposed), and I get error: "That username is taken. Try another." But when I try to login into Google with that [email protected] at it fails with: "Sorry, Google doesn't recognise that email." How that can be? P.S.: I want that username still.
I installed pop theme in my ubuntu 20.04. But after next system update my whole ubuntu turned into pop os. Now how I am supposed to get my good old ubuntu back?
I'm running Ubuntu 20.04.1 LTS. I was recently prompted to install an update from Ubuntu's GUI software updater, but I'm not sure which update. Now, I seem to have... a strange amalgamation of Ubuntu and PopOS all of a sudden? After booting up today, my desktop looks quite different: It appears to be using Pop Shell, the tiling window manager that PopOS uses. The left-hand dock is gone. Looking at 'Appearance -> Background' in Settings, the PopOS wallpapers are present. If I go to 'Appearance -> Appearance', the light/dark theme chooser shows a visual with "Pop!_OS User" in it. The scrolling direction has been reversed. The icons are different. The Ubuntu Software Center is missing, but there's no "Pop Shop" in its place. The list goes on... At the same time, a lot of my system is still very much how it was a few days ago when it was "pure Ubuntu" so to speak. My browser, IDE, files/folders, etc. are all the same... For context, I used to dual boot Windows and PopOS on a single SSD, but I've since wiped the drives I use (including resetting partitions). Now I use Windows on the SSD and Ubuntu on a new second drive... I can't imagine how anything from my old PopOS installation would carry over, let alone suddenly reappear inside Ubuntu after an update. EDIT: When running Software Updater again, it shows a full list of what it's trying to install: . When I try to install these packages, it fails midway through. That partially explains things... but why is this even happening? EDIT2: It is trying to install pop-gnome-initial-setup.deb which seems to conflict with gnome-initial-setup. Weird.
I am working through a statistics course right now and struggling a lot with this question. I'm not really sure where to begin. Any reading or idea where I should begin? I really need to understand this and I just dont.
The is $a(x) = 2\sqrt{x+3/8}$. Can anyone show me how to prove that an Anscombe-transformed version $Y = a(X)$ of a Poisson distributed random variable $X$ is approximately normal distributed (when $\lambda>4$)?
"A.h" template<class T> struct A { void foo(); }; template<class T> struct B : A<T> {}; "A.cpp" template<class T> void A<T>::foo() { } template struct B<int>; When I call method foo of B in other source files it doesn't build because of unresolved external symbol. Why isn't A defined with B? I find that weird at least. Is there a way to force A definition from definitions of B? I tried adding "using A::foo;" to struct B but it didn't change anything. I know I can simply define A but I don't want to because in my real code "A" contains more template parameters than "B" and I am worried than I will make mistake that will not be detected until someone writes code that requires those unresolved methods. Also I am very curios as to why it doesn't work.
Quote from : The only portable way of using templates at the moment is to implement them in header files by using inline functions. Why is this? (Clarification: header files are not the only portable solution. But they are the most convenient portable solution.)
If a user enters their name with lowercase letters, should we respect that or force it uppercase? "john doe" displayed as "John Doe". There is a contingent in our group that thinks it would be aesthetically more appealing to do this. Although, if a user explicitly inputs lowercase maybe we should keep it that way.
When collecting first and last name from users, should the name be formatted if it will be shown to the user again? Example: BILL is formatted to Bill It seem almost impossible to account for all the variations on names.
I'm usually quite good at this kind of thing but can't decide on this. When describing when a car has had its MOT (Ministry of Transport) test do I write... Recently MOTd Recently MOT'd Recently MOTed ...or something else? All of them look a bit wrong but a bit right. Or do I just cop out and put "Recently MOT Tested" instead??? Most Google searches bring up results for "Match of the Day"!
asked about pluralising acronyms, abbreviations and initialisms, but is there a standard way to add verb endings e.g. -ing and -ed (what are these called?), at least in informal English? For example, which of these is/are best? I'm SMSing her. I'm SMS-ing her. I'm SMS'ing her. I know I can rephrase it to "I'm sending her an SMS." but I wish to use SMS as a verb. Similarly, He FUBARed. He FUBAR-ed. He FUBAR'ed. He FUBAR-d. He FUBAR'd. In the latter set, as the verb is actually the F ("foul", or something more explicit) — the expanded sentence being "He fouled up beyond all recognition." — should it even be "He FedUBAR." or similar?
I'm aware of most differences in punctuation usage between American English and British English. However, I came across something conflicting or erroneous when I was reading Oxford English Grammar, Sidney Greenbaum. The following two examples is from the book and on how AmE kind of decrees that the final punctuation be included within the end quotation mark. One writer, signing his letter as "Red-blooded, balanced male," remarked on the "frequency of women fainting in peals," and suggested that they "settle back in their traditional role of making tea at meetings." Last December, he made his Metropolitan Opera debut leading "The Tales of Hoffman"; he returns his winter to do "Samson and Delilah" and "Faust." I want to understand whether or not the semicolon in the second sentence is correctly placed after the quotation mark. I wouldn't have any question if it were say a question mark instead of the semicolon, because in that case the question mark would be within the end quotation followed by a reporting clause something like below: "The Tales of Hoffman?" he doubted whether that was with which he led his Metropolitan Opera debut.
For example. If I want to quote a passage from a writing, that says The cake is not a lie. and my sentence is: The book by author states that "The cake is not a lie." however studies show that the cake is a lie. Is it OK to replace the period with a comma to make the sentence flow? Relevant: Also what do you do with the capital "T" Are you allowed to lowercase it? The book by author states "the cake is not a lie," however studies show that the cake is a lie. I usually just work around this by switching up the structure of the sentence, but sometimes I really want to phrase something a particular way.
I am running Ubuntu 18.04.1 on Virtualbox on a Windows 10 host and I can't figure out how to get the screen to take up the full window. I've tried installing virtualbox-dkms and virtualbox-guest-dkms in the terminal and it didn't work.
I tried many ways to make a bigger screen in VirtualBox because I do not like the small size of the guest window? Is there is a way to make it big?
Hi I'm new to this forum and I have a question. I am a fashion design student and at the moment I am retouching some pictures from a photoshoot. I like the colors I have in Photoshop but when I save it as a JPG somehow it all turns a little flat and grey, instead of the lively colors it is supposed to have. I have made a screenshot of both pictures, you can see it here: Photoshop is set to RGB mode and I am saving it as the highest quality JPG. I really hope someone knows why this could happen, because unfortunately Google hasn't given me any answers. Thanks in advance :)!
I am having a very odd problem. I have a photo that I took with my Nikon d5000 uploaded to photoshop, without any adjustments other than a crop, and then when I export it the color changes drastically In this screenshot, you can see the photo in windows photo viewer on the left, and Photoshop on the right. Do any of you know why this is occurring?
I am attempting to import a CSV file as a delimted text layer that has decimal values into QGIS 3.2. Whenever I do so, instead of QGIS reading the decimal values as real or double, it reads them as strings! Interestingly, while I was working on the project as a draft prior to saving it, I had no problem with QGIS reading the data properly. It seems that once I saved the project, QGIS is failing to read my imported decimal values properly.
I read in a CSV file for linking to a .shp file. All the variables that are just numbers came in as text. How do I change the text variables to numeric in QGIS?
I need to find the following limit: $$\lim_{(x,y) \rightarrow (0,0)} \frac{\cos(xy) -1}{x^2 y^2}$$ I did the following: Let $f(x) = \dfrac{\cos(x)-1}{x^2}$ and $g(x,y) = xy$. Then we would have $$\lim_{(x,y) \rightarrow (0,0)} \frac{\cos(xy) -1}{x^2 y^2} = \frac{\cos(\lim_{(x,y) \rightarrow (0,0)} xy) -1}{(\lim_{(x,y) \rightarrow (0,0)} xy)^2}=0$$ Is my procedure correct? What are other approaches one could have with these limits? Thanks.
Evaluate $\lim_\limits{(x,y)\to(0,0)}\dfrac{\cos(xy)-1}{x^2y^2}$ The limit does exist. The only thing I can think of is let $t=xy$. Then our limit becomes $$\lim_{t\to 0}\dfrac{\cos(t)-1}{t^2}=\lim_{t\to 0}\dfrac{\cos(t)-1}{t^2}\dfrac{(\cos(t)+1)}{(\cos(t)+1)}=\lim_{t\to 0}\dfrac{-\sin^{2}t}{t^2(\cos(t)+1)}$$ This is how far I got and then I don't know. Not even sure if this is the best method to find the limit. Any hints would help. Thank you.
What I'm trying to do: I have the first login activity, where user login using Google account. Then I save user data to SheredPreferences: private void handleSignInResult(GoogleSignInResult result) { if (result.isSuccess()) { GoogleSignInAccount acct = result.getSignInAccount(); String userName = acct.getDisplayName(); String userPhotoUrl = acct.getPhotoUrl().toString(); String userEmail = acct.getEmail(); UserPreference userPreference = new UserPreference(this); userPreference.setName(userName); userPreference.setEmail(userEmail); userPreference.setPhoto(userPhotoUrl); Intent mainIntent = new Intent(this, MainActivity.class); mainIntent.addFlags( Intent.FLAG_ACTIVITY_CLEAR_TOP).addFlags( Intent.FLAG_ACTIVITY_REORDER_TO_FRONT); startActivity(mainIntent); finish(); } } My preferences class: public class UserPreference { SharedPreferences prefs; public UserPreference(Activity activity) { prefs = activity.getSharedPreferences("USER_PREFERENCES",Activity.MODE_PRIVATE); // error line 15 } void setEmail(String email) { prefs.edit().putString("userEmail", email).apply(); } String getEmail() { return prefs.getString("userEmail", "userEmail"); } ... And my DBHelper class (I try to create individual db for each user): public class DBTools extends SQLiteOpenHelper { public DBTools(Context applicationContext, String name){ super(applicationContext, name+"-database.db", null, 1); } ... But when I try to use it in my MainActivity: DBTools mDBTools = new DBTools(this, new UserPreference(this).getEmail()); // error line 36 MainActivity I get this error: Process: com.package, PID: 21667 java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.package/com.package.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.SharedPreferences android.content.Context.getSharedPreferences(java.lang.String, int)' on a null object reference at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2334) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2483) at android.app.ActivityThread.access$900(ActivityThread.java:153) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1349) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:148) at android.app.ActivityThread.main(ActivityThread.java:5441) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:738) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:628) Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.SharedPreferences android.content.Context.getSharedPreferences(java.lang.String, int)' on a null object reference at android.content.ContextWrapper.getSharedPreferences(ContextWrapper.java:181) at com.package.UserPreference.<init>(UserPreference.java:15) at com.package.MainActivity.<init>(MainActivity.java:36) at java.lang.Class.newInstance(Native Method) I'll apreciate any help or hint
What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them? What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?
When I click Myname+ on a Google site, it loads the G+ profile with the "All" tab enabled by default. That means, it shows updates from all streams (all the circles I have created more or less). I want to change it to show the "Family" circle by default. How can I change it?
How can I choose a specific circle for the default stream in Google+ ? Many extensions don't work, and are not comfortable if using another PC.
Is there any easy way to export/convert LibreOffice tables & graphs to LaTeX format? EDIT allows you to paste the data and generates LaTeX formatted tables. CALC LOOKS LIKE THIS:
I am generating a PDF file using pdflatex and need to include another PDF file. The reason is that I have a graphMl file which I exported from yEd graph editor to a PDF file, named sample.pdf. The TeX code to be compiled with pdflatex is given below. I need to include that file at the start of the document. \documentclass[a4paper,leqno,twoside]{article} \usepackage[latin1]{inputenc} \usepackage[english]{babel} \usepackage{multirow} \begin{document} [% FOREACH st IN Service %] Name,Id: [% st.Id %], [% st.Name %] des: [% st.Description %] Customers: [% FOREACH softservice IN st.Customers %] [% FOREACH swid IN softservice.SW %] [% swid.Service %] [% FOREACH st IN Service %][% IF swid.Service == st.Id %] ([% st.Name %]) [% END %] [% END %][% END %][% END %] Suppliers: [% FOREACH shservice IN st.Suppliers %] [% FOREACH sw IN shservice.SW %][% sw.Service %] [% FOREACH st IN Service %][% IF sw.Service == st.Id %]([% st.Name %]) [% END %][% END %][% END %] [% FOREACH hw IN shservice.HW %][% hw.Type %][% hw.Nr %][% END %] [% END %] \newpage [% END %] \end{document}
One sometimes defines macro's for TikZ as: \newcommand{\foo}[1]{ \foreach \x in {#1} { %do something } } Thus where the argument given to \foo is used in a \foreach loop. Sometimes, one wants to know the number of items in advance, for instance to divide the width of an object among the given items. You can do this using a counter: \newcommand{\foo}[1]{ \setcounter{tmpA}{0} \foreach \x in {#1} { \stepcounter{tmpA} } \foreach \x in {#1} { %do something } } Thus using a counter tmpA and increment it the first time, and then iterate a second time over the list and use the value of the counter if necessary. One can of course abstract the counting away in a virtual call, but that's not really the problem: one needs to define a counter and there is always a small chance someone else defines a counter with the same name such that they interact. I was wondering if there are some utility functions defined for TikZ foreach items: counting, merging, crossproduct,...
Can someone explain what does [count=\i] in a foreach mean? Antal S-Z's answer to use this. It is also mentioned in , but I am not able to locate documentation on this in the TikZ-PGF manual (V2.10)
I read the Coulomb's first memoir on Electricity and Magnetism (Louis L. Bucciarelli english translated version), and found it to contain only three trials (as complained by many) to reach the conclusion of a $1/r^2$ equation for the force. And many seems to have also complained for not having able to get the same results. I read the recent papers of A.A Martinez and others who have tried to reproduce the experiment (the technical details went beyond so I couldn't complete). What I want to know now is, what has made Coulomb's law unquestionable? Has the experimental justification for the law been given? What are the reasons for accepting it? Or is the same equation been arrived theoretically (I have a feel for this)?
Up to which precision has the coulomb law proven to be true? I.e. if you have two electrons in a vacuum chamber, 5 meters appart, have the third order terms been ruled out? Are there any theoretical limits to measure the precision ( Planck's constant?). Obviously there are practical limitations ( imperfect vacuum, cosmic rays, vacuum fluctuation). Still, does anyone know what was the smallest amount ever correctly predicted by that law? Edit : Summary On the high end of the energy spectrum a precision of 10^-16 has been shown ( 42 years ago ) For electron point charges at large distances the law might brake down due to practical reasons. For moving particles QED gives a correction to the law:
Let the function $f : \mathbb{R} \to \mathbb{R}$ be differentiable and let $f'$ be a uniformly continuous function. For each $n \in \mathbb{N}$, let the function $f_n : \mathbb{R} \to \mathbb{R}$ be defined by the formula: $$f_n(x) = \frac{f(x+\frac{1}{n}) - f(x)}{\frac{1}{n}}$$ Show that $f_n \rightrightarrows f'$. Give an example illustrating the necessity of the assumption of uniform continuity of the function $f'$. I see that the $f_n(x)$ formula is a formula for derivatives of $f$. If it's not tricky I think that I have no problem to show that pointwise. However, I don't know how to prove the uniform continuity using the definition with $\epsilon$.
Let $f$ be a real valued, continuous and differentiable function on the real numbers with $f'$ uniformly continuous. Show that $g_n(x)$ with $$g_n(x)=nf(x+1/n)-nf(x)$$ is uniformly convergent to the derivative of $f$. I cannot figure out how to solve this problem. If anyone could help me for this problem I would be very grateful.
How to pronounce the "s" at the end of pupils. What is the phonetic of this word.
I’m Spanish but sometimes see TV shows in English. My question is whether the words horse and whores sound exactly the same, because in many English language TV shows it seems like they are, which really surprises me. Are they homophones? I cannot hear any voicing at the end of the word whores to distinguish the two words.
I understand the basic difference between the passing by value and passing by reference. Passing by value means that you pass values as function arguments and passing by reference means that you just simply pass the variable. What I don't get is how exactly works. Here is my example. #include <iostream> // Initializing Functions void swap(int &first, int &second); void write_and_prompt(); int main() { int num1 {30}; int num2 {185}; std::cout << "The original value of num1 is: " << num1 << '\n'; std::cout << "The original value of num2 is: " << num2 << '\n'; std::cout << "\nSwapping values..." << '\n'; std::cout << "Values have been swapped." << '\n'; // Function for swapping values. swap(num1, num2); std::cout << "\nThe value of num1 is: " << num1 << '\n'; std::cout << "The value of num2 is: " << num2 << '\n'; // Function that ends program after users input write_and_prompt(); } // End of main // Creating Fucntions void swap(int &first, int &second) { int temp = first; first = second; second = temp; } void write_and_prompt() { std::cout << "\nPress enter to exit the program." << '\n'; std::cin.get(); } So what I don't understand is when I call the function swap(num1, num2) I'm passing these two variables but in the syntax of the function I have &first, &second. I thought that I was passing the address of num1 and num2 but then I thought that I would need pointers in the function to be able to work with them plus I would use the address-of operator in front of num1 and num2 instead. Anyway what I trying to understand is why using the address-of operator(&) makes the function take the variables num1 and num2. I thought that this operator just gives the address of the variable or maybe I didn't understand it correctly.
I know references are syntactic sugar, so code is easier to read and write. But what is the difference between a pointer variable and a reference variable?
I tried to update the macos from the 10.15.7 to the recently released Big Sur. Software Update has dowloaded the installation data and the following popup dialog appeared. I found in Console's system.log the following message, but I'm not sure if it's related to my problem. Nov 12 22:58:02 coolomet com.apple.xpc.launchd[1] (com.apple.xpc.launchd.domain.pid.SoftwareUpdateC.1617): Failed to bootstrap path: path = /System/Library/CoreServices/Software Update.app/Contents/Resources/SoftwareUpdateConfigData, error = 2: No such file or directory I checked that the requested file exists in my system in the given location. ➜ Resources pwd /System/Library/CoreServices/Software Update.app/Contents/Resources ➜ Resources ls -l SoftwareUpdateConfigData -rwxr-xr-x 1 root wheel 42192 22 zář 02:25 SoftwareUpdateConfigData How can I download the Big Sur from the scratch again? I cannot find the location of downloaded installer. I don't see the usually downloaded installer in the /Application directory. ➜ Resources ls -l /Applications | grep -i install drwxr-xr-x 3 root wheel 96 12 lis 22:54 Install macOS Catalina.app
I am currently using a MacBook Pro 13" Mid 2018 with Touch Bar. Today macOS Big Sur was released and I tried to download it but it's getting stuck at 484.4 MB. Initially, it shows 16-17 minutes left, but as soon as it reaches 484.4 MB it's stuck and the timer goes till 10 hours! My Wi-Fi is totally stable with a speed of 100 Mbps. I tried to restart my Mac but it still gets stuck. Earlier there were similar issues in the App Store (even now they are). The issue was I was not able to download an app unless I connect to the US VPN. I even contacted support but they were not able to help out. It wasn't a big deal as a VPN could be used. But now even with VPN, it gets stuck.
I am running the OpenSSH daemon (sshd) on CrunchBang Linux, and I want to see a history of who (i.e. IP address) has logged in using SSH.
I've configured an ubuntu server with openssh in order to connect to it and execute commands from a remote system like a phone or a laptop. The problem is... I'm probably not the only one. Is there a way to know all the login attempts that have been made to the server?
Consider an object orbiting around a point with radius $r$ and angular velocity $\omega$. Here its linear velocity is $v=\omega r$. If we choose a large enough $r$ and reasonable $\omega$, $v$ might be greater than $c$. If this fact is impossible, what prevents it from happening?
Imagine a bar spinning like a helicopter propeller, At $\omega$ rad/s because the extremes of the bar goes at speed $$V = \omega * r$$ then we can reach near $c$ (speed of light) applying some finite amount of energy just doing $$\omega = V / r$$ The bar should be long, low density, strong to minimize the amount of energy needed For example a $2000\,\mathrm{m}$ bar $$\omega = 300 000 \frac{\mathrm{rad}}{\mathrm{s}} = 2864789\,\mathrm{rpm}$$ (a dental drill can commonly rotate at $400000\,\mathrm{rpm}$) $V$ (with dental drill) = 14% of speed of light. Then I say this experiment can be really made and bar extremes could approach $c$. What do you say? EDIT: Our planet is orbiting at sun and it's orbiting milky way, and who knows what else, then any Earth point have a speed of 500 km/s or more agains CMB. I wonder if we are orbiting something at that speed then there would be detectable relativist effect in different direction of measurements, simply extending a long bar or any directional mass in different galactic directions we should measure mass change due to relativity, simply because $V = \omega * r$ What do you think?
My Server has Total RAM 200GB. I have set 80% of total RAM for SQL Server as it needs more memory. Just want to know if there is any fixed number or method to finalise amount of memory to be set for SQL Server and then lock pages for SQL Server (or) it depends completely on resource utilization,workload?
I'm trying to come up with a sane way to understand if the max server memory (mb) setting is appropriate (either should be lower, or higher, or stay the way it is). I am aware that max server memory (mb) should always be low enough to leave room for the operating system itself, etc. The environment I'm looking at has several hundred servers; I need a reliable formula I can use to determine if the present size of the buffer pool is appropriate since RAM is costed per GB allocated to each server. The entire environment is virtualized, and "physical" RAM allocated to a VM can easily be changed up or down. I have a particular SQL Server Instance I'm looking at now with a PLE of 1,100,052 seconds, which equates to 12.7 days (the amount of time the server has been up). The server has a max server memory setting of 2560MB (2.5GB), of which only 1380MB (1.3GB) is actually committed. I've read several items including one by Jonathan Keheyias () and another by Paul Randal (), and several others. Jonathan advocates monitoring for a PLE below 300 per 4GB of buffer pool as being too low. For the SQL Server Instance above, 300 * (2.5 / 4) = 187 results in a really really low target PLE below 300. This instance has 290GB of SQL Server data (not including log files), and is only used for integration testing. Assuming the last 12 days is representative of typical usage for this server, I'd say the max server memory (mb) setting could be lowered. At the other end of the scale, I have another integration-test server with a PLE of 294, that has a max server memory (mb) setting of only 1GB. This server has only 224MB of SQL Server data not including logs, and is running some BizFlow databases. This server might benefit from a higher max server memory (mb) setting. I'm thinking a good starting place for targets that might be assigned too much memory could include looking at: SELECT RamMB = physical_memory_in_bytes / 1048576 , BufferPoolCommittedMB = bpool_committed * 8192E0 / 1048576 , BufferPoolCommitTargetMB = bpool_commit_target * 8192E0 / 1048576 , PercentOfDesiredSizeMB = CONVERT(INT,(CONVERT(DECIMAL(18,2),bpool_committed) / bpool_commit_target) * 100) FROM sys.dm_os_sys_info; If BufferPoolCommitTargetMB / BufferPoolCommittedMB is greater than 1, the server is not using the entire buffer pool. If the machine in question also has a PLE of greater than "x" then it might be a good candidate for a decrease in max server memory (mb). Since the Buffer Manager:Lazy writes/sec performance counter tracks the number of times SQLOS has written pages out to disk between checkpoints due to memory pressure, this might be another good thing to look at. DECLARE @WaitTime DATETIME; SET @WaitTime = '00:00:15'; DECLARE @NumSeconds INT; SET @NumSeconds = DATEDIFF(SECOND, 0, @WaitTime); DECLARE @LazyWrites1 BIGINT; DECLARE @LazyWrites2 BIGINT; SELECT @LazyWrites1 = cntr_value FROM sys.dm_os_performance_counters dopc WHERE ( dopc.counter_name LIKE 'Lazy writes/sec%' COLLATE SQL_Latin1_General_CP1_CI_AS ) AND dopc.object_name = 'MSSQL$' + CONVERT(VARCHAR(255), SERVERPROPERTY('InstanceName')) + ':Buffer Manager'; WAITFOR DELAY @WaitTime; SELECT @LazyWrites2 = cntr_value FROM sys.dm_os_performance_counters dopc WHERE ( dopc.counter_name LIKE 'Lazy writes/sec%' COLLATE SQL_Latin1_General_CP1_CI_AS ) AND dopc.object_name = 'MSSQL$' + CONVERT(VARCHAR(255), SERVERPROPERTY('InstanceName')) + ':Buffer Manager'; SELECT LazyWritesPerSecond = (@LazyWrites2 - @LazyWrites1) / @NumSeconds; The above code assumes the server is under load during the 15 seconds it takes to run, otherwise it will report 0; which might be a misleading false-negative. Should I also look at PAGELATCHIO_* wait stats or some other wait type as an indicator of memory pressure, or lack thereof? My question is, how can I reliably determine a "good" target value for PLE and max server memory (mb)?
I had these partitions on an external hard drive: /dev/disk2 (external, physical): #: TYPE NAME SIZE IDENTIFIER 0: GUID_partition_scheme *2.0 TB disk2 1: EFI EFI 209.7 MB disk2s1 2: Apple_HFS Android 63.9 GB disk2s2 3: Apple_HFS RiptideHUP 968.0 GB disk2s3 4: Microsoft Basic Data RiptideF 967.8 GB disk2s4 My aim was to delete disk2s2 and then resize disk2s3 to occupy the leftover space by deleting disk2s2. I deleted disk2s2 using this command: diskutil erasevolume "Free Space" "" /dev/disk2s2 Now, to resize the volume, I used: diskutil resizevolume /dev/disk2s3 R However, I got this error: Started partitioning on disk2s3 RiptideHUP Error: -69743: The new size must be different than the existing size I did a bit of research and realised the free space was created before disk2s3 RiptideHUP so it cannot resize itself. Is there still a way I can reclaim the Free Space? NOTE: Using diskutil list now shows: /dev/disk2 (external, physical): #: TYPE NAME SIZE IDENTIFIER 0: GUID_partition_scheme *2.0 TB disk2 1: EFI EFI 209.7 MB disk2s1 2: Apple_HFS RiptideHUP 968.0 GB disk2s3 3: Microsoft Basic Data RiptideF 967.8 GB disk2s4
On my mac hard disk, Macintosh HD (Startup Disk) is almost full, I need to increase the size of Macintosh merging some free space from my another partition. But I tried all possible ways, free space always merged to same partition, not to Macintosh HD.
Who do you want to talk to? Whom do you want to talk to? Which one is correct sentence?
I can never figure out whether I should use who and whom. Most people use who for both colloquially, but some people say this is not correct. What’s the rule for using who and whom correctly?
I have problems about understanding the intuition and differences about when to apply fixed effects, hierarchical linear models (multilevel models) and hierarchical mixed models. I will try to explain my difficulties in understanding with following example I am currently working on. I would like to analyze the influence of component characteristics to its performance during the product development process. Each component belongs to a subsystem and the subsystem belongs to a product. Thus, I have hierarchical data. The dependent variable is measured on all level. The independent variables are measured on all levels. I have this data for a couple of similar products with the same hierarchical structure resulting in panel data with repeated cross-sections. Here are some examples of my variables. Dependent variable: Development performance Independent variables: Number of materials Weight Complexity Prior experience Novelty Subsystem dummy (subsystem level) Number of parts (subsystem level) Budget (subsystem level) Assigned engineers (subsystem level) Product dummy (subsystem level) Customer segment (product level) Market (product level) Price (product level) This is what I understood so far. Fixed effects: With the help of fixed effects all time invariant effects will be absorbed, so the omitted variable bias is reduced. In my case I would like to use component fixed effects and product fixed effects as I may have left out some variables on the component level and products also differ slightly. Due to fixed effects I won’t be able to analyze interaction effects between individual and group level characteristics as group characteristics are absorbed. But this is not a problem as my questions are on the component level. Constant factors like the hierarchical dummy variable drop out. Hierarchical linear models (multilevel models) Characteristics are analyzed on multiple levels simultaneously I could use different types (Random intercepts, random slopes or random intercepts and slopes model) Evaluation of interaction effects between individual and group level characteristics is possible. But: Here I might get a problem with omitted variable bias Hierarchical mixed models Mixed models are characterized as containing both fixed and random effects. The fixed effects are analogous to standard regression coefficients and are estimated directly. Random effects may take the form of random intercepts or random coefficients. So here are finally my questions Fixed effects model: How do I include independent variables from higher levels that are not time invariant? Each group data is allocated to the individual level??? Is this correct or does it violate the independence assumption. What is the intuition choosing between fixed effects, hierarchical linear models and mixed models? What conditions should be met? What problems (e.g. endogeneity or bias problem) does each model solve? Mixed models: What variables should I use as fixed and random effects?
What is the difference between Multilevel/Hierarchical Modelling and Mixed Effects Models? Wikipedia considers them to be the same, i.e. two different names for the same thing. But I think they are not exactly the same. Could anybody explain the theoretical difference? Maybe the "Mixed Effects Models" is just one approach to solve Multilevel problems?
My super user password no longer works. My own fault I believe, messing around with usermod. Is there a way to resolve this? Using Ubuntu 14.04
I forgot my root password...actually I think I know what it is because it is the same password I have for pretty much everything but in the Terminal in tell me "Sorry, try again." Is there a way to reset the password? If so how?
I've heard that 18% gray cards are intended specifically to aid on determining the right exposure for photography, and only coincidentally for white balance. Is this true? Is it better to use a different type of aid for setting white balance?
I know 18% grey cards are supposed to provide a neutral color to set custom white balance. But why are grey cards used instead of pure white ones? My assumptions: Is a specific greytone easier to produce than pure white? Does white stain so much easier? (or Does grey just doesn't show stains that much?)
Let $b = 1 + \frac 1n$ and $a = 1 + \frac {1}{n + 1}$ Consider $\frac{b^{n + 1} - a^{n + 1}}{b - a} < (n + 1)b^n.$ we can substitute the given $a, b$ into this inequality to get $\frac {(1 + \frac 1n)^{n + 1} - (1 + \frac {1}{n + 1})^{n + 1}}{b - a} < (n + 1)(1 + \frac 1n)^n$ which is $\frac {a_nb -a_{n + 1}}{b - a} < (n + 1)a_n$ so that $a_{n + 1} > (b -a)(n + 1)a_n - a_nb = a_n(-(bn - an - a))$ Does that work? edit: I got a good answer on here, but I don't mind if this question is locked.
How could we prove that this inequality holds $$ \left(1+\frac{1}{n+1}\right)^{n+1} \gt \left(1+\frac{1}{n} \right)^{n} $$ where $n \in \mathbb{N}$, I think we could use the AM-GM inequality for this but not getting how?
I have a parent-child LWC: <template> <template if:true={isInitialized}> <lightning-layout multiple-rows="false"> <template if:true={showCustomerQuote}> <lightning-layout-item size="6"> <c-customer-quote-builder record-id={customerLoadId} object-api-name={objectApiName} customer-load-list={customerLoadList} oncustomerloadchanged={customerLoadChangedHandler} onaddtocarrierquote={addToCarrierQuoteHandler}></c-customer-quote-builder> </lightning-layout-item> </template> <template if:true={showCarrierQuote}> <lightning-layout-item size="6"> <c-carrier-quote-builder record-id={carrierLoadId} object-api-name={objectApiName} carrier-load-list={carrierLoadList} oncarrierquotechanged={carrierQuoteChangedHandler} onaddtocustomerquote={addToCustomerQuoteHandler}></c-carrier-quote-builder> </lightning-layout-item> </template> </lightning-layout> </template> </template> I want the child to send an event to the parent, which changes @api parameters on the same child: Child Event Dispatcher: customerLoadChanged(event) { const e = new CustomEvent('customerloadchanged', { detail: { loadId: event.target.value }}); this.dispatchEvent(e); } Parent Event Handler changes @api parameter on the child who sent the event: customerLoadChangedHandler(event) { this.customerLoadId = event.detail.loadId; } Event though customerLoadId/recordId is an @api parameter on the child the child does not re-render: @api recordId; // Load__c or CustomerQuote__c Id Why doesn't the update of an @api parameter by a parent pushed to a child NOT redraw the child?? Thanks.
Let's say we have this code for a LWC: <!-- helloExpressions.html --> <template> <div class="slds-m-around_medium"> <lightning-input name='firstName' label="First Name" onchange={handleChange}></lightning-input> <lightning-input name='lastName' label="Last Name" onchange={handleChange}></lightning-input> <p class="slds-m-top_medium">Uppercased Full Name: {uppercasedFullName}</p> </div> </template> and this is the JS file: // helloExpressions.js import { LightningElement, track } from 'lwc'; export default class HelloExpressions extends LightningElement { @track firstName = ''; @track lastName = ''; handleChange(event) { const field = event.target.name; if (field === 'firstName') { this.firstName = event.target.value; } else if (field === 'lastName') { this.lastName = event.target.value; } } get uppercasedFullName() { return `${this.firstName} ${this.lastName}`.toUpperCase(); } } firstName and lastName have been decorated with @track. Now as per the documentation, decorating a property with @track makes it private and reactive, while to mark a property public and reactive, use @api. So if I just change the decorator to @api for both these variables, it should work. I am referring these from the same component only. But it's not working. UPDATE: 27th Feb -------------------- Somehow it's working today. I just changed the decorator of the variables to api. import { LightningElement, api } from 'lwc'; export default class HelloExpressions extends LightningElement { @api firstName = ''; @api lastName = ''; handleChange(event) { const field = event.target.name; if (field === 'firstName') { this.firstName = event.target.value; } else if (field === 'lastName') { this.lastName = event.target.value; } } get uppercasedFullName() { return `${this.firstName} ${this.lastName}`.toUpperCase(); } } So it's working.
I'm getting Exception in thread "Thread-0" java.lang.NullPointerException. this array is already printed before, I don't understand why int the second time it's throws this error. here is my code: static Sensors[][] proximity_Sensors; public static void main(String[] args) { StartGUI Quad_StartWindow=new StartGUI(); Quad_StartWindow.StartSimulation.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { Thread thread1=new Thread(new Runnable() { public void run() { if (ConnectToSimulator(1,Quad_StartWindow)!=-1) { ConnecSucc(1); getSensors(1); while (System.currentTimeMillis()-startTime < 1000000){ ReadSensor(1); // here the error } } } }); Thread thread2=new Thread(new Runnable() { public void run() { if (ConnectToSimulator(2,Quad_StartWindow)!=-1) { ConnecSucc(2); getSensors(2); while (System.currentTimeMillis()-startTime < 1000000){ ReadSensor(2); } } } }); thread1.start(); thread2.start(); } }); Quad_StartWindow.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); Quad_StartWindow.setSize(500, 250); Quad_StartWindow.setTitle("Drone window"); Quad_StartWindow.setVisible(true); } public synchronized static void getSensors(int j) { proximity_Sensors=new Sensors[2][8]; for(int i=0;i<8;i++) { proximity_Sensors[j-1][i]=new Sensors(); String nameObject="Proximity_sensor"+j+"_"+i; vrep.simxGetObjectHandle(clientID, nameObject, proximity_Sensors[j-1][i].intObjHandle, vrep.simx_opmode_oneshot_wait); System.out.println(proximity_Sensors[j-1][i].intObjHandle.getValue() + " " + j+" "+nameObject+" "+i); } } public synchronized static void ReadSensor(int j){ for(int i=0;i<8;i++) { ret=vrep.simxReadProximitySensor(clientID, proximity_Sensors[j-1][i].intObjHandle.getValue(), proximity_Sensors[j-1][i].mLightSensorDetectionState, proximity_Sensors[j-1][i].detectedArray, proximity_Sensors[j-1][i].ObjectDetected, proximity_Sensors[j-1][i].detectedSurfArray, vrep.simx_opmode_oneshot_wait); } } and another question, why thread 1 gets the data that thread 2 should get?
What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them? What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?
This seems like an extremely simple issue but I just can't figure out what's going wrong. I have a minimal bib file called References: @book{Chushakushi, author = {Ii Haruki}, title = {Genji monogatari ch\=ushakushi}, publisher = {Something}, year = {1980} } Then I am using LuaLaTeX+MakeIndex+BiBText to compile the following: \documentclass{scrbook} \usepackage[backend=biber, style=authoryear]{biblatex} \addbibresource{References.bib} \begin{document} \chapter{Chapter 1} Hi there This book\footcite{Chushakushi} is my reference \printbibliography \end{document} This was working fine with natbib but with biblatex it gives me: LaTeX Warning: Citation 'Chushakushi' on page 1 undefined on input line 11. LaTeX Warning: Empty bibliography on input line 13. Package biblatex Warning: Please (re)run Biber on the file: Test and rerun LaTeX afterwards. It seems to me like this has to be something really stupid and simple but I just can't figure it out. If I take out "backend=biber" the same thing happens. I have tried compiling it several times in a row and nothing changes. Replacing \addbibresource with \bibliography also does nothing. I appreciate any help.
Running the minimal example \documentclass{article} \usepackage{filecontents} \begin{filecontents*}{\jobname.bib} @ARTICLE{example, author = {Other, Anthony Norman}, title = {Some things I did}, year = {2014}, journal = {J.~Irrep. Res.}, volume = {1}, number = {1}, pages = {1-10} } \end{filecontents*} \usepackage[backend=biber]{biblatex} \addbibresource{\jobname.bib} \begin{document} Hello\cite{example}. \printbibliography \end{document} I get the warning There were undefined references. I have read and know that I need to run: LaTeX Biber LaTeX However, my editor is only set up to run BibTeX. How do I go about setting up my editor/IDE to be able to run Biber, and how do I run the LaTeX/Biber/LaTeX cycle? Answers (sorted alphabetically by editor name) Answer guidelines Each answer should be for one editor. If the editor is cross-platform, if possible give a single answer with notes covering the minor platform variations. Please edit the question to include new answers in the 'link list' Each answer should be 'stand alone', i.e. don't say 'It's almost the same as editor Y but ...' for the editor part Instructions for 'build tools' such as arara or latexmk are welcome but should explain how to set up the editor in question as not all editors allow simple addition of arbitrary tools
I live in Seattle. I am an international grad student in the US. I carry an Indonesian passport. And, I would like to visit Korea for 1 to 2 weeks. What kind of visa do I need to apply for? How long does it take to process the visa? Do I visit an office in Seattle or do I apply for it online?
I'm an Indonesian citizen holding an US visa. My itinerary is USA -> China -> South Korea -> China -> USA. All within 2 weeks. Do I need to apply for a South Korean visa?
my MacBook Pro crashed I pulled out my 128G SSD and was able to connect and read it with my HD reader, I would like to locate the iPhone backup created previously I would like to locate it since I'm a PC user I'm not familiar with Mac OS I have both Mac & PC available to use Thanks in advance Joe Hi, and thanks for the repay I was able to follow the steps provided but now it's telling me the folder "Library" can't be opened because you don't have permission to see its contents. Thanks in advance –
I've just updated my wife's 3GS to iOS 5.1 from iOS 4. The restore seem to only restore the messages/photo roll and some other settings. I don't see most of the apps but the most important part is the contacts are missing. This is why I'm looking for the iPhone backup that iTunes creates before updating the software. I currently have tried the following: Turn off iCloud Turn on then off iCloud Adding a Contact Restoring from the last backup file(without timestamp) Reset to Factory defaults and restoring Copying from Sim (Has some older contacts, not the recent ones) Using iBackupBot to browse the backups (only iOS5 backups seem to be there) Here are some other valid points: 1. The iPhone isn't regularly synced 2. I created a backup before updating the OS I can't find it anywhere now 3. There's no contacts on the Mac's Address Book. 4. There is only Sim contacts in the iCloud sync 5. iBackupBot shows me there are no other contacts other than the Sim ones that got synced to iCloud 6. There are existing SMS-es without Contact Names 7. I can try to correlate the SMSes with names but it will not give me the full contact list. Since the Messages are restored, the contacts must be kept somewhere can anyone help me? I'm pretty sure I just need to find the backup that was created for the Update and somehow grab all the contacts maybe using ibackupbot.
We face this error from time to time in our production servers. This gets solved when we restart solr. But occurs again after few days. Version information: We are using both centos6 and centos7 machines, Centos6 is with java7 and centos7 is with java8. solr: 5.5.5 at org.apache.solr.servlet.HttpSolrCall.sendError(HttpSolrCall.java:607) at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:475) at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:257) at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:208) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215) at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) at org.eclipse.jetty.server.Server.handle(Server.java:499) at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) at java.lang.Thread.run(Thread.java:748) Caused by: java.lang.OutOfMemoryError: PermGen space```
Recently I ran into this error in my web application: java.lang.OutOfMemoryError: PermGen space It's a typical Hibernate/JPA + IceFaces/JSF application running on Tomcat 6 and JDK 1.6. Apparently this can occur after redeploying an application a few times. What causes it and what can be done to avoid it? How do I fix the problem?
$P(x)$ is a polynomial of degree 5 such that $P(x)-1$ is divisible by $(x-1)^3$ and $P(x)$ is divisible by $x^3$. Find $P(x)$. No idea where to start, would $P(x)$ be of the form $x^3(Ax^2+Bx+C)$?
I have been trying to find a polynomial $f(x)$ such that these $2$ properties hold: $f(x)-1$ is divisible by $(x-1)^3$ $f(x)$ is divisible by $x^3$ To start, I set $f(x) =ax^5 + bx^4 + cx^3 + dx^2 + ex + f$. This is divisible by $x^3$, so $d, e, f $ must be $0$. So polynomial $f(x) = ax^5 + bx^4 + cx^3$ This minus $1$ is divisible by $(x-1)^3$. So I used synthetic division and got that the remainder of $ax^5 + bx^4 + cx^3$ divided by $(x-1)$ is $a+b+c-1$. But it should divide out evenly, so $a+b+c-1 = 0$. From here, I can't find any other equations involving the three variables. Could someone have any suggestions for how to continue? Thanks in advance. :)
I want to match every line from a list, where the word company appears and is not immediately followed by a ticker symbol. So in the list below, lines 1, 3, and 4 should match, but not lines 2 and 5. The company was acquired by Xerox (NYSE: XRX) for $225 million on May 6, 2014. The company (NASDAQ:EPOC) was acquired by Athenahealth (NASDAQ:ATHN) for $293 million in cash on January 7, 2013. The company is acquired by New Mountain Capital for $225 million through an LBO on December 18, 2015. FS Investments provided unitranche term loan financing to support the acquisition by New Mountain Capital. The company was acquired by HTC Global Services for $97.5 million on December 18, 2014. The company (NYS: EVHC) was acquired by Kohlberg Kravis Roberts through a $9.9 billion public-to-private LBO on October 11, 2018. The debt financing for the acquisition includes $5.05 billion term loan B, $2.15 billion of high-yield bond and $850 million of loan financing. I'm using the following code in a loop: obj = re.match("company\s+(?!\([A-Z]+:\s*[A-Z]+\))", line, flags=0) if obj: # do something where line is a line similar to those in the list above. It works when I but not in Python. Any kind souls care to point out the error of my ways?
What is the difference between the search() and match() functions in the ? I've read the (), but I never seem to remember it. I keep having to look it up and re-learn it. I'm hoping that someone will answer it clearly with examples so that (perhaps) it will stick in my head. Or at least I'll have a better place to return with my question and it will take less time to re-learn it.
I am in the process of finishing my first own blender project (woo!) and have encountered some interesting behavior. The camera seems to be jumping/skipping whilst tracking, causing my text rendering to do the same. Here are a couple gifs to illustrate my points. ( >2 MiB) When I solved for camera motion I got an error 1.5. Is this a result of that? If so how can I get a smaller error? More trackers? The footage isn't the best to begin with but I want to salvage what I can. I've consulted on picking good keyframes as well as for tracking round objects but i'm not certain that that is the problem, and for the round tracking the camera solver caused the text to move instead of staying spatially locked. Otherwise it seems to get all the factors correct, namely scale and rotation, but has a minor couple hiccups. Any ideas? Many thanks!
Whenever I do camera tracking in Blender the reconstruction is always zooming out or not on the axis. I have a great quality camera, but the end results of the camera tracking always has the model sliding. If you have a solution please tell me.
Let $n,a,b \in \mathbb Z^+$ be such that $n\mid a^n-b^n$ , then how to prove that $n\mid {\dfrac {a^n-b^n}{a-b}}$ ? My try : $d=\gcd(n,a-b),$ so $d \mid{\dfrac {a^n-b^n}{a-b}}.$ Also $\,n \mid(a-b)\left({\dfrac {a^n-b^n}{a-b}}\right),\;$ so $\;\dfrac nd\mid\dfrac {(a-b)}d\Big({\dfrac {a^n-b^n}{a-b}}\Big)$. Now, since $\gcd\left(\dfrac nd ,\dfrac {(a-b)}d \right)=1,\;$ so $\dfrac nd\mid{\dfrac {a^n-b^n}{a-b}},\;$ it follows that $\;\operatorname{lcm}\left(d, \dfrac nd \right)\mid {\dfrac {a^n-b^n}{a-b}}.$ But then I am stuck , Please help . Thanks in advance
How does one prove that if $n \mid (a^{n}-b^{n}) \ \Longrightarrow$ $ \displaystyle n \mid \frac{a^{n}-b^{n}}{a-b}$ where $a,b, n \in \mathbb{N}$. What i thought of is to consider $$(a-b)^{n} \equiv a^{n} + (-1)^{n}b^{n} \ (\text{mod} \ n)$$ and if we suppose that $n$ is odd then we have, $$(a-b)^{n} \equiv a^{n} -b^{n} \ (\text{mod} \ n)$$ and since $n \mid (a^{n} - b^{n})$ we have $$(a-b)^{n} \equiv 0 \ (\text{mod} \ n) $$ I think i am far away from the conclusion of the problem, but this is what i could work on regarding the problem.
I've come across multiple answers on this forum about the correct usage of the word 'though'. Despite all this, I am still not confident about my following sentence. Is 'though' correctly used? -- separated with a comma from its preceding clause. Is it good usage of the word in that context? Clearly, this is in contrast with the Big Bang Theory, though it is conceivable that the total energy of the Universe is zero.
Can we use though and although interchangeably? Somebody told me that the difference is that though cannot be used at the beginning of a sentence. Is that the rule?
I got stuck on this problem while preparing for an exam: Let $\sum_{n=1}^\infty a_n$ be a convergent series of positive terms. Show that $\sum_{n=1}^\infty a_n^{\frac{n}{n+1}}<\infty$. There is a hint that suggests examining the set $S=\{n : a_n^{1/(n+1)}\leq 1/2\}$ but I am not sure how this helps. I was thinking of partitioning $\mathbb{N}$ into countably many sets by changing the fraction in $S$ but I am not sure if this is the right direction to go. I would just love a hint to get started. Thanks in advance
Let $a_n$ be a positive real sequence such that the series $\sum a_n$ converges. I was asked to prove that under such circumstances $\sum a_n^{\frac{n}{n+1}}$ converges. The previous sum can be rewritten as $\sum \frac{a_n}{a_n^{1/(n+1)}}$. I can't prove the convergence of this last series... I'm sure comparison test is enough here, but other than $a_n \rightarrow 0$ there is no information that helps. Thanks for your help.
We had to do some configuration to our system in our company and they wanted to do these steps: sudo vi /etc/pam_radius_auth.conf Add *****.com ***radius 3 Add auth sufficient pam_radius_auth.so localifdown to following files just above @include common-auth: /etc/pam.d/login /etc/pam.d/sshd /etc/pam.d/sudo Add try_first_pass in /etc/pam.d/common-auth: auth [success=1 default=ignore] pam_unix.so nullok_secure try_first_pass I did two mistakes, first I added the line they said (in step three) to last file and forgot to add it to two first file: /etc/pam.d/login /etc/pam.d/sshd Second I added the whole line in step 4 to the end of the file instead of just concatenating to: auth [success=1 default=ignore] pam_unix.so nullok_secure I can not sudo any more after I restarted my system. I need to modify those files and without sudo I don't know how I should do it. I tried the recovery mode in this and no luck. In the recovery mode it prompts me for root password and none of the password is working. I still can login to my account but apparently my sudo user is mis configured. I appreciate any help.
I need to reset my password. I have followed these steps: However, then I go to "root" or "netroot" recovery options, it tells me: Give root password for maintenance (or type Control-D to continue) Clearly, I do not know the root password. If I type CTRL+D, I return to the list of options. From I read: Under chapter 'The Other Way': 4. Highlight the line that begins kernel and press 'e' to edit` But in the grub configuration file I have no line that starts with kernel. Only: setparams 'Ubuntu...' recordfail set gxfpayload... insmod part_msdos insmod ext2 set root=... search --no-floppy... linux /boot/vmlinuz-2.6.38... initrd /boot/initrd.img-2.6.... Those are all lines in my GRUB. Which line should I edit? Or is there another way to reset my password?
I know many similar approaches have been asked about this error but none of the solutions solved my problem. I was trying to install Nord VPN on my Ubuntu by this command: sudo apt-get install {/path/to/}nordvpn-release_1.0.0_all.deb and it gives me this erorr: E: Unable to locate package {/path/to What shold I do?
Say, I have foo-1.2.3.deb which depends on perl and python, however, running command: dpkg -i ./foo-1.2.3.deb won't install these dependencies. So I must apt-get install perl python by hand. How to make dpkg -i install these dependencies for me automatically?
Is there any solution to above error without deleting my important document in other drive. I googled it and found the only solution to clean the hard like below Boot from the Windows DVD Click Install Now At the setup screen, click Custom (Advanced) Click Drive Options Select the partition(s) you want to format Click Format - this will delete EVERYTHING on that partition Create a new partition and select a partition to install Windows on. Continue with install. When I follow these step then it will delete all my files. So the question is how to format only c drive preserving my important document in another drive or any other way to save my datas.
I have a ASUS R500A notebook.Original OS is Windows 7 64bit.Few days ago I tried to Install Windows 8.1 64 bit version.But it failed & error message is, windows cannot be installed on this disk. The selected disk is of the GPT partition style. My Steps: First i Deleted C: Partition ( Already installed windows 7 ). Then i Formatted that partition. Tried to install Windows 8.1 64bit. In this hard disk i have another several partitions with Important data. How do i Install Windows 8.1 without loosing Data from the Other partitions ?
When I upgraded to blender 2.78, I couldn't recover my old user preferences settings. I had my own theme, my own hotkeys, and my preferred addons. I tried to figure out which files but I couldn't . Note: I downloaded blender 2.78 as zip file not installer
I use Mac OSX 10.9.5. A year ago, I downloaded 2.75a, and today, I downloaded version 2.77a. I downloaded both via .zip file from blender.org and dragged each into the Applications folder of my Mac. In 2.75a, I had done some painstaking remapping to accommodate my Magic Mouse and Apple Wireless Keyboard, in addition to a pretty shiny custom theme. I didn't want to redo these settings. How could I transfer my old settings into the new version? Apparently due to my method of download, "Copy Previous Settings" did not show on the splash screen. I searched "Copy Previous Settings" in the new version via the spacebar, and it returned an error: "Users/aubrie/Library/Application Support/Blender/2.76 does not exist". From this, I figured how to copy my old preferences.
It has only been recently that I have even been aware of the connection between "gypped" and "Gypsy". Perhaps because I've always seen it spelled with a "J", I had no idea that the word had racial undertones. Does it really? Was the word originally coined with Gypsies in mind?
I recently read a line of chat conversation, where somebody said: … get jipped by some guy … A different user construed this as "casual racism", even though the whole conversation was completely unconnected to racial issues. It seems that the problem is the word "jipped" which Wiktionary says is Probably from the term gypsy (“Roma”), due to a stereotype of the Roma as swindlers. (emphasis mine). So I wonder, is this really a politically incorrect word to use? Do speakers and listeners generally connect the word with actual Roma stereotypes? Or is it a rarity to think about its origins, and people generally just use it without thinking of the possible historical etymology, just like people use malaria without ever thinking of bad air? I heard/read the word for the first time, and did not make a connection to "Gypsy" at all, even though I am European and I am generally aware that "gypsy" is a pejorative racial term.
I have the following code: public DataTable GetAllActiveUsers() { DataTable dataTable = new DataTable(); try { connection.Open(); SqlCommand getAllActiveUsersCommand = new SqlCommand(getAllUsers, connection); SqlDataAdapter dataAdapter = new SqlDataAdapter(getAllActiveUsersCommand); dataAdapter.Fill(dataTable); return dataTable; } catch(Exception e) { Console.WriteLine(e); return null; } finally { connection.Close(); } } Which basically get's the active users I have on my database. But can someone explain to me whether the Finally Block will be executed if it successfully runs the try block and returns the DataTable?? Thanks
I'm reviewing some code for a friend and say that he was using a return statement inside of a try-finally block. Does the code in the Finally section still fire even though the rest of the try block doesn't? Example: public bool someMethod() { try { return true; throw new Exception("test"); // doesn't seem to get executed } finally { //code in question } }