Dirichlet's theorem states that arithmetic sequence with first term and common difference relatively prime, contains infinitely many prime numbers.  Assume that we only want infinitely many numbers in such an arithmetic sequence such that every two of them are relatively prime - is it possible to prove it in an elementary way?

I can't crack this one.      Prove: If $\gcd(a,b,c)=1$ then there exists $z$ such that $\gcd(az+b,c) = 1$ (the only constraint is that  $a,b,c,z \in \mathbb{Z}$ and $c\neq 0)$


Which is correct: "everyone's life" or "everyone's lives"?  I know that  (as in the sentence "Everyone was there"). But this by itself doesn't seem to show that the possessive form "everyone's" always acts like a singular possessive noun.  An example of the reverse situation: , but the possessive form their can be followed by a singular noun. So the verb agreement that a pronoun takes isn't always the same as the grammatical number of a noun after the possessive forms of the pronoun.

An example would be "It flew over everyone's heads", or "It flew over everyone's head".  What would be correct in this case and why?


So I got confused about the usage of whether and if  1.        I was wondering if you could tell me   I was wondering whether you could tell me      2.        I wondered whether you could tell me   I wondered if you could tell me      Which ones of those can I say, and which ones are incorrect? Can I use the first block as well as the second? Is there a difference between them except for the time form?       I'd appreciate any kind of feedback

I am asking here specifically about if and whether  when they introduce embedded questions (or to be more technically accurate, subordinate interrogative clauses):  I don't know if Bob's here. I don't know whether Bob's here.  In the sentence above we can freely replace if with whether. There are some situations in which the reverse does not apply. We cannot always replace whether with if. For example in standard English, we cannot normally use if after a preposition:  The question of whether he is actually eligible didn't arise. *The question of if he is actually eligible didn't arise.  We cannot usually use interrogative-if directly followed by or not:  It's unclear whether or not he's a real elephant. *It's unclear if or not he's a real elephant.  There are several more examples. However, what I want to know is:  Are there any examples where we can use interrogative-if but we can't use whether?   Edit note: There is an if that we find in conditionals that can't be replaced by whether. However, this is conditional, not interrogative, if.


Can I use a 14v 2A dc adapter on 12v 1A  dc rated device? Now what i did is by a buck controller i set the voltage to 12v but there is no variables to control the current in that buck control module. So i don't know how to control 2A current to 1A,because the device that i want to connect is rated as 12V 1A (As it's input).I'm afraid about that the current cause any damage to the device

Power supplies are available in a wide range of voltage and current ratings.  If I have a device that has specific voltage and current ratings, how do those relate to the power ratings I need to specify?  What if I don't know the device's specs, but am replacing a previous power supply with particular ratings?  Is it OK to go lower voltage, or should it always be higher?  What about current?  I don't want a 10 A supply to damage my 1 A device.


I have a figure with two subfigures, each with its own caption. When I refer to the figure the numbering is correct, but when I refer to a subfigure the figure number is one more than it should be. If I change the document class to article the error does not appear. How to fix the numbering when referencing under KOMA script?  MWE:  \documentclass{scrartcl}  \usepackage[hyphens]{url} \usepackage{graphicx} \usepackage{subcaption}  \begin{document}  \begin{figure}   \caption{Two photos} \label{fig:photos}         \centering   \begin{subfigure}[t]{0.45\textwidth}       \caption{People on a square}       \label{fig:square}           \includegraphics[width=\textwidth]{images/square.jpg}                 {\footnotesize By Lina Kivaka and available at                     \url{https://www.pexels.com/photo/people-walking-near-white-building-3989821/}                 \par}   \end{subfigure}   \quad   \begin{subfigure}[t]{0.45\textwidth}       \caption{Cabin over a lake}       \label{fig:cabin}                 \includegraphics[width=\textwidth]{images/cabin.jpg}                 {\footnotesize By Lucas Craig and available at                     \url{https://www.pexels.com/photo/cabin-on-green-grass-field-near-lake-under-white-clouds-3689772/}                 \par}   \end{subfigure} \end{figure}  When I refer to panel~\subref{fig:square} of Figure~\ref{fig:photos} it is displayed as Figure~\ref{fig:square}. Similarly panel~\subref{fig:cabin} is displayed as Figure~\ref{fig:cabin}.  \end{document}

When using the scrbook document class in combination with the subcaption  package, the numbering of subfigures seems broken. Consider:  \documentclass{scrbook} \usepackage{xcolor} \usepackage{caption} \usepackage{subcaption} \captionsetup{%   format=hang,%   font=small,%   labelfont={sf,bf},%   aboveskip=0.2\normalbaselineskip,%   position=top } \pagestyle{empty}  \begin{document} \begin{figure}   \caption{Black}   \label{fig1}   \centering \rule{2cm}{2cm} \end{figure}  \begin{figure}   \caption{More figures}   \label{fig2}   \centering   \begin{subfigure}{.3\textwidth}     \centering     \caption{Blue}     \label{fig2a}     \color{red}\rule{2cm}{2cm}   \end{subfigure}   \begin{subfigure}{.3\textwidth}     \centering     \caption{Green}     \label{fig2b}     \color{green}\rule{2cm}{2cm}   \end{subfigure}   \begin{subfigure}{.3\textwidth}     \centering     \caption{Blue}     \label{fig2c}     \color{blue}\rule{2cm}{2cm}   \end{subfigure} \end{figure}  Figure \ref{fig1} shows a black box. Figure \ref{fig2} shows colored boxes, where Figure \ref{fig2a} shows a red box, Figure \ref{fig2b} shows a green box, and Figure \ref{fig2c} shows a blue box. \end{document}   This results in the following display:    Clearly, the figure numbering in the text references is off by one for the subfigures. Instead, if I change the document class to article, it looks fine:     Why does this happen, and how can I prevent it?


I would like to pass multiple arguments to the Tor browser (firefox) programatically through a function arbitrarily entitled tor. This is so as to command tor search terms and voila! My search terms. When using these three variations,  ~/tor-browser_en-US/Browser/start-tor-browser -search "$(echo $@)"  eval "~/tor-browser_en-US/Browser/start-tor-browser -search \"$@\""  ~/tor-browser_en-US/Browser/start-tor-browser -search "$@"   only the first two lines seem to perform identically. They result in a single Tor browser window searching for terms of arbitrary textual content. However, the third line results in one new search window per word.  Why this behavior?  Let me clarify. I am not searching for workarounds but rather am just interested in an explanation regarding the bahviour.

Consider the following code:  foo () {     echo $* }  bar () {     echo $@ }  foo 1 2 3 4 bar 1 2 3 4   It outputs:     1 2 3 4       1 2 3 4   I am using Ksh88, but I am interested in other common shells as well. If you happen to know any particularity for specific shells, please do mention them.  I found the follwing in the Ksh man page on Solaris:     The meaning of $* and  $@  is   identical  when  not  quoted  or  when  used  as a parameter   assignment value or as a file name. However, when used as  a   command argument, $* is equivalent to ``$1d$2d...'', where d   is the first character of the IFS variable,  whereas  $@  is   equivalent  to  $1 $2 ....   I tried modifying the IFS variable, but it doesn't modify the output. Maybe I'm doing something wrong?


I stupidly ran sudo chown -R carlos:carlos / and carlos is my user. This changed all files to be Carlos and I could not boot up again (because the root files were now owned by #1000) and I cant get sudo acess in live cd (because the owner of /usr was changed to my user). Can anyone help me? FYI I have mounted my hard drive.

I needed to edit a .config file (which I know for a fact is not creating these problems, just to clear that up) and it wouldn't let me save it, so I took ownership of /etc and all contents with the command chown -hR username /etc and that let me edit the .config file but now whenever I try to install any packages or use any sudo commands, it doesn't work  (I've checked for errors in the sudo file in sudoers.d and there was nothing wrong with that).   So how do I return it to the previous owner?


<?php class A{     static $var;      function test(){       var_dump(self::$var);     } }  class B extends A{     static $var = 'something'; }  $b = new B(); $b->test(); ?>   why does this print out null and how do I fix this? It works if I do not set $var as static but i need it to be accesible without creating an instance.

In PHP, if a static attribute is defined in the parent class, it cannot be overridden in a child class. But I'm wondering if there's any way around this.   I'm trying to write a wrapper for someone else's (somewhat clunky) function. The function in question can be applied to lots of different data types but requires different flags and options for each. But 99% of the time, a default for each type would suffice.  It would be nice if this could be done with inheritance, without having to write new functions each time. For example:  class Foo {     public static $default = 'DEFAULT';      public static function doSomething ($param = FALSE ) {         $param = ($param === FALSE) ? self::$default : $param;         return $param;     } }  class Bar extends Foo {     public static $default = 'NEW DEFAULT FOR CHILD CLASS'; }  echo Foo::doSomething() . "\n";  // echoes 'DEFAULT'  echo Bar::doSomething() . "\n";  // echoes 'DEFAULT' not 'NEW DEFAULT FOR CHILD CLASS'  // because it references $default in the parent class :(


What is the smallest prime factor of 712! + 1? What equations do I need to use? Is there a good resource to practice finding the prime factors of a factorial? Thanks

Let $n = 712! + 1$ If $n$ was a prime number then, by Wilson's theorem:  $ (712!)! \equiv -1 \pmod{712}$  The double factorial makes it seriously more difficult...  But We can require:  $$712!! + 1 \equiv 0 \pmod{712}$$  $$712 = 2\cdot 356$$   Hence: $712!! = 2^{356} 356!$  Lets compute: $356! \pmod{712}$. Obviously:  $$356! = (356 \cdot 2) \cdot (355!/2)  = 712 \cdot 355!/2$$  Then: $356! \pmod{712} \equiv 0$.   Now, $2^{356} \pmod{712}$  $2^{356} = 2^{6 + 350}$  Nevermind, what should I do?


It is acceptable that he does not have memories of the founding titan but technically each titan shifter inherits the memories of the previous generations that inherited the same titan. Why does Eren not have Grisha's and Eren Kruger's memories? One answer on reddit seemed to be explaining this with the help of the dominating effects of the coordinate. As Armin is soon to get his titan powers in the anime, will he atleast get the memories and finally solve the mysteries for the people inside the wall?  As you may have noticed I have already catched on to a few things ahead but still would appreciate if there are no major spoilers in the answers to the anime.  EDIT: Please don't mindlessly flag as duplicate, atleast read both the questions and the answers given for the question for which you are flagging this as duplicate

If someone from the royal family was to inherit the Founding Titan, then the predecessors' and future successors' memories would transfer to him/her as well.   But,     Eren's father steals the Founding Titan and then passes it down to Eren.   So, are the memories gone? Or will they come back if a true member of the royal family      retrieves the Founding Titan back?


This question was part of my number theory assignment which could not be discussed due to pandemic. Question: Let $p_k$ be the $k$th prime number. Show that there are infinitely many $k$'s such that $p_{k+1}-p_{k}>2.$ Assuming that there are only finitely many such $k$'s, for all other $p_{k}$'s I would have $p_{k+1}-p_{k}\leq2,$ but for such infinitely many primes to exist twin prime conjecture need to be assumed. So, I think it cant be proved by contradiction. So, can anyone please tell how to approach this particular problem?

I was thinking of how to prove this -  Let $p_{k}$ be the $k$th prime.Then to show that there exists infinite number of $k$ such that $p_{k+1}-p_{k} > 2$.  I was thinking of Twin Prime Conjecture stating that there are an infinite number of primes differing by 2, but how can it help with infinite number consecutive primes differing greater than 2?  I was thinking of going through the method of contradiction but could not proceed


I am trying to do a batch find and replace operating in PDF files. Goal is to search for SKUs in a supplier's catalog and replace it with our sales price. Result does not have to look nice, as long as it works 95% of the time.  For instance looking for PRODUCT9522 and replacing it with PRODUCT9522 - 95.20E.  I tried several options, like uncompressing the PDF with pdftk and then searching and replacing with sed, but that did not work. Some GUI tools did work to some extent, but not exactly like I wanted them to.  I would really appreciate your expertise on this matter.  I would like to do this on a Mac using OS X

I need to "find and replace" text in a PDF file on OS X Yosemite.  It would be better if there was a "replace all" feature. How can I do this on OS X?


I am reading about computer components to collect for a gaming computer. So far I am thinking of:    , and    My question is about memory and CPU. It says in Intel's specifications that the processor I am thinking of can run DDR4 memory at max 2400 Mhz freq bus. ASUS Z170 PRO motherboard can operate at much higher frequency bus, much over 3000 MHz. What does it mean? Do I need to be strict and buy memory with 2400 Mhz or will I benefit anything if I buy memory kit with more than 2400 MHz ?  Thanks

Looking at the  CPU, under Memory types it says "DDR3-1333/1600". My question is, in what way does the CPU limit the RAM speed? What would happen if I put in a DDR3-2133 RAM chip together with the CPU, if the motherboard supports the faster RAM speed? Would it be better to get a RAM chip that is DDR3-1600 so it matches the CPU's listed frequency?


I have data in separate columns which I wish to match up. An example:  UL Application: Outdoor Volts: 120-277  Watts: 14    UL Application: Post    Volts: 120-277  Watts: 14    UL Application: Outdoor Volts: 120-277  Watts: 24    UL Application: Outdoor Volts: 120-277  Watts: 24     Photocell: No Photocell Safety Listing: cETLus - Wet    Volts: 120-277  Watts: 11 Photocell: No Photocell Safety Listing: cETLus - Wet    Volts: 120-277  Watts: 20 Photocell: No Photocell Safety Listing: cETLus - Wet    Volts: 120-277  Watts: 38 Photocell: No Photocell Safety Listing: cETLus - Wet    Volts: 120-277  Watts: 32 Photocell: No Photocell Safety Listing: cETLus - Wet    Volts: 120-277  Watts: 20 Safety Listing: cETLus - Wet    UL Application: Outdoor Watts: 20    Photocell: No Photocell Safety Listing: cETLus - Wet    Volts: 120-277  Watts: 30 Safety Listing: cETLus - Wet    UL Application: Outdoor Volts: 120  Watts: 30 UL Application: Outdoor Volts: 120-277  Watts: 14    UL Application: Outdoor Volts: 120-277  Watts: 14    UL Application: Outdoor Volts: 120-277  Watts: 24    UL Application: Outdoor Volts: 120-277  Watts: 24      I want to have all the cells with "Watts:" in their value line up in the same column, all matching "Volts:" align etc.    Is there a way to do this within Notepad++?

Anyone know of a way to reformat either the whole txt file or the selection (I don't really care, either is fine) so that it would would add spaces to align text as columns?  example:  Green 5 Vest Black 6.93 Scarf Red 35.6 Hat   so that it ends up like:  Green 5    Vest Black 6.93 Scarf Red   35.6 Hat   or something similar... I mean the important thing is that they are arranged in an easy-to-read fashion.


I think the title says it all. On some support boards and forums it is considered poor form because it causes activity that bothers some. Especially to those that monitors that site's "newest changes" page.   The behavior is called "" (or "graveyard bumping") and there are even  about it.  If different policies applies to different SE sites, please link to them in your answer.

I always wonder if I read questions and nobody ever focused on one special point - I constantly think if it is worth the time to answer them.   They usually do not get any upvotes no matter how good the answer is and so remain in the mostly unread lower part of the page.   So should we consider a question as a knowledge base for a topic, or just a way to answer one single person?


Here are two ways I can optimise mapping of a text field with several other attributes to question and answer. First approach is, creating a map table with both question_id and answer_id in which either of them will be null, and while querying I will query using column. In the second approach is normal like we would do normalisation.    Second approach will add one more table but in first approach there will be empty values against question_id and answer_id. Questions-   Is it a good practice to leave cells blank? Will it have any performance issue? Will it violate any normalisation rule? ...

I remember reading this one article about database design and I also remember it said you should have field properties of NOT NULL.  I don't remember why this was the case though.  All I can seem to think of is that, as an application developer, you wouldn't have to test for NULL and a possible nonexistent data value (for instance, an empty string for strings).  But what do you do in the case of dates, datetime, and time (SQL Server 2008)?  You'd have to use some historic or bottomed-out date.  Any ideas on this?


I have a windows forms app with a toolstrip that contains buttons. Frustratingly, I have to click twice on any button to get it to fire when the form isn't focused. The first click seems to activate the form, and then second click clicks the button (alternatively, I can click anywhere on the form and then click the button once). How can I fix this so that, even when the form is not activated, I can click directly on a button?  EDIT: I feel like this should be feasible, since it works in programs like SQL Server Profiler and Visual Studio (not that these use WinForms, but it would suggest that it's not an OS issue).

I have a .NET 2.0 WinForms application with a ToolStrip on my main form. Sometimes, the ToolStrip icons don't respond to the first mouse click, so I have to click the icon twice. It's just a standard ToolStrip with several icons and tooltip texts, I don't do anything special. Is this common?


I stumbled upon the fact that I had about 8 different versions (I started uninstalling them) of Windows Visual C++ Redistributable installed.  I wonder, can I remove all except the latest one? Why isn't Windows itself taking care of this? I work a lot with Python. Is there a specific reason I'd need an older version?  Thanks! Ronny

I am using Windows 10. I am trying to install 1 open source software.  In the readme.txt of that software, it says it requires Visual C++ 2008 Redistributable. I found that my Windows already has Visual Studio 2012 Redistributable installed.  After I install the open source software, it seems that it is working, even though I haven't installed Visual C++ 2008 Redistributable.  Do I need to install Visual C++ 2008 Redistributable if my Windows already has Visual Studio 2012 Redistributable?


I read that reads and writes are atomic for reference variables and for most primitive variables (all types except long and double). So my question is: Is there a situation where it makes sense to declare a volatile int i; or a volatile Object o;?  This is not a duplicate because my question is whether it's senseless for some types, and if not, why? I know that there are cases where you need it / where it makes sense (for double and long) and I can't find an explanation in the other thread where the difference is between volitile int i and int i (reads and writes are atomic in both cases).  I am rather looking for an expanation why it wont work without the volatile keyword, not for cases where I should use it.

At work today, I came across the volatile keyword in Java. Not being very familiar with it, I found . Given the detail in which that article explains the keyword in question, do you ever use it or could you ever see a case in which you could use this keyword in the correct manner?


November, 2017: Google Calendar offered me a new look.  I tried it and would like to revert to the previous version.  I checked the help pages and read that I should click on the little gear icon and then would see "Back to classic Calendar."  But I don't have a little gear icon, and when I go to Calendar Settings, I don't see a way to return to classic calendar.

Google just reverted me to the new calendar. When I click on the gear, I don't have the "classic" option anymore. I hate the new format. Anyone have any ideas.


Confused as to why this:  sudo ps aux | grep -E '\/erts-[1-9]\d*(\.\d+)+\/bin\/beam'  Does not return a match for the beam.smp process of the form:   /opt/api_presence/erts-8.3/bin/beam.smp  All regex testers/validators confirm this returns the expected output given what was put in. At the very least you can test with /bin/beam.   In the comments, user muru has identified my issue.

In , it seems that [[:digit:]] = [0-9] = \d.    What are the circumstances where they do not equal? What is the difference?  After some research, I think one difference is that bracket expression [:expr:] is locale dependent.


In Windows (and probably in other operating systems), if a process has a TCP connection with another process on another machine, and then I terminate the process, an RST packet will be sent to the other machine to indicate the end of the connection.  Now imagine that when the process is terminated, there were still some data left in the send buffer. What will happen in this case, will these remaining data be sent to the other machine followed by an RST packet, or will these remaining data be ignored and only an RST packet is sent?


Concepts like induction... are these metalogical concepts? Axioms? Within-logic?  For example proving the  often resorts to principles of induction but I don't see where this "fits" within a system of logic. Like the whole idea of case $P(0)$ being true and case $P(k) \to P(k+1)$ being true implies $P(n)$ is true for all $n$... says who? I'm not saying I am disagreeing with induction, I'm just curious how we "know" it's true and where it actually fits in with our rigorously-defined systems of logic.  Is induction something you can "derive" from the rules of logic or is it something we assume is true on a metalogical level? Where does it fit exactly?

In fact I don't understand the meaning of the word "metamathematics". I just want to know, for example, why can we use mathematical induction in the proof of logical theorems, like The Deduction Theorem, or even some more fundamental proposition like "every formula has equal numbers of left and right brackets"?  What exactly can we use when talking about metamathematics? If induction is OK, then how about axiom of choice/determincacy? Can I use axiom of choice on collection of sets of formulas?(Of course it may be meaningless. By the way I don't understand why we can talk about a "set" of formulas either)  I have asked one of my classmates about these, and he told me he had stopped thinking about this kind of stuff. I feel like giving up too......


How to hook a curve to "n" cubes using python, if the center of the cubes are same location with the curve points? I am able to create the curve in the center of the cubes but I can't hook the through python. With the Cube1, Cube2, Cube3 the spline curve selected and in edit mode what do I need to assign the hooks. I would like the code to be for "n" cubes. The solution has to be for "n" cubes.

I've been trying to generalize the solution to this question: , so that it can work on an arbitrarily long bezier curve, but I can't seem to get the hook_assign() function to work right. (See also )  When I print the state of .select_control_point for each point on the curve before (or after) I call the hook_assign function, the console output looks right except the function still returns Warning: Requires selected vertices or active vertex group.   Below the code is some sample console feedback.  noodcurv = bpy.data.curves.new('noodcurve', type='CURVE')       #create a new curve noodcurv.dimensions = '3D'                                      #set some settings noodcurv.resolution_u = 2 noodcurv.bevel_object = bevob noodcurv.use_fill_caps = True  bez = noodcurv.splines.new('BEZIER')                            #create a new spline bez.bezier_points.add(len(coords)-1)                            #add points for k, coord in enumerate(coords):                              #set coordinates & handles     p = bez.bezier_points[k]     p.co = coord     p.handle_right_type = 'VECTOR'                              #or 'AUTOMATIC', 'ALIGNED', 'FREE_ALIGN'     p.handle_left_type = 'VECTOR'  noodcurvobj = bpy.data.objects.new('noodcurve', noodcurv)       #create object modnames = ['hook.'+str(k).zfill(3) for k in range(len(coords))] #create modifier names  for k, coord in enumerate(coords):                              #create modifiers & set Parent Object     noodcurvobj.modifiers.new(modnames[k], type='HOOK')              noodcurvobj.modifiers[modnames[k]].object = bpy.context.scene.objects['link'+modnames[k][4:]]  scn = bpy.context.scene                                         #scene variable scn.objects.link(noodcurvobj)                                   #link to scene & activate scn.objects.active = noodcurvobj  bez.bezier_points[0].select_control_point = True                #this fixes the warning!?  bpy.ops.object.mode_set(mode='EDIT')                            #change context for k, coord in enumerate(coords):                              #assign points to modifiers     p = bez.bezier_points[k]                                    #assign points to variables     p.select_control_point = True     for q,t in enumerate(bez.bezier_points):                    #debugging check         print('control point: ', q, ' is', t.select_control_point)     bpy.ops.object.hook_assign(modifier=modnames[k])            #assign vextex to modifier     p.select_control_point = False  bpy.ops.object.mode_set(mode='OBJECT')   Some of the console output:  control point:  0  is True control point:  1  is False control point:  2  is False control point:  3  is False control point:  4  is False Warning: Requires selected vertices or active vertex group  control point:  0  is False control point:  1  is True control point:  2  is False control point:  3  is False control point:  4  is False Warning: Requires selected vertices or active vertex group  control point:  0  is False control point:  1  is False control point:  2  is True control point:  3  is False control point:  4  is False Warning: Requires selected vertices or active vertex group ...   (I know it'd be better if I could use one loop instead of three, but as I ran into problems I kept rearranging stuff to more closely mimic the original answer, and at this point I'm out of ideas!)  I also noticed that if I set .select_control_point = True for one or more points before I enter the third loop, the warnings go away and the modifiers are all assigned to whatever control point(s) I selected before the loop (even though the console output will indicate I'm still stepping through the selected points correctly).  So what am I missing?


ADDED. There was the question  referring to the links to recent questions only that is apparently only visible to moderators or people with high number of points. This does not help me to find my own questions.  I wrote an answer a while ago that I had subsequently deleted, after it attracted disappointingly high number of downvotes that I didn't find rewarding at that time.  Are the deleted answers still kept in the system?  Is there any way to retrieve them?

I would really like to see all of my questions and answers on the profile page, even if some of them were deleted, and I don't have enough rep to see them on the site. (Note that some questions are  after 30 days or 1 year, and the author might be oblivious about what happened.)   , the "deleted recent [questions/answers]" links in one's own user profile now list all respective posts that were deleted in the past 60 days, rather than just those that were originally posted in the last 60 days. , users with the "access to moderator tools" privilege (10k+ on designed sites, 2k+ on beta and non-designed sites) can use the search operator deleted:1 to see all their own deleted posts. , deleted questions and answers that were posted in the past 60 days, can be seen using the "deleted recent questions" and "deleted recent answers" links on the questions and answers tabs (at the bottom of the tab) in your user profile. For older posts: as of 2013-04-23 you can  if you already have a link to them, but they still aren't linked from the user profiles (not even just for you). Nor do you see inbox notifications for comments on them if you come back a few hours later. You have to have thought to bookmark your question, or you have to go digging for it in your browser history.


I would like to visit my cousin and his family in Denmark. I applied for a visa and was refused. I submitted all the required document except that I didn't submit an letter of approved leave.   Is it necessary to submit a letter?

Schengen refusal formulae can be difficult to understand sometimes.  Sometimes an applicant receives a refusal with:       Justification for the purpose and conditions of the intended stay was not reliable.     often accompanied by:       Your intention to leave the territory of the Member States before the expiry of the visa applied for could not be ascertained.   What is meant by this refusal reason?  What are they trying to say?


During my daily check of SO, i came across  question,   So naturally i flagged it as low quality since such questions are impossible to answer. But for some reason the moderator reviewing the flag declined it.   The question at hand here, when is a question worthy of flagging for a moderator's attention, should we simply ignore such questions in the future? If not then what would be the appropriate way to deal with the situation?

I flagged a question, , as "low quality" but a moderator declined it. I thought that the post was a low quality one and would like to know why the moderator did not.  Hopefully shedding light on this matter will avail me of the knowledge to be a better flagger in future.  My logic was that mysql-fetch-row is not supposed to return an array of results. If it does than its name would be mysql-fetch-rows.  What's your take on the situation?


public class Autoboxing { public static void main(String[] args) {    int x=10;     Integer oldValue=x;     change(oldValue);     System.out.println("value:"+oldValue); } static void change(Integer value){     value=100; }   }  Hi, I am trying to autobox a int value into Integer type. Then pass the Integer object to a method to change the number . But the number doesnt change. it still prints out 10?  Could some one spot my error. Thanks in advance.

I always thought Java uses pass-by-reference. However, I've seen a couple of blog posts (for example, ) that claim that it isn't (the blog post says that Java uses pass-by-value). I don't think I understand the distinction they're making. What is the explanation?


Need to switch from Ubuntu 14.04 to Windows 7 on my laptop.  Help please. I need it ASAP for work. I got the ISO for Windows 7 but don't know how to get rid of Ubuntu.

I have absolutely no experience with Linux, and I desperately need to get my computer back up and running again with Windows.  How do I remove Ubuntu and reinstall Windows?    Editor's note: many of the answers are about removing Ubuntu from dual-boot but keeping Windows (which is a bit complicated), while other answers are about removing Ubuntu from single-boot (which is easy: basically just format the disk while installing Windows). The question as written is ambiguous between dual-boot or single-boot.


I have html file that is a well-formed xml document (tags are paired), but contains anchor like the one below:  link  Xml parser invoked by XDocument.Load throws XmlException that says:  Additional information: '=' is an unexpected token. The expected token is ';'.  How can I instruct parser that I '&body' is not an entity? Do I must escape '&' character?

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


I am curious why $(-1)\vec{u}=-\vec{u}$ for every vector space. Since vector spaces can be defined differently, with different scalar multiplication rules, why do we have that= $(-1)\vec{u}=-\vec{u}$ is true for all vector spaces automatically? I'm missing a subtlety here! Thanks in advance!

I need to prove that for every Vector Space this is valid: $$ -v = (-1)*v $$  -v = inverse element of addition  -1 a real number  $*$ the multiplication by real number of the Vector Space  My teacher said that $-v$ is just a notation for the inverse element of addition. I'd like to prove that $-v = (-1)*v$.  So I came up with the following solution and I'd like to know if it's correct: \begin{align} v + (-1)*v = u \\ (1)*v + (-1)*v = u \\ (1-1)*v = u \\ 0*v = u \\ o = u\\ \end{align}  Since $v + -v = o$  $v + (-1)*v = o = v + -v$ adding -v to both sides v + (-1)*v -v = v + -v + -v o + (-1)*v = o + -v (-1)*v = -v  Did I commit any mistakes? Did I make any assumptions that may not be valid for EVERY Vector Space?  Edit: As S. Sheng said I have not proved that (0)*v = o. I'll try to prove that and come back later with a proof of that. I also haven't proved that (1)*v = v Oh my... I'm starting to think this is beyond my abilities..


I have my site and everyday i look at the log files , yesterday i saw that someone try to inject this code into the admin panel, here is the code for my panel :  <html>  <body> <center> <form action="login.php" method="POST"> username <input type="text" name="name"> password <input type="text" name="pass"> <input value="submit" type="submit" name="go">  </form> </center> <?php define('DB_SERVER', 'localhost');    define('DB_USERNAME', 'root');    define('DB_PASSWORD', '*****');    define('DB_DATABASE', '******');    $db = mysqli_connect(DB_SERVER,DB_USERNAME,DB_PASSWORD,DB_DATABASE);   $user = $_POST['name']; $pass = $_POST['pass'];  if(isset($_POST['go'])) {     $sql = "select * from users where username = '$user' AND password = '$pass' ";     $result = mysqli_query($db,$sql);       $row = mysqli_fetch_array($result,MYSQLI_ASSOC);       //$active = $row['active'];       $count = mysqli_num_rows($result);        // If result matched $myusername and $mypassword, table row must be 1 row        if($count == 1) {            header("location: a22.php");        }else {         echo $error = "<center>"."Your Login Name or Password is invalid"."</center>";       }    }     ?>  </body>   </html>   and the code that someone tried to inject it is :  admin ' OR '1'='1   AND he left the password blank  so can this code make him bypass the authentication process ? even if he/she left the password blank ??  Note: the admin user is valid and have id =1 in my db ;

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?


Should I dedicate a separate part in my bibliography for my Arabic sources and thus write them in Arabic letters, or should I transliterate them and include them within the whole bibliography like any other source. I've searched the latest version of MLA (8th. ed.) and found nothing relevant. Could anybody help me, please?

Let's say I want to cite a Russian text in my own paper which is written in English. Should I:   reference it as is, in the original Cyrillic alphabet, although the readers won't be able even to pronounce it? transliterate the authors' names, while keeping the rest as is? transliterate the names and translate the title of the work, journal name, etc. into English?


My ASUS tablet runs slow. I've stopped using active desktop backgrounds, uninstalled apps that I don't use and changed the animations, but nothing seems to solve the problem. My memory is reporting at 77% full with Facebook and Twitter being two of the biggest culprits. I don't have them open all the time and only want them running when I use them. How can I prevent them from starting up? ASUS TF700T running version 4.2.1

When my phone starts up there are several application/services running in the background that I would rather not.  And when I press the Home button while using an app, that app usually goes into the background without exiting.  How can I stop these apps from running?


As best as I can recall, late 20’s man is hit by several micrometeorites, taken to the hospital, and gets told "looks like you were hit by a shotgun".  In reality, the micrometeorites were ships. Aliens set up a symbiotic relationship. Protagonist tried drinking heavily to quiet the voices. From the alien perspective, it was a yearlong party, instead of just one night. They come to an accommodation of 1 drink every now and then.  It’s possible that the aliens encourage the protagonist to engage in many one night stands, to help spread the aliens.  TL:DR  Guy gets shot by micro meteors which turn out to be alien ships. Aliens set up a symbiotic relationship, and my mental communication and hitting pain centers, help the protagonist

Don't remember the exact start to the story, but it went something like "walking along a path" or something, and when he hears what sounds like a shotgun blast behind him, he then feels something strike him in the butt. He passes out, and when he awakens, he discovers that the "shotgun blast" was actually a miniature spaceship that exploded and shot miniature aliens into his body. The aliens prove to be very beneficial because they clean up all the toxins and other poisons in his body. They can be transmitted through kissing or sexual activity.  Any help with the name of the story would be greatly appreciated.  Dan


I've read that one of the ways to sum two line-level outputs into mono is to simply ignore the right channel and connect the left channel to the mono input. In doing so, it has been said that you can (and should?) simply short the other right channel to ground. Why does this not cause interference / heating effects? Is it really safe to do this? (of course there are probably better ways but this seems like a simple "quick and easy" way)

I've read that the best way to "mix" two left and right line-level stereo jack outputs is to first connect each to a 1k resistor and then to your mono input. Why is this preferred over just shorting them directly together and then connecting them to a single input?


I'm trying to return the reverse of a string using recursion but I got a few errors. I'm new to recursion so I don't really know where to start. The errors I'm getting are:  Exception in thread "main" java.lang.NullPointerException   at java.lang.String.concat(String.java:2027)  at Recursion.reverseString(Recursion.java:30)  at Recursion.reverseString(Recursion.java:30)  at Recursion.reverseString(Recursion.java:30)  at Recursion.reverseString(Recursion.java:30)  at Recursion.reverseString(Recursion.java:30)  at Recursion.main(Recursion.java:46)   Here's my code:      public static String reverseString (String inString) {         String result = "";          if (inString.length() > 0) {              // if the string is empty              result = inString.charAt(inString.length()-1) + "";             result.concat(reverseString(inString.substring(0, inString.length()-1)));                        return result;         } else {             return null;                 }     }       // the testers            public static void main(String[] args){         String inString = "abcde";          // test the reverseString          String revString = reverseString(inString);         System.out.println(revString);     } }

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?


Problem taken from a  on mathematical induction by Gerardo Con Diaz. Although it doesn't look like anything special, I have spent a considerable amount of time trying to crack this, with no luck. Most likely, due to the late hour, I am missing something very trivial here.     Prove that for any integer $n$, the number $11^{n+1}+12^{2n-1}$ is divisible by $133$.   I have tried multiplying through by $12$ and rearranging, but like I said with meager results. I arrived at $11^{n+2}+12^{2n+1}$ which satisfies the induction hypothesis for LHS, but for the RHS I got stuck at $12 \times 133m-11^{n+1}-11^{n+3}$ or $12^2 \times 133m-12 \times11^{n+1}-11^{n+3}$ and several other combinations none of which would let me factor out $133$.


hello everyone I have a little problem, how do I bring up the menu in the circle? when I select another object the menu becomes non-existent

The tutorial I read is based on 2.79. So I'm not sure if it's still the same name in 2.8. But I can't find anything providing similar functionalities.


The drag force on a spherical body according to  is given by  $$F = 6π\mu rv$$ Where $\mu$ is the dynamic viscosity of the fluid, $r$ is the radius of the spherical object, and $v$ is its velocity.  At low speeds, the drag force is directly proportional to the speed of the object. While at high speeds, the  is proportional to the square of the speed of the spherical object:  $$F = \frac{1}{2}\rho v^2C_dA$$  Why does this happen?

A falling object with no initial velocity with mass $m$ is influenced by a gravitational force $g$ and the  (air resistance) which is proportional to the object's speed. By Newton´s laws this can be written as:   $mg-kv=ma$ (for low speeds)  $mg-kv^2=ma$ (for high speeds).    I assume that $k$ is a positive constant that depends on the geometry of the object and the viscosity. But how can one explain that the air resistance is proportional to the velocity? And to the velocity squared in the second equation?


I just bought new 128GB SSD and I want to install ubuntu on it. Is it possible to instal ubuntu on plain disk with no OS ? I used rufus to put ISO picture to my flash drive.

I would like to see a full how-to guide on how to install Ubuntu.


This is not an advertising, I've just found this website (MochaHost) that offers a great things just for 3$/m like :   2 LifeTime FREE Domains UNLIMITED Space and bandwidth SVN (subversion) support SSH access PHP 5, Perl, Python, and Rails   I need to know if any of you had taken from them a hosting plans, what do you think about it?

This is a "catch-all" question designed to serve as an answer for all questions about choosing web hosting.  Pro Webmasters no longer accepts new questions about how to choose hosting.  All future questions pertaining to finding web hosting should be closed as a duplicate of this question. For more information about this policy please see .    How to find web hosting that meets my requirements?  What we're looking for in answers to this question are the basics about web hosting:   What is web hosting? What is the difference between shared, VPS, and dedicated hosting? How does a content delivery network relate to web hosting? Anything else you feel is helpful in finding a web host.   What we do not want is:   Endorsements or recommendations for specific web hosts We do not want your experience or other subjective information (just the facts please)


I am trying to understand why the following bit of code has a SQL Inhection vulnerability and how I can fix it. Thanks! <?php include_once "lib/db.php"; include "lib/sql_form.php"; if(!$_GET['id']) $_GET['id'] = str_replace("/", "", $_SERVER['PATH_INFO']); $query = "SELECT * FROM listings WHERE id = ".$_GET['id']; $result = mysql_query($query); $line = mysql_fetch_array($result, MYSQL_ASSOC); if($line['status'] == "DELETED"){ print("This file is deleted."); exit;} $_POST['form_id'] = $line['form_id']; $_POST['fields'] = split(",", $line['fields']); excel_report_results(); ?>

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


i'm using simple statement for this and one resultset object also, but When i trying to populate the values to jcombobox it raises nullpointerException even though i checked for !=null also...WHAT is the reason can any one tell me..   public void myInit() {     try     {       //register driver       Class.forName("oracle.jdbc.driver.OracleDriver");       //establish the connection       con1 = DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:orcl","scott","virat");       if(con1!=null)       {       //create statement        st = con1.createStatement();       }       if(st!=null)       {       //execute login to get values to combobox       rs1 = st.executeQuery("select empid from employee");       }       if(rs1!=null)       {       while(rs1.next())       {           comboBox.addItem(rs1.getString(1));       }       }     }     catch(ClassNotFoundException cnf)     {         JOptionPane.showMessageDialog(null, cnf);     }     catch(SQLException se)     {         JOptionPane.showMessageDialog(null, se);                 }  }


$$ \sum_{k=1}^{2n} { 2n \choose k } { 2n \choose 2n-k } = \binom{4n}{2n} - 1$$  This equation have nice methods?  Thank you everyone,   This problem is from this

I was hoping to find a more "mathematical" proof, instead of proving logically $\displaystyle \sum_{k = 0}^n {n \choose k}^2= {2n \choose n}$.  I already know the logical Proof:  $${n \choose k}^2 = {n \choose k}{ n \choose n-k}$$  Hence summation can be expressed as:  $$\binom{n}{0}\binom{n}{n} + \binom{n}{1}\binom{n}{n-1} + \cdots + \binom{n}{n}\binom{n}{0}$$  One can think of it as choosing $n$ people from a group of $2n$  (imagine dividing a group of $2n$ into $2$ groups of $n$ people each. I can get $k$ people from group $1$ and another $n-k$ people from group $2$. We do this from $k = 0$ to $n$.


Based on observation after reading few books and papers, I think that   Lemma : Lemma contains some information that is commonly used to support a theorem. So, a Lemma introduces a Theorem and comes before that Theorem. The information contained in the Lemma is generally used in the proof of the Theorem.   Q1: What is a Proposition ?   Q2: What is the difference between Proposition and Theorem ? A Proposition can also be proved, in the same way as a Theorem is proven.  Hypothesis :  A hypothesis is like a statement for a guess, and we need to prove that analytically or experimentally.   Q3: What is the difference between Theorem and Hypothesis, for example Null hypothesis in statistics? In general, if a  Theorem is always proven to be true then it no longer becomes a Hypothesis? Am I correct?   Q4: What is the difference between Postulate and Theorem?  Q5 : What is the difference between a proposition and a definition?  Looking for easy to remember answers. Thank you for help.

Definition: Theorem, Lemma, Proposition, Corollary, Postulate, Statement, Fact, Observation, Expression, Fact, Property, Conjecture and Principle   Most of the time a mathematical statement is classified with one the words listed above.  However, I can't seem to find definitions of them all online, so I will request your aid in describe/define them.  Also, when is a mathematical statement a theorem versus a lemma ? I've read that a theorem is important while a lemma is not so important and used to prove a theorem. However a theorem is sometimes used to prove some other theorem. This implies that some theorems are also lemmas ?  Is it subjective with respect to the author, which statements become a theorem, lemma, etc. ?


I am trying to code a path finding function in c++ . It should work like that, you supply the start point (x1,y1) and the end point(x2,y2) and it returns a list of points for the shortest path.    Assume that i want to go from the red tile to the blue one, however the grey tiles can not be walked on (like walls) .

I posted this question on stack overflow first, but I guess no one is very interested in video games there...  What are some path finding algorithms used in games of all types? (Of all types where characters move, anyway) Is Dijkstra's used a whole lot? I would think not, as it doesn't actually trace out the steps to take to get somewhere, right? If I'm understanding it right, it only determines which object is the closest. I'm not really looking to code anything; just doing some research, though if you paste pseudocode or something, that would be fine (I can understand Java and C++). I'm basically looking for a quick overview of path finding in general.  I know A* is like THE algorithm to use in 2D games. That's great and all, but what about 2D games that are not grid-based? Things like Age of Empires, or Link's Awakening. There aren't distinct square spaces to navigate to, so what do they do?  What do 3D games do? I've read this thingy , which I hear is a great authority on the subject, but it doesn't really explain HOW, once the meshes are set, the path finding is done. IF A* is what they use, then how is something like that done in a 3D environment? And how exactly do the splines work for rounding corners?


I set up google authenticator for ssh login, and it works fine.  However, when restart the computer and login form the physical machine, it requires the google autheticator code also - is it possible to change it so this is ONLY for ssh?

I use Ubuntu 16.04 and seek to harden my SSH authentication in a special manner.  The current situation:  I have a machine with a minimal Ubuntu server I use mainly to transfer files to via its local OpenSSH server. Now, I don't have a firewall on that machine from a few reasons and I also avoid using a key pair hence I use only a password. One of the only ways I have left to defend from brute force attacks, and the one I most desire at the moment, is using a mechanism that blocks a user for X amount of hours, after Y amount of connection tries.  The desired situation:  I wish to have a standalone mechanism (that is, not as part of a firewall) that blocks a user for X amount of hours, after Y amount of connection tries as a way to defend from brute force attacks.  My Question:  Do you know a utility (and specific configuration) that will let me achieve the desired situation?


While trying to append values to a nested list through a for loop,  I came across an issue that the appending values to the list depends on the way the list is initialized.Suppose, I initialize a nested array as:     a=[[[],[],[],[]],[[],[],[],[],[]]]     a[0][1].append(2)  results in     [[[], [2], [], []], [[], [], [], [], []]]  but initializing and appending data in the following manner     a= [[[]]*4]*2     a[0][1].append(2)  results in     [[[2], [2], [2], [2]], [[2], [2], [2], [2]]]  What is the difference between the two as both of them initialize the same type of list?

I needed to create a list of lists in Python, so I typed the following: my_list = [[1] * 4] * 3  The list looked like this: [[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]]    Then I changed one of the innermost values: my_list[0][0] = 5  Now my list looks like this: [[5, 1, 1, 1], [5, 1, 1, 1], [5, 1, 1, 1]]    which is not what I wanted or expected. Can someone please explain what's going on, and how to get around it?


I have spent the better part of two days trying to figure out why my ubuntu linux system (two different systems, actually) are suddenly failing to find .cls and .sty files from my texlive distribution.  I had originally used the ubuntu texlive, and that's where it started showing up.  So, I did a purge of all my texlive packages and installed the 2020 texlive from the TUG installation script as explained .  But I still have the same problem.  Here's what I've done so far:  when logged in as the texlive user, all seems fine.  In particular,  $  kpsewhich article.cls /usr/local/texlive/2020/texmf-dist/tex/latex/base/article.cls  But when I run it as my normal user name, I get nothing and an exit code of 1.  When logged in as either me or texlive, I get the following for the TEXMF variable:  $ kpsewhich --expand-var='$TEXMF' {{}/home/ded/.texlive2020/texmf-config,/home/ded/.texlive2020/texmf-var,/home/ded/texmf,!!/usr/local/texlive/texmf-local,!!/usr/local/texlive/2020/texmf-config,!!/usr/local/texlive/2020/texmf-var,!!/usr/local/texlive/2020/texmf-dist}  which looks right in both cases.  I have checked file permissions, and all the texlive files have "other" read permission.  Just to make sure, I can do this when logged in as me:  $ cat $(find /usr/local/texlive/2020/texmf-dist -name article.cls | head -n 1)  and I get the contents of artlicle.cls dumped to my screen.  I have a ~/texmf directory, and it all looks kosher.  I have no ~/.texlive2020 directory.  I have run kpsewhich with various debug flags, and I can see where it searches the right directory, but still does not return the path for article.cls.  I see this line in the output:   $ kpsewhich --debug=13 --must-exist --path=/usr/local/texlive/2020/texmf-dist// article.cls 2>~/tmp/kps-out ... kdebug:dir_links(/usr/local/texlive/2020/texmf-dist/tex/latex/base) => 2 ...  but still is not seeing article.cls. I am hoping someone can suggest something else that I might try or suggest a solution.

Below is my files tree:  .../Doc/Tex/book.tex .../Doc/Tex/images/im.jpg .../Doc/TexBase/myTemplate.sty .../Doc/TexBase/baseImages/logo.jpg   On Windows it was enough to set TEXINPUTS evironment variable with some paths and then I was able to compile with:  pdflatex Tex/book.tex   my document book.tex which uses package myTemplate.sty And now im trying to do teh same on Ubuntu 18.04. When i move all things to one folder (book.tex and myTemplate.sty and folder with images) then compilation is succesfull. But i would like to keep my foder structure as it is more clearly. So i tried to export TEXINPUTS:  export TEXTINPUTS=.:./TexBase/   but my compilation fail because of unfound many sty-files wchich are part of texlive-latex-extra that i already installed. When i UNSET this variable - it compiles ok. So my question is: Am i correctly set TEXINPUTS variable? Maybe i should add some other paths? What is the path to those "latex basic STY files"?


When I run the ls command using sudo-powers the file and directory names are all in white. When I run it as user the directory names are in bluish-purple, the scripts are in green and and the Asembler program is in white. I did do a modification to from "color-prompt = YES" or something like that in some place but I don't remember configuring colour file names based on my User ID. Example  I like the coloured file types, how can I extend this to sudo?

I was playing around with aliases today and I noticed that aliases don't seem to be available whilst using sudo:  danny@kaon:~$ alias alias egrep='egrep --color=auto' alias fgrep='fgrep --color=auto' alias grep='grep --color=auto' alias l='ls -CF' alias la='ls -A' alias ll='ls -alF' alias ls='ls --color=auto'  danny@kaon:~$ ll -d / drwxr-xr-x 23 root root 4096 2011-01-06 20:29 //  danny@kaon:~$ sudo -i root@kaon:~# ll -d / drwxr-xr-x 23 root root 4096 2011-01-06 20:29 // root@kaon:~# exit logout  danny@kaon:~$ sudo ll -d / sudo: ll: command not found   Is there any reason why you cannot use aliases whilst using sudo?


I need put some hidden text between my normal text.  I do it like this:  <p>  some text <span class="hide"> hidden text </span>  some text </p>  .hide{display:none}   But I worried about bad effect on search engine. how can I hide it without bad effect?  note: I need the hidden text be readble for search engine and print for rss readers...

I've heard many times that it's bad to use display: none for SEO reasons, as it could be an attempt to push in irrelevant popular keywords. A few questions:   Is that still received wisdom? Does it make a difference if you're only hiding a single word, or perhaps a single character? If you should avoid any use of it, what are the preferred techniques for hiding (in situations where you need it to become visible again on certain conditions)?   Some references I've found so far:       If you're straight-out using CSS to hide text, don't be surprised if that is called spam. I'm not saying that mouseovers or DHTML text or have-a-logo-but-also-have-text is spam; I answered that last one at a conference when I said "imagine how it would look to a visitor, a competitor, or someone checking out a spam report. If you show your company's name and it's Expo Markers instead of an Expo Markers logo, you should be fine. If the text you decide to show is 'Expo Markers cheap online discount buy online Expo Markers sale ...' then I would be more cautious, because that can look bad."   And  on the same article     We can flag text that appears to be hidden using CSS at Google. To date we have not algorithmically removed sites for doing that. We try hard to avoid throwing babies out with bathwater.   Eric Enge      The legitimate use of this technique is so prevalent that I would rarely expect search engines to penalize a site for using the display: none attribute. It’s just very difficult to implement an algorithm that could truly ferret out whether the particular use of display: none is meant to deceive the search engines or not.


I have a question about classes, subclasses and inheritance in Python. I've been using Tkinter for GUI development for some time and have decided to learn how to use Kivy. In the Kivy documentation I came across a line of code that didn't make any sense to me. It is as follows (note, GridLayout is a class I imported from the kivy module): class LoginScreen(GridLayout):      def __init__(self, **kwargs):         super(LoginScreen, self).__init__(**kwargs)  The super call on LoginScreen and self instead of GridLayout really confuses me! Is the class inheriting itself? What is going on? In Tkinter I would write something like (note again that, tk.Frame is a class imported from the Tkinter module): class LoginScreen(tk.Frame)         def __init__(self, parent):         super().__init__(parent)  As I typed out these two examples I noticed that I am not passing anything into super(). Are the default parameters of the super method the name of the class and self? i.e. is the above akin to writing... class LoginScreen(tk.Frame):      def __init__(self, parent):         super(LoginScreen, self).__init__(parent)   If they are different can you explain why they are different, but if they are the same can you explain a little more in-depth as to how super() does what it does (beyond simply it inherits the methods and attributes of the parent class)?

I'm trying to understand the use of super(). From the looks of it, both child classes can be created, just fine.   I'm curious to know about the actual difference between the following 2 child classes.  class Base(object):     def __init__(self):         print "Base created"  class ChildA(Base):     def __init__(self):         Base.__init__(self)  class ChildB(Base):     def __init__(self):         super(ChildB, self).__init__()  ChildA()  ChildB()


By mistake I created a file named --help trying to get help about the command >  > --help   If i try to delete the file like this:  rm --help   the help about the command rm is shown.

How do you remove a file whose filename begins with a dash (hyphen or minus) -?  I'm ssh'd into a remote OSX server and I have this file in my directory:  tohru:~ $ ls -l total 8 -rw-r--r--    1 me  staff  1352 Aug 18 14:33 --help ...   How in the world can I delete --help from a CLI?  This issue is something that I come across in different forms on occasion, these files are easy to create, but hard to get rid of.  I have tried using backslash  rm \-\-help   I have tried quotes  rm "--help"   How do I prevent the minus (dash or hyphen) character to be interpreted as an option?


Can someone provide an explanation of the following command? typedef mpc_val_t*(*mpc_apply_t)(mpc_val_t*);

I have heard of some methods, but none of them have stuck. Personally I try to avoid complex types in C and try to break them into component typedef.  I'm now faced with maintaining some legacy code from a so called 'three star programmer', and I'm having a hard time reading some of the ***code[][].  How do you read complex C declarations?


I am looking for a recommendation for a somewhat powerful but more importantly user friendly CMS for .NET.   The ones I have found seem decent at best.  If you say DotNetNuke I will be tempted to reach through this screen and slap you...  Edit: I have made it community wiki. Please add 1 CMS per answer so the best may rise to the top.

This is a general, community wiki  question to address non-specific "I need a CMS or Wiki that does x, y, and z..." questions.  If your question was closed as a duplicate of this question and you feel that the information provided here does not provide a sufficient answer, please open a discussion on .    I have a list of features that I want for my website's Content Management System (CMS) - where can I find a [free] script that includes all of them?


I'm trying to create an array of integers, but am having a tough time understanding how to first instantiate and check if it's empty. I've done the following, with the array definition tweaked here and there.  Dim months_array() As Variant  If IsEmpty(months_array) Then `Returns False     MsgBox "Empty" Else     ReDim Preserve months_array(1 To size_months_array)     months_array(UBound(months_array)) = month_iter     size_months_array = size_months_array + 1 End If   Why does the If statement return false after the definition of the object? Would the best way to check if it's empty be to see if len == 0?

Passing an undimensioned array to the VB6's Ubound function will cause an error, so I want to check if it has been dimensioned yet before attempting to check its upper bound.  How do I do this?


I'm using QGIS. I want a raster layer with 6 different colors each color representing a certain value range (e.g. -1 to 0 red, 0 to 0.2 orange).  In the layer style menu I can only approximate colors.

I want to classify the slope of the DEM data, by dividing the slope by 4 classes: flat, ramps, steep, very steep.  How to do this with QGIS?


I was given a task to find out why a website suddenly had a drop in their organic ranking.  A company specializing in SEO sent my client an email about the organic ranking drop.  They had a chart showing a big drop from December 2017 to January 2018.  The client has no previous records of their organic ranking or of the SEO used and updated on the website.  How did this company find a chart to track my clients websites organic ranking?  I am trying to use google webmaster tools and semrush to look into this since I am quite new to SEO implementation.

There has been a significant drop (90%) in traffic from Google to one of my well-established sites (6+ years) in the last week. Searches show that the top 3 wide keywords all dropped 4 spots. Searches for other keywords do not show ANY results in the first 10 to 25 pages of results, while previously one 1st or 2nd page at most.  Since there are , the question really is:  What steps are necessary to figure out what caused such a drop?  There have been no major changes during this period or the last month on the site and certainly not in the homepage which has dropped in rank. Over all the years of running this site and plenty of others, I have never experienced this. There are is duplicate content on my site and I have rigorously used canonical links for the last few years to ensure it is not misinterpreted as such.


Having X~Uniform(0,1), Y~Uniform(0,1) independent what's the pdf of r = |X - Y|. If I want plot f(r=|X - Y|) against X, what should I do?  about the plot, at first I thought of doing, $r^2 = (x - y)^2$, and call $y=\rho$, but it did not work.

Let $X$ and $Y$ be independent random variables, uniformly distributed in the interval $[0,1]$. Find the CDF and the PDF of $|X - Y|$?  Attempt Let $Z = |X - Y|$, so for $z \geq 0$, the CDF $F_{Z}(z) = \mathbf{P}(Z \leq z) = \mathbf{P}(|X - Y| \leq z) = \mathbf{P}(-z \leq X - Y \leq z)$, which is where the algebra becomes confusing. Since they are independent, the joint pdf of $X$ & $Y$ is simply 1, as long as $(X,Y)$ belong to the unit square. The solution suggests a plot the event of interest as a subset of the unit square and find its area. Any hints?


Assuming I have 2 standard vectors:  vector<int> a; vector<int> b;   Let's also say the both have around 30 elements.   How do I add the vector b to the end of vector a?   The dirty way would be iterating through b and adding each element via vector<int>::push_back(), though I wouldn't like to do that!


I'd like to know, is there a Python equivalent for the case statement such as the examples available on VB.net or C#?

I want to write a function in Python that returns different fixed values based on the value of an input index.    In other languages I would use a switch or case statement, but Python does not appear to have a switch statement.  What are the recommended Python solutions in this scenario?


$$A =\begin{pmatrix}a &b \\ c & d \end{pmatrix}$$ show that:   $A$ is diagonalizable if $(a-d)^2 +4bc > 0$ $A$ is not diagonalizable if $(a-d)^2 + 4bc\leq 0$

Let $$A = \begin{pmatrix}a & b\\c & d\end{pmatrix}.$$  Show that   1) $A$ is diagonalisable if $(a - d)^2  + 4 bc > 0$  2) $A$ is not diagonalisable if $(a - d)^2 + 4 bc < 0$


vector<pair<int,int> > v; for(i=0;i<5;i++){     cin>>b>>c;     v.push_back(make_pair(b,c)); } sort(v.begin(),v.end());   Is it possible to write a comparator for the sort function such that v[i].first is sorted in increasing order and for similar values of v[i].first, v[i].second is sorted in decreasing order? like:- i/p:      13 10    44 15    13 15    13 99     6 45     o/p:      6 45    13 99    13 15    13 10    44 15

If I have a vector of pairs: std::vector<std::pair<int, int> > vec;  Is there and easy way to sort the list in increasing order based on the second element of the pair? I know I can write a little function object that will do the work, but is there a way to use existing parts of the STL and std::less to do the work directly? EDIT:  I understand that I can write a separate function or class to pass to the third argument to sort.  The question is whether or not I can build it out of standard stuff.  I'd really something that looks like: std::sort(vec.begin(), vec.end(), std::something_magic<int, int, std::less>());


I have a form with a date field.   I select a date using a jquery datepicker. The format is mm/dd/yyyy.  The date inserts into the db like 0000-00-00.  When I use die($startdate); This outputs the correct date in the correct format when uncommented.   db type: date   Code:  $startdate = date('Y-m-d', strtotime($_POST['startdate']));   //die($startdate); //<--outputs the correct date in the correct format when uncommented.    try {   $stmt = $db->prepare('INSERT INTO table (firstname,lastname,startdate) VALUES (:firstname, :lastname, :startdate)');   $stmt->execute(array(     ':firstname' => $_POST['firstname'],     ':lastname' => $_POST['lastname'],     ':startdate' => $_POST['startdate'],     ));    }   I also tried   $startdate = date('Y-m-d', strtotime($_POST['startdate']));    in the try{} but doesn't work either.    What am I doing wrong?   This is to John Conde.  I believe it's quite simple on how this is different and why it's not a duplicate.  If you didn't notice there was an "ERROR" in my code.  I needed help finding the issue. Marc found it and now it works.  I still wonder why this is so difficult to understand.

I have a datetime column in MySQL.   How can I convert it to the display as mm/dd/yy H:M (AM/PM) using PHP?


I need to login to several windows 7 computers at work a day usually as local administrator. It can get tedious typing in the long username and password. What are the fast ways to login as local administrator?

I know a  exists. However I was wondering was there a better way in logging into a Windows 7 computer as computer_name\administrator with a standard admin password?  For what purpose?  Fast login as technical support who has to do several logins a day.  What Operating system?  Windows 7  For what type of log-in (local or remote) With what level of security is still expected?  Local login  Whos computer (yours or everyone elses)? Everyone at the company


Is coloring an output possible using cat or similar command?  Let say I have some php or bash script or other. I don't need to edit the file, just to view the source. So cat filename does the job.  But, is it possible to colorize an output making it easier to read, like you can do with vim syntax:on mode?

I need  to use the less command with the syntax highlighting of the vim command for python, C, bash and other languages.  How do I apply syntax highlighting colors according to vim colors for less command?


It all began when i got a bluescreen from nowhere, i ignored it and started my computer again and tried to access my hard drive, but explorer stopped responding and the drive is no longer visible. I shutdown my computer, took out the drive, waited for an hour and started my computer with the drive again, it worked for the rest of the night.   The next day when i started my computer the hard drive was not visible. I went into the disk manager and saw that the hard drive was offline and all space on it was unallocated.   I tried to recover the partitions with MiniTool Partition Wizard. It got to around 60% and stopped responding. I downloaded the bootable version and it showed my lost partition with all files in it and it also showed a partition which was 128 MB in size.  I have tried to access the drive with another computer, but it shows the same result, offline and all space is unallocated.  I don't know what to do now, why can't windows see my partition?  Sorry for the long post.

What steps can I take to try to recover lost or inaccessible data from any storage device?  Answers:   This applies to any computer storage device, e.g. internal/external hard drives, USB sticks, flash memory. The most important thing is to STOP using it, any type of I/O can ruin your chances of a recovery.     We have separate questions covering common problems with USB flash drives in greater detail:


I am really confused between electric potential and electric potential energy. Please help me in understanding the two terms and also show the differences between them.

This is a confused part ever since I started learning electricity. What is the difference between electric potential, potential difference (PD), voltage and electromotive force (EMF)? All of them have the same SI unit of Volt, right? I would appreciate an answer.


I am very interested in this field right now, due to the quantum advantage  and would like some helpful nudges in the right direction i.e. where should I start from.  P.S: I have some background in software engineering and subpar knowledge in math and physics.

I am a computer science student and am currently searching for resources from where I can learn about quantum computers, quantum computing models, their working principles, their gates and some simple quantum algorithms.


Write this proposition in the form of "if p, then q"     Mary will go swimming unless the water is too cold.   I will answer:     if the water is not too cold, then Mary will go swimming.   Is this correct btw?

$A$ unless $B$ surely means, 'given that $B$ does not happen, $A$ will happen'.  So if $B$ happens, $A$ does not happen.  Yet I've read, by those officially accredited, that $A$ unless $B$ = $A$ or $B$. However, if $B$ happens, and $A$ still happens despite the fact, that this is apparently true.  Surely, the sheffer stroke is appropriate here? So that: $A$|$B$.  If $B$ occurs, $A$ does not, thus, $A$ unless $B$. If $B$ does not occur, $A$ does.


I know you can customize the snooze times by using the Inbox by Gmail app, but what is the way to do this directly in Gmail’s web interface?

Currently always defaults to 08:00 AM, is it possible to adjust this time to always say something like 06:00, for instance?


I'm trying to prove that $2\sqrt{pq}$, with $p$ and $q$ primes and $p \neq q$, is irrational. I have something like this: Let's suppose that $2\sqrt{pq}$ is rational. Then, we have that $2\sqrt{pq} = \frac{m}{n}$, with $m,n \in \mathbb{Z^{+}}$, and $(m,n) = 1$. Now, I need to prove that $m \neq 1$ and $n \neq 1$. When I try to prove that $m \neq 1$ I get: If $m = 1$, then: \begin{align*} 2\sqrt{pq} &= \frac{m}{n}\\ 2n\sqrt{pq} &= 1\\ \end{align*} This implies $2 \vert 1$, wich is false. Thus, $m\neq1$. But I don't really know how to prove that $n \neq 1$. The most I can get is: If $n = 1$, then: \begin{align*} 2\sqrt{pq} &= \frac{m}{n}\\ 2\sqrt{pq} &= m\\ \end{align*} And this implies $2\sqrt{pq}$ is an integer. But I don't know how to continue after this.

$P$ and $Q$ are two distinct prime numbers. How can I prove that $\sqrt{PQ}$ is an irrational number?


Forgive me for my ignorance, but I am not understanding why my object is null.  I have been successfully refering to my getter previously.  I just added this getter to my initialize() method and it is throwing a NullPointer Exception.  When debugging the stack trace shows that it is this getter that isn't assigning a value to my object.  I don't understand why it works sometimes and now it doesn't.  I just created a static final instance of it and that gives me the same null result.  I am a student completing a project for school.  Below is a snippet from my CalendarControl class that is throwing the exception:   private List<Appointment> appointments;     static final User currentUser = LoginControl.getCurrentUser();     //region @init     @Override     public void initialize(URL location, ResourceBundle resources) //from Initializable     {         System.out.println(currentUser.toString());         try {             appointments = SQLAppointmentDAO.selectAppointment(currentUser);         } catch (SQLException e) {             e.printStackTrace();         }          for (Appointment appointment : appointments)         {             utilities.Timer.addAppointmentTimer(appointment);         }   The code that is causing me problems is the   static final User currentUser = LoginControl.getCurrentUser();   This is a snippet from the LoginControl class:   private static User currentUser;      public void login() throws IOException     {         String username = txtUsername.getText();         String password = pwdPassword.getText();          SQLUserDAO userSQL = new SQLUserDAO();          User user;         user = userSQL.getUserByUsername(username);          if (user == null)         {             badLogon();         }         else if (user.verify(password))         {             SceneManager.getMainStage().close();             SceneManager.getCalendarScene();             setCurrentUser(user);             loginLog();         }         else         {             badLogon();         }     }     private void loginLog()     {         File loginLogFile = new File(System.getProperty("user.dir") + "/login_log.txt");         try         {             loginLogFile.createNewFile();             FileWriter writer = new FileWriter(loginLogFile, true);             String log = getCurrentUser().getUsername() + " successfully logged in at " + LocalDateTime.now().format(                     DateTimeFormatter.ISO_LOCAL_DATE_TIME) + "\n";             writer.append(log);             writer.close();         }         catch (IOException e)         {             e.printStackTrace();         }     }      public static User getCurrentUser()     {         return currentUser;     }      private static void setCurrentUser(User user)     {         currentUser = user;     }

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?


trying to refer to a whole figure results in ?? but referring to each individual subfigure works fine. How can I fix this? I wish to refer to fig. 1 in the example below.   MWE:  \documentclass[12pt, a4paper]{article} \usepackage{pgfplots} \usepackage{psfrag} \usepackage{subfig} \pgfplotsset{compat=1.5} \usepackage{cleveref} \begin{document}  \begin{figure}[hb]     \centering     \begin{tabular}{ccc}         \multicolumn{3}{c}{\begin{tikzpicture}             \begin{axis}[             at={(-3,-0.5)},             hide axis,             scale only axis,             height=0pt,             width=15cm,             colormap/jet,             colorbar horizontal,             colorbar style={ylabel=dB},             point meta min=-20,             point meta max=0,             ]             \end{axis}             \end{tikzpicture}}\\         \subfloat[][]{\label{fig:sub-a}\includegraphics[width=5cm]{example-image-a}}         &         \subfloat[][]{\label{fig:sub-b}\includegraphics[width=5cm]{example-image-b}}         &         \subfloat[][]{\label{fig:sub-c}\includegraphics[width=5cm]{example-image-c}}\\     \end{tabular}     \label{fig:subs}     \caption{} \end{figure} \Cref{fig:subs} isn't working but \cref{fig:sub-a,fig:sub-b,fig:sub-c} is. \end{document}

\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.


In the following example code below, we have an undecorated function fun() and a decorated one wrappedfun().  For the undecorated function fun, pressing TAB in IPython notebook after the opening parenthesis following the function name shows the call signature as fun(x=0, y=1) but for the decorated version wrappedfun you get the completion as wrappedfun(*args, **kwargs). Is there any way to tell IPython to display the original call signature during TAB completion?  from functools import wraps  def mywrapper(func): ''' simple wrapper '''     @wraps(func)     def wrapper(*args, **kwargs):         print('inside wrapper')         return func(*args, **kwargs)     return wrapper  def fun(x=0, y=1):     ''' Docstring for fun '''     return x + y  @mywrapper def wrappedfun(x=0, y=1):     ''' Docstring for wrapped another fun '''     return x + y

Suppose I have written a decorator that does something very generic. For example, it might convert all arguments to a specific type, perform logging, implement memoization, etc.  Here is an example:  def args_as_ints(f):     def g(*args, **kwargs):         args = [int(x) for x in args]         kwargs = dict((k, int(v)) for k, v in kwargs.items())         return f(*args, **kwargs)     return g  @args_as_ints def funny_function(x, y, z=3):     """Computes x*y + 2*z"""     return x*y + 2*z  >>> funny_function("3", 4.0, z="5") 22   Everything well so far. There is one problem, however. The decorated function does not retain the documentation of the original function:  >>> help(funny_function) Help on function g in module __main__:  g(*args, **kwargs)   Fortunately, there is a workaround:  def args_as_ints(f):     def g(*args, **kwargs):         args = [int(x) for x in args]         kwargs = dict((k, int(v)) for k, v in kwargs.items())         return f(*args, **kwargs)     g.__name__ = f.__name__     g.__doc__ = f.__doc__     return g  @args_as_ints def funny_function(x, y, z=3):     """Computes x*y + 2*z"""     return x*y + 2*z   This time, the function name and documentation are correct:  >>> help(funny_function) Help on function funny_function in module __main__:  funny_function(*args, **kwargs)     Computes x*y + 2*z   But there is still a problem: the function signature is wrong. The information "*args, **kwargs" is next to useless.  What to do? I can think of two simple but flawed workarounds:  1 -- Include the correct signature in the docstring:  def funny_function(x, y, z=3):     """funny_function(x, y, z=3) -- computes x*y + 2*z"""     return x*y + 2*z   This is bad because of the duplication. The signature will still not be shown properly in automatically generated documentation. It's easy to update the function and forget about changing the docstring, or to make a typo. [And yes, I'm aware of the fact that the docstring already duplicates the function body. Please ignore this; funny_function is just a random example.]  2 -- Not use a decorator, or use a special-purpose decorator for every specific signature:  def funny_functions_decorator(f):     def g(x, y, z=3):         return f(int(x), int(y), z=int(z))     g.__name__ = f.__name__     g.__doc__ = f.__doc__     return g   This works fine for a set of functions that have identical signature, but it's useless in general. As I said in the beginning, I want to be able to use decorators entirely generically.  I'm looking for a solution that is fully general, and automatic.  So the question is: is there a way to edit the decorated function signature after it has been created?  Otherwise, can I write a decorator that extracts the function signature and uses that information instead of "*kwargs, **kwargs" when constructing the decorated function? How do I extract that information? How should I construct the decorated function -- with exec?  Any other approaches?


In the context of the likelihood ratio test, I was told to use the following formula (1):  $$ \sum^n_{i=1}(X_i-\mu_0)^2=\sum^n_{i=1}(X_i-\bar{X})^2 + n(\bar{X}-{\mu}_0)^2 \qquad(1) $$  in order to derive the formula (2) as follows:  $$ \begin{aligned} \log\Lambda & = -\frac{1}{2{\sigma}^2}\left(\sum^n_{i=1}(X_i-\mu_0)^2 - \sum^n_{i=1}(X_i-\bar{X})^2\right) & \quad &\\ & = -\frac{1}{2{\sigma}^2}n(\bar{X}-{\mu}_0)^2 & & (2) \end{aligned} $$  where $X_i = \{X_1, \cdots , X_n\}$ is independent and identically distributed and normally distributed with mean $\mu$ and standard deviation $\sigma$, $\mu_0$ is a certain number such that $H_0: \mu = \mu_0$, and $\bar{X}$ is the maximal likelihood estimate of $\mu$.  I understood how to apply (1) to (2). However, I'm not sure why the left side of (1) can be transformed as its right side. Then, how should I derive the formula (1)?

I am reading a paper   It has a mathematical step shown as  $$\sum_{i=1}^{n}(x_i-\mu)^2=n(\mu-\overline x)+\sum_{i=1}^n(x_i-\overline x)^2$$  Here the $\mu$ is unknown parameter and $\overline x$ is the known mean of $\mathbf x=(x_1, x_2, x_3, \dots,x_n)$  How do I demonstrate this identity?


The following is the screenshot of the NIFTY 50 option chain.  It is taken from the  link.    Why are these people buying these significantly out-of-the-money options? In this case, it's the put option of 7300 strike price. It's highly unlikely that the Index will fall more than 500-600 points in this series unless very serious news comes out affecting the entire economy.  Even if the index falls by, let's say, 500 points, the value for that option won't change more than 0.50 or such price.  Specifically, what strategy are these people following where they could possibly benefit from buying such an option?

I swing trade equity options every once in a while for fun. This morning I witnessed something I do not understand at all.  In the attached photo, why would someone purchase 6 contracts for .05 at $76.  I just can't wrap my head around this!    Scenario:   Underlying Asset: RY.TSX  Current Price: $71.70 Days to expiry: 4 Days     EDIT: It happened again the next day with 74, see new table with headers as per request:   My only reason for asking is because RY.TSX is the Royal Bank of Canada, this stock will not move multiple dollars in 3 days(expiry in this scenario).  Why buy 10 @ 74 for .04 each instead of just buying 10 @73 for .04 which would have gone through.  If you do the math(excluding commissions): .04 * 100(shares in a contract) * 10 contracts = $40 Stock moves to 74 and they are in the money lets say for .20 .20*100*10 = $200  I just don't see the reward as 99% of the time you will lose this wager, it is just not worth it even if it does happen once in a blue moon.  I can think of much better things to do with $40.  For the skeptics another screen shot to actually confirm this order:


For example, if I ran:  $ sh somescript inputvariable   if so, how would I use this variable in the script?  For example   $ sh somescript 7

I know that shell scripts just run commands as if they were executed in at the command prompt.  I'd like to be able to run shell scripts as if they were functions... That is, taking an input value or string into the script.  How do I approach doing this?


How can I duplicate all but the first line in a file?   Example:  Id_animal Id_SNP Allele ID01 rs01 AB ID02 rs01 BA ID03 rs01 AA ID04 rs01 BB   Desired output:  Id_animal Id_SNP Allele ID01 rs01 AB ID01 rs01 AB ID02 rs01 BA ID02 rs01 BA ID03 rs01 AA ID03 rs01 AA ID04 rs01 BB ID04 rs01 BB   My real file has 400 lines and 44709376 column. So I want an output with 799 lines and 44709376 columns.

Would like to have each line in a file repeated a fixed number of times.  e.g. have each line repeated four times:  a b c   becomes:  a a a a b b b b c c c c   I've done some searching, and there are a lot of questions and answers along the lines of doing the reverse, e.g. merging duplicate lines into single lines, and maybe a few about doubling lines by printing them again.  It would be easy to do this in C, but I wish I knew more about the native commands so I wouldn't have to resort to these kinds of one-off throw-aways all the time.


Trying to start 13.04 after a recent installation.    A window appears that says "Cannot correctly detect the screen, graphics card, and input device settings" You will need to set these yourself.  Standby as display restarts"  Then there is only a terminal window, which says "* Checking battery state    ...  [ok]"  and it just hangs there and does nothing and does not respond to any input"  any suggestions?  thanks, stephen

I am trying to boot Ubuntu on my computer.  When I boot Ubuntu, it boots to a black screen.  How can I fix this? Table of Contents:


I know that the answer can be arrived through integration of geometric series to evaluate $\zeta(2)$, but i was wondering if the result could be attained through a sub?

I've read somewhere on this site that if you consider:  $$\int_0^1 \int_0^1 \frac{1}{1-xy} \,dy\,dx$$  Then using the power series, we have this is equal to $\sum_{n=1}^{\infty} \frac{1}{n^2}$ which I decided to try and was able to show.  Apparently we can show this is equal to $\frac{\pi^2}{6}$, and using what little I know about double integrals from a few khan academy videos (I haven't taken multivariable  calculus yet), I tried to evaluate this double integral by techniques of single variable calculus $u=xy$..and I got this:  $$-\int_{0}^{1} \frac{\ln (1-x)}{x}dx$$  The usual way I would evaluate this is with a Taylor series, but that just that just leads us in circles.  So I want to know how can I evaluate this, so we can prove $\sum_{n=1}^{\infty} \frac{1}{n^2}=\frac{\pi^2}{6}$.


Why do I get this error  /bin/sh: 1: Syntax error: Unterminated quoted string   when calling this in /etc/crontab?  19 2 * * *   root    for f in $(cat /home/rubo77/list); do date +"%y-%m-%d %T">"$f".datefile; done   The list only contains paths to existing directories and those are the first lines in my crontab:  SHELL=/bin/sh PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin   When I call the for commandline on the console in bash I get no errors

I want to create a log file for a cron script that has the current hour in the log file name. This is the command I tried to use:  0 * * * * echo hello >> ~/cron-logs/hourly/test`date "+%d"`.log   Unfortunately I get this message when that runs:  /bin/sh: -c: line 0: unexpected EOF while looking for matching ``' /bin/sh: -c: line 1: syntax error: unexpected end of file   I have tried escaping the date part in various ways, but without much luck. Is it possible to make this happen in-line in a crontab file or do I need to create a shell script to do this?


Is it easier to replace the internal hard drive of a PS3, or to go with an external hard drive?

On Christmas Day 2010 my PS3 stopped reading discs so I bought a new one, took the hard drive out of the old one, wiped/formatted it and used it as a portable hard drive. But today I've found a  to get my old one working again.   If I wipe the hard drive and stick it back in, will it work? Or do I have to have certain files / directory structure? How do I install a new hard drive into a PlayStation 3?


I'm using Dash to Dock extension but my dock looks something like this    (click to enlarge)   Is it a bug? How do I solve it?  UPDATE: Press Alt+f2 and type 'r' to restart and it solves, but it's cumbersome. I want to do without restart gnome-shell.

What's going on here? I've installed the  on Ubuntu 17.10. Everything was cool, and as I was trying to hone and tweak the look of my desktop, at some point the shortcuts bar (dock?) on the left is duplicated.  (Click image to enlarge) The default, which normally disappears with Dash to Dock, is there underneath the one that usually shows up when I install Dash to Dock. Why? I've tried to go through the options for Dash to Dock, the GNOME Tweak Tool, and the regular Ubuntu settings, but I can't figure it out.


So, I wanted to learn about quantum computing.  What should I learn and where do I start?

I am new to Stack Exchange and am working on a quantum learning platform for minority youth groups (LGBTQ, low-income, at risk, etc).  In the question below they are looking for courses on the subject, which I am also interested in, and do plan on checking those links out for ideas.        What I am looking for are simple videos, articles, or even games, that cover basic quantum theory at an introductory level.  There are some games I have looked into and played.  Hello Quantum! was fun and informative, though on my end there was still a lack of comprehension on how the quantum computer (or anything else "quantum") would actually function and play out.   My focus for the educational platform is more directed towards the software side of quantum computing. Is there anything  that gives a good introduction to the functions and uses a quantum computer will have? As well as what language would be best to program one? Also, would there be a way to program a quantum computer through a classical computer? And, is there a simple introduction to any of this already existing?


I embarked on a project to use Blender to simulate the behaviour of a wave energy device in order to establish its performance, only to find while learning fluid simulation that fluids cannot affect solid objects. This is fatal to this project, and disappointing as Blender has everything else. How close is fluid simulation to being able to influence rigid objects (eg, chairs and cars being washed away by a flood, or water turning a water wheel)? If not currently in development or scheduled, where is the place to start to pursue enhancing Blender to incorporate this capability myself?

For example, rigid bodies and fluid. I know it's kind of possible by setting the rigid bodies as fluid obstacles, but it's not "true" interaction in that the fluid does not affect the rigid bodies...  By "true" interaction I mean where two (or more) physics systems affect each other simultaneously. For example, with rigid body and cloth, the rigid body affects the cloth but the cloth doesn't affect the rigid body (at least the way I'm doing it), so the rigid body just eventually stretches the cloth to an extreme and falls through...  Are there any ways to achieve this? (for any interaction, not just rigid bodies and fluid)  Or, if not, does anyone know whether there are any plans to implement this sort of feature?  Thanks


I've written a bash script which should cd me to a directory.   My problem is that only the directory in the subshell changes.  I've read of many similar problems to this, but I want to know if there is a solution besides using an alias, a function or sourcing the script.  If you don't understand what I mean, here's an example:  user@linux ~: cat ./myscript.sh #!/bin/bash cd /any/directory user@linux ~: ./myscript.sh user@linux ~:    Please note that my script is much longer, so I don't want to use a function!

It's taken me almost 10 years of Linux usage to ask this question. It was all trial and error and random late-night internet surfing.  But people shouldn't need 10 years for this. If I were just starting out with Linux, I'd want to know: When to alias, when to script, and when to write a function?  Where aliases are concerned, I use aliases for very simple operations that don't take arguments.   alias houston='cd /home/username/.scripts/'   That seems obvious. But some people do this:  alias command="bash bashscriptname"   (and add it to the .bashrc file)   Is there a good reason to do that? I'm trying really hard, but I genuinely can't think of any circumstances in which I'd want to do that. So, if there is an edge case where that would make a difference, please answer below.  Because that's where I would just put something in my PATH and chmod +x it, which is another thing that came after years of Linux trial-and-error.  Which brings me to the next topic. For instance, I added a hidden folder (.scripts/) in the home directory to my PATH by just adding a line to my .bashrc (PATH=$PATH:/home/username/.scripts/), so anything executable in there automagically autocompletes.  If I needed to.  I don't really need that, though, do I? I would only use that for languages that are not the shell, like Python.  If it's the shell, I can just write a function inside the very same .bashrc:  funcname () {   somecommand -someARGS "$@" }   As I stated, I found a lot of this out through trial and error. And I only truly saw the beauty of functions when my computer died and I was forced to use the computers of the people around me when they weren't using them.   Instead of moving a whole directory of scripts from computer to computer, I ended up just replacing everyone else's .bashrc with my own, since they had never even made a single modification.  But did I miss anything?   So, what would you tell a beginning Linux user about when to alias, when to script, and when to write a function?   If it's not obvious, I'm assuming the people who answer this will make use of all three options. If you only use aliases, or only use scripts, or only use functions—or if you only use aliases and scripts or aliases and functions or scripts and functions—this question isn't really aimed at you.


I didn't understand the difference in the two below statement :-   HashMap<Integer,String> hashmap = new HashMap<Integer,String>();   Map<Integer,String> hashmap = new HashMap<Integer,String>();   The above two statement work in the same manner , no difference in the ouptput OR  there is any time difference on running two statement.

I have seen this mentioned a few times and I am not clear on what it means. When and why would you do this?   I know what interfaces do, but the fact I am not clear on this makes me think I am missing out on using them correctly.   Is it just so if you were to do:  IInterface classRef = new ObjectWhatever()   You could use any class that implements IInterface? When would you need to do that? The only thing I can think of is if you have a method and you are unsure of what object will be passed except for it implementing IInterface. I cannot think how often you would need to do that.   Also, how could you write a method that takes in an object that implements an interface? Is that possible?


I am using $top 5000 in URL of ajax call. Then I am getting data but if I put filters its shows threshold limit error.

Below is my code to read items from a document library.  var url = _spPageContextInfo.webAbsoluteUrl + "/_api/web/lists/getbytitle('DocumentList')/items?$select=customerID"; $.ajax({       url: url,       method: "GET",       headers: {           "Accept": "application/json; odata=verbose"       },       success: function(data) {           $.each(data.d.results, function(index, item) {             arrayCustomerID[index] = item.customerID;         });       },       error: function(data) {           console.log("error");       }   });     This work for the normal case but what should I do so that it works if I have more than 5000 items in the document library.