THIS IS NOT THE DUPLICATE OF ABOVE BECAUSE:I require pigeonhole principle argument to my doubt which is not stated in the answer to above question... I missed my lecture the day the following theorem for ramsey numbers was proved in the class: If $m,n$ are integers $\gt 2$ then $R(m,n) \leq R(m-1,n)+R(m,n-1)$ Proof:  $R(m,n)=$ smallest possible size of group of persons s.t. among these either $\exists \,m$ persons mutual friends or $\exists \,n$ mutual enemies. Let $p=R(m-1,n)\,,q=R(m,n-1)$ and $r=p+q$. Consider the group $\{1,2\ldots,r\}$ of $r$ persons. Let L=$\{$set of persons friends with '$1$'$\}$ and M=$\{$set of persons enemies with '$1$'$\}$ Then $L\cap M=\phi$ .So, we have $|L|+|M|=|L\cup M|=r-1=p+q-1$ We cannot have $|L|\leq p-1$ and $|M|\leq q-1$ . $\therefore$ either $|L| \geq p$ or $|M|\geq q$.  This the starting paragraph of the proof which I have stated above. and later the proof is divided into two cases ,(1. when $L$ has atleast $p$ elements. 2.when $M$ has atleast $q$ elements),which I understood... But what I can't understand is the step at begining of proof that:  We cannot have $|L|\leq p-1$ and $|M|\leq q-1$ . $\therefore$ either $|L| \geq p$ or $|M|\geq q$.  The above statement makes the use of pigeonhole principle but I don't know how.Please anyone who can help me with this ,as I have no idea for this.....

I was reading up on a proof of Ramsey's Theorem and I can't understand this part of the proof:      Pick a vertex $v$ from the graph, and partition the remaining vertices into two sets $M$ and $N$, such that for every vertex $w$, $w$ is in $M$ if $(v, w)$ is blue, and $w$ is in $N$ if $(v, w)$ is red. Because the graph has $R(r - 1, s) + R(r, s - 1) = |M| + |N| + 1$ vertices, it follows that either $|M| \geq R(r − 1, s)$ or $|N| \geq R(r, s − 1)$.   Why is that $|M| \geq R(r − 1, s)$ or $|N| \geq R(r, s − 1)$? I know from the proof of $R(3,3) = 6$ that given a vertex, at least $3$ are guaranteed to be either red or blue, so what is the pigeonhole argument for the general case?


my question is can the word "or" follow the word "never" in a sentence - see below example.  "I have never wished you to hurt me or anyone..."  or should it be "I have never wished you to hurt me nor anyone"?  Thanks.

This document does not cover the SDK interfaces nor any other reference material.   I think the above is correct, but my grammatical checker in Microsoft Word underlines nor and suggests or. Why?


Okay, I've spent too much time looking for this book, it's time to ask for help. Around 10 or more years ago I've read a book about a young person (possibly a girl but I'm not sure). The main theme of the book was that the world's culture was based on magic, which was based on the runes. There was some kind of an earthquake (?) after which the magic stopped to work. It was really weak and had no more use of it. Eventually the hero found out that the runes were basically the map of the world (city?) with added lines, and that the earthquake created an abyss which had to be represented on the 'map' for runes to work. At the end of the book was awesome list (dictionary)  of those runes with drawn symbols and written spells.  I tried everything and can't find this book. I'm desperate. Sorry for any grammar mistakes, not a native speaker.

I think the main character was a prince or high born person, who one day wakes up and looks in the mirror and his hair is turning white, I think his skin bleaches out too... His servants notice and try to sneak him out, but he ends up being put into a compound with others with the same affliction. Are they dead? There were lots of chases in the novel; running and hiding; learning to survive in the compound... I remember being disappointed with the ending (or maybe just hungry for more) and thinking that there must be another book coming. But I forgot the book title and don't know the author so I can't track down any sequels ;) Read it at least ten years ago. Any help is appreciated!


Let V= Mat2×2(K) be a 4-dimensional vector space with the basis: v1=[1   0; 0   0],   v2=[0   1; 0   0],   v3=[0   0; 1   0],   v4=[0   0; 0   1]. Let A=[a   b; c   d] ∈ Mat2×2(K). We define the linear map T:V→V, M→A·M, for M∈V.Find  the  matrix  associated  with T with  respect  to  the  standard  basis.   My attempt: A*{v1 v2 v3 v4} to get a 2x8 matrix but i dont know where to go from here?  i tried to put them together and got: [a 0 b 0; c 0 d 0; 0 a 0 b; 0 c 0 d] I have no idea if this is even correct?

I am having difficulty solve this problem in my homework:  (In my notation, $[x;y]$ represents a matrix of 2 rows, 1 column)     Let $\mathbf{x}=[x_1;x_2]$, $v_1$=[−3;5] and $v_2=[7;−2]$ and let $T\colon\mathbb{R}^2\to\mathbb{R}^2$  be a linear transformation that maps $\mathbf{x}$ into $x_1v_1+x_2v_2$. Find a matrix $A$ such that $T(\mathbf{x})$ is $A\mathbf{x}$ for each $\mathbf{x}$.   I am pretty clueless. So I assume that I start off with the following:  $x_1v_1 + x_2v_2 = x_1[−3;5] + x_2[7;−2]$  But I do not know what to do from here, or if this is even the correct start!


I written the following script which gets name of a file and then assemble and link the file. But it doesn't work. What is the problem with it?  EXPECTED_ARGS=2   if [ $# -ne $EXPECTED_ARGS ] then         echo "[+] Assembling with Nasm."         nasm -f elf32 $1 -o $1.o          echo "[+] Linking ..."         ld $1.o -o $1          echo "[+] Done!"   else         printf  "\nInvalid number of arguments, please check the inputs and try again\n"  fi;   When I run it without passing any args, it doesn't shows following error:  printf  "\nInvalid number of arguments, please check the inputs and try again\n"

Say, I have a script that gets called with this line: ./myscript -vfd ./foo/bar/someFile -o /fizz/someOtherFile  or this one: ./myscript -v -f -d -o /fizz/someOtherFile ./foo/bar/someFile   What's the accepted way of parsing this such that in each case (or some combination of the two) $v, $f, and  $d will all be set to true and $outFile will be equal to /fizz/someOtherFile?


I have used live() to create a click event, on the table row, but the data in the table was getting cached, and then after some googling, I discovered that on() is the correct way to add an event to the selector.  $('#landingContactTable tbody tr').on("click", function(e) { . .   Table is showing 25 records, but has more records that can be viewed by clicking the "next" at the bottom of the table. But when I go to next set of records, I cannot select on the table rows, the click event somehow seems not working on the second set or records.  When I was using live(), it was caching the data and I was able to select the rows on the second set of records, but then I need a way to remove the "click" event if the user clicks "rest"?  Please let me know how to achieve this? Thanks

I have a bit of code where I am looping through all the select boxes on a page and binding a .hover event to them to do a bit of twiddling with their width on mouse on/off.  This happens on page ready and works just fine.  The problem I have is that any select boxes I add via Ajax or DOM after the initial loop won't have the event bound.  I have found this plugin (), but before I add another 5k to my pages with a plugin, I want to see if anyone knows a way to do this, either with jQuery directly or by another option.


I would like to have three screens connected to my Mac Mini, so far I have one screen connected via HDMI and one screen connected via thunderbolt. The only ports I have left are USB and firewire, would there be any way for me to connect a third monitor?

It seems the new Mac Mini uses both HDMI and Thunderbolt, but bandwidth limitations of Thunderbolt may prevent using 3 daisy-chained Thunderbolt high resolution monitors such as the newly released Apple Thunderbolt 27" Display, limiting you to two instead of three.  If this correct: 1. What occurs to the 3rd monitor in a triple daisy-chain? Black screen? Reduced available resolution up to the bandwidth limit of Thunderbolt? 2. Are there HDMI to mini-displayport adapters for connecting the HDMI output of the Mini to the Thunderbolt input of an Apple Thunderbolt 27" Display? Would that even work?


We have below describe call to get the record type id by name.  Id recordTypeId = Schema.SObjectType.Case.getRecordTypeInfosByName().get('RECORD_TYPE_NAME_NOT_DEVELOPER_NAME').getRecordTypeId();   This gives the id of the record but this logic is based on label of the record type instead of developer name. That means if we change the Label of record type then any code using such mechanism will break.  I know we can make a query to get the record type id by developer name but that will cost me a SOQL which I don't want to.  Is there any describe call to get the record type id by developer name without making the SOQL?

I want to get Developer Name of record Type without using SOQL query.  With the below code, I'm able to get the "Name", but I want the DeveloperName.  Let me know.  string recordTypeName = Schema.SObjectType.Account.getRecordTypeInfosById().get(Account.RecordTypeId).getName();


I am trying to create a graphic with pstricks and want to include a logo which has some white colored background. But I want this white background to be transparent.  I have tried to change the white background to transparency with gimp and save it as ps file but I think ps cannot deal with transparency. Unfortunately I cannot use png or pdf as far as I know, because I have to use latex -> dvips -> ps2pdf when using pstricks.  Hopefully somebody can help me.  \documentclass{standalone} \usepackage{pstricks} \usepackage{graphicx}  \begin{document} \begin{pspicture}(0,0)(1,1) \psframe[fillcolor=red, fillstyle=solid, linecolor=red](0,0)(1,1) \rput[lb](0,0){\includegraphics[width=1cm]{logo.ps}} \end{pspicture} \end{document}   Since my background is not a simple red filled rectangle, it does not help me to color the white background of the logo in gimp (which would be the most simplest solution).

I thought that PSTricks package was not possible to use in pdfLaTeX but .   How can I force pdfLaTeX to use PSTricks then?


I need to start a sentence by saying that something has been known for a long time. What is the most elegant way of writing that? Two possibilities that come to my mind are:      1) It has been known since long time that ...      2) Since long, it has been known that ...   Personally, I prefer the second option. The first sounds ugly to me. But since I'm not a native English speaker, I would like to ask for suggestions of what would be the best way of saying that. Please feel free to suggest other forms.

Which of these is grammatically correct?       1. a) He has been working under my direct supervision since the last two years           1. b) He has been working under my direct supervision for the last two years            2. a) He has not met her since a very long time        2. b) He has not met her in a very long time    Which of the above are correct? Are all of them correct? My friend says 1.b and 2.b are correct, but I am not sure. Or is this an American English and British English thing? (He mostly goes by American English)


Ok guys I can't understand something.  Say that I have this circuit:    Assuming that I apply at the antenna 5V, how can I calculate how much power I will trasmit?  I found on internet that the current that will flow on the antenna radiation resistance, but if for example I go on ebay for try to find antenna no one quote the antenna radiation resistance, so how can I choose my antenna?  Moreover I want to know what  capacitor C1 and C2 do in this circuit.

I made a simple FM transmitter following  and it worked! Now I need some help to understand how.  My coil is made of 1 mm copper wire has 6 turns and 8 mm wire diameter. According to this online calculator:  this means that: L = 3.9e-7 H  I did not have any 5 pF trim capacitor so I used a 3 pF capacitor instead.  Am I correct in assuming that the frequency this will transmit on can be found by looking at the L1 C2 as a LC oscillator and using the frequency formulae:  fR = 1/(2*pi*sqrt(LC))  ?  If so I should get fR = 147 MHz. Which is strange since I received the signal on 91.5 MHz on my radio.  In a LC circuit I understand that the signal decays exponentially over time. That is hopefully not happening here. Why? Because of C4 maybe?  Also what is the purpose of C1?  If I want to increase the range of this FM transmitter somewhat can I do this by simply replacing R2 with a 470 Ohm resistor?  Are there free simulator programs that let me see the resulting spectrum at the antenna?


Many of my apps crash right after I try to start them. This issue started about 24h ago. This includes:  Gmail Microsoft Outlook Screenshot Touch  I use Android 10 with Samsung Galaxy S9. I didn't install any new apps or OS upgrades. I do have the app auto-update on Play turned on. What could be the issue?

Recently, apps that are fine an hour ago now crash when I open them. The crash report message seems to be caused by a null pointer exception (NPE) in com.google.android.trichromelibrary. Apps affected for me:  Gmail Dashlane  Is it just me, or is there actually something wrong with the library? How can I fix these affected apps? Crash report: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** Build fingerprint: 'Xiaomi/polaris/polaris:10/QKQ1.190828.002/20.9.4:user/release-keys' Revision: '0' ABI: 'arm64' Timestamp: ... pid: ..., tid: ..., name: com.dashlane >>> com.dashlane <<< uid: ... signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0 Cause: null pointer dereference          ...  backtrace:     #00 pc 00000000038621f0 /data/app/ com.google.android.trichromelibrary 438909034-YaxP9ttrIDcQBfleP5vm7Q==/base.apk! libmonochrome_64.so (offset 0x646000) (BuildId: ... )  (click  for the screenshot of the bug report)


I am trying to prove that if $f : \mathbb R \to \mathbb R$ is locally increasing at every point , i.e. if for every $x\in \mathbb R , \exists r_x >0$ such that $f(a)\ge f(b) , $ whenever $ x+r_x >a>b>x-r_x $ , then $f$ is increasing everywhere .   I have proceeded as : Let $a,b \in \mathbb R , a<b$ ; we want to show $f(a) \le f(b)$ ; now for each $p \in [a,b]$ , there is an open n.b.d. of $p$ in which $f$ is increasing , so by these open intervals , we get an open cover of $[a,b]$ and since $[a,b]$ is compact we can get a finite subcover ; but then I am stuck ; can the proof be finished in this way ? Or is there any better way ? Please help . Thanks in advance

A function $f : \mathbb{R} \to \mathbb{R}$ is locally increasing at a point $x$ if there is a $\delta > 0$ such that $f(s) < f(x) < f(t)$ whenever $x-\delta < s < x < t < x+\delta$.      Show that a function that is locally increasing at every point in $\mathbb{R}$ must be increasing, i.e., $f(x) < f(y)$ for all $x < y$.


I have 2 scenarios where the verdict results into a runtime error, but with 2 different messages: Scenario 1: def a():     print(aa+bb)     #aa=10     #bb=20      print(a())  Verdict for Scenario 1: Traceback (most recent call last): File "Solution.py", line 6, in <module>     print(a()) File "Solution.py", line 2, in a     print(aa+bb) NameError: name 'aa' is not defined  Scenario 2: def a():     print(aa+bb)     aa=10     bb=20      print(a())  Verdict for Scenario 2: Traceback (most recent call last): File "Solution.py", line 6, in <module>     print(a()) File "Solution.py", line 2, in a     print(aa+bb) UnboundLocalError: local variable 'aa' referenced before assignment  Now, if the interpreter executes the code line by line and immediately halted after it encountered an error on line 2, how did it generated 2 different error messages.

The following code works as expected in both Python 2.5 and 3.0:  a, b, c = (1, 2, 3)  print(a, b, c)  def test():     print(a)     print(b)     print(c)    # (A)     #c+=1       # (B) test()   However, when I uncomment line (B), I get an UnboundLocalError: 'c' not assigned at line (A). The values of a and b are printed correctly. This has me completely baffled for two reasons:   Why is there a runtime error thrown at line (A) because of a later statement on line (B)? Why are variables a and b printed as expected, while c raises an error?   The only explanation I can come up with is that a local variable c is created by the assignment c+=1, which takes precedent over the "global" variable c even before the local variable is created. Of course, it doesn't make sense for a variable to "steal" scope before it exists.  Could someone please explain this behavior?


In  I asked for a practical reason to lock votes after 5 minutes and Bill the Lizard and Arjan were very nice to explain the mystery.    Well, vote locking seems to deal with strategic downvotes fine, yet vote locking isn't a useful feature in itself. If it was the code, I would call it 'ugly hack', in a sense that it deals with a problem by creating another problem. It deals with few 'reputation optimizers' by annoying the whole community.    There's probably no need to illustrate my previous point: I've provided an example in the linked post, and there're many more complaints about it in the meta. Sure, in 99% cases you have no urge to change your vote, yet the remaining 1% is very annoying.  So, how can we adjust vote locking to reduce collateral damage? I see two options right off the bat   Simple tweak. Lock downvotes only for the users who have answers in this question. Radical. Allow no downvotes in the question where user has posted answer himself. As Kyle Cronin , This has some drawbacks, but can you really trust someone who posted their own reply to be objective about judging the other peoples' replies?.   Any ideas?

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


Like the Title, is there a way to hook an object to another object's vertex(s) ? or any other method that produce the same result.

I just created a plane and added a wave modifier to it, to simply make it look like something fluid. Now, I have an Object that I want to place on the surface of this fluid plane. But how do I do that?  I thought of adding a driver to my Objects location, but I have no clue how to get the location of a certain vertex in runtime.


hello guys i need some help on how to model ponies, i couldn't start because i don't know what to do. Reference image is there, now what? YouTube is lacking of tutorial about modeling ponies. Hope to get some answer

I have a cartoon character (a lion) that is part of my business logo that I want to put into Blender and animate it somehow. Is there any way I can take a flat picture (JPEG) and transform it into a 3D image and then animate it in Blender?


I've noticed a window that pops open and then immediately closes at random on my Windows 10 system. I haven't been able to figure out yet how to figure out what is causing that. My malware scans haven't turned anything up yet.  I've tried using the Event Viewer however the search fails to run for events that happen in the specified time period. Apparently the query is too long. How can I go about logging what processes open/close or what windows are created?  Thanks!

I keep seeing a console window pop up for a fraction of a second every couple of hours. Seems random, I can't pin it to any one particular event. Is there any way I can trap the window and see what it's doing?  I'm on Win 10, latest updates, Norton.


In JavaScript, variables created within a function only have scope only within that function: if that's the case, why does the following code produce the output 1? Surely x cannot be accessed from outside of foo ?  function foo(){   x = 1; } foo() console.log(x) // '1'

What is the scope of variables in javascript? Do they have the same scope inside as opposed to outside a function? Or does it even matter? Also, where are the variables stored if they are defined globally?


Here is the screenshot from the Apple Calendar event quick preview:   Why it is not a     Alert at THE time of event     or       Alert at time of THE event     or even        Alert at THE time of THE event     I suppose there are definitely no place for "A" article in reason the subject of the question is specific and known - we know what is the time and the event. But why there are no definite article? And is it correct to say "Alert at time of event" in conversation?

Is there a particular term for the abbreviated language used in headlines (the removal of at least articles and conjunctions)?


I've got a table with data and to edit its fields I use this function  var tabM =  $('table#trips_info');  $('tr',tabM).dblclick(function(){             var tr_HL = $(this);              tr_HL.addClass('highLight_edit');             $('td',tr_HL).each(function(){                $(this).attr('contenteditable','true');             });              var sibls = tr_HL.siblings('tr');             $('html, '+ sibls +'' ).on('click',function(){                console.log(tr_HL.text());                 tr_HL.removeClass('highLight_edit');             });              event.stopPropagation();         });   especially this part is used to quit editing the current, but I cant make it work properly   $('html, '+ sibls +'' ).on('click',function(){                    console.log(tr_HL.text());                     tr_HL.removeClass('highLight_edit');                 });   I want the function to quit editing when user clicks NOT THE current tr but siblings tr or outside the tr an table area   Thx in advance

I have some HTML menus, which I show completely when a user clicks on the head of these menus. I would like to hide these elements when the user clicks outside the menus' area.  Is something like this possible with jQuery?  $("#menuscontainer").clickOutsideThisElement(function() {     // Hide the menus });


Suggestion when you are browsing in the tags screen:  When you select a TAG, and then a question, when you press back button, back to select TAG again when should be to the questions about the TAG you selected previously as you do on the other options.

This looks a little bit like a variation on  but specific to the tags view.  Reproduction (app version 1.0.71):   Select any site (say Meta) from the sidebar Switch to the tags view using the top bar Choose a tag, any tag ( is nice)   optionaly refine your search with more terms  Go to any question found, go back   you end on the unfiltered tags view  Go back again   lucky you, your search is here


My goal right now is to gain a deep understanding of how to talk about mathematical objects formally. The presentation of how to do this in most books is generally to "assume some basic set theory," and then go about developing logic, or "begin with basic notions from logic," and develop set theory. I'm wondering if there is a blended approach, which would first, perhaps, define a little set theory, then a little logic, then a little more set theory, etc., and eventually you'd have enough to go on where it wouldn't be so hard just build out the topics separately. I know that this is going to be a less direct, and probably far uglier way, of going about the development of the very foundations of mathematics, but it is intellectually satisfying to me to know that it has been done. I also believe it appeals to the general mathematical ideal of rigor. The qualities of such a presentation I'm looking for is:  Use the fewest "basic notions"/assumptions as possible Only build off notions that have not been assumed or derived (e.g. do not invoke the general "basic notions of set theory" "basic logical notions" unless those notions have been clearly laid out on the table)  Thank you!

I am trying to understand what mathematics is really built up of. I thought mathematical logic was the foundation of everything. But from reading a book in mathematical logic, they use "="(equals-sign), functions and relations.  Now is the "=" taken as undefined? I have seen it been defined in terms of the identity relation.  But in order to talk about functions and relations you need set theory.  However,  seems to be a part of mathematical logic.  Does this mean that (naive) set theory comes before sentential and predicate logic? Is (naive)set-theory at the absolute bottom, where we can define relations and functions and the eqality relation. And then comes sentential logic, and then predicate logic?  I am a little confused because when I took an introductory course, we had a little logic before set-theory. But now I see in another book on introduction to proofs that set-theory is in a chapter before logic. So what is at the bottom/start of mathematics, logic or set theory?, or is it circular at the bottom?  Can this be how it is at the bottom?  naive set-theory $\rightarrow$ sentential logic $\rightarrow $ predicate logic $\rightarrow$ axiomatic set-theory(ZFC) $\rightarrow$ mathematics  (But the problem with this explanation is that it seems that some naive-set theory proofs use logic...)  (The arrows are of course not "logical" arrows.)  simple explanation of the problem:  a book on logic uses at the start: functions, relations, sets, ordered pairs, "="  a book on set theory uses at the start: logical deductions like this: "$B \subseteq A$", means every element in B is in A, so if $C \subseteq B, B \subseteq A$, a proof can be "since every element in C is in B, and every element in B is in A, every element of C is in A: $C \subseteq A$". But this is first order logic? ($(c \rightarrow b \wedge b \rightarrow a)\rightarrow (c\rightarrow a)$).  Hence, both started from each other?


This is my Ubuntu version. # uname -a Linux psh-VirtualBox 5.3.0-42-generic #34~18.04.1-Ubuntu SMP Fri Feb 28 13:42:26 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux  I did the same experiment after setting the swappiness values 1 and 100. The test is to fill the cache area and then allocate more than free memory in the new process. However, none of them used the SWAP area. Even if the swappiness value is 100, isn't the SWAP area used? When swappiness = 1 # sysctl -w vm.swappiness=1 vm.swappiness = 1  swapoff -a swapon -a echo 1 > /proc/sys/vm/drop_caches echo 2 > /proc/sys/vm/drop_caches echo 3 > /proc/sys/vm/drop_caches  # free               total        used        free      shared  buff/cache   available Mem:        8152876      995524     7036300       20760      121052     6951560 Swap:       3067108           0     3067108  # dd if=/dev/zero of=./file_1 bs=1024 count=6500000  # free               total        used        free      shared  buff/cache   available Mem:        8152876      994732      356972       20760     6801172     6833516 Swap:       3067108           0     3067108  # ./memory_allocate_2G   # Another Session  # free               total        used        free      shared  buff/cache   available Mem:        8152876     3055936      129096       20760     4967844     4775416 Swap:       3067108           0     3067108  When swappiness = 100 # sysctl -w vm.swappiness=100 vm.swappiness = 100  swapoff -a swapon -a echo 1 > /proc/sys/vm/drop_caches echo 2 > /proc/sys/vm/drop_caches echo 3 > /proc/sys/vm/drop_caches     # free               total        used        free      shared  buff/cache   available Mem:        8152876      995892     7049160       20760      107824     6957692 Swap:       3067108           0     3067108  # dd if=/dev/zero of=./file_1 bs=1024 count=6500000  # free               total        used        free      shared  buff/cache   available Mem:        8152876      995236      366380       20760     6791260     6832984 Swap:       3067108           0     3067108   # ./memory_allocate_2G   # Another Session  # free               total        used        free      shared  buff/cache   available Mem:        8152876     3055936      129096       20760     4967844     4775416 Swap:       3067108           0     3067108  Would my test be wrong? thank you. And Our Live Server free info ( Why use swap when there is enough free space? ) swappiness is 10. Linux Server 3.2.0-29-generic #46-Ubuntu SMP Fri Jul 27 17:03:23 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux  $ free              total       used       free     shared    buffers     cached Mem:      32901680   29978376    2923304          0     193676    9317964 -/+ buffers/cache:   20466736   12434944 Swap:      7812092    6379492    1432600

We have a RHEL 7 machine, with only 2G of available RAM:  free -g               total        used        free      shared  buff/cache   available Mem:             31          28           0           0           1           2 Swap:            15           9           5   so we decided to increase the swappiness to the maximum with vm.swappiness = 100 in /etc/sysctl.conf instead of 10, and used sysctl -p to apply the setting.  After some time we checked the status again:   free -g               total        used        free      shared  buff/cache   available Mem:             31          28           0           0           2           2 Swap:            15           9           5   as we can see despite the new swappiness setting, we see from free -g that the available RAM stays at 2G. Why? What is wrong here?  We expected to see 15G of used swap.  We also checked:  cat /proc/sys/vm/swappiness 100   so everything should work according to the new settings BUT free shows the same situation. What is going here?


There seem to be many different ways of organizing methods in a class. I could group methods by access, and order them alphabetically. I could group related methods together. I could use a mix of the two, or something else entirely. Is there a standard way to approach this? If not, how do you approach it?

Is there an official C# guideline for the order of items in terms of class structure?  Does it go:   Public Fields Private Fields Properties Constructors Methods ?   I'm curious if there is a hard and fast rule about the order of items? I'm kind of all over the place. I want to stick with a particular standard so I can do it everywhere.  The real problem is my more complex properties end up looking a lot like methods and they feel out of place at the top before the constructor.  Any tips/suggestions?


I'm not a native English speaker, and the use of could and would always confuses me. Could someone please explain it to me?

Most people say I wish I could, I wish you would.    Can we use I wish I can, I wish you will?    I'd like to know what the main differences between the usage of can/will and could/would are when wishing.  Is it related to the subjunctive? Because one says “I wish I were”, not “I wish I am”, so are would and could the subjunctive forms of can and will?  Or is it something else entirely?


I am trying to import python files programmatically using importlib.  For instance, given a file "a/b/some_file.py", and given also there are no __init__.py files in any of those directories (nor can I add them), what is the best way to import it?  What I tried doesn't seem like it's correct: (After lunching the prompt from "a"'a parent directory and adding it to the path)   >>> importlib.import_module('a.b.some_file') ImportError: No module named a.b.some_file   I also tried a relative import but the result is the same.

How can I load a Python module given its full path? Note that the file can be anywhere in the filesystem, as it is a configuration option.


What does the small stamp/picture (usually in the upper left hand corner) on comic book covers indicate?     The Hulk below is the best example of what I am referring to (where he appears just below the "35¢" stamp). I was wondering if it was related to who was in the issue, or maybe a preview of who would be in the next issue.

I've noticed a Spider-man symbol on several of my Marvel comics from the 80's.  Any ideas on what it could mean?


I want to run a small Windows program that has no reputation. I can always scan it, but I can't get feedback from other users on its performance or if it is at all malicious.  Rather than go through the pains of creating a virtual machine, would installing the program in WINE be safe? Would the program be sandboxed from the rest of my system? Can a malicious Windows program even harm a Ubuntu system?

The Story  I installed wine some time ago, and after trying out some versions of Cinema 4D that were "free", I looked in the comments of the videos, and saw some people complaining about viruses. I got worried, downloaded and installed MalwareBytes, and scanned my "system". Of course, since MalwareBytes was runnning through Wine, it only scanned ~/.wine/C:. It found many viruses/trojans and I opted to delete them. I did so.  Questions:   Assuming there is any malware left, can this malware spread into my OS? Tell me the entire truth on what can happen. I deleted my entire .wine directory and am planning to uninstall wine later. I am the only user out of the three on this system that runs wine programs, but wine is installed for all. Is that enough, or must I do more? Please be specific on what I should do because I want to be 100% sure that there are no viruses.   I am sure that many others have these questions too, so please answer this question to the point.   Additional information:  Wine was installed with sudo-apt get. The exact commands can be found here:   Commands:  sudo add-apt-repository ppa:ubuntu-wine/ppa -y sudo apt-get update sudo apt-get install wine1.6 -y   I did try to install a font that was a ttf font. I tried to convert it to otf with no success. Then, I placed it in the fonts directory directly. I then saw that some people said it was malicious, and I removed it.  This question was flagged as  a duplicate of this question:  It is not the same. This question is more precise, as it specifies two scenarios involving viruses, not risks of viruses. The other question talked about Internet Explorer; this one does not mention the installation of any programs.  Note: wine was installed with sudo privileges, so does that mean it runs with sudo privileges?


I am looking to use my existing WD harddrive but use thunderbolt 2 instead of the usb3 A connection. I have looked for cables but all I find is type c ones.

I have the Late 2013 Macbook Pro, which has two USB 3.0 ports and two Thunderbolt 2 ports. I currently use both USB 3.0 ports and one TB2 port. I want to connect a third USB 3.0 device to the machine, but I don't want to use a USB splitter on one USB port as I'm concerned the devices would draw too much power from the bus. I have no current use for the second TB2 port and I would love to be able to use it for this purpose.   Browsing extensively online, I've found numerous docks, such as , that connect via a Thunderbolt cable. This would work, but it's an expensive, 'bulkier' solution (and not the one I'm looking for).   I'm aware that a USB 3.0 device wouldn't be able to take advantage of Thunderbolt's I/O speeds, but it's certainly compatible, which is all I'd need. After all, Apple even sells a . I also know that Thunderbolt is not only used for digital video purposes (along with the TB > Firewire option, there exists ).   There are almost no Thunderbolt to USB 3.0 cables/adapters on the market. I'd think this hardware would be more prevalent given the prominence of USB devices out there. What adapters are available for OS X?


Before I begin, here is what I'm working on   a class named "Zoo" which contains the main method an abstract class named "Animal" Several extended classes for class "Animal"   I have the code for "Zoo" posted at the bottom. I keep getting the following error when I run it   Exception in thread "main" java.lang.NullPointerException  at zoo.Zoo.add(Zoo.java:27)  at zoo.Zoo.main(Zoo.java:90)"   If I comment out the second zoo part it works fine. Why am I getting an error for the 2nd zoo? And what can I do to fix it?  public class Zoo  {  private int actual_num_animals; private int num_cages; private Animal[] animals;   Zoo() { actual_num_animals = 0; num_cages = 20; animals = new Animal[num_cages]; }  Zoo(int num_cages) { this.num_cages = num_cages; }  // adds an animal to Zoo public void add(Animal a) { for(int i = 0; i < num_cages; i++) {     if(animals[i] != null && animals[i].equals(a) == true)     {         System.out.println(a.getName() + " is already in a cage!");         break;     }     else if(animals[i] == null)     {         animals[i] = a;         actual_num_animals++;         break;     } }  }  // returns the total weight of all animals in zoo public double total_weight() { double sum = 0;  for(int i = 0; i < actual_num_animals; i++) {     sum += animals[i].getWeight(); } return sum; }  //Print out the noises made by all of the animals. public void make_all_noises() { for(int i = 0; i < actual_num_animals; i++) {     animals[i].makeNoise();     System.out.println( animals[i].makeNoise()); } }  //prints the results of calling toString() on all animals in the zoo. public void print_all_animals() { for(int i = 0; i < actual_num_animals; i++) {     System.out.println(animals[i]); } }  public static void main(String[] args) { Zoo z = new Zoo(); Snake sly = new Snake("Sly", 5.0 , 2, 2); Snake sly2 = new Snake("Slyme", 10.0 , 1, 2); Cow blossy = new Cow("Blossy", 900., 5,  10); Horse prince = new Horse("Prince", 1000., 5, 23.2);  // Following not allowed because Animal is abstract //Animal spot = new Animal("Spot", 10., 4);  z.add(sly); z.add(sly2); z.add(blossy); z.add(prince);  z.make_all_noises(); System.out.println("Total weight = " + z.total_weight()); System.out.println("**************************"); System.out.println("Animal Printout:"); z.print_all_animals();    System.out.println("********* Now we will make the Second Zoo"); Zoo z2 = new Zoo(5); z2.add(sly); z2.add(sly2); z2.add(blossy); z2.add(prince); z2.add( new Horse("Warrior", 1200, 6, 25.3)); z2.add( new Horse("Harry", 1100, 4, 21.3)); System.out.println("Total weight of z2="+z2.total_weight()); z2.make_all_noises(); z2.print_all_animals();  } }   If needed I can post the "Animal" class and the other classes that extend from it.

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


So I ran three paired samples t-tests to see if people did a certain action more after hearing a target stimulus. my prediction is that they would do the action more. All tests were one-tailed as i was only looking at one direction: did it increase after x. n = 29 for each test. the p values for tests were, First test:.061, one-tailed, Second test:p = .098, one-tailed and third test: p = .13, one-tailed. But in every result the mean was higher in the group I predicted would be higher after the stimulus. So, when I report this what can I say? Should I say that while not 'significant' they were in the 'expected direction' and that repeating the test with a larger sample is needed? In other words that there is an interesting trend and deserves more investigation? Thanks so much!

The general consensus on a similar question,  is that "highly significant" is a valid, though non-specific, way to describe the strength of an association that has a p-value far below your pre-set significance threshold. However, what about describing p-values that are slightly above your threshold? I have seen some papers use terms like "somewhat significant", "nearly significant", "approaching significance", and so on. I find these terms to be a little wishy-washy, in some cases a borderline disingenuous way to pull a meaningful result out of a study with negative results. Are these terms acceptable to describe results that "just miss" your p-value cutoff?


I installed the latest kernel (4.1) and want to boot into it instead of 3.9. How can i do this on ubuntu 15.04?

Currently I'm running Linux-3.0 and I want to update it to Linux-3.3.1 the latest stable kernel release as mentioned at . Can I update to 3.3.1 in Ubuntu without any risk of crashes? I'm updating my kernel regularly as provided by the Update Manager..Currently I have Linux-3.0.0.17..Can I update?  NOTE:  The latest kernel version any user is supposed to use in Ubuntu is updated automatically via the Update Manager, so no action is normally required by user regarding kernel upgrades. What the question author is referring to is mainline kernel, see:


How can I use regex to replace all the characters in a string that are either alphabetic, a forward slash, a period or double quotations?  I am able to do letters:  "abcd123/./"".replace(/([^\x00-\x80]|\w)/g, "someReplacementText"));

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


Is there any way to find out the motherboard for my dell e6420 without opening the machine?  I want to find out the maximum and type of ram.

I want to find out the exact model of my computer's motherboard so that I can see what sort of memory chip, graphics cards and other components it supports.  I'm using Windows 7 Ultimate 64-bit.


My dad died, and I loved him very much but he restricted parts of my life that are no longer restricted. Is there a word for the uncomfortable and sometimes disturbing feeling of enjoying that?

I frequently find myself needing a word to express happiness that acknowledges a tragic or unfortunate circumstance underpinning that happiness. Preferably the word could have both adjective and verb forms. For example, "Gregory [verb-ed | felt adjective about] the balmy February day, suspecting it was yet another consequence of catastrophic and irreversible climate change."  "Bittersweet" is close, but not precisely right. It implies ambivalence rather than genuine gladness. "Schadenfreude" is also in the neighborhood, but I don't want to imply that the tragic part of the situation is what causes the pleasure. (Also, I recognize that the word may not quite exist in English, and I don't know if this is forbidden for this forum, but I'd welcome a loan word or phrase if there's a better one.)


How can I determine the version of the running kernel?

The path to previous driver is usually /lib/modules/<kernel-version>/kernel/net/wireless  I need this info so I can finish updating my STA Broadcom wireless. However, I'm a noob at Ubuntu and I'm not sure how to find the kernel version or kernel. I checked /lib/modules/ and found this: 2.6.27-10-generic  2.6.32-30-generic  2.6.32-34-generic  2.6.32-38-generic 2.6.27-7-generic   2.6.32-31-generic  2.6.32-35-generic  3.2.0-54-generic 2.6.28-19-generic  2.6.32-32-generic  2.6.32-36-generic  3.2.0-54-generic-pae 2.6.31-23-generic  2.6.32-33-generic  2.6.32-37-generic  Which one is the running kernel? Another question. Is there a snippet so I don't have to cut and paste? Thanks for your time! :)


I love playing Minecraft servers on my phone, but it usually baffles me that when I want to play my most favorite server, CubeCraft, has higher ping than the rest of the servers. Now, to put it simply, I'm from GMT+8, so I'm somewhere at Asia, and the only server that has normal ping is The Hive, the only featured server with an Asian region. The others are from either NA (Lifeboat, Mineplex, Mineville, Galaxite) or EU (CubeCraft, Galaxite), and they give around 200 ping, whereas EU servers give 300 ping. In Hive AS, the ping is usually 69. So why does servers in foreign regions give higher ping?

I've seen the term used in many online games but I'm not sure what it means. What does 'ping' mean? Is it better to have high or low ping?


I have a table called cc_calls and there I have many call records I want to count them and group them in months I have a timestamp called starttime and I can use that row to extract the month, also limit the count for 12 months  the results should be like:  Month       Count  January     768768 February    876786 March       987979 April       765765 May         898797 June        876876 July        786575 August      765765 September   689787 October     765879 November    897989 December    876876   Can anyone guide me or show me the mysql query that I need to get this result.

Is it possible to make a simple query to count how many records I have in a determined period of time like a year, month, or day, having a TIMESTAMP field, like:   SELECT COUNT(id) FROM stats WHERE record_date.YEAR = 2009 GROUP BY record_date.YEAR   Or even:  SELECT COUNT(id) FROM stats GROUP BY record_date.YEAR, record_date.MONTH   To have a monthly statistic.   Thanks!


I'm trying to make a minigame where you have different kits. You step on a pressure plate and get all your armor and effects added. That's all working fine. I'm trying to make it so it places a sign above the pressure plate saying "TAKEN" "BY" "[PLAYERWHOHASTHATKIT]" In bold dark red Is this possible? I've tried /blockdata ~ ~-1 ~ {"Text3":"@p"}with all the other text I want. Is this possible?

So I am currently making a minecraft custom map (for 1.9). I want to make the player "say" something using /tellraw commands. I did figure out how to make the player name come up using /say commands, but still have no idea how to do it using the /tellraw command.  How do I do that?


I recently had this error, and surely other people also are going to have when they update the POSTGIS and POSTGRESQL, so I want to share the solution.  OS: CENTOS 6 (x86_64)  Installed: postgresql-9.6 from   yum install postgresql96-server postgresql96   installer: postgis2_96  yum install postgis2_96   problem/error when start to enable POSTGIS using psql or pgAdminIII :  psql (9.6.3)     postgres=# \connect SANTANDER     You are now connected to database "SANTANDER" as user "postgres".     SANTANDER=# CREATE EXTENSION postgis;     ERROR:  could not load library "/usr/pgsql-9.6/lib/postgis-2.3.so": /usr/pgsql-9.6/lib/postgis-2.3.so: undefined symbol: pj_get_spheroid_defn   I checked the PROJ version:  $ yum list installed | grep proj  proj.x86_64        4.7.0-1.el6                           @epel   the problem is solved upgrading the PROJ  $ yum upgrade proj Updated:   proj.x86_64 0:4.8.0-2.rhel6

OS is openSUSE 12.1, PostgreSQL - 9.1, PostGIS - 2.0. Postgre/PostGIS are installed from Application:Geo repository.  After recent updates when I try to connect to my database I get the following error:      ERROR:  could not load library "/usr/lib/postgresql91/lib64/postgis-2.0.so":  /usr/lib/postgresql91/lib64/postgis-2.0.so: undefined symbol: pj_get_spheroid_defn   I searched the web for this error (, ) and seems that it may have something to do with ld.so.config (or ldconfig command). But I can't figure out what I have to do in my case.


After I made a system upgrade (apt-get upgrade) on a Debian box, I get an error every time I try to use apt-get. Example:  # apt-get -f install Reading package lists... Done Building dependency tree Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 8 not upgraded. 1 not fully installed or removed. After this operation, 0 B of additional disk space will be used. Setting up initscripts (2.88dsf-41+deb7u1) ... insserv: Service killprocs has to be enabled to start service single insserv: exiting now! update-rc.d: error: insserv rejected the script header dpkg: error processing initscripts (--configure):  subprocess installed post-installation script returned error exit status 1 Errors were encountered while processing:  initscripts E: Sub-process /usr/bin/dpkg returned an error code (1)   I have tried to find a solution, but can't find anything that looks like this. First of all I have this packet which is "not fully installed or removed". But I can't find the command to locate it.   But it lists about 20 packets, so there must be a better way to find this packet.  To fix the packet system I have tried normal procedures, like:  apt-get clean && sudo apt-get autoremove  apt-get -f install dpkg --configure -a   The clean command is good, but the install command will fail with as shown above.  In a desperate try, I tried to reinstall insserv (not sure it's the packet which is broken), but it fails the same way:  # apt-get install --reinstall insserv Reading package lists... Done Building dependency tree Reading state information... Done 0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 8 not upgraded. 1 not fully installed or removed. Need to get 63.8 kB of archives. After this operation, 0 B of additional disk space will be used. Get:1 http://ftp.us.debian.org/debian/ wheezy/main insserv armel 1.14.0-5 [63.8 kB] Fetched 63.8 kB in 0s (85.5 kB/s) Setting up initscripts (2.88dsf-41+deb7u1) ... insserv: Service killprocs has to be enabled to start service single insserv: exiting now! update-rc.d: error: insserv rejected the script header dpkg: error processing initscripts (--configure):  subprocess installed post-installation script returned error exit status 1 Errors were encountered while processing:  initscripts E: Sub-process /usr/bin/dpkg returned an error code (1)   Hope some of you can help me fix the issue.  Edit Got a bit further:  dpkg --audit The following packages are only half configured, probably due to problems configuring them the first time.  The configuration should be retried using dpkg --configure <package> or the configure menu option in dselect:  initscripts          scripts for initializing and shutting down the system  The following packages are missing the list control file in the database, they need to be reinstalled:  insserv              boot sequence organizer using LSB init.d script dependenc  ssmtp                extremely simple MTA to get mail off the system to a mail  The following packages are missing the md5sums control file in the database, they need to be reinstalled:  insserv              boot sequence organizer using LSB init.d script dependenc  ssmtp                extremely simple MTA to get mail off the system to a mail  binutils             GNU assembler, linker and binary utilities   But I'm still not able to fix anything:   # dpkg-reconfigure initscripts /usr/sbin/dpkg-reconfigure: initscripts is broken or not fully installed   and:  # apt-get install --reinstall initscripts Reading package lists... Done Building dependency tree Reading state information... Done 0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 8 not upgraded. 1 not fully installed or removed. After this operation, 0 B of additional disk space will be used. E: Internal Error, No file name for initscripts:armel

After I made a system upgrade (apt-get upgrade) on a debian box, I get an error everytime i tries to use apt-get. Example:  # apt-get -f install Reading package lists... Done Building dependency tree Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 8 not upgraded. 1 not fully installed or removed. After this operation, 0 B of additional disk space will be used. Setting up initscripts (2.88dsf-41+deb7u1) ... insserv: Service killprocs has to be enabled to start service single insserv: exiting now! update-rc.d: error: insserv rejected the script header dpkg: error processing initscripts (--configure):  subprocess installed post-installation script returned error exit status 1 Errors were encountered while processing:  initscripts E: Sub-process /usr/bin/dpkg returned an error code (1)   I have tried to find a solution, but can't find anything that looks like this. First of all I have this packet which is "not fully installed or removed". But I can't find the command to locate it. Have tried:  dpkg -l | grep rc   But it list about 20 packets, so there must be a better way to find this packet.  To fix the packet system I have tried normal procedures, like:  apt-get clean && sudo apt-get autoremove  apt-get -f install dpkg --configure -a   The clean command is good, but the install command will fail with as shown above.  In a desperate try, I tried to reinstall insserv (not sure it's the packet which is broken), but it fails the same way:  # apt-get install --reinstall insserv Reading package lists... Done Building dependency tree Reading state information... Done 0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 8 not upgraded. 1 not fully installed or removed. Need to get 63.8 kB of archives. After this operation, 0 B of additional disk space will be used. Get:1 http://ftp.us.debian.org/debian/ wheezy/main insserv armel 1.14.0-5 [63.8 kB] Fetched 63.8 kB in 0s (85.5 kB/s) Setting up initscripts (2.88dsf-41+deb7u1) ... insserv: Service killprocs has to be enabled to start service single insserv: exiting now! update-rc.d: error: insserv rejected the script header dpkg: error processing initscripts (--configure):  subprocess installed post-installation script returned error exit status 1 Errors were encountered while processing:  initscripts E: Sub-process /usr/bin/dpkg returned an error code (1)


I have just reviewed about 8 suggested edits. Out of those, 5 were edits where nothing was changed besides one word "debuging" in the title was changed to "debugging".  I think there are probably other common programming words that people constantly typo. If it's in the post it's minor, but maybe an auto-correct for the title?  A very small suggestion, but I thought I'd throw it out there anyway.  Update  I'm sorry, but I don't agree with the closing decision or the downvotes. First of all, this post isn't a duplicate of the linked for two reasons:   The problem I'm pointing to isn't with bad grammar. I'm talking about having a list of specific programming words that are constantly being typo'd I'm only referencing mistakes in titles, and not in posts.   To quote @AlienArrays comment:     I just searched this stackoverflow.com/search?q=boostrap, got over   1100 results! Maybe we should hold a rally or something and go through   one word a day!   I find it hard to believe that autocorrecting those manually is anything but a waste of time. With all the due respect to community fixing, I'm talking about specific typos that happen again and again and again. There's no point in not auto-fixing them.  Now with questions it makes sense to me to leave editing to other users, because if it's a well written post, changing an i to an I is minor, and most users will avoid editing and it doesn't really matter all that much. If a post is written badly, either it will be ignored because it doesn't deserve the attention or the typos will be fixed along with other more important edits. My point is, they get treated in the context of the rest of the question, which varies.  But titles? Anyone can make a stupid typo like writing debuging instead of debugging, regardless of the quality of the post. I find it surprising that suggesting to automatically fix that (which will probably save a ton of time, and make for better search results) receives such negative responses.  Another update  I'd like to quote the answer of the @ire_and_curses  which I think says everything (emphasis mine):     I think some automated cleanup would be beneficial [...] Despite what   users on meta claim, manual community cleanup is not sufficient to   keep up with the incorrect grammar and typos. Take a look through any   random selection of questions on Stack Overflow. You'll find them full   of errors, even ones with lots of votes and answers.      In a related way, I also think a lot of tag cleanup tasks could be   automated [...] One thing that does surprise me is how   ambivalent/negative the reaction seems to be to this sort of proposal.   On a website dominated by people whose job it is to automate things, I find the answer 'we have people to do that manually' difficult to   understand.   I couldn't have said it better myself. Even if you still think my post is a duplicate, it doesn't seem like the previous post received a canonical answer that closed the subject for good. I think it's important this issue deserves some more attention and debate, and as you can see from the quote, I'm not the only one to think so.  Suggested solution  @Shog9 mentioned in comments that there are no alternatives. I'd like to respond to that with my suggested solution: have a dictionary for common cases. I can think of two good ways to populate it:   Recognize common edits (if word 'a' as changed to 'b' more than 20 times, the next time it will be replaced automatically). Let users higher than 2K populate and change the list as they please.   Obviously, this sort of thing needs to be done with caution, but I think it's solvable (either with my suggestion, or using a different auto-correcting tools).  Even still, we can solve this without actually autocorrecting automatically - here's another suggestion: Have a small warning pop up to users when the autocorrecting tool recognizes a possible mistake in the title. You still leave it to the users to fix, but you are doing something to maybe prevent too much mistakes and tons of repeated edits. How's that?

I have noticed this in hundreds of questions.   Most of the users use invalid lower case letters. "i" instead of "I" and "how to do..." instead of "How to.." Other than that I can see a lot of abbreviated words like "plz", "thx", etc.  However, they are not nice to see on a Q&A site. And these are the things that can be corrected by a bot (or even when submitting the question).  I just wanted to add this as a new idea.


I believe that I was in the shading tab. I entered into editing mode to resize the plane. When I was done, I noticed that the plane was in a completely different location in the viewport mode and cut off in the corner. Also, most of the objects were not visible. However everything is still visible in render mode. The only things that I can get to show in the viewport are: the reference image, a piece of the camera, and the plane, but it's in the wrong position and also missing a corner. Copy of the project file:

When looking at my objects in 3d view I'm seeing a gray cone that seems to be hiding other objects.   Can anyone help me turn this off and explain what it is please.  Screenshots attached.


In settings, I don't see a way to stop the PC from going to sleep.

I've been fiddling with my new Haswell macbook air (with Mountain Lion), and there's a difference between the "energy saver" settings on my macbook vs my 2011 iMac. On my iMac, there's a "Computer Sleep" as well as a "Display Sleep" setting, but the macbook air only has "Display sleep":    When I don't use the computer for an hour or so, I want the display to go to sleep, but the computer should still be on, and shouldn't e.g. disconnect me from my chat sessions. How can I do this?  Thanks for your help.


I'm on a rather old version of ubuntu, zesty 17.04. I am trying to update / upgrade.   Firstly, is it correct to be upgrading to 17.10 and then 18.04?  The process I have followed to get to the errors below, I'm not sure if its the W, N or E's in the errors that are the problem.  /etc/apt/sources.list file contains only this  deb http://old-releases.ubuntu.com/ubuntu/ ARTFUL main restricted universe multiverse deb http://old-releases.ubuntu.com/ubuntu/ ARTFUL-updates main restricted universe multiverse deb http://old-releases.ubuntu.com/ubuntu/ ARTFUL-security main restricted universe multiverse   I have removed all files from /var/lib/apt/lists and /etc/apt/sources.list.d/  I then run this:   sudo apt update --allow-insecure-repositories --allow-unauthenticated   this is the last part of the output, where the errors / warnings start.  Ign:57 http://old-releases.ubuntu.com/ubuntu ARTFUL-security/universe all Packages Reading package lists... Done W: The repository 'http://old-releases.ubuntu.com/ubuntu ARTFUL Release' does not have a Release file. N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use. N: See apt-secure(8) manpage for repository creation and user configuration details. W: The repository 'http://old-releases.ubuntu.com/ubuntu ARTFUL-updates Release' does not have a Release file. N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use. N: See apt-secure(8) manpage for repository creation and user configuration details. W: The repository 'http://old-releases.ubuntu.com/ubuntu ARTFUL-security Release' does not have a Release file. N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use. N: See apt-secure(8) manpage for repository creation and user configuration details. E: Failed to fetch http://old-releases.ubuntu.com/ubuntu/dists/ARTFUL/main/binary-i386/Packages  404  Not Found E: Failed to fetch http://old-releases.ubuntu.com/ubuntu/dists/ARTFUL-updates/main/binary-i386/Packages  404  Not F                        ound E: Failed to fetch http://old-releases.ubuntu.com/ubuntu/dists/ARTFUL-security/main/binary-i386/Packages  404  Not                         Found E: Some index files failed to download. They have been ignored, or old ones used instead.

Recently I have installed an older version of Ubuntu on my old machine. Whenever I try to install any software, I get an error saying it couldn't be found:  $ sudo apt-get install vlc Reading package lists... Done                Building dependency tree        Reading state information... Done     E: Couldn't find package vlc


While using INDEX and REGEXEXTRACT, how can I change this formula to return a blank cell (instead of 0) when all of the cells in that section are blank?

I am using the following formula in a Google Sheets to calculate the number of days between two dates (dates are in columns G and AL):  =ARRAYFORMULA(if(row(A:A)=1, "Readmission Days", (G:G)-(AL:AL)))   It has to be an array because I am working with a Google Forms and entries are automatically populated into new rows.  The problem is that some of the cells in col AL are blank, so the formula is reading those dates as something else and returning a very large number. Also, when both cells are blank, the formula returns a 0, messing up my data.  How can I include something to ignore blank cells or just return a blank when one or both cell references is blank?


I'm looking for an application/service that provides a usable desktop (icons, etc.) and takes its directory from ~/Desktop (running a custom Ubuntu installation where Nautilus was broken and so removed). Any suggestions are welcome.

Are there any good alternatives to Nautilus? I'm looking for something lightweight, with a cleaner interface, but the ability to manually enter file paths is still important. Any suggestions?


I am a middle school student and I want to learn more about physics from A - Z but I don't know any book or website that is useful. Can you share me some suggestions?

Every once in a while, we get a question asking for a book or other educational reference on a particular topic at a particular level. This is a meta-question that collects all those links together. If you're looking for book recommendations, this is probably the place to start.  All the questions linked below, as well as others which deal with more specialized books, can be found under the tag  (formerly ).  If you have a question to add, please edit it in. However, make sure of a few things first:   The question should be tagged  It should be of the form "What are good books to learn/study [subject] at [level]?" It shouldn't duplicate a topic and level that's already on the list   Related Meta:


Prove that a finite group $G$ is nilpotent if and only if whenever $a, b \in G$ with $gcd(o(a), o(b)) = 1$, then $ab = ba$.  I know that a finite group G is nilpotent iff it is a direct product of its sylow subgroups.  $(\implies)$ Let G be nilpotent. So, it is a direct product of its sylow subgroups.  $\therefore G=P_{1}\times P_{2}\times \ldots \times P_{k}$  i.e. $G=P_{1}P_{2}\ldots P_{k}$ where each $P_{i}\lhd G \;\forall\,i\in \{1,2,\ldots,k\}$, and $(P_{1}P_{2} \ldots P_{i})\cap P_{i+1}=\{e\} \;\forall\,i\in \{1,2,\ldots,k\}$.  Consider $a,b \in G$ such that $gcd(o(a),o(b))=1$  Case 1: If $a=e \;\; or \;\; b=e$  There is nothing to prove in this case  Case 2: If $a\neq e\neq b$  If $a,b\in P_{i}, \; sylow\;p_{i}-subgroup$ for some $i$, then $gcd(o(a),o(b))\geq p_{i}>1$. Hence, a contradiction.  $\therefore a\in P_{i}, b\in P_{j},\; i\neq j$  Also, $P_{i}\cap P_{j} = \{e\}$  So, $aba^{-1}b^{-1}\in P_{i}\cap P_{j} $.  Hence, $ab=ba$  $(\impliedby)$ Here if I prove that each of the sylow subgroups of G is normal in G, and I already have trivial intersection for each sylow subgroup of distinct primes. So, I would have G as the direct product of sylow subgroups which would imply G is nilpotent.   I am not able to think how to prove the normality part. Please give some hints.  Also, please check the forward implication.  Thanks!

(Question 9 in chapter 6.1 of Dummit and Foote). Prove that a finite group G is nilpotent if and only if whenever $a, b \in G$ with $(|a|, |b|) = 1$ then $ab = ba$. It says to use the following theorem:  Let G be a finite group, $p_1$, $p_2$, ... $p_s$ be the distinct primes dividing its order, and $P_i \in Syl_{p_i}(G)$. Then G is nilpotent iff $G \cong P_1 \times P_2 \times ... P_s$.  I believe I know the if direction: an element $a \in G$ corresponds to an element $(g_1, g_2, ... g_s) \in P_1 \times P_2 \times ... P_s$ and $|a| = lcm(|g_1|, |g_2|, ... |g_s|)$. If $b$ corresponds to $(h_1, h_2, ... h_s)$ then $(|a|, |b|) = 1$ implies each $(|g_i|, |h_i|) = 1$. Since the order of the elements divides $|P_i|$ a prime power, $|g_i|$ or $|h_i|$ has to be 1 or their gcd would not be 1. So one of every pair $g_i$ and $h_i$ has to be 1, so they commute, so $a$ and $b$ commute.  I'm not sure how to do the only if direction. Any pointers? Thank you


After installing Ubuntu 12.04 on my system, Windows XP won't boot any more. Ubuntu starts ok however.   When starting Windows in the Grub menu, it give's an error:  ERROR: UNKNOWN FILESYSTEM. GRUB RESCUE   I've tried to resolve it using boot-repair but with no result. Also tried the booterrorfix as suggested but no result.  Boot-repairs logs the following info:     Your support is much appreciated.

So I installed Ubuntu 12.04 alongside Windows XP, and I played with it for a like an hour. When I wanted to go back to Windows, I chose the Windows option in the GRUB screen. It just gives a black screen and goes back to grub. I tried boot-repair as I've seen in some other post that it could resolve the problem, but it's all the same. Nothing changed. I can use Ubuntu but not Windows. Can someone please tell me how I can solve this? Thanks.


I have a rectangle that i want to fill with a color. When i write Fill = "#FFFFFF90" it shows me an error:     Cannot implicitly convert type 'string' to 'System.Windows.Media.Brush   Please give me some advice.

I have a configuration file where a developer can specify a text color by passing in a string:   <text value="Hello, World" color="Red"/>   Rather than have a gigantic switch statement look for all of the possible colors, it'd be nice to just use the properties in the class System.Drawing.Brushes instead so internally I can say something like:   Brush color = Brushes.Black;   // Default   // later on...  this.color = (Brush)Enum.Parse(typeof(Brush), prasedValue("color"));   Except that the values in Brush/Brushes aren't enums.  So Enum.Parse gives me no joy.  Suggestions?


I'm trying to repair damaged power supply. I've already replaced some burned/shorted diode and mosfets. Now I'm struggling with resistor connected between main mosfet's drain and ground. It should be probably 0.5 - 1 ohm one. My meter is reading 0.1 ohm, which is probably too low. I'm not able to read the value from the color stripes properly. They're probably violet, green, white (silver?), red and black. I'm guessing 0.75 ohm ww. Can somebody please help me to confirm this? I've tried to search similar questions, but the white stripe is confusing me.   I've temporarily tried to replace it by two 3.9 ohm 2 watts ones in parallel. Power supply seems to be starting ok with them. Haven't tried with higher load yet. With the original resistor, the main fuse gets burned immediately after powering on.

I am currently in the process of trying to repair a power supply that has had one of its DC rails fail. A resistor in the PSU has exploded and I am trying to find what value it is.    Band 1: White Band 2: Brown Band 3: Silver (Possibly Grey?) Band 4: Gold Band 5: Green    The weird thing is that the middle band appears to be silver, which should be invalid as far as I can tell. If you assume the silver is grey (although this is unlikely, as there still needs to be a grey colour as well and the band is metallic), it produces a value of resistor which is incredibly uncommon to the point it does not exist (91.8 Ohms 0.5%).  Apologies for the noobie question, I'm just stumped after hours of trying to understand why this is and coming up short :).


I want to group all pharmacies present in the same night in a unique row following this night.  select days.day, pharmacy.name from days,      pharmacy,      pharmacy_night where (pharmacy.Id_pharmacy in (SELECT Id_pharmacy                                 FROM pharmacy_in_region(@idregion))   and pharmacy.Id_pharmacy = pharmacy_night.Id_pharmacy   and days.Id_day = pharmacy_night.Id_day)   The desired output:  row 1: Monday  Pharmacy1_pahrmacy5- row 2: Tuesday pharmacy9_

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


In JVM float value stores in binary system. But how it exactly stored? In example.  int value = Math.pow(10,8) + 1;  float f = value;  int back = (int)f;   back value is equal to 10^8. Where is 1

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


I see the following code in HPUX C program:     extern int fcntl __((int, int, ...));    _LF_EXTERN int creat __((const char *, mode_t));   These lines are compiled using aCC.  Could somebody let me know the meaning of 2 underscores after fcntl and creat in the above code?

I was taking a look through some open-source C++ code and I noticed a lot of double underscores used within in the code, mainly at the start of variable names. return __CYGWIN__;  Just wondering: Is there a reason for this, or is it just some people's code styles?  I would think that it makes it hard to read.


I have a target string like:     "addr: line1           line2        tel:12345678"   note: between line2 and tel, there might be 1 or multiple new lines:\r\n or \r\n\r\n or more. The result I want to get is as below:     "addr: line1           line2"   no \r\n under line2.  My questions are:  1)If I use      /addr[\s\S]+(?=(\r\n)+tel)/   , i will get the addr without tel, but I can't get rid of "\r\n"s under "line2", how could I do that?  2)I know [\s\S] represents any characters including \r,\n, and (.|\n|\r) can do that too.   But why [.\n] can't? It's just like the syntax of[\s\S] isn't it?  Thank you very much!

I have this gigantic ugly string: J0000000: Transaction A0001401 started on 8/22/2008 9:49:29 AM J0000010: Project name: E:\foo.pf J0000011: Job name: MBiek Direct Mail Test J0000020: Document 1 - Completed successfully  I'm trying to extract pieces from it using regex. In this case, I want to grab everything after Project Name up to the part where it says J0000011: (the 11 is going to be a different number every time). Here's the regex I've been playing with: Project name:\s+(.*)\s+J[0-9]{7}:  The problem is that it doesn't stop until it hits the J0000020: at the end. How do I make the regex stop at the first occurrence of J[0-9]{7}?


Why does reanimated Itachi bleed while using Ametarasu (Naruto, killerbee vs reanimated Nagato, Itachi fight), while no other reanimated shinobi bleed when attacked? For example, Minato didn't bleed when his arm got chopped off, and third Raikage didn't bleed when he got struck by Naruto.

In the Fourth Great Ninja War, when Obito makes the Ten-Tails transform the into God Tree that devoured the chakra of all the shinobi it touched (or its branches), where you will see Sarutobi Hiruzen cutting/destroying the branches of the Ten-Tails' tree form, and he does that with the help of Enma's transformation - Adamantine Staff. When Sandaime Hokage is summoned using the  "Impure World Reincarnation", you aren't supposed to have any blood in you to summon Enma.  So, now if you check the naruto wiki, to summon a contract animal, first of all we would need to have a blood contract with the summoning animal, Afterwards they only need to offer an additional donation of blood on the hand they signed the contract with, mould their chakra with hand seals and then plant the hand they signed the contract with at the location they wish to summon the creature.  So, was it a flaw to show Sandaime Hokage with Adamantine Staff or is there any other technique this is used to summon a contract animal. Or was this explained in Manga..


There was this movie I saw around ten years ago where some children play a board game and then experience whatever happens on the board. There was this one scene I remember in which one child gets trapped inside an elevator. The movie happens when the parents go out somewhere and the children start playing this board game. The board game ends just before the parents arrive back home. The children in the movie were kids of around ages 8 or 9.

I can't remember the title. It's a board game where two brothers played it. When they played the board, it sent them to space? It's a board where I think it has different levels,each levels has a card, and each levels has different obstacles in space? One level in there, they even put their house being pulled by the sun? And there is also a part there where there is an astronaut.


Can i copy the Question from stack overflow and answer it in my blog and place the blog link in stack overflow?  By doing this, Am I violating any of the terms & conditions?  Please let me know? Thanks

I just found http://programmingfaq.w3ec.com/faq/4761/whats-the-hi-lo-algorithm which has an exact copy of this Stack Overflow question, , with all its answers and no difference in a single character. There is no reference to Stack Overflow.  Is this legal, or at least tolerated? Is this impertinent theft of information? I just can't see any sense in copying whole pages, particularly when not referencing the source.


I have the following piece of text in Latex: \texttt{List<List<Integer>>} and it was rendering properly. Then, I decided to use beramono as my typewriter font, and I have a problem: >> is now rendered as a » character. How should I fix it? In a listing environment, >> is shown correctly.

I have an inline code example with a nested Java generic declaration, using the typewriter typeface. However, the closing >> is rendering as a black box. A cursory Google search suggested $>>$, but this removes the typewriter font. Using \textgreater in place of the actual > also encounters the same problem. Here is the offending snippet:  ...declaration {\tt List<Map<Integer, String>>} is...   Any ideas?


So I have been given an assignment to recover an encryption key through the method of brute force. I know the keyspace is 2^16. I have the ciphertext, and I have the encryption/decryption algorithms. My problem is I have no clue how one would begin any sort of brute force attack. I don't require any cryptoanalysis from anyone, just maybe some tips and tricks, or a good resource anyone may know of that might help me realize my goal. This is my first time attempting anything like this. I'd really appreciate it guys. If it would helpful in determining what advice I'd need: The assignment code is given at  under lecture notes 2. "With BLOCKSIZE set to 16, the script EncryptForFun.py produces the following ciphertext output for a plaintext message that is a quote by Mark Twain: 20352a7e36703a6930767f7276397e376528632d6b6665656f6f6424623c2d\ 30272f3c2d3d2172396933742c7e233f687d2e32083c11385a03460d440c25 Recover the encryption key and decode the message"

Given a CBC ciphertext and IV, how can I find the encryption key?  We are limited with an 8 chars key, each char in the range of [a..h], so I can generate every possible key (these are only $8^8 = 2^{24}$ (about 4 million) different possible keys).  How would I go about finding the correct one though?


I am 22, living with my parents. I plan to buy a house in the next 4 or 5 years. I want to learn more about home improvement so I can renovate my future house easily. My dad does renovations, but I see how his lack of education in this domain makes him do mistakes occasionaly. I want to learn about this domain in case I need to renovate a part of my house or if I need to hire a contractor and make sure he is qualified.  What can I do to learn about home improvement? Read books?

I am a new homeowner and know literally almost nothing about home improvement. I would like to learn basic concepts by doing things one at a time...but I can't just jump in and do most things. Are there any good resources (websites/books) that provide project ideas or tutorials that are organized from extremely basic to very advanced? I could use this to start with things extremely basic and learn skills and get ideas as I go.


How can I make a command (or is there an existing one?) which takes two arguments: 1) character type 2) N (count) and puts N number of characters side by side?  \newcommand{\foo}[2] {     % sample: \foo{c}{3} -> ccc }

Is it possible to define a command, which repeats the following command n-times? Call it for example \Repeat, then   \Repeat[4] \command{...}    should be equivalent to   \command{...} \command{...} \command{...} \command{...}


Let $R$ be a ring without identity and with no zero divisors. Let $S$ be the ring whose additive group is $R \times \Bbb{Z}$. Let $A = \{(r,n)\in S \mid rx + nx = 0 \text{ for every } x \in R\}$.   (a) $A$ is an ideal in $S$.   (b) $S/A$ has an identity and contains a subring isomomorphic to $R$.   (c) $S/A$ has no zero divisors.    Multiplication on $R \times \Bbb{Z}$ is defined like so: $(r,n) \cdot (s,k) = (rs + kr + ns,nk)$. I was able to prove parts (a) and (b), but I am having trouble with part (c). I could use a hint.   On a somewhat related note (perhaps I might stretch the definition of "related"), to prove that the quotient of a principal ideal ring is a principal ideal ring, wouldn't I just use the fact that $f : R \to R/I$ defined by $f(r) = r + I$ is a surjective ring homomorphism, and so if $R$ is a principal ideal ring, so is $f(R) = R/I$? I asked this in chat but didn't receive any responses; and I didn't think this question merited its own post.

I am having trouble with another homework problem (Hungerford, Algebra, Problem 12, Chapter III, Section 2).  Let $R$ be a ring without identity and with no zero divisors. Let $S$ be the ring whose additive group is $R \times \mathbb{Z}$ with multiplication given by $$(r_1,n_1)(r_2,n_2)=(r_1r_2+n_2r_1+n_1r_2,n_1n_2).$$ Let $A=\{(r,n) \in S \mid rx+nx=0 \text{ for all } x \in R\}$. (a) $A$ is an ideal in $S$. (b) $S/A$ has an identity and contains a subring isomorphic to $R$. (c) $S/A$ has no zero divisors.  I've done (a) and (b), but haven't been able to crack (c). Here's what I have so far: (c) Suppose $((r, n) + A)((s, m) + A) = (0, 0) + A$. Then $(r, n)(s, m) \in A$, so $(rs + mr + ns)x + (nm)x = 0$ for all $x \in R$. But $(rs + mr + ns)x + (nm)x = rsx + mrx + nsx + nmx = r(sx + mx) + n(sx + mx)$. Now here we have an expression involving $r(something) + n(something)$ and $s(something) + m(something)$, and I want to say that if it's zero for all $x$ then $rx + nx = 0$ for all $x$ or $sx + mx = 0$ for all $x$, but all I seem to be able to say is that $rx + nx = 0$ for all $x = sx' + mx'$, which is not (or not obviously) what I want. I appreciate any help!


The image shows a contestant being asked what the probability is of randomly selecting the right answer. $4$ options are given: $2$ being $25\%$ and the other two being $50\%$ and $0\%$.  Basically I’m in disagreement with someone over this question. The question in the picture is a paradox but I think the probability of randomly choosing the option $25\%$ is $2/4$ or $1/2$ since it is repeated, while my friend believes it is $1/3$ since there are technically three options. Anyone able to give a conclusive answer?

I found this math "problem" on the internet, and I'm wondering if it has an answer:     Question: If you choose an answer to this question at random, what is the probability that you will be correct?      a. $25\%$      b. $50\%$      c. $0\%$      d. $25\%$   Does this question have a correct answer?


I have a long scope for my laser musket but would like to scrap it and build a medium scope. Is there a way to scrap the actual long scope itself?

Let's say I have 10mm pistol. Can I break it down so I'm left with no pistol, and a [barrel, magazine, sight, grip] etc?  I ask because I'm finding myself in the early game with mods across 3-4 pistols that I'd like to combine into one, but I lack the extra junk/spare mods to swap things around.


I do a lot of work with table variables before finally presenting result sets to the user.  For example, I might pull in a whole load of columns from many different tables like this:  DECLARE @tmp TABLE ( ID int, username nvarchar(50),  -- data taken from tbl_Users site nvarchar(50),      -- data taken from tbl_Sites region nvarchar(100),   -- data taken from tbl_Regions currency nvarchar(5)    -- data taken from tbl_Currencies )   I spend a lot of time looking through the Object Explorer to ensure that the data length of the columns in correct (matches the original tables).  Sometimes if I change the table schema but don't update all the procedures, I might get caught out with a truncation error.  Is there any issue with taking a lazy approach and just doing this:  DECLARE @tmp TABLE ( ID int, username nvarchar(max), site nvarchar(max), region nvarchar(max), currency nvarchar(max) )   Does nvarchar(max) actually use up any more memory or this the allocated memory based on the data size?  Are there any other gotchas?  Please note that I am aware of third-party tools for jumping to the definition, but that's not what I'm asking.  UPDATE  The duplicate question has value, but the question is not identical IMHO.  The duplicate revolves around the design of actual tables, not table variables.  However, there is some merit in the answers, namely:   nvarchar(max) vs nvarchar(8000) are no different in resource usage until 8000+ data lengths Business logic layers rely on structure and meaningful data, so specifying a column size that compliments the original provides value   In that sense, it would seem that it is fine to use nvarchar(max) in table variables instead of nvarchar(n), but it has a reliability and performance risk in some environments.  If you think this should be deleted then fair enough (but please stop arguing I appreciate all input!)

In SQL Server 2005, are there any disadvantages to making all character fields nvarchar(MAX) rather than specifying a length explicitly, e.g. nvarchar(255)? (Apart from the obvious one that you aren't able to limit the field length at the database level)


I am a Computer Science M.Sc. Student in a university in a developing country. I am planning to apply for PhD this year. Actually my main reasons to not continue my PhD here, are the issues related to my country economics and infrastructures. Poor dorm conditions, no funded PhD, unstable internet, no proper study place in university are some of them where decrease the quality and contributions of a PhD student and I think that those issues will be solved by the migration to USA itself and is not related to the rank of the destination university. to make my question clear, actually I want to know what are the benefits of a top 20 university in USA saying, Caltech over a top 70 university saying, Oregon State University . I can imagine one or two like the strong advisor and peers but I can't think more. please note that I am not asking about the after-graduation job perspective, I mean What is the effects on the quality and contributions of a PhD student to study in a top-20 instead of a top-70 university.  P.S: if it matters ranks are according to the US News portal.

What I'm trying to understand is, to what degree does the status/rank of the University (where one completes his/her Ph.D) matter while shaping his/her career after graduation? I would like to know the weight given to one's school in both the following cases:   While applying for post-docs/faculty positions in academia While applying to industrial research labs   For instance, I've read on some forums (I can't locate the link now) that while considering prospective applications for tenure-track faculty positions, very few Universities accept a candidate who has completed his/her Ph.D from a lower ranked school having a lesser "brand" value, irrespective of the fact whether he/she has published equally original work as his/her counterpart from an Ivy league college. How much truth is in this statement? It would be really great if someone already in academia, either as a newly-accepted faculty or someone on the Faculty Hiring committee could share their experiences/statistics on this regard. I'm simply interested to know the answer, without commenting at all on whether such a practice is justifiable.  Similarly, what about recruitment to internationally acclaimed research labs (like  or ) - what importance do they place on the pedigree of a candidate's college, before taking into consideration what they published ?  I'm personally interested in answers related to the field of Computer Science (theory), but the question is applicable to any prospective grad student in any discipline in my opinion. Feel free to share your personal experiences post-Ph.D in detail, as that would give me (and future viewers of this question) about what its like to carve a career once you are out of school!


PREFACE: I don't care about the merits of using a cutoff or not, or how one should choose a cutoff. My question is purely mathematical and due to curiosity.  Logistic regression models the posterior conditional probability of class A versus class B and it fits a hyperplane where the posterior conditional probabilities are equal. So in theory, I understood that a 0.5 classification point will minimize total errors regardless of set balance, since it models the posterior probability (assuming you consistently encounter the same class ratio).   In my real life example, I obtain very poor accuracy using P > 0.5 as my classifying cutoff (about 51% accuracy). However, when I looked at the AUC it is above 0.99. So I looked at some different cutoff values and found that P > 0.6 gave me 98% accuracy (90% for the smaller class and 99% for the bigger class) - only 2% of cases misclassified.   The classes are heavily unbalanced (1:9) and it is a high-dimensional problem. However, I allocated the classes equally to each cross-validation set so that there should not be a difference between the balance of classes between model fit and then prediction. I also tried using the same data from the model fit and in predictions and the same issue occurred.   I'm interested in the reason why 0.5 would not minimize errors, I thought this would be by design if the model is being fit by minimizing cross-entropy loss.   Does anyone have any feedback as to why this happens? Is it due to adding penalization, can someone explain what is happening if so?

I am using glmnet where my dependent variable is binary (class 0, class 1). I want to report percentage accuracy of the model. So I use the predict function for my test dataset. However, the values returned are in decimals instead of being 0 and 1. So I set a threshold of 0.5, meaning if the predicted value > 0.5, I consider it as 1 and if predicted value <= 0.5, I consider it as 0. Next I create a confusion matrix by comparing the predicted and actual values of my test data. From this I find the accuracy. I have pasted my sample code below. I am not sure if this is the right approach for reporting the accuracy percentage for a glmnet model predicting a binary dependent variable.  data <- read.csv('datafile', header=T) mat  <- as.matrix(data) X    <- mat[, c(1:ncol(mat)-1)] y    <- mat[, ncol(mat)]  fit  <- cv.glmnet(X, y, family="binomial", type.measure="class", alpha=0.1)  t                             <- 0.2*nrow(mat) #20% of data t                             <- as.integer(t)  testX                         <- mat[1:t, 1:ncol(mat)-1] predicted_y                   <- predict(fit, s=0.01, testX, type='response') predicted_y[predicted_y>0.5]  <- 1 predicted_y[predicted_y<=0.5] <- 0 Yactual                       <- mat[1:t, ncol(mat)] confusion_matrix              <- ftable(Yactual, predicted_y) accuracy                      <- 100* (sum(diag(confusion_matrix)) / length(predicted_y))


I know some sql but don't quite understand the things behind the scene. And this question came to me the other day while I am taking shower... If we compare these two queries below: a.    select * from table_abc; b.    select id, name, timestamp from table_abc; which query is (theoretically) faster? My guess is a because in query b it takes time to pick out the 3 columns I want. But that's counterintuitive at the same time because that means getting less information takes longer. All comments/answers are highly appreciated!

On multiple questions here and on stack overflow i saw people saying in the comments and answers that select * from table is almost always an antipattern without any explaination why. Althrough I can sort of deduce why it is an antipattern. I may be looking over a detail that someone else with better understanding of the issue noticed.  So here is my question, why people say that select * is an antipattern.


I currently have a command in linux terminal that I run a lot which is  pyclewn ==window=none .....   My question is if there is a way for me to assign a shortcut to this command I am using Fedora 20

How could I execute a script in Shell when a shortcut key is pressed.   Essentially what I need is when a shortcut key is pressed the script should read from a file and display that content in the terminal.


As accurately as sources can provide, what were the Jedi death tolls in the immediate aftermath of Order 66:   On Coruscant, and how many by Anakin's hand? Outside Coruscant, across the galaxy, to the opening shots of Order 66? In the immediate days after, when the "Grand Army of the Empire" was still actively hunting down those who managed to escape?   In the context of this question, the immediate term ends when the inhibitor chips release their control of the clones i.e. when the actually-loyal-to-the-Republic-and-the-Jedi clone troopers regained free will.  Edit: I'm looking for a breakdown, not a grand total.

Episode III obviously doesn't show ALL the Jedi being eliminated as a result of Order 66.  What I've never heard, though, is how many Jedi were in existence at the time of Order 66.  Is there any definitive count as to how many of them were alive at the time of the purge and how many were victims of Order 66?


Show that $i$ is neither negative nor positive.  Proof: Assume that $i<0$ $i×i>0×i$    Since $i<0$ $i^{2}>0$ Since $i^{2}:=-1$ So, $-1>0$ which doesn't hold and hence this is a contradiction to the fact. Next, assume that $i>0$ $i×i>0×i$ since $i>0$ $i^{2}>0$ Since $i^{2}:=-1$ So, $-1>0$ which again doesn't hold and hence this is a contradiction to the fact. This establishes the proof. Is this valid proof?

Can there be such a thing as positive and negative complex numbers? Why or why not?   What about positive or negative imaginary numbers?   It seems very tempting to say $+5i$ is a positive number while $-2i$ is a negative number. On an Argand diagram (complex plane) $+5i$ would be represented by a point above the horizontal axis while $-2i$ is a point below the horizontal axis.


According to biblatex doc (p.80-81) :     \Parencite is similar to \parencite but capitalizes the name prefix of   the first name in the citation if the useprefix option is enabled,   provided that there is a name prefix and the citation style prints any   name at all.      \Textcite is similar to \textcite but capitalizes the name prefix of   the first name in the citation if the useprefix option is enabled,   provided that there is a name prefix.   My problem is that \parencite and \textcite capitalize the author name by default. Therefore, there is no difference between these commands (\textcite has the same behavior than \Textcite). I am using authoryear-comp style.  It it a big problem for me because I cannot cite using \textcite. Indeed it will produces something like "according to NAME (2008), there is ...". The capitalized author name is ugly.  MWE :   \RequirePackage{filecontents}  \begin{filecontents}{\jobname.bib} @Book{author00:_title,   author =   {Author},   title =    {Title},   publisher =    {Publisher},   year =     2000} \end{filecontents}  \documentclass[12pt,twoside,a4paper]{article} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage[english,french]{babel}  \usepackage{lmodern} \usepackage{xspace}  \usepackage[autostyle=true]{csquotes} \usepackage[style=authoryear-comp,      hyperref,      backend=biber,      isbn=false,      doi=false,      url=false,      ]{biblatex} \AtEveryBibitem{\clearlist{language}} \renewcommand*{\newunitpunct}{\addcomma\space} \addbibresource{\jobname.bib} \usepackage[colorlinks]{hyperref}  \begin{document}  \noindent \verb+\parencite{author00:_title}+ :  \parencite{author00:_title}\\ \verb+\Parencite{author00:_title}+ : \Parencite{author00:_title}\\ \verb+\textcite{author00:_title}+ : \textcite{author00:_title}\\ \verb+\Textcite{author00:_title}+ : \Textcite{author00:_title}  %\printbibliography \end{document}

I'm using biblatex to manage my citation in a natbib style :  \usepackage[style=alphabetic,maxnames=6,natbib=true]{biblatex}   However when I use the \citet command, the author's name is in a \textsc font, I would like to change this behavior so that the font used is the default one, but I could not find how to do this in biblatex's documentation.


I have attempted to find the post which provides an explanation as to the circumstances in which we can treat $\frac{dy}{dx}$ as a ratio which appears to be used in solving separable DE's, but I have yet to find it. Can anyone provide the link please?  Thanks

In the book Thomas's Calculus (11th edition) it is mentioned (Section 3.8 pg 225) that the derivative $dy/dx$ is not a ratio. Couldn't it be interpreted as a ratio, because according to the formula $dy = f'(x)dx$ we are able to plug in values for $dx$ and calculate a $dy$ (differential). Then if we rearrange we get $dy/dx$ which could be seen as a ratio.   I wonder if the author says this because $dx$ is an independent variable, and $dy$ is a dependent variable, for $dy/dx$ to be a ratio both variables need to be independent.. maybe?


I would like to pass an undefined number of optional arguments to a function. The optional arguments are stored a priori in a dictionary.  As an example:  def f(a=0, b=0, c=0):     return a  my_args = {'a':5, 'b':3}  print(f(my_args))   The expected output would be 5, however it is {'a':5, 'b':3}

In the following method definitions, what does the * and ** do for param2?  def foo(param1, *param2): def bar(param1, **param2):