body1
stringlengths 20
4.1k
| body2
stringlengths 23
4.09k
|
---|---|
Suppose $(G,\cdot)$ is a group and $H$ is a subgroup of $G$, with $|H|=|G|/2$. Is $H$ a normal subgroup of $G$? It's a theorem that's asserted without proof in a book for my Abstract Algebra class, so it's probably true, I'm just having trouble convincing myself. Lagrange's theorem tells us that there are two unique (left) cosets of $H$, and that they form a partition for $G$. The same can be said for the right cosets, so we essentially have two partitions for $G$, that each split the number of elements evenly between the two cosets. In order for $H$ to be normal we need the left and right cosets to be equal, but: (1) I fail to see how $xH \cup yH$ and $Hx \cup Hy$, with $x,y\in G$, must necessarily be the partitions of $G$. Why not $xH \cup yH$ and $Hw \cup Hz$, for $w,z\in G$? (2) Even if $xH \cup yH$ and $Hx \cup Hy$ are the two partitions, what is preventing $xH=Hy$ and $yH=Hx$, for $x\neq y$? | Please excuse the selfishness of the following question: Let $G$ be a group and $H \le G$ such that $|G:H|=2$. Show that $H$ is normal. Proof: Because $|G:H|=2$, $G = H \cup aH$ for some $a \in G \setminus H$. Let $x\in G$. Then $x \in H$ or $x \in aH$. Suppose $x \in H$. Then $xhx^{-1} \in H$ because $H$ is a group. Suppose $x \in aH$. Then $ahH(ah)^{-1} = ahHh^{-1}a^{-1} = a(hHh^{-1})a^{-1}$ ***1 ***1: Can I say now that $x \in H$, based on the that $hHh^{-1} \in H$ and that $aa^{-1} = e$ ? Thank you for the time you spent reading my doubts. |
How is it possible for file paths exceeding 256 characters to be created in the first place if 256 characters is the maximum length Windows can recognize? We are running SBS 2003 and I am currently dealing with problems caused by users creating subfolders on network shares with very long descriptive names. As these names get longer over time and subsfolders are created inside them, we eventually end up with folders at the bottom of the folder hierarchy with paths exceeding the 256 character limit (some paths are now over 320 characters in total). My question: if a file path exceeding 256 characters is too long, then how is it possible for users to create these excessively long paths in the first place without getting an error from Windows? (Workstation OS version = Windows 7; server OS = SBS 2003) Hopefully, once I understand how this is possible, I will be able to deal with the problem of these long paths being created more effectively in future. | What is the longest file path that Windows can handle? |
I would like to estimate the standard deviation of a population. The data I have is the size and mean of each of $k$ independent uniform subsamples: $(n_1, \mu_1), (n_2, \mu_2), \ldots, (n_k, \mu_k)$. Here, the $i$'th subsample has $n_i$ elements, and those $n_i$ elements have a mean of $\mu_i$. What is the best way to utilize all $2k$ values to produce the best estimate of the population standard deviation $\sigma$? | I have a set of measurements which is partitioned into M partitions. However, I only have the partition sizes $N_i$ and the means $\bar{x}_i$ from each partition. Because all measurements are assumed to be from the same distribution, I believe I can estimate the mean of the population, $\bar{y}$, and standard deviation of the mean, $\sigma_{mean}$: $$ N=\sum_{i=1}^M N_i $$ $$ \bar{y} = \frac{1}{N}\sum_{i=1}^MN_i\bar{x}_i $$ $$ \sigma_{mean}=\sqrt{\frac{1}{N}\sum_i N_i(\bar{x}_i-\bar{y})^2} $$ My questions: Am I right in my assumptions, that the mean $\bar{y}$ can be computed as above? How can I find the standard deviation for the population, given only the means? I read that the standard deviation of the population and standard deviation of the mean is related with $$ \sigma_{mean}=\frac{\sigma}{\sqrt{n}} \mbox{[1]} $$ where $n$ is the number of samples used in the computation of $\bar{x}_i$. So is it actually as simple as just multiplying $\sigma_{mean}$ with $\sqrt{n}$ if $n$ for all means are the same? If it's that simple, what do I do if each $\bar{x}_i$ is computed using a different number of samples? [1] |
I want to add a content to content type (ct1) which has only one field (f1) which is a reference to a paragraph (p1), said paragraph has 4 fields: 3 numeric fields (1, 2, 3) and entity reference (er1) to taxonomy vocabulary, also i am supposed to check if term exists and if term exists then add content, otherwise throw a message and do not add content at all. I'm Drupal 8 beginner and have no idea where to start with this task. Content creation for non-referenced content types is something I already can do but I do not know how to approach this particular situation. Please link me some guides or post example code. I do not want to pre-fill paragraphs, it is more like "after-fill" when node is already created and i want to add paragraphs to it. Currently my code looks like this, this is more like pseudo-code, draft: if (is_file($file) && is_readable($file) && in_array($_FILES['file']['type'], $mimes)) { $handle = fopen($file, 'r'); $node = Node::create(array( 'type' => 'your_content_type', 'title' => date('l jS \of F Y h:i:s A'), 'langcode' => 'en', 'uid' => '1', 'status' => 1, 'field_fields' => array(), )); while (($data = fgetcsv($handle, 1000, $delimiter)) !== FALSE) { $termExists = taxonomy_term_load_multiple_by_name($field_taxonomy, 'taxonomy'); if (isset($termExists)) { $new_csvLine = Paragraph::create($csvLine); $new_csvLine->save(); $node->paragraph_field_referenced->appendItem($new_csvLine); } else { return print("Taxonomy term $field_taxonomy doesn't exist, import halted."); } } $node->save(); I'm working on csv import module and this is the only thing which left to me to complete. Loaded data I need to add as new node of ct1 and each line from csv needs to be a separate paragraph with 4 fields: 1, 2, 3 and er1. Now I need to somehow store this data in these fields. And yes, I need to do this all programmatically, in code. In other words: one csv import is a new node of ct1, every line of csv is new paragraph p1 and every paragraph has to store data from imported line from csv which is 4 fields. How should I modify saving paragraphs part to make it work the way I described? One more time about structure of all this: content type ct1 -> field: f1, type: Entity reference revisions -> paragraph p1 -> fields: numeric 1, 2, 3; er1 type "Entity reference" (reference to taxonomy). | I want to prefill multiple paragraphs when user click on "add node" for specific content type. What would be a good way to do this ? |
I have a 250GB SSD hard drive on my Mac. Last time I checked the remaining space was about a week ago when I removed Bootcamp and free'd up an extra 50GB of space. This left me with around 150GB space remaining. I've just checked today and only have 60GB free! I've also instealled 'Clean my Mac' and checked for junk files, but it only found 9GB worth. The only real folders I can think of that take up room are my Dropbox folder (which contains all of my files, at least all those that I'm aware of) and my Applications folder. Both of those folders combined only take up 50GB amount of space according to Finder. I read that the 'Library/Caches' folder can take up a lot of space there, but only found 10GB (possibly what was found my CleanMyMac) I've also emptied my trash. Also I read on another forum about running the following command in Terminal: ~ % sudo rm -r /System/Library/Caches But I just get the following error: rm: /System/Library/Caches: Read-only file system I can't even think of where else to look for what could be taking up all this room? | Every few days I get notices on my MacBook that it's running or run out of hard drive space. Curiously, restarting the computer will enable me to recover gigabytes of space (this past time, it was able to recover about 2.2GB). However, I can't identify anything in my personal activity that consumed that space. It's possible that it's a rogue iTunes podcast or a huge software update that my Mac is automatically downloading - would either of these reclaim the space upon a restart? One possibility that I can think of is that FileVault has some sort of disk leak, allocating but not freeing files. Does this make sense? Is there a tool that I can run to determine where this space is going? Assuming it is FileVault, should I try to disable it? What's the best way to turn of FileVault on a nearly full computer? |
I have project in PHP5 and when trying to install PHP 5 in Ubuntu 18.04 using following command sudo add-apt-repository -y ppa:ondrej/php5-5.6 Cannot add PPA: 'ppa:~ondrej/ubuntu/php5-5.6'. ERROR: '~ondrej' user or team does not exist. I tried to install php5 following various content but not succeed Please give me any solution or suggestion is appreciated. Thank you | I've done the following: sudo add-apt-repository ppa:ondrej/php5-5.6 sudo apt-get update sudo apt-get upgrade sudo apt-get install php5 sudo apt-get install libapache2-mod-php5.6 sudo add-apt-repository ppa:ondrej/apache2 When I try to disable the old version of php5 with: sudo phpdismod php5 I get the error: WARNING: Module php5 ini file doesn't exist under /etc/php/5.6/mods-available Even if I move the ini file under this directory it gives me the same error. I don't know what I'm missing?? In general, can someone explain to me how to get my instance to use the newly installed version, as I still seem to have both php directory trees on my instance. php5/.. and php/5.6 |
Let $p$ be an odd prime with primitive root $r$. Let $\mathbb{a}$ be an integer with $gcd(\mathbb{a},p) =1$ and $ind_{r} (\mathbb{a})$ denote the index of $\mathbb{a}$ relative to $r$. Show that $\mathbb{a}$ is a quadratic residue modulo $p$ iff $ind_{r} (\mathbb{a})$ is even. Could anyone give me a hint for solving this, please? For the index of an integer w.r.t quadratic residue, Please follow the . | I have a problem in solving my number theory homework. My question is as follows: Let $p$ be an odd prime. Prove that $a$ is a quadratic residue mod $p$ if and only if the $I_{g}(x)$ (index with respect to any primitive root of $p$) is even. Please edit my writing. Thanks. Does anyone know where to start? Thank you very much for everything! |
In other words, the correct answer to the question is actually NOT the simple answer that first comes to mind. I remember coming across the word a few years back but have forgotten it since. If memory serves, the word begins with "in-". But I could very well be wrong. Would be grateful to have your suggestions. Thanks! :) | Is there a phrase or word for a problem that appears simple but is in fact full of complexities? A few situations come to mind: Painting a room Breaking up with a boyfriend or girlfriend Eating a pomegranate ... and a million more. What to call these? |
I have tried to cover below class but unable to cover even single % . Unable to figure out where/what I missed, Please anyone help me Apex class: public with sharing class customSearchController { public static list<ICIX_V1__ICIX_Product__c> getContactList(string searchKey,string productType) { string sTempSearchKey = '%' + searchKey + '%'; //string sTempSearchKey = '%' + searchKey; // create Product list to store search result list<ICIX_V1__ICIX_Product__c> lstProduct = new list<ICIX_V1__ICIX_Product__c>(); // query Product records for(ICIX_V1__ICIX_Product__c oCon : [Select id,Name,Product_Number__c,ProductType__c,Parent_Name__c From ICIX_V1__ICIX_Product__c WHERE Product_Number__c LIKE : sTempSearchKey and ProductType__c=:productType limit 10]){ lstProduct.add(oCon); } return lstProduct; } } Test class: @isTest public class customSearchController_Test { static testMethod void getContactListMethod() { try{ list<Account> acclist=new list<Account>(); Account acc=new Account(); acc.name='Hasbro Dev Stg Res 2'; acc.ICIX_V1__Status__c='Active'; acc.ICIX_V1__ICIX_ID__c='304078'; //acc.ICIX_V1__Internal__c=true; acclist.add(acc); insert acclist; string searchKey; string productType; list<ICIX_V1__ICIX_Product__c> lstProduct = new list<ICIX_V1__ICIX_Product__c>(); string sTempSearchKey = '%' + searchKey + '%'; ICIX_V1__ICIX_Product__c product1=Hasbro_TestDataFactory.createProduct()[0]; product1.Product_Number__c='C6119AV10'; product1.ProductType__c='ASSORTMENT'; lstProduct.add(product1); ICIX_V1__ICIX_Product__c product2=Hasbro_TestDataFactory.NewProduct(); product2.Product_Number__c='C6119AV10'; product2.ProductType__c='ASSORTMENT'; lstProduct.add(product2); insert lstProduct; customSearchController.getContactList('product2.Product_Number__c','product2.ProductType__c'); } catch(Exception e){ } } } | This is a canonical question and answer developed by the community to help address common questions. If you've been directed here, or your question has been closed as a duplicate, please look through the resources here and use them to shape more specific questions. To browse all canonical questions and answers, including more unit test resources, navigate to the tag. This canonical question is intended to address several classes of common questions by providing a quick summary and links to comprehensive resources: How is code coverage obtained and calculated? How do I increase my coverage? Why can't I cover these lines? Why isn't the body of my loop or conditional statement covered? |
If team B attempts to block a ball and team A tips the ball rather than attacks the ball but the ball does come in contact with Team B, is that considered a block contact or first contact? I would assume that it is considered a block contacct but the referee called it a 'first contact' and team B lost the point because they tried to use 3 contacts after the ball was touched at the net. | Today in a match the setter set the ball too low for me to spike it, so I just dinked it over. The bottom of the ball was lower than the top of the net at the point where I made contact. When the defender made contact, again, the bottom of the ball was lower than the top of the net (the top of the ball was over the top of the net though). I felt that this wasn't technically a block and that he shouldn't have been allowed to hit it a second time, but I wasn't sure so I just let it go. Was this a legal block or should it have been our point when he hit it a second time in a row? Edit: I don't think I was clear about the part where, after I hit the ball, the ball travelled over the net onto the other team's side of the court. The other player did not reach over the net so there is no issue there. It's just an issue of whether or not their first contact was a block or a hit. I believe it was not a block but I can't find a specific ruling to address it. |
I want to monitor system parameters like CPU load, CPU Idle time on windows system via SNMP. Does HOST-RESOURCES-MIB can handle this? | How hard can this be? I want to get the current CPU performance from a remote Win 2k3 machine. I need to use SNMP because the machine is behind a firewall. Assumptions: I understand networking/can configure any kind of IP address/port forwarding/firewall/stuff. I understand SNMP - I know how to use my tool to get a value from an OID on a target machine. I know what I want to do with the result from my SNMP request. I have enabled SNMP on the Windows Server, configured the relevant IP security/community stuff. I can already ask the Windows server standard stuff using SNMP about how many disks/network interfaces it has etc. Question: - What OID do I used to simply ask current performance usage. I have spent many hours asking Google - clearly asking the wrong question :S .... How hard can this be? |
If $\sum_{n=1}^{\infty}\frac{a_n}{n}=a$ converges to a finite number with $a_n \geq 0$ for all $n \geq 1$ does this also imply that $$\lim_{n \to \infty}\sum_{i=1}^{n}\frac{a_i}{i+n}=0$$ I tried using $\lim_{n \to \infty}\sum_{i=1}^{n}\frac{a_i}{n}$ as a bound so that I can use comparison test but I can't prove that it converges either. How would I go about proving this statement? | I was wondering if the following is true. Suppose a series $a_n$ is greater than 0 for all positive integer n, and that $\sum \frac {a_n}n$ converges, then is $\displaystyle \lim_{m\to \infty}\sum_{n= 1}^m {a_n \over m+n} = 0$? It seems to be true because if $\sum {a_n\over n}$ converges, then that means that ${a_n\over n }\to 0$ for $n\to \infty$. This means, neglecting $n$, ${a_n \over m+n}$ will also tend to 0, and thus the summation would be equal to 0, but I don't know if this is true. |
I have an exam class document, and I want it to output three fields on a page with an incomplete question as follows: page 1 of 2 question 4 continues please go to next page ... and on the last page I want: page 2 of 2 End of Exam with the code below, I get: page 1 of 2 please go to next page ... and page 2 of 2 End of Exam How do I chage it to print the middle field? I have browsed for help without success, Help will be appreciated. The code is below \footrule \lfoot{\footnotesize Page \thepage\ of \numpages} \cfoot{\newcommand{\continues}{\ifincomplete {\footnotesize Question \IncompleteQuestion\ continues \hfill Please go to next page\ldots} {}}} \rfoot{\iflastpage{End of Exam.}{\footnotesize Please go to next page\ldots}} | The code below works by printing "page x of y" on each page on the left, and go to next page on the right (or end of Exam for the last page). What I cannot get it to do is to write question xx continues as a central footer. Since I was not able to paste this code as a reply to comments/suggestions on my earlier post here , This is a repeat of that post. \documentclass[addpoints,10pt,fleqn]{exam} \RequirePackage{amssymb, amsfonts, amsmath, latexsym, verbatim, xspace, setspace} \usepackage{setspace}% http://ctan.org/pkg/setspace \RequirePackage{tikz, pgflibraryplotmarks} \usepackage{lipsum}% http://ctan.org/pkg/lipsum \usepackage[margin=1in]{geometry} \usepackage{enumerate,mdwlist} \usepackage{mathtools} % for 'bmatrix*' environment \usepackage{paralist} % for 'inparaenum' environment\newcommand{\dist}{\displaystyle} \usepackage{enumitem} \usepackage[normalem]{ulem} \usepackage{geometry} \geometry{ a4paper, total={210mm,297mm}, left=20mm, right=15mm, top=20mm, bottom=15mm,} \singlespacing \pagestyle{headandfoot} \runningheadrule \runningheader{Linear Algebra-MAT 2200} {Tutorial shhet 7, Page \thepage\ of \numpages} {June, 2015} \begin{document} \raggedright \begin{center} \bf{Linear Algebra} \end{center} Handout 2 \hfill{May, 2015}\\ \flushright Tutorial Sheet 7 \noindent\makebox[\linewidth]{\rule{\textwidth}{1pt}} \pagestyle{headandfoot} \footrule \lfoot{\footnotesize Page \thepage\ of \numpages} \cfoot{\newcommand{\continues}{\ifincomplete {\footnotesize Question \IncompleteQuestion\ continues \hfill Please go to next page\ldots}{}}} \rfoot{\iflastpage{End of Tutorial Sheet 7.}{\footnotesize Please go to next page\ldots}} \begin{questions} \begingroup\onehalfspacing \question Given the vectors \\ \begin{inparaenum}[a)] \item (2, -1, 1) and (1, 2, 1) \\ \item (2, 1, -3) and (1, 1, 1) \\ \item (2, -1, 2) and (1, -1, 2) \\ \end{inparaenum} \break Find \\ \begin{inparaenum}[i)] \item Which of the pairs of vectors are perpendicular \\ \item A vector perpendicular to both of the given vectors \\ \end{inparaenum} \endgroup \end{questions} \end{document} |
MY Apple ID has changed, as in the original one was closed and now have a new one, and I cannot sign out of some devices because it is asking for the password for the account that is now closed. How do I get around this? Thanks. | 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? |
Empty interface: interface IError { } and inherited more than one classes: class A : IError { //To do } class B : IError { //To do } | I am looking at nServiceBus and came over this interface namespace NServiceBus { public interface IMessage { } } What is the use of an empty interface? |
Whenever I try editing a file such as test.java with gedit it always gives me this error. Unable to init server: Could not connect: Connection refused (gedit:2652): Gtk-WARNING **: 08:19:10.568: cannot open display: I have looked at other cases when gedit does not open the display but I am not skilled enough to understand what exactly people are doing since it isn't exactly the same error. What can I do to fix this? | I am using Ubuntu 14.04 LTS, and for installing Hadoop I created hadoop user as hduser. When I try to open ~/.bashrc using gedit am getting an error as follows, hduser@arul-java ~ $ gedit ~/.bashrc (gedit:9254): Gtk-WARNING **: cannot open display: hduser@arul-java ~ $ How to solve it ? |
Background We have a motivational poster in our office that says: None of us is as smart as all of us. I think that it's grammatically incorrect, and here is my reasoning: All of the tigers have spots. All of us are here. None of us are dead yet. The three examples all sound correct when using the plural "are", rather than "is". Question Unfortunately, some of my coworkers disagree with me. They believe that the quote is correct when it uses the word "is". So my question is this: Is the motivational quote grammatically correct or should it say "all"? | In my grammar book (English Grammar, HarperCollins Publishers), I read that none is occasionally treated as plural, but it is usually regarded as singular. Can you give me an example of sentence where none is used as plural pronoun? |
$\prod_{n=2}^{\infty} \left(1- \dfrac1 {n^2}\right)= ?$ Attempt: Simplified it to $\dfrac{(n-1)(n+1)}{n^2}$ , and then wrote some terms to observe the cancelllation pattern, but that didn't help, how to solve it then? | Evaluate the infinite product $$\lim_{ n\rightarrow\infty }\prod_{k=2}^{n}\left ( 1-\frac{1}{k^2} \right ).$$ I can't see anything in this limit , so help me please. |
I would like to prevent an mdframed box to split. I know it could sound absurd, since mdframed is designed to allow splitting but if it could be done, I would be interested in modifying mdframed so that I can decide whenever I want to split or not. Does anyone has a clue on this? | I use the following custom environment emailHeader and (credits belong to ). \definecolor{emailHeaderBackground}{RGB}{225,225,225} \usepackage[framemethod=tikz]{mdframed} \newmdenv[ skipabove=0em, skipbelow=1em, hidealllines=true, backgroundcolor=emailHeaderBackground, roundcorner=3pt] {emailHeader} In the document ... \begin{emailHeader} \emailFrom[John Doe]{[email protected]} \emailSubject{Re: Please do break apart} \emailDate{Wed, 22 Aug 2012 12:23:18 +0200} \emailTo[Jane Doe]{[email protected]} \begin{emailsCc} \email[Barack Obama]{[email protected]} \email[Michelle Robinson]{[email protected]} \end{emailsCc} \end{emailHeader} The output looks like this ... I use the environment several hundred times in the document. Sometimes it happens that the email header is at the end or beginning of a page. Then, it breaks into separate lines. As you can see the environment is not a verbatim environment for which I found settings to avoid the page break. Question: How can I prevent a pagebreak for the above environment? I want the command to be added to the environment definition. I do not want to edit all the places where I use the set of commands. |
I'm running Debian testing and can't get a simple cron to run a symlinked PHP script. I've a php script in a subdirectory in my home folder /home/foobar/dir/script.php (which starts with the following shebang #!/usr/bin/env php). I've created a symlink which points to it: sudo ln -s ~/dir/script.php /usr/local/bin/whatever ls -la /usr/local/bin lrwxrwxrwx 1 root staff 24 Feb 27 17:46 whatever -> /home/foobar/dir/script.php* And added the following rule to my crontab (execute whatever every minute): crontab -e * * * * * whatever But it doesn't work, I get the following error: cat /var/mail/foobar ... /bin/sh: 1: whatever: not found While pointing to the script without using the symlink works: crontab -e * * * * * /home/foobar/dir/script.php Any idea? | This is a about using cron & crontab. You have been directed here because the community is fairly sure that the answer to your question can be found below. If your question is not answered below then the answers will help you gather information that will help the community help you. This information should be edited into your original question. The answer for 'Why is my crontab not working, and how can I troubleshoot it?' can be seen below. This addresses the cron system with the crontab highlighted. |
I have a table like this: Name Address Matches Tim Jones 1 London Road, London, W10EU Peter Jones Tim Jones 1 London Road, London, W10EU Smith Jones Tim Jones 1 London Road, London, W10EU Tim Jones Tim Jones 1 London Road, London, W10EU S Singh Jack Sons 10 West Street, London, W900U John Graham Jack Sons 10 West Street, London, W900U Jack Sons I want the result like this: Name Address Matches Tim Jones 1 London Road, London, W10EU Peter Jones,Smith johns,Tim Johns, S Singh Jack Sons 10 West Street, London, W900U John Graham, Jack Sons It should concatenate all 'Matches' column and group by name, address. SQLServer08 | I'm trying to migrate a MySQL-based app over to Microsoft SQL Server 2005 (not by choice, but that's life). In the original app, we used almost entirely ANSI-SQL compliant statements, with one significant exception -- we used MySQL's group_concat function fairly frequently. group_concat, by the way, does this: given a table of, say, employee names and projects... SELECT empName, projID FROM project_members; returns: ANDY | A100 ANDY | B391 ANDY | X010 TOM | A100 TOM | A510 ... and here's what you get with group_concat: SELECT empName, group_concat(projID SEPARATOR ' / ') FROM project_members GROUP BY empName; returns: ANDY | A100 / B391 / X010 TOM | A100 / A510 So what I'd like to know is: Is it possible to write, say, a user-defined function in SQL Server which emulates the functionality of group_concat? I have almost no experience using UDFs, stored procedures, or anything like that, just straight-up SQL, so please err on the side of too much explanation :) |
Here is a question. I want to know how to remove the white space between the item label and the equations? For example, I want to remove the blank between the number 1 and the equation f(X)=... The code and picture are as follows XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX \begin{enumerate} \item \begin{eqnarray*} f(X)&=& AD+SF SF SDF+DFDF FA \\ &+&SADSADDDDDDDDDDDA D+D DADS AD \end{eqnarray*} \item \begin{equation*} G(X)=ADSA DASD SAD ASD ASD \end{equation*} \end{enumerate} | I would like to itemize some equations but they don't appear on the same line as the bullets. Here is a code example. \documentclass{article} \begin{document} \begin{itemize} \item\begin{equation*} Pr( Y= n) = \frac{e^{-7}\times 7^n}{n!} \end{equation*} \item\begin{equation*} Pr(X = m) = \frac{e^{-4}\times 4^m}{m!} \end{equation*} \end{itemize} \end{document} How can I solve this? |
How to evaluate $\displaystyle \int_0^\infty \frac{\sin x} x \, dx$ I have tried substitutions and integration by parts, but unable to integrate it. | A famous exercise which one encounters while doing Complex Analysis (Residue theory) is to prove that the given integral: $$\int\limits_0^\infty \frac{\sin x} x \,\mathrm dx = \frac \pi 2$$ Well, can anyone prove this without using Residue theory? I actually thought of using the series representation of $\sin x$: $$\int\limits_0^\infty \frac{\sin x} x \, dx = \lim\limits_{n \to \infty} \int\limits_0^n \frac{1}{t} \left( t - \frac{t^3}{3!} + \frac{t^5}{5!} + \cdots \right) \,\mathrm dt$$ but I don't see how $\pi$ comes here, since we need the answer to be equal to $\dfrac{\pi}{2}$. |
Is there a simple proof showing that $\dim V^*=\dim V$? Where $V^*$ denotes the dual space of a finite dimensional space $V$? | So, we know that there is no "natural" isomorphism between a finite dimensional vector space $X$ and its dual $X^{\vee}$. However, given a basis for $X$ $(e_1, \dots, e_n)$ we can always construct a (dual) basis $(e^1, \dots, e^n)$ for $X^{\vee}$ that satisfies $e^i(e_j) = \delta^i_j$. It follows that $V \approx V^{\vee}$ simply because they have the same finite dimension $n$. Now, it seems to me that we can construct an isomorphism by assigning $$ e_i \mapsto e^i $$ and extending by linearity. That is, for an arbitrary vector $v \in X$ given by $v = \sum v^ie_i$ we can specify a linear map $$\phi:V \rightarrow V^{\vee}$$ by $$ \phi(\sum v^ie_i) := \sum v^ie^i $$ It is a quick exercise to check that $\phi$ is an isomorphism. Now, although this construction seems correct, there is something that doesn't quite sit right with me about it. For one thing, there is no way to really make sense of the summation convention as the right side of the function will always contain two superscripts thus requiring an explicit summation sign. The other thing that feels rather off is actually taking a lower index and moving it to an upper index, i.e., $e_i \mapsto e^i$ (which, of course, is the reason that the summation convention doesn't work). So, with this background my questions are Is there any sense in which the above isomorphism is "favored" or "canonical"? Is there another way to construct an isomorphism between a vector space and its dual, that would "conserve indexes", for lack of a better way to state it. My guess here is that the answer is no but becomes possible if one assumes $V$ has an inner product. |
We would like our SFMC instance to send emails through Amazon Simple Email Service (SES) which is a standard in our organization. Is it possible to create an SMTP Relay to route the email sends to the Amazon SES? I know that some time ago this functionality was offered in the 'Early Adopters' program. Is it publically available right now? | I am trying to verify that is available in the PRO account for Marketing Cloud. Based on my research this may not be a function available. Does anybody have any idea? |
There is a song titled "Better Not Wake the Baby" by a band called The Decemberists. One of the lines in the song is as follows: Drown yourself in crocodile tears, Curse the god what made thee, Find a way for your banner years, But it better not wake the baby. I'm curious about the use of "what" here. From my knowledge of English grammar, it seems as though the word should be "that"; however, I have come to understand that they are wont to using archaic, foreign, or obscure words and grammar, e.g. the use of the word "fey" (Scottish for "fated to die"). | Occasionally, when watching British television or movies, I've come across a construct that isn't used in AmE. Using what as a replacement for that or than as a determiner or comparison. Here is an example from the classic : C: Never mind that, my lad. I wish to complain about this parrot what I purchased not half an hour ago from this very boutique. O: Oh yes, the, uh, the Norwegian Blue...What's,uh...What's wrong with it? C: I'll tell you what's wrong with it, my lad. 'E's dead, that's what's wrong with it! In AmE we would always say ... parrot that I purchased ... I've also heard it used as a replacement for than in a comparison: He thinks he's got bigger balls, what I got! I'm guessing that in this case it's merely a colloquial deletion of than and should be than what I've got. My question: Is this considered a colloquial usage in BrE? Or is it fairly standard in the Queen's English? It seems to me that it might be colloquial based upon John Cleese's accent and intonation, but I don't have the ear for the British accent to pinpoint a regional vs. a socio-economic class of accent. |
I am stuck in calculating steady state in a model that has covariances in logs. I am wondering in general if the following accurate. cov(X,Y)=exp(X)*exp(Y)*cov[ln(X),ln(Y)] if that is accurate could you please let me know which theorem/textbook could be useful? Thanks a lot and wish you a nice evening | If $Y \sim N(\mu,\sigma^2)$ is normally distributed, then $X=\mathrm{e}^Y$ is lognormally distributed. To get the log-$\mu$ and log-$\sigma$ of this lognormal distribution you calculate $$\sigma^2 = \ln\left( \frac{\mathit{Var}}{E^2} + 1 \right)$$ and $$\mu = \ln(E)-\frac{\sigma^2}{2}$$. But how is this in the case of a bivariate Normaldistribution, $Y \sim N((\mu_1, \mu_2),\Sigma)$, $\Sigma=((\sigma_1,\rho),(\rho,\sigma_2))$ How do I get $\mu, \sigma, \rho$? And more general in the case of a multivariate distribution? |
Here m, n are relatively prime and greater than 1. Z_mn is the ring of nonnegative integers less than mn under modulo m*n addition and multiplication. An idempotent element a is a ring element with the property that a^2 = a. I made a list of idempotent elements for some small integers. I found A215202 on Sloane's OEIS. It gives an even stronger statement about the number of idempotent elements (including 0 and 1 there are 2^omega(n) where omega(n) is the number of distinct primes of n). I read some of the Wikipedia articles on idempotent elements. I also read some of the stack exchange proof that Z_p has exactly 2 idempotent elements (this seems easy to understand since a^2 = a implies a^n = a for all positive n). | An element $a$ of the ring $(P,+,\cdot)$ is called idempotent if $a^2=a$. An idempotent $a$ is called nontrivial if $a \neq 0$ and $a \neq 1$. My question concerns idempotents in rings $\mathbb Z_n$, with addition and multiplication modulo $n$, where $n$ is natural number. Obviously when $n$ is a prime number then there is no nontrivial idempotent. If $n$ is nonprime it may happen, for example $n=4, n=9$, that also there is no. Is it known, in general, for what $n$ there are nontrivial idempotents and what is a form of such idempotents? |
Why is revoke spelled with a k (and revoker and revoked/revoking), yet revocable is spelled with a c? On , the Latin word revoc is the base for "revocable"and "revoke". So why is revoke spelled with a k? Is it to prevent it being pronounced "revose"? If this is so, why is this k not constant throughout the words? Thanks! | I was wondering about this for a while now. Could anyone explain this phenomenon or is it just "English quirks"? Examples: invoke/invocation provoke/provocation revoke/revocation |
I'm trying to get a big cross which I can subscript in order to denote a generalized cartesian product (much like how \bigcup works for generalized unions). How can I accomplish this? | I know what my symbol or character looks like, but I don't know what the command is or which math alphabet it came from. How do I go about finding this out? |
I want to be able to work out how much change in coins is needed for each amount I enter, EG (1.74 would be 1 £1, 1 50p, 1 20p and 4 1ps). This was going to be the function to work out the 20ps necessary. I know I could iterate through a list and it would make the code below easier and neater but just wanted to see if this way would work as it was how I first thought to do it. def num_20ps(x): pounds = x // 1 num1 = x - pounds if num1 >= 0.50: n50 = num1 / 0.50 n50s = int(n50) num2 = num1 - (0.5 * n50s) if num2 >= 0.20: n20 = num2 // 0.20 return n20 print(num_20ps(1.7)) What I cant understand is why when I print my num2 variable I get an output of 0.19999999999999996. Where did the 0.00000000000000004 randomly go? | Consider the following code: 0.1 + 0.2 == 0.3 -> false 0.1 + 0.2 -> 0.30000000000000004 Why do these inaccuracies happen? |
Sometimes a Stack Exchange site is in maintenance mode. A notification bar shows that: Can this notification also contain a link to the . Normally there are more infos to the maintenance reasons. | When the site is in read-only mode, I get a message like this: This site is currently in read-only mode. Would it be possible to update that message to provide links to these resources on SE's status: : Official SE tweets on SE's status. : Official blog posts on SE's status. |
i cant understand the way of forming the mysqli query when variables are involved. I have been trying for days different ways modifying it but getting all the time the very same error SQLSTATE[42000]: Syntax error or access violation: 1064. Can anybode help me telling what is wrong with this line of code when the firt variable is a string, as the second as well...? `$tablename = 'sofka'; $sql = "INSERT INTO " . $tablename . " (" . $columns[1] . ") VALUES (" . $columnsval[1] . ")";` | If user input is inserted without modification into an SQL query, then the application becomes vulnerable to , like in the following example: $unsafe_variable = $_POST['user_input']; mysql_query("INSERT INTO `table` (`column`) VALUES ('$unsafe_variable')"); That's because the user can input something like value'); DROP TABLE table;--, and the query becomes: INSERT INTO `table` (`column`) VALUES('value'); DROP TABLE table;--') What can be done to prevent this from happening? |
Is there an IDE which can run on Ubuntu that supports C, C++ and Java? I installed , but it only supported Java. I installed the C/C++ package manually, but that package gives an error if I include iostream. Is there any other IDE which can satisfy my needs? Or can I get NetBeans with all packages pre-installed in it? | This question exists because it has historical significance, but it is not considered a good, on-topic question for this site, so please do not use it as evidence that you can ask similar questions here. See for more information. This is a community wiki for IDEs available on Ubuntu. Please post one IDE per answer (including more than just a screenshot or a link, please at least put a short description). In your answer, tell us what the IDE is for (which language(s) or if it is RAD capable). |
I upgraded from 12.10 to 13.04 and my Virtualbox-4.1 stopped working. So I downloaded the Virtualbox-4.2 deb for Raring ringtail from their website and installed it. When I start Virtualbox, it starts fine. On trying to start a Virtual Machine I get this error. RTR3InitEx failed with rc=-1912 (rc=-1912) The VirtualBox kernel modules do not match this version of VirtualBox. The installation of VirtualBox was apparently not successful. Executing '/etc/init.d/vboxdrv setup' may correct this. Make sure that you do not mix the OSE version and the PUEL version of VirtualBox. On running /etc/init.d/vboxdrv setup I get: farhat@palantir:~$ /etc/init.d/vboxdrv setup * Stopping VirtualBox kernel modules * Cannot unload module vboxdrv What should be done here? Thanks, ETA: farhat@palantir$ sudo dpkg -l | grep -e virtualbox -e linux-headers -e dkms ii dkms 2.2.0.3-1.1ubuntu2 all Dynamic Kernel Module Support Framework ii linux-headers-3.8.0-26 3.8.0-26.38 all Header files related to Linux kernel version 3.8.0 ii linux-headers-3.8.0-26-generic 3.8.0-26.38 amd64 Linux kernel headers for version 3.8.0 on 64 bit x86 SMP ii linux-headers-generic 3.8.0.26.44 amd64 Generic Linux kernel headers rc virtualbox-4.1 4.1.26-84997~Ubuntu~precise amd64 Oracle VM VirtualBox ii virtualbox-4.2 4.2.16-86992~Ubuntu~raring amd64 Oracle VM VirtualBox | I have installed VirtualBox Version 5.1.18 r114002 (Qt5.5.1) on Ubuntu 16.04 LTS. To virtualize everything (Kali, Windows 10). I encounter the following error: RTR3InitEx failed with rc=-1912 (rc=-1912) The VirtualBox kernel modules do not match this version of VirtualBox. The installation of VirtualBox was apparently not successful. Executing '/sbin/vboxconfig' may correct this. Make sure that you do not mix the OSE version and the PUEL version of VirtualBox. where: supR3HardenedMainInitRuntime what: 4 VERR_VM_DRIVER_VERSION_MISMATCH (-1912) - The installed support driver doesn't match the version of the user. What causes this problem? How can this problem be solved? When i run dpkg --list virtualbox-* in terminal, I get: Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad) ||/ Name Version Architecture Description +++-==============-============-============-================================= rc virtualbox-5.0 5.0.32-11293 i386 Oracle VM VirtualBox rc virtualbox-5.1 5.1.18-11400 i386 Oracle VM VirtualBox un virtualbox-gue <none> <none> (no description available) un virtualbox-gue <none> <none> (no description available) un virtualbox-ose <none> <none> (no description available) |
I want to display service status,if it is running or stopped. I am using the below code but it shows "stopped" before starting service. when service is started it shows "running". and when it is stopped again it shows "running" only. Am I making any mistake in setting sharedPreference status. In mainActivity onCreate() { checkServiceStatus() ; } private void checkServiceStatus() { Toast.makeText(getApplicationContext(),"in enableControls", Toast.LENGTH_LONG).show(); boolean isServiceRunning = AppSettings.getServiceRunning(this); if (isServiceRunning) { Toast.makeText(getApplicationContext(),"service running", Toast.LENGTH_LONG).show(); } else { Toast.makeText(getApplicationContext(),"service stopped", Toast.LENGTH_LONG).show(); } } public class AppSettings { public static final String SERVICE_STATE = "isServiceRunning"; public static boolean getServiceRunning(Context context){ SharedPreferences pref = context.getSharedPreferences(GPSLOGGER_PREF_NAME, 0); return pref.getBoolean(SERVICE_STATE, false); } public static void setServiceRunning(Context context, boolean isRunning){ SharedPreferences pref = context.getSharedPreferences(GPSLOGGER_PREF_NAME, 0); SharedPreferences.Editor editor = pref.edit(); editor.putBoolean(SERVICE_STATE, isRunning); editor.commit(); } | How do I check if a background service is running? I want an Android activity that toggles the state of the service -- it lets me turn it on if it is off and off if it is on. |
this question seems like it should have a really trivial answer but I can't seem to figure out what is going on in my program. I have a C# WPF application which is using a ListView. The ListView has a couple items in it which I added to it by doing this myListView.Items.Add("one"); myListView.Items.Add("two"); Now I a trying to access the second ListViewItem in the ListView. ListViewItem item = myListView.Items[myListView.Items.Count - 1] as ListViewItem; The Error that is occurring is myListViewItem item is null and not retuning a ListViewItem. I've noticed that when I type in the below code my var item is returning a string with the value of "two". so I do not see why I am not able to access the object as a ListViewItem. var item = clv_TraceGroups.Items[clv_TraceGroups.Items.Count - 1]; | Within an event, I'd like to put the focus on a specific TextBox within the ListViewItem's template. The XAML looks like this: <ListView x:Name="myList" ItemsSource="{Binding SomeList}"> <ListView.View> <GridView> <GridViewColumn> <GridViewColumn.CellTemplate> <DataTemplate> <!-- Focus this! --> <TextBox x:Name="myBox"/> I've tried the following in the code behind: (myList.FindName("myBox") as TextBox).Focus(); but I seem to have misunderstood the FindName() docs, because it returns null. Also the ListView.Items doesn't help, because that (of course) contains my bound business objects and no ListViewItems. Neither does myList.ItemContainerGenerator.ContainerFromItem(item), which also returns null. |
Ok. So I read books as a kid, this may have been mid to late 1980s. Definitely before 1993. These details I remember, they might be from the same book or from several: Slower than light space travel with severe time dilation. There were boardings of space ships, but the fighting odds could be very uneven because a foe could be from your future or your past, depending on when you started your space journey, because of relativistic time dilation. No faster than light travel, no time travel either. Just regular physics. To fight better in melee, soldiers would have (more or less willingly, I think they knew beforehand) false memories or notions implanted of the enemy as horrible human beings so soldiers could kill them more easily without remorse. Towards the end of the story, veterans of the war are described as not quite feeling at home after the war. One planet (home?) or country is described as inhabited entirely of clones, Adams and Eves, I think homosexual, or that sexuality could be switched deliberately. I think the veterans find at the end a refuge somewhere more like the home they are used to. The reason so much has changed is of course the time dilation. They spent maybe decades in the war, while on the planets centuries or millenia passed. I think one moral (there may be many more I missed as a child) of the story was the futility of war. If I recall correctly, the war was resolved in a way that made the efforts of the veterans seem for nothing. | I've been looking for the name of a sci-fi romance book about space travel but haven't been successful so far. I came across it a few years ago, read the plot on its back cover but didn't read the book. It is about two spacecraft pilots, a man and a woman, who travelled at light speed (or maybe FTL, I can't remember) in separate ships. Every time they return to Earth, centuries have passed on Earth because of time dilation. They meet each other for a few times on Earth in different eras, but don't know when, if ever, they will meet again. I don't know how it ends. If anyone knows which book I'm talking about, could you please tell me the name? Thanks a lot! |
Well i have a time in UNIX format. i need to find the difference between a specific time and current time. if difference is 5 minutes. do something. $sp_time = 1400325952;//Specific time $currentTime = //current time in UNIX format $difference = $currentTime - $sp_time; if($difference >= 5)//if difference is less than or equal to 5minutes { //DO SOME STUFF } EDIT : How to find the difference in minutes and how to get currenttime? | How to calculate minute difference between two date-times in PHP? |
To prove that $-1\leq \operatorname{Corr}(X,Y) \leq 1$ , I am using the identity $\operatorname{Var}(\frac{X}{\sqrt{\operatorname{Var}(x)}}-\frac{Y}{\sqrt{\operatorname{Var}(Y)}})\geq 0$. Where does this identity come from? How do I prove it? | For building a recommendation system, I also use the Pearson correlation coefficient. This is the definition: $r(x, y)=\frac{\sum_{i=1}^n (x_i-\bar{x})(y_i-\bar{y})}{\sqrt{\sum_{i=1}^n (x_i-\bar{x})^2 \cdot \sum_{i=1}^n (y_i-\bar{y})^2}}$ $x$ and $y$ are part of $\mathbb{R}$. Now for coding, it is important to take care of all potential outcomes. For example, if the denominator is zero, you will have to filter that or throw an exception. I came up with some arguments, one of them being that if all values of $x_i$ and/or $y_i$ were equal to the average of $x$ and/or $y$, then the denominator would be zero. But how can I prove that the coefficient is either undefined (zero denominator) or in between -1 and 1? What is the best approach? |
I am a new d&d player, who has some research into d&d. I have decided to try it out, but I don't know which one to buy. (I'm deciding to become a dm for the sake of the new players) Should I get the essentials kit, starters set, or the core books and a free campaign? | I have been GMing Call of Cthulhu 7th Ed. for some time and now want to try something different. I would like to go with D&D 5.0 since it will be available in my native tongue in a few weeks - the DM Guide is coming in few weeks, the Monster Manual and Starter Set are already translated and easily purchasable. I wonder if I should buy the Dungeon Master's Guide or should I start with Starter Set? I don't mind waiting for the book to be available so it's not an issue of any sort. I suppose the Starter is easier to swallow, but what is your experience? |
This is the code I have at the moment: UserSentence = input('Enter your chosen sentence: ') UserSentence = UserSentence.split() print(UserSentence) say the UserSentence was 'life is short, stunt it', how would I remove the comma after .split()? if possible. | It seems like there should be a simpler way than: import string s = "string. With. Punctuation?" # Sample string out = s.translate(string.maketrans("",""), string.punctuation) Is there? |
I am trying to query and get the record type of the child record of a Parent record. I amusing the below code but I in the result of record name I get [Object Object] only. Why does the name of the record type is not displayed Query: select id,Chil_relationshipName__r.Name,Chil_relationshipName__r.RecordType.Name from parentObject__c In the record type column I get - [Object Object] instead of the name of the record type. | I'm trying to perform the following multilevel relationship query. SELECT ID, SystemModstamp, Product__r.Catalog__r.Active__c FROM Journal__c WHERE SystemModstamp > 2013-10-02T00:00:00.000+0000 AND SystemModstamp < 2013-10-05T00:00:00.000+0000 In the Product__r.Catalog__r.Active__c column I'm getting a value of [object Object] for every single record. I can substitute any field name from the Catalog__c object and get the same response. Does anyone know why this is happening or how to get the field's actual value? |
I submitted an article to a journal using ScholarOne manuscripts on 20th February. it is now nearly 3 months and it hasn't got beyond 'awaiting referee selection'. I have emailed to ask, politely, if it will be sent to reviewers and if I can help by suggesting reviewers' names. I have received no reply. Do people think this is normal / reasonable? What, if anything, should I do next? Thanks. | I submitted a paper to a journal, and I suspect that it is handled too slowly. How can I decide whether my suspicion is correct? What handling times should I expect? Given some expected handling times, when should I act? How much leeway should I give? How should I act? Whom should I contact and what should I (roughly) write? Note that I am interested on how I should approach this situation in general, and do not seek specific numbers for my specific situation. I am therefore looking for general answers that are independent of such factors as the field or individual journal (but mention them if they are relevant factors). This is a canonical question on this topic as per . Due to its nature, it is rather broad and not exemplary for a regular question on this site. Please feel free to improve this question. |
How can make the mesh smooth. With the mirror and subsurf modifier i want to have a round smooth sphere shape at the end. Note : I dont want to apply the modifier Edit mode Object Mode Any solution or suggestion to end the verts to get smooth shape. | My problem is simple. I think that the strange deformations on the top are there because there are so many vertices in one face. How do I fix this while maintaining nice topology? Although I triangulated the top polygon, the problem still persists. |
How can I type this in latex ? I can only do 1 column \begin{itemize} \item Module \item Loss \end{itemize} | Is it possible to split an itemize list into several columns? (I'm sure it is, but I couldn't find a solution around here) And additionally: Is it possible to automatically split a list into multiple columns if it reaches a certain item length? so i want to display item1 item2 item3 instead of item1 item2 item3 while this should still happen item1 item4 item2 item5 item3 item6 |
Similar to this question: except my main problem is accusations of creating duplicates when I (correctly, in my view) post separate and completely different but superficially similar-looking questions. Here's an example: . The question actually got closed as a duplicate when it is not a duplicate at all because it is a completely different question -- a case of "close but no cigar", as I see it. I feel like I'm in a catch twenty-two situation when posting questions. If I post related but different questions separately, I get accused in the comments of creating a duplicate, but if I post them together I am (not as often) accused of having too many questions in one post. [I'm afraid to ask, but is this a normal experience for a noob on SE, or are people out to get me? Or both? :)] | There have been discussion earlier if similar but different questions should all go into one question post or into several independent (which may link to each other). The general consensus is to ask several separate questions: I fully agree on that. However, when I do it, often enough I get votes as exact duplicate. One example: closed as exact duplicate of It is obviously not an exact duplicate because it asks about try_lock which does something different than lock. It still may be that the answers may be the same, however, I am not sure about that (and the people who closed it also don't, regarding to their comments). I am wondering how I should handle it in the future. Because of such problems, I start to put several questions again into one question. But then I often don't really know what I should choose as the answer if they only answer one of the questions. When I had them separated and the second and the second one gets closed, I am also not exactly sure what I should do if the first question was already answered but the answer does not answer my second question (see my example above -- the answer about lock does not mention try_lock at all). |
New to Ubuntu. When I tried to get the GNOME user theme extension from the , it would not load the button to install. So I tried the command in the terminal sudo apt-get install gnome-shell-extensions-user-theme and got the error message: Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package gnome-shell-extensions-user-theme any help? Thanks! UPDATE: it's not the lack of an extension, I know I have it installed, and there is no pink banner. The page does not load any button for me to install (or the user reviews section.) The page does load on chromium (with the pink banner though, no extension) so I don't think its a network issue. Also, the 'duplicate'page is not my exact issue. And I tried this on firefox, which has the right extension on it by default. | When I try to install any package through the command line, I get an error. $ sudo apt-get install <package> Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package <package> Can anyone help me on this? |
I know its probably the most brainless answer in the world, but I can't see why the else statement after the first if condition under the suited answer is not working, im just trying to get to bed soon and I want to run this at least once. package PokerApp; import java.util.Scanner; public class PokerApp { public static void main(String[] args) { int card1 = 0; int card2 = 0; int play; String fc1 = "", fc2 =""; String answer = ""; Scanner scan = new Scanner(System.in); System.out.println("Press 1 to evalaute your cards: "); play = scan.nextInt(); while (play != 0){ System.out.println("First Card: "); if (scan.hasNextInt()) { card1 = scan.nextInt(9)+2; } else{ fc1 = scan.next(); switch(fc1) { case "A": card1 = 14; break; case "K": card1 = 13; break; case "Q": card1 = 12; break; case "J": card1 = 11; break; default:System.out.println("Incvalid entry"); } } System.out.println("Second card: "); if (scan.hasNextInt()) { card2 = scan.nextInt(9) +2; } else{ fc2 = scan.next(); switch (fc2) { case "A": card2 = 14; break; case "K": card2 = 13; break; case "Q": card2 = 12; break; case "J": card2 = 11; break; default:System.out.println("Invalid entry."); } } System.out.println(card1 + "" + card2); if(card1 == card2) { System.out.println("You have a pair."); break; } //If no pair, suited engine runs conditions. else{ System.out.println("Are your cards suited? (y/n): "); answer = scan.next(); } if (answer == "y"); { if(card1 == card2++ || card1++ == card2); { System.out.println("Suited connectors."); break; } else{ if(card1 >= 12 && card2 >=12) { System.out.println("High value suited cards."); break; } else{ if(card1 >=12 || card2 >= 12) { System.out.println("In the making for a queen high flush, or better!"); break; } else System.out.println("Fold"); break; } } //If the cards are not suited. } } } } | I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug. Is == bad? When should it and should it not be used? What's the difference? |
For some reason when I installed MySQL on my machine (a Mac running OS X 10.9) the 'root' MySQL account got messed up and I don't have access to it, but I do have access to the standard MySQL account 'sean@localhost' which I use to log into phpMyAdmin. I am trying to reset the 'root' password by starting the mysqld daemon using the command mysqld --skip-grant-tables and then running the following lines in the mysql> shell. mysql> UPDATE mysql.user SET Password=PASSWORD('MyNewPass') -> WHERE User='root'; mysql> FLUSH PRIVILEGES; Problem is when I try to run that MySQL string the daemon spits back a ERROR 1142 (42000): UPDATE command denied to user ''@'localhost' for table 'user' as if I didn't use the -u argument when I started the mysql shell, either though I did. Any help is muchly appreciated as I am lost at this point. :/ | I have a MySQL database that I "inherited" and I was not given the admin credentials. I do however have access to the box that it runs on. Is there a way to either recover the admin credentials or create new ones? |
I have two languages I am actively using. English is my default, but in some applications such as Skype I use Russian. Every time I am switching from Skype to Safari I have manually switch back from Russian to English and this is annoying. How can I configure so that language switch is handled by operating system automatically when I am changing windows? In Keyboards->Input Sources I've ticked Automatically switch to a document's input source but it doesn't work, still if I've switched to Russian it will stay while I will change it again. I am on Yosemite 10. Thanks for any help! | For example, when I use the Messages app in which I use one keyboard, and in Xcode, I use only English keyboard. Can macOS switch my keyboard to English when I make the Xcode window active? |
how do you prove $9(a^3+b^3+c^3)$ $\ge$ $(a+b+c)^3$ I tried to expand by multinomial expansion the right side and got a long string so what do i do next? | Let $a$, $b$ and $c$ be positive real numbers. $(\mathrm{i})$ Prove that $4(a^3 + b^3) \ge (a + b)^3$. $(\mathrm{ii})$Prove that $9(a^3 + b^3 + c^3) \ge (a + b + c)^3.$ For the first one I tried expanding to get $a^3 + b^3 \ge a^2b+ab^2$ but I'm not sure how to prove it. |
A "simple" expected value inequality confuse me. If $f(x)$ is a monotone increasing function defined on the interval $[a,b]$, and $c \in [a,b]$, is it possible to prove the following inequality? $$\mathrm E\left(\sum_{t=a}^{c}f(t)\right)\leq \mathrm E \left(\sum_{t=a}^{b}f(t)\right)$$ | Given that a function $g(x)$ is a monotone increasing function. Its domain is an interval [c,d]. There are two sets $a_j \in A, j= 1,...,J$ and $b_k \in B,k=1,...,K$ on this interval, which satisfy $c_z \in C = B$\A and $c_z \geq a_j$ for all $a_j \in A$. For example, the interval $[c,d]=[0,8]$,$A=\{0,1,2,3,4,5\}$ and $B=\{0,1,2,3,4,5,6,7\}$. In this case, does the following inequality hold? If yes, could you give me some hints to prove that? $$\frac{1}{K} \sum_{k=1}^{K}g(b_k) \geq \frac{1}{J} \sum_{j=1}^{J}g(a_j)$$ |
I am completing a lab assignment for school and get this error when I compile. The program runs fine, bit would like to fix what is causing the error. The program code and the complete error is below. Thanks as always! Error: Note: F:\Java\Lab 8\Lab8.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. Code: import java.awt.*; import java.awt.event.*; import javax.swing.*; import javax.swing.event.*; import javax.swing.border.*; public class Lab8 extends JFrame { public Lab8() { // Create an array of Strings for age ranges String[] ageRanges = {"Under 20", "20-29", "30-39", "40-49", "50-59", "60 and Above"}; JComboBox jcbo = new JComboBox(ageRanges); // Create an array of String destinations String[] destination = {"Mercury", "Venus", "Moon", "Mars", "Jupiter / Europa", "Saturn / Triton", "Pluto + Sharon"}; JList jlst = new JList(); // Declare radio buttons JRadioButton jrbMonday, jrbTuesday, jrbWednesday, jrbThursday, jrbFriday; // Create a textfield JTextField jMsg = new JTextField(10); // Create panel to hold label and textbox. JPanel p1 = new JPanel(); p1.setLayout(new BorderLayout(5,0)); p1.add(new JLabel("Name: "), BorderLayout.WEST); p1.add(new JTextField(20), BorderLayout.CENTER); jMsg.setHorizontalAlignment(JTextField.LEFT); // Create combobox panel. JPanel p2 = new JPanel(); p2.setLayout(new GridLayout(2,0,5,5)); p2.add(p1, BorderLayout.NORTH); p2.add(new JComboBox(ageRanges), BorderLayout.CENTER); p2.setBorder(new TitledBorder("Passenger Name & Age Range")); //Create listbox panel. JPanel p3 = new JPanel(); p3.setLayout(new GridLayout(1, 0)); p3.add(new JList(destination)); p3.setBorder(new TitledBorder("Destinations")); // Create a new panel to hold radio buttons. JPanel r1 = new JPanel(); r1.setLayout(new GridLayout(3,2)); r1.add(jrbMonday = new JRadioButton("Monday")); r1.add(jrbTuesday = new JRadioButton("Tuesday")); r1.add(jrbWednesday = new JRadioButton("Wednesday")); r1.add(jrbThursday = new JRadioButton("Thursday")); r1.add(jrbFriday = new JRadioButton("Friday")); r1.setBorder(new TitledBorder("Departure Days")); // Create a radio button group to group five buttons ButtonGroup group = new ButtonGroup(); group.add(jrbMonday); group.add(jrbTuesday); group.add(jrbWednesday); group.add(jrbThursday); group.add(jrbFriday); // Create grid to hold contents JPanel pMain = new JPanel(); pMain.setLayout(new BorderLayout(5,0)); add(r1, BorderLayout.CENTER); add(p2, BorderLayout.NORTH); add(p3, BorderLayout. EAST); } public static void main(String[] args) { Lab8 frame = new Lab8(); frame.pack(); frame.setTitle("Lab 8 Application"); frame.setLocationRelativeTo(null); // Center the frame frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setSize(425, 275); frame.setVisible(true); } } | For example: javac Foo.java Note: Foo.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. |
Suppose X is normal ($\theta$, 1). What is the distribution of X$^2$? | What is the distribution of the square of a non-standard normal random variable (i.e., the mean is not equal to 0 and the variance is not equal to 1)? |
I got a multiple-entry, short-stay, category “C” Schengen States “D” visa valid for 1 year with a duration of 90 days. a) Does the 90-day thing in a one-year period mean that I can freely spread out my travel dates throughout that one year? For example, visit Germany in January for 21 days, come back again in April for another 21 days then in August for 21 days and finally in October for the last remainder of the 90 days? b) Or does it mean that once I enter the Schengen area, my 90 days start counting down? For example, if I enter Germany on the 1st of January then my visa expires after 90 days (in March) regardless of whether I stayed in Germany throughout those days or not? | I have searched the web a lot and could not find an answer that fits my situation. Here are two links that are quite contradictory: My situation: I've visited Portugal in December 2012 for 29 days on a Schengen visa valid from December 1st, 2012 to February 1st, 2013 for research purposes (I am a Ph.D. student). I want to visit Sweden from February 10th, 2013 to May 10th, 2013 (89 days). I have applied for a Schengen visa again (for research). How will the 90/180 rule work in my situation? |
I need help . when I try to insert a square face, the top and bottom side do not move like the ones on the side. what settings should i make? | I seem to have screwed up something that allows you to inset evenly, I think I have tried every combination of settings in inset and pivot center and even is far from even. I tried uninstalling and re installing blender 2.71 and get the same result. The image attached is a simple default cube that I tried to inset evenly. I have also attached the blend file link help?? |
I know we can use Rolle's Theorem to get a point in $(0,1)$ such that $f^\prime(x)$ is zero at that point but don't know how to take it from there. | Prove that if $f$ is differentiable on $[a,b]$ and if $f(a)=f(b)=0$ then for any real $\beta$ there is an $x \in (a,b)$ such that $\beta \cdot f(x)+f'(x)=0$. (Using rolle's theorem) My attempt: Using Rolle's theorem we can say that there exists some $c \in (a,b)$, where $f'(c)=0$ . Therefore one factor in the expression $\beta \cdot f(x)+f'(x)=0$ is $0$ at $c$ but I am unable to prove that the other factor will simultaneously be $0$ at $c$. |
After upgrading to Ubuntu 20.04, my screen has now two vertical green lines (Here a screenshot of my desktop: Does anyone know why is that and how I can get rid of them? In case: my video cards are VGA compatible controller: Intel UHD Graphics 630 (mobile) 3D controller: NVIDIA GP107M [GeForce GTX 1050 Ti Mobile] Machine: Dell XPS 15 9570 | I have recently upgraded Ubuntu 19.10 to latest LTS Ubuntu 20.04. After updating, I get serious artifacts on my screen. Every time I reboot (or log-in), my screen is fuzzy or scrambled (picture attached): This is temporary. The fuzzy screen goes away when I change the background. But it reappears the moment I reboot or log back in. I have Intel HD Graphics 520 (Skylake GT2). The output of lspci -nn |grep -E 'VGA|Display' is: 00:02.0 VGA compatible controller [0300]: Intel Corporation Skylake GT2 [HD Graphics 520] [8086:1916] (rev 07) Update: On enabling Wayland in Ubuntu 20.04 and logging in to, these artifacts are however cured. This is okay for now, but I am not sure about Wayland as I have not yet used it before. Is there a way to correct the graphic issue with normal Ubuntu startup? |
How to make a scrollbar using python ? | There are many addons. Do you know how show it in two cloumns? |
Is there any way to create an updated iso of my installed ubuntu so that I don't need to update next time I have to have a fresh instal. | I have a friend who has got a computer that is not connected to the Internet. Is there any way to install software offline easily? |
I made mistake typing account's name before installation of Ubuntu. I need to change this name, but I can't find clear explanation and step-by-step procedure. Also, why doesn't Ubuntu change the name of account after editing it in System Settings->User Accounts ?? Even Win'98 had explicit ways to change administrator username! | Some time ago, when I installed Ubuntu, I chose a rather stupid username for my account that I do not want to use anymore. How do I change this (including the name of my home directory, and the name in the terminal) without losing settings for applications? How do I keep permissions and my keys for various authentification (e.g. email, SSH, GPG and more)? What settings could possibly get lost if I changed my username? |
I am adding commands to $HOME/.bash_profile file export PATH=[PATH_TO_FLUTTER_GIT_DIRECTORY]/flutter/bin:$PATH export ANDROID_HOME=/home/harsh/SDK export PATH=$PATH:$ANDROID_HOME/tools Now I have to run source $HOME/.bash_profile when my system boot every time. Is there any other option to permanent set these paths? Problem: It's annoying to run this commands again and again when my system boot. Is there a way when I start my system and don't need to add this commands again? | I created a new home directory for myself on my SSH server and when I log in my bashrc is never loaded, I always have to type . ~/.bashrc after I log in. How can I save keystrokes so this is done automatically? |
Given a periodic function $f$ with period $L$ I want to prove the following: $$\int_a^{a+L}f(x) \,dx=\int_0^Lf(x)\,dx$$ I've found some nice proofs but I have tried by my own doing the following: $$\begin{align*}\int_a^{a+L}f(x)dx&=\int_a^Lf(x)dx+\int_L^{a+L}f(x)dx\\ &=\int_a^Lf(x)dx+\int_0^af(y)dy\\ &=\int_0^Lf(x)dx \end{align*}$$ by using the substitution $y=x-L$. So I was wondering if this is enough? Because all the proofs there say that this only holds for $a\in[0,L)$ but not for $a$ in general. So my question is why is this not enough and only holds for $a\in[0,L)$ but not $a$ in general? | I want to prove: For an integrable function $f(x)$ and periodic with period $T$, for every $a \in \mathbb{R}$, $$\int_{0}^{T}f(x)\;dx=\int_{a}^{a+T}f(x)\;dx.$$ I tried to change the values and define $y=a+x$ so that $dy=dx$ and the limits of the integrals are as we want, but I'm not sure how to use the fact that $f(x)$ is periodic. Thanks a lot! |
I want to make some delay inside function, and i've made this: scoreboard objectives add run stat.playOneMinute scoreboard players set @a[score_run_min=40] run 0 execute @e[score_run_min=10,score_run=10] ~ ~ ~ say 3 execute @e[score_run_min=20,score_run=20] ~ ~ ~ say 2 execute @e[score_run_min=30,score_run=30] ~ ~ ~ say 1 execute @e[score_run_min=40,score_run=40] ~ ~ ~ say START! I set /gamerule doLoopFunction to this file and run it with /function. In my imagination it will like say 4 times and reset then say again. But it just resets the timer and the timer runs overtime. When i activate the function again at exactly time it says. Now how can i make it run like my imagination.Thanks. | I found 11 questions like this on gamingSE already, but none of them have proper and up-to-date answers. So I'm creating this Q&A: How do you either activate a command x seconds/minutes/hours/… in the future or every x seconds/minutes/… in a loop? Repeating command blocks and ticking functions execute 20 times per second, redstone is in many situations and most of the extremely fancy solutions, like falling blocks in cobwebs, have broken over time or are needlessly complicated. |
I'm trying to do some calculations in my python script but i'm getting some weird results. For example: 0.03 // 0.01 >>> 2.0 If I upscale the numbers I get the expected results: 3.0 // 1.0 >>> 3.0 I'm pretty sure that the answer for the first code snippet should be 3.0 and not 2.0. Can someone explain me why this is happening and how to fix it? | Consider the following code: 0.1 + 0.2 == 0.3 -> false 0.1 + 0.2 -> 0.30000000000000004 Why do these inaccuracies happen? |
My son asked me this question: Today is June 12. Tom will play a video game on _ Sunday (which is June 15). And the choice is either "this" or "next." So which one should it be? | At what point does next Tuesday mean the next Tuesday that will come to pass and no longer the Tuesday after the Tuesday that will come to pass? And, when does the meaning switch back? |
Let $C$ be the Cantor tertiary set. Show $C+C \equiv \{x+y : x,y\in C\}=[0,2]$ My guess is that I should utilize the standard base-3 representation for $x,y \in C$. It is immediate that $C+C \subset [0,2]$. I cannot show the other inclusion. Here's where I'm stuck: let $\alpha \in [0,2]$ (we assume $\alpha$ has a base-3 representation). We must find an $x,y \in C$ such that $x+y=\alpha$. My thought is to break up $\alpha$ as such: $$\alpha = \sum_{n=0}^{\infty}\frac{x_n}{3^n}+ \sum_{n=1}^{\infty}\frac{y_n}{3^n} \equiv \alpha_1 + \alpha_2$$ with $x_n \in \{0,1\}$ and $y_n \in \{0,2\}$. Certainly, $\alpha_2 \in C$. I also note that $2*\alpha_1 \in C$. But I can't get any further insight from this. My other attempt was to approach the problem from a base-2 perspective, but I was not able to advance at all here. Any hint or bump in the right direction would be greatly appreciated! | The Sum of 2 sets of Measure zero might well be very large for example, the sum of $x$-axis and $y$-axis, is nothing but the whole plane. Similarly one can ask this question about Cantor sets: If $C$ is the cantor set, then what is the measure of $C+C$? |
I lost access to my instance which I host on AWS. Keypairing stopped to work. I detached a volume and attached it to a new instance and what I found in logs was a long list of Nov 6 20:15:32 domU-12-31-39-01-7E-8A sshd[4925]: Invalid user cyrus from 210.193.52.113 Nov 6 20:15:32 domU-12-31-39-01-7E-8A sshd[4925]: input_userauth_request: invalid user cyrus [preauth] Nov 6 20:15:33 domU-12-31-39-01-7E-8A sshd[4925]: Received disconnect from 210.193.52.113: 11: Bye Bye [preauth] Where "cyrus" is changed by hundreds if not thousands of common names and items. What could this be? Brute force attack or something else malicious? I traced IP to Singapore, and I have no connection to Singapore. May thought is that this was a DoS attack since I lost access and server seemed to stop working. Im not to versed on this, but ideas and solutions for this issue are welcome. | I just checked my server's /var/log/auth.log and found that I'm getting over 500 failed password/break-in attempt notifications per day! My site is small, and its URL is obscure. Is this normal? Should I be taking any measures? |
Still very new to complex variables and complex analysis so apologies for the probably very simple question. What is the value(s) of this: $$(1+i)^i$$ How to go about it? Also I wanted to confirm that for $$\log(-i)$$ I got $$\ln1 + i\left(\frac{3\pi}{2}+2\pi k\right), k =....-1, 0, 1, 2.... $$. Thanks again and any pointing in the right direction will also be greatly appreciated. | How do I calculate the outcome of taking one complex number to the power of another, ie $\displaystyle {(a + bi)}^{(c + di)}$? |
Hi there, I'm very new to Illustrator and it's been some days (if not weeks) that I'm trying to find a solution for this problem. I basically had an image in the background and used the pen tool on top to reproduce the different lines. So at the moment it's all paths. But as you can see, the outer line is all together. What I want to do is to join the top lip path into one shape, lower lip other shape, tongue another, and so on. The idea is to paint each of those shapes in different colours but I can't find a way to join them or even separate the outer line (I tried scissor, eraser, cut in the anchor, but no luck). Any help would be much appreciated (or suggestion on the right way of doing something like this). | I have a rectangular shape and I added an "extension area" to it with several line segments and closed it back to the rectangle. Specifically, I clicked on an anchor point off a corner of the rectangle drew several line segments off this point and connecting each by the anchor point of each segment. I drew and closed off this shape by drawing the line segment back to the rectangle's anchor point. How do I fill in this new area with a color? In the example below I'd like to fill in the "polygon shape" that's extended off of the rectangle with some non-white color. When I select the rectangle and polygon, I get a question mark: "?" in the fill area. |
I'm currently visiting Montreal. In almost every store or restaurant I go to, I'm greeted with "bonjour!" I know just a little French and I could probably get by with a simple transaction, but then I would be lost if anything more nuanced was required. So I usually respond with "hello" and continue in English. Is this OK or is it a faux pas? Would it be more appropriate to start off with "parlez-vous anglais", or is it assumed that most people are bilingual? What about Quebec City — is it more frowned upon there? I really don't want to exude the "arrogant American tourist" vibe! UPDATE: Tried speaking French as much as possible, resorting to "je suis desolé, je ne parle pas très bien français" whenever I ran into a phrase I couldn't understand. Pretty much everyone I met spoke English to varying degrees, and nobody gave me a hard time. One person even complimented me on my French accent — apparently it was convincing! The only problem is that now I'm compelled to start speaking in French whenever I go into a restaurant in the US. :) | I'm going to be in Montreal for several weeks-months for work this fall. I don't speak a word of French. It's my understanding that Montreal is the primary anglophone enclave for Quebec and that English is widely spoken. I've also been told that once you get outside of the Montreal metro area, English fluency drops off considerably. My concerns are twofold: While I'm not concerned with people not speaking English in, say, bars and restaurants and convenience stores, I am a little worried about getting yelled at angrily in French while working in an outer suburb and not having any clue how to respond. (I work in public spaces, and drive a vehicle with a graphic wrap from my employer that attracts attention, both positive and negative). Alternately, I tend to like local dive bars and off the beaten track restaurants that might not be used to catering to travelers. Should I be concerned? I understand that the city proper will be fine, but I'm wondering just how far out from the city that advice remains useful. Would it be useful for me to try to learn some rudimentary French before going? Would it make a difference? Or just be wasted effort. I do know enough to know that Parisian french is just different enough to be of reduced helpfulness. |
Let $\mathbb{WP}^1(1,a)$ be the weighted projective line where $(x_0:x_1)$ is identified with $(\lambda x_0:\lambda^a x_1)$. Some questions: 1) Is $\mathbb{WP}^1(1,a)$ smooth for all a? 2) When is $\mathbb{WP}^1(1,a)$ isomorphic to $\mathbb{WP}^1(1,b)$? what about the projective plane? Is there an easy way to classify $\mathbb{WP}^2(1,a,b)$? | From Vakil's book: Exercise 8.2.N Show that the weighted projective space $\mathbb{P}(m, n) = Proj(k[x, y])$ (where $x$ and $y$ have degrees $m$ and $n$ respectively) is isomorphic to $\mathbb{P}^1$. Can anyone give an outline of the solution to this? Edit: For convenience I identify $k[x, y]$ with $k[u^m, v^n]$. I tried to see if there is any graded isomorphism between $k[u^m, v^n]$ and the graded ring ${k[w, z]}^{(d)}$ for some $d$ that divides the gcd of $m$ and $n$. Then it would follow from the fact $\mathbb{P}^1 = Proj(k[w, z]) \cong Proj({k[w, z]}^{(d)})$. But I see that it isn't the case. |
see I am in creative mode and tried doing the mouse button 1 attack but that still didn't work, I am in creative mode playing with a friend, well at least trying. so I am in multi player, I also kicked my friend outta the game to see if it would work with just me but it didn't. And also i tried the command to creative. it did nothing because I was in creative already so if someone could help me that would be great! otherwise ill just wind up deleteing the world. | I just logged in to Minecraft after maybe 8-9 months at the most. When I first logged in, I tried to switch between modes but I forgot how, so I looked for it and it said to press F1. Before I did I could destroy and place blocks, but now I can't destroy them! Is this common, and does anyone know how to fix it? And btw, whenever I go onto a bare hand to destroy something, it just goes back to the first item in my inventory. |
Let $f(x)$ be continues function at $[1,9]$ and differentiable at $(1,9)$ and also $f(1) = 20 , f(9) = 68 $ and $ |f'(x)| \le 6$ for every $x \in (1,9)$. I need to prove that $f(7) = 56$. I started by using the Lagrange theorem and found that there exist $ 1<c<9$ such that $f'(c) = 6$ but I'm not sure how is this relevant and how to proceed. | Let $f(x)$ be differentiable ate $\mathbb R$, s.t $|f^\prime (x)| \le 6$ for every $x$ in $\mathbb R$. its given also that $f(1)=20$, and $f(9)=68$ , prove that $f(7)=56$. I'm thinking about applying $\text{Mean Value theorem}$ and $\text{Intermediate Value theorem}$, in here but for some reason I miss something and I can't conclude that $f(7)=56$. any kind of help would be appreciated. |
I've been editing a landscape image with lightning in the sky, and I've brought up the clarity and contrast in Lightroom to make it stand out more. However, I end up with a noticeably brighter sky around trees on the horizon, as well as in between branches and such in the trees. Most of the methods I've found online have messed up because of the trees on the horizon. How can I make the sky on the horizon and behind the trees blend in? | I process all my photos to black and white. Although I use a polariser where possible, I often find myself wanting to drop the luminance of the sky further which I do using a Black and White adjustment layer (in Photoshop). This usually results in a lighter halo following the line of the horizon, where the blues of the sky meet whatever the colour of the land is. My current solution to this problem is to run a brush along this margin with a colour set to the same as the sky and the blend-mode set to Darken. This effectively paints in the lighter band with the sky colour while not laying down the colour on top of the darker horizon. Whilst this is effective, it is very time consuming. Is there a better approach to dealing with these halos? Here is a video that illustrated the Darken solution that I mention: |
I just deleted about 50GB of files from my Mac's onboard storage, however it only resulted in the removal of about 8GB. What happened and how can I fix this? | How do I solve this problem? The storage space does not increase when I delete files. Yesterday, I deleted 250MB of files but made zero change to storage space. I have emptied the trash. I don't use Time Machine |
Can a user break out of <textarea> tag maliciously? For example: post form contains: <form action='post.php' method='post'> <textarea name='content'></textarea> <input type='submit' value='submit'> </form> post.php stores htmlentities($content) in the database. Now the user wants to edit his post, he clicks 'edit' and retrieves the edit form except this time the code is decoded and injected in, for editing purposes. edit form contains: <form action='edit.php' method='post'> <textarea name='content'><?=html_entity_decode($content);?></textarea> <input type='submit' value='submit'> </form> is it possible for the user to break out of the textarea tags, seeing as the content has now been decoded back into normal html. Also should one store htmlentities($content) in the database or simply raw html, then, encode on the display page - what are the SQL dangers of that technique? I have tried </textarea>, <!-- --></>. To be honest I'm not to familiar with XSS attacks but I usually know how to prevent from them. In this case can someone break out of the <textarea></textarea> tags? | I have PHP configured so that magic quotes are on and register globals are off. I do my best to always call htmlentities() for anything I am outputing that is derived from user input. I also occasionally seach my database for common things used in xss attached such as... <script What else should I be doing and how can I make sure that the things I am trying to do are always done. |
I have written: locate Origin90SR2DVD.iso And I received the path where that file is located: /home/david/Origin90SR2DVD.iso Then I have written: cd /home/david I have run: ls -lrth And I cannot find the Origin90SR2DVD.iso file. Why the file is not in that path? | I'm trying to find a certain file for apache so I used the locate command to find it, however, when I go to the directory that locate says it is in, the file isn't there. Does anyone know why this might be? I've tried switching to the super user but it still doesn't show up. Thanks! |
Background: I want to install nvidia driver so I download NVIDIA***.run file and it should be installed in console with graphic interface closed. After press ctrl+alt+f1 I can enter console and ubuntu ask me to login before I can do something. And I know my username and password correctly. Problem: After I type username and press enter it shows 'Password:' but before I can type password the cursor jumps to the next line and wait for about 2 seconds, it shows login incorrect.When I type the password after the cursor jumps to next line and press enter(the password I typed can be seen in this line, I know for sure that password do not shows in ubuntu and I think I just can't type password under the problem), it show the same line 'login incorrect'. It's not about the wrong username and password or some problem made by typing password in the right small keyboard. | I upgraded from 16.04 to 18.04. When I press Ctrl+Alt+F3 I get the terminal which prompts for the username. When I type my username and press Enter, it doesn't wait for my password (its as if I pressed Enter without entering anything). Even if I enter something, the text shown in plaintext and then it keeps on saying my password is wrong. After few times, the screen is cleared and it prompts for my username again and the same loop goes on. |
A vector space is defined as a set $V$ together with a field $F$, such that $(V,+)$ is an abelian group, and $V$ has scalar multiplication that is compatible with $+$. But why is it that in this definition, we require $F$ to be a field, and not any commutative ring? To illustrate, consider $V=\mathbb Z^n$, the set of all $n$ dimensional vectors with integer coordinates. Why doesn't it make sense to extend the definition of vector spaces such that we can say $V$ is a vector space over $\mathbb Z$? All the familiar properties remain: we certainly have closure under scalar multiplication, and the other axioms remain. In particular, the axioms say nothing about needing to have inverses, which is the only thing fields add on top of being a commutative ring. So why wouldn't ordinary commutative rings suffice? | I was reviewing the recently, and it occurred to me that one could allow for only scalar multiplication by the integers and still satisfy all of the requirements of a vector space. Take for example the set of all ordered pairs of integers. Allow for scalar multiplication over the integers and componentwise vector addition as usual. It seems to me that this is a perfectly well-defined vector space. The integers do not form a , which begs the question: Is there any reason that the "field" over which a vector space is defined must be a mathematical Field? If so, what is wrong with the vector field I attempted to define above? If not, what are the requirements for the scalars? (For instance, do they have to be a - Abelian or otherwise?) |
This is the stored procedure: CREATE PROCEDURE [dbo].[StoredProcedure] @FILTERNAME varchar(100) = '' AS IF @FILTERNAME <> '' BEGIN SELECT CODE, NAMEen, NAMEkr FROM (SELECT OT.CODE, OT.NAMEen, OT.NAMEkr, OT.Sortkey FROM OptionTable OT INNER JOIN ConditionTable CT ON OT.CODE = CT.CODE INNER JOIN MasterTable MT ON CT.DevCode = MT.DevCode AND CT.PlanCode = MT.PlanCode WHERE MT.ProductName LIKE '%' + @FILTERNAME + '%' GROUP BY OT.CODE, OT.NAMEen, OT.NAMEkr, OT.Sortkey) TBL ORDER BY Sortkey END This stored procedure is called from vb6. I cant touch the vb6's code so I need to fix this. Until now, the parameter was like 'XXX', but it's going to be like 'A,BB,CCC,ZZZZ'. I need to split the parameter's string by , and change the condition like this: when the parameter is something like this 'A,BB,CCC,ZZZZ', then use this WHERE condition: WHERE MT.ProductName LIKE '%' + A + '%' or MT.ProductName LIKE '%' + BB + '%' or MT.ProductName LIKE '%' + CCC + '%' or MT.ProductName LIKE '%' + ZZZZ + '%' Can someone help me? Thanks. | Using SQL Server, how do I split a string so I can access item x? Take a string "Hello John Smith". How can I split the string by space and access the item at index 1 which should return "John"? |
I am calling a bash script that has a number of flags in the following manner: /home/username/myscript -a -b 76 So to illustrate, the -a flag does something in myscript and the -b flag sets some parameter to 76 in myscript. How do I make these flags conditional based on some previously defined variable? For example, I only want to use the -a flag if some variable var=ON, else I don't what to use that flag. I am looking for something like: var=ON /home/username/myscript if [ "$var" == "ON" ]; then -a fi -b 76 This scheme did not work when implemented, however. What can be used to accomplish the desired result? | I have a script running on Linux that accepts some parameters. I would like to do something like: if [[ $CONDITION == "true" ]]; then script param1 --param2 else script param1 fi I would like to avoid the forking path of the if. Is there a more optimal way to pass the second parameter? |
Assuming the question is sufficiently specific and answerable to be on Stack Exchange too. | Since Quora just went public, I decided to have a look around and found certain topics like Gmail that contained questions that would be great for the Web Apps SE-site. However, would it be considered plagiarism if I simply asked the same questions on the new site? Edit: I would only look at the titles for an interesting question to ask, so if I write my own question body, it's not plagiarism in the real sense of the word. However, it's probably not really polite since if we are better indexed or have a better PageRank, we would steal some of their attention. In response to Jeff's answer: how should I attribute to the sites? Simply mention I found this question on Quora and link to it? |
I am trying to convert a digital elevation model in txt file format to a raster file (tiff) with qgis. The file format is *.dat. The coordinate system is Gauss Krüger, Bessel, 5. meridian. First I imported the txt file with the appropriate coordinate system. Now I want to convert it to a raster file. However the viewed data are black and I dont see any heights. What did I do wrong? Follow the link to view the screenshot of the imported dem in qgis: When zooming in it looks like this: This is an example of the data: LATITUDE LONGITUDE HEIGHT 5390.0125 5659.9875 258.6 5390.0125 5659.9625 252.6 5390.0125 5659.9375 243.9 5390.0125 5659.9125 237.1 5390.0125 5659.8875 234.5 5390.0125 5659.8625 231.2 5390.0125 5659.8375 233.7 | i am very new to qgis. I want to create a hillshade file and also calculate the inclination. The structure of the digital elevation model data looks like this: 5390.0125 5659.9875 251.8 5390.0125 5659.9625 250.6 5390.0125 5659.9375 247.5 5390.0125 5659.9125 240.6 5390.0125 5659.8875 236.1 5390.0125 5659.8625 234.8 5390.0125 5659.8375 235.6 The file format is *.dat. The coordinate system is Gauss Krüger, Bessel, 5. meridian. I have no idea how to import the data in qgis. |
Find a formula for the number of solutions to $$ x_1 + x_2 + x_3 + \ldots + x_k = n $$ where $n \ge 0$ and the the $x_i$ are non-negative integers. For instance, if $n > 0$ then there is exactly one solution to $x_1 = n$. There are $n + 1$ solutions to $x_1 + x_2 = n$. How many solutions to the equation $x_1 + x_2 + x_3 = n$ are there when $k = 3$? Make a table of values for various $n$ and $k$ and generalize your answer for $k > 3$. I'm not sure how to start on this question but it's somehow related to n! | How many ways can I write a positive integer $n$ as a sum of $k$ nonnegative integers up to commutativity? For example, I can write $4$ as $0+0+4$, $0+1+3$, $0+2+2$, and $1+1+2$. I know how to find the number of noncommutative ways to form the sum: Imagine a line of $n+k-1$ positions, where each position can contain either a cat or a divider. If you have $n$ (nameless) cats and $k-1$ dividers, you can split the cats in to $k$ groups by choosing positions for the dividers: $\binom{n+k-1}{k-1}$. The size of each group of cats corresponds to one of the nonnegative integers in the sum. |
Show that the matrix $A = \begin{bmatrix} 1 & \frac{1}{2} & \ldots & \frac{1}{n}\\ \frac{1}{2} & \frac{1}{3} & \ldots & \frac{1}{n+1}\\ \vdots & \vdots & & \vdots \\ \frac{1}{n} &\frac{1}{n+1} &\ldots &\frac{1}{2n-1} \end{bmatrix}$ is invertible and $A^{-1}$ has integer entries. This problem appeared in Chapter one of my linear algebra textbook so I assume nothing more is required to prove it than elementary row operations. I've been staring at it for a while and considered small values of $n$ but there doesn't seem to be a clever way of easily reducing it to the identity matrix. Could someone give me a hint or a poke in the right direction rather than a full solution as I'm still hoping to work it out myself. | Let $A$ be the $n\times n$ matrix given by $$A_{ij}=\frac{1}{i + j - 1}$$ Show that $A$ is invertible and that the inverse has integer entries. I was able to show that $A$ is invertible. How do I show that $A^{-1}$ has integer entries? This matrix is called the Hilbert matrix. The problem appears as exercise 12 in section 1.6 of Hoffman and Kunze's Linear Algebra (2nd edition). |
<ul id="listaAtributos" class="editable isAtribute"> <li>Atributo 1<i class="js-remove">✖</i></li> <li>Atributo 2<i class="js-remove">✖</i></li> <li>Atributo 3<i class="js-remove">✖</i></li> </ul> $('#listaAtributos').append('<li>Atributo<i class="js-remove">✖</i></li>') $('.js-remove').on('click', 'js-remove', function(){ $(this).parent().remove() }) this code doesn't work, someone tell me why? | I have a bit of code where I am looping through all the select boxes on a page and binding a .hover event to them to do a bit of twiddling with their width on mouse on/off. This happens on page ready and works just fine. The problem I have is that any select boxes I add via Ajax or DOM after the initial loop won't have the event bound. I have found this plugin (), but before I add another 5k to my pages with a plugin, I want to see if anyone knows a way to do this, either with jQuery directly or by another option. |
I have a hp pavilion g6 laptop, it runs Windows 8.1. I was planning to use a free os for a while. Which is the recommended Ubuntu version for me? I am totally a newbie to such OS. I have only used windows till date. | I'm thinking about installing Ubuntu Desktop, but I don't know what flavor is the best for my system. What are the minimum and recommended hardware requirements? What kind of CPU? How much memory? Should I have Hardware Acceleration? What flavor should I use? This is an attempt of a canonical answer. My answers have the "official requirements", the recommended are a mix of official sources and opinion based (along with the answer it's told the source). You can comment or edit if you feel that the information is obsolete or incomplete. It is a good rule of thumb that any system capable of running Windows Vista, 7, 8, x86 (Intel) OS X will almost always be a lot faster with any Ubuntu flavor even if they are lower-spec than described below. |
Definition: An element $a$ in a ring $R$ with identity is called a right(left) divisor if there exist $u \in R$ such that $ua=1$ ($au=1$). Can we construct a ring $R$ such that there exist an element $a\in R$ , $a$ is a right divisor of $R$ while $a$ is not a left divisor. My attempt: $(1)$ Since a is a right divisor, if such a ring exists, R must have an identity $1_R$. (2) R can not be commutative. | Can I have a hint on how to construct a ring $A$ such that there are $a, b \in A$ for which $ab = 1$ but $ba \neq 1$, please? It seems that square matrices over a field are out of question because of the determinants, and that implies that no faithful finite-dimensional representation must exist, and my imagination seems to have given up on me :) |
Here is what I have: \documentclass{article} \usepackage{amsmath} \begin{document} \begin{align*} &f(x) = y \\ &f(g(x)) = g(y) \\ &15 \end{align*} Here is some text commenting on the similarity of these two sets of equations . \begin{align*} &f'(x) = y' \\ &f'(g'(x)) = g'(y) \\ &15000 \end{align*} But now the bottom align* is just a tiny bit to the left of the top one, which looks wierd. \end{document} Is there a good way to make these two aligns line up horizontally? Let me know if it's not clear what I'm going for here. I'm open to using something other than align* of course. | I would like to have two displayed equations, broken by a short paragraph, but with aligned equal signs (as if using the align environment). Is there some way to "break" the align environment temporarily? |
Is there a simple way to plot the error function in latex? Something like the graph shown in the wikipedia page would be great. The function doesn't seem to exist in pgfmath. Thanks! | Is there a way to easily compute (or the cumulative distribution function of the normal law) in LaTeX? Currently, I use pgf to make computation, but I did not find a way to compute erf using pgf. I would be happy to use any package that is available to compute erf, or any custom solution to compute that function. |
Prove that if $A$, $B$, and $C$ are sets then $(A - B) \cup (A - C) = A - (B \cap C)$. I have the proof for the first direction: Let $x \in (A - B) \cup (A - C)$ be given. Hence, $x \in (A - B)$ or $x \in (A - C)$. Suppose $x \in (A - B)$. Hence, $x \in A$ and $x \notin B$. Since $x \notin B$ it is logically true that $x \notin (B \cap C)$. So, $x \in A$ and $x \notin (B \cap C)$. Hence $x \in A - (B \cap C)$ by definition. A similar argument works in the case where $x \in (A - C)$. So, $(A - B) \cup (A - C) = A - (B \cap C)$. I'm confused as to how to go about proving the other direction. Would I assume that $x \in A - (B \cap C)$? | First part : I want to prove the following De Morgan's law : ref.(dfeuer) $A\setminus (B \cap C) = (A\setminus B) \cup (A\setminus C) $ Second part: Prove that $(A\setminus B) \cup (A\setminus C) = A\setminus (B \cap C) $ Proof: Let $y\in (A\setminus B) \cup (A\setminus C)$ $(A\setminus B) \cup (A\setminus C) = (y \in A\; \land y \not\in B\;) \vee (y \in A\; \land y \not\in C\;)$ $\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;= y \in A\ \land ( y \not\in B\; \vee \; y \not\in C ) $ $\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;= y \in A \land (\lnot ( y\in B) \lor \lnot( y\in C) )$ According to De-Morgan's theorem : $\lnot( B \land C) \Longleftrightarrow (\lnot B \lor \lnot C)$ thus $y \in A \land (\lnot ( y\in B) \lor \lnot( y\in C) ) = y \in A \land y \not\in (B \land C)$ We can conclude that $(A\setminus B) \cup (A\setminus C) = A\setminus (B \cap C)$ |
I have a logo in png format (black and white) for my University that needs to be used in different colours. For a set of forms that a couple of students are developing, it is essential to change logo colour depending on the form that it is being used in. The logo is really complex (very few straight lines). I have searched but there does not seem to be a way to use \includegraphics to change image color. So, the possible solution that I have hit upon involves converting the logo to tikz code and then using the full power of xcolor package should become possible. That leads to a second question - how do I convert a png image to tikz code? I have been using geogebra to generate tikz code from stuff I draw, but I do not think (haven't tried) if that will work for an image imported into geogebra. | I was trying to get the symbol of the old . I'm actually interested in the laurel leaves, and not so much in the banner per se. What I would like to have is something like this (in Tikz, as oppose to simply \includegraphics). With the possibility to change the stylish A to any other simple roman letter. I'm a complete newbie with TikZ, and even though I know this question sounds like do this for me, I would really appreciate if someone could at least throw in an sketch where to start. |
We have a Drupal 8 application which has modules directly in the directory "/modules" on the file system. I want to move a contributed module from the directory "/modules" to the directory "/modules/contrib". Do I need to uninstall the module before doing it? Are there any steps that need to be performed before and after moving the module? | I created a module through Drupal Console, unfortunately it wasn't placed in a folder of its own, rather straight into /modules/custom. Before I noticed where it had gone, I enabled the module. In Drupal 6/7, this was easy to fix - I could literally just put the files into the correct path, clear the cache (maybe rebuild the registry, it wasn't an exact science), and all was well. The same isn't true for Drupal 8; I moved the files into a subfolder, rebuilt cache, and all requests tell me that Drupal is failing to include a required file. The particular file is a block class, and the path Drupal is trying to find it is where it used to be, not where I've moved it to. The bit of code objecting is in Symfony's ApcClassLoader, so I guess I need to clear something that's slightly above Drupal's head to get this path reference updated. How can I do that? Uninstalling and re-installing the module does work, but once there's important data stored that's not going to be an option. I was wrong, uninstalling and re-installing is not a viable option. After uninstalling and reinstalling, Drupal can no longer pick up the custom blocks the module defines. I'm guessing that reference is cached somewhere that isn't cleared when the module is uninstalled. Just need to find out where that is and how to clear it... |
I've made a very simple 2D top down prototype with Unity. Now I want to expand the thing and add a feature where objects change when the player looks at them. So I have to add a visibility polygon feature. I want to be able to get a list of objects (2d Colliders) which are in the Field of view of the player. How I can do that? I looked around and only found a tutorial which works with Physics2D.Raycast, but this seems to be only one ray as I need a field of view. Similar to the light of a flashlight. I've drawn a sketch to illustrate my question: In this case the list should contain the collider V1, V2 and V3 because the player can see them. Edit: I experimented with the sending a "fan" of Raycasts every 0,1 ° but this solution does have some problems. The accuracy depends on how far the collider is away. Also this is not the best performing solution. And there are problems with small objects. As solutions like this: seems to be a lot of work just to reinvent something which is already out there I wonder if there is a built-in way in unity to help me to compute this area. | I'm currently trying to create an effect like the one displayed below in Unity: However, it seems that I can't do this with any of Unity's built-in light objects, and I simply cannot find anything online that talks about this. Is there a way to achieve this in Unity? 2D or 3D solutions are fine, as I'm sure that they're both very similar to each other, |
Edit: while related and interesting, does not ask or answer the question I'm asking. What it asks is what happens with regards to things like votes and dividends while there are outstanding long positions. One of the answers also covers what happens when a short squeeze forces short positions to cover when very little (but non-zero) stock is available for perchance. Specific it doesn't cover the question of what would happens if shorts are some how force to cover their position when no stock is offered for sale. Original question: Basically a short squeeze, but even more so. Person Z buys 10% of the float. They offer to loan it to short positions (with some sort of obligation to return it by a fixed date). The shot positions sell it back into the market. Person Z buys another 10% of the float. Go back to step 2 Repeat until Z is long by >100% of the float. At this point there can be plenty of liquidity as 90+% of the stock is in owned by people other than Z. But what happens if Z then switches to doing nothing at all? They just let all the loan terms expire, collecting the returned shares but refuse to sell anything. Eventually they own all the shares, but someone still owns them more and there are none to buy... at any price. Granted this is 100% hypothetical and almost surely wouldn't happen in real life, but if it did... ? The closest situation that I could see actually happening would be a contract denominated in a currency that no longer exists (say it was in DEM before the Euro came along) with no provisions for anything else. But in that case both parties are motivated to resolve the situation. But in the hypothetical above, the long position doesn't care. At a guess, some court would step in and either declare the long potion to be illegal, force a sale of shares at some set price, force the long position to accept something else of value or just declare the short positions bankrupt and liquidate them. | Suppose there are 100,000 shares outstanding. I own 90,000 shares. I allow my shares to be lent to short sellers. Short sellers borrow 30,000 shares from me and they sell those shares on the market. I buy the 30,000 shares from them on the market. Now, I have 120,000 shares, which is greater than the number of shares outstanding. Is this situation possible? Did my voting power and ownership stake increase from 90.0% (90,000 / 100,000 = 0.900) to 92.3% (120,000 / 130,000 = 0.923)? I have read , which deals with institutional ownership. The answer there explains the cause (somewhat similar to my hypothetical scenario above), but not the effect of >100% ownership. It claims that >100% institutional ownership is caused by "discrepancies in institutional reporting", without elaborating further on the effect of such "discrepancies". |
I found this: Q. I want to have additional servers running Windows Server 2008 or Windows Server 2008 R2 in my SBS 2011 Standard domain. Do I need additional CALs to access those servers? A. No. As long as those servers are within the Windows Small Business Server 2011 Standard domain, your Windows Small Business Server 2011 CAL Suites grant you access rights to the other Windows Servers. Note however, the use of some functionality in Windows Server require additional licenses (e.g., Remote Desktop Services/Rights Management Services). . I'm looking to find out if the CAL would also cover a Server 2012 or Server 2012 R2 member server of the SBS domain as well. Has anyone found anything from Microsoft one way or the other? | This is a about Licensing. Questions on licensing are off-topic on Server Fault. If your question has been closed as a duplicate of this question, then this is because we want to help you understand why licence questions are off topic rather than just telling you "it just is". In all likelihood, this question will not address your question directly, it was not meant to. I have a question regarding software licensing. Can the Server Fault community please help with the following: How many licenses do I need? Is this licensing configuration valid? What CALs do I need to be properly licensed? Can I run this product in a virtual environment? Can I downgrade this product to an earlier version? Am I entitled to feature X with license Y? |
<link href="https://fonts.googleapis.com/css?family=Montserrat:100,200,300,400,500,600,700,800,900" rel="stylesheet"> How do I call the above Google font family link in CSS file? | Is it possible to include one CSS file in another? |
When you use bibtex to write references that contain more than three authors, not all names appear, but only the first name and others appear How can I show the names of all authors Example \RequirePackage{filecontents} \begin{filecontents}{\jobname.bib} @article{RN63a, author = {Xu, Liyun and Chen, Yanhao and Briand, Florent and Zhou, Fengxu and Givanni, Moroni}, title = {Reliability Measurement for Multistate Manufacturing Systems with Failure Interaction}, journal = {Procedia CIRP}, volume = {63}, pages = {242-247}, ISSN = {2212-8271}, year = {2017}, type = {Journal Article} } \end{filecontents} \documentclass[a4paper,10pt]{article} \usepackage[english]{babel} \usepackage[utf8]{inputenc} \usepackage{csquotes} \usepackage[% style=numeric, sortcites, backend=biber, giveninits=true % <=================================================== ]{biblatex} \addbibresource{\jobname.bib} \DeclareNameAlias{default}{family-given} % <============================ \renewcommand*\newunitpunct{\addcomma\space} % <======================== \begin{document} \section{First Section} This document is an example of BibTeX using in bibliography management. Three items are cited: \textit{The \LaTeX\ Companion} book \cite{RN63a}. \medskip \printbibliography \end{document} | I'm using the package to add citations and a bibliography to my LaTeX document. I've noticed that only the first author plus "et al." is displayed for works with more than three authors. That's fine with me for in-text-citations, but I'd rather have the complete author information in the bibliography. How can I do that? |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.