Just like we have the sizeof('data_type') function in C, is there any function that returns the number of bits or bytes in python?    The function int.bit_length() eliminates the zeros before first one.

I want to know how to get size of objects like a string, integer, etc. in Python.  Related question:   I am using an XML file which contains size fields that specify the size of value. I must parse this XML and do my coding. When I want to change the value of a particular field, I will check the size field of that value. Here I want to compare whether the new value that I'm gong to enter is of the same size as in XML. I need to check the size of new value. In case of a string I can say its the length. But in case of int, float, etc. I am confused.


import java.io.*;  public class Page117 {      public static void main(String[] args) throws IOException     {         BufferedReader input = new BufferedReader(new InputStreamReader(System.in));         char letter;         String sentence;         int counter = 0;         char response = 'o';          do         {             System.out.print("Type a sentence: ");             sentence = input.readLine();             System.out.print("Type a character to find: ");             letter = (char) input.read();              for(int x=0;x<sentence.length();x++)             {                 if(letter==sentence.charAt(x))                 {                     counter++;                 }             }              System.out.println("Number of times " + letter + " occured is: " + counter);             System.out.print("Continue? [y/n]: ");             response = (char) input.read();          }while(response != 'n');               }         }   About the program: The user will enter a sentence.  The user will also input a character and count how many of that character occurs in the sentence.    I've come across a little problem.  How do I make it so that after the process, it allows me to input my response.  Because after I enter the character and tells me the number of occurrences, it either exits or won't allow me to input anything.    I've tried almost everything in my code.  I don't use do-while loops that much so this is kind of difficult for me. I don't use booleans that much either.

I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug.  Is == bad? When should it and should it not be used? What's the difference?


I try to find a reasonable solution for this equation but i couldent  I try to study lots of material but i couldent solve it. I am a high school student and try to learn. Integral  cos(log x)dx

Anyone could help me to solve this equation  I try to study lots of material but I coulden't solve it. I am a high school student and try to learn. $\displaystyle\int \cos(\ln(x))dx$?


I have a Sony WH-1000XM4 which is paired to Ubuntu 20.04. The output is configured to the headset, but the sound keep coming out from the speaker instead. Bluez was already installed: user@ubuntu:~$ bluetoothctl --version bluetoothctl: 5.53  I have tried to disconnect, connect again, reboot Bluetooth, but it still doesn't work. I have also installed the following libraries: sudo apt install libdbus-1-dev libudev-dev libical-dev libreadline-dev  But it didn't help.

This is on a machine I upgraded from 18.04 to 20.04 a few days ago. No issues at all getting sound to play out of headphones on 18.04.  The headphones are paired with Bluetooth. I unpaired and repaired them just to be sure. The settings panel for sound has them as an output option and I can select it without issue. However, no sound ever comes out of the headphones. I've even adjusted the volume both in the settings panel, in alsamixer and in pavucontrol. Nothing changes.  I see no errors in the bluetooth service log.  Output of:  { sudo lshw | grep product | head -n1 && sudo lspci -knn | grep Net -A3 && lsusb -v; } >output.txt 2>&1


I'm attempting to replace an entire line of text in a .ini file. It has surrounding text lines, so it has to be able to replace the text at that location. To find the correct line, I want to be able to search for text then change that line, for example: sg.ResolutionQuality=10 I want to be able to replace this with: sg.ResolutionQuality=20 but, also be able to then change that again to say: sg.ResolutionQuality=30 I've attempted to use loops to find the text and replace it, but have run into issues with duplicating 0's and other problems. If you can just point me in the right direction or help, itd be awesome. Thank you.

Is there any class in the .NET framework that can read/write standard .ini files:  [Section] <keyname>=<value> ...   Delphi has the TIniFile component and I want to know if there is anything similar for C#?


Theoretically, what happens if a flight diverts to a foreign country, needs everyone to leave the plane, and a person is found inadmissible to the country (even if they had a visa)?  For example, what would happen if a person from Iran was on the flight to Vancouver that diverted to Seattle? From what I see in news reports, the passengers did go through immigration.

What happens if a flight gets diverted to an airport where I don't have rights to enter the country?


How to replace form tag id with new id?    <form method="post" action="contactus.aspx" id="ctl01">   replace id="ctl01" with id="validForm"  Update  look like ctl01 id generating by code. by the time we changing id name, 'crl01` is not available yet. How to handle after page loaded?

I need to change an element's ID using jQuery.    Apparently these don't work:  jQuery(this).prev("li").attr("id")="newid" jQuery(this).prev("li")="newid"   I found out that I can make it happen with the following code:  jQuery(this).prev("li")show(function() {     this.id="newid"; });   But that doesn't seem right to me. There must be a better way, no? Also, in case there isn't, what other method can I use instead of show/hide or other effects? Obviously I don't want to show/hide or affect the element every time, just to change its ID.  (Yep, I'm a jQuery newbie.)  Edit I can't use classes in this case, I must use IDs.


I can't use Ctrl+Z to undo my step! I press Ctrl+Z nothing happens. My Ctrl+Z does not work. Why I can't ask this question? "This title does not meet our quality standards. Please make sure that it clearly summarizes your problem and uses proper grammar. You can put details in the body of your question."

I accidentally pressed some unknown key combination, and now I can't use Undo nor Redo in Blender


Well I'm just too green to Linux, but I'm stuck with a thing that I should know, and I don't. My file has the following permission bits sets:  -r-xr-xr-x   is owned by root ( but it should not matter since -x is active even for any user) it is not writable, and since it resides on a CDROM even if is a virtual iso mounted as a cdrom it sounds ok, but I can't execute: It says "Permission Denied" What I miss? The mount itself has execution permission, so it should execute, why it does not?  EDIT  I solved the issue, but not my doubt, since expliciting bash ./autorun.sh  works - i need a root account anyway for what's inside, but it works.

Let's say I have a file called run.sh that contains:  #! /bin/sh -x  x-www-browser index.html   And ls -l run.sh says:  -rwxr-xr-x 1 myusername myusername 39 Jan  9 19:32 run.sh   And ./run.sh says:  bash: ./run.sh: Permission denied   Why does it not work? Why does sh -x run.sh work perfectly?    More info, since it's not so easy apparently  If I do a sudo, it will not output an error, but won't do anything either.  myusername@crunchbang:/mnt/data$ sudo ./run.sh [sudo] password for myusername:  myusername@crunchbang:/mnt/data$


Please can someone tell me, when a married woman dies, would her widower still be called the son in law of his late wife's parents?  If so, would that title continue to apply if he remarried? He might then have a new mother and father in law, so could he be son in law to both sets of parents?

I am a widower.  I still have a strong personal relationship with my late wife's family, and I regard them as part of my own family.  They are blood of my blood in the sense that my children are related by blood to both me and them,  but if we had not had children, that link would not exist.    My only direct relation to them was by marriage, and with my wife's death, it would seem that that bond no longer exists; at least not formally.     Is there any enduring relationship by law or tradition for ex relations by marriage, and what would it be called?   Also, what if instead of death, we had been separated by divorce?    And what if I were to remarry,  would that change my relationship to my first in-laws?


My salad dressing has extra virgin olive oil (EVOO), raspberry wine vinegar, chives, sugar, salt & pepper, lemon juice and lemon zest. Can I keep it un-refrigerated for 18 hours?

How long can I keep salad dressings that I made?  Since this is probably affected by what it's made up of, let's say we're talking about different salad dressings made from a combination of the following ingredients: mayonnaise, ketchup, mustard, vinegar, sugar, garlic, oil, salt, pepper, lemon juice...  And are there any other ingredients that I should watch out for that could affect salad dressing shelf life? Any rules of thumb regarding storing salad dressings...?


I had a code review recently and a debate began. Much of my code looks like this:  for (i = 1; i <= 3; i++)         {             DoubleValue = tODBCX->getDouble(KeyFieldCount + i, IsNULL, IsSuccess);             if (IsNULL)             {                 LoggerDrillHole::LogToDB(LOG_ERROR, L"Survey depth, dip and azimuth values can not be NULL.", __FUNCTIONW__);                 IsSuccess = false;                 goto EXIT;             }             else             {                 if (i == 1)                     Depth = DoubleValue;                 else if(i == 2)                     DipDegrees = DoubleValue;                 else if (i == 3)                     AzimuthDegrees = DoubleValue;             }         }   The contentious goto statement sparked debate. This code is contained within a function that begins life by initializing a local boolean variable IsSuccess = true and the function finally returns IsSuccess. The EXIT strategy looks after essential tidy up code;  EXIT:      tODBCX->Close();     if (Key != 0) free(Key);     Key = 0;     if (PriorKey != 0) free(PriorKey);     PriorKey = 0;     return IsSuccess;   There were several such goto EXIT statements adjacent to setting IsSuccess = false and logging to database and so on. The comment was made that this is disruptive to the flow of the code. One should instead use a do loop (infinite loop) and break out of that loop and then process all of the required instead of using the goto statement.  I intensely disliked the infinite loop strategy, but I could get used to it if it truly improves the readability. Is there a better way?

Everyone is aware of Dijkstra's  (also  .html transcript and  .pdf) and there has been a formidable push since that time to eschew the goto statement whenever possible. While it's possible to use goto to produce unmaintainable, sprawling code, it nevertheless remains in . Even the advanced  control structure in Scheme can be described as a sophisticated goto.  What circumstances warrant the use of goto? When is it best to avoid?  As a followup question: C provides a pair of functions, setjmp and longjmp, that provide the ability to goto not just within the current stack frame but within any of the calling frames. Should these be considered as dangerous as goto? More dangerous?    Dijkstra himself regretted that title, for which he was not responsible. At the end of  (also  .pdf) he wrote:     Finally a short story for the record.   In 1968, the Communications of the ACM   published a text of mine under the   title "The goto statement considered   harmful", which in later years would   be most frequently referenced,   regrettably, however, often by authors   who had seen no more of it than its   title, which became a cornerstone of   my fame by becoming a template: we   would see all sorts of articles under   the title "X considered harmful" for   almost any X, including one titled   "Dijkstra considered harmful". But   what had happened? I had submitted a   paper under the title "A case against   the goto statement", which, in order   to speed up its publication, the   editor had changed into a "letter to   the Editor", and in the process he had   given it a new title of his own   invention! The editor was Niklaus   Wirth.   A well thought out classic paper about this topic, to be matched to that of Dijkstra, is , by Donald E. Knuth. Reading both helps to reestablish context and a non-dogmatic understanding of the subject. In this paper, Dijkstra's opinion on this case is reported and is even more strong:     Donald E. Knuth: I believe that by presenting such a   view I am not in fact disagreeing   sharply with Dijkstra's ideas, since   he recently wrote the following:   "Please don't fall into the trap of   believing that I am terribly   dogmatical about [the go to   statement]. I have the uncomfortable   feeling that others are making a   religion out of it, as if the   conceptual problems of programming   could be solved by a single trick, by   a simple form of coding discipline!"


How can one prove that the square root of a prime number (e.g. $ \sqrt 61$) is irrational.  First we need to prove that $61$ is prime. This can be done by simply showing that $$ 49 < 61 < 64$$ and so $$ 7 < \sqrt 61 < 8$$ then the only possible prime factors of $61$ are $2 , 3, 5, 7$. Then by contradictions and DIC we can show that $61$ is prime.   Now how can we show that $\sqrt 61$ is irrational?

Possible Duplicate:          I'm a total beginner and any help with this proof would be much appreciated. Not even sure where to begin.      Prove that for each prime number $p$, the square root of p is irrational.


I can connect my iPhone via USB to a Dell/Windows PC and it immediately recognizes it as a file folder and allows me to download pics.  I can't get my Ubuntu to connect with iPhone. Is there a simple solution?  I need to download pictures from iPhone 7 to Dell laptop running Ubuntu 16.04 LTS.

Is it possible to have Shotwell automatically sync with my iPhone so I have my picture library on both?


For a few days I've been looking for a trusted source for the latest version of Blender. I found two commands to download Blender, but the Launchpad page was like this:  so I just want to know if there is currently available a good compiled Blender version (it is 2.68a at the moment).  It would be great if someone would help me to get the latest Blender version. Thanks in advance.

I am interested in trying out the Blender 2.54 beta, but  don't have the time or patience to download and install all of the dependencies for it and compile it myself.  Is there a PPA somewhere that I can use to obtain a pre-compiled package for it?


I have a pretty  old Aluminum Macbook (late 2008). I pretty much have the original MacOS installation, continuously upgraded to Mac OS Yosemite. Nowadays, it is kind of hard to get by with 250 GB of HD, so I  thought about upgrading to a bigger HDD.  I kind of have the feeling that a clean reinstall of MacOS after 6 years of running it would be a good idea, at the same time I do not know where the original installation CD is left. Is there a way to install Yosemite directly??

I'd like to start from scratch with Yosemite. I have Mavericks running on my iMac now but I'd like to just wipe the system and start with a clean Yosemite install.  How do I do a clean install of Yosemite on my machine, not an upgrade install?


Can anyone help with the name and any details on this short story?  It concerns a genius inventor. He invents, for instance, a drink that slows down time that he takes and then wanders the streets watching the vast amount of time something like a fly will take to cross a room.   He then invents a very dangerous technique where he can send another person in a group out of this existence and obliterate all memory of that person. He tells a group of people, mainly his friends, about this invention and goaded by their disbelief, sets the invention in motion.  I'm not sure how its supposed to work (it's been at least sixty years since I read the story) but all the people in the group are described including one shy man or woman. They close their eyes, the process starts. When they wake, there is general relief that all is the same. Getting up to leave, someone knocks over an empty chair.  It's a classic 'twist in the tail' ending and you realise that any memory of the outsider is wiped from memory.  The clever paradox is that the inventor will always believe that his invention is a failure.

In about 1966 or so, a stand-in teacher at our primary school spent the afternoon reading short stories to us. There was a wide genre, but I was particularly fond a one which was science fiction/mystery.  It involved a group of people who were talking about mysteries, and another man from outside the group bet the he could tell a story, and one of them would disappear and the others would not notice. The final line was something like "he kicked over the stool and walked from the room".


, is the same issue I've been having.  What happens is when I right click an email address within an email message, Gmail opens a new message. I want to disable this. How do I do that?   NOTE:  this is using Gmail in Chrome.  I opened Gmail in Firefox and I don't have the problem. Here are some screenshots:  Email in Chrome:    Email in Firefox:     While I can just use Firefox, I'd REALLY like to figure how to disable this in Chrome.

If an email message contains an email address in the body, Gmail automatically converts it into a mailto: link, which is helpful.  And many times each day I've enjoyed being able to right-click a mailto: link in an email (within Gmail) and then click "Copy email address" in the context menu.  Then I can paste that email address into a program (such as when I want to search a database).  However, within the past month or so, I've noticed that I can't right-click and click "Copy email address" without Gmail then popping open a "New Message" panel and changing my current URL to have ?compose=new at the end.  I wonder if it's related to .  How can I disable it?  I'm tried of having to click the "Discard draft" trash can button so many times throughout the day.


Shield Guardians make two fist attacks at +7, are size large, strength 18(+4), CR7, and have an intelligence of 8. They can be commanded by the owner of their Master’s Amulet.    Can a Shield Guardian use weapons?  If so, at what proficiency? (i.e. does it only use it’s ability bonus or does it have a proficiency bonus for being CR7.) Could it use a weapon in each hand? Is there any armor beside shields that could fit - and if so - would they even have any effect?   Note: We should clarify that we are considering this in the context of Adventurers League. This is a slight variation on the question  because those answers suggest that for the DM’s creatures it is the DM’s call. Whereas Shield Guardians are treasure owned by PCs and the proficiencies would be logged on an AL log. Would this mean the first DM chooses the proficiencies of the Shield Guardian and that’s what gets logged? Or does every DM make a ruling every game? Is there perhaps a more generic guideline that applies for what weapons and armor are used and at what proficiencies?

As a bit of background, my players befriended a kobold and gave him a javelin (instead of the dagger a kobold usually have, according to his stat block). They later also gave him a leather armor for his protection.  Does the kobold have proficiency for the javelin and the leather armor ?   Or the general question: Do monsters have proficiency with all weapons and armors ?  If not, how can I know what they have proficiency with ?


I have recently installed Ubuntu 13.04 on my PC, and it's quite slow. I'm not sure what is causing the trouble, but it looks to me like it's Unity, because all the applications take a long time to start.  I have an Intel Core 2 Duo 2.2 GHz CPU and 1.5GB RAM. I don't have any extra graphics or video card installed. And from what I have read I know that Unity uses a lot of GPU if there is a GPU installed. So if this is the cause of my poor system performance, would switching to a new desktop environment be advisable? Do you have any other suggestions for how to improve my system's performance?

What are your tips for improving overall system performance on ubuntu? Inspired by this  I realized that some default settings may be rather conservative on Ubuntu and that it's possible to tweak it with little or no risk if you wish to make it faster.  This is not meant to be application specific (e.g. make firefox load pages faster), but system wide.  Preferably 1 tip per answer, with enough detail for people to implement it.  A couple of mine would be:   Install  (via Software Center or sudo apt-get install preload); Change  value - "which controls the degree to which the kernel prefers to swap when it tries to free memory";   What are yours?  PS: Since this is not intended to have a unique answer but rather, several useful tips, I'm making this community wiki out-of-the-box.


I am new to Python. I came across a document providing info about how object re-usability in Python works. I understand that object re-usability is applicable for int between 0 and 256, but not applicable for float and complex data type.   But the behavior is very different when one runs a Python code is thru' cmd and in Eclipse IDE.    num1 = 10.2 num2 = 10.2 print(id(num1)) print(id(num2)) print( num1 is num2)   The above code when run thru' cmd, the id of num1 and num2 will be different and last print statement would print False, this is as expected. But in Eclipse, the IDs for both the float variables will be same and the last print statement will print True !   For int variables, when the code is run thru' cmd, if the variables have same value but more than 256, the id() would return different IDs and 'is' operator would produce False. But in Eclipse for any value (even bigger than 256), if two int variables have same value, the id() function would return same id for both the variables and 'is' operator would return True.   Why the behavior is so different in Eclipse? How come in Eclipse, the concept of object re-usability is available even for float and int larger than 257 ?

Why does the following behave unexpectedly in Python?  >>> a = 256 >>> b = 256 >>> a is b True           # This is an expected result >>> a = 257 >>> b = 257 >>> a is b False          # What happened here? Why is this False? >>> 257 is 257 True           # Yet the literal numbers compare properly   I am using Python 2.5.2. Trying some different versions of Python, it appears that Python 2.3.3 shows the above behaviour between 99 and 100.  Based on the above, I can hypothesize that Python is internally implemented such that "small" integers are stored in a different way than larger integers and the is operator can tell the difference. Why the leaky abstraction? What is a better way of comparing two arbitrary objects to see whether they are the same when I don't know in advance whether they are numbers or not?


We have the equation $$\frac{\sqrt {x}}{2}=-1$$ I proceed as follows $$\sqrt {x}=-2 $$ $$x=4$$ Which does not certainly solve the equation. Where did I go wrong?

I'm trying to solve this equation:  $$2-x=-\sqrt{x}$$ Multiply by $(-1)$: $$\sqrt{x}=x-2$$ power of $2$: $$x=\left(x-2\right)^2$$ then: $$x^2-5x+4=0$$ and that means: $$x=1, x=4$$    But $x=1$ is not a correct solution to the original equation.  Why have I got it? I've never got a wrong solution to an equation before. What is so special here?


Background  In undergraduate Abstract Algebra homework, for an integer $n$ with decimal representation $a_m a_{m-1} ... a_1 a_0$, I proved that    $3$ divides $n \iff 3$ divides $\sum_{i = 0}^{m} a_i$, and $11$ divides $n \iff 11$ divides $\sum_{i = 0}^{m} (-1)^i a_i$.   Proofs of these facts can be found  and , respectively.  My Question  For an arbitrary prime $p$, can we deterministically formulate a non-vacuous statement of the form  $$\forall n \text{ expressible as } n = a_m a_{m-1} ... a_0 \in \mathbb{N}, \text{ we have that } p \mid n \iff p \mid \sum_{i = 0}^{m} b_i a_i$$  (... where the trick of formulating this statement is coming up with the sequence $(b_i)_0^m$)?  I am interested in additive structure to the primes, and I am wondering if this type of exercise could show some interesting structure.

A number is divisible by $2$ if it ends in $0,2,4,6,8$. It is divisible by $3$ if sum of ciphers is divisible by $3$. It is divisible by $5$ if it ends $0$ or $5$. These are simple criteria for divisibility.  I am interested in simple criteria for divisibility by $7,11,13,17,19$.


$(-81)^{1/4}$  The answer, I got was -3,3..but when I input it in the webwork, it does not work.  What is the method to solve this?

Determine the fourth roots of -16 in the form $x +iy$ where $x$ and $y$ are not trigonometric functions.  I do not even know what they really want from me in this question.  My initial thought wass: $\sqrt[4]{-16} = 0 + 2i = 2i$  but that seems overly simplistic for a problem that counts as 8 points in an exam.


I trying to convert from WPF combobox selected value to enumurator it return not valid cast in the runtime otherwise the string and the enum name is matched my code is  Siren.PfundMemberWebServices.Emirates EM = (Siren.PfundMemberWebServices.Emirates)cmbemirate.SelectedValue

What's the best way to convert a string to an enumeration value in C#? I have an HTML select tag containing the values of an enumeration. When the page is posted, I want to pick up the value (which will be in the form of a string) and convert it to the corresponding enumeration value. In an ideal world, I could do something like this: StatusEnum MyStatus = StatusEnum.Parse("Active");  but that isn't a valid code.


I am trying to apply glmnet's lasso to a set of features in which there are multiple categorical variables with multiple levels. My intention is to let lasso reduce some of the coefficients of the features down to 0, so that they can be thrown out. Some of my categorical predictors have as many as 50 levels.  The result is that the glmnet is throwing out only some of the levels of the categorical predictors, but keeping some others. My understanding is that this is incorrect - the dummified levels are all a part of the same predictor - so one needs to throw out the entire predictor (with all it's levels) or keep all of them. The data set is large, maybe 600,000 rows. I am trying to predict a binary outcome between two classes.  Here is an example of my code:  library(glmnet) x <- model.matrix(project.status~., data = data_train) y <- data_train$project.status  lasso.net <- cv.glmnet(x, y, alpha = 1, family = "binomial", nfolds = 5,  type.measure = "auc")   and the output:  >coef(lasso.net)   86 x 1 sparse Matrix of class "dgCMatrix"                                                        1 (Intercept)                                    -9.099069e-02 (Intercept)                                     .            project.gradeGrades 6-8                         .            project.gradeGrades 9-12                        6.891742e-02 project.gradeGrades PreK-2                      3.107257e-03 project.resourceBooks                           .            project.resourceClassroom Basics                8.106422e-01 project.resourceComputers & Tablets             5.849269e-01 project.resourceEducational Kits & Games        8.442034e-01 project.resourceFlexible Seating                5.031112e-01 project.resourceTrips                           .            project.resourceVisitors                        .            project.cost                                   -5.286631e-04 school.metro.typesuburban                       1.991501e-02 school.metro.typetown                          -8.060338e-02 school.metro.typeurban                          2.380249e-01 school.percent.lunch                            4.178175e-04 school.stateAlaska                              .            school.stateArizona                            -2.095588e-01 school.stateArkansas                           -1.652419e-01 school.stateCalifornia                          1.209260e-03 school.stateColorado                            6.299693e-02 school.stateConnecticut                         1.186827e-01 school.stateDelaware                            1.829217e-01 school.stateDistrict of Columbia                4.099672e-01 school.stateFlorida                             . school.stateGeorgia                            -2.292140e-01   I've not included the entire output (it's long) but hopefully this presents my issue. The school.state predictor is a categorical predictor with the 50 states. I essentially want to see if I can throw this predictor out, but instead of zeroing the entire predictor, it is only zeroing out some of the states, and keeping the others. Likewise with the project resource and project grade (it's essentially a charity project, I am trying to predict whether they met their funding goal or not).

I have read the that the group lasso is used for variable selection and sparsity in a group of variables.  I want to know the intuition behind this claim.   Why is group lasso preferred to lasso? Why is the group lasso solution path not piecewise linear?


am I able to get GPS coordinates for my app with Google Maps API just with GPS and GSM (no mobile internet or Wi-Fi)?  Thank You!

I have a Samsung Galaxy S2 that has some problems with the GPS: If I use internet my navigation works but when I turn the 3G off, GPS does not work.  Do I need internet/3G to use GPS?


I'm starting a new campaign and have decided on a Monk.  I know that chossing to be an Elf gives me a +2 Dex.  For the Wood Elf subclass does that give you an additional +1 Wisdom or does that take the place of the +2 Dex? What I'm understanding so far is that creating a Wood Elf Monk would give me a +2 to Dex and a +1 to Wisdom.

If I pick wood elf as my race do I also get the other benefits from just the elf race? Like the wood elf gets +1 wisdom but does that mean I also mean I get the +2 dex from the non subrace elf?


Having trouble understanding wire vs reg. As I understand, the output of a module can be reg type but then why doesn't this code work for a simple adder? module add(a,b,cin,sum);    input a,b,cin;    output sum;    reg    sum;    sum=a+b+cin; endmodule  But if I use wire, like as shown: module add(a,b,cin,sum);    input a,b,cin;    output sum;    assign sum=a+b+cin; endmodule  It works. Why?

Assuming i have these two codes:  module wire_example( a, b, y);   input a, b;   output y;    wire a, b, y;    assign y = a & b;  endmodule   and the second one is:  module reg_combo_example( a, b, y); input a, b; output y;  reg   y; wire a, b;  always @ ( a or b) begin      y = a & b; end  endmodule   my question is what is the difference in the net list, both of them will have an gate, but will the module with reg y will have a flip flop or a latch to hold the data while wire y won't have any latch?


Nowadays, in the scientific domain, increasingly, people in the top position argue against doing post-hoc analysis and they advise against collecting a bunch of data and just make up a story after data collection and report the significant findings. In psychology, which is my field, recently some journals accept pre-registration of research proposals and those journals allow those studies to be published regardless of the results (see )  Yes, I understand people's conceptualisation of how science is done is that:   I have some competing (maybe mutually exclusive) hypotheses I design a study (maybe an experiment) and collect data I look at the data and see if it supports my hypotheses I publish my findings   However, is there really a problem of some people's "post hoc" way of doing research? If there is a hidden pattern in reality and researchers couldn't really have a grasp of it at the moment, what's wrong with doing a exploratory study and collect a bunch of data and examine their relationships in a post hoc way? And why is making up a story to cover up a study a problem?

My statistic professor says so, all the books that I look at state it:  is unscientific. You must derive a hypothesis from theory first, and then collect data and analyse it.  But I really don't understand what the problem is.  Suppose, I see sales figures for different car colors and form the hypothesis that from numbers of different-colored cars sold the largest group of cars on the street shoud be white. So I sit at some street one day and note all the colors of all the cars that pass me. Then I do some tests and find whatever.  Now, suppose I was bored and sat at some street one day and noted all the colors of all the cars that passed me. Since I love graphs, I plot a pretty histogram and find that white cars form the largest group. So I think that maybe most cars on the street are white and perform some tests.  How and why do the results or the interpretation of the results of the post-hoc test differ from those of the theory-driven* hypothesis test?  * What's the name for the opposite of a post-hoc test, anyway?    I would like to add that most of our knowledge about the universe (the Earth moves around the Sun) is deduced post hoc from observation.  It seems to me that in physics it is perfectly okay to assume that it is not coincidence that the sun has been rising in the East for the last thousand years.


I have users inserting comments for their courses, and I save them on SQL like this:  $return = $_POST; $x = $return["comment1"];  $result = "UPDATE  Students SET  `Comment1` =  '$x' WHERE  StudEmail = '$email'  ";   My question is the following: since they are italian, they use letters like: ò,à,ù,è. When SQL saves them, it doesn't recognise them. And obviously, when I print out those comments, it will print them out with a weird symbol.  Any advice?  Example: Comment: Mi è piaciuto SQL saves: Mi ï¿½ piaciuto

I'm setting up a new server and want to support UTF-8 fully in my web application. I have tried this in the past on existing servers and always seem to end up having to fall back to ISO-8859-1.  Where exactly do I need to set the encoding/charsets? I'm aware that I need to configure Apache, MySQL, and PHP to do this — is there some standard checklist I can follow, or perhaps troubleshoot where the mismatches occur?  This is for a new Linux server, running MySQL 5, PHP, 5 and Apache 2.


I am working on a CSS only psd conversion and I need to center the banner text vertically in the middle of the banner image. Any suggestions how to accomplish without using flexbox and grid?   header {     background-image: url(../assets/main-banner.png);     background-size: cover;     background-repeat: no-repeat;     /* viewport (screen height), the el is now taking 90% of the browser height */     /* We are doing this since the  doesn't have a ton   of content and we want to be able to see the background image. */     height: 90vh;     padding-top: 30px;  }  h1 {   font-family: 'Iceberg', cursive;   font-size: 8rem;   text-align: center;;   line-height: 80px;   text-transform: uppercase; }  header h2 {   font-family: 'Montserrat', sans-serif;   font-size: 3.5rem;   text-align: center;   text-transform: none;   background-color: rgb(146, 0, 255);  }

Home

About

Blog

Contact

Thunder
Force
 Stadium

presented by hot cops

I have a div with two images and an h1. All of them need to be vertically aligned within the div, next to each other. One of the images needs to be absolute positioned within the div. What is the CSS needed for this to work on all common browsers?

testing...


Bit of a regex newbie... sorry. I have a document with IEEE style citations, or numbers in brackets. They can be one number, as in [23], or several, as in [5, 7, 14], or a range, as in [12-15].   What I have now is [\[|\s|-]([0-9]{1,3})[\]|,|-].  This is capturing single numbers, and the first number in a group, but not subsequent numbers or either number in a range.  Then I need to refer to that number in an expression like \1.  I hope this is clear! I have a suspicion I don't understand the OR operator.

I don't really understand regular expressions.  Can you explain them to me in an easy-to-follow manner?  If there are any online tools or books, could you also link to them?


I really like the hats game. But I would love to keep the hats longer then only one winter. I want to leave them in my wardrobe during summer. Last year, I collected some cool hats, and I apparently lost them during summer.  Maybe we could make a system that allows hats to last for about 2 or 3 years, so we don't have to start over each winter. Or even specify per type of hat a number of years they last? Very very rare hats could last for ever.  I asked this, simply because I love hats! :D

At this point, I am relatively confident that Winter Bash will become an annual event. The event is oodles of fun for our communities, and almost everything we do as employees in putting the event together is done with an eye toward repeatability and automation.   With that in mind, I see a lot of feature requests come through on MSO and child metas that are great ideas, but simply not possible (or not worthwhile) to implement for this year's event. The same happens with minor bugs that give Winter Bash a few rough edges without disrupting functionality - they often get left behind on the "eh, maybe next year, if there's time" list.   Reader, this is that list.   What tweaks and feature requests have come up this year that we should keep in mind for next year?


I don't regularly use LaTeX so apologies if this has an obvious solution. I am compiling theorems/lemmas and their respective proof in a document and I wanted to be able to somehow define a theorem with a label (for example, 2.20) and write out the proof next to it* in the *.tex document and then for it to render so there is a section for all the theorems (with their appropriate labels) and after all the theorems, a section for all the proofs (which would ideally have the same labelling). I'm not sure if there is a sleek way to do this and of course, I can always just manually label theorem and proof separately, so i'm really just looking if anyone is aware of a nice way to do this. Edit: In response to a comment, I am using \newtheorem command without any packages (for this purpose) currently, but am not against using any package. *It is correct that I wish to typeset theorems and associated proofs next to each other.

Can I place all proofs to theorems in appendix automatically? Usually proofs are written in the LaTeX codes immediately after the theorems. Without physically moving proofs to appendix, how can I place them in appendix automatically? Is there a package?


For example, given the probability distribution between two similar weapons:     D&D 5E Weapons - Basic Rules pg.48:      Damage Discrete Distribution - :      Its evident that Greatsword is more reliable and has a higher mean damage roll.  But how does this change if we factor in an attack roll with some chance to hit? Do critical hits make the Greataxe preferential?

6.5 (1d12) slashing Heavy, Two-Handed           7 (2d6) slashing Heavy, Two-Handed   This is why I think Greatsword is superior to Greataxe:   Slightly higher average damage Higher minimum damage (2, instead of 1) Can reroll two dice, instead of only one,    Since feats for different categories of weapons are not officially published yet (), I don't see why people are choosing Greataxe over Greatsword, except for flavor or availability (found enchanted Greataxe).  Mechanically, is there advantage of using Greataxe instead of Greatsword?


i know it's rude and pretentious and maybe stupid to ask such question but, i would like to know the reason why in geometry the area of a parallelogram follows this formula :  $ Base \times Height $  and not this one :  $ Base \times Side $  I saw this method which consists of transforming our figure into a rectangle by moving the black one to the right, and that seems logical to me, but why not adopt the second rule, all the horizontal points multiplied by the vertical ones ?    PS :  I found the same , but was unconvinced by the answers

I've seen how to visualize the formula for getting the area of a parallelogram. The first picture shows 2 ways which give the same result of Area = base * height.   (link to first pic)  However, the first time I thought about it before being show the actual formula, I thought it was Area = side * side.   (link to second pic)  The 2 sides of the parallelogram are 2 vectors, x and y.  If you place copies of vector y length of x times along the vector x, and then you add all lengths of vector y's (which is the same as length of vector y * length of vector x), it seems like you also get the area of the parallelogram.   I know that you'll end up with a different result since the height is always less than the length of the vector y (unless they were parallel) but the method in the second picture seems correct.   I also haven't seen the second picture's method being taught online so I'm guessing it's actually incorrect. What I want to know is what makes it incorrect because it really seems like it's correct despite giving a different answer from the usual base * height formula.  Thanks in advance for any help.


From the graph I observed that these 3 functions cut at a particular point.     but what should be the value of x which will satisfy the given eqn I am unable to figure it out.

There is an unique solution with $x$ being approximately $0.739085$. But is there also a closed form solution?


I was watching a Physics TV show, When someone called Alex Filippenko said that when there was the Big Bang, the Space extended at a speed faster than speed of light. He said that it wasn't against the Theory of relativity because space isn't a particle and can go faster than speed of light.  So I wanted to know if that is a fact? And otherwise how could the light go further if space around wasn't going at least as fast as light?

The observable universe is approximately 13.7 billion years old. But yet it is 80 billion light years across. Isn't this a contradiction?


Recently the Google keyboard has activated suggestions for both of my selected languages.  This is a real nuisance since the suggestions are a mess IMO.  How can I disable it and go back to switching languages manually?

My phone just got the new Gboard, and to be honest, I haven't noticed much of an improvement. Maybe I don't use its many celebrated features as much as I should.  However, I have one big problem with it the way it is. I use my phone to mainly type two languages: Norwegian and English. Before the update, I would switch between them by the touch of a button (the globe icon next to the space bar), and for those rare occations I needed something else, I could momentarily enable them in the settings. I used the English layout for writing English, and the Norwegian language to write Norwegian. This way, the moment I begin to write, the swipe function knows which dictionary to test for what I'm trying to type, and everything works nicely.  However, with the new Gboard, it can do both languages at once. Apparently, the internet is happy that you don't have to manually switch, but I am more annoyed at the fact that when I begin swiping, the keyboard doesn't know which dictionary to use, so I can swipe all I want without any words coming out. I have to manually type a few words first before it gets the idea, and from there it works nicely. It also makes it much more difficult to mix both languages into a single small text.  How can I get back to manually switching between languages? Is there a setting I've missed, or do I have to roll back to an earlier version?  I'm on an LG Nexus 4, running Android 5.1.1, and Gboard version 6.0.69


Good day/night. I wanted to post something at StackOverflow and it was very urgent. I made to use correct grammar (I'm speaking English natively) but I was not allowed to post my question because 'question body does not meet our quality standards'. I read what these 'quality standards' are and my question seems to be alright. But for some reason it is not. Can you tell me what is wrong with it? Here it is:     Good day/night. Today i found one old tablet of mine. I can not remeber the pattern and i can not remove it. Tried ADB but it didn't have USB debunging on (when doing 'adb devices' list was empty). Tried trough Google Device Manager and still did not succeed. It acts like this tablet never existed. When i look carefully i saw that the google profile picture is an old one of mine. I turned on wifi but i didn't sync it with my new one. Is there any way to unlock it?

While trying to ask a question, I got the error message     This question body does not meet our quality standards. Please make sure that it completely describes your problem - including what you have already tried - and is written using proper grammar.    Why am I getting this message? What can I do to get the system to accept my question? Can you be more specific? What are good resources on how to ask high-quality questions?      For more information, see  in the .


I am trying to run and ADODB command in MS Access 2012 to exec a stored proc in our SQL server 2008R2 database, but I keep getting error 38 and SQL profiler shows the following:     Error: 18456, Severity: 14, State: 38.   2015-01-28 12:59:27.34 Logon   Login failed for user 'NordenDevel'. Reason: Failed to open the explicitly specified database. [CLIENT: 82.71.5.169]   This user (NordenDevel) login works on this database (NordenWeb) in SQL Server Management Studio and in Visual Studio, so the database is working fine and I do not see how it could be a permission issue.  Can anyone suggest what I could do to find out what's wrong?  Many thanks, YAOWSC

Message that SQL Server Log File Viewer shows:   Login failed for user [User] Error: 18456, Severity: 14, State 38   What it actually means:  Failed to open the explicitly specified database   My Question:  Is there a list somewhere of all the variations of the 18456 errors (Login failed), for each combination of severity and state, with the helpful description text?  I've had a Google but can't find anything other than specific combinations.


I'm going blank here, so forgive me for what should be simple. The search engines weren't helpful. I tried to search.  Example:  The finicky felines finished their food.  I'm drawing a serious blank here, so go easy on me.

In the movie 'V for Vendetta' you have for example (bold part):     Evey: Who are you?        V. : Who? Who is but the form following the function of what and what I am is a man in a mask.      Evey: Well I can see that.        V. : Of course you can, I’m not questioning your powers of observation, I’m merely remarking upon the paradox of asking a masked man who he is.      Evey: Oh, right.      V. : But on this most auspicious of nights, permit me then, in lieu of the more commonplace soubriquet, to suggest the character of this dramatis persona.      V. : Voila!   In view humble vaudevillian veteran, cast vicariously as both victim and villain by the vicissitudes of fate. This visage, no mere veneer of vanity, is a vestige of   the “vox populi” now vacant, vanished. However, this valorous visitation of a bygone vexation stands vivified, and has vowed to vanquish these venal and virulent vermin, van guarding vice and vouchsafing the violently vicious and voracious violation of volition. The only verdict is vengeance; a vendetta, held as a votive not in vain, for the value and veracity of such shall one day vindicate the vigilant and the virtuous. Verily this vichyssoise of verbiage veers most verbose, so let me simply add that it’s my very good   honour to meet you and you may call me V.       Evey: Are you like a crazy person?      V. : I’m quite sure they will say so.   What do you call sentences like these? And do you know some other ones?


Also, why do we use the underscores? After all, I define the main method as main(), not as __main__().

Given the following code, what does the if __name__ == "__main__": do?  # Threading example import time, thread  def myfunction(string, sleeptime, lock, *args):     while True:         lock.acquire()         time.sleep(sleeptime)         lock.release()         time.sleep(sleeptime)  if __name__ == "__main__":     lock = thread.allocate_lock()     thread.start_new_thread(myfunction, ("Thread #: 1", 2, lock))     thread.start_new_thread(myfunction, ("Thread #: 2", 2, lock))


When I searched on Google on Nexus 7: javascript+date+formatting, and clicked the first link, I was redirected to the Stack Exchange app (which I want), but the app crashed.  I'm not sure if this happened since the new release, but it is really annoying. Here are the details of the report:     Sourcefile: ComponentName.java, line 77, exception java.lang.NullPointerException.   I have also sent the crash report, so you can have more information about this.

The StackExchange app crashes for me on every start when I click a link in the browser. It seems (based on the StackTrace) that the url parser causes a null pointer exception. I'm using 0.1.90.


If $$1=P(C\text{ }|\text{ }B)=\frac{P(C\cap B)}{P(B)}$$ then we know that $P(C\cap B)=P(B)$. If $P(B\text{ }|\text{ }A)=1-\epsilon$ for $\epsilon\geq 0$ then $$P(A)=\frac{P(B\cap A)}{1-\epsilon}$$Using this I found that $$P(C\text{ }|\text{ }B)=(1-\epsilon)\frac{P(C\cap A)}{P(B\cap A)}$$ Now I have to show that $$\frac{P(C\cap A)}{P(B\cap A)}\geq 1$$ I don't know how to use the first assumption to show this. I need hints. Thanks.

We need to show that, given $P(B\mid A)=1-\varepsilon$ for some $0<\varepsilon<1$ and $P(C\mid B)=1$, that $P(C\mid A)≥1-\varepsilon$. Since we know that $P(C\mid B)=1$, it follows that $P(B \cap C)=P(B)$. This however, doesn't really help much. I tried a lot of things, but I couldn't prove this question, although it seems pretty straight-forward.


I am new to the field of GIS and use Trimble Pathfinder and TerraSync.   I just started with ArcGIS 10.3 and was wondering if anyone can recommend a entry level "Q&A" book or site for ArcGIS 10?

I was wondering what book(s) is/are available for learning ArcGIS Desktop functionality.  I would like to use one in conjunction with books on the theory of GIS since even though I can understand the concepts I still have trouble with how to use the more advanced ArcGIS Desktop features.   I understand there are quite a few online tutorials but I do my best learning if I have a book in front of me.


I need to show that $$\sum_{x=1}^{n} \cos^2(x)$$ is bounded above. I know that there's a similar formula for $$\sum_{x=1}^{n} \sin(2x)$$ but I can't seem to find it anywhere.

Possible Duplicate:          Prove $$\cos(\alpha) + \cos(\alpha + \beta) + \cos(\alpha + 2\beta) + \dots + \cos[\alpha + (n-1)\beta] = \frac{\cos(\alpha + \frac{n-1}{2}\beta) \cdot \sin\frac{n\beta}{2}}{\sin\frac{\beta}{2}} $$


Why is being part of the peer-reviewing process beneficial for a graduate student?

I have recently published my first research paper and have already received a request to review a manuscript. The journal's impact factor is low, but it is open access, and the paper's topic is relevant to my field of study. What factors should I keep in mind when deciding whether to accept or decline the request to review? What level of expertise is typically expected from a good-quality review?


I upgraded from 16.04 to 17.04 with a slight problem. I was not able to do anything when I got to the login screen. All I saw was the login-screen, no cursor, and the text cursor blinked a few times and stopped. I read on a forum about someone who had a similar problem, and followed their advice to upgrade right away to 17.10 from 17.04 without trying to fix the login problem.  So I entered recovery mode and started upgrading to 17.10. This was not completely pain free either. I had to set up an ethernet interface, run dhcp and even change the dns-server manually. But after this it started downloading.  Halfway through it gets to around "setting up base files" and just sits there for an hour. I figured it froze and restarted.   Now when I enter recovery mode and run dpkg I get the message   An upgrade from 'artful' to 'zesty' is no not supported with this tool   but that's not what I'm trying to do. apt-get update only wants to remove some files and dpkg --configure -a and apt-get install -f both get stuck on setting up base files (9.6ubuntu102).  I don't remember exactly what I did but I was also able to see what files where not installed, and there were a lot of files from the unity package. Doesn't 17.10 use GNOME instead?

I am currently using Ubuntu 10.04. I know there is a 10.10 release, but can I upgrade directly to 11.04? Could you walk me through the steps please?


I have been trying to solve an exercise based on the relations and functions. Right now I had stuck to a question based on functions. The question says:  A real valued function $f(x)$ satisfies the functional equation $$f(x-y)=f(x)\cdot f(y)-f(a-x)\cdot f(a+y)$$ where $a$ is given constant and also $f(0)=1$. Then $f(2a-x) =$?  So far I know in these kind of questions we have to replace a specific variable with another value (maybe any constant or another variable). Like I had done an example previously. Here is an example:  Question says, $f(x)+2f(1-x)=x^2$, Then what is $f(x)$?   Answer: Given, $$f(x)+2f(1-x)=x^2\text.\tag1\label1$$ Replace $x$ with $1-x$. So now equation is $$f(1-x)+2f(x)=(1-x)^2\text.\tag2\label2$$ So after multiplying equation \eqref{2} with $2$ and subtracting equation \eqref{1} we can get the $f(x)$.  I know This one is quite easier than that I had asked because my question would need much more substitutions.

A real valued function $f$ satisfies the functional equation $$f(x - y) = f(x) f(y) - f(a - x) f(a + y) \tag 1 \label 1$$ Where $a$ is a given constant and $f(0) = 1$. Prove that $f(2a - x) = -f(x)$, and find all functions which satisfy the given functional equation. My Try: Put $x=y=0$ in equation \eqref{1}. $\implies f(0)=f(0)^2-f(a)\cdot f(a)\implies f(a)^2=0\implies f(a)=0$. Now Put $x=a$ and $y=x-a$. $\implies f(2a-x)=f(a)\cdot f(x-a)-f(0)\cdot f(x) = -f(x)$. My question is how can I find all function which satisfy the given functional equation. Help me. Thanks.


A user have asked a question, and it's marked "asked 7 mins ago"      I have post an answer and then enter the user profile to see if he had connected after posting my answer. But it's indicated "last seen 22 mins ago".     I think it's not correct because he already ask a question "7 mins ago"

What kind of ninja skills allows for a user to post a question and have the timestamp appear later than when their profile says they were sighted?    How did this user post a question without being "seen"?  Shouldn't any of the main actions (posting, commenting) update the last seen field in their account?


I have this class which is meant to take values of type double from arrays within an ArrayList and increase them by a defined rate:  import java.util.ArrayList;  public class Company {     static ArrayList<Employee> employees;      public Company() {         Company.employees = new ArrayList<Employee>();     }       public static ArrayList<Employee> getEmployees() {         return employees;     }      public static void setEmployees(ArrayList<Employee> employees) {         Company.employees = employees;     }      public void increaseSalaries(double rate) {         if (rate <= 0.0) {             throw new IllegalArgumentException();         } else {             for (int i = 0 ; i < employees.size() ; i++) {                 employees.get(i).increaseSalaries(rate);             }         }     } }   I want to write a main method which builds an arraylist and calls the method on it, but I'm not sure how. So far I have  public static void main(String[] args) {     Company businesstown;     HourlyEmployee george;     MonthlyEmployee ambrose;     george = new HourlyEmployee("George", "McClellan", "1537", 1.04);     ambrose = new MonthlyEmployee("Ambrose", "Burnside", "1536", 741.0); }   but I'm unsure about how to add these arrays to the ArrayList businesstown. I've tried a lot of combinations of .add(george); but I can't get it right. Either it says that      the method add(HourlyEmployee) is not defined for type Company   or it compiles and it throws a NullPointerException.   (I should add that both HourlyEmployee and MonthlyEmployee are classes which extend Employee)

What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them?  What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?


We have a problem that started appearing in kernel-uek-3.8.13-68.1.2.el6uek.x86_64.  Symptoms and description matches exactly this linux kernel developers description   xen-netfront: use correct linear area after linearizing an skb  [ Upstream commit 11d3d2a16cc1f05c6ece69a4392e99efb85666a6 ]  Commit 97a6d1bb2b658ac85ed88205ccd1ab809899884d (xen-netfront: Fix handling packets on compound pages with skb_linearize) attempted to fix a problem where an skb that would have required too many slots would be dropped causing TCP connections to stall.  However, it filled in the first slot using the original buffer and not the new one and would use the wrong offset and grant access to the wrong page.  Netback would notice the malformed request and stop all traffic on the VIF, reporting:      vif vif-3-0 vif3.0: txreq.offset: 85e, size: 4002, end: 6144     vif vif-3-0 vif3.0: fatal error; disabling device  Reported-by: Anthony Wright <anthony@overnetdata.com> Tested-by: Anthony Wright <anthony@overnetdata.com> Signed-off-by: David Vrabel <david.vrabel@citrix.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>   We had no this issue on kernel-uek-3.8.13-55.1.2.el6uek.x86_64. Tried to upgrade further to kernel-uek-3.8.13-68.2.2.el6uek.x86_64 - problem is still there.  OVM guests lose network interface connectivity after guest (not hypervisor) was upgraded to this kernel.  Wanted to track if that commit number matches any of these kernels? How do I see which linux kernel commit is in which kernel?

Assume I have some issue that was fixed by a recent patch to the official Linux git repository. I have a work around, but I’d like to undo it when a release happens that contains my the fix. I know the exact git commit hash, e.g. .  What is the easiest way to answer the question: What kernel releases so far contain this patch? Bonus points if no local Linux git repository is needed.  ( discusses some ideas, but these do require a local repository.)


Having an issue where literal comparing of 2 Carbon objects are not equal, and I'm not sure why, I have posted my tinker session below to show the problem;  >>> $t = Carbon\Carbon::today() => Carbon\Carbon @1548025200 {#3026      date: 2019-01-21 00:00:00.0 Europe/Berlin (+01:00),    } >>> $f = Carbon\Carbon::parse('21-01-2019 10:02:01')->startOfDay() => Carbon\Carbon @1548025200 {#3035      date: 2019-01-21 00:00:00.0 Europe/Berlin (+01:00),    } >>> $f === $t => false >>> $f == $t => true >>> echo $t 2019-01-21 00:00:00⏎ >>> echo $f 2019-01-21 00:00:00⏎ >>>    Just wondering why $f === $t is false,  Thanks for anyone that can help!  Also even using today() for both returns false; (But in case either of these have different solutions, the first example is more applicable to my issue)  >>> $t = Carbon\Carbon::today() => Carbon\Carbon @1548025200 {#3033      date: 2019-01-21 00:00:00.0 Europe/Berlin (+01:00),    } >>> $f = Carbon\Carbon::today() => Carbon\Carbon @1548025200 {#3038      date: 2019-01-21 00:00:00.0 Europe/Berlin (+01:00),    } >>> $f === $t => false >>> $f == $t => true

What is the difference between == and ===?  How exactly does the loosely == comparison work? How exactly does the strict === comparison work?  What would be some useful examples?


I am using the following command to include a title (e.g. a citation) as the title of my lemma,  \begin{lemma}[\cite{Mieghem11}]      This is my lemma ...   \end{lemma}   but I'm getting an extra space there,    I'm using amsthm package with IEEEtran.cls  \documentclass[10pt, twocolumn, twoside, journal]{IEEEtran} \usepackage{amsmath, amsfonts, amssymb, color, enumerate, amsthm, graphicx} \usepackage{tikz, subcaption, cite} \usepackage{color, xcolor, soul, bm} \PassOptionsToPackage{hyphens}{url}\usepackage{hyperref} \newtheorem{lemma}{Lemma} \begin{document}     \begin{lemma}[\cite{Mieghem11}]\label{lem: max singular}         This is my lemma ...     \end{lemma} \end{document}   This also happens for definitions,

I'm using  \usepackage{cite}   to reference bibliography (I'm using bibtex). In general the text is in greek, but bibliography is in english. I'm using babel package, so in order to write in english you need to put your text between \selectlanguage commands, which change the language. For example, to write a reference I have to use  \selectlanguage{english}\cite{foo}\selectlanguage{greek}   because else latin characters get substituted by greek and I don't want this to happen since bibliography is in english.  So I made a little macro:  \newcommand{\citem}[1]{\selectlanguage{english}\cite{#1}\selectlanguage{greek}}   For some reason, this command adds white space before the reference. For example, if I want to reference book Blah Blah labeled as foo and write Some text (\citem{foo}), this prints out     Some text ( [Blah])   How can I make this space between the opening parenthesis and the bracket disappear?  I know for sure that the language is not the problem here, because I changed the macro to the trivial  \newcommand{\citem}[1]{\cite{#1}}   and printed     ( [Βλαη])   The latin characters turned into greek, this was expected, but the space remained.  Update: Thanks to egreg, I found a way to get rid of the redundant white space before references. Macro is:  \makeatletter \newcommand{\citem}[1]{%   \begingroup\let\cite@adjust\@empty   \textlatin{\cite{#1}}% \endgroup }   But now I can't use citem into a caption. Error is:  Argument of \@caption has an extra }.   <inserted text>     \par l.261 }


i have written a code . this looks as follows .  #include<stdio.h>  #include<string.h>   int do_print2(char *q[]);  int main() {    char *p[]={"pointervaule","NAM", "JAM", "CALM"};   do_print2(p);   return 1;  }  int do_print2(char *p[]) {      printf("this is print1 char *p \n");     strcat(p[0],"added");     printf("%s\n", (p[0]));     return 1;  }   after compilation, i am trying to run it, i am getting segmentation fault. help me in learning what is the reason for that error. thank in advance.

The following code receives seg fault on line 2:  char *str = "string"; str[0] = 'z';  // could be also written as *str = 'z' printf("%s\n", str);   While this works perfectly well:  char str[] = "string"; str[0] = 'z'; printf("%s\n", str);   Tested with MSVC and GCC.


S(x), which stands for “x is a surgeon”  P(x, y), which stands for “x is a patient of y”  R(x), which stands for “x recovers”  H(x), which stands for “x is happy”  1Express, as a formula in first-order predicate logic (not clausal form), this statement S1: “A surgeon with no patients is happy.”   Express, as a formula in first-order predicate logic (not clausal form), this statement S2: “A surgeon is happy if all her patients recover.”    For the first one, I have my answer as: 1. ∀(x) ∃x. (S(x)∧ ¬P(y,x) → H(x))  For the second question, I have my answer as: 2. ∀(x) (H(x) → R(x))  Are these correct? If not, what are the answers?

S(x), which stands for “x is a surgeon”  P(x, y), which stands for “x is a patient of y”  R(x), which stands for “x recovers”  H(x), which stands for “x is happy”  1>"A surgeon with no patients is happy" means: for any person xx, if xx is a surgeon and there is no person yy for which yy is a patient of xx, then xx is happy.  2> "A surgeon is happy if all her patients recover" means: for any person xx, if xx is a surgeon and - if for every person yy for which yy is a patient of xx, we have that yy recovers - then xx is happy.  I have these as solution:  1:∀(x) ( S(x)∧ ∀(y)P(y,x) → H(x) ) 2: ∀(x) [ { S(x)∧ (∀(y)P(y,x) ∧ R(y)) } → H(x)]  Are these okay?  And how do prove that 1 follows from 2 by resolution (not by drawing a truth table)?


As you know, GetHashCode returns a semi-unique value that can be used to identify an object instance in a collection. As a good practice, it is recommended to override this method and implement your own.  My question is - do you override this method when working on custom objects? If so, what algorithm do you use to generate the unique ID?  I was thinking about generating a GUID and then getting integer data from that identificator.

In .NET, the  is used in a lot of places throughout the .NET base class libraries. Implementing it properly is especially important to find items quickly in a collection or when determining equality.  Is there a standard algorithm or best practice on how to implement GetHashCode for my custom classes so I don't degrade performance?


Let $A \in \mathcal{M}_n(\mathbb{C})$ such that $\text{rank} A = 1$. Prove that $$\det(X+A)=\det X+ \text{tr}(X^*A), \: \forall X \in \mathcal{M}_n(\mathbb{C})$$   where $X^*$ is the matrix such that $X \cdot X^*=\det X \cdot I_n$.   I know that for $2 \times 2$ matrices it is true that $\det(A+B)=\det A + \text{tr}(A^*B)+\det B$. Since in our problem the rank of $A$ is 1, this means that all its minors of order greater than 1 are zero and maybe we could get a formula similar to the one in the $2 \times 2$ case, but I don't know how to expand $\det(X+A)$.

This question aims to create an ""  of numerous questions that ask about determinants of specific matrices (I may have missed a few):              The general question of this type is  Let $A$ be a square matrix of rank$~1$, let $I$ the identity matrix of the same size, and $\lambda$ a scalar. What is the determinant of $A+\lambda I$?  A clearly very closely related question is  What is the characteristic polynomial of a matrix $A$ of rank$~1$?


I am stuck with below mentioned problem.   Application 1(c#) on machine is communicating with device1 over physical serial port (RS232).Application 1 sends the command and device 1 sends the response over serial port. 2.I want to read the response from device in another application2 (in c#) at the same time when application 1 is listening on serial port.   Application 1 is already implemented in c# and i need to create application 2 in c#.  Please let me know how I can read the response from device in application 2 over same serial port.  Thank you so much in advance :)

I'm reverse-engineering a serial protocol and getting frustrated by bad tools.  Does anyone know of a good, free tool for logging data to/from serial ports on Windows?  Requirements:   Must be free Must not take control of the port (i.e. must hook the file APIs or the kernel rather than trying to open the device) Must have some sort of filtering features Writes either human-readable or binary logs, preferably in an easy to parse format   Any ideas?  Portmon works, but its logs are difficult to work with and its filters are effectively useless; I've also tried a few commercial tools and nothing seems to fit the bill.


I figured out the following:   $${\displaystyle \Gamma ^{i}{}_{ki}={\frac {1}{2}}g^{im}{\frac {\partial g_{im}}{\partial x^{k}}}={\frac {1}{2g}}{\frac {\partial g}{\partial x^{k}}}={\frac {\partial \log {\sqrt {|g|}}}{\partial x^{k}}}.}$$  However I can't figure out how to show the following identity:  $$g^{k\ell }\Gamma ^{i}{}_{k\ell }={\frac {-1}{\sqrt {|g|}}}\;{\frac {\partial \left({\sqrt {|g|}}\,g^{ik}\right)}{\partial x^{k}}}.$$  I plugged in the equation for the Christoffel Symbol but it didn't get me where I wanted. Can anybody offer clarity?

Can someone kindly please help and explain how can obtain this equation?  $$ \Gamma^i =\gamma^{jk} \Gamma^i_{jk}= - \frac{1}{\sqrt{|\gamma}|}\partial_l \Big(\sqrt{|\gamma|}~ \gamma^{il} \Big) $$  where $\Gamma^i = ~^{(3)}\Gamma^i$ are the 3D Christoffel symbols and $\gamma_{ij}$ is the spatial metric tensor. The source is the book "Numerical Relativity" (Baumgarte, Shapiro), Eq. 4.40. (in this book the equation uses the 4D metric and the 4D Christoffel symbols, but in the Baumgarte video lectures he uses the above equation.) Here BSSN is the Baumgarte-Shapiro-Shibata-Nakamura formulation.  Thanks


What is the physical meaning of $e^{-h\nu /kT}$ in the Boltzmann distribution function. I am aware that $h\nu$ represents energy of a photon and $kT$ is the thermal energy available to the system. I know $-h\nu /kT$ is the ratio between the 2 energies, but I'm not sure what it represents in general and why $h\nu$ is included. Thanks for helping out.

It is known that for a system at  described by the , the probability of being in a state of energy $E$ at temperature $T$ is given by the : $$ \tag{1} P(\text{state with energy } E) \propto e^{-E/kT}. $$  I have no problems with the mathematical derivation of this result, but I do wonder if there is a way to understand what (1) means intuitively.  In other words: Is there a way to "guess" that the correct distribution for such a system is given by (1), using solely physical arguments?


We know we can solve one of the Maxwell's equation using Green's function. More specifically, we can solve $$\nabla ^2 \phi(\textbf{r}) = \rho(\textbf{r})$$ using $$\phi(\textbf{r}) = \int d\textbf{r}' G(\textbf{r},\textbf{r}') \rho(\textbf{r}) \qquad\text{where}\qquad \nabla ^2 G(\textbf{r},\textbf{r}') = \delta (\textbf{r}-\textbf{r}'),$$ and $$G(\textbf{r},\textbf{r}')=\frac{1}{|\textbf{r}-\textbf{r}'|}$$ follows. However, I cannot understand how we obtain the delta function $\delta (\textbf{r}-\textbf{r}')$ by having the Laplacian act on $G(\textbf{r},\textbf{r}')$. Any thoughts on how can I obtain that?

I am trying to understand the formula \begin{equation} \nabla^2\left(\frac{1}{|{\bf r}-{\bf r}'|}\right) = - 4 \pi \delta(\bf{r}-\bf{r}'), \qquad\qquad {\rm (I)} \end{equation} where ${\bf r}=(x,y,z)$. This is something heavily used in electrostatics and the steps to 'show' this is often the following: The first derivative reads \begin{equation} \nabla \frac{1}{| {\bf r} - {\bf r}' |} = - \frac{ {\bf r} - {\bf r}'}{| {\bf r} - {\bf r}'|^3} \end{equation} And taking the second derivative gives zero, except for the singularity at ${\bf r} = {\bf r'}$. Then from the divergence theorem we have \begin{equation} \int dV \,  \nabla^2 \frac{1}{| {\bf r} - {\bf r'}|} = \int dS  \,\,{\bf n} \cdot ( \nabla\frac{1}{|{\bf r} - {\bf r}'|}) = -4 \pi \end{equation} where the integration is performed over a sphere centered at ${\bf r}'$. Q1: Is there a more direct proof for equation (I)? Then my main question is about the separate second-order differentials. For instance, we can obtain, by direct computation \begin{equation} \partial_x^2 \, \frac{1}{| {\bf r} - {\bf r}'|} = \frac{ 3 (x-x')^2 }{| {\bf r} - {\bf r'} |^5} - \frac{1}{| {\bf r} - {\bf r}'|^3} \end{equation} Q2: Should there be a $\delta$ function on the r.h.s of this equation?


I'd like to select all items that have the class .me-item-admin-box but doesn't have the class .me-item-unenabled  ie:
select this

don't select this
   I have tried the following:  $('.me-item-admin-box').not('.me-item-unenabled').addClass('.me-item-unenabled');   but this doesn't work. How would I do this?  Edit  This is a bit of a simplification of what I need to do. I'm aware I could add this class to everything but I do need to select this class which doesn't have this other class.

In jQuery I need to do an if statement to see if $this doesn't contain the class '.selected'.  $(".thumbs").hover(function(){  $(this).stop().fadeTo("normal", 1.0); },function(){ $(this).stop().fadeTo("slow", 0.3);  });   Basically when this function is run (on hover) I don't want to perform the fades if the class '.selected' has been appended to the div, this will mean that the image will be at full opacity to signify that it's selected. Searched on Google to no luck even though it's a simple question of how to use an IF statement...


I have a lot of figures inside an fbox. Unfortunately the default black is too strong for my advisor and I need to change the default border color to something more soft.  I've done my research and so far all other answers suggest do solve the problem by  and switching to other packages. That's something I'd like to avoid, unless absolutely necessary.  Surely there is an option for something so basic in the fbox package itself?

Possible Duplicate:          I'm using an \fbox to have a border around a minipage.  \fbox{ \begin{minipage}{0.25\textwidth} my content \end{minipage} }   Is there any way to set the border color of the \fbox?


Exactly as the title, what does "nine-and-twenty" mean? Here's an example of sentence:  Afraid of him! No, indeed! But I wish you will consider that a man of nine-and-twenty won’t relish having his affairs meddled with. Besides, he will very likely wonder what the deuce it has to do with me, and I’m sure I can’t tell him! I wish I had not come. , Georgette Heyer, 1940

19th century English texts occasionally use Germanic-style number words, such as "four-and-twenty", but the same text would also have the modern "twenty-four" in places (see e.g. Conan-Doyle for several examples).   How did the usage of germanic-style numbers change historically? When did the Germanic forms fall out of use?   (I have asked this question previously on  (German) and got a short , but would appreciate any additional input.)


Is it possible to extract a specific script from an .iso or bootable drive?  I want to use a Ruby script would come pre-installed if I were using Kali Linux, but without actually using Kali Linux.   Is it possible to pull it from kali.iso in Ubuntu 14.04?

I'm running into trouble trying to mount a large iso:  dev@dev-OptiPlex-745:~$ sudo mount -o loop /home/dev/Hämtningar/matlab2011a_64.iso /cdrom mount: warning: /cdrom seems to be mounted read-only. dev@dev-OptiPlex-745:~$    Can you tell me how I should do it?


Os: debian9.  touch /home/test/test.log   There is a simple function write-date in /etc/profile.  write-date(){     date >>  /home/test/test.log     }   Create a service running at reboot or shutdown.  vim  /etc/systemd/system/test.service    [Unit] Description=Run command at shutdown Before=shutdown.target reboot.target  [Service] Type=oneshot RemainAfterExit=true ExecStart=/bin/bash  /home/test/test.sh  [Install] WantedBy=multi-user.target   The simple function write-date in /home/test/test.sh.  vim  /home/test/test.sh write-date   Enable the test.service.  sudo systemctl enable test.service   Reboot my pc and check log of test.service  sudo journalctl -u test -- Logs begin at Thu 2018-02-01 00:03:59 HKT, end at Thu 2018-02-01 00:15:54 HKT. -- Feb 01 00:04:04 test systemd[1]: Starting Run command at shutdown... Feb 01 00:04:05 test bash[438]: /home/test/test.sh: line 3: write-date: command not found Feb 01 00:04:11 test systemd[1]: test.service: Main process exited, code=exited, status=127/n/a Feb 01 00:04:11 test systemd[1]: Failed to start Run command at shutdown. Feb 01 00:04:11 test systemd[1]: test.service: Unit entered failed state. Feb 01 00:04:11 test systemd[1]: test.service: Failed with result 'exit-code'.   How to make the command in /etc/profile be found ?  cat -vet /home/test/test.sh $ $     write-date$     $ $

I understand the basic difference between an interactive shell and a non-interactive shell.  But what exactly differentiates a login shell from a non-login shell?  Can you give examples for uses of a non-login interactive shell?


I'm using \documentclass[11pt]{beamer} with the package Tikzcd but it doesn't work properly with the frames. It gives me the error:     Package pgf Error: Single ampersand used with wrong catcode. \end{frame}

I am having trouble getting a basic example of a matrix of notes to show up in my beamer presentation. I am using the code copied from the pgf manual. Here is a complete working example. The error I get upon compilation is:  "Package pgfbasematrix Error: Single ampersand used with wrong catcode."  \documentclass{beamer} \usepackage{tikz} \usetikzlibrary{arrows,decorations.pathmorphing,backgrounds,fit,petri,positioning,matrix}  \begin{document}  \begin{frame}  \begin{tikzpicture} \matrix (magic) [matrix of nodes] { 8 & 1 & 6 \\ 3 & 5 & 7 \\ 4 & 9 & 2 \\ }; \draw[thick,red,->] (magic-1-1) |- (magic-2-3); \end{tikzpicture}  \end{frame} \end{document}


So here is the picture of current situation ->  and I'm not sure which one to select for boot, since Windows is installed on sdb4. First time I installed I just left it on /dev/sda as it is in picture (default). Also I'm using UEFI and GPT if that means something? I tried to repair boot with boot-repair and it didn't work so I need to reinstall ubuntu again with correct place for bootloader. Thanks!

I'm absolutely new to Linux. I would like to know how to install Ubuntu alongside the pre-installed Windows 8+ OS.  Should I do it with Wubi, or through the Live USB/DVD?  What steps do I need to take to correctly install Ubuntu?


Running Drupal on an Red-Hat instance, how do I configure the server to only allow it's back-end to be reached from a specific static IP?

I want to restrict the  login page to a particular IP only. Do you have any suggestion?


Does there exist a quotient ring R/I (I-ideal) with a multiplicative identity such that R has no multiplicative identity ?If so please give example

Let $R$ be a ring without a unit element and $R'$ be a (non trivial) ring with a unit element. Can there be an onto homomorphism from $R$ to $R'$?  Some observations: There cannot be an isomorphism, because then the element of $R$ which maps to $1$ in $R'$ must be a unit element in $R$. Also, we cannot have an onto homomorphism from a ring with unity to a ring without unity as $f(1)$ is going to be a unit element.  Edit: I am defining a ring homomorphism as a function $ \phi: R \rightarrow R'$ such that for all $a,b$ in $R$, $$\phi(a+b) = \phi(a) + \phi(b) $$ $$\phi(ab) = \phi(a)\phi(b)$$


Let $\mathbb{Q}/\mathbb{Z}$ be the quotient group of the additive group of rational numbers. Find the order of the element $\frac{2}{3}+\mathbb{Z}$ in $\mathbb{Q}/\mathbb{Z}$.   I tried it by using facts that any quotient $G/H$ of $G$ has induced operation from $G$. So I can do $$\frac{2}{3}+\mathbb{Z} + \frac{2}{3}+\mathbb{Z} = \frac{4}{3}+\mathbb{Z} + \frac{2}{3}+\mathbb{Z} = 2+\mathbb{Z} =\mathbb{Z},$$ and $\mathbb{Z}$ being identity we get order three. But this way, to manually start computing elements, if correct is very unreliable in case of more difficult problem.  So is there a generalized approach for quotient groups?

Consider the quotient group $\mathbb{Q}/\mathbb{Z}$ of the additive group of rational numbers. Then how to find the order of the element $2/3 + \mathbb{Z} $ in $\mathbb{Q}/\mathbb{Z}$.


I have a problem with encoding in my c-programs. It seems to work fine in Eclipse but when executing the program in CMD in windows its not able to show the swedish "Å" "Ä" "Ö".  Is this because the encoding for the windows-XP is different from the encoding in my c-program.  I did query the local settings through setlocale() and I got the following:  Swedish_Sweden.1252  is there any quick solution to this?

We have a project in Team Foundation Server (TFS) that has a non-English character (š) in it. When trying to script a few build-related things we've stumbled upon a problem - we can't pass the š letter to the command-line tools. The command prompt or what not else messes it up, and the tf.exe utility can't find the specified project.  I've tried different formats for the .bat file (ANSI, UTF-8 with and without ) as well as scripting it in JavaScript (which is Unicode inherently) - but no luck. How do I execute a program and pass it a Unicode command line?


I've come across the post in relevant topics in the confidence interval, I've seen answer said the population mean is not random variable so we can't say 95% probability that CI contains the population mean. Could someone explain more clearly and avoid credibility for me, please? My understanding is, given 5% of the p-value,  each sample could generate a confidence interval and re-sampling numerous time, consider a collection of their confidence interval, and 95% of such CI contains the population mean, and 5% do not Analogy: If this is true, why we can't say the CI that we computed, 95% of chance it is the one that contains the population mean.  Just like a collection of 100 balls and 95 of which are red. Then we pick a ball blindly, we may infer 95% of our ball is red. Appreciated for any comments and help

It seems that through various related questions here, there is consensus that the "95%" part of what we call a "95% confidence interval" refers to the fact that if we were to exactly replicate our sampling and CI-computation procedures  many times, 95% of thusly computed CIs would contain the population mean. It also seems to be the consensus that this definition does not permit one to conclude from a single 95%CI that there is a 95% chance that the mean falls somewhere within the CI. However, I don't understand how the former doesn't imply the latter insofar as, having imagined many CIs 95% of which contain the population mean, shouldn't our uncertainty (with regards to whether our actually-computed CI contains the population mean or not) force us to use the base-rate of the imagined cases (95%) as our estimate of the probability that our actual case contains the CI?   I've seen posts argue along the lines of "the actually-computed CI either contains the population mean or it doesn't, so its probability is either 1 or 0", but this seems to imply a strange definition of probability that is dependent on unknown states (i.e. a friend flips fair coin, hides the result, and I am disallowed from saying there is a 50% chance that it's heads).  Surely I'm wrong, but I don't see where my logic has gone awry...


Let $\alpha \in ( - \infty,-1)$. Does $\frac {1^\alpha +2 ^\alpha+...+n^\alpha} {n^{\alpha+1}}$ diverge to $\infty$ as $n \to \infty$?  (I am not 100% sure that the above is true, but I am pretty sure because I am trying to use it as a lemma to show that a certain Lebesgue integral is $\infty$).  My thought was to try bounding $\frac {1^\alpha +2 ^\alpha+...+n^\alpha} {n^{\alpha+1}}$ below by something which is already known to diverge to $\infty$.  I see $\frac {1^\alpha +2 ^\alpha+...+n^\alpha} {n^{\alpha+1}}\geq\frac {n^\alpha +n ^\alpha+...+n^\alpha} {n^{\alpha+1}}=1$, but this doesn't really help because the bound $1$ is too small to be useful.  The formula $1^3+2^3+...+n^3=(1+2+...+n)^2$ comes to mind, but I'm not sure how it would help since $\alpha \neq 3$. (Maybe the formula can be manipulated somehow to apply in our situtation? Or maybe there is a more general formula I can use?)  Any help would be appreciated.

What is the result of the next limit:   $$ \lim_{n \to \infty} \frac{ \sum^n_{i=1} i^k}{n^{k+1}},\ k \in \mathbb{R} $$  Why (theorem)?


Today I saw a behaviour which really surprised me:  I answered the question and then after a minute another guy answered it as well. The answer was basically a duplicate of my answer (which was not a surprise, the question was simple). I checked him, because he was quite reputable guy .  Then I saw that my answer was downvoted. So the answer of another guy (not the guy with 21k, who also happened to have similar answer to mine). I was surprised, because both our answers were correct. But then I decided to check one more time the 21k guy who was not downvoted.  To my surprise I saw that right now he had +2 downvotes in his statistics. This was extremely lame. He basically downvoted two correct answers to be on top of the results.  Question:  Is this behaviour acceptable and what should a person do if he sees or suspect such behaviour? I was lucky because I saw two opened page and was able to see the difference in votes and it happened in less then a minute so I was pretty sure that he downvoted correct answers.

As we know, the tactical downvoting (I'm talking especially about SO, as I don't know about other sites) is more and more becoming a serious problem, as I see, the community can't stop this behavior without some sacrificing.  As a suggestion, I think it makes sense to prevent an answerer from downvoting any answer on the same question, this -sure- has a harm, but IMO, it's less harmful than the tactical downvoting issue, and to make the things a bit more easier, we can prevent an answerer from downvoting a question without posting a comment to that answer before.  And vice versa, if a user downvoted an answer, he shouldn't be able to post another one unless he posted a comment first, to prevent working-around that system, so a user can't downvote other answers before posting his own to avoid posting comments.  EDIT, more clarification: I don't say wrong answers shouldn't be downvoted, BUT if you want to downvote an answer and post your own, you'll have to post a comment, so we make sure you're not just downvoting right answers tactically.


Is it     Pacific Ocean is the largest and the deepest ocean in the world   or     Pacific Ocean is the largest and deepest ocean in the world

When “and” connects two subjects, can we remove the article pertaining to the second subject (as in the following example)?  Original sentence:      The implementation of the algorithms on the CPU and the GPU is presented.   Sentence after removal:      The implementation of the algorithms on the CPU and  GPU is presented.   Note that the meaning intended to express in both sentences is that the algorithms are implemented both on the GPU and on the CPU.  Thanks!


Prove: $$\lim_{n \to \infty}\sup_{k \geqslant n} (\frac{1+a_{k+1}}{a_k})^k \geqslant e$$ for any sequence $\{a_n\}$ where $a_n > 0$. I made a likely proof myself, but it's so complicated that Wolframalpha couldn't recongnize it when I tried to verify it. Also my "proof" suggests that they are never equal, so I really doubt it. Even if it was correct, it was not remotely near the optimized one. Could you please give me a better proof?

Show that $$\lim_{n \to \infty} \sup_{k \ge n} \left(\frac{1+a_{k+1}}{a_k}\right)^k \geq e$$ for any sequence $\{a_k\}$ with positive terms, and that this estimate cannot be improved. Let $$s_k = \left(\frac{1+a_{k+1}}{a_k}\right)^k $$  Then $s_k \geq 0$ as otherwise $a_{k+1} < -1$. Also, $\sup_{k \geq n}\{s_k\}$ is nonincreasing on $n$. Assume $\lim\limits_{n \to \infty}\sup_{k \geq n}\{s_k\} = l < e$. For $0 < \varepsilon< e-l $, choose $N$ such that $l \leq \sup_{k \geq n}\{s_k\} < e - \varepsilon$ for all $n > N$.  We know that $$\lim\limits_{n \to \infty} \left(\frac{n+1}{n}\right)^n = e$$ and that $r_n = \left(\frac{n+1}{n}\right)^n$ is increasing. Choose $N'$ such that $e- \varepsilon < r_n < e$ for all $n > N'$.  Then for $M =\max\{N,N'\}$, $ \sup_{k \geq n}\{s_k\} <r_n$ for all $n>M$. Furthermore, $s_n \leq \sup_{k \geq n}\{s_k\}$, so $s_n < r_n$.  Here I wanted to get some sort of contradiction but I'm not really sure how. I know that $a_n$ cannot have a limit $A$ as then $$0 \leq \lim\limits_{n \to \infty} a_{n+1} < \lim\limits_{n \to \infty}\left(1 + \frac 1n \right)a_n -1,$$ which implies $A < A-1$  And $a_n$ cannot be bounded by $d$ as we would have, for  $n > 2d$, $a_{n+1} < a_n\left(1 + \frac 1n\right) - 1 < d\left(1 + \frac {1}{2d}\right) - 1 = d - \frac 12$. Continuing in this way there would be an $a_n < 0$.   I was thinking of using the fact that the superior limit is the largest partial limit. What should I do next or should I use a different method?


I am learning how to use Lists, and in my following example the switch case works but (what I deem as) the equivalent if statement does not. Can you tell me why?  public class Kapitel14 {  public static void main(String[] args) {      ArrayList<String> testList = new ArrayList<String>();     testList.add("Cousin");     testList.add("Doof");     testList.add("Dorf");     testList.add("Dortmund");     testList.add("Franz");     System.out.println(listCount(testList)); }  public static int listCount(ArrayList<String> newList) {      int capDCounter = 0;     for (String element : newList) {         String firstLetter = Character.toString(element.charAt(0));         switch (firstLetter) {             case ("D"):                 capDCounter++;                 break;              default:                 continue;         }          //if I use this instead it returns wrong results:         //if (firstLetter == "D")          //  capDCounter++;     }     return capDCounter; }

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?


Everyone knows matter and anti-matter annihilate each other . But still do we are alive . How? Is the statement wrong?? I am a layman and a novice to QM but will appreciate a math-free intuitive explanation.  If the antimatters are not around us, where are they???

Antimatter is like matter on opposite day: it has the same properties as the stuff that makes up planets, stars and galaxies, but one vital piece is different—its charge. The universe supposedly started off with equal parts matter and antimatter, but somehow, matter won out. Most of both substances annihilated each other shortly after the big bang, and left a small surplus of matter remaining.


Since sizeof and templates are both compile-time. What is it about the second parameter of the template that determines the size without specifying it in the caller function?  template <typename T, size_t n> bool isInHaystack(const T (&arr)[n], const T &needle) { /* I know const references are best with strings and non-primitives and should      be mitigated when using ints as in the example.*/     size_t i, size = sizeof arr / sizeof T; // how does it know n is the size?     for (i = 0; i < size; ++i)         if (arr[i] == needle)             return true;     return false; }  int main(int argc, char **argv) {     int arr[] = { 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21 };     cout << isInHaystack(arr, 7) << endl;     isInHaystack<int, (size_t)(sizeof(arr) / sizeof(int))>(arr, 7); // this works, too       return 0; }   How does this size_t n get its value when passing an array? How does it know without providing it explicitly?  To make this a little more clear, this will not compile:  template <typename T> bool foo(const T(&arr)[], const T needle) {     cout << sizeof arr << endl;     return true; } int main(){     int arr[] = {1,2,3};     foo(arr, 1); // Error: could not deduce template argument for 'const T (&)[]' from 'int [21]' }   What is the issue?

template<typename T, size_t n> size_t array_size(const T (&)[n]) {     return n; }   The part that I don't get is the parameters for this template function. What happens with the array when I pass it through there that gives n as the number of elements in the array?


In math mode, when I type   \dot{x}, \ddot{x}, \dddot{x}   the third expression doesn't look like the two previous ones. The three dots are widely spaced and higher above the symbol. Is there a way to have three dots above a symbol so that it looks more regular compare to one dot and two dots?

From , I have tried the using \hspace{0pt} and   \makeatletter \renewcommand{\dddot}[1]{%   {\mathop{\kern\z@#1}\limits^{\vbox to-1.4\ex@{\kern-\tw@\ex@    \hbox{\normalfont ...}\vss}}}} \renewcommand{\ddddot}[1]{%   {\mathop{\kern\z@#1}\limits^{\vbox to-1.4\ex@{\kern-\tw@\ex@    \hbox{\normalfont....}\vss}}}} \makeatother   after loading mathtools but the problem still persists.    \documentclass{article} \usepackage{mathtools} \begin{document} \[ \dot{\mathbf{r}}\times\ddot{\mathbf{r}}\times\dddot{\mathbf{r}} \] \end{document}   In the case the font scheme I am using has any affect as well, the fonts are:  \usepackage[utf8]{inputenx} \renewcommand{\rmdefault}{ppl}                  \linespread{1.05}                   \usepackage[scaled]{helvet} \usepackage{courier}               \usepackage{eulervm} \normalfont       \usepackage[T1]{fontenc}            \usepackage{textcomp}


I am being forced to work with Subversion on a current project.  Someone has unkindly added the bin and obj folders to the repository.  Other than removing them, and committing the removal, is there an equivalent of .gitignore file I can add to the repository to make the guilty party in the development team never add them again?  I know I can alter my own global ignore pattern, but ideally I'd like the whole development team to be able to share this on a project level.

How do I ignore files in Subversion?  Also, how do I find files which are not under version control?


Say the attacker is actively pressing the keeper. I have seen in situations keepers picking up the ball but I am not sure of the exact rules.

A goalkeeper cannot handle the ball if a teammate passes ball to them.   But can the goalkeeper take the ball into their hands if it is deflected from the leg? Also, can they take the ball in their hands from a teammate's throw-in?


Array declaration:  int arr [ ]={34, 65, 23, 75, 76, 33};    Four notations: (consider i=0)  arr[i]   and  *(arr+i)   and  *(i+arr)   and  i[arr]

As Joel points out in , in  (aka: K & R), there is mention of this property of arrays in C: a[5] == 5[a]  Joel says that it's because of pointer arithmetic but I still don't understand. Why does a[5] == 5[a]?


I'm the owner of several Google Groups associated with a not-for-profit organization.  I had no problem adding new members and getting their Display Name to show in the membership records under the former version of Google Groups.  With this new version, no matter what I try, all that I can get to show in the Display Name field is the part of the member's email address before the @.  Sometimes that has no relationship to the person's name. I used to set up a Google Contact for each new one, then write to them once.  That associated the name with the address and the name I entered in the contact for them showed up as the display name when I did a direct add.  No more.  And the other way to do it, by entering First, space, Last  doesn't work for me either. Has anyone found a way around this problem with the wonderful, improved Google Groups? Trent Shepard

I'm a manager on Google Groups for a group that has about 100 members.  I want to be able to edit the display name so I can identify who my users are, instead of "JKL6" for example, which is the prefix for an email address.  First, I can't seem to edit the "Display Name" and second, I have deleted the list of email addresses when I was fooling around with the identity tool.  I was trying to change the settings about display name vs. Google name, and now my "Members" list does not have ANY email addresses showing.


I am trying to add custom javascript to my Drupal 7 site which I need to run on the path /node/add/h5p-content. I have created a custom module (called mods) with the function: function mods_h5p_scripts_alter(&$scripts, $libraries, $mode) {     $scripts[] = (object) array(       // Path relative to drupal root       'path' => drupal_get_path('module', 'mods') . '/JSOverrides.js',       // Cache buster       'version' => '?ver=1',     ); }  The JavaScript code runs successfully on the front page, but not for /node/add/h5p-content. At this stage, the code is just a call to console.log(). I investigated other paths on my site and the code runs for some pages (for example /node/62) but not others (for example /node/25). How can I fix this issue?

I wanted to add custom JavaScript code on certain nodes. I have written this code in the html.tpl.php template, but this doesn't work. (donate is the path alias for a node.) <?php if(arg(0) == 'DONATE'): ?>   <script>     (function() {       // ...     );   </script> <?php endif; ?>


I've got a problem here I don't know how to turn a Python script into an exe file. I tried using py2exe but the latest version they got is 2.6 and I need something that will work for version 34 (Which is the latest version of Python).  PLEASE HELP!

I am looking for a Python3.0 version of "py2exe". I tried running 2to3 on the source for py2exe but the code remained broken.  Any ideas?


The party warlock recently acquired a  in Tales from the Yawning Portal   The altar to the Elder Elemental God in the Steading of the Hill Giant Chief  The party patron is a spellcaster who is in a city distant from them.  She is about to contact them via the spell  for an update on their progress in resolving the mission she has set them upon, and does not know about the ring.  She wants a much longer conversation than sending would allow, but has not used dream before to contact them and they do not know that she is planning to do so. Dream is a 5th level illusion spell, and will allow her to contact the party as follows:  If the target is asleep, the messenger appears in the target’s dreams and can converse with the target as long as it remains asleep, through the duration of the spell.  Note that the contact is automatic and there is no saving throw, so long as she does not use the spell to attack the target with a nightmare. The ring says that  Creatures can telepathically communicate with you only if you allow it.  Will the ring protect against the automatic contact from the spell? If the warlock can use the ring to decide whether or not to 'receive the call' while he sleeps, will he know who the sender is, or who the sender is purporting to be, before he makes this decision? For me, the answer hinges on how I should understand "telepathically" in this description, as the natural English meaning of 'communicating feeling at a distance' which could include the Dream spell, or as a specific term that applies only to abilities specifically using the word telepathy, such as various feats, spells, and creature languages.  Thus, an answer able to clarify this would be particularly helpful to me.  However, any answer that resolves the question is welcome. Related:

Does the ring of mind shielding magic item or the mind blank spell block the dream spell? What spells and/or effects (apart from not sleeping) give someone immunity from being contacted with the dream spell?  It would seem to me that as long as you're on the same plane as your target and your target is asleep, there is no RAW way for your target to avoid being targeted by dream.