body1
stringlengths 20
4.1k
| body2
stringlengths 23
4.09k
|
---|---|
It's common convention to name a domain something like companyname.local for internal Active Directory with integrated DNS. I'm in a situation where the company name has changed and I would like to rename the domian. I'm aware of the difficulty and implications. I would like to rename it from 'abccorporate.local' to just 'xyz'. I can't think of any reason to keep the '.local', is there one? | This is a about Active Directory domain naming. After experimenting with Windows domains and domain controllers in a virtual environment, I've realized that having an active directory domain named identically to a DNS domain is bad idea (Meaning that having example.com as an Active Directory name is no good when we have the example.com domain name registered for use as our website). , but I'm still not sure about what other rules there are around naming Active Directory domains. Are there any best practices on what an Active Directory name should or shouldn't be? |
Hello i'm using ubuntu 17.10 on a lenovo ideapad 110s and anytime the system suspends it freezes on the lock screen and if I try to to shutdown the computer it stays on the shutdown screen. Holding down the power button is the only way I can shut it down. I've used previous versions of ubuntu on this laptop and haven't had any troubles. | I decided to upgrade to 17.10 on my Thinkpad. Now every time I try to shut it down via console or menu) or reboot it, it takes ages. TTY gives me several errors connected to hung_task_timeout_secs, reaching from kworker, over networkmanager down to wpa_supplicant. I tried reinstalling with different ISOs (daily-build from 2 days ago, beta2, and the rc one from today) and still get the same error every time. Any ideas what could cause that issue? Right now I'm running 17.10 on two other, different PCs without any problems whatsoever. EDIT: deborphan doesn't return any orphaned packages. I think I might have found something though. I decided to completely wipe the disc, including my dualboot windows. Reinstalled, and everything worked fine. Today in university the problem reappeared. Now the interesting part is: I think it is related to my wifi. At home, during installation and after, I had it plugged in via cable, and had no problems at all. But with only wifi in university it reappeared. So I gave it a try and plugged in the cable again at home, and it works again. Removed cable, restarted, and the problem reappears. Wifi-Card is a Qualcomm Atheros. |
Say I have a table of numbers 1-6. I throw a 6 sided die a number of times. Each time I get a number I have not already had, I mark it in the table. What is the expected number of times to throw the dice to fill out the table? | What is the average number of times it would it take to roll a fair 6-sided die and get all numbers on the die? The order in which the numbers appear does not matter. I had this questions explained to me by a professor (not math professor), but it was not clear in the explanation. We were given the answer $(1-(\frac56)^n)^6 = .5$ or $n = 12.152$ Can someone please explain this to me, possibly with a link to a general topic? |
I might've messed some stuff up and I have icons which lead to a non-existent path in the "Show Applications", I am using Ubuntu 18.04.2 LTS if that helps. More specifically I tried running Steam through wine, didn't work but made an icon in the "Show Applications" menu. Even when the path is correct it says it's wrong. | I had installed some programms with Wine, but I removed Wine from my computer. Now when I browse all applications in the Unity menu, the symbols of the programms I installed with Wine are still there. How can I remove them? |
Let $P_n=\frac{2^3-1}{2^3+1} \cdot \frac{3^3-1}{3^3+1} \cdot\frac{4^3-1}{4^3+1}...\frac{n^3-1}{n^3+1}$ Then $\lim_{n\to\infty} P_n=\frac{2}{3}$. I could understand that as $n \to \infty$, the last term in the series approaches $1$. But I couldn't understand how the product evaluates to $\frac{2}{3}$. | Calculate $$\lim_{n \to \infty} \frac{2^3-1}{2^3+1}\times \frac{3^3-1}{3^3+1}\times \cdots \times\frac{n^3-1}{n^3+1}$$ No idea how to even start. |
For some reason, I have to login again whenever I haven't touched the data explorer for some unreasonably small period of time (<<< 1 day). I am logged in with the StackExchange openid. I usually end up entering the captcha instead when it's just a quick query. Firefox 37. | On most Stack Exchange sites, when I visit them I am already logged in if I have logged in before. Why isn't it the case with ? |
I used the following code to find out the time past between two dates: $date1 = "1900-00-00"; $date2 = "2000-00-00"; $diff = abs(strtotime($date2) - strtotime($date1)); $years = floor($diff / (365*60*60*24)); $months = floor(($diff - $years * 365*60*60*24) / (30*60*60*24)); $days = floor(($diff - $years * 365*60*60*24 - $months*30*60*60*24)/ (60*60*24)); printf("%d years, %d months, %d daysn", $years, $months, $days); But this prints 100 years, 0 months, 24 daysn, instead of 100 years, 0 months, 0 daysn What is going on? | I have two dates of the form: Start Date: 2007-03-24 End Date: 2009-06-26 Now I need to find the difference between these two in the following form: 2 years, 3 months and 2 days How can I do this in PHP? |
I got 6 domains : company.ca and company.com (because both where free, but we are a canadian company but can do business with the rest of the world). Then, we sell sportwear because of the company name is totally unknown to the world. Our product is we have bought product specific domain : chandails.ca and t-shirt.ca as well as shorts.ca and shorts.com. So those 6 domains are mine. Now what is the best way to do? Now all are 301 redirect to the main company name (.com) or make micro-site, super simple one page optimized for just shirt and one for shorts, then tell people to know more, go to the main site. Because now, I cannot really find the benefit of the search word in domain name edge if never somebody see something in that domain... I got confused and don't find strait answer to this question. | Lets say I have a domain already, for example www.automobile4u.com (not mine), with a website fully running and all. The title of my "Website" says: <title>Used cars - buy and sell your used cars here</title> Also, lets say I have fully SEO the website so when people searching for the term buy used cars, I end up on the second or first page. Now, I want to end up higher, so I go to the google adwords page where you can check how many searches are made on specific terms. Lets say the term "used cars" has 20 million searches each month. Here comes the question, could I just go and buy that domain with the search terms adress, in this case www.usedcars.com and make a redirect to my original page, and this way when people search for "used cars", my newly bought domain name comes up redirecting people to my original website (www.automobile4u.com)? The reason I believe this benefits me is because it seems search engines first of all check website adresses matching the search, so the query "used cars" would automatically bring www.usedcars.com to the first result right? What are the downsides for this? I already know about google spiders not liking redirects, but there are many methods of redirecting... Is this a good idea generally? |
In Game of Thrones S07E06 when Jon and his group have a standoff with White Walkers we see a few White Walkers (4-6) along with the Night King. Are they all the White Walkers in the world? Are some of them in some other place? If so, where? | Throughout Game of Thrones, we have seen multiple die. As far as I remember: Sam killed one with dragonglass. Jon Snow killed one with Longclaw. Meera Reed killed one with a spearhead made of dragonglass. So are there a set number of White Walkers that were created by the ? If so, about how many are there? OR Can the just create as many as he wants? |
I'm new to Ubuntu.. I'm not sure what just happened, but the screen just went black with the text: Ubuntu 11.10 "my computer name" tty4 and I was asked to log on. It happened when I closed Chrome (Alt+F4). This is the second time it has happened, and I cant make it go away :) Even if I log on. Only thing that works is to press Ctrl+Alt+Delete, which makes my PC restart. Any idea what is causing this? | I tried to install an nvidia driver and there was an error saying I must not be in an X terminal when doing so. So I did a Ctrl+Alt+F1. The resulting terminal did not allow the nvidia driver to be installed and showed the same error message. How do I revert back to the Unity GUI? |
I am travelling from Washington DC to Copenhagen ( layover 4 hours ) then to Newcastle UK. Do I need a schengen visa? I have a green card and 5 year UK visa and am a citizen of India | I found many related questions on this site but I am still not sure about the rules. How can I decide if I need a visa to transit? Schengen members as of May 2021 are as follows: Austria Belgium Czech Republic Denmark (excluding Greenland and the Faroe Islands - but an open border with the Schengen Area is maintained) Estonia Finland France (excluding overseas departments and collectivities) Germany Greece Hungary Iceland Italy Latvia Liechtenstein Lithuania Luxembourg Malta Netherlands (excluding Aruba, Curaçao, Sint Maarten and the Caribbean Netherlands) Norway (excluding Svalbard) Poland Portugal Slovakia Slovenia Spain (except Ceuta and Melilla) Sweden Switzerland |
There are some shortcut keys on my windows computer that must be coming from some program. I know that I've installed a couple of "productivity" programs, but for the life of me I can't figure out what's causing some of these shortcuts. Is there a generic program/way for me to hit some hotkey, and then know where it's coming from? For example, suppose that I have an autohotkey exe running which always prints a message when I hit ctrl+alt+m. Is there a way to hit ctrl+alt+m, and then know that the autohotkey program is binding that keystroke to something? If there isn't an easy way to do this (I'm betting there's not), then what possible places are there to check? Are there known ways to bind hotkeys via registry? If so, are there common places in there? Are there keyboard settings in Windows OS somewhere? I know this is an abstract and hard question, but I think it's very practical for "super users", has objectivity, and so belongs here. | Given a hotkey, how can I find which program owns it? |
I just wanted to know how to explain "degrees of freedom" to a non-statistics person without mentioning any statistical terms. How to explain this? | From , there are three interpretations of the degrees of freedom of a statistic: In statistics, the number of degrees of freedom is the number of values in the final calculation of a statistic that are free to vary. Estimates of statistical parameters can be based upon different amounts of information or data. The number of independent pieces of information that go into the estimate of a parameter is called the degrees of freedom (df). In general, the degrees of freedom of an estimate of a parameter is equal to the number of independent scores that go into the estimate minus the number of parameters used as intermediate steps in the estimation of the parameter itself (which, in sample variance, is one, since the sample mean is the only intermediate step). Mathematically, degrees of freedom is the dimension of the domain of a random vector, or essentially the number of 'free' components: how many components need to be known before the vector is fully determined. The bold words are what I don't quite understand. If possible, some mathematical formulations will help clarify the concept. Also do the three interpretations agree with each other? |
I have something like this in JavaScript var stringArray = "[[1088163336,80],[1088154636,95],[1088150436,75]]" And I need this var array = [[1088163336,80],[1088154636,95],[1088150436,75]]; Help please. | Given a string of JSON data, how can I safely turn that string into a JavaScript object? Obviously I can do this unsafely with something like: var obj = eval("(" + json + ')'); but that leaves me vulnerable to the JSON string containing other code, which it seems very dangerous to simply eval. |
I am trying to create a short code with a form I have the form displaying ok but I need to be able to pull the price information from sql table as well and show it in a label. How can i do that using the following code. <?php /* * Plugin Name: WordPress ShortCode * Description: Fules Plugin. * Version: 1.0 */ // Example 1 : WP Shortcode to display form on any page or post. function form_creation(){ global $wpdb; ?> <form> Liters:<select> <?php $sql = 'SELECT liters FROM wp_tfp'; $liters = $wpdb->get_col($sql); if( $liters ) { foreach( $liters as $liter ) { echo '<option value="' . $liter . '">' . $liter . '</option>'; } } ?> </select> Price: <input type="text" name="price"><br> </form> <?php } add_shortcode('test', 'form_creation'); ?> | I have a Widget which I am creating but my quesiton is how do I access my custom table which I created via my plugin. I am attempting to fill the dropdown from the table called tfp which contains the column liters which I wish to popluate the values into the drop down class my_plugin extends WP_Widget { // constructor function my_plugin() { parent::WP_Widget(false, $name = __('Thomsons Fuels Widget', 'wp_widget_plugin') ); } // widget form creation function form($instance) { //Check values if( $instance) { $title = esc_attr($instance['title']); $dropdown= esc_attr($instance['dropdown']); $textarea = $instance['textarea']; } else { $title = ''; $textarea = ''; } ?> <p> <label for="<?php echo $this->get_field_id('dropdown'); ?>"> <?php _e('Liters', 'wp_widget_plugin'); ?></label> <select> <option value="volvo">Volvo</option> </select> </p> How I created the table in the plugin global $wpdb; global $custom_table_example_db_version; $table_name = $wpdb->prefix . 'tfp'; // do not forget about tables prefix // sql to create your table // NOTICE that: // 1. each field MUST be in separate line // 2. There must be two spaces between PRIMARY KEY and its name // Like this: PRIMARY KEY[space][space](id) // otherwise dbDelta will not work $sql = "CREATE TABLE " . $table_name . " ( id int(11) NOT NULL AUTO_INCREMENT, liters VARCHAR(100) NOT NULL, price VARCHAR(100) NOT NULL, postcodearea varchar(20) NULL, dft varchar(20) NULL, PRIMARY KEY (id) );"; // we do not execute sql directly // we are calling dbDelta which cant migrate database require_once(ABSPATH . 'wp-admin/includes/upgrade.php'); dbDelta($sql); // save current database version for later use (on upgrade) add_option('custom_table_example_db_version', $custom_table_example_db_version); |
As I understand it, Microsoft licencing is tied to an organisation. My company is a gold partner and has volume licensing. We're toying with the idea of hosting some of our clients systems, but don't know whether our existing licensing allows that. I've seen that SPLA licences allow for monthly billing, but do other licence packs, or even the purchase of a boxed product, allow you to run production environments for clients? Also, is there a problem having multiple clients using a single Windows server, or SQL server? | 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? |
We often omit "that" in direct object noun clauses. For example: I hope you have a good weekend. or I hope the meeting goes well. It may sound a bit stilted to include "that" in those sentences, particularly the first. However, today I was writing an email and wanted to combine those ideas into one sentence. My clarity instinct led me to write: I hope you have a good weekend and that the meeting goes well. In this case, omitting "that" before "the meeting goes well" makes that second object sound clumsy. But including two "that"s sounds equally clumsy. Is it acceptable to omit the first and not the second? Does it sound clumsy to omit both? | He will understand that I was not joking. He will understand I was not joking. Which of the sentences is correct? Are there any specific rules about the use of "that" in the sentences I reported as example? |
Is it possible to define a zero $f(x)$ in a ring $R[x]$ of polynomials as a display of the form: $(\forall x \in R)$ $f(x)=0$ ? | I shall assume all rings to be commutative in this question. The impatient can scroll down to the "blockquote" to read the actual question. Whenever we have a polynomial over a ring, it defines a function from the ring to itself by evaluation. It's reasonable to ask when two different polynomials define the same function. From the factor theorem it follows that an $n^\text{th}$ degree polynomial over an integral domain has at most $n$ roots. Then it's easy to show this: Theorem. Let $R$ be an infinite integral domain and let $f \in R[X]$ such that $f(a)=0$ for all $a \in R$, then $f = 0$. Proof. $f$ has infinitely many roots, so it must be the zero polynomial. $\quad\square$ For finite rings a kind of opposite situation occurs: Theorem. For any finite ring $R$ there are polynomials over $R$ that are different but agree on all elements. Proof. There are only finitely many functions from $R$ to itself, but $R[X]$ is infinite. $\quad\square$ If we make further assumptions it's of course possible to prove more, as Pete L. Clark wrote in this post: [] Then there is the question of infinite rings that are not integral domains. It's relatively easy to come up with examples of a ring $R$ with positive characteristic and a nonzero polynomial that evaluates to the zero function, e.g.: $$ R := \bigoplus_{n=1}^\infty \mathbb{Z}/6\mathbb{Z} \quad\text{and}\quad f(X) := X^3-X.$$ The Question: This leaves open the case alluded to in this post's title: Is there a commutative ring of characteristic $0$ (hence infinite) such that a nonzero polynomial evaluates to the zero function? |
When i try installing Ubuntu alongside Windows, I see only 2 options: One is to erase all data and install Ubuntu, and the other one is "Something else". I can't see an option to install alongside Windows 10. | Whenever I startup from the LinuxLive USB, and try to install Ubuntu 12.04, it only gives me two options instead of the usual 3 or 4. My options are "Replace Windows 7 with Ubuntu" and "Something Else". Whenever I go into "Something else", it looks extremely confusing. How do I install it side-by-side while using the "Something else" section? These are my partitions. /dev/sda /dev/sda1 ntfs (104Mb, System Required Partition) /dev/sda2 ntfs (1000097Mb, Windows 7 Partition) Or should I try reinstalling my installer on a CD rather than USB and maybe then it will have the "Install alongside" function? |
How do you change an unverified Steam email address, with no access to the cell phone number and email address for the Steam account? | I am unable to log into my Steam account as I do not have access to my email account for the Steam Guard verification process. I have raised a ticket but have not received a reply from Steam Support yet, and it has been over two days so far. I am really desperate because I just put $20 on there and that's really rare for me. There is no way to activate my email account which the verification code has been sent. What can I do to resolve this issue and regain access to my Steam account? |
Can 's be used as a contraction of was? For example, can "maybe she's born that way" mean "maybe she was born that way"? | Is there a contraction for "I was"? There are contractions for "I am" (I'm), "I will" (I'll), "I have" (I've), "I would" (I'd), and yet the simple past tense seems conspicuously missing. Why is that? Does that reasoning apply to "I did" and "I had" as well? |
I have tried below piece of code to remove punctuation from a string. import re s = "string. With. Punctuation?" s = re.sub(r'[^\w\s]','',s) This works fine for roman like text(script) but seems to have problem with Unicode like text like Hindi, Telugu etc. for example: import re s = "అనేది దేనికి సమానం అవుతుంది." s = re.sub(r'[^\w\s]','',s) This one completely changes the text itself and making it not understandable by removing dependent vowels of that script. So my question is how can I remove punctuation from text that is other than roman text. The duplicate question linked will replace punctuation for roman like string as I already mentioned. My issue here is to replace punctuation for Unicode like string. There is a clear difference not a duplicate. | 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? |
In case of the solution of Schrödinger equation in particle in a box we find that the probability of finding the particle at the middle of the box is always zero (for $n$ even) and the probability distribution has a node there. Say initially the wave function is a superposition of all even-$n$ states. So we have a finite probability to find the particle on each side of the box but not at the middle therefore if I measure the particles position now and find it at the right side then after long time if I take another measurement and find the particle on the left side, I can't say that it has passed to the left side in the meantime because at the middle the particle can never be found. So, my question is How can I find the particle on both sides but not at the middle, as if it is found to be present at both sides at two instances, it must pass through the centre? If this is not the case then what is the description of a particle in quantum mechanics? I mean which properties should a physical quantity have to be called a particle? | Let's consider an infinite square well. In the first exited state there is a node at the middle of the well (i.e. wave function and thus probability of finding the particle is zero there). If I measure the position right now, I may find the particle on the left side of the node, and if I measure the particle after some time, I may find the particle on the right side of the node. But must a particle on the left side to go to right side not pass through the node point? Thus the particle will spend some time at that point, so there should be some probability of finding the particle there, but the wave function is zero there, so what's wrong with the arguement? Does the particle move here to there, without passing through the space in between? But that will just violate continuity equation? |
I have a number of functions with a combination of positional and keyword arguments, and I would like to bind one of their arguments to a given value (which is known only after the function definition). Is there a general way of doing that? My first attempt was: def f(a,b,c): print a,b,c def _bind(f, a): return lambda b,c: f(a,b,c) bound_f = bind(f, 1) However, for this I need to know the exact args passed to f, and cannot use a single function to bind all the functions I'm interested in (since they have different argument lists). | How can I bind arguments to a Python method to store a nullary functor for later invocation? Similar to C++'s boost::bind. For example: def add(x, y): return x + y add_5 = magic_function(add, 5) assert add_5(3) == 8 |
I'm an Indian national, currently residing in US. I'd applied for a Schengen visa for Iceland at the Sweden consulate (Sweden handles visa processing for Iceland). My passport with the stamped visa arrived late, to the point that I had to cancel my travel. I now have an approved Schengen single-entry tourist visa issued by Sweden that I haven't traveled on. Planning a new trip to Iceland in the short duration while the visa is still valid is turning out to be just too expensive (no flight options available). Can I use this visa to travel to France instead? Others have asked similar questions regarding use of the single entry Schengen visa, but I'm specifically interested in guidance / experience from travelers to France who've been in this situation. UPDATE: I made the trip to Sweden, though the visa had been issued by Sweden for travel to Iceland. Faced no problem at immigration on entry. | My friends and I planned to visit Germany, so I got a single entry tourist Schengen visa to Germany. However, my travel plans have changed since then, because my friends are going to Italy instead. I don't have time to apply for a visa to Italy, but I have been told that I can use my Schengen visa to enter Italy. Is that true? |
(1)Let $p_n$ be the nth prime number,and $P=\sum_{n=1}^{\infty} \frac{1}{p_{n}}$; (2)Let $\varphi(n)$ be the Euler's totient function,and $S=\sum_{n=1}^{\infty} \frac{\varphi(n)}{n^{2}}$ . | Is this series known to converge, and if so, what does it converge to (if known)? Where $p_n$ is prime number $n$, and $p_1 = 2$, $$\sum\limits_{n=1}^\infty \frac{1}{p_n}$$ |
Let $f$ be a real function defined on $\mathbb{R}$ satisfying the condition: $$\lim_{h\rightarrow 0} [f(x+h)-f(x-h)]=0 \mbox{}$$ for any $x\in\mathbb{R}$. Does it imply continuity of $f$? I believe the counterexample to that statement is the following function: $$g(x)=\mathbb{1}_{\{0\}}\mbox{,}$$ which is clearly not continuous at $x=0$. | Suppose $f$ is a real function defined on $\mathbb{R}$ which satisfies $$\lim_{h\rightarrow 0}\ [f(x+h)-f(x-h)]=0.$$ Does this imply that $f$ is continuous? Source: W. Rudin, Principles of Mathematical Analysis, Chapter 4, exercise 1. |
I had an USB pendrive plugged in the laptop when the laptop froze. After that time I can't access my USB pendrive. It doesn't work on other computers either. I checked disk management and it says "no medium". I have checked drive letter, NOT the problem. I have re-installed the drivers, NOT the problem. My other usb still works on my laptop so not broken usb ports. | I have a usb stick that won't show up on the computer. It has always worked in the past, and nothing remarkable has changed on the stick or the PC since its last use. It could be that it's not getting power. The light doesn't show up, and other USB sticks work fine in that port. This stick doesn't work in any port on any PC that I've tried. Is there any way of getting the data off it? Tall order I know... |
I need to create a complex geometry at one place on my model, so I would not use the knife tool I would add loop cuts but it doesn't let me to. I already deleted the faces and created them again but even when I think that the topology of this certain place is alright I still cant't add a single loop throughout all the tube. So my Question is: Why is this happening and what would be the best thing for me to do? | Alright so I've seen some postings about loop cuts and done some research. I am very new to blender and modeling overall. I am trying to loop cut this concrete barrier. Now I'm following a tutorial and kind of did my own thing in some areas. I cleaned it up following some instructions in another answer here on stack exchange. I can't for the life of me figure out why I can loop cut around the whole bottom: ...but not the whole middle: I see this marked as answered by another question. That question refers to ngons and inside faces. Now once again I'm totally new to this. I looked on the inside. I don't believe I have inside faces or any ngons by the terms I've read online in my research. Here is a wireframe picture and the inside view: Maybe I'm missing something the answers on other posts are saying. If so and you know what it is I'd be very appreciative of what it is. |
I have read through the documentation from Android. I see that it keeps using copyInputStreamToOutputStream(in, System.out);. That gives me error: cannot find symbol method copyInputStreamToOutputStream(InputStream,PrintStream) Here's the code in question: URL url = new URL("https://wikipedia.org"); URLConnection urlConnection = url.openConnection(); InputStream in = urlConnection.getInputStream(); copyInputStreamToOutputStream(in, System.out); What is the meaning of copyInputStreamToOutputStream? | I was surprised to find today that I couldn't track down any simple way to write the contents of an InputStream to an OutputStream in Java. Obviously, the byte buffer code isn't difficult to write, but I suspect I'm just missing something which would make my life easier (and the code clearer). So, given an InputStream in and an OutputStream out, is there a simpler way to write the following? byte[] buffer = new byte[1024]; int len = in.read(buffer); while (len != -1) { out.write(buffer, 0, len); len = in.read(buffer); } |
Consider a $2^{1999} \times 2^{1999}$ square, with a single $1 \times 1$ square removed. Show that no matter where the small square is removed it is possible to tile this "giant square minus tiny square" with L-trominos. | Suppose we have an $2^n\times 2^n$ board. Prove you can use any rotation of L shaped trominoes and a monomino to fill the board completely. You can mix different rotations in the same tililng. |
I am new to ubuntu and I had the 12.04 version installed by a friend of mine. When installing, he kept the windows os I already had in my PC, creating a partition. Now I'd like to replace the partition (I don't need windows anymore) and install the new Ubuntu 14.04 LTS (from USB) only. Can I do that straightforward installing 14.04 or do I have do delete the partition before? Thank you in advance! | I would like to see a full how-to guide on how to install Ubuntu. |
Below is my code of sending email from my mail but I am getting an error please help ! Error: Email not sent!System.Net.Mail.SmtpException: The operation has timed out. at System.Net.Mail.SmtpClient.Send(MailMessage message) at _Default.Button1_Click(Object sender, EventArgs e) try{ MailMessage mailmessage = new MailMessage(); mailmessage.To.Add(TextBox3.Text); mailmessage.From=new MailAddress("[email protected]"); mailmessage.Subject = "User SignUp"; mailmessage.Body = "Hello You're registered!"; SmtpClient smtpclient = new SmtpClient("smtp.gmail.com",465); mailmessage.Priority = MailPriority.High; smtpclient.Timeout = 60000; smtpclient.Send(mailmessage); Response.Write("Email sent successfully!"); } catch(Exception exp) { Response.Write("Email not sent!" +exp); } } | Instead of relying on my host to send an email, I was thinking of sending the email messages using my Gmail account. The emails are personalized emails to the bands I play on my show. Is it possible to do it? |
I have this slight problem with my Tic Tac Toe program. I have a nested counter checking for vertical and horizontal wins with the X piece (I haven't done it for O yet). For some reason, it never ends, allowing me to place more and more pieces. For some context, here are some snippets of code. public static void game (String winner, Board pointer) { boolean win = false; int turnCount = 1; winner = "Tie"; while (win == false || turnCount < 9) { int row = Integer.parseInt(JOptionPane.showInputDialog(pointer.getName1() + ", it is your turn. " + "\n" + "What row would you like your 'x' to be in?")); int col = Integer.parseInt(JOptionPane.showInputDialog("What column would you like it to be in?")); pointer.play[row] [col] = pointer.x; SpotCheck1(winner, pointer, row, col); System.out.println(BoardStat(pointer)); winCheck(win, pointer, winner); int row2 = Integer.parseInt(JOptionPane.showInputDialog(pointer.getName2() + ", it is your turn. " + "\n" + "What row would you like your 'o' to be in?")); int col2 = Integer.parseInt(JOptionPane.showInputDialog("What column would you like it to be in?")); SpotCheck2(winner, pointer, row2, col2); pointer.play[row2] [col2] = pointer.o; System.out.println(BoardStat(pointer)); winCheck(win, pointer, winner); turnCount++; } //return winner; } public static void winCheck (boolean win, Board pointer, String winner) { for (int counter = 1; counter <= 3; counter++) { if ( pointer.play [counter] [1].compareTo(pointer.x) > 0 && pointer.play [counter] [2].compareTo(pointer.x) > 0 && pointer.play [counter] [3].compareTo(pointer.x) > 0) { win = true; winner = pointer.getName1(); win(winner, pointer); } else if (pointer.play [1] [counter].compareTo(pointer.x) > 0 && pointer.play [2] [counter].compareTo(pointer.x) > 0 && pointer.play [3] [counter].compareTo(pointer.x) > 0) { win = true; winner = pointer.getName1(); win(winner, pointer); } } //return win; } SpotChecks 1 and 2 are the ways to check if a player has already placed a piece. The problem, I think, is in the WinCheck method. If anybody can help me out, that'd be great! First post, apologies if I did something wrong. | I always thought Java uses pass-by-reference. However, I've seen a couple of blog posts (for example, ) that claim that it isn't (the blog post says that Java uses pass-by-value). I don't think I understand the distinction they're making. What is the explanation? |
13 green, 15 blue, and 17 red chameleons are on an island. Whenever two chameleons of different colors meet, they change to the third color. Is it possible for all of them to become the same color? I said no. I took a look at all the chameleon numbers mod 3, and saw that they were 1 mod 3, 0 mod 3, and 2 mod 3. (I have some trouble explaining this part)->I did some color-changing on them, and saw that the chameleon numbers per color mod 3 stayed the same. The number of each color was either 0,1, or 2 mod 3. The number of chameleons of each color is either 0,1,2 mod 3, which doesn't change. so it is impossible to change everything to 0 mod 3. (all the colors have to have the same number in order to have everything become one color). I am not sure if I am going in the right direction or if this is the right proof. | I am trying to understand the solution to the below puzzle There are 13 Red, 15 Green, and 17 Blue Chameleons at some point of time. Whenever two Chameleons of the different colors meet both of them change their color to the third color. Is it ever possible for all Chameleons to become of the same color? I am able to figure out "manually step by step" that it is not possible to get all in one color. However I don't understand the more formal solution using the modulo, for example Solution 1 . I realize that after every change the differennce between the second and first terms is -3, 0 or 3. What are the vectors (2,2,2) representing? I don't understand the final statement there: We see that, with the initial vector (1, 0, 2) modulo 3, the only possible combinations of colors on the island are (1, 0, 2), (0, 2, 1), and (2, 1, 0), and these occur cyclically with period 3. Can anybody explain in simple way this solution to the problem? |
I've been playing long enough to get most weapons that don't require research. Since I don't have anyone to play with and don't want to go out searching for a clan, I guess I'm going to have to do this alone. How expensive (credits/forma/platinum/other resources) is it going to be to start a clan and build enough Dojo facilities to start researching new stuff? Are there any maintenance costs or tasks that I need to be aware of after the Dojo is built? | Is it possible for an one-or-two-person clan to build a dojo? If so, what are the resources involved? I'd like to experience the whole Dojo building experience so I don't plan to join an existing Clan with a dojo already. |
I have a directory under C:\Users\myuser\.ssh and I need to delete it but Windows won't let me. From Windows Explorer: From a Cygwin shell: myuser@mymachine /cygdrive/c/Users/myuser/.ssh $ rm -rf id_rsa rm: cannot remove `id_rsa': Device or resource busy Any ideas how to force this deletion? | On Windows XP, when I try and delete a specific file it says: Cannot delete blah.blah: Make sure the disk is not full or write-protected and that the file is not currently in use. How can I go around this warning and delete it anyway? |
Read this sometime in late 1980s / early 1990s. Survivors of a human vs. robots war are trekking across a barren landscape. They stop at an underground cavern, one of a network established by the human resistance. Only to discover that the food stores have been poisoned by the robots. To be clear, this isn't The Terminator albeit it clearly shares many similarities. | I'm trying to figure out the name of a science fiction novel. In it there were bands of humans which roamed a world. The world was controlled by intelligent robots or mechanized creatures I think. In it the humans all had suits, which produced different smells to warn the humans about different robot/creatures nearby. In it a particular group was hunted by a very intelligent robot/creature and it made them a deal for freedom in a spaceship. I know that they traveled in wastelands for part of the novel but ended up going to a robot/creature city at some point in the novel. Help please! |
Q: Suppose $\varphi$ is a real valued function on $\mathbb{R}$ such that: \begin{align*} \varphi \left[ \int_0^1 f(x) \, dx \right] &\le \int_0^1 \varphi [f(x)] \, dx \\ \end{align*} for every real valued bounded measurable function $f$ on $[0,1]$. Prove that $\varphi$ is convex. My attempt: Consider for fixed $x_1, x_2 \in \mathbb{R}$: \begin{align*} f(\theta) &= \theta x_1 + (1 - \theta) x_2 \\ \int_0^1 f(\theta) \, d\theta &= x_1 \int_0^1 \theta \, d\theta + x^2 \int_0^1 (1 - \theta) \, d\theta = \frac{x_1 + x_2}{2} \\ \end{align*} Plugging this into the inequality given in the problem: \begin{align*} \varphi \left[ \frac{x_1 + x_2}{2} \right] &\le \int_0^1 \varphi [\theta x_1 + (1 - \theta) x_2] \, d\theta \\ \end{align*} From here, I'm stuck. If I can show the midpoint property: \begin{align*} \varphi \left( \frac{x_1 + x_2}{2} \right) &\le \frac{\varphi(x_1) + \varphi(x_2)}{2} \\ \end{align*} I know proofs from there that $\varphi$ is convex. But I don't see how to get that. | Suppose $\varphi:\mathbb{R}\rightarrow\mathbb{R}$ and for all bounded measurable $f$, $$ \varphi\Big(\int_0^1fd\lambda\Big) \le \int_0^1\varphi(f)d\lambda $$ I'm asked to prove that $\varphi$ is a convex function. I have no idea how to even begin, only idea I've had is to try to suppose that $\varphi''(x)<0$ for some $x\in(0,1)$ but then I haven't got a clue. |
My Windows app has a C# part and a C++ part. The C# app shows a console window when it's ran. The C++ code is compiled into a DLL which is used from C# via P/Invoke. The problem is that printing text from the C++ DLL via std::cout doesn't print anything. Printing from C# works fine. I suspect C# has taken over the console, so C++ can't get a handle to it. The fix might be to get a console handle from C#, pass it over to C++, and use it to connect std::cout to the console window. But I don't know how to go about doing that. Any ideas? Edit: My C++ code is unmanaged. | I have an application which is a relatively old. Through some minor changes, it builds nearly perfectly with Visual C++ 2008. One thing that I've noticed is that my "debug console" isn't quite working right. Basically in the past, I've use AllocConsole() to create a console for my debug output to go to. Then I would use freopen to redirect stdout to it. This worked perfectly with both C and C++ style IO. Now, it seems that it will only work with C style IO. What is the proper way to redirect things like cout to a console allocated with AllocConsole()? Here's the code which used to work: if(AllocConsole()) { freopen("CONOUT$", "wt", stdout); SetConsoleTitle("Debug Console"); SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED); } EDIT: one thing which occurred to me is that I could make a custom streambuf whose overflow method writes using C style IO and replace std::cout's default stream buffer with it. But that seems like a cop-out. Is there a proper way to do this in 2008? Or is this perhaps something that MS overlooked? EDIT2: OK, so I've made an implementaiton of the idea I spelled out above. Basically it looks like this: class outbuf : public std::streambuf { public: outbuf() { setp(0, 0); } virtual int_type overflow(int_type c = traits_type::eof()) { return fputc(c, stdout) == EOF ? traits_type::eof() : c; } }; int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow) { // create the console if(AllocConsole()) { freopen("CONOUT$", "w", stdout); SetConsoleTitle("Debug Console"); SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED); } // set std::cout to use my custom streambuf outbuf ob; std::streambuf *sb = std::cout.rdbuf(&ob); // do some work here // make sure to restore the original so we don't get a crash on close! std::cout.rdbuf(sb); return 0; } Anyone have a better/cleaner solution than just forcing std::cout to be a glorified fputc? |
I am adding HTML to the DOM with jQuery to an existing empty table with class sec_sch like this: details += "<tr>"+ "<td class=\"use\">" + this.name + "</td>" + "<td>" + this.start_year + "</td>" + "<td>" + this.end_year + "</td>" + "<td>" + this.qualification + "</td>" + "<td>" + "<button class=\"rmv\">-</button>" + "</td>" + "</tr>"; $(".sec_sch tbody").append(details); It loads fine but I cannot seem to manipulate the button.rmv from the same JS file with such code. $('.rmv').click(function(e) { console.log(this); e.preventDefault(); alert('hi'); }); // end of remove secondary school please any idea 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 get my data inside my function. However when trying to set the data to my textView it fails. It gives a null pointer exception. But I initialise my textView on top of the page. Anyone has an idea why it gives this error? Process: com.example.dylangomes.parkingxl, PID: 10078 java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.TextView.setText(java.lang.CharSequence)' on a null object reference at com.example.dylangomes.parkingxl.DetailFragment$1.onCallBackRecieved(DetailFragment.java:79) at com.example.dylangomes.parkingxl.Services.ParkingService$3.onResponse(ParkingService.java:113) at com.example.dylangomes.parkingxl.Services.ParkingService$3.onResponse(ParkingService.java:108) at com.android.volley.toolbox.JsonRequest.deliverResponse(JsonRequest.java:65) at com.android.volley.ExecutorDelivery$ResponseDeliveryRunnable.run(ExecutorDelivery.java:99) at android.os.Handler.handleCallback(Handler.java:769) at android.os.Handler.dispatchMessage(Handler.java:98) at android.os.Looper.loop(Looper.java:164) at android.app.ActivityThread.main(ActivityThread.java:6540) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767) This is my function public class DetailFragment extends Fragment { private String titleText, addressText; private int freePlacesText; private TextView title, freeplaces, address; private ParkingService parkserv; @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { // Inflate the layout for this fragment View fragmentView = inflater.inflate(R.layout.fragment_detail, container, false); title = fragmentView.findViewById(R.id.title_view); freeplaces = fragmentView.findViewById(R.id.freePlaces); address = fragmentView.findViewById(R.id.address); return fragmentView; } public void setId(int id) { Log.d("Set id function called", "FUnction called"); parkserv = new ParkingService(getActivity()); parkserv.getParkingLotsById(id); parkserv.setApiCallBackObject(new APICallBackListenerObject() { @Override public void onCallBackRecieved(JSONObject jsonObject) { Log.d("Getting into OnCallback", "OncallBack"); final Gson gson = new Gson(); final Type type = new TypeToken<ParkingLots>() { }.getType(); final ParkingLots parkinglots = gson.fromJson(jsonObject.toString(), type); Log.d("ParkingLots", parkinglots.getAddress()); Log.d("ParkingLots", parkinglots + ""); titleText = parkinglots.getTitle(); freePlacesText = parkinglots.getPlacesNow(); addressText = parkinglots.getAddress(); title.setText(titleText); freeplaces.setText(freePlacesText); address.setText(addressText); } }); } } the logs log the data which i expect but it gives an error before i get inside the view and crashes the program | What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them? What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely? |
This is actually part (c) of the original question. Part (a) asks to prove for any $h>0$, we have $\lim_{x\to\infty}\frac{f(x+h)-f(x)}{h}=b$. Part (b) asks to prove if $f(x) \to a$ as $x\to\infty$, then $b=0$. I know how to do (a)(b) using Mean Value Theorem. I think I should use Mean Value Theorem here. For any $x>0$, there exists $c\in (0, x)$ such that $f'(c)=\frac{f(x)-f(0)}{x}$. But as $x\to\infty$, $c$ may not approches to $\infty$. I don't know how part (c) is related to (a)(b). I can't figure out whether I should use the trick of add and subtract or others. | If $f$ is differentiable on $(a,\infty)$, Show that if $f'(x)\rightarrow L$ as $ x \rightarrow \infty$, $-\infty \leq L \leq \infty $ then $ f(x)/x \rightarrow L $ as $x \rightarrow \infty$. Deduce further that if $f(x) \rightarrow M$ as $ x\rightarrow \infty$ , and $ f'(x)\rightarrow L $ as $ x \rightarrow\infty $ then $ L = 0$ For the first part I tried converting $f(x)$ to $F(\frac{1}{x})$ and $x \rightarrow 0$ and then using L'Hospital's rule but I am getting stuck. How do I proceed with this problem ? |
Prove the given identity. $$\left(\sin\frac{9\pi}{70}+\sin\frac{29\pi}{70}-\sin\frac{31\pi}{70}\right)\left(\sin\frac{\pi}{70}-\sin\frac{11\pi}{70}-\sin\frac{19\pi}{70}\right)=\frac{\sqrt{5}-4}{4}$$ Please provide the shortest method possible. I didn't get any idea to start the solution | Prove the given identity. $$\left(\sin\frac {9\pi}{70}+ \sin\frac {29\pi}{70} - \sin\frac {31\pi}{70}\right) \left(\sin\frac {\pi}{70}-\sin\frac {11\pi}{70} - \sin\frac {19\pi}{70}\right) =\frac {\sqrt {5} -4}{4}$$ Please help, I could not gather enough ideas, even on how to get to the first step. I thought of using the transformation formula (from sum to product) but did not find a fruitful result. UPDATE 1.: $\left(-\frac{1 +\sqrt{5}}{8} + \frac{1}{8} \sqrt{14\left(5 - \sqrt{5} \right)}\right)\left(-\frac{ 1+ \sqrt{5}}{8} -\frac{1}{8} \sqrt{14 \left(5 -\sqrt{5} \right)}\right) $, I noticed that Alexis had got to this point. Can anyone explain me how did he get here, with calculations. Please help. Thanks in Advance. |
Trying to find the inverse of the function $y=x!$ for domain restricted to $x>0$. Does this function have an inverse for the given domain? If so, please include methods used for finding the inverse to help further my understanding of the solution. Thanks! | I'm trying to solve hard combinatorics that involve complicated factorials with large values. In a simple case such as $8Pr = 336$, find the value of $r$, it is easy to say it equals to this: $$\frac{8!}{(8-r)!} = 336.$$ Then $(8-r)! = 336$ and by inspection, clearly $8-r = 5$ and $r = 3$. Now this is all and good and I know an inverse function to a factorial doesn't exist as there is for functions like sin, cos and tan etc. but how would you possibly solve an equation that involves very large values compared to the above problem without the tedious guess and checking for right values. Edit: For e.g. if you wanted to calculate a problem like this (it's simple I know but a good starting out problem) Let's say 10 colored marbles are placed in a row, what is the minimum number of colors needed to guarantee at least $10000$ different patterns? WITHOUT GUESS AND CHECKING Any method or explanation is appreciated! |
I have a Drupal 8 (served via Apache) site with clean URLs enabled, however, I'm having an issue where every page is accessible over two URLs, for example example.com/index.php/example and example.com/example. I would like to redirect the URLs containing index.php to the other URL. I'm also open to suggestions to completely disable pages being served over the first type of URL. | I have a Drupal 8 site with clean URLs. Recently, URLs are similar to example.com/index.php/page-url-alias. The page still loads correctly, but I don't want the index.php part to be indexed. If I empty the cache, the URLs are shown correctly. How can I force Drupal not to add index.php in the URLs it generates? |
Let $f: \mathbb{R} \to \mathbb{R} $ be a differentiable function. Is it true that $f$ is strictly increasing on $\mathbb R$ if and only if $f'(x) \geq 0$ on $\mathbb R$ and the set $X = \{x \in \mathbb{R} \,| \, f'(x) = 0\}$ is countable? | The following result is well known: If $f$ is continuous on $[a, b]$, differentiable on $(a, b)$ and $f'$ is non-zero on $(a, b)$ then $f$ is strictly monotone on $[a, b]$. However if the derivative vanishes at a finite number of points in $(a, b)$ and apart from these derivative maintains a constant sign in $(a, b)$ then also the function is strictly monotone on $[a, b]$ (just split the interval into finite number of intervals using these points where derivative vanishes and $f$ is strictly monotone in same direction in each of these intervals). Let's suppose now that $f$ is strictly monotone and continuous in $[a, b]$ and differentiable in $(a, b)$. What can we say about set of points $$A = \{x \mid x \in (a, b), f'(x) = 0\}$$ Can it be infinite? Can it be uncountable? How large the set $A$ can be? |
I am currently writing a document using \documentclass[a4paper]{article} (very classic, good and all). But I want to change it to a continuous page, a bit like a TP roll. Any idea how? | Well, may be this is not really useful, but I've thought if it was possible to put all the document in one long page. I mean, if your document is going to be read in a computer, mix all the pages in a continuous page. If your document has 90 pages (A4), where each one is 21cm by 29.7cm the continuous document should be (more or less) one page which is 21cm by 90 · 29.7 = 2673cm. Is this possible? EDIT: Some things I would like to achieve: The \newpage, \chapter{}, \part{}, etc. shouldn't go to a new page, they should only add more vertical space. The package pdfpages should add the pages continuously with almost no space between them. The titlepage, in this case, has a different color, so it could go alone in a basic A4 page (just to make things easier). Question Is this possible? |
I read an article about C++ language. There is lines using "^", not XOR. Sample code is like: array<String^>^args = System::Environment::GetCommandLineArgs(); | I just came across this code and a few Google searches turn up no explanation of this mysterious (to me) syntax. Hashtable^ tempHash = gcnew Hashtable(iterators_); IDictionaryEnumerator^ enumerator = tempHash->GetEnumerator(); What the heck does the caret mean? (The gcnew is also new to me, and I asked about that .) |
I'd like to assign hotkeys to certain actions, like for example "Extrude Individual Faces"? Is there a list of all possible commands somewhere? For example, in this picture "view3d.edit_mesh_extrude_move_normal" is the command or function. So where can I find a list of all possible commands so I can assign hotkeys to them? | I want to create a list with everything the spacebar operator search can produce. Is that possible? |
Since rendering breaks up an image into separate chunks for each thread, would it be possible to offload some of those threads into the network and have other machines do the work? | I'm working on architectural visualisations, and I can't imagine more useful feature. How render farms for rent do that? |
Is it possible to restore files/directories which are deleted from terminal using rm and rm -r?. If a file is deleted from graphical interface, it could be restored from trash, but how do you restore a file if it is removed using the rm utility?. | I would like to know if there is a command I can issue in a terminal so I do not classically remove (rm) the file, but instead move it to trash (i.e. Nautilus Move to Trash behavior). In case there is such a command, I would also be interested in knowing what it is. |
In my product am using a modeless dialog box with “OK” and “Minimize” button. Where I can place these buttons on the Top Left or Top Right? If I place on the Top Left it shows am focused only on the Mac Users. Is there any standards? | In most windows desktops the minimize, maximize and restore buttons for a window are placed in the windows decoration on the top right. However, MacOS and now Gnome in Ubuntu have placed those buttons on the left. What is the important aspect when deciding where to place them? Is user expectation from previous experience the most important aspect, or are there other independent aspects that relate to where the user would first look automatically? Is there a difference for localizations where the letters are written from left to right, or from right to left? |
I want to decrement timeleft using an interval like this: function timerStart(){ let timeleft = 14; timer = setInterval(function(){ timeleft -= 0.1; console.log(timeleft); }, 100) }; timerStart(); The output is: 13.9 13.8 13.700000000000001 13.600000000000001 13.500000000000002 13.400000000000002 13.300000000000002 13.200000000000003 13.100000000000003 13.000000000000004 12.900000000000004 12.800000000000004 12.700000000000005 ... I don't understand why I get those extra decimals cause I simply have timeleft -= 0.1;. The desired result is: 13.9 13.8 13.7 13.6 13.5 13.4 13.3 13.2 13.1 13.0 12.9 12.8 12.7 ... Why this happens and how to fix this? | Consider the following code: 0.1 + 0.2 == 0.3 -> false 0.1 + 0.2 -> 0.30000000000000004 Why do these inaccuracies happen? |
Is there any difference at all between these two sentences? Why would a native speaker choose one over the other? a) She had suffered from asthma when she was very young. b) She suffered from asthma when she was very young. Thank you. Nawee | I noticed that my American friends tend to use the past perfect form when they use the verb mention in its past form, almost despite of the context of the sentence. I hear them say "you had mentioned" a lot more often even in situations where the use of simple past would have been perfectly fine. Have you noticed it too and is it one of those unwritten rules, or is there a more formal explanation to it? It seems like there was more verbs like that, but I am having a hard time remembering it now. If I do, I will edit the post and likely change the title to accommodate other verbs. |
If you think the title of this question sounds hilarious, you aren't alone, but that's what's happening. I've built a large complex shape (crude description, I know), and now find out that I can only view it from certain angles and certain distances. If I zoom out too far it vanishes, just as if it was passing through a pressure curtain to another world. The object is generated entirely using python code. | I'm having an odd issue - When I try to zoom in on a detail using my MMB, the "camera" in the 3D view seems to be cutting off the exterior surface of my object and showing me the inside instead. I'd expect this behavior, but only when I was much more zoomed in. If I zoom out a bit (one click on the scroll wheel) then I can see the exterior as I intend. Is there any way to adjust this behavior? Thanks! |
There are lots of questions tagged that don't have a response. How do we interpret this? Is it because they are declined by default? We just have to wait for a response (the team is very busy)? Is Jeff the only one that reviews this questions? I suppose the ones that have negative votes may (or may not) be declined by default, but there are quite a few with some to a lot upvotes that should have an official answer. | I'm not too familiar with status-tracking in general, but it seems tags exist to cover all states of these questions: -deferred, -bydesign, -planned, -declined, -completed, -review; -norepro, -reproduced. Yet not every feature-request or bug question has one of these collectively inclusive tags. So... why not? Is it just a matter of convenience? What does the default state of having no status tag mean? That it is just a bad question? Or that there's no consensus yet? |
A friend of mine who is an official teacher, applied for a visa to Germany and got refused because of the motif #2 saying: The purpose and conditions of the intended stay have not been established The file was full of papers, the original invite from her son in law was in the file, and even a high amount of money in the bank account. What is extended explanation of this motif and how can she pass it in her next apply. | Schengen refusal formulae can be difficult to understand sometimes. When an applicant receives a refusal with "Justification for the purpose and conditions of the intended stay was not provided", what does it mean? |
So I’m achievement hunting Skyrim, on my best save, I have 10/15 daedric artifacts needed for “Oblivion Walker”. So I don’t want to make a new build, but for the quest “Pieces of the Past”. I need Silus Vesuius alive, I kind of killed him right when I got the quest, thinking I could just take Mehrunes Razor for myself. Well I just realized (42 levels later) that you can’t do that. Is there anyway to get the Razor without starting from scratch? | I am playing through Skyrim on the Xbox 360 and have 49/50 achievements competed. Earlier in the game, to gather a 1000 gold bounty in every city, I went into Dawnstar and slaughtered the first few guards I saw. Without realizing it, my companion killed the leader of the museum. My last achievement, "Oblivion Walker", was to complete 15 Daedric quests. I completed 14/15, and then saw that I still had "Pieces of the Past". I went to try and start the quest, but was unable to. I searched through Dawnstar, but could not visit the measure any longer. Do I need to restart my game from a previous save before my companion slaughtered the museum leader? If so, do I need to have all 15 done at the same time, or will I get the achievement upon completion of that quest? |
I'm very new to scripting in blender, and I'm making an addon to simplify the depth of field process in Blender. I would like to put a slider in my ui panel to control the camera's aperture. I think I need to use a .prop function but I'm not sure. Can I have some help with this? Here is the code for my ui panel: def draw(self, context): layout = self.layout camera = bpy.data.objects['Camera'] row = layout.row() row.label(text= "Focus", icon = "CAMERA_DATA") row = layout.row() row.operator("object.add_focus") row = layout.row() row.operator("object.remove_focus") row = layout.row() row.prop(camera, "dof.aperture_fstop", slider=True) The last line is the one I don't know how to do. Here is what my UI panel looks like so far: Thanks! | So if I have this custom panel in the 3D view, is there a way I can take a property from for example the properties window and paste it onto my panel below the "text" prop, without creating a new property? The reason I do not want to create a new property is because I want them to share all data, such as values, keyframes, drivers etc. bl_info = { "name": "", "description": "", "author": "", "version": (0, 0, 1), "blender": (2, 70, 0), "location": "", "warning": "", "wiki_url": "", "tracker_url": "", "category": "" } import bpy from bpy.props import (StringProperty, BoolProperty, IntProperty, FloatProperty, FloatVectorProperty, EnumProperty, PointerProperty, ) from bpy.types import (Panel, Operator, AddonPreferences, PropertyGroup, ) class inouse_Settings(PropertyGroup): my_bool = BoolProperty( name="Enable or Disable", description="A bool property", default = False) class UV_OT_my_panel(Panel): bl_space_type = 'VIEW_3D' bl_idname = "UV_OT_my_panel" bl_label = "Custom" bl_category = "Custom" bl_region_type = 'TOOLS' def draw(self, context): scn = context.scene mytool = scn.inhouse layout = self.layout col = layout.column(align=True) row = col.row(align = True) row.prop(mytool, "my_bool", text="Text") def register(): bpy.utils.register_module(__name__) bpy.types.Scene.inhouse = PointerProperty(type=inouse_Settings) def unregister(): bpy.utils.unregister_module(__name__) del bpy.types.Scene.inhouse if __name__ == "__main__": register() |
I have list = [1,0,1], but each number in the List are of type String. I do if ( String.join("",list) == "101"){ return true } As you can see, these to Strings are equal but it won't return true. | I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug. Is == bad? When should it and should it not be used? What's the difference? |
I read in some places on the 'net that the dipthong/digraph æ is pronounced like the "a" in "cat." But all the words I know that contain that word pronounce with the tongue more forward, closer to a short "e." "Aesthetic," Encyclopaedia," "archaeology." I would go so far as to say it is not so far from the long "a" as in "day." Can someone clear this up, using language for a non-linguist (someone who would generally not know a digraph from a dipthong, which I had to look up)? I am hoping it is a little more cool and "European" than just "cat." | The Encyclopædia Brittanica still uses the symbol "æ". However, I still hear everyone pronounce it as "Encyclo pee dia", when their spelling suggests more along the lines of "Encyclo pah dia" or "encyclo pay dia". In a more general sense, should æ or Æ always be pronounced as a long e sound? When I see it used, it is in dæmon, æther, or æon. makes it clear that they should be pronounced with another sound along the lines of ah or eh... confusing because I want to pronounce it as "ai" or "ay". Given the name "Aion" as a recent videogame, and the common pronunciation of a CS mailer-daemon as "Daymon", clearly others behave the same way. The problem lies in that æ used to be pronounced as ah/eh, and now seems to be pronounced as ay. Encyclopædia is the only exception... being pronounced as ee? How do I pronounce it when seen in English? ee, ay, or ah/eh? |
I have run following code. I expected that elements of list c will not refer to a, but be a copy os list a, but the result contradicts. Why? >>> a = [[]] >>> b = a *3 >>> c = a[:] *3 // should create a copy of a three times >>> b[1].append(6) >>> b [[6], [6], [6]] >>> c [[6], [6], [6]] // but it is referring to a | I needed to create a list of lists in Python, so I typed the following: my_list = [[1] * 4] * 3 The list looked like this: [[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]] Then I changed one of the innermost values: my_list[0][0] = 5 Now my list looks like this: [[5, 1, 1, 1], [5, 1, 1, 1], [5, 1, 1, 1]] which is not what I wanted or expected. Can someone please explain what's going on, and how to get around it? |
Hi guys got a problem with a database. I've been asked to perform some indexing and delete queries on a live database, so first of I wanted to get the database to our dev server so I can test out some things before I commit to live. Unfortunately the dev is SQL Server 2008 and the live is SQL Server 2012. So I've had to try and downgrade the database. Database is a lovely 33gig. and I've started to use the generate script wizard to create a 2008 version. Problem is it gets so far then errors on random tables. So far I have no idea what to do to solve the issue. In the advanced settings of the wizard I select schema and data (yup going to be huge) Error is due to my pc running out of disk space. I have a problem, how do I recreate this DB in 2008 that's both fast and easy? generating the script like that hasn't worked. Open to ideas guys! | Database files that are built using SQL 2008 are not compatable with 2005. Is there a work around? |
I want to check whether string below contains top/ TOP/toP/ Top/TOp/ Top in c#. My code is like string str = null; str = "CSharp Top11111 10 BOOKS"; if (str.Contains("top") == true) { Console.WriteLine("The string Contains() 'TOP' "); } else { Console.WriteLine("The String does not Contains() 'TOP'"); } But it return true only when my string contain 'top'. How can return true for all other scenarios too? I know this may be simple, but I searched a Lot didn't find any solutions | Is there a way to make the following return true? string title = "ASTRINGTOTEST"; title.Contains("string"); There doesn't seem to be an overload that allows me to set the case sensitivity.. Currently I UPPERCASE them both, but that's just silly (by which I am referring to the issues that come with up- and down casing). UPDATE This question is ancient and since then I have realized I asked for a simple answer for a really vast and difficult topic if you care to investigate it fully. For most cases, in mono-lingual, English code bases answer will suffice. I'm suspecting because most people coming here fall in this category this is the most popular answer. answer however brings up the inherent problem that we can't compare text case insensitive until we know both texts are the same culture and we know what that culture is. This is maybe a less popular answer, but I think it is more correct and that's why I marked it as such. |
I am trying to write a program that creates a file (if it doesn't exists yet) and then writes a text in it. My code looks like with open(("test_program/files/{}.txt").format("houses"), 'w+') as f: w = csv.writer(f) w.writerow([('This is the file with houses')]) But I get the error FileNotFoundError: [Errno 2] No such file or directory: 'test_program/files/houses.txt' I am using python 3.6 | What is the most elegant way to check if the directory a file is going to be written to exists, and if not, create the directory using Python? Here is what I tried: import os file_path = "/my/directory/filename.txt" directory = os.path.dirname(file_path) try: os.stat(directory) except: os.mkdir(directory) f = file(filename) Somehow, I missed os.path.exists (thanks kanja, Blair, and Douglas). This is what I have now: def ensure_dir(file_path): directory = os.path.dirname(file_path) if not os.path.exists(directory): os.makedirs(directory) Is there a flag for "open", that makes this happen automatically? |
I want to crop same portion, say rectangular areas from multiple image files which are located at same place in all files. Is there anyway to do it in GIMP? and I also have to do it regularly. Can I save a template for this action. I've read .I don't know if it is the same problem or not | I have several pictures that are exactly the same except for some small variations. It was one picture that was photoshopped in several different ways. Now, I need to crop them all (13 in total) but I need to crop exactly the same part of it. It needs to be pixel perfect. How do I do that with Pixelmator? |
I am starting to develop for all three major mobile platforms (Android, iOS, and Windows UWP), and have run into a UX issue a few times. Each platform has it's own design guide. Android has Material, Windows has Metro (I'm not sure what iOS's is called). Each design looks really good on its platform and only its platform. For example, Material looks beautiful on Android, but it would seem odd on iOS. Now, I would like to follow these guidelines, and design per platform, but I feel that users would like it better if the app had a consistent design across all platforms. Furthermore, I also develop web apps, and since the web has no real "design guide", I would have to make yet another design. I could choose one design and make it universal across all platforms, but I feel like I would be performing some sort of "bad practice" to not use Metro and Material, and so on (plus, it may end up being harder to design and might look out of place). In this scenario, what should I do? Use native styles for the different platforms, or create a single style, to be used across all platforms. | I'm not completely new to developing apps, but I'm at a point where I'm trying to develop something and deploy it on several mobile platforms. To only concentrate on two major ones, suppose I'm developing an app for Android and iPhone and designing UI and the general user interaction architecture. Both platforms give guidelines as to how their UIs should work. For example, most iPhone apps have the Navigation Bar (the one that says Testing 1 and has a Back button) and an Icon Bar for navigating a program, while Android uses an Options Menu fetched via a Menu button and the "back" navigation is handled with the physical Back button on the device. I've seen many apps that try to force the same UI on every platform. For example, custom-building an iPhone style Icon Bar and putting it in their Android apps, but it just doesn't quite look right to me and it feels like it violates UI design guidelines somewhat. Are there any good design patters for implementing something sufficiently similar on both platforms, yet still platform-specific enough so that the user would not feel out of their comfort zone? What do people usually do in these situations? |
The Distributive Law is that $(a+b)c = ab + bc$ and that $a(b + c) = ab + bc $. I'm wondering whether there is a proof of why it is true? I know it's a logical statement and a law, but Bertrand Russell and Alfred North Whitehead did prove that $1 + 1 = 2 $. | I have always taken these kinds of things for granted. Well of course $a(b+c)=ab+ac$! But why? The thought randomly popped in my head, and I realized that I could not prove it. Perhaps we should take some time to prove these "obvious" things. I feel like if I cannot prove it, then I do not fully understand it. I would really like a proof of this most basic law, because I have been pondering over it for quite a while. Thanks! Edit: This proof is for real numbers. |
In recent months, my electricity bill has been steadily going up, from 20% to 40% to, now, 100%. It's doubled. I don't see any appliance running continuously except several ceiling fans. All my appliances are regular, meaning what one would find at home, such as fridges, cooktop, water heater, oven, lights, etc. There is a pool pump I turn on and off daily. Where should I start to tackle the problem? I have divided this problem into two categories: house appliance problem and meter problem. I'd like to see if this is appliance problem first and deal with the meter separately. The meter is read monthly on the 20th. So, the bill jump is real, not estimated. | This might be subjective, I don't know. However, it's a serious problem for me. My electrical bill is outrageous. It's three times as large as my next-door neighbor, and four or five times the size of my neighbor's across the street. It's worse in the summer (I live in central TX), but I've had the air conditioner inspected, and while the house is right at the maximum capacity for our unit, the unit should still be able to take care of the load. That also doesn't explain why our winter bills are larger than the comparables. What I would like to do is check the amount of current drawn by each running appliance and calculate where all my money is going. I just don't know how to go about doing this. |
so I tried upgrading my Lion os to High sierra and I saw one video on youtube saying that I need to download the El captain in order to update my Macbook Air 2012. After downloading, the installer started to crash and it says that "No packages were eligible for install." I decided to quit the installer but it asked me for a startup disk however there was no option for me to choose from. So whenever I try to restart it, it directly leads me to the installer not allowing me to be back at my screen. Please help me how to fix this thank you very much! | My problem is that my Mac starts up to the "El Capitan" installer. After restarting several times, OS X is still on screen telling me that "no packages were eligible for install". Can someone help please, and can you bear in mind that I’m not technically minded so keep instruction in simple terms. |
The description has this to say: A sorcerer casts arcane spells drawn primarily from the sorcerer/wizard spell list. She can cast any spell she knows without preparing it ahead of time. To learn or cast a spell, a sorcerer must have a Charisma score equal to at least 10 + the spell level. ... She can cast any spell she knows at any time, assuming she has not yet used up her spells per day for that spell level. As a Sorcerer, you get bonus spells based on Charisma. In my case, I rolled an 18 at the start, invested points at levels 4 and 8, got 2 point for being an Ifrit(racial bonus), and I'm wearing a . This gives me a Charisma stat of 26. The shows I get, among others, a Level 7 and a level 8 spell slot. However, I recently obtained Craft Wondrous Item, which lets me make . Lets's say I craft a Page of , a Level 7 spell. Despite not knowing it, I can do that by taking a +5 on the DC, and taking 10 on the spellcraft Crafting check. Would this allow me to cast Limited Wish? I have a spell slot of the appropriate level (higher, even), and I have the page to make the spell "known" to me. While the answer is the same, this question is different from because that one is about metamagic, and this one is about Page of Spell Knowledge. There will be few if any search queries turning up both questions (and that one certainly didn't show up in the "similar questions" list when I asked this one). | This question is inspired by discussion , about how Heighten Spell works with Reserve Feats. The question that I am asking here deals with whether or not players can cast spells using spell slots for spell levels that they don't have access to yet. I feel like an example would explain this concept best. Take Xylitol, the first-level wizard with an intelligence of 18. He has 5 0th-level spells per day and 3 1st level spells per day from his class. He also has 1 bonus 1st level spell per day from his high intelligence. The table says that he also has 1 bonus spell of each 2nd, 3rd, and 4th levels. The question is this: Can Xylitol cast 1st level spells using the bonus slots for his 2nd, 3rd, and 4th level spells? He clearly can't cast spells that are inherently higher level than 1st, since he can't learn them, but can he cast 1st level spells using bonus 2nd, 3rd, and 4th level slots? This has come up on these boards before, . What I'm looking for here is a clear rules citation that clarifies this one way or the other. The wording in the section on ability scores makes it quite clear that characters cannot cast spells that are actually higher level than their class allows them to cast, but it is not clear that these higher level slots are barred until the appropriate spell level is unlocked. If a character has access to a spell level that they can't use because their ability score isn't high enough, they can freely use those slots for lower level spells, so why can't they use their bonus spell slots for lower level spells? As KRyan's answer says, the Basics section covers this. Based on questions and comments both here and elsewhere, that section seems to be worded ambiguously enough that it's caused confusion. I'd like to find another, more clear wording to this rule if at all possible. Answers from either D&D 3.5 or Pathfinder are acceptable, but please note which one your answer applies to. N.B. I'd like to note that I personally don't feel that players should have access to higher level slots like this. There are a large number of locations where it's heavily implied that this is not the case, but I feel that finding a clear rules citation here would be helpful. I can't find one that is clear for either interpretation here. |
I saw that the user had self-answered by editing the question. I pointed out that they should really answer the question. I know they wouldn't be able to straight away, but I assumed they'd tried and got the "you need to wait a bit" prompt. However, what I didn't realise was that the message says: Oops! Your answer couldn't be submitted because: Users with less than 100 reputation can't answer their own question for 8 hours after asking. You may self-answer in 7 hours. Until then please use comments, or edit your question instead (my bold). Should we really be suggesting that people put the answer in the question even as a temporary measure? What's the next step for this? Is there any agreement that this phrase should be removed? If there is how do I turn it into a feature request without asking a new question? Should I just ask a new question which is a feature request? | It's not uncommon to find new users editing or commenting on their questions with something along the lines of "Update: I solved it by Xing the Y with Z" instead of posting their solution as a self-answer. This is an ongoing issue that I think isn't helped by the 8-hour delay for new users (<100 rep) between posting a question and self-answering. This delay has been in place , though not having encountered it personally, I only learned of it this morning. The message shown to new users attempting an early self-answer is: Oops! Your answer couldn't be submitted because: Users with less than 100 reputation can't answer their own question for 8 hours after asking. You may self-answer in [ N ] hours. Until then please use comments, or edit your question instead. Emphasis mine. So, what action is this message specifically recommending? Before you answer, make sure you've got your "new user" hat on, because only new users are seeing this message at all. And when they see this message, it's because they clicked the "answer" button, which - despite its frequent misuse - suggests that they may actually be trying to answer the question. So it should come as no surprise when a well-intentioned new user : The error message from Stack Exchange told me to try just editing my question to include my answer... The purpose of the feature is explained (or intuited) at greater length in , which notably includes the following: If you want to respond to another user's answer in order to to ask for clarification or additional help, you should leave a comment (new users can always comment on their own questions). If someone asks you for additional information, you should edit your question to include that information. That's a good explanation. It's clear, brief and identifies specific uses of comments and edits. If prompt self-answering is a trigger for the system to step in, apply the brakes and deliver some important knowledge and if we've identified this as an opportunity to educate new users, that's the type of message they need to see - not something akin to: Oops! You couldn't drive that nail because: Users who have built fewer than 10 birdhouses can't use the hammer for 8 hours after opening their Acme Birdhouse kit. You may drive a nail in [ N ] hours. Until then please use the screwdriver or chisel instead. So here I am, just back from the hardware store with a bag full of nails, and that screwdriver looks pretty sturdy... I'm not the first to point this out as potentially confusing; Benjamin Gruenbaum said much the same thing in a nice answer last year to : A user reading this might understand "You should edit your question instead of posting a self-answer". I think a better phrasing is needed. Well, Benjamin, I agree - so here's a feature request. Let's revise this message so that it doesn't mislead new users into thinking that self-answers are ever appropriate to leave as comments or edits to the OP. |
I am currently shell scripting and I would like to know how to make a - option while making a function. When you would execute a command similar to the following: test -f Here is the function I am using: function test() { echo $1; echo $2; } How could I add a -t for echo twice option? Input: test -t Hello Output: Hello Hello I am using iTerm and oh-my-zsh. Thanks, base2101 | I wish to have long and short forms of command line options invoked using my shell script. I know that getopts can be used, but like in Perl, I have not been able to do the same with shell. Any ideas on how this can be done, so that I can use options like: ./shell.sh --copyfile abc.pl /tmp/ ./shell.sh -c abc.pl /tmp/ In the above, both the commands mean the same thing to my shell, but using getopts, I have not been able to implement these? |
If we have $\Sigma\frac{1}{n}$, why do we say it is divergent? Yes, it is constantly increasing, but after a certain point, $n$ will be so large that we will be certain of millions of digits. If we continue to let $n$ increase, we will end up with a number so large in the denominator that there will be an infinite amount of digits locked into place. What we would have left would just be an irrational number, correct? $\pi$ is an irrational number, but we still consider the value of that to be know. The common estimation of $\pi$ is 3.141592, and we can calculate it past 1,000,000 decimal places, so why can we just assume that we know the first few million places of the harmonic series, slap an irrational label on it, and call it a day? After all, the series $\Sigma\frac{1}{n^n}$ is convergent, and it basically does the same thing, it just gets there a lot faster. I feel like argument has probably been made before, so I feel like there's probably a proof somewhere proving me wrong, if someone could point me to that. | Can someone give a simple explanation as to why the $$\sum_{n=1}^\infty\frac1n=\frac 1 1 + \frac 12 + \frac 13 + \cdots $$ doesn't converge, on the other hand it grows very slowly? I'd prefer an easily comprehensible explanation rather than a rigorous proof regularly found in undergraduate textbooks. |
In my model, I find when I set weight decay to 1, and get the best result in validation set and testing set. However, setting high weight decay means keep the weights low, and the most models set it to 1e-4 or smaller. Is it reasonable to set the weight decay value to 1? | I am using the ADAM optimizer at the moment with a learning rate of 0.001 and a weight decay value of 0.005. I understand that weight decay reduces the weights values over time and that the learning rate modifies to weight in the right direction. Does it makes sense to have a higher weight decay value than learning rate? Or will the weights go faster to zero, than that they learn? |
Assuming there is no huge visible fungus, inside, how to verify whether the second hand lens is affected by spores? It is said that spores don't die and fungus may regrow. Also it is said that if we keep fresh lens with infected lens, fungus will spread. Assuming it has tiny fungus, will it still spread if I keep it in hygienic conditions? How to verify whether the invisible/removed fungus in the second hand lens is dangerous? What are the signs that the white particles inside the lens are just dust and not fungus? Basically I want to understand how to identify fungus when it doesn't look very obvious. | I bought a used Sigma lens on ebay for my back up camera and it was said to be in "mint" condition. I got it today and look it out of the box to look at it and I was horrified to see that the front glass looks like it has frost inside it! Is this fungus? I have never had or seen fungus before. If this is fungus can it contaminate my camera or infect my other lens if I switch them out? |
I have a small problem with my blender lately. I want to make some compositing with my compositing nodes but the problem is, blender won't show me the preview Image. I have a Screenshot for you guys. The preview Image itself is enabled, but it just won't show. Thanks for your help in advance! -Marten | In a brand new project, I'm getting a white "X" instead of the backdrop preview. I can only find one reference to this online, with no solution given. I'm very new to the compositor, so apologies if I'm missing something obvious, tutorials give the impression that it "just works". As a side note, I'd love to get these per-node previews shown in the video on the left, which I also can't find in the docs. Cycles engine and "Blender render" have the same problem. Rendering normally or with the "Rendered" viewport shading works fine. Thanks in advance! |
I'm really new in Ubuntu. I never used it before. Any time I face any kind of problem of needing I hit google bar and I get solution from askubuntu.com. But this time I failed to find solution of equalizer for Ubuntu 17.04 Isn't there any?? :( | What I am looking for is to have system wide implementation of sound enhancements like bass boosts, echoes, Fidelity, Stereo enhancement and so on. Audio Video players have their own equalizer but they enhance only the audio / video files they are playing. So to enhance sounds playing such as: YouTube, Spotify, System Sound, etc. I need a enhancer software. Back in Windows, I used to use SRS HD audio lab to do the same. P.S. I have a horrible Speaker set. |
Prove that the following statements are equivalent. (a) $\lim_{x\to a}f(x)$ exists (b) Given $\epsilon \gt 0$, there is a $\delta \gt 0$ such that if $0\lt |x-a| \lt \delta, 0\lt |y-a| \lt \delta$, then $|f(x)-f(y)|\lt \epsilon.$ (a) $\to$ (b) is easy. But I'm having trouble showing $(b)\to (a)$, actually I'm not even sure if this direction is true. My initial thought was that I can prove this by the contrapositive. For some $\epsilon \gt 0$, suppose the limit does not exist at $a$. Then there are some sequences $x_n$, $y_n$ such that they both tend to $a$, but are never $a$, however, $\lim f(x_n)\neq \lim f(y_n)$. Then since $\lim x_n=\lim y_n=a$, we can choose a large enough $N$ such that if $n\ge N$, then $|x_n-a|\lt \delta, |y_n-a|\lt \delta$. Then we get $|f(x_n)-f(y_n)|\gt 0$. However, I realized that I cannot prove that such $x_n$ and $y_n$ exist in the first place. From definition, the function $f$ does not have a limit at $a$ if and only if there exists a sequence $x_n$ with $x_n\neq a$ for all $n\in \mathbb{N}$ such that the sequence $x_n$ converges to $a$ but the sequence $f(x_n)$ does not converge in $\mathbb{R}$. This does not mean that I can find two sequences with different limits from the function values. How can I solve this problem? I would greatly appreciate any help. | How to prove the following theorem? Let $I \in R$ be an open interval, let $c \in I$, and let $f: I-{c} \rightarrow R$ be a function. Then $\lim \limits_{x \rightarrow c} {f(x)}$ exists if for each $\epsilon > 0$, there is some $\delta > 0$ such that $x,y \in I$ and $\vert x-c \vert < \delta$ and $\vert y-c \vert < \delta$ implies $\vert f(x)-f(y) \vert < \epsilon$. I think this needs standard limit definition, sup and inf properties to prove. And I came up with a following scratch of proof: (1) Suppose for each $\epsilon >0$, there is some $\delta >0$ such that $\vert x-c \vert < \delta$ and $\vert y-c \vert < \delta$ implies $\vert f(x)-f(y) \vert < \epsilon$. For each $r>0$, let $A_r$ = $I \bigcap (c-r,c+r)$. Then, for each $\epsilon>0$, there is some $\delta>0$, such that $x,y \in A_\delta$ implies $\vert f(x)-f(y) \vert < \epsilon$. Then I want to show there is some $a>0$ such that $f(A_a)$ is bounded. (2) If $f(A_a)$ is bounded, then for each $s \in (0,a)$, $f(A_s) \subseteq f(A_a)$, and thus $f(A_s)$ is bounded. Define $a_s = \mathrm{glb}~f(A_s)$ and $b_s = \mathrm{lub}~f(A_s)$. Let $A = \{a_s \mid s \in (0,a)\}$ and $B=\{b_s \mid s \in (0,a)\}$. Then we know that A has a least upper bound and B has a greatest lower bound, and $\mathrm{lub}(A) \leq \mathrm{glb}(B)$. Now I want to show $\mathrm{lub}(A) = \mathrm{glb}(B)$ (3) If I could show $\mathrm{lub}(A) = \mathrm{glb}(B)$, let $M=\mathrm{lub}(A) = \mathrm{glb}(B)$, I want to show $\lim \limits_{x \rightarrow c} {f(x)} = M$. Can someone give me some help on how to prove (1) (2) (3), $f(A_a)$ is bounded, $\mathrm{lub}(A) = \mathrm{glb}(B)$, and $\lim \limits_{x \rightarrow c} {f(x)} = M$? Thanks! |
I was watching the TV series The Good Place when I came across this line: Or he's a supernatural demon designed to torture people, who got offered his dream job and has flipped on us like a ten-stone griddle-chip. I have been taught "who" as a relative pronoun should be used right the person it's referring to. However in this case, the word ahead is "people", which confuses me. I have looked into many online sources and could not find the explanation on this. | Is is a rule that relative clauses should be added right after the antecedent(the noun relative pronouns refer to)? What if it is confusing? For example: "I went for a spin with a handsome boy last night." "The handsome boy went out with my friend." "I went for a spin with a handsome boy who went out with my friend last night ." "I went for a spin with a handsome boy last night who went out with my friend." |
I have only had basic classroom experience with physics but I have done a lot of research on my own and I am wondering why a newly formed star or any planetary body composed purely of hydrogen will adopt any state of matter besides its gaseous state. I understand that as you get closer to the core 'gravity increases" but wouldn't the pull from the surrounding atoms negate any effects strong enough to cause a change in state? | I am a bit confused regarding the nuclear fusion that occurs during star formation. For example, suppose there is a huge hydrogen cloud. It gets more mass and therefore pulls in more and more hydrogen, but it could just do this endlessly and get endlessly big. What causes it to stop growing? Is it because of the heat generated by the huge mass? |
Theorem. $|a| - |b| \leq |a - b|$. Are the following two proofs equivalent? Proof I. $|a| - |b|$ $\leq$ $|a| + |b|$ by the triangle inequality. This is equal to $$|a| - |a| - |b|\leq|a| - |a| + |b|$$ which is equal to $$-|b|\leq|b|,$$ which is true. QED. Proof II. Using the trick that $|a| = |a + b - b|$. Then $$|a| \leq |a -b| + |b|$$ by the triangle inequality and moving $|b|$ to the left side gives us $|a| - |b|\leq$ $|a - b|$. Now the first one was my way and the second one was the official answer. Is mine considered wrong because my final statement wasn't the statement they wanted me to prove? If so, how would I know that I needed to use this little algebra trick to start my proof? Or can I just write my proof backwards at least? Just a little confused on some formality, thanks! | Prove $||a|-|b|| \leq |a-b|$ I do it by making 4 cases : Case 1 : $ a \geq 0$, $ b\geq 0$ So we have $||a||-||b|| = |a - b|$ . hence proved Case 2 : $a < 0 , b< 0$ $|-a+b| = |-(a-b)|=|a-b|$ Case 3 $a >0, b<0$ $||a||-||b|| =|a+b| \leq |a|+|b| \leq a -b \leq |a-b| $ Case 4: $a <0 ,b>0$ $|-a+b| = |-(a-b)| = |a-b|$ Is this OK ? Thanks |
I noticed that /var/spool/nullmailer directory contains a weird trigger entity which is displayed in yellow and has a “|” suffix. It doesn't seem to be a directory (at least I can't cd into it), and when I try to open it with vi, the console freezes. What is that thing? | What do the different colours in Ubuntu's ls command mean? For example, when I type the ls command in one of my folders, I get one of the files in light green, the other (which is a folder) in blue with green highlighting. What do those colours mean, and there is any manual about all the colours? |
I am trying to use the package parallel to typeset some text in two languages. The text in language A should appear on even pages, the text in language B on odd pages. I typeset \documentclass{article} \usepackage{parallel} \begin{document} \begin{Parallel}[p]{}{} \ParallelLText{Hello} \ParallelRText{Hallo} \ParallelPar \ParallelLText{Hello} \ParallelRText{Hallo} \ParallelPar \end{Parallel} \end{document} Does anybody know why the parallel package breaks the page after the first \ParallelPar? That is, why do I get 5 pages output instead of 3? Is this a feature or a bug of the package or did I do something wrong? | It's common to set an old play (e.g. Shakespeare) with annotations on the left page and reference information on the right. I don't want to do this for a play, but I would like to set a document with annotations on one page and text on the facing page. The catch is that I want to ensure that the annotations have parallel section spacing, because the length of the annotation may be longer or shorter than the corresponding section in the document, and I don't really want to make it so that you have to switch back and forth between documents. That is, I would like it something like this: +-----------------+ +-----------------+ | Heading | | Heading | | ------- | | ------- | | annotation | | this paragraph | | | | is long | | | | | | Heading 2 | | Heading 2 | | --------- | | --------- | | this annotation | | short paragraph | | is really long | | | +-----------------+ +-----------------+ Does anyone know of a package that can do this, or an alternate way to achieve the objective of lining up the document and annotations? |
If $A$ is any $m\times n$ matrix then $AA^H$ and $A^HA$ are respectively $m\times m$ and $n \times n$ matrix. Then I observed that both the matrix share the same eigenvalue and if anyone has any other eigenvalue, that is $0$. I could not figure out the reason. Thanks in advance for any help. | As a part of an exercise I have to prove the following: Let $A$ be an $(n \times m)$ matrix. Let $A^T$ be the transposed matrix of $A$. Then $AA^T$ is an $(n \times n)$ matrix and $A^TA$ is an $(m \times m)$ matrix. $AA^T$ then has a total of $n$ eigenvalues and $A^TA$ has a total of $m$ eigenvalues. What I need to prove is the following: $AA^T$ has an eigenvalue $\mu \not = 0$ $\Longleftrightarrow$ $A^TA$ has an eigenvalue $\mu \not = 0$ In other words, they have the same non-zero eigenvalues, and if one has more eigenvalues than the other, then these are all equal to $0$. How can I prove this? Thanks and regards. |
I know this has probably been asked before, but I just installed Ubuntu last night and all the replies I read I honestly couldn't understand anything :p I need to make some changes, and all of them seem to use sudo. When I formatted the pc and installed Ubuntu, it asked me for a password and didn't give me a chance, to have no password. So I then went on and removed the password completely, when the pc was on and the installation was complete. I then had to use sudo as I said for a couple things, but it asked for a password. I tried to put the old one, I tried to leave it blank, I also typed NOPASSWD, and other variations of that. Nothing worked. I have rebooted the pc also in between of that so for now I have no idea what to do. Please help, it's really frustrating :( Edit: I am not looking to reset or restore any password. All I want is to not have a password set at all, and to not be asked for one by sudo, when there is none. | Inspired by this .... I am the sole person using my system with 12.04. Every time I issue a sudo command; the system asks for the user password (which is good in its own way). However I was thinking; without activating the root account; how can I execute the sudo commands which will not ask for user password to authenticate. NOTE: I want to execute sudo command without authenticating via password; only when they are executed via terminal. I don't want to remove this extra layer of security from other functions such a while using 'Ubuntu software center' or executing a bash script by drag-drop something.sh file to the terminal. |
Google material guideline use Uppercase in button. Which button do you think is more readable? Yahoo doesn't use UPPERCASE and I find it more readable | While designing for the web or the mobile applications, a natural free flowing text can be used for the general content, but when it comes to actions... can we use CAPITAL LETTERS. |
I know that this very question was asked before (more than once), but the answers don't apply here. was the first and only one given, was accepted with 10 votes, but didn't result in the badge being awarded. The only reason I can see is that the answer needs to be accepted after it gets 10 votes. Is that so? | Formerly List of all badges with full descriptions. What are badge name's requirements? Why didn't I get badge name ? Which badges can I earn multiple times? Jump to: Note: Some badges are awarded based on score. The term score means the total number of upvotes minus the total number of downvotes. Any badge with a *** next to it is one of 20 badges that count towards the displayed on a moderator candidate in an election. The candidate score is a total of 40 points: the first 20 are awarded based on the user's rep divided by 1000 and rounded down; the second 20 represents the total number of unique badges earned of the 20 that count. Note that if the same badge is earned multiple times, it will only count once towards the candidate score. Any badge with a "(retired)" next to it is no longer awarded, but is retained by users who previously earned them. See for more info on what it means for a badge to be retired. Visit the of the on any site to see a complete list of badges that you can filter by earned, unearned, or type. |
I am trying to exclude folders from being searched in for files. It actually works relatively well. My code looks like this: find . -type d -regextype posix-extended -regex "(./Scripts/testfolder)" -prune -o -type f -print My problem is, however, that I would like to exclude all occurences of folder name regardless of path. Basically I want to remove ./Scripts/ part and just ignore testfolder folder, wherever it is. Can it be done by improving the regular expression? When I run: find . -type d -regextype posix-extended -regex "(testfolder)" -prune -o -type f -print, the folder is entered and files are fetched. | I need to exclude .git from my find search. To achive that, I am using the -path ./.git -prune switch: $ find . -path ./.git -prune -o \( -type f -o -type l -o -type d \) | grep '.git' ./.git However, even though this skips the contents of the .git directory, it lists the directory itself. It works when I add -path ./.git -prune -o -print -a find . -path ./.git -prune -o -print -a \( -type f -o -type l -o -type d \) | grep '.git' Why is this necessary. I thought that both commands should have same output. The second syntax is quite ugly. |
Any idea when would 16.04 images be released to AWS MarketPlace? Thanks! | It doesn't seem to be avail on nor I can find any when searching on AWS itself |
For sake of simplicity i chose to use a type 'string' instead of 'char'. But i am supposed to lowercase the string that i read in from the input file. I did not know at the time i would not be able to use 'tolower()'. However i did find a way using 'transform'. But i cannot get it to work and cannot find example of using it with an array of stucts. Please help. And if at all possible i also have to capitalize the first letter(s) of each state so if you could point in in the right direction would be extremely grateful. #include <iostream> #include <fstream> #include <cstdlib> #include <string> #include <algorithm> struct ATdata { string state; double miles; int shelters; }; int readData( ifstream& input, struct ATdata data[] ); size_t readData( ifstream& input, struct ATdata data[], size_t MAX_ENTRIES ); int main() { ifstream input; char filename[256]; ATdata data[14]; int i; cout << "Enter input file name: "; cin >> filename; input.open( filename ); if ( input.fail() ) { cout << "Input file does not exist." << endl; exit(1); } size_t linesRead = readData( input, data, sizeof ATdata data[], size_t MAX_ENTRIES ); input.close(); return(0); } size_t readData( ifstream& input, struct ATdata data[], size_t MAX_ENTRIES ) { size_t i; int j; while ( i < MAX_ENTRIES && !input.eof() ) { ATdata entry; getline( input, entry.state ); transform( entry.state.begin(), entry.state.end(), entry.state.begin(), tolower() ); string nextLine; if ( !getline( input, nextLine ) ) { break; } istringstream iss( nextLine ); if ( !(iss >> entry.miles >> entry.shelters ) ) { continue; } data[i++] = entry; } for ( j = 0; j < 14; j++ ) { cout << data[j].state << data[j].miles << data[j].shelters << endl; } } return i; | I want to convert a std::string to lowercase. I am aware of the function tolower(). However, in the past I have had issues with this function and it is hardly ideal anyway as using it with a std::string would require iterating over each character. Is there an alternative which works 100% of the time? |
I have heard people say for example: You can't do nothing to me is it the same thing as you can't do anything to me If no, what's the difference? I personally think the latter is correct. Would love to hear you guys thought on this. | Possible Duplicate: I'm not a native English speaker, and this question may be very basic, but I want to learn English better, so don't hurt me with downvotes. What is the difference between "I don't know nothing" and "I don't know anything"? Do they have the same meaning or opposite ones? |
When I moved house I set up my computer and when I plugged the power cord in I noticed it was sitting a bit loose but I ignored it. Last night I was on my computer and when I stood up I kicked the power cord. I heard a static sort of sound and now my computer won't turn on. The LEDs aren't glowing and the fans not moving. Do I need to replace the power supply? | My computer powered off the other day on its own, and now when I push the power button, nothing happens. My assumption would naturally be that the power supply is done (possibly well done) but is there any good way to test this before I buy a new one? |
After mentioning TikZ in , I tried to have a look here for recommended editors for TikZ. I found no list, and thus here's the question: What TikZ editors/front-ends do you know? What can you recommend? I guess that what I have in mind is a tool where the image can be edited using an interface similar to , and then it will generate a code snippet in TikZ. For example I know of , but I'm interested in a big list. I am aware of the list available , as pointed by one of the answers to this , but I'm interested in some evaluation of each based on personal experience. I suggest that each tool should has its own answer, this way this will become sort of a poll as well. Probably, each answer should contain at least: pros/cons/platform... | I found to be a useful tool to help generate code for graphs. I suppose there must be other tools to help draw diagrams such as Sets/Venn Diagrams or Electrical Circuits (Logic Gates). Which ones would you suggest? |
Chicago's combined sales tax is 10.25%. So, a subtotal of $18.29 would end up costing $18.29 * 1.1025 = $20.1647, which would get rounded down to $20.16, right? A subtotal of $18.30 would end up costing $18.30 * 1.1025 = $20.1757, which would get rounded up to $20.18, right? Is this correct, given Chicago's sales tax? If it is, what would be a loophole for getting a receipt totaling $20.17? | I am confused about calculating Massachusetts Sales Tax (6.25%). Is there such an amount, that when added to its sales tax, equals $200? The reason I ask is because my business has been charging $200 for things and we said tax was already included. How do I reconcile this? |
Im testing the dynamic changes of ID from dynamically added input fields. price0 ID works but price1 doesnt work. how to fix this? $(document).ready(function() { var max_fields = 8; var wrapper = $(".input_fields_wrap"); var add_button = $(".add_field_button"); var x = 1; var temp; $(add_button).click(function(e) { e.preventDefault(); var i; if (x < max_fields) { x++; i = x - 1; temp = i - 1; $(wrapper).append('<div class="w3-col m1 w3-margin w3-center prices">Price<input class="w3-input w3-border w3-round" id="price' + i + '" name="price[]" type="text"></div>'); } }); $("[type='number']").keypress(function(evt) { evt.preventDefault(); }); $("#price" + 0 + "").on('input', function() { alert('price0'); }); $("#price" + 1 + "").on('input', function() { alert('price1'); }); }); | 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. |
The database I'm working with necessitates that I prepare my sql query with variable column names. How would I go about setting up a query without knowing the column name before hand? Thanks! I've searched around the forums and most answers seem to be for an older version of php that is now depricated. $stmt = $con->prepare("SELECT * FROM Housing WHERE ? = Staten Island"); $stmt->execute($borough); echo $stmt->fetch()[1]; | Why can't I pass the table name to a prepared PDO statement? $stmt = $dbh->prepare('SELECT * FROM :table WHERE 1'); if ($stmt->execute(array(':table' => 'users'))) { var_dump($stmt->fetchAll()); } Is there another safe way to insert a table name into a SQL query? With safe, I mean that I don't want to do $sql = "SELECT * FROM $table WHERE 1" |
What was the reason to call Star Wars actually Star Wars? I am not a native English speaker and in the first years as a child/teenager I only heard/spoke about the german translated movie titles: Krieg der Sterne what literally translated to English should be War of (the) stars. But what should a war between stars emphasize? Is Star Wars just a good sounding synonym for epic space battles or does it have a deeper meaning? And did George Lucas invented the name? | Which wars does the title "Star Wars" refer to? Are they: the struggle between the Rebels and the Empire? the Clone Wars (mentioned as early as the first half hour of A New Hope)? the age-old conflict between Jedi and Sith? the war between good and evil in general? all of the above? none of the above, in which case the title was chosen just to sound cool and/or alluring? When Lucas wrote down the phrase "Star Wars", which events in the Star Wars universe was he referring to, if any? |
I wonder "which quantity" is conserved in relation to a specific symmetry. I guess it is in some meaning simply the generator (in the context of Lie theory) of the symmetry, as it is true for angular momentum (conserved) being generator of rotation (symmetry). I want clear formulation of idea but I can't complete it: Let $M$ be configuration manifold of a classical system. $L(q,\dot q,t)$ it's Lagrangian, $h^s: M\rightarrow M$ a one-parameter group of diffeomorphisms of $M$ which preserves $L$. then $$I(q,\dot q)= \frac{\partial L}{\partial \dot q}\frac{d h^s(q)}{ds}|_{s=0}$$ is a conserved quantity along trajectory $q$. on the other hand $h^s$ produce a flow on manifold and we may denote its vector field by $\frac{\partial}{\partial s}$ which we may call generator of diffeomorphism. so in particular the generator of diffeomorphism along a trajectory $q$ is a vector field along it not a scalar field to could be discussed a conserved quantity or not (for example conserved quantity in relation to rotation be its generator namely angular momentum) you may say by formula of $I$ just act $\frac{\partial L}{\partial \dot q}$ on this vector field to get a scalar field! but why?!! (I mean by which principle?). and then in what meaning $I$ is genarator of $h^s$? | I've had a brief look through similar threads on this topic to see if my question has already been answered, but I didn't find quite what I was looking for, perhaps it is because I'm finding it hard to put words on my question and I hope that you will be able to help me ask it clearly. I'm trying to link what I know from mathematics to what we are writing in physics for Noether's theorem. If I understand correctly we are looking at the symmetries of the action i.e. under which symmetry groups is it invariant. Noether's theorem allows us to calculate a conserved current in the case of a continuous symmetry (Lie groups), by means of so-called infinitesimal symmetries which I believe to be elements of the Lie algebra (so the tangent space to the neutral element) of the Lie group. I'm guessing that if the action is invariant under the symmetry then it's "variation" should be 0 when we vary the system (space-time coordinate, or field) using this symmetry; it is exactly this step that I would like to understand better, how can I formalize this step correctly mathematically? How should I understand this variation, and how does it's calculation give rise to the elements of the Lie algebra? |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.