Let's say we're in ZF. How would we prove the following theorem?     Let $S$ be a set such that $S \neq \emptyset$. There exists some   function $f$ such that $f(S) \in S$.   It seems easy if you can start with     Let $a \in S$, define $f = \{S\} \times \{a\}$.   But I'm not sure how ZF allows you to do that.

Suppose I have a non-empty set $A$.     How do I choose an element $x\in A$?   More precisely, I believe I would like to find a formula $P(x,y)$ of ZF such that for every non-empty set $y$ there is exactly one $x\in y$ such that $P(x,y)$ is true.  I have thought about this for a while without success and I am beginning to doubt such a formula is even possible. But in mathematical proofs it is quite common to "choose a fixed element" from a non-empty set. So how exactly do we achieve such a thing? Am I missing something?  Thank you in advance.


I am a frequent user of StackOverflow. Many beginner questions contain code that has no formatting at all, some even close to winning a code obfuscation contest. I try to answer even beginner questions, and what I end up doing is just copying the code snippet, pasting it into my favorite IDE/editor, format it, then paste it back and edit the question.  What I'd very much like to see is an automatic code formatting feature on the site. Is it so hard to implement one? Are there reasons for not implementing it? (I.e., lack of time/resources/other motives)?  For example, implementing a plugin similar to , at least for common languages.

Often I see code blocks pasted into questions with no formatting, or terrible formatting.  It's sometimes quite a chore to fix these: you have to either manually space out each line, or paste the code into an IDE, format it there, and paste it back.  Could we have a button/function where you could highlight a code block, and it would turn this:  foreach (var i in stuff) { if (i==1) { Whatever(); } }   into this:  foreach (var i in stuff) {   if (i==1) {     Whatever();   } }   I realise the function would have to work differently based on the language in the code block. Perhaps  it could use the same rules as the prettify code.  Also, it wouldn't be a big deal if it gets the language wrong and breaks the code, since you can always just ctrl+z.


I am trying to work on the data of my master thesis. I have to create some model, but I am stuck due to my lack of knowledge in statistics (I am working on it). My data are 58 sample points each has two value: altitude and diversity index related to habitat heterogeneity. What I sample are different insects and I have two values: sp = number of species for each sample point and ab = abundance of insects for each sample point. What I wonder is if the number of species or the altitude is related to altitude or diversity index. My question is what should I use Linear mixed effect or generalized linear model?and in case which family? Poisson? but the most important question is how do I choose one or the other? my data looks like this: P.S: any literature is appreciated.


Whenever I get a game on the E-Shop, it lets me know that said game takes a certain amount of blocks.  Sometimes it'll let me know I need to make room for more blocks to download some games.  How much memory is in a block?

Storage on the 3DS' SD card is calculated in the 3DS eShop using strange units called 'blocks'. While these may have been an attempt to simplify things for the average user, it also makes it much harder to do things like estimate the download time for a piece of software or how many demos I could fit onto an SD card. So for these purposes I wish to find out, how big exactly is a 'block', in terms of actual bytes?


Here is a small sample to show what is causing the linker error: my_class.h #include <map>  template <typename T, typename U> class my_class { public:     using map_type = std::map<T, U>;      auto get_map() -> map_type&; private:     map_type _my_map; };  my_class.cpp #include "my_class.h"  template<typename T, typename U> auto my_class<T, U>::get_map() -> map_type& {     return _my_map; }  main.cpp #include "main.h"  int main(int argv, char* args[]) {     my_class<int, char> c;     auto& map = c.get_map(); // <== Error here }  The linker error is as follows: Undefined symbols for architecture x86_64:   "my_class<int, char>::get_map()", referenced from:       _main in main.cpp.o  I found that if I implement my_class::get_map inside of main.cpp, there is no linker error. It seems to only happen if the implementation is in a different translation unit. Here are my compiler details: Apple clang version 11.0.3 (clang-1103.0.32.62) Target: x86_64-apple-darwin19.5.0 Thread model: posix InstalledDir: /Library/Developer/CommandLineTools/usr/bin

Quote from :     The only portable way of using templates at the moment is to implement them in header files by using inline functions.   Why is this?  (Clarification: header files are not the only portable solution. But they are the most convenient portable solution.)


Let $G$ be a group. If there is a homomorphism $f:G\to G$ (special case of the codomain being arbitrary group), then the kernel $f^{-1}(id)$ is a normal subgroup of $G$.  But now the other way around: Start out with the existence of a normal subgroup $H$ of $G$. Is there necessarily a homomorphism $f:G\to G$ such that the kernel of $f$ is $H$?

Let $G$ be a group, and let $N$ be a normal subgroup of $G$. Then there is the canonical homomorphism $\phi$ of $G$ onto $G/N$ with kernel $N$. This homomorphism is defined as follows: $\phi(g) \colon= Ng \ $ for all $g \in G$.   In which cases can we also define a homomorphism $\psi$ of $G$ into $G$ with kernel equal to $N$? Of course we can do so when $N$ is either $\{e\}$ or $G$ itself. Could there be any other cases when this is possible?   I know that this is not always possible: e.g., consider $Z$ under addition with subgroup $2Z$. Now if there were a homomorphism $\psi$ of $Z$ into $Z$ with kernel equal to $2Z$, then we would have $Z_2 \cong Z/2Z$, which in turn is isomorphic to a subgroup of $Z$, thereby making $Z_2$, a group of order $2$, isomorphic to a subgroup of $Z$. However, every subgroup of $Z$ other than $\{0\}$ is of infinite order.


In Windows, you can use the Win key + arrows to snap windows to half the screen.  Is there a OSX equivalent?   I found a program that does this called .  It worked well, but it was just a trial version.  It has more features than I care about and costs to much (IMO).    Are there any other programs that are free or cheaper that do the same thing?

Coming from Windows I have gotten extremely used to the Windows Snap feature, which resizes a window when it's dragged to the screen edges.  However, it's not built into OS X. Are there any 3rd party utilities that add this functionality?


I am trying to create a mathematical formula to convert meters to decimal degrees.  Reading this article , I thought this generic formula:  x = (Value_in_meter * 0.00001)/1.1132  But I know it is not 100% correct, I should use the other values according where is my point.  I am using Google Maps Api, so, how to discover if my point is at 23N/S, 45N/S or 67N/S?  Complementing  I did this function:  public static double convertMeterToDegrees(double meter, double latitude){      double quotient;     double degree = Math.floor(latitude);     double modDegree = Math.abs(degree);      if (modDegree == 0){         quotient = 1.1132;     } else if (modDegree <= 23){         quotient = 1.0247;     } else if (modDegree <= 45){         quotient = 0.7871;     } else {         quotient = 0.43496;     }      return (meter * 0.00001)/quotient; }   Is it correct?

I am wanting to find a latitude and longitude point given a bearing, a distance, and a starting latitude and longitude.  This appears to be the opposite of this question ().  I have already looked into the haversine formula and think it's approximation of the world is probably close enough.  I am assuming that I need to solve the haversine formula for my unknown lat/long, is this correct? Are there any good websites that talk about this sort of thing? It seems like it would be common, but my googling has only turned up questions similar to the one above.  What I am really looking for is just a formula for this. I'd like to give it a starting lat/lng, a bearing, and a distance (miles or kilometers) and I would like to get out of it a lat/lng pair that represent where one would have ended up had they traveled along that route.


as the title says, I am wondering how you would encrypt the code inside of a project, more specifically a C# .net application, I don't want other people using various things like '.NET reflector' and getting the 'source' from my program, any help? Thanks in advance.

My product has several components: ASP.NET, Windows Forms App and Windows Service. 95% or so of the code is written in VB.NET.  For Intellectual Property reasons, I need to obfuscate the code, and until now I have been using a version of dotfuscator which is now over 5 years old. I'm thinking it is time to move to a new generation tool. What I'm looking for is a list of requirements which I should consider when searching for a new obfuscator.  What I know I should look for so far:   Serialization/De-serialization. In my current solution, I simply tell the tool not to obfuscate any class data members because the pain of not being able to load data which was previously serialized is simply too big. Integration with Build Process Working with ASP.NET. In the past, I have found this problematic due to changing .dll names (you often have one per page) - which not all tools handle well.


Let $R$ a principal ideal domain and $M$ a cyclic $R$-module of order $\alpha$. Show that for each divisor $\beta$ of $\alpha$ there is a unique submodule of order $\beta$.   Note: below $\langle\cdot\rangle$ stay for ideal generator and $\langle\!\langle\cdot\rangle\!\rangle$ stay for (sub)module generator.  My work so far:  By the uniqueness of the cyclic decomposition on primary submodules of a torsion module it is enough to see the case when $\alpha=p^n$ for some prime $p$.  I already know that $\tau: \langle\!\langle v\rangle\!\rangle\to R/\langle p^n\rangle,\, rv\mapsto r+\langle p^n\rangle$ is a $R$-module isomorphism and so it is enough to check that the submodules $\langle\!\langle p^{n-j}+\langle p^n\rangle\rangle\!\rangle$ are the unique submodules of order $p^j$ in $R/\langle p^n\rangle$.  If $x\in R$ induces a submodule of order $p^j$ in $R/\langle p^n\rangle$ then it is clear that $x=r p^{n-j}$ for some $r\in R$, and so $x\le p^{n-j}$ as induced submodules with equality when $r$ is a unit.  However I get stuck trying to show that $r$ must be necessarily an unit. Some help will be appreciated, thank you.

Suppose $\langle v\rangle$ is a cyclic module over a PID of order $a$. Then there is a cyclic submodule of order $b$ for any  $b$ dividing $a$. Namely, $\langle cv\rangle$, where $c$ is such that $bc=a$ in $R$.   I know that a finite cyclic group has a unique cyclic subgroup for each divisor of the order of the group. For cyclic modules over a PID, is it still true that a cyclic submodule of order dividing the order of the given module is also unique? If so, why?  Any submodule of $\langle v\rangle$ necessarily has form $\langle rv\rangle$ for some $r\in R$. If $\langle cv\rangle$ and $\langle rv\rangle$ both have order $b$, then it follows that $$ b=\frac{a}{\gcd(c,a)}=\frac{a}{\gcd(r,a)} $$ so $\gcd(c,a)=\gcd(r,a)$ but I can't tell if $\langle cv\rangle=\langle rv\rangle$.


Sometimes we need to refer to something without knowing will it be singular or plural. How to write such things in formal writing?  Version 1     No valid input files found.         Make sure the input field contains at least one ".adoc" file.   Make sure this file (these files) does exist.      Version 2     No valid input files found.         Make sure the input field contains at least one ".adoc" file.   Make sure this file(s) does exist.      Or something different?

I am not sure if the singular or plural forms should be used in the following. Some people go for the plural, but it doesn't seem to have a plural antecedent.     Each month, the school holds a party. This event is / These events are/ successful because it attracts / they attract over two hundred students.   I'd appreciate your help.


In the The Husbands of River Song The Doctor goes to the ship and asked the female  DOCTOR: Do I know you? RIVER: You most certainly do not.  then he realizes its River but they say  RIVER: Don't use my name. Ever. How do you know me?  then he says  DOCTOR: Well, it's a tiny bit complicated. People usually need a flowchart  then he tries to get her to reconize him  DOCTOR: No, wait. That's your husband? RIVER: My husband, your patient. King Hydroflax. DOCTOR: Yes, that's who you're married to? Not anybody else? HYDROFLAX: My love, attend me, woman! RIVER: I fly to you. Is there a problem? DOCTOR: Right. So you don't recognise me, then? RIVER: Why would I recognise you? Later DOCTOR: Oh, no reason. DOCTOR: I'll be the judge of that. I'm the Doctor. RIVER: You know who you remind me of? DOCTOR: Yes, probably a chap with a big RIVER: My second wife. Then again  DOCTOR: You know, don't you? RIVER: Know what? DOCTOR: Stop pretending. You know who I am. RIVER: Who are you? DOCTOR: You know who I am. It's, it's, it's me. RIVER: Great. Who are you?  Then later at the diner she says  RIVER: When you love the Doctor, it's like loving the stars themselves. You don't expect a sunset to admire you back. And if I happen to find myself in danger, let me tell you, the Doctor is not stupid enough, or sentimental enough, and he is certainly not in love enough to find himself standing in it with me! then she recognizes him and he says DOCTOR: (sotto) Hello, sweetie.  Why didn't River recognize the 12th Doctor? when he said Yes, probably a chap with a big  was he talking about the 11th doctor matt smith or 10th doctor david tennet?

In this year's Christmas special The Husbands of River Song, why did River      take so long to realise that the man accompanying her was in fact the Doctor?   For most of the episode, I assumed      she'd forgotten all about him or had her memories removed or something, as she was so dull-headedly missing all the glaring hints he was dropping.   But this doesn't appear to be the case, as      she eventually does realise, without any immediate prompting.   So how come this didn't happen earlier? The last thing River seems to be is stupid!  And the other side of the coin: how come it did happen when it did? Did all the pieces of the puzzle finally slide together in her head, or was there some specific prompt at that moment which I missed?


I have an iPhone 4s that is running iOS 7.04 and won't update. It requires iOS 8.0 or newer to install any apps.   How can I download iOS 8.0 or newer on my iPhone 4s?

I'm trying to downgrade my iPhone from the current iOS to an older one, as per .  But every time I try, I always receive this error:     The iPhone could not be restored. This device isn't eligible for the requested build.     I have tried many times with and without DFU mode. Any ideas regarding this?


I am confused by my test results:  Set<opportunity> setOpp = new Set<opportunity>(); Opportunity opp = [select Id,CloseMonthText__c from Opportunity where     id='0067000000hqu5X']; for(integer i=0;i<10;i++){     opp.CloseMonthText__c='A'+i;     setOpp.add(opp); } System.debug('SetOpp: '+setOpp); System.debug('size: '+setOpp.size());  For(opportunity o:setOpp){     System.debug(o); }   The output I get is something like this:     SetOpp: {Opportunity:{Id=XXXX,CloseMonthText__c=A9}}      Size: 10      Opportunity:{Id=XXXX,CloseMonthText__c=A9      Opportunity:{Id=XXXX,CloseMonthText__c=A9      Opportunity:{Id=XXXX,CloseMonthText__c=A9      Opportunity:{Id=XXXX,CloseMonthText__c=A9      Opportunity:{Id=XXXX,CloseMonthText__c=A9      Opportunity:{Id=XXXX,CloseMonthText__c=A9      Opportunity:{Id=XXXX,CloseMonthText__c=A9      Opportunity:{Id=XXXX,CloseMonthText__c=A9      Opportunity:{Id=XXXX,CloseMonthText__c=A9      Opportunity:{Id=XXXX,CloseMonthText__c=A9   I know that set detect duplication of SObject by checking all the fields of the record. I think Set stores a reference to the actual instance. In the for loop it's also changing the referenced value of set. How come the set size is 10? Can anyone explain the output?

In Dan Appleman's book Advanced Apex Programming, he explains how using SObjects as Map keys (i.e. Map<SObject, *value*>) is supported but it's poor practice, since the key is actually determined by a hash of all the fields on that SObject key - so if there's a change to even just one field, the key is changed.   My question is - why is this supported? I'm having trouble thinking of even one case where using this type of collection would be desired? The point of using a Map is to be able to retrieve data based on semantic-trivial, immutable data (such as IDs)...


Astronomical telescope has a small eye piece and a large objective lens. Whereas a compound microscope has a large eye piece and small objective lens. Therefore can we use astronomical telescope as compound microscope by viewing it from objective lens?

In compound microscope, we take such an objective lens which has small focal length. While in astronomical telescope, we take such an objective lens which has large focal length.   Why don't we use same objective lens in both? The function of both the devices is to enlarge an object at infinity.


My custom panel work good in the VIEW_3D space.  bl_label = "My Panel" bl_space_type = "VIEW_3D" bl_region_type = "UI" bl_category = 'MY'   I want to display panel in two spaces: VIEW_3D and IMAGE_EDITOR.  I try write so:  bl_label = "My Panel" bl_space_type = "VIEW_3D", "IMAGE_EDITOR" bl_region_type = "UI" bl_category = 'MY'   but it doesn't work. How to make it right?

So I'm not sure if this will be possible at all, but someone might have an idea for a workaround for this problem.  So if I have made a toolbar, e.g. (short version)  class add_item(Panel):     bl_space_type = 'VIEW_3D'     bl_region_type = 'TOOLS'   But I would like to have this toolbar placed in multiple toolbars so it'd become something like this (code below doesn't actually work, just an example of what I'd like):  class add_item(Panel):     bl_space_type = ['VIEW_3D', 'IMAGE_EDITOR', 'NODE_EDITOR']     bl_region_type = 'TOOLS'   Would something similar to this be possible to do without duplicating all the code for the toolbar multiple times, just to then change the bl_space_type?


Had an unexpected system shutdown occur at probably the worst possible moment, while a chkdsk /r /f /x operation was underway on a local drive, and now I suspect the boot sector is unreadable, so no partitions are being found on the drive. Physical damage to the drive is not suspected in this instance, and this was not the operating system drive, so the system is bootable.  What would you recommend as the best way to restore the partition or recover the data?  Here's what I'm currently doing (please correct me if any of this is incorrect or unwise)   Ran  data recovery utility Selected option: [Create] log file Selected the volume with the missing partition (volumes appeared in the list both using their physical descriptors and their windows-assigned drive letters, I selected the non-drive-letter option. Selected [Intel] as the partition table type Selected [Analyze] TestDisk reported a partition read error:  TestDisk now appears to be performing a deep scan to figure out what's on the drive:    Is this the correct utility to use to try to fix this and the correct way to go about it? Are there any other cautions or recommendations I should consider, or things to expect once the scan is done? (This is a 4TB drive, so I expect it to take a long time.)  (I'm primarily following the instructions listed .)  Thank you so much!

I had a Windows 7 installation on my 1TB SSD laptop with 4 primary partitions. I wanted to install Lubuntu Linux but the process failed with an error which kind of said:     cannot write MBR   It gave me an option to put an MBR somewhere else or to boot without MBR. None of these options worked and it became a useless install. After this failed dual boot attempt, Windows would give a BSOD wit Code 007 ending - translated to inaccessible boot device. That is a huge NTFS partition and I don't think I have any other media to back it up before formatting it.  My only option is somehow rebuilding the old MBR. Hence I started creating a whole bunch of live USB boot environments  including Super GRUB Disk and MiniTool Partition Editor Live CD, but none of this could ever help me recover my lost MBR.  Win PE 4.0 reported the partition as bad disc and the latest version did not even have an option for MBR. I managed to create a live USB with Testdisk Running on Ubuntu. Whatever partition was seen as HPFS on quick  search was written in the MBR and after this the disc is totally unreadable. Earlier I could see my data through Linux and now I can see nothing.  Here are my questions:   When some data could be read (but Windows would not boot) the MBR was shown as dynamic MBR. As far as I know dynamic MBR is a Windows concept and my Linux attempt would not have converted it. While installing Linux I tried to delete 2 primary partitions which I found to be not really useful (I backed up their data first). So I am not sure what created the dynamic MBR.  Did my dual install convert those basic MBR to dynamic MBR? How did that happen? Here is a screenshot of my deep search attempt with TestDisk which is still in progress. I can see 4 NTFS partitions and one of these two system partitions should be the original MBR. When I tried to write both these system partitions (after stopping the deep search momentarily) I got an error like "partition not found". The file system utility showed me that there is no backup sector and that may be the reason why it cannot be read.  What other Resorts do I have, other than doing a plain format and then using some recovery tool to recover all my lost data? I am not even sure I will recover the folder names.  What other options should I be trying to restore my old MBR so Windows can boot?      Update  as of last I managed to create a live USB w/ W7  I used AOMEI Partition assistant 6.0 and on deeper  search I can see the 909 gb partition - it wont let me select it for recovery. I am sorry if my earlier Q was not clear. I referred to restoring an MBR from a partition . What happened earlier  - superficial search revealed all old partitions but NOT this one   and the later partitions showed up on Deep search & I can select Other partitions for recovery but for this one. It wont let me select the partition I want  Here are some more screen shots    So in summary all that happened is   4 primary windows 7 partition -->  wanted to install Linux so I deleted 2 non bootable partitions after backing them up  ended up with BSOD ( inaccessible boot device ) and noticed that some windows partitions showed up as Dynamic MBR  (using Live USB Linux,gparted )  Use standard testdisk procedure to write MBR from the superficial NTFS-HDFS partition.  this is where I screwed up . Hindsight I should have really done a deep search and caught the 901gb partition to write MBR. I am not sure if I can undo this action  after this - life gets worse. I am  on a ventilator ! Now C is unreadable by windows and linux both and testdisk cannot list file ( see screenshots ) and I have been using a series of live USB's with some recovery s/w but no luck. ALL I want is to recreate that 901gb partition and the boot partition and put the MBR on the latter so I can get my windows 7 back again


Could anyone help me solve this term? $$\sum_{x=n}^{N}\binom{x}{n}$$

After reading , the most popular answer use the identity $$\sum_{t=0}^n \binom{t}{k} = \binom{n+1}{k+1}.$$  What's the name of this identity? Is it the identity of the  modified.  How can we prove it? I tried by induction, but without success. Can we also prove it algebraically?  Thanks for your help.    EDIT 01 : This identity is known as the  because, on Pascal's triangle, when the addends represented in the summation and the sum itself are highlighted, a hockey-stick shape is revealed.


I'm working on a page on a site but got stuck at this point I want to show the logged in members username/first name of the site content for that I'm using this code   <?php if ( is_user_logged_in() ) { ?>      <?php global $current_user; get_currentuserinfo(); ?>
Hi <?php echo $current_user->user_firstname; ?>

You have access to all of the free members stuff, enjoy :)  Logout
 <?php } ?>    but instead of showing the username i shows broken code like this . I'm creating the page with WPBakery.

I'm working on creating some text that says 'Login' to users that are not logged in, and the user's username or display name when logged in.   It seems like it should be an easy problem to solve, and I've found the following two bits of code on the wordpress codex that each do half of what I am looking for, but I haven't figured out how to combine them (without breaking the site).  Is this the correct direction, or way off base?  To check if the user is logged in and display something different depending:  <?php if ( is_user_logged_in() ) {     echo '{username code here}'; } else {     echo 'Login'; } ?>   To get and display the current user's information:  <?php global $current_user; wp_get_current_user(); echo 'Username: ' . $current_user->user_login . "\n"; echo 'User display name: ' . $current_user->display_name . "\n"; ?>


I learned that the symmetric difference of sets $A, B$ is given by: $$A\triangle B=(A-B)\cup (B-A).$$  But I encountered the following expression: $A\triangle B\triangle C$, and I don’t understand what it means.    How do I apply the definition of symmetric difference when three sets are involved?  In fact I am stuck on a question   There are three set $A,B,C$.  How can I find the expression that the elements in two of these sets but are not in all three sets?  My answer is $A \cup B \cup C -[(A-B\cup C)\cup (B-A\cup C)\cup (C-A\cup B)+A\cap B\cap C]$  But the answer is $A\cup B \cup (C-A)\triangle B \triangle C$ seems more simple than mine, how to get that answer?

By $A\oplus B$ we denote the symmectric difference of two sets. The definition is $A\oplus B =(A\setminus B) \cup (B\setminus A)$. Now I hope to show that $A\oplus (B\oplus C) = (A\oplus B)\oplus C$. I remember that there's an elegant proof, but I forget its detail. (The first step is to show $A\oplus (A\oplus B) = B$, and maybe applying this formula, we can obtain associativity.)


I'm a newbie in git. After I finish messing with the versions and stuff, how can I deploy my final version to the /var/www/html directory? I cloned the repo, but there is probably a better way of doing it. Thanks!  I'd like to update /var/www/html (i.e what the end user sees) whenever I push updates to /user/my-repo.git

Is it possible to deploy a website using git push? I have a hunch it has something to do with using  to perform a git reset --hard on the server side, but how would I go about accomplishing this?


In a form like the following:        What should be the role of Enter when the email addresses input is focused?  Since the share message is optional, I am not sure if it should share the document straight away (if the email addresses are valid and the Share button is enabled) or if it should move focus to the textarea to allow entering a message.

On a web form, what should happen when the user presses the ENTER key?  I'm writing a sign-up form - name, email, password, sign-up button: the usual sort of thing. Since I'm using JavaScript, and the page does not use the <form...> tag, I have complete control over what happens with each key press. I can make it change the focus, submit the data to the server, validate the field contents, whatever. But what should it do?  Things I'm wondering: should ENTER take the user to the next field (as per TAB key)? Should pressing ENTER while focus is on the final field submit the form?


For which $x\in\mathbb{R}$ does $\neg(3x>21\implies x\leq 5)$ hold?  I believe it holds for all $x>7$, but I don't know how to formally write this down.  Can someone help me out? Is there a systematic way of doing this?

For what $a\in\mathbb{R}$ will the statement $\neg(3a>21\implies a\leq 5)$ hold?   My gut feeling says $a>7$, but I do not know how to formally write it down or prove it. Can someone help me?


I understand Rocket works on Newton's 3rd law. So there has to be action-reaction pair acting on two different bodies.  I know rockets accelerate in space, where there is nothing. So now I want to know those action reaction pair that keeps the rocket accelerating.    Specifically I want to know which part of the rocket (which physical component/structure/fuels/gases?   ) is giving action on which other part/components (this part cannot be air, since it is in space) and in turn which other part is giving reaction and on which part of rocket?  I am trying to identify this pair. Please help me.   Thanks

I know Newton's third law of motion might be the answer for this but still I am wondering how the rockets could thrust in the empty space and move in the opposite direction. I guess an astronaut wouldn't be able to push in the empty space with his hands or legs to move himself, but with a rocket engine it's possible. How? What might be the explanation for this in General Relativity?


My computer freezes often when booting and while it's working it functions very slowly. Cpu usage is almost always very low (3-30%), memory usage is very consistent (60-80%), but disk usage is almost always 100%.   My main drive is a ST100DM003 HDD. I've run chkdsk and it found no problems. I've run CrystalDiskInfo and it says everything is fine. I've run SeaTools and every test seemed to pass (except for one while I was defragging, but I think that was a fluke because I ran it again after the defragging finished and there were no problems). I also ran CrystalDiskMark, and the results are below.    CrystalDiskMark 5.2.2 x64 (UWP) (C) 2007-2017 hiyohiyo   MB/s = 1,000,000 bytes/s [SATA/600 = 600,000,000 bytes/s] KB = 1000 bytes, KiB = 1024 bytes  Sequential Read (Q= 32,T= 1) :    30.303 MB/s  Sequential Write (Q= 32,T= 1) :    16.670 MB/s  Random Read 4KiB (Q= 32,T= 1) :     0.606 MB/s [   147.9 IOPS]  Random Write 4KiB (Q= 32,T= 1) :     0.375 MB/s [    91.6 IOPS]  Sequential Read (T= 1) :    32.929 MB/s  Sequential Write (T= 1) :    20.340 MB/s  Random Read 4KiB (Q= 1,T= 1) :     0.321 MB/s [    78.4 IOPS]  Random Write 4KiB (Q= 1,T= 1) :     0.444 MB/s [   108.4 IOPS]  Test : 1024 MiB [C: 35.1% (325.3/926.1 GiB)] (x5)  [Interval=5 sec] Date : 2017/08/12 18:48:37 OS : Windows 10  [10.0 Build 15063] (x64)

After startup for 5 minutes my system is very slow. The Task Manager shows that the disk usage is at 100%. (Later this number is around 2-4 %, but sometimes for 1-2 minutes go up again at 100%.)  I searched a lot on Google. For example I read , and also other pages. I opened two topic on Microsoft answer.  and one in Hungarian.  But I didn't found the solution yet. So I would like to ask Community's help. :)  Here the steps I already done:   I disabled everything at startups (including services) and the issue is the same.  I disabled Prefetch and Superfetch, the Baground Intellingent Transmission, Windows Search and Windows Defender but the issue is still persists. I made a health check on HDD, I made defrag and file system error check, but there are no errors. Also I tried to reinstall the HDD's driver. I made a full hardware check up, with no errors. The Windows and all the drivers are up-to-date. I tried a clean start. The issue is the same. I deleted Dropbox and all antivirus. I turned of the MSI mode.      I using also Linux, where this error is not occurs. Good to know, that Windows had 4 partitions, but I deleted 2 of them for the Linux. I don't know what partitions was these but both was only 10 - 20 MB.  I using a Dell Inspiron 15R SE 7520 with Windows 10 Home.  Personally I think it can be the Intel Rapid Store Technology "driver", because the problem started around when I installed it. (However I'm not sure.) And my hardware not supported yet by Intel, so I have no the newest driver. However I deleted Intel's software and driver and the issue is the same.    Thank you in advance for your assistance!


The DNA is read 3'->5' (and RNA synthesized 5'->3'). But due to the DNA strands having to be complementary, it seems to me that the origin can only appear on the correct side of the ORF on one of the strands. And even if it were possible to synthesise RNA from the other strand, due to the directionailty of the strands/RNA the RNA transcript would then code for the protein in reverse. Surely the reverse synthesis of a protein, even if containing all of the same amino acids, would lead to dfferent folding and thus only on eof the proteins is correct?  Now that I am considering the origin, it seems likely to me that the strand on which the origin is dictates which strand acts as the RNA template (perhaps both starnds can, however for a given GENE the RNA is always synthesised from the same strand.  Is this the case? I have read this post:  however I found it slightly confusing. I think what the answerer said is similar to what I have suggested here, however I am not quite sure. Would greatly appreciate some input.

I feel that I might have a complete misunderstanding here. If DNA has two strands, how does the machinery of RNA transcription determine which one to transcribe?


I'm currently working on a query in T-SQL on SQL Server 2012. I gather several Titles from a table via a join from another table. My tables look like this:  Table Project:   ProjectId | -----------+ 1          |    2          |    3          |      Table ProjectResources  ResourceId |    Label      | ProjectId -----------+---------------+----------- 2          |   Resource X  |  1  3          |   Resource Y  |  1 4          |   Resource Z  |  2 5          |   Resource A  |  2 6          |   Resource X  |  3   the desired output in my temporary table should look like this:  ProjectId  |   Label                  | -----------+--------------------------+ 1          |   Resource X, Resource Y | 2          |   Resource Z, Resource A | 3          |   Resource X             |   I want to concat all Labels with the same ProjectId. My current query looks like this:  CREATE TABLE #tmpProjects (     ProjectId INT     , Label VARCHAR(1000) )  SELECT [P].ProjectId, [PR].Label      INTO #tmpProjects FROM [MySchema].[ProjectResources] [PR] INNER JOIN dbo.Project [P] ON [P].ProjectId= [PR].ProjectId   Unfortunatly my query creates a new row for each Resouce Label. Do you know how to create a new temp table with "concatinated" merged rows for each resource holding the same ProjectId?  Thanks a lot!

I'm trying to migrate a MySQL-based app over to Microsoft SQL Server 2005 (not by choice, but that's life).  In the original app, we used almost entirely ANSI-SQL compliant statements, with one significant exception -- we used MySQL's group_concat function fairly frequently.  group_concat, by the way, does this: given a table of, say, employee names and projects...  SELECT empName, projID FROM project_members;   returns:  ANDY   |  A100 ANDY   |  B391 ANDY   |  X010 TOM    |  A100 TOM    |  A510   ... and here's what you get with group_concat:  SELECT      empName, group_concat(projID SEPARATOR ' / ')  FROM      project_members  GROUP BY      empName;   returns:  ANDY   |  A100 / B391 / X010 TOM    |  A100 / A510   So what I'd like to know is: Is it possible to write, say, a user-defined function in SQL Server which emulates the functionality of group_concat?   I have almost no experience using UDFs, stored procedures, or anything like that, just straight-up SQL, so please err on the side of too much explanation :)


Please check my proof:  Suppose $f(x)$ and $g(x)$ are bounded and uniformly continuous, then we obtain  $|x-y|<\delta \rightarrow |f(x)-f(y)|<\sqrt{M}\sqrt{|x-y|}$  and  $|x-y|<\delta \rightarrow |g(x)-g(y)|<\sqrt{M}\sqrt{|x-y|}$  added those we get  $|x-y|<\delta \rightarrow |f(x)-f(y)||g(x)-g(y)|<\sqrt{m}\sqrt{|x-y|}\sqrt{m}\sqrt{|x-y|}=M|x-y|$  that satisfy Lipschitz condition, therefore $f(x)g(x)$ is uniformly continuous.

Suppose $f:\mathbb{R} \supset E \rightarrow \mathbb{R}$ and $g: \mathbb{R} \supset E \rightarrow \mathbb{R}$ are uniformly continuous. Show that $f+g$ is uniformly continuous. What about $fg$ and $\dfrac{f}{g}$?  My Attempt Firstly let's state the definition; a function is uniformly continuous if $$\forall \varepsilon >0\ \ \exists \ \ \delta >0 \ \ \text{such that} \ \ |f(x)-f(y)|< \varepsilon \ \ \forall \ \ x,y \in \mathbb{R} \ \ \text{such  that} \ \ |x-y|<\delta$$ Sum $f+g$ Now to to prove $f+g$ is uniformly continuous; $\bullet$ Choose $\delta_1 >0$ such that $\forall$ $x,y \in \mathbb{R}$ $|x-y|<\delta_1$ $\implies$ $|f(x)-f(y)|< \dfrac{\epsilon}{2}$ $\bullet$ Choose $\delta_2 >0$ such that $\forall$ $x,y \in \mathbb{R}$ $|x-y|<\delta_2$ $\implies$ $|g(x)-g(y)|< \dfrac{\varepsilon}{2}$ $\bullet$ Now take $\delta := min\{ \delta_1, \delta_2\}$ Then we obtain for all $x,y \in \mathbb{R}$ $$ |x-y|<\delta \implies |f(x)+g(x)-f(y)+g(y)| < |f(x)-f(y)| + |g(x)-g(y)| < \dfrac{\varepsilon}{2}+\dfrac{\varepsilon}{2}= \varepsilon$$  Product $fg$ Now for $fg$ for this to hold both $f:E \rightarrow \mathbb{R}$ and $g:E \rightarrow \mathbb{R}$ must be bounded , if not it doesn't hold. $\bullet$ $\exists \ \ M>0 \ \  such \ that \ \ |f(x)|<M \ \ and \ \ |g(x)|<M \ \ \forall \ x \in E$ $\bullet$ Choose $\delta_1 >0$ such that $\forall$ $x,y \in \mathbb{R}$ $|x-y|<\delta_1$ $\implies$ $|f(x)-f(y)|< \dfrac{\epsilon}{2M}$ $\bullet$ Choose $\delta_2 >0$ such that $\forall$ $x,y \in \mathbb{R}$ $|x-y|<\delta_2$ $\implies$ $|g(x)-g(y)|< \dfrac{\epsilon}{2M}$ $\bullet$ Now take $\delta := min\{ \delta_1, \delta_2\}$. Then, $|x-y|<\delta$  implies for all $x,y \in \mathbb{R}$, that $$|f(x)g(x)-f(y)g(y)| \leq |g(x)||f(x)+f(y)|+|f(y)||g(x)+g(y)| \leq $$ $$ M|f(x)+f(y)| + M|g(x)+g(y)| < M \dfrac{\epsilon}{2M} + M \dfrac{\epsilon}{2M} = \epsilon$$ Are these proofs correct? I am not sure how to approach the $\dfrac{f}{g}$ case.


In the group I'm in, there is a player who claims that their character is "off his rocker", and is purposely throwing every situation into mindless childish chaos (it's been going on for the past 3 play sessions). I'm sick of it, the other players are sick of it, and it's starting to get under our ever-patient DM's skin. Immersion is out of the question, and nothing is really being taken seriously by anybody anymore.   We still want the player to stay in the group, but it's gotten to the point where the rest of the party just want something done about the issue, and nobody can figure out what to do.

I DM for a group of a group of rather intellectual players. They like to discuss the situations at hand and really try to do the right things. I use that a lot by posing them with moral questions and missions where the "good" solution is not always obvious or even contradicts the mission target.  So far this worked out very well, but last round a new player joined our game. She plays an impatient, man-hating Amazon (her self-chosen description). The man-hating part kinda does work since she frequently gets into arguments with the male players, which is funny, but the impatient part is the real trouble.  Whenever the group stops to discuss something, she interrupts and just wants to fight stuff. Whenever they talk (in character) about anything else than the mission she interrupts saying that it doesn't matter or doesn't help the group.  Also, whenever someone says anything against her, she does get a bit offended.  In the end of the mission I put a moral choice, where they had to retrieve a magical object, but by doing so kill a whole forest and everything within it. While the rest of the group was discussing it, and trying to find a different solution (of which there where some), she just went ahead and cut that object from it's socket, thus killing the whole forest. This in turn will have negative consequences for the group and the world they live in in the sessions to come.  I expected her to be like that so I included a couple of things where only thinking would get them ahead and just charging into fights would hurt them, but she doesn't care about consequences and just barges in.  Since she doesn't fit into the group at all, I'd usually just put her into another of my groups where she'd fit better, but she's the girlfriend of one of the core players of that group, so I can't do that.  I thought about having an NPC, that the rest of the group know, join the group and keep her in check every time she goes overboard again, but I fear that by limiting her I'd take the fun away for her.  My problem here is not that I don't want the players to commit mass murder. I have another group that is quite murderous and that's fine. The problem here is that I have a quite homogenous group and one player that really doesn't fit the group. It's not even so much about her murdering people (which can be quite fun in an otherwise good minded group) but that she is disrupting the kind of play that the other players want to have.  Do you have any ideas what I can do here?  This is not so much a My-Guy-Syndrome, but rather a clash of expectations. I talked to the player in question. It is really not about her "having" to stick to her character, but rather that her character reflects herself. She says of herself that she is impatient and that she rather wants to fight than to discuss. In the end she wanted to get transferred into my other group, which is more combat-oriented and generally more diverse.


So I tried writing 3 equations of tangents to the parabola:  $t_1y+x=at_1^2$,  $t_2y+x=at_2^2$ and $t_3y+x=at_3^2$  The respective points of intersection are:  $(at_2.t_3,a(t_2+t_3))$, $(at_1.t_3,a(t_1+t_3))$ and $(at_1.t_2,a(t_1+t_2))$  Since these points lie on the hyperbola, Putting these points in $xy=c^2$:  $t_2.t_3(t_2+t_3)=\frac{c^2}{a^2}$ ...(1) $t_3.t_1(t_3+t_1)=\frac{c^2}{a^2}$ ...(2) $t_1.t_2(t_1+t_2)=\frac{c^2}{a^2}$ ...(1)   I am not able to figure out how to proceed after this... Can someone please help me out?

Prove that a triangle can be inscribed in the hyperbola $xy=c^2$ whose sides touch the parabola $y^2=4ax$. I have no idea how to start this problem. In my first attempt I assumed any three points on the given rectangular hyperbola and wrote down the equations of each of the three chords. Then I tried proving that each of the three sides are tangents to the given parabola...then I put the value of $x$  from the equation of the chord in the equation of the parabola and tried to prove that the discriminant of the quadratic is equal to zero...but I am unable to proceed after that. Need help...thanks!!


new to the forum but had a quick question from my lecture yesterday. I understand string.equals() compares the actual content or characters while string == string compares the references. But where I got confused is he said that within the string pool each string literal is created only once, and that any variables that contain that same string literal will point to that one instance of the string within the string pool. So why not use == comparison then? Won't any variables that contain the same string literal point to the same one in the string pool and return true or false?

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?


Modify the Payroll Program application so it continues to request division information until the user enters stop as the division name. In addition, program the application to check that the number of employees and average salary per employee are positive numbers. If either the number of employees or the average salary per employee is not a positive value, the application should prompt the user to enter a positive amount.  This is the code I have come up with, which compiles fine but doesn't run the way I expect it to.   import java.util.Scanner; //program uses class SCanner  public class PayrollPart2 {      public static void main( String[] args )      {         Scanner input = new Scanner( System.in ); // create Scanner to obtain input from command window          // variables         char name; // divisions's name         int number1; // number of employees in the division         double number2; // average salary for the employees         double product; // total division payroll              //prompt user to input division name             System.out.print( "Enter Division's name, type stop to exit: ");             String divisionName = input.nextLine(); //read line of text                 while (divisionName !="stop")                  {                 //prompt user for number of employees in the division                 System.out.print( "Enter the number of employees in the division: ");                 //read number of employees from user's input                 number1 = input.nextInt();                     while (number1 <= 0)                     {                         System.out.print("Please enter a positive number of employees in the division:"); // prompt                         number1 = input.nextInt(); // input                     }                  //prompt user to enter average salary of employees                 System.out.print("Enter average salary for the employees: " );                 //read average salary                 number2 = input.nextDouble();                     while (number2 <= 0)                     {                         System.out.print("Please enter a positive number for the employees salary:"); // prompt                         number2 = input.nextDouble(); // input                     }                  //multiply Number1 by Number2                 product = number1 * number2;                  //displays division and total division payroll                 System.out.printf( "The division %s has a payroll of $%.2f\n" , divisionName, product );                 }     } //end method main } // end class PayrollPart2   I've been at it for about 8 hours and at this point I am completely lost on the next steps. The code goes through the loop but doesn't ask for a different division name. Typing the exit command on the first prompt doesn't actually exit the loop. Should I be using If/Else statements instead? I think I can use a Boolean but I'm not exactly sure how to implement it.


Is heat energy invariant under Lorentz transformation? If so then how?

If an observer starts moving at relativistic speeds will he observe the temperature of objects to change as compared to their rest temperatures? Suppose the rest temperature measured is $T$ and the observer starts moving with speed $v$. What will be the new temperature observed by him?


Can a table have multiple foreign keys and each foreign key have a different parent table? Does it violate any design or normalization rule?

I have to two tables namely employees_ce and employees_sn under the database employees.   They both have their respective unique primary key columns.   I have another table called deductions, whose foreign key column I want to reference to primary keys of employees_ce as well as employees_sn. Is this possible?  for example  employees_ce -------------- empid   name khce1   prince  employees_sn ---------------- empid   name khsn1   princess   so is this possible?  deductions -------------- id      name khce1   gold khsn1   silver


The rules stipulate that you must use two hands to wield a Lance when on foot (but you can use it with one hand while mounted).  The Dual Wielder feat gives benefits to those who use two non-light one-handed weapons.  If you are mounted with a Lance in one hand and another weapon in the other, can you benefit from the Dual Wielder feat ?

If you have the dual wielder feat, and you are riding a mount can you wield two lances. Also what would the damage dice be?


This is first of my few questions coming up on cameras. I cannot ask all in one question as they relate to different topics.   My first question:     What is Aperture in Camera?   Why Having a bigger aperture makes images blurred?  Can anyone clear my question? I read it on some blogs and wiki, but they are all to confusing to me. It is too complicated on Wiki for me to understand it.

How does aperture affect my photographs?  Why should I care about the aperture with which a photo was taken?


I am having some trouble using glossaries in LateX (TeXnicCenter) and hope someone could give me some advice. I am using the package \usepackage[toc, acronym, section=section]{glossaries} to get a glossary for acronyms. I definded some acronyms e.g.   \newacronym{Bitkom}{Bitkom} {Bundesverband Informationswirtschaft, Telekommunikation und neue Medien e.V.}   and if I am using \gls{Bitkom} at first it displays the whole text, at second it only displays Bitkom.    So everything is alright except the   \printglossary[type=\acronymtype,title=Abkürzungsverzeichnis,style=long]   command, it doesn`t display anything, but I want it to print all used acronyms.   Could someone help me solving this problem please?  \usepackage[toc, acronym, section=section]{glossaries} ... \newacronym{Bitkom}{Bitkom} {Bundesverband Informationswirtschaft, Telekommunikation und neue Medien e.V.} ... \makeglossaries ... \printglossary[type=\acronymtype,title=Abkürzungsverzeichnis,style=long]

I'm using the glossaries package with MikTeX 2.9 (using TeXnicCenter as my editor) and my document is setup as follows:  \documentclass[ebook,11pt,openany]{memoir} \usepackage{color} \usepackage{graphicx}  \usepackage[toc]{glossaries} \usepackage{float} \usepackage[scaled]{berasans} \usepackage[T1]{fontenc} \usepackage{type1cm} \usepackage{eso-pic} \usepackage{mystyle}  \author{...}  \title{...}  \makeatletter   \AddToShipoutPicture{     \setlength{\@tempdimb}{.5\paperwidth}     \setlength{\@tempdimc}{.5\paperheight}     \setlength{\unitlength}{1pt}     \put(\strip@pt\@tempdimb,\strip@pt\@tempdimc){       \makebox(0,0){\rotatebox{55}{\textcolor[gray]{0.85}         {\fontsize{5cm}{5cm}\selectfont{DRAFT}}}}     }   } \makeatother  \setcounter{tocdepth}{2} \makeglossaries \include{glossary}  \begin{document} \maketitle  \frontmatter \include{dedication} \tableofcontents  \mainmatter \include{introduction} \include{chaptr1} ... \backmatter  \printglossaries  \end{document}   Unfortunately, when I generate my document my PDF doesn't contain a glossary at all.  Here's a quick snippet from my glossary file:  \newglossaryentry{entry} {   name={entry},   description={my entry description.} }   I'm also referencing the glossary entry from my chaptr1.tex file, which is included above, using the \gls{entry} command.  I'm not seeing any errors in my build output, so I'm not sure what's going on.  Any help would be appreciated.


It's hard to understand the difference between uniformly continuous function and continuous function.  So if A is a uniformly continuous function on X  and if B is a continuous function on X,  the only difference is that we can find one common delta value >0 that applied to epilson-delta conditions for all x values on X in A   while there is no such common delta value in B?

I'm told that a function defined on an interval $[a,b]$ or $(a,b)$ is uniformly continuous if for each $\epsilon\gt 0$ there exists a $\delta\gt 0$ such that $|x-t|\lt \delta$ implies that $|f(x)-f(t)|\lt \epsilon$. Then it gives a little note saying that $\delta$ cannot depend on $x$, it can only depend on $\epsilon$.   With ordinary continuity, the $\delta$ can depend on both $x$ and $\epsilon$. I'm just a little lost on why $|x-t|\lt \delta$ implies $|f(x)-f(t)|\lt \epsilon$, and how $\delta$ can't depend on $x$ but only $\epsilon$.


It is a standard fact in probability that almost sure convergence is stronger than convergence in probability. I can only see the differences in the proof. However, is there a way to view it intuitively? Is it true that almost sure convergence has a tighter hold on the tails of a sequence of random variables than convergence in probability does? The definition of convergence in probability I am using is that given $\epsilon >0$:  $$ \lim_{n \to \infty} P(|X_n-X|> \epsilon) = 0 $$  and the definition of almost sure convergence I am using is:  $$ P(\lim_{n \to \infty}X_n = X) = P\left(\omega \in \Omega: \lim_{n \to \infty}X_n(\omega) = X(\omega)\right) = 1 $$  The two above appear almost exactly the same to me, except that the limit on $n$ is outside of convergence in probability and within the probability measure for almost sure convergence. Is there an easy to understand intuitive difference here? Thanks!

I have a sequence of independent random variables $X_1, X_2, \ldots$ where  $$ X_n =   \begin{cases}     1      & \quad \text{with probability} \  1/n  \\     0    & \quad \text{with probability} \ 1-1/n   \end{cases} $$  In my book, it claims that while $X_n \to 0$ in probability, it is not true almost surely. The book gives a very short outline of the proof, but I am not sure if it is correct. It writes that: for $0 < \epsilon <1$, $P\left(\bigcup_{m=n}^\infty \{|X_m - X| > \delta\}\right) = 1- \lim_{n \to \infty}P(X_m = 0 \ \forall m \text{ s.t. } n \leq m)$. I am not sure why this line can show that almost sure convergence to $0$ is not possible.   The definition of almost sure converge I take is to be: $\forall \epsilon, \delta >0, \exists n_0=n_0(\epsilon, \delta) \text{ s.t. } P(\bigcup_{m=n}^\infty \{|X_m -X|> \delta\})\leq \epsilon$. Can someone tell me what the author's line intends to show? Thank you


Is there a better way of getting this result? This function fails if num has more digits than digits, and I feel like it should be in the library somewhere (like Integer.toString(x,"%3d") or something)  static String intToString(int num, int digits) {     StringBuffer s = new StringBuffer(digits);     int zeroes = digits - (int) (Math.log(num) / Math.log(10)) - 1;      for (int i = 0; i < zeroes; i++) {         s.append(0);     }     return s.append(num).toString(); }

How do you left pad an int with zeros when converting to a String in java?  I'm basically looking to pad out integers up to 9999 with leading zeros (e.g. 1 = 0001).


I want to understand how bracket operations in general are related to symmetry and infinitesimal transformations (in hindsight of quantumfieldtheory), so I calculated an example with a particle that is moving on a circle with a generic potential. (I used simple polar coordinates in two dimensions)  $H(r,p_{r})= \frac{p^{2}_{r}}{2m}+V(r)$  $H(\phi, p_{\phi})=\frac{p^{2}_{\phi}}{2mr^{2}}+V(\phi)$  Now I know that if you take the Poisson bracket with the Hamiltonian you just get the infinitesimal transformation in time right? So  $\{r,H(r,p_{r})\}= \frac{p_{r}}{m}$  $\{\phi,H(\phi,p_{\phi})\}= \frac{p_{\phi}}{mr^{2}}$  But what if I want to do an infinitesimal transformation of the $r$ or the $\phi$ coordinates? I know that the generator of translations is just the momentum, and that the generator of rotations is angular momentum. How would I do that with the Poisson bracket in this case? And for example when I do an infinitesimal transformation with the radius $r$, what does that mean? Is it that the radius is infinitesimally transformed, or is it more like a global translation where the whole system is somehow translated? Similarly with the angle $\phi$, is it that the angle is locally changed, or is it that the "whole" system is rotated?

In quantum mechanics, when two observables commute, it implies that the two can be measured simultaneously without perturbing each other's measurement results. Or in other words, the uncertainty in their measurements are not coupled.   But in classical mechanics, in an analogous way we have the Poisson brackets instead, where when two functions/variables of the systems have a vanishing Poisson bracket with each other, we say they are in "involution".  I understand that when a variable $j$ has a vanishing Poisson bracket with the Hamiltonian of the system, means that $j$ is a constant of motion, conserved in time. But for the general case:      If the Poisson bracket of $f$ and $g$ vanishes ($\{f,g\} = 0$), then $f$ and $g$ are said to be in involution.    What does the above mean physically? Is it in some sense related to measurement results as it is with commutators in QM, meaning two variables in involution are completely independent of each other? Finally, is there a simple classical example, where one can see 2 observables are in involution, but 2 other (same system) may not be (i.e. counter-example for involution)? I think it would help better understand what in "involution" means.


real*8, dimension (40) :: M(40)  ...      open(unit=99,file="input.inp") do i=1,40     read(99,*) M(i) enddo  write(*,*) M(1) ...   In the file "input.inp", I have float numbers, like:  0.85 0.90 ...   But when I read and write them on terminal, it gives me the first element: 0.849999...  How can I fix it to give me exact 0.85?  Edit: I compile it on gfortran. lol

Consider the following code:   0.1 + 0.2 == 0.3  ->  false   0.1 + 0.2         ->  0.30000000000000004   Why do these inaccuracies happen?


I expect to be downvoted to hell but I'm having trouble finding the answer to this  I'm trying to write: <a href="url">  but clearly you can't see that because i can't escape it  I see now that it's backticks thanks anthony

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 .


I read about  Coulomb's law it says the force of attraction or repulsion between two charges is inversely  proportional to the square of the distance between them.  So generally if I say then  Coulomb's law is inverse square law. But I really want to know why this electrostatic force depends on square of the distance, and not the cube nor the fourth power. Why only the square of the distance?  Is there any connection with dimensions? Or does it depend on the reference frame?  Why does it depend on inverse of the square of the distance?

Coulomb's Law states that the fall-off of the strength of the electrostatic force is inversely proportional to the distance squared of the charges. Gauss's law implies that the total flux through a surface completely enclosing a charge is proportional to the total amount of charge. If we imagine a two-dimensional world of people who knew Gauss's law, they would imagine a surface completely enclosing a charge as a flat circle around the charge.  Integrating the flux, they would find that the electrostatic force should be inversely proportional to the distance of the charges, if Gauss's law were true in a two-dimensional world. However, if they observed a $\frac{1}{r^2}$ fall-off, this implies a two-dimensional world is not all there is. Is this argument correct? Does the $\frac{1}{r^2}$ fall-off imply that there are only three spatial dimensions we live in? I want to make sure this is right before I tell this to my friends and they laugh at me.


Consider a sequence $$ s_{n}=\sum_{r=1}^{n}\tan^{-1}\frac{2}{r^{2}} .$$ then we have $$ \frac{1}{2}\sum_{r=1}^{n}\frac{2}{r^{2}} \leq s_{n} \ \leq \sum_{r=1}^{n}\frac{2}{r^{2}} \\\Rightarrow \frac{\pi^{2}}{6} \leq \lim_{n \to \infty}s_{n}\leq\frac{\pi^{2}}{3} $$ But how to attack to find the exact value of this limit? Anyone please?

Find $$M:=\sum_{n=1}^{\infty}\tan^{-1}\frac{2}{n^2}$$   There's a solution  that uses complex numbers which I didn't understand and I was wondering if the following is also a correct method.   My proposed solution   $$\begin{align} &\sum_{n=1}^{\infty}\tan^{-1}\frac{2}{n^2}\\ =&\sum_{n=1}^{\infty}\tan^{-1}\frac{(1+n)+(1-n)}{1-(1+n)(1-n)}\\ =&\sum_{n=1}^{\infty}(\tan^{-1}(1+n)+\tan^{-1}(1-n))\\ =&\sum_{n=1}^{\infty}(\tan^{-1}(n+1)-\tan^{-1}(n-1)) \end{align} $$  And this implies  $$M=\lim_{m\to\infty}(\tan^{-1}(m+1)+\tan^{-1}m-\tan^{-1}1-\tan^{-1}0)=\frac{3\pi}{4}$$


So I animated some objects rotating, and the pivot point is on top. but now I want to move the pivot point to the side a bit while still being on top, but the object positions are already animated. help please?

I have developed several puzzles in Blender, and to test them I wanted to animate them.   The first problem I encountered was the rotation of an object around a central hub.   Between keyframes the object would cut across rather than follow the circular path.   To solve this I moved the origins to the centre of rotation, and that worked fine.   The next problem was to move the rotation of one or more of the objects to another hub.   This is where it gets a bit tricky!   It's not practical to have to keep changing individual origins for every keyframe.   I've tried parenting to the hubs but this doesn't make it any easier.   Perhaps there is a way with armatures?   Maybe I've missed something very basic.  I made a small demo to illustrate the kind of rotation I mean:   Keyframe 1.   Keyframe 2.   Keyframe 3.  At this stage there are three answers to my question, and all of them require constraint influences to be turned on or off for each object that needs to change its centre of rotation. Multiply this several times and it becomes a bit of a nightmare!  I'm thinking that to position the 3d cursor at the centre of the wheel and then select all the objects required to turn for each rotation might be easier than the answers so far, but I was hoping for something more straight forward than that.  Don't get me wrong, I do appreciate the effort you guys have put in so far, thanks. :)


In the UK students often say they are "studying" a topic (e.g., "I am studying computer science at University of X") but once in a while I also hear students say they are "reading" a topic (e.g., "I am reading sociology"). The latter I've only heard said in the context of social sciences.  Is there a difference between reading and studying a topic?

When reading about people who have studied at Oxford the word "read" is used instead of study. Example:  "He read Philosophy, Politics and Economics at Oxford"  Why when discussing study at Oxford (and maybe other universities) is the word "read" used?


2)Unable to see many wifi networks while on my windows os there are many wifi networks available.Also on my friends ubuntu 16.04 all the other networks are shown.  1)The speed which i'm getting is pretty bad, wifi is running much faster on my phone, even a google search isn't working. (I am typing these answers on window)  On typing   lspci -nnk | grep 0280 -A2 on terminal  The output was:  02:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. RTL8723BE PCIe Wireless Network Adapter [10ec:b723]     Subsystem: Hewlett-Packard Company RTL8723BE PCIe Wireless Network Adapter [103c:804c]     Kernel driver in use: rtl8723be   Thanks in advance

I have installed ubuntu mate 16.04 in my HP Pavilion 15-ab032tx Notebook. (windows 8.1 is also there though i have dual booted). I have updated and upgraded by: sudo apt-get update sudo apt-get upgrade - in terminal then I found wifi signals shows very poor and often disconnects. But when i log into 'Windows' wifi gets full signal strength and stable. then I searched lot for solution I tried:    and many more methods but still no solution I am new to ubuntu.. help me to fix this please. thanks.. some informations that may require for solution are below: hardware info: after typing sudo lshw in terminal  `my pc                           description: Notebook     product: HP Pavilion Notebook     vendor: Hewlett-Packard     version: Type1ProductConfigId     serial: ###     width: 64 bits     capabilities: smbios-2.8 dmi-2.8 vsyscall32     configuration: administrator_password=disabled boot=normal chassis=notebook family=103C_5335KV G=N L=CON B=HP S=PAV X=Null sku=### uuid=###                     *-network                 description: Wireless interface                 product: RTL8723BE PCIe Wireless Network Adapter                 vendor: Realtek Semiconductor Co., Ltd.                 physical id: 0                 bus info: pci@0000:08:00.0                 logical name: wlo1                 version: 00                 serial: d8:5d:e2:62:c4:65                 width: 64 bits                 clock: 33MHz                 capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless                 configuration: broadcast=yes driver=rtl8723be driverversion=4.4.0-28-generic firmware=N/A ip=192.168.0.100 latency=0 link=yes multicast=yes wireless=IEEE 802.11bgn                 resources: irq:18 ioport:5000(size=256) memory:c6100000-c6103fff   ` andproduct info:   I am extremely very sorry for the long post please help me to fix this problem. Thanks in advance...


I am reading a date column in a postgresql DB. I would like to convert it from below reading into YYYY-MM-DD (this is how it is entered into the DB originally). What is the best approach to do this?  Code:  dataReading = cursor.fetchall() print(dataReading[1])   Output:  (datetime.date(2016, 1, 5),)

This is my code:  import datetime today = datetime.date.today() print(today)   This prints: 2008-11-22 which is exactly what I want.  But, I have a list I'm appending this to and then suddenly everything goes "wonky". Here is the code:  import datetime mylist = [] today = datetime.date.today() mylist.append(today) print(mylist)   This prints the following:   [datetime.date(2008, 11, 22)]   How can I get just a simple date like 2008-11-22?


In my code I have GUI constructor which extends JDialog as below.  public OrdersGUI() {   //code for adding SWING components to panels and JDialog.  }   Now how do I overload the constructor  with parameters such as (String referenceNo) which will produce the same JDialog as the default constructor without copy/pasting everything from default constructor?

Is it possible to call a constructor from another (within the same class, not from a subclass)? If yes how? And what could be the best way to call another constructor (if there are several ways to do it)?


I'm trying to build an ubuntu embedded linux kernel for Beaglebone.  Part of the build has a dependency for ia32-libs. When I try to install it it say it needs ia32-libs-multiarch. But it says its not installable! (see below). I have tried other solutions from this forum without success.  Can someone explain what is happening and what I can do about it?  ian@ubuntu:~/beaglebone2/linux-dev$ sudo apt-get install ia32-libs 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:  ia32-libs : Depends: ia32-libs-multiarch but it is not installable E: Unable to correct problems, you have held broken packages.

I am trying to install ia32-libs on Ubuntu 12.04 LTS (x86).  I enabled all the repository sources but I'm receiving the error message below:  ~$ sudo apt-get install ia32-libs   Reading package lists... Done   Building dependency tree          Reading state information... Done   Package ia32-libs is not available, but is referred to by another package.   This may mean that the package is missing, has been obsoleted, or   is only available from another source    E: Package 'ia32-libs' has no installation candidate   output of sudo apt-cache policy ia32-libs    ia32-libs:     Installed: (none)     Candidate: (none)     Version table:     output of cat /etc/apt/sources.list  (removed similar hyperlinks)    deb http://archive.ubuntu.com/ubuntu/ precise restricted main multiverse universe   deb-src archive.ubuntu.com/ubuntu/ precise restricted main multiverse universe #Added by software-properties   deb security.ubuntu.com/ubuntu/ precise-security main restricted universe multiverse   deb-src security.ubuntu.com/ubuntu/ precise-security main restricted universe multiverse #Added by software-properties   deb archive.ubuntu.com/ubuntu/ precise-updates main restricted universe multiverse   deb-src archive.ubuntu.com/ubuntu/ precise-updates main restricted universe multiverse #Added by software-properties


I got a new ACER predator AG3620-UR308 which came with windows 8 and I wanted to run ubuntu 12.04.2 on it as a dual boot machine. The box came with 2TB HDD. So I made 4 partitions with a raw partition just after the windows installation partition.  I created a swap area and finished the installation. GRUB was installed on the only drive there which is /dev/sda.  After reboot, GRUB doesn't even come up. It always boots Windows 8. I repeated installation process twice and got the same result. I disabled secure boot from the BIOS and enabled CSM (don't even know what it means) according to  . I boot from USB and got this:  $ sudo fdisk -l WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't  support GPT. Use GNU Parted.  Disk /dev/sda: 2000.4 GB, 2000398934016 bytes  255 heads, 63 sectors/track, 243201 cylinders, total 3907029168 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disk identifier: 0x8c361cb5  Device Boot      Start         End      Blocks   Id  System /dev/sda1               1  3907029167  1953514583+  ee  GPT Partition 1 does not start on physical sector boundary.  Disk /dev/sdb: 8178 MB, 8178892800 bytes 255 heads, 63 sectors/track, 994 cylinders, total 15974400 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x0006a87e  Device Boot      Start         End      Blocks   Id  System /dev/sdb1   *        2048    15972351     7985152    b  W95 FAT32   Can anybody shed some light? thank you in advance  EDIT I just did another trial with 13.04 this time and still no luck.    bios: secure-boot: disabled    enable CSM : always     Deleted previous Ubuntu partition and swap area partition.now having free space     Used usb installer to prepare usb with ubuntu-13.04-desktop-amd64.iso    rebooted : liveusb didnt detect windows 8, used something else    created partition ext4 for /    created partition for swap-area    default grub path is /dev/sda and clicked install   Acer always boots into windows.  NEW EDIT  After following the boot-repair suggestion installed on the liveUSB, I can now see grub but can't log into windows anymore as it's not in the list. The boot-repair also completed with an error, i guess logged on   How my drive is organized

I installed Windows on my computer, followed by an installation of Ubuntu. However, now I'm unable to boot into my Windows install.  What can I do to fix this?


I'm a new bee with Ubuntu... less than a week. My license for AVG Internet Security is good till 2022 or 23 I guess. I also heard that there's no need of antivirus or similar for Linux. Is that true? Can I surf with no worry? or there's a good internet security suite for Ubuntu (Linux). Thank you.

Are there any antivirus applications that work on Ubuntu 16.04? Thanks!


How can I explain the logical meaning of the difference between into and in when cutting something.  For example, 'Cut the peach into 3 pieces' vs 'Cut the peach in half'  Thank you!

I am sorry if the question is silly, but I think I heard both options spoken by native speaker. So, which one is correct?


How can more resolution be added to certain parts of a model? For example, on this piece of popcorn the green areas need more detail. How can the whole model stay low poly and only quads while adding the extra detail?

How do I extrude this top so the mesh will form a complete dress. More precisely, after applying the mirror modifier, each horizontal loop contains N=24 vertexes. To get good results from the cloth simulator, I want the skirt to have at least more vertexes around each horizontal loop so I need to branch each vertical edge to create more vertexes in the loop below. Is it possible to join two loops with N and kN vertexes without using a "tris bridge". That is, I want to stick to quads.  Update:  I figured out that I can multiply by three using the following pattern  |      | +------+  \    / \   +--+   +  /|  |\ / + |  | + | |  | | +-+--+-+   By only branching every other edge, it is possible to multiply by two.  This technique results in some bad quads. Is more regular tris a better approach then?


Consider: \documentclass[12pt]{article} \usepackage{tkz-euclide,tkz-fct} \usetkzobj{all}  \begin{document}  \begin{tikzpicture} \tkzInit[xmin=-3,xmax=3,xstep=1,ymin=0,ymax=.4,ystep=0.2] \tkzDrawX[right=3pt,label={$Z$}] \tkzLabelX[step=1] \tkzFct[thick,color=blue,domain=-3:3]{1/sqrt(2*pi)*exp(-0.5*\x**2)} \tkzDrawArea[color=red!50,domain=-1.439531:1.439531] \tkzText[color=black](0,0.15){85\%} \tkzDefPoints{1.439531/-0.2/A,1.439531/0/B, -1.439531/-0.2/C,-1.439531/0/D} \tkzDrawVectors[red](A,B C,D) \tkzText[below=3pt,color=red](A){$z^{*}$} \tkzText[below=3pt,color=red](C){$-z^{*}$} \end{tikzpicture}   \end{document}  For some reason, this produces the following image where the area slants up on the left.  Can anyone see a problem with my code or is this a bug? D.

i am using this wonderful tool that tkz-fct is for creating nice documents but I have a weird result from recently. This is my document :  \documentclass[10pt,a4paper]{article} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{calc} \usepackage{color} \usepackage{pifont}                     %pour utiliser la police Ding \usepackage[left=1.5cm,right=1.5cm,top=2cm,bottom=2cm]{geometry} %marges du document \usepackage[french]{babel} \usepackage[usenames,dvipsnames]{xcolor} \usepackage[L]{thmbox} \usepackage{eurosym} \usepackage{enumitem}               %pour modifer itemize et enumerate \usepackage{amsmath,amsfonts,amssymb} \usepackage{mathrsfs}               %pour utiliser mathscr \usepackage{array,multirow,makecell} \usepackage{fancyhdr}               %package pour modifier les en-têtes \usepackage{fancybox}               %pour boîtes spéciales \usepackage{tikz,tkz-tab,tkz-fct} \usepackage{tikz-dependency}        %permet de créer des schemas \usepackage{sectsty}                %permet de modifier les styles des sections (voir \sectionfont l.21) \usepackage{fourier-orns} \usepackage{shadethm}               %pour theoremes en gris \setcellgapes{1pt} \makegapedcells \newcolumntype{R}[1]{>{\raggedleft\arraybackslash }b{#1}}   %pour redéfinir les colonnes dans tabular \newcolumntype{L}[1]{>{\raggedright\arraybackslash }b{#1}} \newcolumntype{C}[1]{>{\centering\arraybackslash }b{#1}} \renewcommand{\thesection}{\Roman{section}} %permet de changer la numérotation en chiffres romains des sections \newshadetheorem{defi}{Définition}  %crée un nouveau type de théorème \newshadetheorem{thm}{Théorème} \newshadetheorem{ppte}{Propriété} \sectionfont{\sectionrule{3ex}{3pt}{-1.5ex}{1pt}} %mettre un trait de séparation dans les sections (package sectsty) \pagestyle{fancy} %style en-têtes \lhead{} %en-tête gauche \chead{Lois à densité} %en-tête centrale \rhead{T\up{ale}} %en-tête droite \begin{document} \begin{tikzpicture}      \tkzInit[xmin=-4,xmax=4,ymax=1]      \tkzDrawX[label={},noticks]      %\tkzDrawY      \tkzFct[domain=-2:2]{exp(-x**2)}      \tkzDrawArea[color=blue, domain = -0.5:1]      \tkzText(-1,0.75){$\mathscr{C}_{f}$} \end{tikzpicture} \end{document}   But from now, it doesn't produce the result I would like as the surface start from the point (-0.5,f(-0.5)) and not as an integral from -0.5 to 1. This is a picture of the result :   Which is obviously not what I would like and this extends now to all my "old" docs which were "normal" before. I don't think I have done anything special except updating my Tex distribution ... If someone has an idea ??


Suppose we use Additive ElGamal defined as follows:     Let $(K,E,D)$ be a triple. The key-generator $K$ outputs the description of a   finite multiplicative group $G$ of prime order $q$, with three generators   $(g,h,f)$ which are set to be the public-key $p_k$ of the system; the   secret-key $s_k$ is set to the value $\log_g h$. For a public-key $(g,h,f)$   the encryption function $E(r,x)$ equals the tuple $(g^r, h^r, f^x)$. The   operations $+$ and $\oplus$ are defined as addition modulo $q$ and the   operation $\otimes$ is defined as point-wise multiplication over $G \times G$.  The   decryption function is denoted $D$. For a secret key $\log_g(h)$ given $(G,H)$ it returns   $H/G^{\log_g(h)}$ and then performs a brute-force search over all   possible values for $f^x$ to recover $x$.   So if I have two ElGamal encrypted cipher texts, $c_1= E(r_1,m_1)$ and $c_2 = E(r_2,m_2)$, I can do $c_1 \otimes c_2$ to get the same result as I would get if I did $E(r_1 \oplus r_2, m_1+m_2)$.  Can I somehow construct a zero knowledge proof, that, given a cipertext $c_1$, proves I only added one of $x$ possible ciphers?   Background would be an application for e-voting. Given a set of candidates, I want to prove that I just added one of the valid candidates (predetermined numbers) to the cipher. I already found a ZKP that shows that the Cipher I want to add is well-formed.

Let's suppose we are using the exponential ElGamal as a public-key encryption scheme, so that we encrypt $g^m$ instead of $m$, for some generator $g$. Let $x$ be the private key, and $h=g^x$ be the public key.   We have two parties, and each one of them has a ciphertext encrypted with the same public key: $(R_1,S_1)=(g^{r_1}, g^{m_1} h^{r_1})$ and $(R_2,S_2)=(g^{r_2}, g^{m_2} h^{r_2})$, respectively.  These two parties then gather and perform the homomorphic sum of their ciphertexts by computing the product of their ciphertexts: $(R_3,S_3) = (R_1,S_1) \cdot (R_2, S_2) = (g^{r_1+r_2}, g^{m_1+m_2} h^{r_1+r_2})$.  Is there any way they can prove in zero-knowledge that the sum is correct? That is to say, that $(R_3,S_3)$ is the correct encryption of $m_1+m_2$ without revealing anything else about the addends ($m_1$ and $m_2$ should be kept secret) nor the (plaintext) value $m_1+m_2$?


I see a lot of post about inserting into MySQL database. The vast amount of them seem to forget that its user input we are dealing with. What would be the best was to insert data in to the table. Would mysqli_real_escape_string be okay? Or would using prepared statements be a better option, maybe both?

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'm new here so please excuse me if this question's already been asked, I just couldn't seem to find it anywhere.   What I want to know is, can the present tense be used in the past tense? Let's say I'm in school, and my teacher asks " Why do people cry?". What would be the correct way to write that in the past tense? "My teacher asked why people cried" or, "My teacher asked why people cry"? I've heard of backshifting, but I'm not sure if this is it. I've only recently started worrying about this, and now I feel like I have to contemplate every sentence before I say anything. Please help me if you can. I'm sorry if I seem ignorant, it's my first time using this kind of website.

For example:  "Last week, I found out that NASA stands for 'National Aeronautics and Space Administration.'"  or  "Last week, I found out that NASA stood for 'National Aeronautics and Space Administration.'"


#!/bin/sh  if [ $(ls sample01.log | wc -l) = 1 ] then echo "File Found" > lsOutput.log else echo "File Not Found" > lsOutput.log fi   But if sample01.log is not already existing my code already returns the error:  ls: cannot access sample01.log: No such file or directory   And the code will not run anymore. The File Not Found will not be displayed anymore. I wanted to capture that error to file (No such file or directory) so each time such error occurs, it is written and documented on the log file.  Thank you.

I wanted to capture to a file the errors being returned on the command line from grep. For example,  grep foo.lookup No such file in directory   I want to output that to a log file. This is my shell script:  lookUpVal=1 var1=$(grep $lookUpVal foo.lookup) >>lookup.log 2>$1   It creates the file lookup.log but doesn't write the error on it.


I classified laying logs (tree trunks) from CHM (Canopy Height Model = Digital Surface Model (DSM) - Digital Terrain Model (DTM)) created from LiDAR point cloud. I converted classified logs into polygon shapefile. I now have polygons that represent logs and CHM image. CHM were clipped by polygons (logs), now I am thinking of calculating volume of each log using QGIS. Is there any existing method?

There are many similar questions like this. But I haven't found a usefull answer yet. So I hope some of you have a suggestion to this.  I've done some flyovers with the drone at a contruction area, and then got a DSM out of these, using Pix4D.  Now I have 2 different DSM, and then imported these into QGIS. Through rastercalculator i've withdrawn these from each other to get the height difference. See below:   I then would like to find out the volume of where there have been a height difference.. So some of the area I have marked red (increased volume) and the blue (decrease in volume). Also using rastercalculator and polygonize. See below.      Is there a smart way to find the volume of the blue and red marks of these rasterlayers in QGIS, or do any of you have an alternative program that would do the job easier and faster?


I have a JAR file that is executed with "javaw ..." and it works fine.  Is there a way with JDeveloper, or any other tool, to debug that executing file? The answers found on this board focus on Eclipse whcih I do not have.

I know there's some JAVA_OPTS to set to remotely debug a Java program.  What are they and what do they mean ?


I am planning to create cross-platform library to provide access to system configuration information (installed hardware, model of CPU, etc...).  When looking for way to access total memory (by "total" I mean amount of memory installed in system, not memory available to system), I found some problems.  In Windows, this code provide correct value:  #include <Windows.h> .... uint64_t memory; GetPhysicallyInstalledSystemMemory(&memory);   In OS X, this code provide correct value:  #include <sys/sysctl.h> ... size_t memorySize; sysctlbyname("hw.memsize",nullptr,&memorySize,nullptr,0); int64_t memory; sysctlbyname("hw.memsize",(void*)&memory,&memorySize,nullptr,0);   In case of Linux(Ubuntu), common way to get memory information is to parse information from command "free" or file "/proc/meminfo". Problem is that these options provide memory usable to system, which is close but not the same as total memory (similar situation with Windows function "GlobalMemoryStatusEx").  Additionally, I plan to use only C or C++ API to gather required information and don't want to result to parsing text using File API.  I am aware of command dmidecode where I could just add memory in each installed memory bank, but beside the need to pars textual data, command requires root to run.  So main question, is there option as described here ? Maybe exists function that was added later in time and is not very popular ( For Windows, I found information about "GetPhysicallyInstalledSystemMemory" function much later, because it was introduced in Windows Vista and most examples use older "GlobalMemoryStatusEx").  EDITED:  Question is not duplicated as I describe specific problem with obtaining "total" memory as total memory installed in particular system. Also, I clearly specify requirements for possible solution using only C or C++ API available, not parsing results of command or text file like "/proc/meminfo" as other similar questions do not set such requirements.  EDITED_2:  Changes to reflect that both C and C++ API are applicable

I just wrote the following C++ function to programatically determine how much RAM a system has installed.  It works, but it seems to me that there should be a simpler way to do this.  Can someone tell me if I'm missing something?  getRAM() {     FILE* stream = popen( "head -n1 /proc/meminfo", "r" );     std::ostringstream output;     int bufsize = 128;      while( !feof( stream ) && !ferror( stream ))     {         char buf[bufsize];         int bytesRead = fread( buf, 1, bufsize, stream );         output.write( buf, bytesRead );     }     std::string result = output.str();      std::string label, ram;     std::istringstream iss(result);     iss >> label;     iss >> ram;      return ram; }   First, I'm using popen("head -n1 /proc/meminfo") to get the first line of the meminfo file from the system.  The output of that command looks like     MemTotal:       775280 kB   Once I've got that output in an istringstream, it's simple to tokenize it to get at the information I want.  My question is, is there a simpler way to read in the output of this command?  Is there a standard C++ library call to read in the amount of system RAM?


There is a cabinet consisting of m members. Cabinet materials are stored in safe. How many lock should the safe have, and how many keys should be made for these locks, and how these keys have to be distributed among the cabinet members such that the safe can be open if and only if at least j members of the cabinet are present?  Attempt: Should I approach this by Stirling numbers of second kind. Where first I have to find the number of locks, then distribute in S(n,k) ways where n is the number of locks and k is the number of keys. Still I am unable to justify?

Problem  A group of $n~(1 \leq n \leq 30)$ bandits hid their stolen treasure in a room.  The treasure needs to be locked away.  The bandits want to ensure that at least $k~(1 \leq k \leq n)$ of the bandits must agree in order to retrieve the treasure.  They have decided to place multiple locks on the door such that the door can be opened if and only if all the locks are opened.  Each lock may have up to n keys, distributed to a subset of the bandits.  A group of bandits can open a particular lock if and only if someone in the group has a key to that lock.  Given $n$ and $k$, how many locks are needed such that if the keys to the locks are distributed to the bandits properly, then every group of bandits of at least size $n$ can open all the locks, and no smaller group of bandits can open all the locks?  For example, if $n=3$ and $k=2$, only 3 locks are needed - keys to lock 1 can be given to bandits 1 and 2, keys to lock 2 can be given to bandits 1 and 3, and keys to lock 3 can be given to bandits 2 and 3.  No single bandit can open all the locks, but any group of 2 bandits can open all the locks.  My thoughts  At first glance, I thought it was just a simple combinations problem ($nCr$), and the provided test cases confirmed my suspicions: when $n=3$ and $k=2$, $\binom{3}{2}=3$.  Likewise, when $n=5$ and $k=3$, $\binom{5}{3}=10$.  However, two cases where this doesn't work are where $n=2$ and $k=1$ and $n=5$, $k=4$ (it gives $2$ and $5$, respectively, when the correct answer according to the judging data should be $1$ and $10$).  Next, I bothered a colleague who's a math major, and he briefly glanced at it and suggested it might be a hypergeometric distribution problem.  However, if this is correct, I'm having trouble wrapping my head around it - all the examples I can find have 2 distinct categories, e.g. red and green marbles being drawn from an urn, and I don't see that here.  An example in the terms of this problem would be extremely helpful.  If this isn't correct, where do I go from here?  I've been spinning my wheels on it for quite a while.  Background  This is for homework for a CS class (I'm a CS major with 2 semesters of calc plus discrete).  I'd like to be able to understand the math behind it, because once I can understand it, I can program it.  This problem originally came from an ACM ICPC regional contest this year, but my professor has made it into a challenge homework problem.


Suppose that $m$ is an odd natural number.  Prove that there is a natural number $n$ such that $m$ divides $2^n -1$.  I have absolutely no idea how to tackle this; any assistance would be welcome.

Let $n$ be some positive odd number. Prove, in terms of the pigeonhole principle, that there exists some positive integer $k$ such that $n\mid 2^k-1$.


The issue I'm having is that when I write a pre-generated list of strings using the .write() function, it works without an issue, but when I try to generate a list of numbers as strings and use .write() with them, it says I cant use a list and that it must be a string. import csv def makeFile():     fileName = "m11prog2.csv"     outputData = ['#ENG101-04 Module 11, Program 2\n', 'Noah Sickels\n', '\n', 'x,x^2\n']     newData = []     with open(fileName, 'w') as f:         for i in range(1, 1001):              #dataStr = f'{i}, {i**2}\n'             dataStr = ''+str(i)+','+str(i**2)+'\n'             newData.append(dataStr)         outputData.append(newData)         for data in outputData:             f.write(data)  What I don't understand is why the .write() is letting me write the first list 'outputData' to the file, but not the newData to the file, when they are the same type of list.

What's the difference between the list methods append() and extend()?


Im working on a linear regression with 3 independent variables (likert scales from 0-6) nothing out of the ordinary.  The IDs correlate from r=.3 to .58 with each other, which is a bit high although the VIF is still under 2. So usually I would assume that the multicollinieraty assumption would be ok here, but I mean-centered to IDs just to see what happens.  After centering, all IDs perfectly correlate with each other, which I dont know if thats an centering artifact or not. Also the VIF is now 1 which seems weird and the regression analysis throws out the 2nd and 3rd ID even when I forced SPSS (method enter) to consider them in the regression.   Any idea what I did wrong here?  Cheers

I've come across a very good text on Bayes/MCMC. IT suggests that a standardisation of your independent variables will make an MCMC (Metropolis) algorithm more efficient, but also that it may reduce (multi)collinearity. Can that be true? Is this something I should be doing as standard.(Sorry).  Kruschke 2011, Doing Bayesian Data Analysis. (AP)  edit: for example       > data(longley)      > cor.test(longley$Unemployed, longley$Armed.Forces)  Pearson's product-moment correlation       data:  longley$Unemployed and longley$Armed.Forces       t = -0.6745, df = 14, p-value = 0.5109      alternative hypothesis: true correlation is not equal to 0       95 percent confidence interval:      -0.6187113  0.3489766       sample estimates:       cor       -0.1774206        > standardise <- function(x) {(x-mean(x))/sd(x)}      > cor.test(standardise(longley$Unemployed), standardise(longley$Armed.Forces))  Pearson's product-moment correlation       data:  standardise(longley$Unemployed) and standardise(longley$Armed.Forces)       t = -0.6745, df = 14, p-value = 0.5109       alternative hypothesis: true correlation is not equal to 0       95 percent confidence interval:       -0.6187113  0.3489766        sample estimates:        cor       -0.1774206    This hasn't reduced the correlation or therefore the albeit limited linear dependence of vectors.  What's going on?  R


I have a theorem that states:  if an equation P(x)y''+Q(x)y'+R(x)y=0  can be written in the form:  [P(x)y']'+[f(x)y]'=0  then the equation is said to be exact.   Now I need to expand and equate the coefficients of these equations to show that a necessary condition for an equation to be exact is...  P''(x)-Q'(x)+R(x)=0  I began to expand the second equation but I do not know where to go from there.

I have a theorem that states:  If an equation $P(x)y''+Q(x)y'+R(x)y=0$  can be written in the form:  $$[P(x)y']'+[f(x)y]'=0$$  then the equation is said to be exact.   Now I need to expand and equate the coefficients of these equations to show that a necessary condition for an equation to be exact is...  $$P''(x)-Q'(x)+R(x)=0$$  I began to expand the second equation but I do not know where to go from there.


I am Chinese and I have a UK spouse residence visa. I recently applied to the Netherlands visa office for a Schengen visa to visit Holland, this visit is only for two days. They then issued me with a 6 months multi-entry visa. I wish to visit Spain for 2 weeks in December, can I use the visa for this trip?

My wife was just issued a multiple entry visa by France, which is good for one year.  Our first trip will be to France, the issuing country.  My question is: after we leave the EU and return, must future trips also start in France? Or may we go directly to (say) Greece from the US on a later visit?


I am creating an addon for blender 2.75. Is there a way to accept user's input by creating a Variable? There can be an input slot in the Tools panel, and the user can enter the value in it, which will be stored in a variable which can use later in my code. :)

I was going through the "Getting started" API documentation for 2.68 since I'm guessing 2.70 is similar. I was testing out how to create my first script in 2.70 which I would like to save values which I will need later for future computations. I am using the Blender Panel UI for the user to modify the properties. Here is the basic code I'm stuck at from the HellowWorldPanel class. I was wondering why my property field isn't showing up in the Panel. (Edit: I'm sorry just to clarify this, the panel is showing up with my "Hello world!" label but my property called "bl_mine1" isn't showing up in the newly created panel)  Here is the code I am testing it with:  import bpy   class HelloWorldPanel(bpy.types.Panel):     """Creates a Panel in the Object properties window"""     bl_label = "Hello World Panel"     bl_idname = "OBJECT_PT_hello"     bl_space_type = 'PROPERTIES'     bl_region_type = 'WINDOW'     bl_context = "object"     bl_mine1 = bpy.props.FloatProperty(name = "MyProperty")      def draw(self, context):         layout = self.layout          obj = context.object         #Create New Row with text Hello World         row = layout.row()         row.label(text="Hello world!", icon='WORLD_DATA')         #Try showing a field box with MYProperty in it         row = layout.row()         row.prop(obj, "bl_mine1")  def register():     bpy.utils.register_class(HelloWorldPanel)   def unregister():     bpy.utils.unregister_class(HelloWorldPanel)   if __name__ == "__main__":     register()   Thanks for any input.


I create a webform in Drupal 8 with certain elements (first name, last name, email, phone, visible (Yes / No)). I want to display the results of the webform based on the element (visible = Yes), so that other roles cannot see the results where visible = No. How can I do that? How can I filter webform submissions based on element values?

I'm trying to query webform submissions based on a field value. The field is called "ticket_for". Somethings I tried and do not work:      ->condition('ticket_for',$adnummer)     ->condition('webform_submission_data:ticket_for',$adnummer,'CONTAINS') ...   What kind of condition should I be using in a query like this?  $query = \Drupal::entityQuery('webform_submission') ->condition('webform_id', 'ticket') ->condition('entity_id', $eventID) ->condition('webform_submission_data:ticket_for',$adnummer,'CONTAINS');


typedef struct foo{     void (*del)(void *toDel);     char* (*p)(void *tp) } Foo;  Foo init(char* (*print)(void*),void (*delFunc)(void*));   Trying to figure out how to assign or initialize the supplied parameters to the struct function pointers.

I want to initialize a struct element, split in declaration and initialization. This is what I have:  typedef struct MY_TYPE {   bool flag;   short int value;   double stuff; } MY_TYPE;  void function(void) {   MY_TYPE a;   ...   a = { true, 15, 0.123 } }   Is this the way to declare and initialize a local variable of MY_TYPE in accordance with C programming language standards (C89, C90, C99, C11, etc.)? Or is there anything better or at least working?  Update I ended up having a static initialization element where I set every subelement according to my needs.


MWE:  \documentclass[a4paper,11pt]{article} \usepackage{color} \usepackage{soul}  \begin{document} \label{lbl}   See here: \ref{lbl} % This does work \hl{See here: \ref{lbl}} % This does not work  \end{document}   Here is the error message:  ! Argument of \ref has an extra }. <inserted text>                  \par  l.14     \hl{See here: \ref{lbl}}                                   % This does not work ?

Here is a minimal example showing the problem.  \documentclass[10pt]{article} \usepackage[usenames,dvipsnames]{color} \usepackage{soul} %\soulregister{\ref}{1} \begin{document}  \section*{x}\label{x}  \section*{y} \hl{ Some text.   Section~\ref{x}. } \end{document}   I'm getting the error  LaTeX Warning: Reference `{x}' on page 0 undefined on input line 12.  ! Argument of \ref has an extra }.   The problem is with \ref. Commenting out the line beginning with "Subsection" makes the error disappear. \soulregister is intended for font commands. I don't know if \ref is a font command, but I could not get \soulregister to fix the problem (see the commented line above).


I currently have an application (API) hosted on a small server 1 GB RAM, 1 vCPU (Digital Ocean), the application read/writes to a MYSQL database which is also hosted on the same server.  I expect that the server will receive a huge POST requests soon, nearly 50K request per hour.   So the questions are, What do is your recommendation on upgrading the server?   Should I use a dedicated server for database? Should I use NGINX or Apache?, Is there custom settings needs to be done on the web server?; ex max concurrent connections, connection pool ..etc  Thank you

This is a  about  Related:      I have a question regarding capacity planning. Can the Server Fault community please help with the following:   What kind of server do I need to handle some number of users? How many users can a server with some specifications handle? Will some server configuration be fast enough for my use case? I'm building a social networking site: what kind of hardware do I need? How much bandwidth do I need for some project? How much bandwidth will some number of users use in some application?