I have a function with a lambda expression something like:  int maxOccurrences = ( from field in data select field ).Max( f => f.Occurrences )   P.S. I'm sure that there's a nicer / neater / more idiomatic version of the above statement, it might be nice to know what that might be, although its not important to the question!  If I modify anything else within the function whilst debugging say a Console.Write expression, the debugger states:     Modifying a 'method' which contains a lambda expression will prevent the debug session from continuing while Edit and Continue is enabled.   I was wondering why this might be the case?  I would have thought that the IL generated for the lamba function and the Console.Write statement would be separate and that the Debugger could alter and modify when necessary. Is there some fundamental concept that I'm missing concerning the lamda functionality?

So, every time I have written a lambda expression or anonymous method inside a method that I did not get quite right, I am forced to recompile and restart the entire application or unit test framework in order to fix it. This is seriously annoying, and I end up wasting more time than I saved by using these constructs in the first place. It is so bad that I try to stay away from them if I can, even though Linq and lambdas are among my favourite C# features.  I suppose there is a good technical reason for why it is this way, and perhaps someone knows? Furthermore, does anyone know if it will be fixed in VS2010?  Thanks.


First part of the question: I have a table   \begin{document} \begin{tabular}{|*9{c|}}\hline A & \multicolumn{2}{c|}{B} & \multicolumn{2}{c|}{C} & \multicolumn{2}{c|}{D} & \multicolumn{2}{c|}{E} \\\cline{2-9} & \multicolumn{2}{c|}{x} & \multicolumn{2}{c|}{x} & \multicolumn{2}{c|}{x} & \multicolumn{2}{c|}{x} \\\cline{2-9}  & U & V &  U & V & U & V & U & V \\\hline y  & 7.23 & 6.39  & 7.76 &  6.93 & 2.81 &  2.54 & 0.59 &  0.55  \\ \hline z  & 2.5503 &  2.2658  & 2.5345 &  2.3741 & 1.85 &  1.64 & 0.46 &  0.37   \\ \hline $\sum{E^{i}_{U/V}}$  & & & & &  & & $\sim 1$ & $\sim 1$   \\ [1ex]  \hline \end{tabular}  \end{document}   which nicely re-produce what I want.  But as I want to add 3rd column under B, it does not work and keep giving me error "illegal character in array.arg".   \begin{document}  \begin{tabular}{|*10{c|}}\hline A & \multicolumn{3}{c|}{B} & \multicolumn{2}{c|}{C} & \multicolumn{2}{c|}{D} & \multicolumn{2}{c|}{E} \\\cline{2-10} & \multicolumn{3}{c|}{x} & \multicolumn{2}{c|}{x} & \multicolumn{2}{c|}{x} & \multicolumn{2}{c|}{x} \\\cline{2-10}  & U & V & W &  U & V & U & V & U & V \\\hline y  & 7.23 & 6.39 & X & 7.76 &  6.93 & 2.81 &  2.54 & 0.59 &  0.55  \\ \hline z  & 2.5503 &  2.2658 & X  & 2.5345 &  2.3741 & 1.85 &  1.64 & 0.46 &  0.37   \\ \hline $\sum{E^{i}_{U/V}}$  & & & & & &  & & $\sim 1$ & $\sim 1$   \\ [1ex]  \hline \end{tabular}  \end{document}   can anyone help me solve the issue please.   Second part of the question:  How can I remove the column lines from the last row for the columns with empty entries?  Any help will be highly appreciated, thanks!

I received a table template, which I'm intended to generate dynamically with data using Java. But when the table becomes to large, the compilation with LaTeX fails. The specific about this template is, that it stretches the table width into the maximal page width and has same column widths for all data columns (except the first column).  Here is a minimal version of the full template, that still works fine:  \documentclass[final,authoryear,3p,twocolumn]{elsarticle}  \usepackage{amssymb,amsmath} \usepackage{calc} \usepackage{array} \newcolumntype{L}[1]{>{\raggedright\arraybackslash}p{#1}} \newcolumntype{R}[1]{>{\raggedleft\arraybackslash}p{#1}} \usepackage{eurosym} \usepackage{microtype} \usepackage{needspace} \usepackage{fp}  \usepackage{graphicx} \DeclareGraphicsExtensions{.pdf} \input{pgfexternal}  \newcommand\tabt{\rule{0pt}{2.6ex}} \newcommand\tabb{\rule[-1.2ex]{0pt}{0pt}}  \begin{document}  \begin{table*}[t]     \footnotesize     \begin{tabular*}{\linewidth}{@{}L{2em}@{}*9{R{(\linewidth-2em)/9}@{}}}\hline\tabt $i$ & $1$ & $2$ & $3$ & $4$ & $5$ & $6$ & $7$ & $8$ & $9$\tabb\tabularnewline\hline\tabt $1$ &  & $48.87$ & $0.01$ & $0.05$ & $1.23$ & $0.00$ & $0.20$ & $5.67$ & $2.35$\tabularnewline     \end{tabular*} \end{table*}  \end{document}   But when extending this example by another column, so that the table would look like the following example, it fails:  \begin{table*}[t]     \footnotesize     \begin{tabular*}{\linewidth}{@{}L{2em}@{}*10{R{(\linewidth-2em)/10}@{}}}\hline\tabt $i$ & $1$ & $2$ & $3$ & $4$ & $5$ & $6$ & $7$ & $8$ & $9$ & a\tabb\tabularnewline\hline\tabt $1$ &  & $48.87$ & $0.01$ & $0.05$ & $1.23$ & $0.00$ & $0.20$ & $5.67$ & $2.35$ & b\tabularnewline     \end{tabular*} \end{table*}   This fails, no matter how many columns I add. So far, it seems for me to be a problem with the division by 10. May it be, that LaTeX isn't able to handle that properly by default? How can I solve this problem and make even larger tables work using this template. Or is that to any other problem I don't see yet? Thanks for any help!


Here's a problem that I heard: Show that $lcm(1,2,\ldots,2n+1)\geq4^n$.  If you assume the prime number theorem then it's not too hard to show that $lcm(1,2,\ldots,2n+1)$ is eventually larger than $4^n$. The hard part is making this effective for small values of $n$. Also, I've been told that you can prove this without the prime number theorem.

The least common multiple of $\{1,2,...,n\}$ is greater than $2^{n-1}$ for any $n \ge 3$.   I found this in a MATHEMATICA book, but I don't know how to prove this. Can you help me?  [Edit:  has a discussion of an asymptotic stronger result, but that relies on the . What else is known about this? JL]


This is not a duplicate of  as that asks for the ability for moderators to cast a non-binding vote. This, on the other hand, asks for the ability to simply add things to community review, without casting a vote.  I like my hammer. It's nice to be able to instantly close an off-topic post, especially at times when the site isn't too active.  But the hammer is double-edged: if moderators constantly hammer-close off-topic questions, they never end up in the review queues, and the community gets "trained" to wait for a mod hammer.  If moderators could "mark" a post as (potentially) off-topic without actually hammer-closing it, the question would be taken to the close queue for the community to handle, and then the community gets "trained" to monitor the review queues.  The mechanism for such "marking" already exists: one would expect  an off-topic flag to get the question into the the close review queue for the community to handle. But as a moderator, flagging a post as off-topic has the same effect as a close vote: it's a binding action.  I think moderators should have both options: a binding close vote to hammer-close, and a non-binding flag to get a question community-reviewed in the close queue. This would be extremely useful, especially for gray-areas of a site's scope, where a binding close vote isn't an appropriate action.

I think moderators should have the ability to cast a normal, non binding close and open vote like they were a normal user (while of course retaining their ability to cast a binding vote where necessary). This can be used in "grey areas" where a moderator can choose to give his or her opinion, but not make a decision alone; a good example of this is . This also helps in areas not so grey (questions that everyone would agree should be closed) since the OP has the time to see close (1) and possibly edit his or her question. The moderator can then optionally come back after a few minutes and close it for real if it's not improved (or maybe during that time other 4 people voted to close it). This would also fit perfectly in :  Since we’re about to add community moderators on both Stack Overflow and Server Fault, I need to document what it is, exactly, we expect moderators to do. The short answer is, as little as possible!


I’m trying to figure out how to build passive voice sentence. So i’ve seen video by BBC that called “Lion attacked by pack of hyenas”. Is it wrong? Maybe it should be something like “Lion was attacked by pack of hyenas”?

Newspaper/news article headlines usually have different syntax rules, for example   No copula. North Korea trip 'successful' Past events written in present. Qantas cancels flight out of frozen Heathrow Predictions written with infinitive. Britain's 'crossbow cannibal' to die in jail Very often not in complete sentence. No indefinite/definite articles. Ivory Coast Faction Squeezes UN Force Using a comma instead of "and". Romania, Bulgaria face delay in joining Schengen.   Why these rules and are there any other rules?


if my method is accepting Queues from any type, how to determine if the method arg is ArrayBlockedQueue()  or LinkedList() queue?  I used .equals as the following its always returning true   Queue q1 = new LinkedList(); Queue q2 = new ArrayBlockingQueue(4); System.out.println(l1.equals(q1));   then I tried the following I have faced Illegal argument exception    public static void add2Q (Queue q)  {     if(q.equals( new ArrayBlockingQueue(q.size()))){         q.offer(2);         q.offer(5);         q.offer(9);         q.offer(0);         q.offer(-1);     } else {         // thorws exception with add if exceeded          try {             q.add(2);             q.add(5);             q.add(4);             q.add(9);             q.add(10);         } catch (IllegalStateException e){             System.out.println("you are using ArrayBlockQueue of size "+ q.size() );             //e.printStackTrace();         }        }    }

If class B and class C extend class A and I have an object of type B or C, how can I determine of which type it is an instance?


is there something like htaccess in the windows iis server?  dont like to use Forms or something

Does anyone know if there is an equivalent to .htaccess and .htpassword for IIS ? I am being asked to migrate an app to IIS that uses .htaccess to control access to sets of files in various URLs based on the contents of .htaccess files.   I did a google search and didn't turn up anything conclusive. Is there a general approach or tool that I need to purchase that provides this capability ?


I am trying to remove the text between tags and add the tags to a String array.   For example:  < tag1 >< tag2 >remove this< /tag2 >< /tag1 >  I am reading a text document line by line and adding each tag, opening or closing to an array, without the text between but I am having trouble.  I have String[] tags = text.nextLine().split(""); but I am not sure what the regular expression should be to have an array [tag1,tag2,/tag2,/tag1]  Thanks!

Is there a good way to remove HTML from a Java string? A simple regex like replaceAll("\\<.*?>", "")   will work, but things like &amp; wont be converted correctly and non-HTML between the two angle brackets will be removed (i.e. the .*? in the regex will disappear).


I recently flew from Bahrain to Heathrow via Gulf-Air.  I noticed on the flat screen at the back of the seat that the route showed going over Iraq and Syria which is an active war zone.  After what happened with MH17 Malaysian Airlines over Ukraine I emailed Gulf air about this to ask if this was the case.  I got an email back saying that this was not the case; that was all; they did not elaborate.  I appreciate that the animation at the back of the seat is just that; not necessarily a sat-nav version of where the plane is.  The Russians are now sending cruise missiles to Syria;from the Caspian sea!  What is the current policy of airlines in this area?  How do we get accurate information on what is happening?  Surely flight professionals such as pilots and cabin crew are concerned about this and have an interest in avoiding any potential war-zone. What are they saying?  I have to fly back at some stage I am concerned and would like to get accurate information.  I personally would not mind spending an extra £100 and an extra hour to avoid this area completely. We have no control over what is happening on the ground  cannot trust anyone in such a zone.

This September I will have a flight from Qatar (Doha) to Japan (Haneda) with Qatar Airways on the very new route code . By checking its flight route I've noticed that it flies over south Iran, south Afghanistan and north Pakistan for at least 1/3 of the flight time. I know that the war is over in Afghanistan and things are better now in Iran and Pakistan, but I'm still worried about having a flight over their territory.   Is it safe to fly over countries considered dangerous zones?


Let $y$ be a differentiable function on $\mathbb{R}$. If  $$\lim_{x\rightarrow \infty}(y(x)+y'(x))=0$$ Then how does one show that $$\lim_{x\rightarrow \infty}y(x)=0$$ I'd appreciate some help on this problem. Thanks a lot.

I've been trying to solve the following problem:  Suppose that $f$ and $f'$ are continuous functions on $\mathbb{R}$, and that $\displaystyle\lim_{x\to\infty}f(x)$ and $\displaystyle\lim_{x\to\infty}f'(x)$ exist. Show that $\displaystyle\lim_{x\to\infty}f'(x) = 0$.  I'm not entirely sure what to do. Since there's not a lot of information given, I guess there isn't very much one can do. I tried using the definition of the derivative and showing that it went to $0$ as $x$ went to $\infty$ but that didn't really work out. Now I'm thinking I should assume $\displaystyle\lim_{x\to\infty}f'(x) = L \neq 0$ and try to get a contradiction, but I'm not sure where the contradiction would come from.   Could somebody point me in the right direction (e.g. a certain theorem or property I have to use?) Thanks


I am on slackware64 v14.0 and I have file that belongs to me:  -rwxrwxr-x+   1 nass  shares    137934 Mar  7 00:06 myfile.csv*   I am a member of the "shares" group. The folder that contains myfile looks like this  drwxrwsr-x+  12 nass shares 4096 Mar 12 04:54 winmx/   I now want to give ownership of this file to another user of this pc. The other user is also a member of the shares group. However,   chown otheruser myfile.csv      does not do the trick. I get a  chown: changing ownership of 'myfile.csv': Operation not permitted   I had recently asked a similar  about gid, but this is not the same problem. How can I solve this ?

Why is the chown command root-only? Why can't non-root users use chown to give away files they own?


I am using jQuery to find text in an html and highlight all occurrences of a text, replacing them for a span tag.
This a sample paragraph. Sample is it?
   I am using the following piece of code to replace all occurrence of a word  var $test = $('div').html();  $test = $test.replace( new RegExp('sample',"g"), 'sample'   I would like to change all occurences of sample doesn't matter how it is written [Sample, SAMPLE, samplE] I would like to highlight the intended word, how could I do it?

I basically need to highlight a particular word in a block of text. For example, pretend I wanted to highlight the word "dolor" in this text:
     Lorem ipsum dolor sit amet, consectetuer adipiscing elit.

     Quisque bibendum sem ut lacus. Integer dolor ullamcorper libero.     Aliquam rhoncus eros at augue. Suspendisse vitae mauris.
  How do I convert the above to something like this:
     Lorem ipsum dolor sit amet, consectetuer adipiscing elit.

     Quisque bibendum sem ut lacus. Integer dolor ullamcorper     libero. Aliquam rhoncus eros at augue. Suspendisse vitae mauris.
  Is this possible with jQuery? Edit: As  , this is quite possible without jQuery - but I was hoping there might be a special method of jQuery which would let you do selectors on the text itself. I'm already using jQuery heavily on this site, so keeping everything wrapped up in jQuery would make things perhaps a bit more tidy.


I deleted GarageBand by dragging the app to the trash, but in the system information it says it is still taking up over 20gb, where are these files located?

I have GarageBand taking 2.46 GB space on my system even after I deleted the app. Couldn't find any other files when searched via spotlight.     Is there any way to find these files and remove them?


By simply technique i can think of, I am converting a list to 2d list, However is it possible to achievie this with higher performance either by itertools or collections?  n = 2 lst = ['a', 'b', 'c', 2, 'e'] for i in  range(0, len(lst), n):     print lst[i:i+n]   Expected output:  [['a', 'b'], ['c', 2], ['e']]

I have a list of arbitrary length, and I need to split it up into equal size chunks and operate on it. There are some obvious ways to do this, like keeping a counter and two lists, and when the second list fills up, add it to the first list and empty the second list for the next round of data, but this is potentially extremely expensive.  I was wondering if anyone had a good solution to this for lists of any length, e.g. using generators.  I was looking for something useful in itertools but I couldn't find anything obviously useful. Might've missed it, though.  Related question:


Let $D = \{x \in \mathbb{C} : \text{Re}(z) > 0\}$, and $g: D \to \mathbb{C}$ an analytic function. Does it follow that$$f(z) = \overline{g(\overline{z})}$$is also analytic?

I'm doing a bit of self study, but I'm uncomfortable with a certain idea. I want to show that $f(z)$ is analytic if and only if $\overline{f(\bar{z})}$ is analytic, and by analytic I mean differentiable at each point. Here $f$ is a complex valued function.  What I do is write $f(z)=u(x,y)+iv(x,y)$, where $u$ and $v$ are real functions of two variables. Then $\overline{f(\bar{z})}=u(x,-y)-iv(x,-y)$.  These two forms look very similar, in the sense the one function being differentiable should immediately imply the other is differentiable, since the only thing really changing might be a $-$ sign popping out due to the chain rule.   How can I more rigorously express that $f(z)$ is analytic iff $\overline{f(\bar{z})}$ using this? Many thanks.


Having a bit of a problem with a question. There is a 4m ladder leaving against a wall. There is a box in between The ladder and wall. The box is a cubic metre.  I have found a quartic to find the length up the wall the ladder will reach. But its proving difficult for me to solve.   $$x^4 +2x^3 -14x^2 +2x +1=0$$

I was reading a newspaper and there was a little math riddle, I thought "how funny, that's gonna be easy, let's do it" and here am I...  The problem goes as follow : in a barn, there is a 1 meter cubic box against a wall and a 4 meter ladder is leaning against the wall, touching the box at its corner. Here is a picture :   So, the big triangle has a hypotenuse $FE$ of $4$, the square $ABDC$ has sides of length 1 and is basically "insquared" at the right angle, i.e. $D\in \overline{FE}$. The question is "what is the length of the biggest cathetus", here $AF$.  So far, no problem.  Now here are my solutions:   By Thales' intercept theorem, $\frac{FB}{FA}=\frac{BD}{AE}$, by hypothesis, $FB=FA-1$ and $BD=1$. Now by Pythagoras, $FA^2+AE^2=FE^2$; by hypothesis, $FE=4$, so we end up with a system of equations, letting $h=FA, d=AE$: $$ \begin{align} &\frac{h-1}{h}=\frac{1}{d} \\ &h^2+d^2=4^2  \end{align} $$ Which solves (removing 3 non-relevant solutions) into $d \cong 1.3622$ and $h \cong 3.76091$. Now, if I consider the "function" of the line : $f(x)=\frac{-h}{d}x+h$, I know that $f(1)=1$ and I end up with Pythagoras with the system :$$ \begin{align} &\frac{-h}{d}+h=1 \\ &h^2+d^2=4^2  \end{align} $$ it solves again into the same, again removing 3 non-relevant solutions   Okay, this means that using Pythagoras is no good since it ends up giving a quartic equation (4 answers of which 3 are "non-relevant").    Now if I consider the length of the arc $f(x)$ between $0$ and $d$ it has to be $4$ and again $f(1)=1$ I end up with the system: $$ \begin{align} &\frac{-h}{d}+h=1 \\ &\int_0^d \sqrt{1+(f'(x))^2} dx =\int_0^d \sqrt{1+\left(\frac{-h}{d}\right)^2} dx = d \sqrt{1+\left(\frac{-h}{d}\right)^2}   \end{align} $$ Which solves again into the same answers, but this time removing only 2 non-relevant solutions (i.e. it gives a cubic equation instead of a quartic).   I tried also using the areas and the smaller trangles $FAD$ and $AED$ for example : $\frac{h \cdot d}{2} = \frac{h\cdot 1}{2}+\frac{d\cdot 1}{2}$  Yet I wasn't able to get to any "hand solvable" solution : if I were able to bring it down to some quadratic equation, that would be nice, since it is a common assumption, here, that everybody has seen the "general formula for solving quadratic equations" in school and so would be able to solve this, I may then see how it is seen as a funny riddle in the newspaper.   My best trial, with "just" a cubic equation, is way too complicated for the normal readers of this newspaper, so it's bugging me.  What am I missing? Some basic properties maybe? It's really bugging me, not being able to solve this without Wolfram.


How would you explain to an only moderately statistically literate scientific reviewer that adjustment for multiple comparisons is not necessary when sampling from a Bayesian posterior?

Andrew Gelman wrote an extensive article on why Bayesian AB testing doesn't require multiple hypothesis correction: , 2012.  I don't quite understand: why don't Bayesian methods require multiple testing corrections?  A ~ Distribution1 + Common Distribution B ~ Distribution2 + Common Distribution C ~ Distribution3 + Common Distribution Common Distribution ~ Normal   My understanding is that the Bayesian approach shown above accounts for the shared underlying distribution by all the hypothesis (unlike in a frequentist Bonferroni correction). Is my reasoning correct?


Quoting the accepted answer from :     There may be an exception where all that is needed is a one letter fix. However it is a huge exception, not a rule.   Isn't this an exception? Within code snippet sib and sob means two different things (input / output).  Why can't an edit be just one character? Typos usually are one character...  For example in , sib should be sob in line #6  Saying that I should make more changes as to have more than 6 characters doesn't make sense as this is the one (rather important) change I want to make. Also, I'm aware that you need 2K points to edit freely - but I can't see how to suggest an edit without flagging it for a moderator.. am I missing something?

Earlier today I got this message:  Oops! Your edit couldn't be submitted because:   Edits must be at least 6 non-space characters; is there something else to improve in this post?   However, the purpose of my edit was to change the formatting for a message to show code.  There may have been other grammatical mistakes that could have been, but in general it is possible that there would not be.  What's the correct protocol to handle a situation like this?


I am trying to configure sendmail and ufw on an ubuntu server (ServerA) so that another server (ServerB) can send mail through it. In my /etc/mail/access file I have the following line (a.b.c.d is the IP of ServerB):  Connect:a.b.c.d    RELAY   My ufw status shows the following rule I added:  25/tcp                     ALLOW       a.b.c.d   When I telnet from ServerA I get through:  telnet localhost 25   When I telnet from ServerB I don't (w.x.y.z is the IP of ServerA):  telnet w.x.y.z 25 telnet: Unable to connect to remote host: Connection refused   I did restart the sendmail daemon after editing the access file.  What could I be missing? Something in sendmail.mc?  Edit:  netstat -an|grep -w 25 tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN

I am running sendmail + dovecot in my Debian server. I have enabled the firewall rules to allow everything:   iptables -P INPUT ACCEPT   iptables -P OUTPUT ACCEPT   iptables -P FORWARD ACCEPT   iptables -F   iptables -X  However after a quick check at yougetsignal.com, my port 25 is still being blocked. But 143, 80 are okay.


I have a problem with rounding. I need a 6 decimal precision and in "spoj" i get a good result, but the cout or printf round my outcome to 2 decimals. I tried using printf but still console rounds my outcome.  How can i avoid this?  #include <iomanip> #include <string>  void spoj(double** tab, double* vector, int columns, int rows) {     double** tab_t = new double* [columns];     for (int i = 0; i < columns; i++)     {         tab_t[i] = new double[rows];     }      for (int i = 0; i < columns; i++)     {         for (int j = 0; j < rows; j++)         {             tab_t[i][j] = tab[j][i];         }     }     //for (int i = 0; i < columns; i++)     //{     //  for (int j = 0; j < rows; j++)     //  {     //      std::cout << tab_t[i][j] << " ";     //  }     //  std::cout << "\n";     //}      double* outcome = new double[columns];     for (int i = 0; i < columns; i++)     {         outcome[i] = 0;         for (int j = 0; j < rows; j++)         {             outcome[i] += tab_t[i][j] * vector[j];         }     }      for (int i = 0; i < columns; i++)     {         printf("%.6f", outcome[i]);         std::cout << " ";     } }

In my  I was printing a double using cout that got rounded when I wasn't expecting it.  How can I make cout print a double using full precision?


A journal I like to submt to requires a bibliography style that appear do require lots of hacking. Before I start, I looked at the biblatex manual and it appears the style mingles different styles. Maybe somebody recognizes a known bibstyle from biblatex that corresponds to the examples:  Journal article     Hamburger, C.: Quasimonotonicity, regularity and duality for nonlinear systems of partial differential equations. Ann. Mat. Pura Appl. 169, 321–354 (1995)   Article by DOI     Sajti, C.L., Georgio, S., Khodorkovsky, V., Marine, W.: New nanohybrid materials for biophotonics. Appl. Phys. A (2007). doi:10.1007/s00339-007-4137-z   Book     Geddes, K.O., Czapor, S.R., Labahn, G.: Algorithms for Computer Algebra. Kluwer, Boston (1992)   Book chapter     Broy, M.: Software engineering — from auxiliary to key technologies. In: Broy, M., Denert, E. (eds.) Software Pioneers, pp. 10–13. Springer, Heidelberg (2002)   The citestyle is authoryear, no worries there. But the stuff above gives me a headache, especially that year all the way at the end and abbreviated journal names.  Any ideas?

I would like to create a bibtex style which answers the requirements of Statistics and Computing journal. How could I do that? Here is an example of how the bibliography should look like:  Journal article: Hamburger, C.: Quasimonotonicity, regularity and duality for nonlinear systems of partial differential equations. Ann. Mat. Pura Appl. 169, 321–354 (1995) Book: Geddes, K.O., Czapor, S.R., Labahn, G.: Algorithms for Computer Algebra. Kluwer, Boston (1992) Book chapter: Broy, M.: Software engineering — from auxiliary to key technologies. In: Broy, M., Denert, E. (eds.) Software Pioneers, pp. 10–13. Springer, Heidelberg (2002)  In the text, the references should be as follows:  Negotiation research spans many disciplines (Hamburger 1995).  Thank you for your help!


Make a bijection that shows $|\mathbb C| = |\mathbb R| $  First I thought of dividing the complex numbers in the real parts and the complex parts and then define a formula that maps those parts to the real numbers. But I don't get anywhere with that. By this I mean that it's not a good enough defined bijection.      Can someone give me a hint on how to do this?    Maybe I need to read more about complex numbers.

Could any one give an example of a bijective map from $\mathbb{R}^3\rightarrow \mathbb{R}$?  Thank you.


The set of all subsets of $\mathbb N$ is $ \mathcal{P}{(\mathbb N)} $ right?  So how can I prove that $ \mathcal{P}{(\mathbb N)} $ is countable?

Show that the set of all finite subsets of $\mathbb{N}$ is countable.   I'm not sure how to do this problem. I keep trying to think of an explicit formula for 1-1 correspondence like adding all the elements in each subset and sending that sum to itself in the natural numbers, but that wouldn't be 1-1 because, for example, the set {1,2,3} would send to 6 and so would the set {2,4}.  Multiplying all the elements in each subset and sending that product to itself in the natural numbers wouldn't work either since, for example, {2,3} would send to 5 and so would the set {1,5}. Any ideas?


my_dict = {k:v for k, v in sorted_freq} # sorted_freq is a list containing key:value.  {'like': 4870, 'taste': 4508, 'good': 3569, 'flavor': 3449, 'one': 3217, 'product': 3197, 'use': 3165, 'love': 3141, 'great': 3056, 'eat': 1614...}   How do I replace the Key in this dictionary by natural numbers starting from 1 for all the Keys in dictionary?   [('like', 4870),  ('tast', 4508),  ('good', 3569),  ('flavor', 3449),  ('one', 3217),  ('product', 3197),  ('use', 3165),  ('love', 3141),  ('great', 3056),  'get', 2400)...]

How do I access the index in a for loop like the following?  ints = [8, 23, 45, 12, 78] for i in ints:     print('item #{} = {}'.format(???, i))   I want to get this output:  item #1 = 8 item #2 = 23 item #3 = 45 item #4 = 12 item #5 = 78   When I loop through it using a for loop, how do I access the loop index, from 1 to 5 in this case?


I was wondering if there is a function, or how to write a clever one that can make the task. Let's imagine array like this: $arr = array(25, 35, 40);  I'd like to get key of random value from this table, but I'd like to have 25% for $arr[0], 35% for $arr[1], and 40% for arr[2] - depending on the values. There might be any number of values in array, and the sum is not always 100(%) - this is just example. I figured out such solution: $arr = array(123, 1856, 84, 84, 2, 654, 321);//just an example $temp = 0; $rand = mt_rand(1, array_sum($arr)); foreach ($arr as $key => $value) {     $temp += $value;     if ($temp >= $rand)     {         $random_key = $key;         break;     } } echo 'key of "random" element is '.$random_key;  Can it be done better?

I know how to generate a random number in PHP but lets say I want a random number between 1-10 but I want more 3,4,5's then 8,9,10's. How is this possible? I would post what I have tried but honestly, I don't even know where to start.


I have an  (Ubislate 7Ci) tablet. It runs on Android 4.0 ICS. I want to make it run on Ubuntu. Give me the procedures involved.

With the announcement of the Ubuntu Phone OS I'd like to know what phone (and tablet) models are supported at this time.  Note from foss & Oli: We are making this the master question for all future "Will this work on <insert random tablet/phone/device here>?!" questions


We see from The Force Awakens that Supreme Leader Snoke has a significantly disfigured face.    In The Last Jedi...      ...Snoke dies.   My question:      Now I thought that we'd possibly get some new backstory on Snoke in The Last Jedi, especially on the topic of Snoke's face. It seems clear that something must have happened to Snoke's face to account for the scaring and facial disfigurement. Yet I don't remember hearing anything in the film that explained Snoke's appearance. Did I miss something, or has what happened to Snoke been officially revealed somewhere else? Was he attacked at some point? Or is that just the way he's always been?

Did The Last Jedi (or any script, novelization once that becomes available, etc) shed any new light on Snoke?    I do mean that in a pretty general sense in that I'm not after a particular piece of information, but rather, what were his goals, where was he from, who actually was he, etc...    After the events at the end of the movie, it seems a little strange to me that        they would just kill off Snoke like that, basically just being a means for Ren to draw even further to the dark side and becoming the new Supreme Leader (which in itself is a fine reason, but still... I [wrongly] expected him to play a further role in the SW universe).


I will state the axiom of choice and give one equivallent formulation, i am interested in proving the $\Leftarrow$ way of the theorem. I will omit details.     Axiom of choice: For collection of nonempty sets $\mathcal{X}$ there exists a choice function $f:\mathcal{X}\rightarrow \bigcup\mathcal{X}$ such that for an set $A\in\mathcal{X}$ is $f(A)\in A$. In symbols   $$(\forall x)(\emptyset \notin \mathcal{X}\Rightarrow(\exists f: \mathcal{X}\rightarrow \bigcup\mathcal{X})\wedge (\forall A)(A\in X\Rightarrow f(A)\in A)$$      Theorem: The following is equivalent to axiom of choice: For any surjective function $\varphi:X\rightarrow Y$ exists $\psi:Y\rightarrow X$ s.t. $\varphi \circ \psi = \operatorname{id}_Y$.      Proof. $\Rightarrow$: Assume AC holds and let $\varphi:X\rightarrow Y$ be surjective. Assume this particular system of nonempty sets $\mathcal{X}=\{\varphi^{-1}(y)\mid y\in Y\}$. (Yes, they are nonetmpyset, because $\varphi$ is a surjection). By AC there exists some $f:\mathcal{X}\rightarrow \bigcup\mathcal{X}$ s.t. $A\in \mathcal{X}$ implies $f(A)\in A$. Apparently $\bigcup\mathcal{X}=X$. Define $g:Y\rightarrow \mathcal{X}$ by $g:y\mapsto\varphi^{-1}(y)$ and finally $\psi:Y\rightarrow X$ by $\psi:y\mapsto f(g(y))$. Now it is straightforward to show that $\varphi\circ \psi = \operatorname{id}_Y$.   Could someone potentionally help me with the other way around? Assuming the theorem and proving axiom of choice? This is what I have so far:     $\Leftarrow$: Assume the theorem holds, and assume arbitrary system of nonempty sets $\mathcal{X}$. We wish to find a function $f:\mathcal{X}\rightarrow \bigcup\mathcal{X}$ satysfying $A\in \mathcal{X} \Rightarrow f(A)\in A$.    I am quite unsure where I should be finding that $f$. Or where to make use of the surjection. Will the fact that any function $h$ can be decomposed into two $s, i$ s.t. $i\circ s = h$ and $s$ is surjective and $i$ injective, help me in any way? Help please.

This is a problem from Tao's Analysis I.  We are asked to show that the axiom of choice is equivalent to the statement that for any sets $A$ and $B$ for which a surjection $g:B\to A$ exists, an injection $f:A\to B$ exists.  I have proven that the axiom of choice implies the statement , but I am having difficulty with the other implication. The hint given in the book is to use the previous exercise, which says that the axiom of choice is equivalent to the statement that if $I$ is a set, $\forall\alpha\in I$ $X_\alpha$ is a non-empty-set and $\forall \alpha,\beta\in I, \alpha\neq \beta\implies X_\alpha\cap X_\beta=\emptyset$, then there exists a set $Y$ with $\forall \alpha\in I ,|Y\cap X_\alpha|=1$.  To use the previous exercise we need disjoint sets, so we consider the sets $\{\alpha\}\times X_\alpha$ instead of just $X_\alpha$. I think then we should find a set $Y$ with $\forall \alpha \in I,|Y\cap(\{\alpha\}\times X_\alpha)|=1$, perhaps by using that there is some surjection between two sets and so by assumption some injection which goes the other way, whose image is suitable as a set $Y$. I think that is the idea, but I can't figure out exactly what these functions should be.  If I am incorrect, please correct me. Any help is appreciated.


What is the lebesgue measure of irrational numbers between 0 and 1. This is a Borel set. I have figured out the following: The set of rational numbers is a Borel set so therefore the complement of the rational numbers, the irrational numbers, is also a Borel Set. I am having real trouble figuring out the Lebesgue measure. Please help!! I am not necessarily looking for an answer just guidance as to how I find the answer. I am fairly new to this level of math so any guidance is greatly appreciated.

Is the set of all irrational numbers in [0; 1] a Borel set? If yes, what is its Lebesgue measure? I have been trying to answer this for a long time now. I know that the set of rational numbers is infinitely countable but I am having trouble with the proof of this question. I am not necessarily looking for an answer just confirmation that I am doing the correct thing.  I have already tried the following: The set of rationals is countable between 0 and 1 and is therefore a Borel Set. Since it is countable its lebesgue measure is 0


My apologies if this is a duplicate question. I could not find it.  Why do we think space-time itself started at the BB?  Or to word it another way, could space-time have always existed infinitely in time but only matter have 'started' in the BB?

Did spacetime start with the Big Bang?  I mean, was there any presence of this spacetime we are experiencing now before big bang? And could there be a presence/existence of any other space-time before the big bang?


uniq seems to do something different than uniq -u, even though the description for both is "only unique lines". What's the difference here, what do they do?

Here are commands on a random file from :  wget -qO - http://pastebin.com/0cSPs9LR | wc -l 350 wget -qO - http://pastebin.com/0cSPs9LR | sort -u | wc -l 287 wget -qO - http://pastebin.com/0cSPs9LR | sort | uniq | wc -l 287 wget -qO - http://pastebin.com/0cSPs9LR | sort | uniq -u | wc -l 258   The man pages are not clear on what the -u flag is doing.  Any advice?


I have heard the expressions such as  A David works for a bank  B I am working in a school  Are the expressions " David is working in a bank" and  "I work for a school" possible?  Is  the change of the tense and the preposition acceptable? If yes, I would like to know the different shades of meaning?

I would like to know what usually follows after each proposition in sentences with the word "work". These are what I understand so far: I work for my boss. ( usually for certain person ) I work in a accounting corporation. (usually for business area ) I work at Samsung. ( usually for specific name of company ) Could you please tell me if I understand rightly?


Initially I have windows-10 in my PC. Now I want to remove it and install ubuntu. But RAM of my PC is 2GB only.remove

For a given hardware configuration, how do I find out if Ubuntu will run on it? What considerations should I take into account when choosing an Ubuntu version and  such as:    with a lighter desktop than the usual Gnome and Unity  with the even lighter LXDE desktop   Obviously Ubuntu does not run on some processor architectures. So how do I go about choosing the right version and derivate. How can I find out the minmal system requirements?


I am using PHPStorm 8 for programming. PHPStorm automatically creates a hidden folder called ".idea", where all project-specifiy settings are stored.  How am I able to find all these ".idea" folders in the entire system?  (I like to find and remove all of these folder)  Thanks!

I need to find some configs buried in some hidden folders and can't recall where they are to navigate to them directly Cmd+Shift+G.  I did a sudo find -name Foo* (slow), but none of the returned files were in hidden folders.  What is the easiest way to search all hidden files?


I have this loop   String str = "123";  byte[] bytes = str.getBytes();   for (byte b : bytes) { System.out.println(b);  }  //output: 49 50 11 (ASCII for 1 2 3)   My question is, how does b increment?

Consider:  List<String> someList = new ArrayList<String>(); // add "monkey", "donkey", "skeleton key" to someList     for (String item : someList) {     System.out.println(item); }   What would the equivalent for loop look like without using the for each syntax?


I am attempting to take RRhead, have a new RCB point at RRhead as it's next, and have RRhead point at the new RCB as it's prior.  typedef struct{   int sequence_number;   int file_descriptor;   FILE *requested_file;   int bytes_remaining;   int quantum;   struct RCB *next;   struct RCB *prior; } RCB;  typedef struct RCB RCB;   RCB *RRhead = NULL;   static void admit_to_scheduler_RR(int fd, FILE *fin){ int sequence_counter, new_bytes_remaining, new_quantum = 0;   RCB new_rcb = {sequence_counter, fd, fin, new_bytes_remaining, new_quantum, RRhead, NULL};   RRhead->prior = &new_rcb;   RRhead = &new_rcb;   sequence_counter++; }   producing the following errors:  sws.c: In function ‘admit_to_scheduler_RR’: sws.c:318:10: error: variable ‘new_rcb’ has initializer but incomplete type    struct RCB new_rcb = {sequence_counter, fd, fin, new_bytes_remaining, new_quantum, RRhead, NULL};           ^ sws.c:318:10: warning: excess elements in struct initializer [enabled by default] sws.c:318:10: warning: (near initialization for ‘new_rcb’) [enabled by default] sws.c:318:10: warning: excess elements in struct initializer [enabled by default] sws.c:318:10: warning: (near initialization for ‘new_rcb’) [enabled by default] sws.c:318:10: warning: excess elements in struct initializer [enabled by default] sws.c:318:10: warning: (near initialization for ‘new_rcb’) [enabled by default] sws.c:318:10: warning: excess elements in struct initializer [enabled by default] sws.c:318:10: warning: (near initialization for ‘new_rcb’) [enabled by default] sws.c:318:10: warning: excess elements in struct initializer [enabled by default] sws.c:318:10: warning: (near initialization for ‘new_rcb’) [enabled by default] sws.c:318:10: warning: excess elements in struct initializer [enabled by default] sws.c:318:10: warning: (near initialization for ‘new_rcb’) [enabled by default] sws.c:318:10: warning: excess elements in struct initializer [enabled by default] sws.c:318:10: warning: (near initialization for ‘new_rcb’) [enabled by default] sws.c:318:14: error: storage size of ‘new_rcb’ isn’t known    struct RCB new_rcb = {sequence_counter, fd, fin, new_bytes_remaining, new_quantum, RRhead, NULL};               ^ sws.c:319:9: error: dereferencing pointer to incomplete type    RRhead->prior = &new_rcb;          ^   I have no clue about why I am getting the warnings for excess elements. Am I not initializing new_rcb correctly? Do I need to create it and then set all of the fields to what I want?  I believe this all has to do with having an "incomplete type" for new_rcb. Most googling indicates that this is because the compiler doesn't know what the size of RCB should be. It seems to indicate that I need to place this struct definition into a header. Is this absolutely necessary?

I have seen many programs consisting of structures like the one below  typedef struct  {     int i;     char k; } elem;  elem user;   Why is it needed so often? Any specific reason or applicable area?


This may just be a minor error but I cannot seem to get rid of the glow within the domain. I realize that in the Compositor, i copied the Attribute node from the Quick smoke and added an emission node to make the fire have some color. But I do not understand how to have the mesh/particle system emit without the domain cube containing it to look like the glowing box it does.

In the 3D-View everything looks as  expected:    But when rendered the smoke domain covers the whole scene. I tried to place camera inside and outside of the smoke domain but this doesn't work either.      The box is caused by my fault in the smoke domain material:    Then the question should be how to reproduce the 3d-view in the rendered image.


What I mean to say is that we say that if a function is only differentiable once then it has a non-zero slope. Similarly on the same lines by graphical interpretation what is meant if we call a function to be twice differentiable?

In high school textbooks, the following characterizations are often found:     A function is continuous if its graph can be drawn without lifting the pencil.   and     A function is differentiable if its graph has no sharp bends.   Is there a similarly intuitive characterization for twice differentiable functions based on the shape of the function graph alone? Of course, we can say things like "a function is twice differentiable if the graph of its rate of change has no sharp bends" but that does not really help when trying to recognize the graph of a twice differentiable function.  A notable example for where this could be relevant is , which are widely used in design and architecture and often appear as "perfectly smooth" shapes, although they are in general only twice differentiable at the joints between the individual spline polynomials.


Why is the div with the class “container” clinging to the left edge when the div with the class "boss" is normally displayed in the center?  For a div with a "boss" class, I specified the width and the maximum width and everything works fine, but when I write the same code to the "container" class, the content is pressed to the left    body {   font-family: 'Open Sans', sans-serif;   margin: 0; }  *, *:before, *:after {   box-sizing: border-box; }  .header {   background-color: coral; }  .boss {   width: 100%;   max-width: 1100px;   background-color: #313030;   margin: 20px auto; }  .container {   width: 100%;   max-width: 1100px; }  .menu {   display: flex;   justify-content: center; }  .button {   padding: 40px 30px;   transition: background-color .2s linear; }  .button:hover {   opacity: 2;   background-color: red; }  .link {   color: white;   text-decoration: none; }

HOME

PORTFOLIO

ABOUT US

CONTACT

              Example
         Example

How can I horizontally center a
 within another
 using CSS?

Foo foo


I've tried several times but I don't know how to get the correct result. Can anyone please tell me what should I do with this sum? Thank you :)  $$\sum_{n=1}^\infty\frac{(-1)^{n-1}(2n-1)}{2^{n-1}}$$

It is obvious that   $\sum_{n=1}^{+\infty} \frac{(-1)^{n-1}(2n-1)}{2^{n-1}}$  is alternating series, therefore, before we could talk about finding the sum of the series, we have to check if it's unconditionally convergent, if we look at $a_n=\frac{2n-1}{2^{n-1}}$ it is obvious that we could use d'Alembert's test and easily prove that this is unconditionally convergent series. So now, we should find the sum:  $S_n=\sum_{k=1}^{\infty} \frac{(-1)^{n-1}(2n-1)}{2^{n-1}}$  because of the denominator, it really looks like geometric series, but i could't find a way to simplify it in order to determine the sum. Any ideas?


I recently stumbled upon a piece of code that went like this:  Object o = .. ; Foo foo = Foo.class.cast(o);   I was actually not even aware that java.lang.Class had a cast method, so I looked into the docs, and from what I gather this does simply do a cast to the class that the Class object represents. So the code above would be roughly equivalent to   Object o = ..; Foo foo = (Foo)o;   So I wondered, why I would want to use the cast method instead of simply doing a cast "the old way". Has anyone a good example where the usage of the cast method is beneficial over doing the simple cast?

Looking through some code I came across the following code  trTuDocPackTypdBd.update(TrTuDocPackTypeDto.class.cast(packDto));   and I'd like to know if casting this way has any advantages over   trTuDocPackTypdBd.update((TrTuDocPackTypeDto)packDto);   I've asked the developer responsible and he said he used it because it was new (which doesn't seem like a particularly good reason to me), but I'm intrigued when I would want to use the method.


I want to delete points created with Network Analyst with less than two lines connected. Is there any smart way to do that? Is it possible to count the number of lines the point is connected to?

I have a water network which and I need to install elbows and Tees (T). When 2 lines connect to a point, I want to install an elbow, when 3 lines connect, I want to install a Tee.   How do I get ArcGIS or QGIS to determine how many lines are connected to a point and designate an elbow or a tee based on that criteria?


I am trying to read a json file, and from it, a double, but I came across NullPointerException in the following situation, while there is no apparent error in it.  double longitude = (double) json_restaurant.get("longitude");   error:  java.lang.NullPointerException   I tried to check if it wasn't working, by calling System.out.println(longitude) after the above-mentioned code snippet, and the terminal does display the correct value of longitude.  Where am I going wrong, if anywhere?

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?


So I tried to install virtual box on my 18.04. It told me to reinstall virtualbox dkms. After looking around the forums I determined I needed to run sudo apt-get --reinstall virtualbox-dkms. When I do, Ubuntu says dpkg was interrupted. you must manually run sudo dpkg --configure -a to correct the problem. I do this and it just hangs forever. Am I missing something I need to fix this?  Edit: The line it gets stuck on is:  building initial module for 4.15.0-23 generic

I ran into some problems installing a package with apt. The terminal hung up during an install and I saw no other choice but to close the terminal. The problem, however, is that I can't seem to solve the issues that this has caused.   As is typical, I get:  E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable) E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?   This gets me nowhere and I'm locked out until I run sudo dpkg --configure -a. Makes sense. However, this process spits the following out and then hangs on the last line:  Setting up virtualbox-dkms (5.2.10-dfsg-6) ... Removing old virtualbox-5.2.10 DKMS files...  -------- Uninstall Beginning -------- Module:  virtualbox Version: 5.2.10 Kernel:  4.15.0-23-generic (x86_64) -------------------------------------  Status: This module version was INACTIVE for this kernel. depmod...  DKMS: uninstall completed.  ------------------------------ Deleting module version: 5.2.10 completely from the DKMS tree. ------------------------------ Done. Loading new virtualbox-5.2.10 DKMS files... Building for 4.15.0-23-generic Building initial module for 4.15.0-23-generic   A typical solution I've read is that you need to fix the broken packages. When I try to fix the broken packages (sudo apt install -f), the system also hangs on the same line, although the output is different:  Reading package lists... Done Building dependency tree        Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 3 not fully installed or removed. After this operation, 0 B of additional disk space will be used. Setting up virtualbox-dkms (5.2.10-dfsg-6) ... Removing old virtualbox-5.2.1  0 DKMS files...  ------------------------------ Deleting module version: 5.2.10 completely from the DKMS tree. ------------------------------ Done. Loading new virtualbox-5.2.10 DKMS files... Building for 4.15.0-23-generic Building initial module for 4.15.0-23-generic   I am unable to get out of it unless I kill the process. This I do by checking what is currently running related to apt (ps aux |grep apt), and then I kill the relevant processes with sudo kill -9 process_number_here.  If I try to run things after that, it tells me I still need to reconfigure dpkg.  I tried looking around for more solutions to dpkg and all I really see is the nuclear option:  sudo rm /var/lib/dpkg/lock sudo rm /var/cache/apt/archives/lock sudo rm /var/lib/apt/lists/lock   I also delete the files in /var/lib/dpkg/updates because when I did some digging one of the files inside had the exact same text as the above long output... but I fully admit to being out of my league here and I don't know what to do.   Taking a look at the error messages, I recognize that it hangs on building something related to the kernel. But I have no idea where to even start solving that. Any help is appreciated. My system is ubuntu 18.04


In the code below, how can I increase line spacing in the node?    \documentclass{book} \usepackage{lipsum} \usepackage{tikz} \begin{document} \begin{tikzpicture}[overlay,remember picture] \node (example-align) [draw,align=left,text width=8cm] at (5,-5) {\lipsum[1]}; \end{tikzpicture} \end{document}

Inside a TikZ node, one can force line breaks using \\ providing the align option of the node is set.  I would like to increase the line spacing inside a node. This can be done in the usual way with the optional parameter of \\, e.g. \\[1em]. Doing this for every line break is tedious though. Is there a way to increase the break globally, so that any \\ inside a node acts as \\[1em]?  EDIT: Almost there!  \documentclass{article}  \usepackage{tikz} \usetikzlibrary{shapes}  \begin{document}  \tikzset{   mynode/.style={     draw   , align=center   , execute at begin node=\setlength{\baselineskip}{2em}   } }  \begin{tikzpicture}   \node[mynode] {     this \\     is \\     \tikz \node[mynode] {a \\ break};   }; \end{tikzpicture}  \end{document}   This produces:    The remaining question is how to place a 2em break before the inner node.


I had install ubuntu 64 bit on my system (ubuntu 12.04 lts).  When I do free -m                total       used       free     shared    buffers     cached Mem:          5859       5284        574          0        251       4012 -/+ buffers/cache:       1021       4838 Swap:         6032          0       6032   I have total 6GB of RAM, now even I had just one application in used it show me 5284 are totally used, only 574 MB of memory is free.  What to do to resolved it or to debug it ?  Also when I fire TOP command, it show only few application running as in my system, but occupied memory are very much?

I have used top to see the memory usage at the moment. But I would like to monitor the memory usage over a period of time. E.g start monitoring and then execute a few commands, and final stop the monitoring and see how much memory that have been used during the period.  How can I do this on Ubuntu Server?  I guess I could start a cronjob every 5th second or so, and invoke a command that log the current memory usage in a textfile. But what command should I use to get the current memory usage in a format that is easy to log to a text file?


The activities that we choose can influence our emotions such as doing a fun activity will make you happy, but our emotions also make us choose our actions such as a breakup could make you angry. Is one more likely than the other or are they equal?

I often hear that we are emotional beings, that we make decisions based on our feelings, mood and emotions. These decisions may not be logical and serve us best.  On the other hand some argue that we humans are logical beings, use logic and science to argue and build, and advance in life. So what is the verdict in your option or in the opinion of majority of philosophers, can humans be categorized as logical species or are most of our decisions emotional? If we are more emotional than logical then our intepretation of life and events happening around us is different than when we look at humans as entities making logical decisions that produce the same result. Can we say the creation of proper governments and physical tangle products such as structures are from the emotions?


I am using hyperref to color my links, and using author year citation style. I cite a lot of works and so my text looks like a mess of black text and colored text now.   How can I just highlight the year instead of the author name and year together ? Is it possible to remove the link from the author name ?  This is the current output and desired output:   In tex file  \documentclass[a4paper,12pt,oneside]{report}  \usepackage{hyperref} \hypersetup{colorlinks,citecolor=blue,urlcolor=red}  \usepackage[round]{natbib} \bibliographystyle{plainnat}   % --------------------------------------------- %  \begin{document}  Some text \cite{xu2005survey}, some text \cite{xu2005survey}  \bibliography{biblio}  \end{document}   In bib file  @article{xu2005survey,   title={Survey of clustering algorithms},   author={Xu, Rui and Wunsch, Donald},   journal={IEEE Transactions on neural networks},   volume={16},   number={3},   pages={645--678},   year={2005},   publisher={Ieee} }

I am using the natbib and hyperref packages:  \usepackage{natbib}  \usepackage[pagebackref=true, plainpages=false, bookmarks, bookmarksnumbered, colorlinks, linktocpage=true, linkcolor=blue, citecolor=blue, filecolor=black, urlcolor=blue]{hyperref}   With my current settings (above) both the name and the year are hyperlinked.  My question is, whether there is a way to hyperlink (or color) only the year-not the author(s).   I have the impression reading this post  that biblatex does it by default. However changing to biblatex is not an option for me at this point.  Any helpful comments will be greatly appreciated.


My teacher gave the following definition while teaching chapter "Center of mass": "It is defined as the product of mass of the particle and distance of particle from point about which mass moment is taken" I could not understand this, so I searched the internet and found a common definition: " the moment of inertia is the tendency of a body to resist angular acceleration, by a torque." I am really confused now.

I am currently reading through a document  from MIT, page 4, and I am a little confused as to one of the concepts that they use.  In this document, there is mention of a . Could someone possibly define this for me please? I can't find anything too clear on the Internet.  Is this synonymous with the first moment of mass?


I am currently working on a custom initrd based on the CentOS 6.7 (2.6) kernel with the  loaded.  The initrd is designed to backup files off a old RHEL system into memory, unmount the disk, wipe the disk and then finally dd a prebuilt CentOS system onto the disk.  The CentOS system was built on VMware then the vmdk was exported and converted into a raw format with qemu-img.  From testing the whole process works awesomely and once the dd is complete the system can be rebooted and start up fine.  The current blocker is that once the dd operation has completed, I can't mount the LVM disk to copy files back.  As you can see in the modules list the LVM drivers are there and are loaded, if I run a fisk -l it shows sda1 as the boot partition (Non-LVM) and sda2 as a LVM partition. When running pvscan -vvv it sees /dev/sda2 but says No label detected.

I have a  16GB USB flash-drive:     The weird part with this USB flash-drive is that despite the fact that I have zero-filled the flash-drive:   # dd if=/dev/zero of=/dev/sdc bs=10M dd: writing `/dev/sdc': No space left on device 1490+0 records in 1489+0 records out 15614803968 bytes (16 GB) copied, 3837.37 s, 4.1 MB/s #    ..it still represents itself like it has a partition on:  # fdisk -l /dev/sdc*  Disk /dev/sdc: 15.6 GB, 15614803968 bytes 64 heads, 32 sectors/track, 14891 cylinders, total 30497664 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00000000  Disk /dev/sdc doesn't contain a valid partition table  Disk /dev/sdc1: 241 MB, 241172480 bytes 64 heads, 32 sectors/track, 230 cylinders, total 471040 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00000000  Disk /dev/sdc1 doesn't contain a valid partition table #    gdisk shows different GUID for both /dev/sdc and /dev/sdc1. If I grep the output of dmesg for sdc1, then only output is:  [21329562.191413]  sdc: sdc1   How to understand such flash-drives?


Before the 2.8 I hid some meshes and now i cannot unhide them... Here is an image.

I just got a updated to blender 2.8 and my objects that were in hidden layers are gone now, the collection layer tells me that they are in the scene but I cant unhide them also the collection is grayed out as well.


I'm a Sri Lankan who is traveling from Brisbane to Sri Lanka. I have a 2 hour transit visa in BKK (Bangkok Airport). My both flights (from BNE to BKK and BKK to CMB) are Thai Airways flights. Do I need to have a transit visa for staying 2 hours in Bangkok airport? I have a Sri Lankan passport.

I'm a Sri Lankan, traveling to China under a student visa. I'm traveling from Colombo to Bangkok Suvarnabhumi airport through Sri Lankan airlines and from there, traveling to PVG Shanghai Pu Dong airport with JuneYao Airlines.   My transit time is 6 hours and 5 minutes, and my ticket says the flight "connect in airport, Long wait".  So  1) should I get a transit visa?     2) Should I collect my luggage at the Suvarnabhumi airport and check-in again?  Any advice is much appriciated


I get this string from the database: 'Paris, \u00cele-de-France'  In the schema, it is encoded with UTF-8 Unicode. I try encode('utf-8') but it is no help.

For example, if I have a unicode string, I can encode it as an ASCII string like so:  >>> u'\u003cfoo/\u003e'.encode('ascii') '<foo/>'   However, I have e.g. this ASCII string:  '\u003foo\u003e'   ... that I want to turn into the same ASCII string as in my first example above:  '<foo/>'


I have downloaded "firefox-29.0.tar.bz2" to update my firefox. How do I use this file to update firefox?

I want to install the latest Firefox on my Ubuntu (64bit) box.  What is the best way to do this? Is there a specific update site or should I download the binaries manually? If doing manually, in which directory should I put the files? In my home directory, or is there a better place?


I installed Ubuntu on my old pc. I thought only C drive would be formatted, but the entire harddrive got formatted and partioned into one.

I have a Toshiba satellite A-200 laptop with a Vista OS on it with 4 NTFS partitions  (C:) Vista  (D:) Entertainment  (E:) Work  (F:) Sources   and I wanted to start using Ubuntu instead. So I tried it first from the live CD and everything was OK and all the partitions were shown and working and so I decided to install Ubuntu to replace Vista on the (C:) drive. After I did that I can no longer find my folders and files on the (D:), (E:), (F:) partitions and the only file system that is shown is one 198 GB although my HDD is 320 GB.  I can't access the lost data on the remaining 120 GB which I hope is still there and not totally lost  I am now working from the live CD but I am unable to install testdisk. Can I recover the Vista partitions by the product recovery CD to get my laptop back to the factory settings? Can I recover the NTFS partitions using a recovery program for Windows or will that make the problem worse?   I need these data badly as I don't have a backup for them.


I need to do some floating point arithmetic in Java as shown in the code below:  public class TestMain {     private static Map<Integer, Double> ccc = new HashMap<Integer, Double>() {       { put(1, 0.01); put(2, 0.02); put(3, 0.05); put(4, 0.1); put(6, 0.2);         put(10, 0.5); put(20, 1.0); put(30, 2.0); put(50, 5.0); put(100, 10.0);       }     };      Double increment(Double i, boolean up) {         Double inc = null;          while (inc == null) {             inc = ccc.get(i.intValue());              if (up)                 --i;             else                 ++i;         }         return inc;     }      public static void main(String[] args) {         TestMain tt = new TestMain();          for (double i = 1; i < 1000; i += tt.increment(i, true)) {             System.out.print(i + ",");         }     } }   This is to simulate the range of values given as output by the .  Floating point arithmetic in Java seems to introduce some unexpected errors. For example, I get 2.180000000000001 instead of 2.18. What use are floating point numbers is you can't trust the results of arithmetic performed on them? How can I get around this issue?

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


I installed Ubuntu 20.04 two weeks ago in my new laptop. The laptop has Windows 10 so I decided to keep both OSes. It worked properly until last week, when it started to launch Windows automatically, and no longer asks me to choose an OS to boot. How can I enter Ubuntu?

I installed Windows 7, which ate Ubuntu's boot file. When starting up the computer, it now goes straight to Windows, without giving me the option of booting Ubuntu.   How can I get Ubuntu back?


The situation is:          branch2         /        / master        \         \        branch1   I created a file (aaaa.py) in branch1, but I didn't commit it. Later I changed to branch2 and I did some changes in the file (aaaa.py) and I committed it in this branch (branch2) but now I want to restore the file (aaaa.py) like it was at branch1 before it was changed.  IMPORTANT: Now aaaa.py doesn't exist in branch1 because I didn't commit it in that branch.  How I can do it?

I have made some changes to a file which has been committed a few times as part of a group of files, but now want to reset/revert the changes on it back to a previous version.   I have done a git log along with a git diff to find the revision I need, but just have no idea how to get the file back to its former state in the past.


I asked a question on Stack Overflow, but it was closed because it is "subjective". Someone mentioned that not making it a community wiki could be the problem.  Should a subjective question be a community wiki?

Stuff like polls, recommendations based on subjective constraints, puzzles, webcomics etc. do not belong on the serious main SE sites, where professionals should be considered at work and having just a few spare minutes ("code's compiling") to answer questions, so they should not be distracted by such things. However, I'd also like to have a home for these things still using the SE engine. For the reason I mentioned before, this needs to be a separate place though. Let's call it four.[sitename-here].com.


I'm new to deployment process. In my current project we are deploying the python application using Docker. The issue is when we try to share Docker file its easy to extract source codes and they want to protect the source codes. For example In Java they will compile the Java code and package it up into Jar file and create Docker Container. Is there any similar way to try in python ??

I am developing a piece of software in Python that will be distributed to my employer's customers. My employer wants to limit the usage of the software with a time restricted license file. If we distribute the .py files or even .pyc files it will be easy to (decompile and) remove the code that checks the license file. Another aspect is that my employer does not want the code to be read by our customers, fearing that the code may be stolen or at least the "novel ideas". Is there a good way to handle this problem?


Sending photos from 3 camera to a laptop either IOS or windows, simultaneously wirelessly, is it even possible?   I have three cameras , a canon G11, a canon 7d and a canon 400d. They all have different lenses mounted on them. I need to take three different types of photographs from a subject by these three cameras. This for skin cancer photography, hence I need a normal photograph of a mole then a macro view of the lesion and then a dermatoscopic view of the lesion which requires me to have three different cameras at the same time to avoid changing lenses which can be quite time consuming. Now I was wondering whether there is anyway to send all the captured photos to a base laptop as I am taking photos. I have bought a wifi SD card for my Canon G11 already but the problem is that I cannot be connected to more than 1 wifi SD card at the same time.   I have read about the CamRanger here but I am not sure whether that is the solution or not?  I appreciate any feedback.

I am looking to use this feature for two purposes: scanning books (one camera pointed at each of a pair of pages), and for stereo 3D photography.  I would like to be able to preview and capture photos from two cameras simultaneously, and download them to my Mac (recent laptop, Mac OS X 10.8.x). Being able to keep track of which photos were from which camera is also a must.  I see a couple of packages that will do this via USB tethering on Windows, namely  (which other than being on Windows, looks perfect for my needs) and . I certainly could run Windows on my Mac somehow, but I'd rather avoid that, if possible.  I haven't bought the cameras yet, and I do not have any requirements as to which cameras are supported (it seems the packages above only support Canons), other than that they be relatively inexpensive. This is a hobby-type project, not a $3000 dSLR-type project.  However, even if all you have is a dSLR solution for this problem, I'd still like to hear about it. Perhaps it will lead to related solution.  Inventive hacky solutions welcome!


I'm trying to learn about SQL Injection and how to avoid it. This is my current register php that I added escape strings. Can someone tell me if there's any other steps I should take to avoid SQL injection? Thanks.  <?php  session_start();  // Set session variables to be used on profile.php page $_SESSION['email'] = $_POST['email']; $_SESSION['first_name'] = $_POST['firstname']; $_SESSION['last_name'] = $_POST['lastname'];  $first_name = $mysqli->escape_string($_POST['firstname']); $last_name = $mysqli->escape_string($_POST['lastname']); $email = $mysqli->escape_string($_POST['email']); $password = $mysqli->escape_string(password_hash($_POST['password'], PASSWORD_BCRYPT)); $hash = $mysqli->escape_string( md5( rand(0,1000) ) ); $igname = $mysqli->escape_string($_POST['igname']); $profileurl = $mysqli->escape_string($_POST['profileurl']); $rules = $mysqli->escape_string($_POST['rules']); $username2 = $mysqli->escape_string($_POST['username']);   // Check if user with that email already exists $result = $mysqli->query("SELECT * FROM users WHERE email='$email'") or die($mysqli->error()); $result2 = $mysqli->query("SELECT * FROM users WHERE username='$username2'") or die($mysqli->error());  if ( $result->num_rows > 0 ) {  $_SESSION['message'] = 'User with this email already exists!'; header("location: error.php"); exit(); }  else if ( $result2->num_rows > 0 ) {  $_SESSION['message'] = 'User with this username already exists!'; header("location: error.php"); exit(); }   else {   $to = 'kielly@email.ca'; $subject = 'NEWUSER';  $message = "Someone has registered";  $headers = "From: general@email.ca\r\nReply-To: webmaster@email.com"; $mail_sent = @mail( $to, $subject, $message, $headers );  echo $mail_sent ? "Mail sent" : "Mail failed";  $sql = "INSERT INTO users (first_name, last_name, email, password, hash, igname, profileurl, readrules, admin, username) "          . "VALUES ('$first_name','$last_name','$email','$password', '$hash', '$igname', '$profileurl', '$rules', 0, '$username2')";  // Add user to the database if ( $mysqli->query($sql) ){      $_SESSION['active'] = 0; //0 until user activates their account with verify.php     $_SESSION['logged_in'] = true; // So we know the user has logged in     $_SESSION['admin'] = 0;     $_SESSION['message'] =               "Thank you for applying. Please wait while admins check over your application. You should recieve an email shortly. (Check junk folders and allow up to 5 hours for a review)";     header("location: usertest.php");   }  else {     $_SESSION['message'] = 'Registration failed!';     header("location: error.php"); } }   Should I also add prepared statements such as  $stmt = $mysqli->prepare("INSERT INTO users (first_name, last_name, email, password, hash, igname, profileurl, readrules, admin, username) VALUES (?,?,?,?,?,?,?,?,?,?)");   or is what I have above safe?

If user input is inserted without modification into an SQL query, then the application becomes vulnerable to , like in the following example:  $unsafe_variable = $_POST['user_input'];   mysql_query("INSERT INTO `table` (`column`) VALUES ('$unsafe_variable')");   That's because the user can input something like value'); DROP TABLE table;--, and the query becomes:  INSERT INTO `table` (`column`) VALUES('value'); DROP TABLE table;--')   What can be done to prevent this from happening?


Why would someone remove a statement of appreciation and downvote ? I understand it's a technical site, but I think there should be room for pleasantries, after all we are asking for help.  Also, no one was able to answer my problem, I solved it myself and provided documentation how I fixed my issue and my answer was also downvoted. Is there something I'm missing?

I edit a lot of posts every day. I often run across posts with 'Hi' and 'Thanks' on the top and the bottom of the post respectively. I also run across things like:     --User   Should these items be removed during the editing of the post by an editor?


I was upgrading my ubuntu from 11.10 to 12.04 LTS but the power went off.  So when i restarted by laptop there was a black screen that came. Then I downloaded 12.04 from windows 7. It is rebooting from windows boot manager. Now how do i remove 11.10 ubuntu.

I dual booted ubuntu 11.04/11.10 a while ago with a USB stick and i want to uninstall it.   I would like to completely uninstall the old version and get 12.04.  I have a 64 bit laptop. Please help!


Like:   for Linux is there any professional quick mockup builders available? (not pen and paper we know we do that mostly but it needs to be quick and professional for sharing, not like open-office power point or gimp or with wine macromedia flash).  Something specially dedicated for linux in a sense of making specific professional mockup's under linux. is there somthing?

As part of my job as a web developer, I spend an amount of time doing UI prototypes to show the client. It's a pain in the behind but sometimes it has to be done.  I've seen Shuttleworth (and the design team) pump out images like this:    That's made by something called ... Something that balances on top of Adobe Air (yack!) and costs $79.  I've tried it but it kept falling over. I think it had something to do with Air not the app itself. My point is if I'm paying out for something, I want it to be native.


I want to obtain the figure as    Could you suggest to me the way to draw it? Thanks so much. Note that, the circle is a point (x,y).  Update: This is a simple data set for points(x,y)  (3,3.2) (4,3.8) (4,4.5) (5,5.1) (5.5,5.6) (5.3,5.8) (6.3,5.8) (7, 7.4) (7.3, 7.5) (8.3, 8.5) (9, 8.5) (10, 11.0) (11, 11.5) (11.2, 11.6) (11.5, 11.9) (12.5, 12.9) (13.5, 13.1) (14, 13.8) (15, 15.3) (16, 16.5) (17, 17.2) (18, 18.4) (19, 19.1)   This is my code based on suggestions:  \documentclass{article} \usepackage{tikz} \usepackage{pgfplots} \usepackage{pgfplotstable}  \begin{document}  \begin{tikzpicture} \begin{axis}[ xlabel=Weight (kg), % label x axis ylabel=Height (cm), % label y axis axis lines=left, %set the position of the axes xmin=0, xmax=20, % set the min and max values of the x-axis ymin=0, ymax=20, % set the min and max values of the y-axis clip=false ] \addplot[only marks,mark=o] coordinates {(3,3.2) (4,3.8) (4,4.5) (5,5.1) (5.5,5.6) (5.3,5.8) (6.3,5.8) (7, 7.4) (7.3, 7.5) (8.3, 8.5) (9, 8.5) (10, 11.0) (11, 11.5) (11.2, 11.6) (11.5, 11.9) (12.5, 12.9) (13.5, 13.1) (14, 13.8) (15, 15.3) (16, 16.5) (17, 17.2) (18, 18.4) (19, 19.1)}; \addplot [only marks] table {\loadedtable}; \end{axis}  \end{tikzpicture} \end{document}

\documentclass{article} \usepackage{tikz} \usepackage{color} \usepackage[active,pdftex,tightpage]{preview} \usepackage{pgfplots} \usepackage{pgfplotstable}  \begin{document}  \begin{tikzpicture} \begin{axis}[ xlabel=Weight (kg), % label x axis ylabel=Height (cm), % label y axis axis lines=left, %set the position of the axes xmin=40, xmax=105, % set the min and max values of the x-axis ymin=150, ymax=200, % set the min and max values of the y-axis ] % add main points \pgfmathsetseed{1138} % set the random seed \addplot[only marks, samples=30, domain=42:100] % show marks, set no. of samples and set the domain of the points {(0.6*x+130)+5*rand}; % equation of the points  \end{axis}  \end{tikzpicture} \end{document}


I'm just learning about differential equation separability. I understand what a derivative is. One notation for derivative is $\frac{dy}{dx}$, which - misleadingly - is not a fraction. Since it's not a fraction, why are we "separating" differential equations by treating it as if it were a fraction? For example:  We have the following differential equation: $$\frac{dy}{dx} = y.$$  Then we separate the... whatever they are: $$\frac{dy}{y} = x\cdot dx.$$  What do $dy$ and $dx$ even represent when they are detached from each other? How is this valid math?  Then we integrate both sides of the equation. Even though we are integrating one side with $dy$ and the other side with $dx$, the equality is somehow magically not broken.  Also, somehow integrating $dy$ yields $y$, but integrating $dx$ doesn't yield $x$.  So my question is how do you make sense of $dy$ and $dx$ variables as they are separated from each other?

I see an equation like this:  $$y\frac{\textrm{d}y}{\textrm{d}x} = e^x$$  and solve it by "separating variables" like this:  $$y\textrm{d}y = e^x\textrm{d}x$$ $$\int y\textrm{d}y = \int e^x\textrm{d}x$$ $$y^2/2  = e^x + c$$  What am I doing when I solve an equation this way?  Because $\textrm{d}y/\textrm{d}x$ actually means  $$\lim_{\Delta x \to 0} \frac{\Delta y}{\Delta x}$$  they are not really separate entities I can multiply around algebraically.    I can check the solution when I'm done this procedure, and I've never run into problems with it.  Nonetheless, what is the justification behind it?  What I thought of to do in this particular case is write  $$\int y \frac{\textrm{d}y}{\textrm{d}x}\textrm{d}x = \int e^x\textrm{d}x$$ $$\int \frac{\textrm{d}}{\textrm{d}x}(y^2/2)\textrm{d}x = e^x + c$$  then by the fundamental theorem of calculus  $$y^2/2 = e^x + c$$  Is this correct?  Will such a procedure work every time I can find a way to separate variables?


How do I prove that the interior of a convex set $C\subset\mathbb{R}^n$ is convex?  I have tried a proof by contradiction.

Question: Let If $P\subseteq \mathbb{R}^n$ be a convex set. show that $int(P)$ is a convex set.  I know that a point $x$ is said to be the interior point of the set $P$ if there is an open ball centred at $x$ that is contained entirely in $P$. The set of all interior points of $P$ is denoted by $int(P)$.  Also a set is convex if $x,y \in P$ $\implies$ $(tx+(1-t)y) \in P$ for all $t \in (0,1)$.  How to go about the above proof?


In defining , we say that     "The potential energy difference is path independent."   However, as far as I understand, potential energy only exists when there is a force field.  People say one example of non-conservative force.  By definition, non-conservative force should be the one in which the difference in potential energy is path dependent. But where is potential energy for friction which is not a force field?

A  field is one in which all that matters is that a particle goes from point A to point B. The time (or otherwise) path involved makes no difference.   Most force fields in physics are  (conservation laws of mass, energy, etc.). But in many other applications, the time paths DO matter, meaning that the force field is not "conservative."  What causes a force field to be "non-conservative?" Could you give some examples (probably outside of physics)?


I would like know if there is any global variable i can use to prevent trigger fire from a future method.  Like I can use   System.isBatch()    to prevent trigger fire from batch classes

We have various ways of invoking apex. Triggers, Inbound Webservices, @InvocableMethod,@RemoteAction and what not. Often we call some or other utility methods from these execution contexts. I have some generic utility method,that should behave differently from the context it is called?  I know about Trigger.isExecuting but it only tells if its running in trigger context or not.  I have a utility method that creates lead from Webservices, VF button click and via Lightning . Whenever we create a lead I want some special operations to be done via the source it was originated.(Its not just updating a simple field leadSource, I have some methods that creates some childs and update other records of other type) . I can achieve this by passing an extra parameter to utility method to tell about source, but i have then to edit hundred of other class that uses this utility method. If i could dynamically find out via which context this piece of code is running,then i would have to change only one class to satisfy my requirement.    Is there something in APEX that tells in what context the apex method was called?


I am trying to install r-base using the following commands:  sudo add-apt-repository ppa:marutter/rrutter3.5  sudo apt-get install -y r-base  sudo apt-get install -y gdebi-core   However, this happens:  The following packages have unmet dependencies:   r-base : Depends: r-recommended (= 3.5.1-1bionic) but it is not going to be installed E: Unable to correct problems, you have held broken packages.   Do you have any recommendations?

I just installed Ubuntu 18.04 on my testbed laptop. Total fresh install (chose the 'minimal' option). The first two things I did were install R 3.5 and R Studio 1.1.453. If I open up a fresh install of R and just let it sit idle for 30 minutes or so I eventually get the error "Error: Unable to establish connection with R session".  At this point in time I can't do anything in R Studio and I have to xkill it and reload everything to continue programming. An internet search reveals that this issue has been popping up repeatedly since people have been installing R/R Studio on Ubuntu machines that use GNOME. Am not sure if GNOME is the root cause but it's interesting.  Anybody solved this? Or maybe you run R 3.5 fine on Ubuntu 18.04 without issue. Please let me know. I can only run for 30 minutes or so before this issue brings my system down. And my system is a fresh install of Bionic Beaver with just R on it. Weird.  ------ and for those wondering ------  installation for R was via  sudo add-apt-repository "deb https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/" sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E084DAB9 sudo apt-get update sudo apt-get install r-base r-base-dev   and R Studio was installed via this link through the Ubuntu software center   and it is speculated that the preview release of R Studio may fix this (TBD)


Is mixing races allowed? How would you choose which perks to take from each race?  For example: There are Half elves and half orcs but what about a half dwarf? or a half gnome? or even a half-Elf Half-orc?

Two of the races you're allowed to use in D&D are half-elf and half-orc. My first character was a half-elf. Usually the other half is human but is it possible to have a character who is half-elf and half-orc?  Are any of the other main races compatible? I heard someone saying the dwarves were half-human and half-gnome but I don't think that's correct.


I was wondering if I could change the number that appears in my "\labelcref"? (I use hyperref, cleveref and nameref packages) More precisely, I'm writing a document where there are several sections which are composed by a few subsections. I wrote the code:  \renewcommand{\thesection}{\Roman{section}} \renewcommand{\thesubsection}{\arabic{subsection}}   So that my sections go by I,II,III,... and every subsection by 1,2,3,..(and not I.1,I.2,..).  But I'd like to have "see I.1" and not "see 1" (which could confuse the reader because it doesn't state in which section it is). My code looks like that:  \documentclass[10pt,a4paper]{article}  \usepackage[utf8]{inputenc} \usepackage[francais]{babel} \usepackage[T1]{fontenc} \usepackage{amsmath} \usepackage{amsthm, thmtools}   \usepackage{amsfonts} \usepackage{amssymb} \usepackage{lmodern} \usepackage{soul}   \usepackage{mathrsfs}  \usepackage{enumitem}   \usepackage{xcolor}    \usepackage{hyperref, nameref, cleveref}  \begin{document}  \section {First} \subsection {one} \label{I.1} blablabla \subsection {two} blablabla \section {Second} \subsection {one} blablabla and see \labelcref{I.1} \end{document}   Thanks for any answer!

I would like to make cross references to own defined counter on environments. So far I have tried the following,   \documentclass{book} \newcounter{entryc}[subsection] \newcommand{\thetheorem}{\thesubsection.\arabic{entryc}} \newenvironment{qd}[1]{\refstepcounter{entryc}\noindent\textbf{Quasi Definition \thetheorem.}\begin{itshape}} {\end{itshape}} % \begin{document}  \chapter{First chapter} This is the first chapter.  \section{First section} This is the first section.  \subsection{First subsection} This is the first subsection.  \begin{qd}{}\label{qd:emp} This is my environment. \end{qd}  \noindent In quasi definition \ref{qd:emp} it \dots  \end{document}   What happens is that     But I would prefer "...In quasi definition 1.1.1.1". Do anyone have some suggestions of how solve this? and How to avoid the          \noindent  thing before the continuation of the text?   Additional information: if possible I would try to not use ntheorem.


I just tried to resurrect an old MacBook by installing Xubuntu on it. However, I face a severe problem. Every time I start Xubuntu the num lock is on and there is no key on the MacBook to deactivate it. I have no idea why num lock is on at start. The keyboard works fine on Mac OS X. And sometimes after suspend on Xubuntu, the num lock gets deactivated for no apparent reason and I can use the machine until the next restart. Is there a way to disable num lock or so to solve the problem? I have already tried to update the system to the latest version. Edit: This question is particularly about Xubuntu. And the answer to the suggested duplicate differs from the selected answer.

- but IMHO there has to be a simpler solution. If num-lock is on in the BIOS - why is it turned off during linux boot and/or KDE/Gnome/whatever startup?


I was wondering if it was possible to do something like  but also apply the effect used in  to the cone of light in Cycles.  I was told by someone else that I need volumetrics, but I'm not quite sure how to do this.

I tried to reproduce the results from the  unfortunately the video link is broken. And I might have overlooked some related settings.  The spot light is barley visible on the ground.    Increasing the Density of the Volume Scatter Node darkens the sky texture but leads to some light cone from the car's headlight. (only 10 samples in preview).    Which settings do I need to change or should I try a different approach?  Integrator settings are default and spotlight settings were copied from the example found in the docs.  Related:    (pre 2.7)  (BI only)


I want to create a robot to find news in my defined website, so my robot fetch the html code from the website and I should find the news part of the html code. For example one of the pattern that I should find is like this :
بازدید رئیس هیئت عامل صندوق نوآوری و شکوفایی از خبرگزاری مهر
   I want to know how can I find these pattern in the html code in C#. I googled it and i found something like regular expression. But in regular expression I can't define patterns. Can I define some pattern like this? With this complexity?

I'm looking for a library/method to parse an html file with more html specific features than generic xml parsing libraries.


Let $p$ a prime and $A=\{\frac{a}{b}\in\mathbb{Q}:p\text{ does not divide } b\}$. Prove that $A$ is a Principal Ideal Domain and describe its ideals. Can anyone help me to solve this exercise? any idea will help. Thanks in advance!

Let $A$ be a commutative ring and $S$ a multiplicative closed subset of $A$. If $A$ is a PID, show that $S^{-1}A$ is a PID.   I've taken an ideal $I$ of $S^{-1}A$ and I've tried to see that is generated by one element; the ideal $I$ has the form $S^{-1}J$ with $J$ an ideal of $A$. $J$ is generated by one element but I can't see why $I$ has to be generated by one element, maybe I'm wrong.


I installed Ubuntu 14.04 and the current Android development SDK, which contains 32-bit executables. I found that I cannot run those 32-bit binaries. Trying to start them from bash gives me an error: $ ./adb bash: ./adb: No such file or directory  It is there though: $ ls -al ./adb -rwxrwxrwx 1 thomas thomas 1231255 Jan 17 13:31 ./adb $ file ./adb ./adb: ELF 32-bit LSB  executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.8, not stripped.   Same symptom for all the other 32-bit tools in the Android SDK. In olden days one could just install 32-bit libraries on 64-bit Ubuntu to get 32-bit support, but that does not seem to work anymore. How do I run 32-bit apps on a 64-bit Ubuntu distribution?

I have a 64-bit version of Ubuntu 13.10.  I want to run a 32-bit version of a program.  However I see ia32-libs is not included in 13.10.  Is there a replacement package for this or what?


I am using the following code:  \documentclass[10pt,onecolumn,twoside,draftcls]{article} \usepackage[T1]{fontenc} \usepackage{amsmath,amssymb,amsfonts} \usepackage{amsbsy} \usepackage{placeins}  \let\Oldsection\section \renewcommand{\section}{\FloatBarrier\Oldsection} \let\Oldsubsection\subsection \renewcommand{\subsection}{\FloatBarrier\Oldsubsection} \let\Oldsubsubsection\subsubsection \renewcommand{\subsubsection}{\FloatBarrier\Oldsubsubsection}  \usepackage{datatool} \usepackage{url} \usepackage{graphicx} \usepackage{graphics} \usepackage{epstopdf} \usepackage{algorithm} \usepackage{bm} \usepackage{algorithmic} \usepackage{subfigure} \usepackage{cite} \usepackage{multirow} \usepackage{pgfplotstable,filecontents} \usepackage{ctable} \usepackage{enumitem} \usepackage{fancyhdr} \usepackage{lastpage} \usepackage[pagewise]{lineno}  \renewcommand*\familydefault{\sfdefault}   \begin{document} \listoffigures \listoftables  See Figs.~\ref{fig:1} and~\ref{fig:2} and Tables~\ref{table:1} and~\ref{table:2}.  \section{section 1} \section{section 2} \label{sec4} \begin{table}[H] \label{table:1}      \caption{table 1 caption} \end{table} \begin{figure} [H]\label{fig:1}     \caption{fig 1 caption} \end{figure}  \subsection{subsection} \begin{table}[H] \label{table:2}      \caption{table 2 caption} \end{table} \begin{figure} [H]\label{fig:2}     \caption{fig 2 caption} \end{figure} \end{document}   When I compile, I see that the table numberings are correct in the table, but wrong when I refer to them. They get the number of their section/subsection. The same thing happens for figure numberings as well:  List of Figures 1 fig 1 caption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 2 fig 2 caption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 List of Tables 1 table 1 caption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 2 table 2 caption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 See Figs. 2 and 2.1 and Tables 2 and 2.1. 1 section 1 2 section 2 Table 1: table 1 caption Figure 1: fig 1 caption 2.1 subsection Table 2: table 2 caption Figure 2: fig 2 caption 1   I need that the table numberings become independent of the section/subsection. The numbering starts at 1, and when I add a new table, it increases by 1. The same when I refer to them. I want the same thing for figure numberings as well. Can you help?    I got a comment that the label has to be placed after the caption. I did that but nothing changed. The same issue is there. So, this is not duplicate.     Edit after the second comment: I fixed it. The label has to be placed right after the caption.  What I did and did not work was placing the label after caption, but it was not right after the caption. It was after the \end{figure} or \end{table}. When I put it right after the caption, it works.

\documentclass{article} \usepackage{algorithm}  \begin{document} \setcounter{section}{54} \section{A section with no label} \begin{algorithm} \label{myalg} \caption{An algorithm with the label `myalg'.} \end{algorithm} Reference to myalg: \ref{myalg}. \end{document}   With this code, the reference givens 55 (the section number); if I move the label after the caption command, I get the correct reference (1).  Why should this be the case? I find it confusing: when thinking about an algorithm as an environment, you expect to be able to label it right after you began it. At the very least I would expect some kind of error or "??" to appear, rather than the previous environment or reference-able entity being used.


I have a simple isometric map of 128px x 128px, tile in a 2D field [xxxx][xxxx] I have a problem with my calculating. I need to get startx:[0], startY[0] and endX[20], endY[10], if I know the screen width and height, and the camera offset like this:   (not effective for big maps)  This is my current code:  starti = (-camera.xOffset - tileWidth) / 64; int endi = (-camera.xOffset + camera.width + tileWidth) / 64; int startj = (-camera.yOffset - tileHeight) / 64; int endj = (-camera.yOffset + camera.height + tileHeight) / 64;  Point start = twoDToIso(new Point(startx,starty)); Point end = twoDToIso(new Point(endx, endy)); for (int i = start.X; i < end.X; i++) {     for (int j = start.Y; j < end.Y; j++)     {   This does not work; it will create something like this:   It does something, but when I move and my offset is changed, it does not work at all. How do I calculate the visible lines on a big isometric map?

I'm putting together an isometric engine and need to cull the tiles that aren't in the camera's current view. My tile coordinates go from left to right on the X and top to bottom on the Y with (0,0) being the top left corner.  If I have access to say the top left, top right, bottom left and bottom right corner coordinates, is there a formula or something I could use to determine which tiles fall in range?  This is a screenshot of the layout of the tiles for reference.   If there isn't one, or there's a better way to determine which tiles are on screen and which to cull, I'm all ears and am grateful for any ideas. I've got a few other methods I may be able to try such as checking the position of the tile against a rectangle. I pretty much just need something quick. Thanks for giving this a read =)


I have made usage restrictions to a PDF file and protected it with a password. Now I would like to remove the protection to allow my self to do more with the document. Doing a Google search for "unlock protected pdf with password" gave me all sorts of crazy suggestions using all sorts of cracking/hacking/illegal tools.  So I refined my search and included "adobe support" and found the following page.    This is where my problems would have ended but my version of Adobe Acrobat doesn't match the version used in the description. Also, my Security tab of the Document Properties dialog box (i.e. security properties) does not have the security options as shown in the example.  This is their:    And this is mine:    So how do I do this? Do I really have to hire a hacker for a day? Just to perform this simple task of unlocking the restrictions of my own document? I mean I know the password... hell, I thought Adobe software would be smarter than this.  I previously had the older version of Adobe Acrobat as the one shown in the example (see screenshot and link above) and I know that it was possible to remove this restriction very easily. There was even a dedicated button for this on the toolbar.  This is the Security button in old Adobe Acrobat:    For the record, I have Adobe Acrobat X Pro.

I have a couple of ebooks as PDFs with passwords, however my ebook reader (sony prs600) doesn't seem to support PDFs with passwords.  What is the easiest of removing the password from a PDF (I know the password, which presumably helps a lot).  It's a bit annoying buying a book and then only being able to read it in front of a computer.


i want to open two (or more) excel windows on different screen (extended displays), But was not able to. I tried few solutions found on Google.

My question does primarily concern Project 2010, though it would be applicable to other Office products such as Excel, which can tend to span several horizontal screens.  Seems like an obvious question to me, but I had a hard time finding anyone else who had addressed this issue with Office products in specific (though there were several Google hits for the same question in Visual Studio).  With Project, I would love to be able to handle my task list in the left-hand screen, and see the corresponding Gantt chart laid out on the right-hand screen. For now, my solution has been to drag the window across both monitors, but that's sloppy and the Gantt chart does not zoom in/out correctly to account for the additional space.  It would also be nice to utilize this feature in Excel. As an engineer, I often track projects with spreadsheets that span 2-3 landscaped 11" x 17" pages. If I could spread the view over 2 screens it would make my life a lot easier.  Maybe there's a setting, or a 3rd party application that I'm missing?


I am confused about these two terms. What do these two terms mean? What is the difference between Layer and Tier?

What's the difference between "Layers" and "Tiers"?


For whatever reason certain parts of the model won't mirror properly? Like most of the joints and segments mirror fine, and the middle arms mirror fine, but the shields and hands and wrists on the top arms and bottom arms mirror all over the place that don't make sense for x,y or z.  Does someone know why this is happening and how to fix this?

Hi guys i'm having a small issue here trying to get my mirror modifier to work, I believe it has something to do with the origin point but being new to blender I don't have the know how to fix this problem. If someone could point me in the right direction that would be incredible.  Thanks guys.


Every now and then I'll have an MXD that suddenly begins to not only draw at agonisingly slow speeds, but also become sluggish in general. As a routine solution, I generally run MXD doctor, remove unnecessary layers, clear results, and remove layers one by one til I identify the problem.  However, I am wondering if there is a way to quickly return diagnostics that would identify problematic layers in the first instance. The in-built 'Analyze Map...' function has not generally been helpful in these cases. Is there a way to programmatically return the drawing time of each layer - or any other creative solutions to return helpful info?

I'd like to quantitatively measure the display performance of mosaic datasets, image service layers, raster layers, feature layers, etc. in ArcMap 10.  How can I measure the draw time of a particular layer (or the complete drawing process if that is the only option) in ArcMap? What are the interfaces, objects and events involved? Is the  class in .NET suitable for accurately measuring this type of operation?  Has anyone already created an ArcMap add-in or extension for this purpose?