body1
stringlengths
20
4.1k
body2
stringlengths
23
4.09k
Evaluate the integral $$\int^{\frac{\pi}{2}}_0 \frac{\sin^3x}{\sin^3x+\cos^3x}\, \mathrm dx.$$ How can i evaluate this one? Didn't find any clever substitute and integration by parts doesn't lead anywhere (I think). Any guidelines please?
Calculating with Mathematica, one can have $$\int_0^{\pi/2}\frac{\sin^3 t}{\sin^3 t+\cos^3 t}\,\mathrm dt=\frac{\pi}{4}.$$ How can I get this formula by hand? Is there any simpler idea than using $u = \sin t$? Is there a simple way to calculate $$ \int_0^{\pi/2}\frac{\sin^n t}{\sin^n t+\cos^n t}\,\mathrm dt $$ for $n>3$? Could anyone come up with a reference for this exercise?
Say I have a list my_input_list = [22,33,56,1] and from a variable target_len I want to make (exclusive, sorted) sublists of that length target_len = 2 #my_output_list_not_sorted = [[22,33][22,56][22,1][33,56][33,1][56,1]] my_output_list = [[22,33][22,56][1,22][33,56][1,33][1,56]] or target_len = 3 #my_output_list_not_sorted = [[[22,33,56][22,33,1][33,56,1]] my_output_list = [[22,33,56][1,22,33][1,33,56]] Is there a neat way to do this? I'm OK to sort my_input_list first if needed. Thanks!
I have a list with 15 numbers in, and I need to write some code that produces all 32,768 combinations of those numbers. I've found (by Googling) that apparently does what I'm looking for, but I found the code fairly opaque and am wary of using it. Plus I have a feeling there must be a more elegant solution. The only thing that occurs to me would be to just loop through the decimal integers 1–32768 and convert those to binary, and use the binary representation as a filter to pick out the appropriate numbers. Does anyone know of a better way? Using map(), maybe?
Either that or place a call with the phone app using my Google Voice number. I ported my main number out to Google Voice. I want to be able to make hands-free phone calls from my main phone number on Google Voice, instead of the random phone number I have assigned to my iPhone. Using "Hey Siri" opens the iPhone app, so does Google Assistant.
When I ask Siri (iOS 7.0.4 on my iPhone 5S) to call or text someone, I want said call or text to come from my Google Voice caller ID. Any way to do this now that jailbreak apps GVIntegrated & Phone GV Extension appear to no longer be available (at least for my phone, details below)? All other Google Voice functionality seems to be handled just fine via the Google Voice "standard" app from Google. I've jailbroken said phone searching for a way, with no success. GVIntegrated indeed reads "not certified on this device" and Phone GV Extension doesn't even come up in the search list on Cydia. Phone GV Extension worked well on my iPhone 4S running 5.x (and maybe 6.x), although my iPhone seemed to be a bit less stable (reboot/crashes) in jailbroken mode.
I'm trying to install g++ (with gcc already installed) on my Red Hat Enterprise Linux 6. I've tried the following: $ yum install g++ $ yum install c++ $ yum install gcc-g++ $ yum install gcc-c++ and nothing gets installed. I've also tried: $ yum search g++ $ yum search c++ No hits. What's up?
This question seems to have been asked already. My IT department installed the OS so I don't know how to register it properly but I do have root access. Is there a way to get the same packages using the CentOS repositories maybe? I'd also like to install IceWM but without a compiler I can't even build it myself.
I read an article of the link below: My question is why the subject "Hong Kong protester" in the title has no article "a" and similarly the specific word "China's Communist Party" has no article "the" in front of them, even though those articles are put in front of each word in the body. Would anybody be able to tell me why in this case?
Is there a particular term for the abbreviated language used in headlines (the removal of at least articles and conjunctions)?
I have downloaded the proper driver from the web but every time I try to open, it says not responding or will open in gedit, take forever to load, then say there was an error. In the driver file it's marked as run as program. Am i missing something? I believe I figured it out. .run has to be run through terminal. I tried installing from the terminal and got the following results: ===================================================================== AMD Catalyst(TM) Proprietary Driver Installer/Packager ===================================================================== Detected configuration: Architecture: x86_64 (64-bit) X Server: X.Org 6.9 or later 64-bit loki_setup: directory: (null) Installing package for: Ubuntu/trusty fglrx_14.501-0ubuntu_.deb fglrx-amdcccle_14.501-0ubuntu_.deb fglrx-dev_14.501-0ubuntu_.deb Selecting previously unselected package fglrx-core. dpkg: regarding fglrx-core_14.501-0ubuntu1_amd64.deb containing fglrx-core: fglrx-core conflicts with libopencl1 ocl-icd-libopencl1:i386 provides libopencl1 and is present and installed. ocl-icd-libopencl1:amd64 provides libopencl1 and is present and installed. dpkg: error processing archive fglrx-core_14.501-0ubuntu1_amd64.deb (--install): conflicting packages - not installing fglrx-core Selecting previously unselected package fglrx. (Reading database ... 246099 files and directories currently installed.) Preparing to unpack fglrx_14.501-0ubuntu1_amd64.deb ... Unpacking fglrx (2:14.501-0ubuntu1) ... Selecting previously unselected package fglrx-amdcccle. Preparing to unpack fglrx-amdcccle_14.501-0ubuntu1_amd64.deb ... Unpacking fglrx-amdcccle (2:14.501-0ubuntu1) ... dpkg: dependency problems prevent configuration of fglrx: fglrx depends on fglrx-core; however: Package fglrx-core is not installed. dpkg: error processing package fglrx (--install): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of fglrx-amdcccle: fglrx-amdcccle depends on fglrx; however: Package fglrx is not configured yet. dpkg: error processing package fglrx-amdcccle (--install): dependency problems - leaving unconfigured Processing triggers for gnome-menus (3.10.1-0ubuntu2) ... Processing triggers for desktop-file-utils (0.22-1ubuntu1) ... Processing triggers for bamfdaemon (0.5.1+14.04.20140409-0ubuntu1) ... Rebuilding /usr/share/applications/bamf-2.index... Processing triggers for mime-support (3.54ubuntu1.1) ... Processing triggers for ureadahead (0.100.0-16) ... ureadahead will be reprofiled on next reboot Errors were encountered while processing: fglrx-core_14.501-0ubuntu1_amd64.deb fglrx fglrx-amdcccle fglrx-core_14.501-0ubuntu1_amd64.deb fglrx_14.501-0ubuntu1_amd64.deb fglrx-amdcccle_14.501-0ubuntu1_amd64.deb Cleaning up removed packages Unable to open /etc/ati/control, please reinstall the driver. aticonfig: No supported adapters detected fglrx_14.501-0ubuntu_.deb fglrx-amdcccle_14.501-0ubuntu_.deb fglrx-dev_14.501-0ubuntu_.deb Removing temporary directory: fglrx-install.6hTiyp
I am planning on doing a fresh install of Ubuntu and want to know what is the correct way to install ATI Catalyst Video Driver? There are multiple valid answers for this question spanning over several versions of Ubuntu. For your convenience an index of each below:
"the amount of fun" Is "the" pronounced as "thee" before a schwa?
Although there are rather simple rules determining the pronunciation of "the", native speakers quite often deviate from these rules (including, e.g., TV shows). According to the Longman Pronunciation Dictionary, The EFL learner is advised to use [ðə] before a consonant sound (the boy, the house), [ði] before a vowel sound (the egg, the hour). Native speakers, however, sometimes ignore this distribution, in particular by using [ðə] before a vowel (which is in turn usually reinforced by a preceding ʔ), or by using [ði:] in any environment, though especially before a hesitation pause. Furthermore, some speakers use stressed [ðə] as a strong form, rather than the usual [ði:]. My question is: when native speakers use [ðə] instead of [ði] before a vowel sound, do they do it on purpose or accidentally? If it is on purpose, how do they (typically) decide which pronunciation to use? What is a valid reason to use [ðə] before a vowel sound?
I have a class that I want to call its methods using just strings. How do I do that? class MyClass: def do_something(): print 'MyClass did something' MyClass.get_method('do_something')()
What is the best way to go about calling a function given a string with the function's name in a Python program. For example, let's say that I have a module foo, and I have a string whose content is "bar". What is the best way to call foo.bar()? I need to get the return value of the function, which is why I don't just use eval. I figured out how to do it by using eval to define a temp function that returns the result of that function call, but I'm hoping that there is a more elegant way to do this.
I am trying to explain to my Korean friend in the best way possible, I've got a good idea but am wondering if anyone can give me their perspective on the use of bad and badly here. I want to go to Korea so bad. I badly need to go to the toilet. Note: This is not formal English, but it is heavily used in my opinion and possibly more slang than true language.
Is this correct? That is a real cool answer. I learned that that was incorrect, since "real" is an adjective which can describe a noun, e.g. "real answer" but it is not an adverb which can describe an adjective, "real cool". Instead you would have to say: That is a really cool answer. Since "really" is an adverb.
If Voldemort planned to make 7 Horcruxes and he did not plan for Harry to be one shouldn't there be another one?
Since the magical number is seven for Horcruxes, and Voldemort made Harry unintentionally then there must be an eighth right...??? Diary Ring Cup Locket Diadem Nagini Harry (Does not count because Voldemort did not know that Harry was a Horcrux) ??????
My Ubuntu-encrypted home directory was lost when I changed my user password. This was because I did it from the command line as root. So my user password is no longer linked to my encrypted user data. How do I reunite them?
I am using a cloned hard drive in attempts to restore some old files. The cloned drive has 2 users, one with an encrypted home drive, one without. Both are administrators. When I couldn't get into the main user (with the encrypted home directory), I logged in as the 2nd user and changed the password. It seems that I somehow broke the relationship between the encryption passphrase and the user. I'm pretty sure I have the passphrase. Is there a way to get to the data?
A villager has been kidnapped and brought far from his village, and has been placed into a farm. I hope for him to break and replant potatoes, but he does not break the crops or plant any. Does the farm need to be inside a village? It is a few hundred blocks away from the nearest one.
I have a standard 6 door village with a breeder below it, and to the side I have an auto wheat farm with a villager in it, and it's working great. However, when I tried to build the same farm a bit further, using carrots this time, the villager inside it was just stuck to the wall, in the direction of the village. I later found out that carrots are not the same as wheat as far as villagers are concerned, and the farmer wasn't interested in harvesting the carrots. I put another villager in the farm to see if they will throw food to each other - and they did. But both of them along with the baby villager are stuck in the corner, looking towards the village. Q: Is there any specific distance that villagers need to be from the center of the village in order to behave normally? Thanks
I am trying to refactor a switch statement that is like this: private void Validate(DataTypeEnum dataType, string value, ...) { switch(dataType) { case DataTypeEnum.Number: var typedValue = int.Parse(value); //Validation of typedValue break; case DataTypeEnum.Decimal: var typedValue = Decimal.Parse(value); //Validation of typedValue break; case DataTypeEnum.DateTime: var typedValue = DateTime.Parse(value); //Validation of typedValue break; } } I would like to get rid of the switch statement and somehow replace it with a more object oriented construct. Any suggestions? My ideal would be something like this: private void Validate(DataTypeEnum dataType, string value, ...) { Validate(value); } private void (Decimal value) { //Validate } private void (DateTime value) { //Validate } Is there any elegant way to fix this?
Seeing as C# can't switch on a Type (which I gather wasn't added as a special case because is relationships mean that more than one distinct case might apply), is there a better way to simulate switching on type other than this? void Foo(object o) { if (o is A) { ((A)o).Hop(); } else if (o is B) { ((B)o).Skip(); } else { throw new ArgumentException("Unexpected type: " + o.GetType()); } }
We see numerous times over the course of Star Wars that a Sith will kill his master and take a new apprentice for himself with a plan to control the galaxy. We never see this behavior from Count Dooku in the movies. Is there anything within the canon that would suggest Dooku had undertaken any extensive planning to kill and replace his master? Note that I'm looking for events prior to his fight with Anakin Skywalker.
In the Revenge of the Sith, when Count Dooku had Chancellor Palpatine captured, did he actually know that Palpatine was the same person as his master Darth Sidious? If he did, then why didn't he expose Palpatine when the latter ordered Anakin Skywalker to kill him?
We can imagine an object floating in the known universe, maximally distant from any other large mass. Maybe it has been there since coalescing after the big bang. What physical phenomena tell it whether it is rotating relative to the rest of the universe and therefore experiencing a centrifugal (?) force. Is it the combined gravity of all other matter? Is it 'spooky action at a distance'? Is it because it is rotating relative to 'empty space'?
I am constructing a thought experiment about a spinning object that is floating in intergalactic space. I assume that this object is about the size of a planet so that it will have enough gravity so that a Foucault pendulum will work, although I'm not sure that this is necessary for the thought experiment. I can easily determine that this object is spinning if I stand on the object and observe the galaxies around me rise and set. Similarly, I can determine the axis of rotation. For simplicity, I go to one of the poles of my object, and I set up my Foucault pendulum. What will I see? And why will I see it? I assume that in intergalactic space, the gravity is very small (galaxies are very far away, and the mass of my object is very small compared to the mass of a galaxy) so that there will be little coupling between the gravitational field of my object and the gravitational field of the galaxies around me.
I have two sheets that contain mostly identical names but a few names with no match on the other sheet. For example: Sheet 1 1. Kumar 2. Rajiv 3. Ranjith 4. Supriya 5. Sanjay Sheet 2 1. Kumar 2. Rajiv 3. Ranjith 4. Hari 5. Sanjay 6. Supriya I need to identify Hari as not having a match on Sheet 1. How can I identify such names that appear on Sheet 2 but not on Sheet 1?
I'm not sure unique is the right term but what I'm looking for is if I have column A with values 1,2,3,4,5 and column B with 3,4,5,6,7 I want the result to display 1,2,6,7.
Let’s say I have $x = x + 1$, which is a false statment for real $x$; why can I solve for real $x$ when I square both sides of the equation, giving $x^2=(x+1)^2$?
Why can't you square both sides of an equation? I've been asked this many times and can never quite give a good, clear, concise answer (for beginning algebra students) in plain language. I just searched the web and still couldn't find a simple-to-understand answer for why squaring both sides gives you extraneous solutions.
I always have been passionate about the beautiful country Bhutan, but after searching for some infomation, I found out that Bhutan restricts the travellers there. So how can I gain a visa to this country? What is the requirement to get a Bhutan visa and where do have it? Thank you.
I heard that access to Bhutan is quite restricted for all people of outside South-Asian countries? Can I have the details on that?
I converted a set of MapInfo files to SHP using . Unfortunately, the attributes got jumbled. The original dataset was in Chinese, so that is probably contributing to the jumbling. Screenshot below shows jumbles. I uploaded the source Mapinfo files to filebin , and I uploaded the converted SHP to filebin . Is there anyway to recover the jumbled attributes? I have opened SHP in ArcGIS with Chinese characters in the attributes before, so it's not solely a language character rendering issue.
I tried to change the only the shapefile datasource encoding through properties and also but it doesn't change it. Without saving the QGIS project can't I directly change the shapefile datasource encoding? I also tried this code, it shows change encoding but as I open the shapefile again it show the same old system encoding: for layer in QgsMapLayerRegistry.instance().mapLayers().values(): layer.setProviderEncoding(u'UTF-8') layer.dataProvider().setEncoding(u'UTF-8') print layer.name(), layer.dataProvider().encoding() (I am not saving QGIS project, just accessing and saving shapefile directly. When I save the project and do this task then it work correctly)
As I understand Linked Lists are useful if I need a list where I need to remove, or add items multiple times after the declaration - things that are not possible/harder to do with an array. But basically I can do the same thing with List Class in C#. So my question is, what is the difference between the two?
When is it better to use a vs a ?
I know the official PvP patch is coming Soon™, but until then do I need to be worried like in Diablo II that someone can come into my game and gank my guy? Is PvP possible under any circumstances at all?
From my very limited experience during the open beta weekend I couldn't figure out a way to attack other players during the beta campaign. Is this possible in the release or will multiplayer only reflect on trading and co-operative games?
I'm selling an item online. Someone contacted me and, after a question about whether the item is available, said the following: "Good,Am okay with the price. but right now am currently out of the country for a business trip ,I want you to help me shipping it out to my colleague as his birthday gift to WEST AFRICA.I’ll paying you €100 EURO which includes for the shipping fees through the POST OFFICE, can I send you the money through western Union money transfer?" The item costs 8€. Shipping costs around 30-40€. My question is, is it a scam and, if so, how does it work?
This raises a bunch of red flags (also confirmed by googling the email address it came from), but I don't quite understand how this scam is actually supposed to work. So, here it goes: I put up an ad (for a guitar, 90€) on LeBonCoin (the French equivalent of Craigslist). Someone contacts me by text message (anonymous with no actual phone number), saying they want to continue by email. I then get an email, with roughly the following content (rough translation): OK, I will buy it, but I need to send you cash by "express DHL letter". The DHL driver will pick up the item when he gives you the cash. I need the following information: full name, postal address, price of the item, and your phone number. I'm guessing that this works by them requesting some "delivery fee" in advance, but does anyone know how this actually works?
The (%SystemRoot%\system32\drivers\etc\hosts) lets you make google.com point to, for example, 127.0.0.1 on your local machine, but what if I wanted to make, say, 192.168.1.5 point to 127.0.0.1 on my local machine? Is there a way to do that? Can that be done in the hosts file on Windows 7?
A sandbox enviroment of a web app is reachable directly by an IP address: http://<my_ip_address> without a login name. Is there a way to make a virtual host in my local machine, named as <my_ip_address>, and change /etc/hosts so it will "redirect" to my localhost? 127.0.0.1 <my_ip_address> So when I load the url http://<my_ip_address> the browser will point to my localhost? The way I can already redirect domain names.
I find this web site extremely difficult to use. How do I add code? I have spent the last two hours trying to post a question, but can't because of some type of editing of code. I have a Spring XML file that contains close to a hundred lines of code. I can't indent the code because it has extended lines. Is there ANY way I can post without indenting a hundred lines of code? Is there ANY way to override that editing requirement? I've had to just give up before because it was going to take too long.
How do I post text so that it is formatted as code? What do I need to do so that my code shows up properly — not escaped or removed — when posted? And how to get the correct syntax highlighting? For more information, see "" in the .
Can anyone help me reverse tethering from linux to iphone 5.
I have an iMac, connected to the Internet via Ethernet, and an iPhone 4. I would like to share the iMac's Internet connection to my iPhone via the USB Cable (because my wife dreams of a wifi-less household). I've set up Internet Sharing, specifying "sharing from: Ethernet via: USB IPhone", but when I test, the iPhone cannot connect to the Internet. Is there something I need to activate on the iPhone? iMac, mac os x version: Mountain Lion, 10.8.4 iPhone 4, IOS Version: 6.1
Mathematically what is the difference between pure separable state and entangled state ? Can anyone explain with equations?
I am currently trying to establish a clear picture of pure/mixed/entangled/separable/superposed states. In the following I will always assume a basis of $|1\rangle$ and $|0\rangle$ for my quantum systems. This is what I have so far: superposed: A superposition of two states which a system $A$ can occupy, so $\frac{1}{\sqrt{2}}(|0\rangle_A+|1\rangle_A)$ seperable: $|1\rangle_A|0\rangle_B$ A state is called separable, if its an element of the (tensor)product basis of system $A$ and $B$ (for all possible choices of bases) entangled: $\frac{1}{\sqrt{2}}(|0\rangle_A|1\rangle_B+|1\rangle_A|0\rangle_B)$ is not a state within the product basis (again for all possible bases). mixed state: Is a statistical mixture, so for instance $|1\rangle$ with probability $1/2$ and $|0\rangle$ with probability $1/2$ pure state: Not a mixed state, no statistical mixture I hope that the above examples and classifications are correct. If not it would be great if you could correct me. Or add further cases, if this list is incomplete. On wikipedia I read about Another way to say this is that while the von Neumann entropy of the whole state is zero (as it is for any pure state), the entropy of the subsystems is greater than zero. which is perfectly fine. However I also read on wikipedia a criterion for : Another, equivalent, criterion is that the von Neumann entropy is 0 for a pure state, and strictly positive for a mixed state. So does this imply that if I look at the subsystems of an entangled state, that they are in a mixed state? Sounds strange... What would be the statistical mixture in that case? Moreover I also wanted to ask, whether you had further illustrative examples for the different states I tried to describe above. Or any dangerous cases, where one might think a state of one kind to be the other?
<script type="text/javascript"> var a=10; </script> <?php echo $value; ?> I want to get the value of variable "a" to PHP variable "$value" without ajax request.
I am using PHP and JavaScript. My JavaScript code contains a function, get_data(): function get_Data(){ var name; var job; ..... return buffer; } Now I have PHP code with the following. <?php $i=0; $buffer_data; /* Here I need to get the value from JavaScript get_data() of buffer; and assign to variable $buffer_data. */ ?> How do I assign the JavaScript function data into the PHP variable?
I definitely feel like an idiot because of the fact that I have to ask you the following question, but anyway I just don't know any other option. If just proven two things which are the opposites of each other, so at least one of my proofs have to be wrong. I tried to solve the following problem: Definition: $a \boxplus b = 2a+2b$. $\boxplus$ is commutative. Is $\boxplus$ assosiativ? So I found two ways to solve the problem: 1. per definition We want to show $(a \boxplus b) \boxplus c = a \boxplus (b \boxplus c)$. $(a \boxplus b) \boxplus c = (2a+2b)*2+2c = 4a+4b+2c.$ And on the other side $a \boxplus (b \boxplus c) = 2a+2(2b+2c)= 2a+4b+4c$ $4a+4b+2c \neq 2a+4b+4c$. So $\boxplus$ is not assosiative. 2. Show that commutativity implicates associativity We want to proof $ (a \circ b) \circ c = a \circ (b \circ c)$ [$\circ$ shall be commutative] $ (a \circ b) \circ c = a \circ b \circ c = b \circ a \circ c = b \circ c \circ a = (b \circ c) \circ a. $ I know that my mistake have to look stupid and obvious, but I just can't see where I'm wrong. Thank you all for helping me!
Does commutativity imply associativity? I'm asking this because I was trying to think of structures that are commutative but non-associative but couldn't come up with any. Are there any such examples? NOTE: I wasn't sure how to tag this so feel free to retag it.
Say a function f is differentiable. Prove whether its derivative is continuous over its domain or not. On an intuitive level, I believe it should be always continuous over the domain (open intervals) and am thinking of a rigorous proof.
If a function $f$ defined on $[a,b]$ and differentiable everywhere, does it mean that its derivative $f'(x)$ is continuous everywhere on $[a,b]$? My understanding is 'yes'. Because if there were 'a gap' in $f'(x)$, we could integrate back to $f(x)$ and show that where the gap is, there would be a sharp "angle" where $f(x)$ is not differentiable.
i have been trying to a cards game with java but some how it keeps falling. this game an odd number of players and each of them has a queue of cards the first player that is card queue is empty wins. every time i compile it keep giving me java.lang.NullPointerException error. thank you for helping. package cardgame; import unit4.collectionsLib.Queue;//importing the queue public class Main { public static boolean checkIsEmpty(Queue<Player> p){ boolean is=false; p.insert(null); while(p.head()!=null){ if(p.head().getC().isEmpty()){ is=false; p.insert(p.remove()); } } p.remove(); return is; } public static int whoWin(Queue<Player> p){ p.insert(null); while(p.head()!=null){ if(p.head().getC().isEmpty()){ return p.head().getIndex(); } } return 0; } public static void main(String[] args) { Queue<Player> players = new Queue(); //queue of players for(int i=0;i<5;i++){ players.insert(new Player()); } boolean isOver=false; while(!isOver) //the game is over when one player finished his cards { Player p = players.remove(); if(p.getC().head().greater(players.head().getC().head())==1){ p.getC().remove(); players.insert(p); players.insert(players.remove()); } else if(p.getC().head().greater(players.head().getC().head())==2){ players.head().getC().remove(); players.insert(p); players.insert(players.remove()); } else{ players.head().getC().remove(); p.getC().remove(); players.insert(p); players.insert(players.remove()); } if(checkIsEmpty(players)){ isOver=true; System.out.println("the winner in this game is player number :"+whoWin(players)); } } } } package cardgame; import unit4.collectionsLib.Queue; public class Player { static int autonum=1; private Queue<Card> c; private int index; public Player() { for(int i=0;i<7;i++){ c.insert(new Card());} this.index=autonum; autonum++; } /** * @return the c */ public Queue<Card> getC() { return c; } /** * @param c the c to set */ public void setC(Queue<Card> c) { this.c = c; } public int getIndex(){ return this.index; } } package cardgame; import java.util.Random; public class Card { private int num ; private int shape; public Card() { Random r = new Random(); this.num = r.nextInt(9)+1; this.shape = r.nextInt(4)+1; } public int greater(Card c){ if(c.getNum()<this.num) return 1; else { if(c.getNum()>this.num){ return 2; } else{ if(c.getShape()>c.shape){ return 2; } else{ if(c.getShape()<c.shape){ return 1; } else{ return 0; } } } } } /** * @return the num */ public int getNum() { return num; } /** * @param num the num to set */ public void setNum(int num) { this.num = num; } /** * @return the shape */ public int getShape() { return shape; } /** * @param shape the shape to set */ public void setShape(int shape) { this.shape = shape; } }
What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them? What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?
I've experienced an issue where some of my scripts run perfectly fine when I call them manually, but these same scripts when called as cron jobs via cron don't seem to work at all. So my question: I'd like to know if there are restrictions that apply with the use of commands and/or scripts (and the privilege of execution) in a script scheduled to run with cron?
I have a test.sh script #!/bin/sh php /home/v/file.php sh /root/x/some.sh when I execute the file as root from command line it works. sh /home/v/test.sh when I set it to crontab -e (is the root cron), is not working * * * * * sh /home/v/test.sh What do I do wrong? Thanks
Is it possible for the Bash prompt to contain a bell without it getting corrupted by navigating history? timmerman@devcees:~$ export PS1='\u@\h:\w$\a ' timmerman@devcees:~$ pexport PS1='\u@\h:\w$ ' timmerman@devcees:~$ Using the arrow keys to navigate the history, the first p from a python3 command got stuck at the end of the prompt but doesn't count for the actual (not visual) cursor position. Looks like a Bash bug. Can it be fixed without recompiling Bash?
When I try to colorize the bash prompt like this: export PS1="\e[0;31m[\u@\h \W]\$ \e[m " it breaks the carriage return (instead of going to a new line when line is full, it starts in the same line and erases the input text). If I remove the color sequence it works fine. I use Ubuntu 11.10 and terminal (guake has the same bug too).
The is one of the measures of spacetime curvature. For flat (Minkowski) spacetime it is zero. The dimensions of the Kretschmann scalar are $[L]^{-4}$. What does that physically signify about the geometry of spacetime?
How do you interpret the (in general relativity)? What can you tell from it? The Kretschmann scalar is defined as $$K = R_{abcd} R^{abcd} $$ where $R_{abcd}$ is the Riemann curvature tensor.
I know what is the meaning of this. I know what the meaning of this is. If the first sentence is considered correct, can someone please explain the reasoning? Edit: The answer of the "Changing Subject and Verb" post illustrates my question, not the answer. Another example: To know whether you are dealing with the main clause or an embedded clause, you have to think about what is the main verb of the whole sentence. Compared to: To know whether you are dealing with the main clause or an embedded clause, you have to think about what the main verb of the whole sentence is.
We always change subject and verb positions in whenever we want to ask a question such as "What is your name?". But when it comes to statements like the following, which form is correct? I don't understand what are you talking about. I don't understand what you are talking about. Another example Do you know what time is it? Do you know what time it is? Another example Do you care how do I feel about this? Do you care how I feel about this?
For the non-negative real numbers $a, b, c$ prove that $$(a^2+2)(b^2+2)(c^2+2)\geq 3(a+b+c)^2$$ What I did is applying Holder's inequality in LHS:$$(a^2+(\sqrt{2})^2)(b^2+(\sqrt{2})^2)(c^2+(\sqrt{2})^2) \geq (abc + 2\sqrt{2})^2$$ Then it suffices to prove that $$(abc+2\sqrt2)^2 \geq 3(a+b+c)^2 \\ \Rightarrow abc+2\sqrt2 \geq \sqrt3(a+b+c)$$ But I don't know how to proceed. I also think I applied Holder's Inequality incorrectly.
Let $a$, $b$, $c$ be nonnegative real numbers. Prove $(a^{2}+2)(b^{2}+2)(c^{2}+2)\geq 9(ab+bc+ca)$.
I can open one file in a new tab with: :tabnew file Let's say I have many files, for example: util.h and util.cpp. How I can open those files all in separate, new tabs? I'm looking for something similar to :tabnew util.*
Is it possible to get vim to open multiple files into tabs, similar to the way the args <path> command will open multiple files into buffers? Doing something like :tabe ./* results in the error "E77: Too many file names", even though the number of files is less than the value set in the tabpagemax property. (I believe the vim -p <files> option will open in tabs, but I'm hoping to find a way to do it when vim is already open.)
Completely ignored arguments: [--nativeLauncherVersion, 301] [13:44:04] [Client thread/INFO]: Setting user: gzangsta410 [13:44:04] [Client thread/INFO]: (Session ID is <censored>) [13:44:05] [Client thread/INFO]: LWJGL Version: 2.9.4 [13:44:06] [Client thread/INFO]: Reloading ResourceManager: Default [13:44:06] [Sound Library Loader/INFO]: Starting up SoundSystem... [13:44:06] [Thread-5/INFO]: Initializing LWJGL OpenAL [13:44:06] [Thread-5/INFO]: (The LWJGL binding of OpenAL. For more information, see http://www.lwjgl.org) AL lib: (EE) MMDevApiOpenPlayback: Device init failed: 0x80004005 AL lib: (EE) MMDevApiOpenPlayback: Device init failed: 0x80004005 [13:44:06] [Thread-5/ERROR]: Error in class 'LibraryLWJGLOpenAL' [13:44:06] [Thread-5/ERROR]: Unable to initialize OpenAL. Probable cause: OpenAL not supported. [13:44:06] [Thread-5/WARN]: ERROR MESSAGE: [13:44:06] [Thread-5/INFO]: Could not locate OpenAL library. [13:44:06] [Thread-5/WARN]: STACK TRACE: [13:44:06] [Thread-5/INFO]: org.lwjgl.openal.AL.create(AL.java:156) [13:44:06] [Thread-5/INFO]: org.lwjgl.openal.AL.create(AL.java:102) [13:44:06] [Thread-5/INFO]: org.lwjgl.openal.AL.create(AL.java:206) [13:44:06] [Thread-5/INFO]: paulscode.sound.libraries.LibraryLWJGLOpenAL.init(LibraryLWJGLOpenAL.java:164) [13:44:06] [Thread-5/INFO]: paulscode.sound.SoundSystem.CommandNewLibrary(SoundSystem.java:1576) [13:44:06] [Thread-5/INFO]: paulscode.sound.SoundSystem.CommandQueue(SoundSystem.java:2572) [13:44:06] [Thread-5/INFO]: paulscode.sound.CommandThread.run(CommandThread.java:121) [13:44:07] [Sound Library Loader/WARN]: ERROR MESSAGE: [13:44:07] [Sound Library Loader/INFO]: Could not locate OpenAL library. [13:44:07] [Sound Library Loader/INFO]: Starting up SoundSystem... [13:44:07] [Thread-7/INFO]: Switching to No Sound [13:44:07] [Thread-7/INFO]: (Silent Mode) [13:44:07] [Sound Library Loader/INFO]: Sound engine started [13:44:08] [Client thread/INFO]: Created: 1024x512 textures-atlas [13:45:04] [Client thread/INFO]: Realms library version == 1.8.4 [13:45:05] [MCO Availability Checker #1/INFO]: Realms is available for this user # # A fatal error has been detected by the Java Runtime Environment: # # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00007fff3d2c6c17, pid=4268, tid=7872 # # JRE version: Java(TM) SE Runtime Environment (8.0_25-b18) (build 1.8.0_25-b18) # Java VM: Java HotSpot(TM) 64-Bit Server VM (25.25-b02 mixed mode windows-amd64 compressed oops) # Problematic frame: # C [ig9icd64.dll+0x16c17] # # Failed to write core dump. Minidumps are not enabled by default on client versions of Windows # # An error report file with more information is saved as: # C:\Users\Nick\AppData\Roaming\.minecraft\hs_err_pid4268.log # # If you would like to submit a bug report, please visit: # http://bugreport.sun.com/bugreport/crash.jsp # The crash happened outside the Java Virtual Machine in native code. # See problematic frame for where to report the bug. # Java HotSpot(TM) 64-Bit Server VM warning: Using incremental CMS is deprecated and will likely be removed in a future release
I go to the Minecraft menu and click on singleplayer to test out the 1.9 update. I made a new world (no mods), it said downloading terrain and then it crashes every time (I've tried about 20 times now). Has anyone else experienced similar issues and know what the fix may be? Here is the launcher log: Completely ignored arguments: [--nativeLauncherVersion, 301] [00:35:12] [Client thread/INFO]: Setting user: Teddy_Cromwell [00:35:12] [Client thread/INFO]: (Session ID is <censored>) [00:35:14] [Client thread/INFO]: LWJGL Version: 2.9.4 [00:35:14] [Client thread/WARN]: Removed selected resource pack resources (no region and battle music).zip because it's no longer compatible [00:35:14] [Client thread/INFO]: Reloading ResourceManager: Default [00:35:15] [Sound Library Loader/INFO]: Starting up SoundSystem... [00:35:16] [Thread-5/INFO]: Initializing LWJGL OpenAL [00:35:16] [Thread-5/INFO]: (The LWJGL binding of OpenAL. For more information, see http://www.lwjgl.org) [00:35:16] [Thread-5/INFO]: OpenAL initialized. [00:35:16] [Sound Library Loader/INFO]: Sound engine started [00:35:18] [Client thread/INFO]: Created: 1024x512 textures-atlas [00:35:26] [Server thread/INFO]: Starting integrated minecraft server version 1.9 [00:35:26] [Server thread/INFO]: Generating keypair [00:35:27] [Server thread/INFO]: Preparing start region for level 0 [00:35:28] [Server thread/INFO]: Preparing spawn area: 5% [00:35:29] [Server thread/INFO]: Preparing spawn area: 8% [00:35:30] [Server thread/INFO]: Preparing spawn area: 15% [00:35:31] [Server thread/INFO]: Preparing spawn area: 21% [00:35:32] [Server thread/INFO]: Preparing spawn area: 27% [00:35:33] [Server thread/INFO]: Preparing spawn area: 34% [00:35:34] [Server thread/INFO]: Preparing spawn area: 42% [00:35:35] [Server thread/INFO]: Preparing spawn area: 48% [00:35:36] [Server thread/INFO]: Preparing spawn area: 56% [00:35:37] [Server thread/INFO]: Preparing spawn area: 66% [00:35:38] [Server thread/INFO]: Preparing spawn area: 74% [00:35:39] [Server thread/INFO]: Preparing spawn area: 81% [00:35:40] [Server thread/INFO]: Preparing spawn area: 91% [00:35:41] [Server thread/INFO]: Preparing spawn area: 98% [00:35:42] [Server thread/INFO]: Teddy_Cromwell[local:E:6d7525a7] logged in with entity id 301 at (244.5, 69.0, 244.5) [00:35:42] [Server thread/INFO]: Teddy_Cromwell joined the game # # A fatal error has been detected by the Java Runtime Environment: # # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00007fffcf6e6b37, pid=15456, tid=12424 # # JRE version: Java(TM) SE Runtime Environment (8.0_25-b18) (build 1.8.0_25-b18) # Java VM: Java HotSpot(TM) 64-Bit Server VM (25.25-b02 mixed mode windows-amd64 compressed oops) # Problematic frame: # C [ig8icd64.dll+0x16b37] # # Failed to write core dump. Minidumps are not enabled by default on client versions of Windows # # An error report file with more information is saved as: # C:\Users\Connor\AppData\Roaming\.minecraft\hs_err_pid15456.log # # If you would like to submit a bug report, please visit: # http://bugreport.sun.com/bugreport/crash.jsp # The crash happened outside the Java Virtual Machine in native code. # See problematic frame for where to report the bug. # AL lib: (EE) alc_cleanup: 1 device not closed Java HotSpot(TM) 64-Bit Server VM warning: Using incremental CMS is deprecated and will likely be removed in a future release
There is some now about a Polish village where the last 12 children born were all girls. The probability that the last 12 newborns in a village are all girls is around 0.03%, so around 3000 villages give us a solid 50% chance of this happening, so I would say this is no big deal. However I was thinking how often this happens in large hospitals and goes unnoticed. According to some the Northside Hospital in Atlanta has seen 27,123 births in 2016. So what is the probability that at least 12 girls in a row were born there in 2016?
So a run of $x$ heads has the probability $0.5^x$. Thefore a run of $9$ would be $0.5^9 = 0.001953125$. But what is the chance of that run of $9$ occuring in $1000$ coinflips? Can anyone please explain how to work this out?
I have old 32-bit hardware. I want to install ubuntu 18.04 mini iso without internet because my LAN card not working so does anyone know how to install mini ISO offline thanks.
Why is there no 32 bit ISO for the new Ubuntu 18.04?
I used both command lines and displayed the same output
Wouldn't it be more consistent if one of these always worked?
My textbook says that any function which can be written as $y(x,t)=f(ax±b)$ represents a wave. It says that that the only condition is that it should be finite everywhere and at all times. With this definition, I cannot understand why $(x-vt)^2$ does not represent a wave. It is finite for all real $x$ and $t$. What am I missing?
A function which represents a wave must satisfy the following differential equation: $$\frac{\partial^2 y}{\partial t^2} = k\frac{\partial^2 y}{\partial x^2}$$ Any function that satisfies the wave differential equation represents a wave provided that it is finite everywhere at all times. What does "it is finite everywhere at all times" mean? Question:Which of the following functions represent a wave? a) $(x - vt)^2$ b) $\ln(x + vt)$ c) $e^{-(x - vt)^2}$ d) $(x + vt)^{-1}$ Only option (c) is given as the answer though all 4 satisfy the differential equation. I believe I did not understand the significance "function should be finite everywhere at all times" which is why I am unable to answer the aforementioned question.
Can any one help me to install Wireless N 150 PCI Adapter DWA-525 driver and configuration process on Ubuntu 12.04 please......
I'm using Ubuntu 12.10 32-Bit Edition. I have racently purchased D-link DWA 525 PCI Wireless Adapter. But i can't find the drivers for the adapter. I have been searching in internet for a while. Tried many options, including ndiswrapper. When i run lspci command, it detects and shows as below. 04:00.0 Network controller: Ralink corp. RT5360 Wireless 802.11n 1T/1R My kernel version was 3.5.0-18-generic. After i have upgraded my kernel to 3.7.3-030703-generic and now the device detects as Network controller [0280]: Ralink corp. RT5360 Wireless 802.11n 1T/1R [1814:5360] Subsystem: D-Link System Inc DWA-525 Wireless N 150 Desktop Adapter (rev.A2)[1186:3c05] Kernel modules: rt2800pci But still there is no sign of the wireless interface in Network Connections window or in iwconfig. And the interface is not functional yet. The output of iwconfig is lo no wireless extensions. eth0 no wireless extensions. The output of ifconfig is eth0 Link encap:Ethernet HWaddr 00:27:0e:05:5c:e1 inet addr:192.168.1.2 Bcast:192.168.1.255 Mask:255.255.255.0 inet6 addr: fe80::227:eff:fe05:5ce1/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:38317 errors:0 dropped:0 overruns:0 frame:0 TX packets:34741 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:38422211 (38.4 MB) TX bytes:4955007 (4.9 MB) lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:3499 errors:0 dropped:0 overruns:0 frame:0 TX packets:3499 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:342593 (342.5 KB) TX bytes:342593 (342.5 KB)
I know that is possible to build a bijection between the set of natural numbers $\mathbb{N}$ and the natural plane (the cartesian product of $\mathbb{N}$ by itself, $\mathbb{N} \times \mathbb{N} = \mathbb{N}^2$. This is done by diagonally traversing the plane from zero upwards with triangles of growing size. Is there a simple algebraic form for that bijection? That is, is it possible to write explicitly some invertible $f(i, j): \mathbb{N} \times \mathbb{N} \leftrightarrow \mathbb{N}$? I need to index in a simple way couples of natural numbers.
I understand that both $\mathbb{N}$ and $\mathbb{N}\times\mathbb{N}$ are of the same cardinality by the Shroeder-Bernstein theorem, meaning there exists at least one bijection between them. But I can't figure out what such a bijection would be. The paper that I'm reading gives an example of an injective function $f:\mathbb{N}\to\mathbb{N}\times\mathbb{N}$, $f(n)=(0,n)$, and an injective function $g:\mathbb{N}\times\mathbb{N}\to\mathbb{N}$, $g(a,b)=2^a3^b$. I was thinking perhaps if there were some way to combine these two, I could find a bijection, but I have no idea how to go about that or if it's even possible. What is an example of a bijection between these two sets, and please explain the process by which you found it?
I've already asked this question on Superuser (given it's Outlook related), but now I'm trying to see if anyone else on Android Enthusiasts can help me. The details are as below. I've paired up my Samsung phone with an Outlook Exchange inbox (probably Outlook 2010), and now I've got the outstanding SMS syncing feature. Only, of course, it sucks, since my inbox get's flooded with SMS's that I already have on my phone. After looking around the internet for quite a while for a option that would allow me to disable that kind of syncing, the only guide I got was designed for Windows Phone 6.x. I want desperately to disable it. Anyone has any clue as to how?
I recently started using a Samsung Galaxy S4 and one of the features in a synchronization between text messages and email accounts. When a text message comes in it throws a copy into my Exchange email accounts that are one the phone. I want to turn this feature off but cannot find a setting for it anywhere. Any ideas?
I am trying to install php5-imap but I get the error that dependancies are missing. But they are not! The error message: Reading package lists... Done Building dependency tree Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation: The following packages have unmet dependencies: php5-imap : Depends: phpapi-20090626 E: Unable to correct problems, you have held broken packages. dpkg -l | grep php returns this: ii libapache2-mod-php5 5.5.37+dfsg-1+deprecated+dontuse+deb.sury.org~precise+1 server-side, HTML-embedded scripting language (Apache 2 module) ii php-http 1.4.1-1 PHP PEAR module for HTTP related stuff ii php-pear 5.5.37+dfsg-1+deprecated+dontuse+deb.sury.org~precise+1 PEAR - PHP Extension and Application Repository ii php5 5.5.37+dfsg-1+deprecated+dontuse+deb.sury.org~precise+1 server-side, HTML-embedded scripting language (metapackage) ii php5-cli 5.5.37+dfsg-1+deprecated+dontuse+deb.sury.org~precise+1 command-line interpreter for the php5 scripting language ii php5-common 5.5.37+dfsg-1+deprecated+dontuse+deb.sury.org~precise+1 Common files for packages built from the php5 source ii php5-curl 5.5.37+dfsg-1+deprecated+dontuse+deb.sury.org~precise+1 CURL module for php5 ii php5-dev 5.5.37+dfsg-1+deprecated+dontuse+deb.sury.org~precise+1 Files for PHP5 module development ii php5-gd 5.5.37+dfsg-1+deprecated+dontuse+deb.sury.org~precise+1 GD module for php5 ii php5-imagick 3.3.0-1+deb.sury.org~precise+2 Provides a wrapper to the ImageMagick library ii php5-json 1.3.9-1+deb.sury.org~precise+3 JSON module for php5 ii php5-mcrypt 5.5.37+dfsg-1+deprecated+dontuse+deb.sury.org~precise+1 MCrypt module for php5 rc php5-mysql 5.5.7+dfsg-1+sury.org~precise+1 MySQL module for php5 ii php5-mysqlnd 5.5.37+dfsg-1+deprecated+dontuse+deb.sury.org~precise+1 MySQL module for php5 (Native Driver) ii php5-sqlite 5.5.37+dfsg-1+deprecated+dontuse+deb.sury.org~precise+1 SQLite module for php5 ii pkg-php-tools 1.21+deb.sury.org~precise+1 various packaging tools and scripts for PHP packages From the reading I have done, phpapi is part of php-cgi, php-cli and other packages that I have installed. I also found that php5-fpm is reporting a similar error except with php5-common which is clearly in the list of installed packages. Any thoughts?
PPA seems to be constantly offline. Whenever I use sudo apt-get update, this error is shown: W: Failed to fetch http://ppa.launchpad.net/ 404 Not Found How do I fix these errors?
The hourly configured cronjob asl started to exit with return code 127 since one day (after run of apt-get update; apt-get dist-upgrade). Now I'm receiving hourly reports like: run-parts: /etc/cron.hourly/asl exited with return code 127 Where does it come from? Config file looks quite fine. /EDIT: I saw the "duplicate thread". Unfortunately there is only that one small chapter about cron.hourly scheduled jobs. All the logs files etc. are not mentioning anything. Executing the cron step by step shows following error: root@s01:/etc/cron.hourly# /var/asl/bin/aum -u Checking versions ... Updating Web Application Firewall to 201608111803: updated [PASS] Restarting Apache ... Generating report ... Finished ------------------------------------------------------------------------------- Errors were encountered: L CODE SOURCE MESSAGE - ---- ----------------------------- ------------------------------------------ 2 9901 ASLCommon::cmd_system ERROR: '/bin/cp -af /var/asl/rules/modsec/ template-* /var/asl/data/templates/ >/dev/ null 2>&1 (1)'
This is a about using cron & crontab. You have been directed here because the community is fairly sure that the answer to your question can be found below. If your question is not answered below then the answers will help you gather information that will help the community help you. This information should be edited into your original question. The answer for 'Why is my crontab not working, and how can I troubleshoot it?' can be seen below. This addresses the cron system with the crontab highlighted.
New to blender, I just made a simple model, but now when I try to change the mesh, the entire mesh stays together and is moved as well as deforming. For example, attempting to shape a cube by grabbing one vertex no longer pulls that vertex, but moves the entire cube in that direction, and subtly deforms it. I don't have this problem when I 'load factory settings' but every time I load this particular project the problem persists. After some googling, it seems like it is acting like I'm deforming a shape key, but I haven't learned much about those yet, and it doesn't look like the mesh even has a basis shape key yet. Does anyone know how to get back to normal editing? And maybe what I accidentally pushed to cause this in the first place?
My problem is that I sometimes lose the ability to independently translate or otherwise transform any parts of a single mesh. If I try, for example, to just translate several faces, edges, or vertices, then the entire mesh will stretch and displace itself in order to follow the translation. Or, alternatively, if I try to translate just one face then the whole mesh will move as if I'm translating in Object Mode. I'm not really sure I know how to describe this problem properly. I don't even know how to reliably reproduce it. It seems to happen to any given mesh at random, and it doesn't stop happening to that mesh unless I delete and remake it. I assume that I must be doing something wrong to cause this to happen. Does anyone have any ideas? Thanks.
I'm debugging a small program in java, a strange error occurred: import java.util.*; public class DebugNine3 { public static void main(String[] args) { ArrayList products = new ArrayList(3); products.add("shampoo"); products.add("moisturizer"); products.add("conditioner"); Collections.sort(products); display(products); final String QUIT = "quit"; String entry; Scanner input = new Scanner(System.in); System.out.print("\nEnter a product or " + QUIT + " to quit >> "); entry = input.nextLine(); while(!entry.equals("quit")) { products.add(entry); Collections.sort(products); display(products);; } } public static void display(ArrayList products) { System.out.println("\nThe size of the list is " + products.size()); for(int x = 0; x <= products.size(); ++x) System.out.println(products.get(x)); } } Note: DebugNine3.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. can someone explain why this message appeared?
For example: javac Foo.java Note: Foo.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details.
basically i got a text editor that will send possibly HTML tags to my table. I'm using this text editor in my website But what if someone uses the ' character? I have been searching for a way to allow users to enter VARCHAR type characters in my website. In mysql there is the escape string function. What is its alternative in sqlserver. I have been searching a lot... havent found what I am searching for so far. Please help me out. Thanks ^_^
If user input is inserted without modification into an SQL query, then the application becomes vulnerable to , like in the following example: $unsafe_variable = $_POST['user_input']; mysql_query("INSERT INTO `table` (`column`) VALUES ('$unsafe_variable')"); That's because the user can input something like value'); DROP TABLE table;--, and the query becomes: INSERT INTO `table` (`column`) VALUES('value'); DROP TABLE table;--') What can be done to prevent this from happening?
I have gather* section with three lines. the lines appear all bunched up with hardly any space between them. How can I spread them out a little? I tried \belowdisplayskip=12pt but no matter what value I chose there was no discernible difference to anything \f{gather*} R_{address} = \frac{4700}{\left(\frac{17}{\mathrm{Address} - 15.5} - 1\right)} \\* \mathrm{Address} = \frac{17}{\left(\frac{4700}{R_{address}} + 1\right)} + 15.5 \mathrm{Address} \in [16\mathrel{{.}\,{.}}\nobreak 31] \\* \f} Where \f{environment} is equivalent to begin{environment} for Doxygen that I am using.
How can I stretch the spacing between consecutive lines in an align* environment? I have a few lines with \fracs in which both the numerator and the denominator consist of textual phrases, not math symbols, and the result looks too cluttered. \begin{align*} X &= \frac{\textit{Some text here}}{\textit{And some text here}}\\ Y &= \frac{\textit{Will make everything}}{\textit{Look too close together}} \end{align*}
How can I calculate the following limit? I was thinking of applying Cesaro's theorem, but I'm getting nowhere. What should I do? $$\lim_{n \to \infty} \ln \frac{n!^{\frac{1}{n}}}{n}$$
I'm trying to find $$\lim_{n\to\infty}\frac{n}{\sqrt[n]{n!}} .$$ I tried couple of methods: Stolz, Squeeze, D'Alambert Thanks! Edit: I can't use Stirling.
Is it possible for me to get the UTC time of current hour in Javascript? I've tried the following: var mins = new Date().getMinutes(); var hours = new Date().getHours(); var hourStamp = new Date().setHours(hours, 0,0,0); var dates = new Date(hourStamp); Here dates gives me the Unix Timestamp of the current hour. Is there a better/faster way to do this? EDIT: For example: I want the Timestamp for the current hour. So if it's 00:16 am on 12/04/2015, I want the timestamp of 12/04/2015 00:00. And, my method works. My question pertains to if there's a better method of doing the same.
Something similar to Unix's timestamp, that is a single number that represents the current time and date. Either as a number or a string.
The problem i have is: Prove that $2^n\le n!$ for all $n \in \mathbb{N},n\ge4$ Ive been trying to use different examples of similar problems like at: First i show the base case $n=4$ is true. Then assuming $2^k\le k!$ for some $k \in \mathbb{N},n\ge4$ For $k+1$ we have $2^{k+1}\le (k+1)!$ Rewritten as $2\cdot2^k\le k!\cdot(k+1)$ Can you not simply say $2^k\le k!$ from the inductive hypothesis, and $2\lt4\le k\lt k+1$ proving the induction step? I am having trouble following some of what seems to me like unnecessary steps like in the example, but feel like what i did above is wrong as im of course just learning how to use induction.
These are just the examples from my textbook, but I don't think it did not explain well. One of the problem was to prove the inequality $$n<2^n$$ for all integers $n$. I understand we assume if $P(n)$ is true, $P(k+1)$ is true. Thus $k+1< 2^{k+1}$ But in the text book, they added one more line that I don't understand: $$k+1<2^k+1 \le 2^k+2^k=2\cdot2^k=2^{k+1}$$ I understand $$k+1<2^{k+1}$$ But how do I know $2^k+1$ is larger than $k+1$, and smaller than $2^{k+1}$? I have one another example just in case, proving $2^n<n!$ using induction. $$2^{k+1}=2\cdot 2^k<2\cdot k!<(k+1)k!=(k+1)!$$ I understand we should start with $2^{k+1}<(k+1)!$, but Where did $2\cdot k!$ come from? Textbook says it came from inductive hypothesis, but I still don't get it. Please advise.
I'm still new. Trying to install software that has a "run" extension. So far, my attempts have not worked. Update: Ubuntu 19.10 Desktop. I had to do a chmod + and then use sudo bash to make it go. Issue resolved. Thanks everyone.
My PC has both Ubuntu and Windows 7 installed. I have installed all my drivers in Windows like Nvidia graphics, motherboard etc. Shall I install them in Ubuntu too? I looked on the web for my Nvidia drivers and I have found a .run file. How could I install it on my Ubuntu?
What is the possessive of boss; ie, how do you describe the son of the boss?
What is the possessive of a noun ending in ‑s? Are these both right, or is the second one wrong? the boys' books the boss' car
They all do the same, logging into root but it doesn't make sense to me because while su root requires root password, sudo -s and sudo su requires only user password. I know the difference between sudo and su but it's strange to me that I can access root with primary user password...
I already read it from manual but I can't see difference.. su - change user ID or become superuser sudo -s [command] The -s (shell) option runs the shell specified by the SHELL environment variable if it is set or the shell as specified in passwd(5). If a command is specified, it is passed to the shell for execution. Otherwise, an interactive shell is executed. sudo -i disappear description in manual
My question doesn't go much beyond the title: Why does $$\left | \psi \left ( x,t \right ) \right |^{2}$$ give us the probability density of something appearing at a certain location? I understand that $$\left | \psi \left ( x,t \right ) \right |^{2} = \psi \left ( x,t \right )^{*}\psi \left ( x,t \right ) $$ where $\psi \left ( x,t \right )^{*}$ is the complex conjugate, but I still don't understand how multiplying these two variants of the wave equation gives us a probability of a location.
Is the a fundamental , or can it be inferred from unitary evolution?
[EDIT]: I've ported this over the the Linux & Unix SE - since, I really don't know if the issue is Ubuntu specific or a general Linux/*nix issue. Here's the URL: I saw another post had been removed by the moderator on this very same issue. The little that the google preview showed, seems to be similar enough to my issue. I've re-installed and updated the chrome Widevine DRM plugin; I've used the chrome dev tools to try to figure out what's going on, and I've tried streaming with Firefox; and all I'm getting is a repeating 400 bad request from the player. I'm guessing this is a linux / ubuntu issue - yes? Does CBS All Access not even support linux/ubuntu? Am I missing something? Are you going to downvote me and close my question as well? Who knows.
I have not been able to watch CBS all access for some time now. Error 2004. I have not found another browser for ubuntu that will play all access either. However firefox for windows plays it fine? Is there a fix in the works for ubuntu firefox?
Suppose $z_1$, $z_2$ and $z_3$ are distinct points in $\hat{\mathbb {C}}$ . Show that $z$ is on the circle passing through $z_1$, $z_2$ and $z_3$ if and only if [$z$, $z_1$, $z_2$, $z_3$] is real or ∞.
Let $[z_1,z_2,z_3,z_4]$ denote the of the complex numbers $z_1,z_2,z_3,z_4\in \mathbb{C}$. Show that the distinct points $z_1,z_2,z_3,z_4\in\widehat{\mathbb{C}}$ lie on a generalized circle if and only if $[z_1,z_2,z_3,z_4]\in\mathbb{R}$. I saw this statement claimed in , and wondered how one would go about showing it. I know of some facts we could work with: First, the definition: A in $\mathbb{C}$ is either a circle or a line in $\mathbb{C}$. I know that a Mobius transformation maps generalized circles to generalized circles. I know that if $f$ is a Mobius transformation and $z_j'=f(z_j)$, $j=1,2,3,4$, then $[z_1',z_2',z_3',z_4']=[z_1,z_2,z_3,z_4]$. I have posted a potential proof as an answer below. Please let me know if you think it's complete. Thank you!
I have a variable which seems to be a mix of two Gaussian distributions (it is bi-modal with each mode looking normally distributed). I would like to identify anomalous samples. So my idea is to fit a GMM. Than I would like to see which points have a very low probability of coming from that model. Does this make sense? If yes, I'm aware that there could be different ways to do this python. Which would you recommend? EDIT I don't mean tests that would reject a uni-modal distribution. I am, actually, assuming that the process generating the data is multi-modal. More specifically: (1) I assume that data is coming from a finite Gaussian mixture (likely to be just two) (2) I'm thinking of fitting such a model to the data (either by assuming that it is just 2 Gaussians or by estimating the number of components from the data) (3) Then my thinking is to test which samples do not fit that hypothesis Does this make sense? If yes, which python packages would you suggest for such a pipeline?
I wonder if there is any statistical test to "test" the significance of a bimodal distribution. I mean, How much my data meets the bimodal distribution or not? If so, is there any test in the R program?
I am a bit confused as to how to look for the Big-O of this algorithm. So far I'm thinking that the while loop wouldn't be O(n) like a normal iteration of an array since x doubles after each for loop. The mergeSort is n log n, and I have no idea how to go about the for loop's time complexity. I don't think its O(n) either, since once again, x doubles. void algorithm2 (int[] A, int n) { int x = 1; while (x < n) { for (int i = 0; i + x < n; i += 2 * x ) { mergeSort(A, i , i + x -1, i + 2 * x - 1); } x = x * 2; } } Any help would be greatly appreciated!
Most people with a degree in CS will certainly know what . It helps us to measure how well an algorithm scales. But I'm curious, how do you calculate or approximate the complexity of your algorithms?
I'm having problems converting this from Oracle to PostgreSQL. I've tried using STRING_AGG, but i'm not having any success. I believe there's also an issue with REGEXP_REPLACE. Can someone help? REGEXP_REPLACE( LISTAGG(column_name, ',') WITHIN GROUP (ORDER BY column_name), '([^,]+)(,\1)*(,|$)', '\1\3' )
I am looking for a way to concatenate the strings of a field within a group by query. So for example, I have a table: ID COMPANY_ID EMPLOYEE 1 1 Anna 2 1 Bill 3 2 Carol 4 2 Dave and I wanted to group by company_id to get something like: COMPANY_ID EMPLOYEE 1 Anna, Bill 2 Carol, Dave There is a built-in function in mySQL to do this
I know that NULL check for every arguments in a public API is good practice in java. But just curious, do we need do such NULL check in the front of all methods. There are definitely values for doing this: catching error earlier and providing better error message. But is it worthy, I mean doing the same NULL check in all methods seems too tedious. If that is needed, why JVM cannot the job by default. Please share your thoughts.
I use object != null a lot to avoid . What is an alternative to: if (someobject != null) { someobject.doCalc(); }
I am trying to display pagination from archive.php with my custom post type news but when I click to Next page I am getting 404 page My Custom Post Type Code: function codex_custom_init() { $labels = array( 'name' => 'News', 'singular_name' => 'News', 'add_new' => 'Add News', 'add_new_item' => 'Add New News', 'edit_item' => 'Edit News', 'new_item' => 'New News', 'all_items' => 'All News', 'view_item' => 'View News', 'search_items' => 'Search News', 'not_found' => 'No news found', 'not_found_in_trash' => 'No news found in Trash', 'parent_item_colon' => '', 'menu_name' => '1. News' ); $args = array( 'labels' => $labels, 'public' => true, 'publicly_queryable' => true, 'show_ui' => true, 'show_in_menu' => true, 'query_var' => true, 'rewrite' => array( 'slug' => 'news' ), 'capability_type' => 'post', 'has_archive' => true, 'hierarchical' => false, 'menu_position' => null, 'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'excerpt', 'comments' ) ); register_post_type( 'news', $args ); } add_action( 'init', 'codex_custom_init' ); and My Pagination Code: <?php // the query to set the posts per page to 3 $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; $args = array('posts_per_page' => 2, 'post_type' => 'news' , 'paged' => $paged ); query_posts($args); ?> <!-- the loop --> <?php if ( have_posts() ) : while (have_posts()) : the_post(); ?> <div class="news-main"> <div class="news-image"><img src="<?php echo get_field('image'); ?>" /></div> <div class="news-container"> <h1><?php echo the_title(); ?></h1> <p><?php echo the_content(); ?></p> </div> </div> <?php endwhile; ?> <!-- pagination --> <?php next_posts_link(); ?> <?php previous_posts_link(); ?> <?php else : ?> <!-- No posts found --> <?php endif; ?> I am new with WordPress so please some one help me :).
I've got a custom loop that I'm using to display some Real Estate listings that will be available within 60 days. I'm calling it with the following function: <?php $sixtydays = date('Y/m/d', strtotime('+60 days')); $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; $query = new PostsOrderedByMetaQuery(array( 'post_type' => array('post', 'real-estate'), 'meta_key' => 'Time Available', 'meta_compare' => '<=', 'meta_value' => $sixtydays, 'paged' => $paged, 'orderby_meta_key' => 'Price', 'orderby_order' => 'ASC' )); ?> <?php while ($query->have_posts()) : $query->the_post(); ?> While the loop works great, I can't get it to paginate. It shows the first 10 (my default) posts but doesn't show the pagination. The only way to display all posts is to show them on one page by adding 'posts_per_page' => -1, I have similar loops on other pages that have no problem paginating. The only difference with this one is that there are two meta keys that are filtering the posts. I'm using WP Page Navi for this and the rest of my pages. I'm closing the loop and adding the pagination using the following code: <?php endwhile; // End the loop. Whew. ?> <?php wp_pagenavi(); ?> <?php wp_reset_query(); ?> How can I go about fixing this?
I have learned so much from SE sites and I am really thankful for it. I sometimes feel that I am under debt from SO, so in order to satisfy me and my principles, I think I should give some donation. I want to contribute but I don't have much technical expertise to use in helping others, so maybe if I can give a donation, this would help me to feel better. I have been a member of various other forums and I have always given some amount (not much, though) to them as thanks.
Besides contributing and answers, are there any other ways that I can contribute to Stack Overflow and its family of websites? I would be happy to give a donation contribute code SFOU has been helping me tremendously, so it's only fair if I can give back something.
I have an iframe in my web app and I need to get its current url from the parent document (also when the user navigates the frame and change the original source url). Url is needed simply to social share it. As a cross-domain scenario, I don't own the child document (its a remote domain). I am aware of the same-origin-policy that prevents cross domain access from parent document to child one, but I'm looking for a solution by any creative mean possible - there has to be a way around.
I have built a basic data entry application allowing users to browse external content in iframe and enter data quickly from the same page. One of the data variables is the URL. Ideally I would like to be able to load the iframes current url into a textbox with javascript. I realize now that this is not going to happen due to security issues. Has anyone done anything on the server side? or know of any .Net browser in browser controls. The ultimate goal is to just give the user an easy method of extracting the url of the page they are viewing in the iframe It doesn't necessarily HAVE to be an iframe, a browser in the browser would be ideal. Thanks, Adam
I’ve seen the phrase “there’s this guy...” a number of times, and in each context it seems to has a different meaning (every time I just guess according to the context!) Is there any idiomatic meaning to this phrase?!
What I write should mean the following: "There is this blog, but I don't remember its name." So I thought I have to write it this way to achieve the meaning in a short way: "This blog." But is this correct? Does is mean what I want to say? Because I've learned at school that "this" points to something specific. But I that's not what I want to achieve. Sorry if the question is unclear. But I have no idea how to explain it differently.
i want to know what is the use of "using" keyword in c#, i am new to it.. when we need to use "using" keyword.. i googled it, could not be satisfied with answers. still i want to know some more from you Geeks.. Thanks
User answered the wonderful question by mentioning the using keyword. Can you elaborate on that? What are the uses of using?
Decided to put an SSD in my old Acer Aspire laptop which was running Ubuntu 16.04 with no problems. Did a new install, couldn't see wifi networks and eventually went through System settings>Software & updates>Additional drivers and downloaded the Broadcom 802.11 linux driver. Now I can see wifi networks but can't connect to my network. $ rfkill list details 0: phy0: Wireless LAN Soft blocked: no Hard blocked: no 1: brcmwl-0: Wireless LAN Soft blocked: no Hard blocked: no 2: acer-wireless: Wireless LAN Soft blocked: no Hard blocked: no $ lspci -knn | grep Net -A2 details 02:00.0 Ethernet controller [0200]: Broadcom Corporation NetLink BCM57785 Gigabit Ethernet PCIe [14e4:16b5] (rev 10) Subsystem: Acer Incorporated [ALI] NetLink BCM57785 Gigabit Ethernet PCIe [1025:0504] Kernel driver in use: tg3 Kernel modules: tg3 -- 03:00.0 Network controller [0280]: Broadcom Corporation BCM43227 802.11b/g/n [14e4:4358] Subsystem: Foxconn International, Inc. BCM43227 802.11b/g/n [105b:e040] Kernel driver in use: wl Hope someone can help me get connected before I have to put my old HDD back....
I'm having serious problems installing the Broadcom drivers for Ubuntu. It worked perfectly on my previous version, but now, it is impossible. What are the steps to install Broadcom wireless drivers for a BCM43xx card? I'm a user with no advance knowledge in Linux, so I would need clear explanations on how to make, compile, etc. lspci -vnn | grep Network showed: Broadcom Corporation BCM4322 802.11a/b/g/n Wireless LAN Controller [14e4:432b] iwconfig showed: lo no wireless extensions. eth0 no wireless extensions. NOTE: Answer below is updated every time new information is added and confirmed working.
When a question has an open bounty and no one has commented on the question yet, you see the notice for the status of the bounty and the text/link for "add comment". You can see it in effect in the following screenshot: As you can notice that the ds and the t of "add comment" are cutting in the notice's borders and invading privacy. Can this be fixed?
The following you could have seen in (sorry, I've commented there, so you won't see it anymore) in Chrome 35.0.1916.153 m (current version). Notice how the add comment link overlaps the bounty box: The same you can observe with a comment box on other sites, e.g. at this time in : Could you shift it a bit down ? It seems that it happens on more than just Stack Overflow (maybe all sites ?).
I have an odd question that (while it doesn't stop progress) is fairly annoying. Here's what I do. Shift + A -> Mesh -> UV Sphere. Pretty straight forward right? Well, once the sphere is created the options are disabled. The only couple of addons that I've installed have been Ice Tools and Retopoflow. I also downloaded 2.78b (I was in 2.78) and I'm having the same issues. I assume it may be in the saved preferences?
I have lost functionality in the tool shelf. When I click on a selector or something in the bottom part of the tool self that you can hide and unhide, nothing happens. I can see the options but when I click it doesn't work. See screenshot where it says "Add Cylinder".
I'm trying to create a function with javascript that displays all numbers with two decimal points and adds commas every three digits (1,000 10,000 100,000 etc). At first I had this: var formatNumber = function(num) { return parseFloat((num).toFixed(2)).toLocaleString(); }; This works very well but with one exception. 1.2 != 1.20 in the final output. It just shows up as 1.2 But everything else is good. 124.5879697 = 124.59, 10000 = 10,000, and 10586.357 = 10,586.36 The issue is the final output is going to display as money, so displaying 10000 as $10,000 is fine. But displaying 1.2 as $1.2 looks a little off. To get around this I tried to add the following modification: var formatNumber = function(num) { return parseFloat((Math.round(num*100)/100)).toFixed(2).toLocaleString(); }; This carries everything out to two decimal places, which is fine, but it seems to have de-activated toLocaleString because now nothing displays commas. I'm looking to use pure Javascript with this and not jQuery. It seems there are a lot of js questions on this topic about one or the other issue, but not combining both. Thank you.
I would like to format a price in JavaScript. I'd like a function which takes a float as an argument and returns a string formatted like this: "$ 2,500.00" What's the best way to do this?
Quite some time ago (perhaps 12 years ago?) I was loaned a novel which I cannot remember the name of. Someone invents a way to create stable wormholes in time too small to travel through, but used to view events in the past. Results in the removal of all personal privacy, crimes are watched in court from any angle - nothing can be hidden. People begin to walk around wearing masks with projections from these wormholes on them, so you could be wearing the face of a Roman Centurion with his facial expressions changing in real time. I don't remember too much else about the finer plot. Pretty thin on description, but if it sound familiar to you....
Read it in the 90's. I remember one specific part where the inventor of the peeking mechanic has his Eureka moment, and has the presence of mind to give a thumbs-up/wave to the future, when they look back on his Eureka moment. I also remember that they had computer screens that were like plastic cloth that they would just unfold on whatever surface was handy. Sorry I don't have much more to go on. Please and thank you!
Ability: When enters the battlefield you get {E}{E}. Does this mean if I already have one aether poisoner on the field and I play a second that the ability will stack and I'll get {E}{E}{E}{E}? If the answer to the previous question in yes, then consider the following: {U}: gains flying until end of turn. Does this mean that if I have 2 Dukhara peafowls I merely have to pay {U} once in order to give both flying?
If I have two cards called in hand and I play my first, Sin Collector (A). I use its triggered ability. "When Sin Collector enters the battlefield, target opponent reveals his or her hand. You choose an instant or sorcery card from it and exile that card." Now, I play Sin Collector (B), I use B's triggered ability. But now my question. Does Sin Collector (A)'s ability trigger again as well? 'Sin Collector' entered the battlefield again, right?
$\alpha_n \in \mathbb{R}$ is a fixed sequence of real numbers, for which the following holds: $$ \forall t \in \mathbb{R}, \lim_{n \rightarrow \infty}e^{i\alpha_nt} = 1 $$ Is it necessarily the case that $\lim_{n \rightarrow \infty} \alpha_n = 0$?
Question : Is the following true for any real number sequence $x_n$ ? "If $e^{itx_n}$ converges for every $t\in\mathbb R$, then $x_n$ converges." Note that $i^2=-1$. Motivation : We know that the converse of the above proposition is true. However, I'm facing difficulty for the above proposition. Can anyone help?
Does anyone know of good printable documents of the as-shipped Esri symbol sets, also called ? The new with Arcgis 10 ability to search symbol sets is a great boon, but one can still only find things for which you know the keywords for, and only few so many at a time on screen. I find hard copy of things like this much easier and faster to look through and locate the right one for the map at hand. For example this morning I was looking for a good glacial moraine symbol and searching the style sets didn't locate anything relevant. So I decided to bite the bullet and build my own. In the process I went browsing through the ...\Desktop10\Styles directory and discovered several pictures I've never noticed represented in any styles that would be perfect for the project I'm working on. Since they're here they very likely already exist in a symbol set and I'd be wasting my time creating them anew. Thus the desire for a printed set to help me find them. In previous versions there is a developer sample called , but it doesn't work in Arcgis 10 (and the results were pretty crude and wasted paper anyway).
ESRI has an from 2004 showing all the symbols available in ArcGIS at the time and their names. I don't need it often but if I'm searching for a certain symbol and don't know its name it's sometimes easier to look at a few sheets of paper than to use the Symbol Selector. It doesn't seem like it's been updated for ArcGIS 10, though. I was wondering if anyone is aware of a new version of this, or if anyone has created one on their own they might be willing to share.
I would really like to view the history of a post, but there doesn't seem to be a button for it. Tapping the gray "Edited" text yields no results.
Basically this suggestion for the Android app: Many times I'll see that a post has been edited on the Android app. I'll want to see exactly what was edited, and the Android app doesn't show this. Can the revision history be added to the Android app?
I'm a novice in the World of Darkness games. Most of my books are purchased piece-meal through game stores. This has been incredibly helpful in laying out the various games and editions that exist. I have around 30 books of various classic World of Darkness product lines - Vampire, Hunter, Werewolf, etc. However, most of the books don't explicitly say what version of the game they are for (1st, 2nd, revised, x20, V5, etc.). This leaves me confused about which materials are appropriate for which games - and where to put them on my shelf! How can I tell whether my books are intended for 1st, 2nd, revised, x20, or some other edition? Are there tradedress somewhere I should be observing? Or unique mechanical elements that differ?
I've recently started getting into World of Darkness and I'm realizing there are 5 different editions of sourcebooks: First edition Second edition Revised (3rd) edition V20 (4th) edition Fifth edition Is there an easy way to know what edition a sourcebook is without having to look it up? Like can you tell what edition it is by looking at the cover?
I have a line in file config.properties clean=true and use following code to get this property private static String clean; Properties prop = new Properties(); try { prop.load(new FileInputStream("config.properties")); clean = prop.getProperty("clean"); } I use System.out.println(">"+clean+"<") to see the output and get ">true<", which indicates there is no blank, no \n However, when I use if (clean == "true") { // program does not go here } else { // program goes here } what is the possible reason?...
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?
Show that ${n\choose r}={{n-1}\choose{r-1}}+{{n-1}\choose {r}}$. My try: $$\dfrac{n!}{(n-r)!\;r!}=\dfrac{(n-1)!}{(n-r)!(r-1)!}+\dfrac{(n-1)!}{(n-1-r)!\;r!}$$ Multiplying all terms by $r!(n-r)!$ $$n!=r(n-1)!+(n-1)!(n-r)$$ Dividing everything by $(n-1)!$ $$n=r+(n-r)$$ $$n=n$$ Is this correct?
I'm trying to prove that ${n \choose r}$ is equal to ${{n-1} \choose {r-1}}+{{n-1} \choose r}$ when $1\leq r\leq n$. I suppose I could use the counting rules in probability, perhaps combination= ${{n} \choose {r}}=\frac{n!}{r!(n-r!)}$. I want to see an actual proof behind this equation. Does anyone have any ideas?
$ cat text.txt my name is Steven my age is 10 i like dogs What command will be fitting so that echo "Kate" will replace Steven on text.txt?
Replacing strings in files based on certain search criteria is a very common task. How can I replace string foo with bar in all files in the current directory? do the same recursively for sub directories? replace only if the file name matches another string? replace only if the string is found in a certain context? replace if the string is on a certain line number? replace multiple strings with the same replacement replace multiple strings with different replacements
I‘ve successfully implemented a PTY (Pseudo Terminal) Function: master and slave which successfully communicate. But often when I read data from the slave, it appears to be echoing. Is there any way how to disable this ? After some research I found out, that this is possible changing the flags of the termios struct: StructTermios.c_lflag = 0; Unfortunately I didn‘t manage to disable echo in the PTY () Is there any way to do so, any ideas, suggestions, proposals, websites ... ? I would love to hear from you ❤️, Regards, from Brooks (~)
On linux, I am opening a pseudo tty on the master side. While there is no client on the slave side, the pseudo tty seems to be echoing everything I am writing to him, which is not what I am expecting. Consider the folowing code : int main(int argc, char * argv[]) { int ptyfd; int rc; /* return code */ char readbuf[3]; ptyfd = open("/dev/ptmx", O_RDWR | O_NOCTTY); die_on_error(ptyfd, "open ptmx"); /* unlock and print slave name */ rc = unlockpt(ptyfd); die_on_error(rc, "unlockpt"); printf("Slave pts name : %s\n", ptsname(ptyfd)); write(ptyfd, "C", 1); rc=read(ptyfd, readbuf, 1); die_on_error(rc, "read"); printf("read returned %c\n",readbuf[0]); return 0; } When I run this program, I would expect the read call to block, but instead it immediately returns and the readbuf content is C. How can I change this behaviour ? When the slave side is not opened, I would like the character written on the master side to either vanish or be fifoed for later reading by the slave side. Is changing the master side attributes the right way to do it ?
As I'm reading about GR a lot lately, I was wondering: how do gravitons (if they exist ofc) impact the general relativity? Since in GR, when we look at particles moving in space-time, we are only looking from geometric point of view so to say. Since gravity is represented with curvature of space-time via Einstein equations, we don't say gravity is a force that influences on bodies, gravity is just curvature affecting the bodies. So if there is a graviton (gravitons) which would be mediators of gravity as a force within or not within the Standard Model, how would this be reconciled with the view of gravity as a curvature of space and time? I would guess that this kinda question was asked by some scientists and answered, but I never really read anything on it. I don't even remember seeing gravitons mentioned in standard books about GR. Are there any explanations about it?
How can gravitions exist without violating GR, since GR says that gravity is curvature in space-time.
I'm looking for examples from history, folklore, literature, movies, or pop culture, of situations in which a person or group attempted to do something helpful but, due to their own poor judgment, incompetence, or naïveté, ended up causing harm to the people, project, or cause that they intended to help. The main idea is that the erstwhile helpers are to blame for the damage they caused, to such an extent that the fact that they meant well is no excuse. I'm asking this for the purpose of having a vivid, emotive example to use in a piece of persuasive writing, in which merely stating the fact that harm was caused is not sufficiently impactful.
I want to say "someone (or something) intends to help, but instead it makes things worse". Is there any succinct expression or phrase for this? Thanks.
When Money and Rupees are countable nouns why is "Much" used with them instead of "MANY" when asking a question like: How much money do you have? or How much does
page suggests that we use much with only uncountable nouns whereas the use of many/several is limited to countable nouns only. So I conclude that money is uncountable noun as I've heard people saying phrases like So much money! But, We do count the money in our daily life then why is it that money is considered an uncountable noun instead of countable? What if I say I have $500 to spend Wouldn't the money be considered countable in this case? Edit The question may be considered duplicate of the suggested question but, in my opinion, the question on that link itself is not answered properly.
I can't get the data to my Google Drive, see the code below: var image = ee.Image(ee.ImageCollection("LANDSAT/LC08/C01/T1_SR") .filterBounds(roi) .filterDate('2018-05-01', '2018-05-30') .sort('CLOUD_COVER') .first()); Map.addLayer(image, {bands:['B3', 'B2', 'B1'], min:0, max: 3000}, 'True colour image'); var geometry = ee.Geometry. Rectangle(roi); Export.image.toAsset({ image: image, description: 'image_seoul', scale: 30, region: geometry, maxPixels: 4020250081, crs: 'EPSG:5186' });
I want to export image to drive for my roi. For this i have specified a geometry(roi). But exported map doesn't cover the area specified and it's not showing the color palette. Is there any possible way to export a colored image (which shows in my layer) to Drive? Why it's not covering the region I have specified. Problem is in export.To.Drive section. But all the codes are given to check error that i did. Code was: var region = ee.FeatureCollection('users/karmakersourav/shape') .filter(ee.Filter.eq('NAME_1', 'Chittagong')); var addNDVI = function(image) { var ndvi= image.normalizedDifference(['B4', 'B3']).rename('NDVI'); return image.addBands(ndvi); }; var cloudMask = function(image) { var clouds = ee.Algorithms.Landsat.simpleCloudScore(image).select(['cloud']); return image.updateMask(clouds.lt(25)); }; // Select the land mask. var landMask = function(image) { var datamask = hansenImage.select('datamask'); // Create a binary mask. var mask = datamask.eq(1); return image.updateMask(mask); }; // Load a Landsat collection, apply the NDVI and cloud/water masking functions over it. var collection1 = ee.ImageCollection('LANDSAT/LE07/C01/T1_RT_TOA') .filterBounds(region) .filterDate('2008-01-01','2008-12-31') .map(addNDVI) .map(cloudMask) .map(landMask) .select('NDVI') ; print(collection1); //reducer var annualNDVI = collection1.reduce(ee.Reducer.median()); var region_NDVI = annualNDVI.reduceRegions({ collection: region, reducer: ee.Reducer.median(), scale: 30 // the resolution of the dataset }); var ndviParams = {min: -1, max: 1, palette: ['blue', 'white','green']}; var boundParams = {palette: ['black']}; Map.addLayer(annualNDVI.clip(region), ndviParams, 'NDVI', 1); Map.addLayer(region, boundParams, 'LA', 1); //here's the problem Export.image.toDrive({ image: annualNDVI, description: 'CTG_NDVi', scale: 30, region: roi, fileFormat: 'GeoTIFF', maxPixels: 1e12, formatOptions: { cloudOptimized: true } }); My imports was: var image = ee.Image("UMD/hansen/global_forest_change_2015_v1_3"), region = ee.FeatureCollection("users/karmakersourav/shape"), hansenImage = ee.Image("UMD/hansen/global_forest_change_2015"), roi = /* color: #98ff00 */ee.Geometry.Polygon( [[[91.26571433292804, 22.382447200369512], [91.70516745792804, 22.24015355729955], [91.81503073917804, 21.50608889294255], [91.99081198917804, 21.158146277513005], [92.36434714542804, 20.74775339022756], [92.38631980167804, 21.362918378188724], [92.68868864595584, 21.285515736407884], [92.66671598970584, 22.12251851402064], [92.42501677095584, 22.964696114885136], [92.43600309908084, 23.237540932485988], [92.31515348970584, 23.620600408965007], [92.21627653658084, 23.781555321668222], [92.04049528658084, 23.691042604440895], [91.90865934908084, 23.731278240693108], [91.89767302095584, 23.47960242153599], [91.75485075533084, 23.28800680321665], [91.77682341158084, 23.08602889002461], [91.61202848970584, 22.99503954262493], [91.46920622408084, 23.277915158047364], [91.34835661470584, 23.308187798303887], [91.22750700533084, 23.600467103459394], [91.28243864595584, 23.872005072934794], [91.32638395845584, 24.082808607079368], [91.24947966158084, 24.263221977268092], [91.06271208345584, 24.223152164577193], [90.73312223970584, 23.88205115062075], [90.63424528658084, 23.660857737733508], [90.54635466158084, 23.328365731356676], [90.65621794283084, 22.83312931280329], [90.98580778658084, 22.437667249990497], [90.98580778658084, 22.071621721722586]]]);
I used to run wireshark on ubuntu 17.04 with ~/$ sudo wireshark but now (just after update to 17.10) when I write the same I get an error ~/$ sudo wireshark QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root' Invalid MIT-MAGIC-COOKIE-1 keyQXcbConnection: Could not connect to display :0
I installed Ubuntu 17.10. Now I am having trouble with gksu: $ gksu -dg synaptic No ask_pass set, using default! xauth: /tmp/libgksu-HgUjgQ/.Xauthority STARTUP_ID: gksu/synaptic/8760-0-alex-XPS-15-9530_TIME4974977 cmd[0]: /usr/bin/sudo cmd[1]: -H cmd[2]: -S cmd[3]: -p cmd[4]: GNOME_SUDO_PASS cmd[5]: -u cmd[6]: root cmd[7]: -- cmd[8]: synaptic buffer: -GNOME_SUDO_PASS- brute force GNOME_SUDO_PASS ended... Yeah, we're in... Unable to init server: Could not connect: Connection refused (synaptic:8767): Gtk-WARNING **: cannot open display: :1 xauth: /tmp/libgksu-HgUjgQ/.Xauthority xauth_env: (null) dir: /tmp/libgksu-HgUjgQ If I don't use -g, the password dialog is disabled. So looks like a problem with creating a tty for root. Any advice?
The language has three unary function symbols f,g and h. The domain is a square if the model is a model of this sentence and the domain is finite.
(c) Let $\mathcal{L}^*\subseteq\mathcal{L}^{\text{FOPC}}$ be a first order language of predicate calculus consisting of three unary function symbols $f,g,h$. (i) Write down an $\mathcal{L}^*$-sentence $\phi$ such if $\mathcal{A}$ is an $\mathcal{L}^*$-structure with $\mathcal{A}\vDash\phi$ then the restriction of $h_\mathcal{A}$ to the range of $f_\mathcal{A}$ gives a one-to-one function onto the range of $g_\mathcal{A}$. (ii) Write down an $\mathcal{L}^*$-sentence $\psi$ such that if $\mathcal{A}$ is an $\mathcal{L}^*$-structure with $\mathcal{A}\vDash\psi$ and the domain $A$ of $\mathcal{A}$ is finite then the cardinality $|A|$ is a square. Part (i) is easy enough, but I'm having trouble with part (ii). I assume that you can use part (i). My initial idea was to use $h$ to ensure $|Range(f_A)| =|Range(g_A)|$ but I'm not sure where to go from there. Thanks.
public static void main(String[] args) throws IOException { RbnRunner runner = new RbnRunner(); runner.run(); } public void run() throws IOException { System.setProperty("webdriver.chrome.driver", "/Users/me/samples/Adam_milford/src/chromedriver"); WebDriver driver = new ChromeDriver(); but when I want to init a headless selenium driver instead of Chrome driver, the code failes: public static void main(String[] args) throws IOException { WebDriver driver = new HtmlUnitDriver(); why is that? Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/http/impl/conn/PoolingClientConnectionManager at com.gargoylesoftware.htmlunit.HttpWebConnection.createHttpClient(HttpWebConnection.java:536) at com.gargoylesoftware.htmlunit.HttpWebConnection.getHttpClient(HttpWebConnection.java:500) at com.gargoylesoftware.htmlunit.HttpWebConnection.setUseInsecureSSL(HttpWebConnection.java:711) at com.gargoylesoftware.htmlunit.WebClient.setUseInsecureSSL(WebClient.java:1096) at org.openqa.selenium.htmlunit.HtmlUnitDriver.createWebClient(HtmlUnitDriver.java:263) at org.openqa.selenium.htmlunit.HtmlUnitDriver.<init>(HtmlUnitDriver.java:129) at org.openqa.selenium.htmlunit.HtmlUnitDriver.<init>(HtmlUnitDriver.java:172) at org.openqa.selenium.htmlunit.HtmlUnitDriver.<init>(HtmlUnitDriver.java:168) at RbnRunner.run(RbnRunner.java:40) at RbnRunner.main(RbnRunner.java:28) Caused by: java.lang.ClassNotFoundException: org.apache.http.impl.conn.PoolingClientConnectionManager at java.net.URLClassLoader.findClass(URLClassLoader.java:381) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ... 10 more
I am getting a NoClassDefFoundError when I run my Java application. What is typically the cause of this?
Calculate the ring of integers of quadratic number field $\mathbb{Q}(\sqrt{d})$ Solution: Let $F$ be an algebraic number field. Then an element $b\in F$ is integral iff it monic irreducible polynomial has integer coefficients. For example, $\sqrt{d}$ for integer $d$ is integral. If $d\equiv 1 \mod 4$, then the monic irreducible polynomial of $(1+\sqrt{d})/2$ over $\mathbb{Q}$ is $x^2 -x + (1-d)/4 \in \mathbb{Z}[x]$, so $(1+\sqrt{d})/2$ is integral. Thus the integral closure of $\mathbb{Z}$ in $\mathbb{Q}(\sqrt{d})$ contains the subring $\mathbb{Z}[\sqrt{d}]$, and the subring $\mathbb{Z}[(1+\sqrt{d})/2]$ if $d\equiv 1 \mod 4$. We show that there are no other integral elements. An element $a+b\sqrt{d}$ with rational $a$ and $b\neq0$ is integral iff its monic irreducible polynomial $x^2 -2ax +(a^2 -db^2)$ belongs to $\mathbb{Z}[x]$. Therefore, $2a$,$2b$ are integers. If $a=(2k+1)/2$, for $k\in\mathbb{Z}$, then it is easy to see that $a^2 - db^2 \in \mathbb{Z}$ iff $b=(2l+1)/2$ for some $l\in\mathbb{Z}$, and $(2k+1)^2 - d(2l+1)^2$ is divisible by 4. The latter implies that d is quadratic residue modulo 4, i.e. $d\equiv 1 \mod 4$. In turn, if $d\equiv 1 \mod 4$ then every element $(2k+1)/2 +(2l+1)\sqrt{d}/2$ is integral. Thus, integral elements of $\mathbb{Q}(\sqrt{d})$ are equal to $\mathbb{Z}[\sqrt{d}]$ if $d\not \equiv 1 \mod 4$, and $\mathbb{Z}[(1+\sqrt{d})/2]$ if $d\equiv 1 \mod 4$. Can someone explain why $\sqrt{d}$ for integer $d$ is integral, and why the monic irreducible polynomial of an integral element $a+b\sqrt{d}$ is of the form $x^2 -2ax +(a^2 -db^2)$?
Quadratic integer ring $\mathcal{O}$ is defined by \begin{equation} \mathcal{O}=\begin{cases} \mathbb{Z}[\sqrt{D}] & \text{if}\ D=2,3\ \pmod 4\\ \mathbb{Z}\left[\frac{1+\sqrt{D}}{2}\right]\ & \text{if}\ D=1\pmod 4 \end{cases} \end{equation} where $D$ is square-free. I understand $\mathbb{Z}\left[\frac{1+\sqrt{D}}{2}\right]$ is not closed under multiplication if $D=2,3\pmod 4$. But still, isn't it more natural to define $\mathcal{O}=\mathbb{Z}[\sqrt{D}]$ for all square-free $D$? (in that case, it really seems like 'quadratic integer') I wonder what is the motivation of this definition.
I have copied the latest Ubuntu .iso to a CD and tried to boot directly from this CD. After verifying that the setup in my PC does try to go to the CD reader first for booting (in fact I have set this at times to be the only boot device), I am unable to boot. Is simply copying the .iso file to the CD not sufficient to make this a boot disk?
I would like to see a full how-to guide on how to install Ubuntu.
I am a new user to Ubuntu, presently using Ubuntu 13.04 32-bit. I can't install any software from the Ubuntu Software Center. I am getting errors such as: failed to download repository information.
Whenever I try to install anything with the Ubuntu Software Center, the following error appears. Failed to download repository information Check your Internet connection. E:Unable to parse package file /var/lib/apt/lists/partial/archive.ubuntu.com_ubuntu_dists_precise_multiverse_i18n_Index (1)
This is my first time multiclassing a character. I wanted to multiclass my bard with something, and I wanted to make sure I have the rules for multiclassing correct - because with my understanding, there's no way what I'm about to say could make sense. Important Stats: Charisma: 19 (+4), Intelligence: 19 (+4) My 6th-level College of Lore Bard knows 9 spells. My feature Additional Magical Secrets gives me 2 more spells. If I read the multiclassing rules correctly, then by multiclassing into wizard, my character can then prepare 5 more spells out of his 6 from his spellbook. So in total: 9 Known + 2 + 5 Wizard = 16 Spells he knows at once. Is this right? For a level 7 character, that seems like a lot. (Side note: I understand the number of spell slots I can use.)
If I multiclass into 2 or more classes/subclasses that can cast spells, how do I determine what spells I know or can prepare? For instance, if I am playing a multiclassed character with 1 level in warlock, 2 levels in bard, and 3 levels in paladin, how do I determine which spells I know/have prepared? Related:
I want to the tex files from PDF files. I have the PDF files that I get in Internet and have a lot of mathematics, so I want to convert PDF files into tex files. I researched in these forum, and following links may be related ,but I couldnt understand clearly. Please teach me are there any ways, or teach me how to use. Thank you. January,3rd i added. What i want is OCR,not embedded. i want pdf or images to detect the text words into tex.
I know that hardly any information is passed to the PDF when a .tex file is compiled. But is there a tool that can convert a PDF document back to (La)TeX?
I keep getting this error: Exception in thread "main" java.lang.NullPointerException. I'm not sure what's wrong here.. String[][][][] fourDArray = new String[numOfModules+1][3][][]; String[] x = new String[1]; x[0] = splitArray[0]; fourDArray[0][0][0] = x;
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?
Hello masters of MS SQL I have a kind of a problem on my hands. We have quite big DB (5TB) and we've just "enabled" some software archiving which means that most of the data will migrate to other DB's. In other words, this big DB is now almost empty with data and will not grow anymore. The issue here is I have a big file that I need to shrink (space problem). And I wonder how should I approach this problem? Shrinking will probably take quite a while and I am not sure what will happen if something goes wrong and if it's OK to do backups in the middle of shrinking. Can somebody help me with this issue and shine a little light on this matter? This is current situation (data is still being deleted, and I assume we will land at 300~500 GB size) Thank you in advance
This question is asked in various forms here but the question boils down to: I know shrinking a database is risky. In this case, I've removed so much data and I'll never use it again. How can I shrink my database? What files do I shrink? What should my considerations be while doing this? Should I do anything after? What if it is a large database? Can I shrink it in smaller increments?
I feel that there should be a period of time after a bounty expires before it is automatically assigned. This way, each bountied question can have its full 7-day timespan for meaningful answers to be added, and no bounty offerer will have to cut a bounty period short or risk missing out on being able to assign a bounty. A period of 12-72 hours would be more than sufficient IMO.
Since is not really intended behaviour apparently, I propose a period of 24 hours after the bounty has expired during which the question will not be on the featured tab but the promoter can still manually award the bounty. The "cost" of this would be that no new bounty could be set up until the old one were awarded. Similar to , which got closed as a duplicate without duplicate link... (Well, according to Robert's comment there, it's , to which he replied with basically what I am proposing here, but an answer is not a feature-request...)
One a game I am making I have a saving bug. I have an alert with the PHP message. It gives me an SQL error. The problem is obvious. That last comma before the parentheses shouldn't be there. The question is why is it there? In my code, it isn't. This is the alert message. The statement is like this. > $query2 = "INSERT INTO users VALUES ('$village', $power, $influence, $gold, NULL, $ore, $wood, $food, $honor, $keep, $mine, $sawmill, $farm, $barracks, $tavern, $stables, $temple, $militia, $warriors, $spearmen, $clubmen, $swordsmen, $archers, $vanguards, $legion, $crossbowmen, $knights, $mercs, $mercelites, $bandit1, $bandit2, $bandit3, '$faction', $dwellings, $dwellingscost);"; One of my theories was that the dwellingscost variable had a comma at the end. It is posted from an AJAX request. If you need some of that code to decipher just ask.
If user input is inserted without modification into an SQL query, then the application becomes vulnerable to , like in the following example: $unsafe_variable = $_POST['user_input']; mysql_query("INSERT INTO `table` (`column`) VALUES ('$unsafe_variable')"); That's because the user can input something like value'); DROP TABLE table;--, and the query becomes: INSERT INTO `table` (`column`) VALUES('value'); DROP TABLE table;--') What can be done to prevent this from happening?
Analyze the convergence of $$\sum\frac{1}{n(\log(n))^c}.$$ I know that it diverges for $c\leq1$ by using comparision test and integral test for convergence through the $$\int_{2}^{\infty}\frac{1}{x\log x}dx= \log(\log(\infty))-\log(\log2)$$ I also have a gut feeling that it converges for $c>1$ but not able to prove so. Please try explaining through less exotic methods by not resorting to weird convergence test theorem. Thanks!
We all know that $\displaystyle \sum_{n=1}^{\infty} \frac{1}{n^s}$ converges for $s>1$ and diverges for $s \leq 1$ (Assume $s \in \mathbb{R}$). I was curious to see till what extent I can push the denominator so that it will still diverges. So I took $\displaystyle \sum_{n=2}^{\infty} \frac{1}{n\log n}$ and found that it still diverges. (This can be checked by using the well known test that if we have a monotone decreasing sequence, then $\displaystyle \sum_{n=2}^{\infty} a_n$ converges iff $\displaystyle \sum_{n=2}^{\infty} 2^na_{2^n}$ converges). No surprises here. I expected it to diverge since $\log n$ grows slowly than any power of $n$. However, when I take $\displaystyle \sum_{n=2}^{\infty} \frac{1}{n(\log n)^s}$, I find that it converges $\forall s>1$. (By the same argument as previous). This doesn't make sense to me though. If this were to converge, then I should be able to find a $s_1 > 1$ such that $\displaystyle \sum_{n=2}^{\infty} \frac{1}{n^{s_1}}$ is greater than $\displaystyle \sum_{n=2}^{\infty} \frac{1}{n (\log n)^s}$ Doesn't this mean that in some sense $\log n$ grows faster than a power of $n$? (or) How should I make sense of (or) interpret this result? (I am assuming that my convergence and divergence conclusions are right).
I am creating an online shooting game. How do i control my armature arm with mouse like other online games? So the gun will always shoot to the middle of the target. Previously, I successfully done that by seperating the arms and the arms armature and use game logic to set mouse actuator on it.But i just changed my rig to improve the movement . I tried the same method but it didn't work. Here is the file. Really hope you can help me with it. Been struggling with this for the whole day.
I've been researching this for weeks and only found bad results. I think its time for a good answer. I have a rocket launcher, so I can't "fake" the bullet. There is no way to fake a rocket. I need it to shoot from the front of the gun and fly to the center of the screen. Of course I could just make the weapon slanted to the center, but if you look at far targets, it will miss; and if you look at close targets it will also miss. Can I have an empty in the center of the screen that just collides with obstacles, and the gun just adds the projectile to make it always hit center? If that's the case, I would kindly ask for help on how to do that. If there is a better technique, please state it, it would help a lot! -People said they are confused, let me explain more thoroughly. I want to have a line in front of the camera that collides with obstacles(for example, and object with property "obstacle" set to 1), that is stopping at infinity, but there is will obviously always be an obstacle to hit, such as a roof if you look up(indoor). The empty will always track to the very end of the line, so if you aim somewhere close, the rocket will hit center of screen and hit the close object, and if you hit far, on the other hand, the rocket will fly to center of screen and hit the obstacle still. So you will basically always hit the center of the screen no matter what.