I have multiple global booleans in a java class and since I didn't want to copy and paste a method over and over again, I made the method below. problem is that when I enter "y" it's supposed to make the variable in parameter a true, but every time I checked the variable it's still false, even though the price works the way it should.  I tried shuffling the order around to see if it did anything (it didn't). should I just make a method for each variable instead?  public void wants(String b, boolean a){    while(!b.equalsIgnoreCase("y") && !b.equalsIgnoreCase("n")){        System.out.println("Please enter y or n");        b = keyboard.next();    }    if(b.equalsIgnoreCase("y")){         a = true;         price += 0.5;    }    else if(b.equalsIgnoreCase("n")){         a = false;    } }   (Continuation) So I checked out "Is Java 'pass-by-reference' or 'pass-by-value'?" question and came to the conclusion of 'oh, so I need to make some getters and setters and the problem will be solved!' I definitely did something wrong though since I'm getting the error message 'boolean cannot be dereferenced' so it's not even letting me compile which is big oof.  //private vars (project requirement, can't be removed) private boolean wantsCheese, wantsGuac, wantsCream;  public void takeOrder() {     System.out.println("Do you want cheese? (Y/N)");     //was initially wants(keyboard.next(), wantsCheese); for previous method     wantsCheese.wants(keyboard.next()); } ... public void wants(String b){     while(!b.equalsIgnoreCase("y") && !b.equalsIgnoreCase("n")){        System.out.println("Please enter y or n");        b = keyboard.next();    }    if(b.equalsIgnoreCase("y")){        setCheese(true);        price += 0.5;    }    else if(b.equalsIgnoreCase("n")){       setCheese(false);    } } public boolean getCheese(){    return this.wantsCheese; } public void setCheese(boolean wantsCheese){    this.wantsCheese = wantsCheese; } public boolean getGuac(){    return this.wantsGuac; } public void setGuac(boolean wantsGuac){    this.wantsGuac = wantsGuac; } public boolean getCream(){    return this.wantsCream; } public void setCream(boolean wantsCream){    this.wantsCream = wantsCream; }   }

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


I currently have an external, HFS+ drive as my time machine storage that backs up my Macbook Pro Retina (Mac OS Mountain Lion 10.8.1). I also have another external NTFS drive (that I share with my Windows Desktop) which has all my photos etc which I would like to backup via Time Machine.  i.e.  Current  Macbook Pro Retina ===> external Time Machine drive   Desired:  Macbook Pro Retina ===\                        +====> external Time Machine drive External NTFS drive ==/   If I go into the Time Machine preferences, I see the external NTFS drive (as well as all other NTFS/HFS+ drives) inside the exclude list. I can also remove the NTFS drive of interest from this exclude list - thereby including it into the backup list.  The problem is that the settings aren't sticky. When I reenter the Time Machine preferences, the external NTFS drive is again seen on the exclude list. And the actual files themselves aren't backed up either.  So, how can I backup the data on my external NTFS drive via Time Machine?

When I've plugged in my USB HDD (WD Passort Elite) for the first time, the system had asked me whether I want to use this HDD as time machine drive. I've chosen smth like 'decide later' and continued my work. When later I tried to setup time machine preferences I couldn't find the way to set my USB HDD as time machine drive. When I press 'Select drive for backup' i see empty list, nevertheless my drive is plugged in and works well. Btw, it is ntfs-formatted, could it be a problem?  Thanks in advance


Comments are just for requesting clarification and arguing with people, right? ;)  Yet lately I'm seeing this more and more often (no data available; sorry to pick you specifically, Barry):    What happens is that someone FGITWs a mini-answer as a comment on the question, diluting the value of the actual answers. Sometimes no answers appear at all, and the OP's question has been answered by a comment. So then what?  It breaks the whole Q&A model by turning questions into flat forum posts or chatroom messages. Stack Exchange was invented to get away from this messy model and instead create a system of Questions and Answers. Period.   I don't have time to write a full answer now Okay, write it later! I will never have time to write a full answer Okay, well, don't then. Let someone else do it. I'm not sure enough about my suggestion to write it as an answer Then posting it at all could be damaging to the OP. Watch other answers, learn a bit, then post an answer later if you feel you're surer about your idea. I just want to give the OP a hint Invite him/her/it to a chatroom. I don't want the rep from an answer Give it away in bounties to answers elsewhere that you feel are outstanding. The question is off-topic so I don't want to post an answer and get berated If the question is off-topic then it is off-topic. It should not be answered at all. Writing an answer in comments both enables the naughty OP and creates a spasmic mess of anti-Q&A, surely the antithesis of Stack Exchange.   As of 2019, this behaviour is extremely widespread. I often see more answers-in-comments than answers in the actual answer section. Have we all forgotten why Stack Overflow was created? Have we forgotten the very purpose of a strict, peer-reviewed Q&A format? Are we all that desperate to "help", even on what we deem to be off-topic or trivial questions, that we are willing to sacrifice everything valuable about this site that set it apart from the others?  Fortunately, other network websites have started taking this seriously. Picking just two examples off the top of my head,  and  moderators routinely remove answers-in-comments and remind people to stop posting them. Even on SO we have "avoid answering in comments" under the "add a comment" tooltip, but this goes completely ignored and flags (last time I dared attempt one, anyway) are not only rejected but also discouraged.  I'd like us to start being firmer about this on Stack Overflow. Perhaps a special flagging reason for comments? Although I'm loathe to begin removing "useful content", this is not the correct place for them. At all!

Sometimes I have asked a question which got no answers, but is answered in the comments to the question.  How should I handle these questions? I can't accept an answer, so it is never an accepted question.  For example this one:   (ok here the answer in the comments is from me, but nevertheless I also have others of them)


In the Sylvester rank nullity theorem, $T \colon V \to W$ is a linear transformation and $V$ is finite dimensional. What if $V$ is infinite dimensional?   This was actually asked before on this site, but I’m not satisfied with the answers. Please give me a sketch of a proof how this is true in infinite dimensions, and please give me an example for it.

The rank nullity theorem states that for vector spaces $V$ and $W$ with $V$ finite dimensional, and $T: V \to W$ a linear map,  $$\dim V = \dim \ker T + \dim \operatorname{im} T.$$  Does this hold for infinite dimensional $V$?  According to , the statement is false.  But according to , page 4, the statement is still true.  I'm thoroughly confused.


I am only starting to learn coding. I need to be able to use my custom controller I created for use in a visualforce page in production. I can't get past code coverage failure when I try to deploy from sandbox. I tried all the existing test classes available in production, because I don't know how to create a test class. Below is the code for my controller, please check if there's something wrong with it: public class MyController {  public ApexPages.StandardController sc;  public MyController(ApexPages.StandardController sc) {     this.sc = sc; }  public void quicksave() {     AVTRRT__Job_Applicant__c j = (AVTRRT__Job_Applicant__c) sc.getRecord();     update j.AVTRRT__Contact_Candidate__r; } }

This is a canonical question and answer developed by the community to help address common questions. If you've been directed here, or your question has been closed as a duplicate, please look through the resources here and use them to shape more specific questions. To browse all canonical questions and answers, including more unit test resources, navigate to the  tag.  This canonical question is intended to address several classes of common questions by providing a quick summary and links to comprehensive resources:   How do I start writing my first unit test?  How do I unit test this code?  I need help writing this unit test.   Salesforce Stack Exchange looks for detailed, specific questions that the community can help you with, and can't write tests on your behalf. We feel that working with the resources below can help you get started, and we encourage you to make an attempt to write your test and return to SFSE with your specific questions when you encounter challenges you can't resolve.


is this possible to change the tab page icon as if loading the page when I call function $.ajax() and on success or error again change icon to default? I need this because when the slow internet connection the user can see that something is loading and it will be wait for ending of process. In addition, I don't need the popup with the loading icon.

I have a web application that's branded according to the user that's currently logged in. I'd like to change the favicon of the page to be the logo of the private label, but I'm unable to find any code or any examples of how to do this. Has anybody successfully done this before?  I'm picturing having a dozen icons in a folder, and the reference to which favicon.ico file to use is just generated dynamically along with the HTML page. Thoughts?


An iPad I have was previously set up with a different Apple ID (see  and ). I have since obtained the Apple ID and password for the previous owner, and used those to proceed through the welcome/setup process. It then asked for an another Apple ID for iCloud, and I gave it mine. Does that mean that it is now fully 'switched over' to my Apple ID, or might the activation lock still be associated with the previous owner, were the device ever to be reset? There doesn't appear to be anywhere in the settings screen explicitly associated with the activation lock, just the iCloud ID (which according to the setup process is a separate concept).

I bought an iPhone 5C from a friend and I'm not sure if it's Activation Locked or not and I don't have a SIM card yet. He hasn't used it and didn't know anything about that, he got it second hand.    When I got the phone it was stuck at the lock screen because of too many password attempts. I've put it in restore mode, and now the phone is "formated/restored"  When turning the phone back on, it first asks my country, then it wants me to connect to Wi-Fi, which I do, and next it says I need to put a SIM card (not pin-locked) in.  If the iPhone was Activation locked, does it ask for the Apple ID after you connect to Wi-Fi or after you put a SIM card in?  Can you provide a step-by-step guide?


Lets get things straight: I'm a bit of a noob.  My Ubuntu System was not working well, so I went on the live CD and checked the system, everything went smoothly. So rebooted it without the Live CD and once again it would not work. So i repeated said process, but the system check was taking a long time, so i cancelled it midway through, despite the warning that it could corrupt the drive (I know, I'm stupid). So now it gets to the Ubuntu purple screen, with 5 dots that normally light on and off as it loads, and it just freezes there.   What can I do to retrieve the system with my data? I have got everything backed up by Ubuntu One, and saved to a USB now it is being discontinued, but have one VERY important document that for some reason Ubuntu One wasnt synced to save.  Thanks in advance

Are there any tools, methods, incantations to recover recently deleted files on Ubuntu?  If it makes any difference, I want to recover a  2.x database file. But would be better to have a method/tool that works on any kind of file.


I wrote this delete for an application with mysql db and it doesn't work, I already search for answers but I cant find any kind error, someone can help me with a tip about this? thanks     1093 - You can't specify target table 'md1_acessos' for update in FROM clause   DELETE FROM md1_acessos WHERE ID_USUARIO = 10 AND ID_UNIDADE not in (      SELECT ID_UNIDADE      FROM md1_acessos     WHERE ID_EMPRESA = 1     AND ID_USUARIO = 1     AND ID_MODULO IN (1,2,6) );

I have a table story_category in my database with corrupt entries. The next query returns the corrupt entries:  SELECT *  FROM  story_category  WHERE category_id NOT IN (     SELECT DISTINCT category.id      FROM category INNER JOIN         story_category ON category_id=category.id);   I tried to delete them executing:  DELETE FROM story_category  WHERE category_id NOT IN (     SELECT DISTINCT category.id      FROM category        INNER JOIN story_category ON category_id=category.id);   But I get the next error:      #1093 - You can't specify target table 'story_category' for update in FROM clause    How can I overcome this?


I will be travelling to China this April (more specifically, I will be going to Chengdu).  As I would need to keep myself updated all the time, and I would need to access facebook and other websites that China blocks, I am planning to buy a VPN package in conjunction with a China SIM card with 3G coverage.  Do you guys have any experience on this? Any VPN and China SIM card that you can recommend?

I will soon be spending a few months travelling across China and want to get a VPN service to get around the Golden Firewall.   When I was in China in 2014/15 the general consensus was that Astrill offered the most reliable service, but I heard that they have been targeted quite strongly by the government over the last year.   Therefore, I am wondering what is the best VPN for China these days? Is Astrill still as good as it used to be?   Any recent experiences would be very helpful!


I recently installed an SSL certificate on my server and now HTTPS seems to work for all the pages.   However, the server is still accepting connections from HTTP. How do I enforce HTTPS?   I use a CentOS Linux distribution on my server.

Here is what I have got:   CentOS 5.4 (32-bit)    installed Apache httpd (Server version: Apache/2.2.11 (Unix)) mod_rewrite already presents   Question: how to redirect simple  to  not using VirtualHost defines?  PS: tried to find in later answers on SF, but doesn't find nice solution.  Thanks.


A divisor of zero in a commutative ring with unity can have no multiplicative inverse.   I don't understand why this statement is true.  So for $a,b$ in the ring, $ab=0$ by zero divisor.  How can we guarantee that there does not exist $c$ such that $ac=1$?

Let F be a ring. Show that if $a$ is a zero divisor of F, then $a$ fails to have a multiplicative inverse.  All I understand is that $ab = 1$ doesn't hold and that $ac = 0$ for some $c \in F$ holds. Basically, only the definitions, but I don't know what to do with them.


Goal : Obtain a callback function that will take any type of parameters as the callback function's parameters  .h template <typename F, typename A> void DelayedCallback(F&& CallbackFunction, A&& Args = NULL);   /  .cpp void DelayedCallback(F&& CallbackFunction, A&& Args) {   //Timer function that received a function pointer to be the "callback"  function   Timer((std::bind(std::forward<F>(CallbackFunction), std::forward<A>(Args)))()) }   /  DelayedCallback(&HUDExit);  void HUDExit() {}   /  ERROR : DelayedCallback(FName,float,F &&,A &&)' : could not deduce template argument for 'A'   What am I doing wrong? I'm new to most of these concept in c++, more of c# programmer  EDIT : It's not only about the error, I'm pretty sure it's not the only one I am making.

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


I met a question which said :  Find the value of  $\sqrt2^{\sqrt2^{\sqrt2^{\sqrt2^{.^{.^{.^{.^{.}}}}}}}}$  Now to start I declared  $y=\sqrt2^{\sqrt2^{\sqrt2^{\sqrt2^{.^{.^{.^{.^{.}}}}}}}}$  Now this implies that  $y=\sqrt2^y$  Now solving this equation we get   $y=2,4$  but then how can a single number have two values. So where am I going wrong?  Thank you :)

My teacher asked me this question. But I  think this is wrong. Anyone found this, before me? I do not know. Anyway, Is my solution correct?  ${x^{x^{x^{x^x}}}}^{...}=2$  $x^2=2$  $x=\sqrt 2$  ${\sqrt2^{\sqrt2^{\sqrt2^{\sqrt2^\sqrt2}}}}^{...}=2$  Now,  Let, ${x^{x^{x^{x^x}}}}^{...}=4$  $x^4=4$  $x=\sqrt2$  ${\sqrt2^{\sqrt2^{\sqrt2^{\sqrt2^\sqrt2}}}}^{...}=4$  Contradiction!


I am trying to make a link on a header be clickable on the text of the header only. Problem is, in my case, the link is still clickable, even when there is no text(it still clicks on empty blue space to the right). Example:  as you can see, the whole blue is clickable, but I just want the click to end after the "Hello World Link" word. Is there a way to allow to click only on the text "Hello World Link" and not the rest of blue empty space to the right? My code:

@title

   CSS:   .headerText{        h2:hover {          background-color: yellow;     }   }

I have a layout similar to:  <div>     <table>     </table> </div>   I would like for the div to only expand to as wide as my table becomes.


Related to a previous question but with a reproducible example, i just can't seem to set the value of any picklist fields when using lightning:inputField, any ideas?  Component  <aura:component implements="flexipage:availableForRecordHome, force:hasRecordId">     <div class="slds-p-bottom_large slds-p-left_large" style="width:500px">         <lightning:recordEditForm aura:id="recordViewForm"                                       recordId="{!v.recordId}"                                      objectApiName="Contact">             <lightning:messages />             <lightning:inputField fieldName="FirstName" />             <lightning:inputField fieldName="LastName" aura:id="lastname"/>             <lightning:inputField fieldName="Birthdate" />             <lightning:inputField fieldName="Phone" />             <!--Picklist-->             <lightning:inputField fieldName="Country__c" aura:id="Country__c"/>             <lightning:button label="Update" variant="brand" onclick="{!c.update}"/>         </lightning:recordEditForm>     </div>     </aura:component>   Controller  ({         update: function(component, event, helper) {         //alert(component.find("Country__c"));         component.find("Country__c").set("v.value", "Ireland");     },  })

I have a number of lightning:inputField that i'm setting based on certain criteria, these all work except for picklist field types. The code below shows how i am setting the fields. The country field is the picklist and the 2 alerts have the correct value in them, however the value is not getting set on country. Is there a different method for setting picklist fields?  var address = res.getReturnValue(); var country = component.find('Country__c'); var pcodeFld = component.find('Postcode__c');  if(country != undefined){  alert(country);  alert(address.Country);  country.set('v.value', address.Country); } if(pcodeFld != undefined){  pcodeFld.set('v.value', address.Postcode); }   EDIT: I can set a default value whilst using $A.createComponents using .set("v.value", "United Kingdom");  it just seems that i can't set it after the component has rendered based on some user action.  Reproduceable Example:  I just can't seem to set the value of any picklist fields when using lightning:inputField.  Component  <aura:component implements="flexipage:availableForRecordHome, force:hasRecordId"> <div class="slds-p-bottom_large slds-p-left_large" style="width:500px">     <lightning:recordEditForm aura:id="recordViewForm"                                   recordId="{!v.recordId}"                                  objectApiName="Contact">         <lightning:messages />         <lightning:inputField fieldName="FirstName" />         <lightning:inputField fieldName="LastName" aura:id="lastname"/>         <lightning:inputField fieldName="Birthdate" />         <lightning:inputField fieldName="Phone" />         <!--Picklist-->         <lightning:inputField fieldName="Country__c" aura:id="Country__c"/>         <lightning:button label="Update" variant="brand" onclick="{!c.update}"/>     </lightning:recordEditForm> </div>     </aura:component>   Controller  ({         update: function(component, event, helper) {         //alert(component.find("Country__c"));        component.find("Country__c").set("v.value", "Ireland");     },  })


In the following equation with unknown integers $x_i$,  $1 \leq i \leq N$, the sum of all those integers are $R$. A constraint is added to each integer such that $Min_i \leq x_i \leq Max_i$. The question asks for the total number of integer solution to this equation.  $x_1+x_2+\dots+x_n=R$  (It's relatively easy to deal with lower bound, but how to find the total number of integer solution that any of the upper bound is violated so as to exclude them?)  Please advice. Thanks.

The problem of counting the solutions $(a_1,a_2,\ldots,a_n)$ with integer $a_i\geq0$ for $i\in\{1,2,\ldots,n\}$ such that $$a_1+a_2+a_3+....a_n=N$$ can be solved with a stars-and-bars argument. What is the solution if one adds the constraint that $a_i\leq r_i$ for certain integers $r_1,\ldots,r_n$?  e.g. for $n=3$, $N=6$ and $(r_1,r_2,r_3)=(3,3,2)$, the tuple $(a_1,a_2,a_3)=(2,3,1)$ is a solution, but $(2,1,3)$ is not a solution because $a_3=3>2=r_3$.


How do I do something like this:  where the $p\leq x$ and $p\equiv\pmod{q}$ are on separate lines?

Is there a way to force a line break inside a math mode text?  My example:  \[   \underbrace{....}_\text{Some long text that should be multiline} \]   Trying  \text{Some long text that\\ should be multiline}   Didn't do the trick.


What is the correct grammar for use of the words, which and that?

When is it appropriate to use that as opposed to which with relative clauses?


For example, "I will reread this article" and "I will read this article again". Are they equivalent? When should I use a hyphen after the prefix "re"?

One of my favorite quotes is by Alvin Toffler which says:     The illiterate of the 21st century will not be those who cannot read   and write, but those who cannot learn, unlearn, and relearn.   The way I understand "relearn" in the quote is to learn something new that is different from what was originally learned.  I'm wondering in general if "relearn" convey learning the same thing again, or a different thing, or it depends on the context of the sentence. Is the same thing true for "learn again"?


When Hermione erases her parents' memories with the Memory Charm "Obliviate" she doesn't store them in a bottle for safe keeping. To my knowledge Obliviate erases memories instead of hiding them or removing them for storage. So how could she have returned what was no longer there to return? Edit: Did she actually use Obliviate? In the movie she clearly says "Obliviate". Is it possible to cast a spell while uttering the words to a different spell? In the first movie she tells Ron that he is saying "Wingardium Leviosa" wrong implying that the wording is the reason the spell is not working. We have seen wizards cast spells without saying the words implying that there is a level of mastery involved. However Hermione states later that she has never performed the Obliviate spell so she would have no prior experience.

At the beginning of the 7th book, Hermione Granger Obliviates her parents' memories of her and themselves and makes them think they want to move to Australia.  Is there a fix for this type of spell?   Did Hermione ever recover their memories and return to them after Voldemort was defeated?


My ps4 controller stopped working  I tried connecting it to my macbook air to play Minecraft. I held the share button and held the ps button and used bluetooth to connect to my laptop. I then tried connecting the usb cable to the usb port.  When I tried connecting it to the ps4 again, it wouldn't work, I have tried the following:   Sticking a pin in the little hole Unplugging the wires Putting it on safe mode Connecting it to the ps with the charging cable   None of these worked. How do I fix the controller- I'd rather not have to buy another.

I was playing my PS4 two days ago and then packed it up with two controllers that were both connected to this PS4.   I got to where I was going, set everything up and now the controllers won't connect. They show pulsing orange when they plug in, but when I hit the PS Button to connect, it blinks white 1-2 times and goes back to orange.   I have tried resetting them both.  Can anyone help?


Suppose you have x amount of bagels, each day you must eat 1 bagel minimum or 2 bagels maximum..how many different ways can you eat all the bagels?

I came across an interesting puzzle:     You are climbing a stair case. It takes $n$ steps to reach to the top.   Each time you can either climb $1$ or $2$ steps. In how many distinct   ways can you climb to the top?   Is there a closed-form solution to the problem? One can compute it by creating a 'tree' of possibilities of each step. That is, I can either take 1 or 2 steps at each stage and terminate a branch once it sums to $n$. But this is would get really unwieldy very quickly since the maximum number of nodes in a binary tree is $2^{n+1}-1$, i.e., exponential. Is there an easier way to solving this puzzle?


I have two JSON objects, and I want to append newData into existingData.  existingData = {"School Name" : "Albert"} newData = {"Teacher Name" : "Ms. Mithcell"}   This is the output I want:  existingData = {"School Name" : "Albert" , "Teacher Name" : "Ms. Mithcell"};   How can I do this?

I need to be able to merge two (very simple) JavaScript objects at runtime.  For example I'd like to:  var obj1 = { food: 'pizza', car: 'ford' } var obj2 = { animal: 'dog' }  obj1.merge(obj2);  //obj1 now has three properties: food, car, and animal   Does anyone have a script for this or know of a built in way to do this?  I do not need recursion, and I do not need to merge functions, just methods on flat objects.


and Happy new year!  I have shooted ~300 photos of an object and i'm making timelapse from it. The distance between me and object is 5-7 meters. All these photos are made from different angles, but with the same object in the center similar to . The idea is to make turning timelapse about that object. The problem that I have is stabilization. The difference between main object on different photos can be up to 200-300px in both X and Y axis.  I've tried to achieve it with After Effects with Warp Stabilizer and Track Motion, but it didn't help too much. The main object on that video is turning from 0 to 180 degrees, and brightness of pictures is very different, so there is no too much points to track them, and AE somehow didn't work well for me. Maybe I used it in incorrect way. But is there any others way to achieve it?  P.S. Currently I achieved it by making small console application that tracks specific colors in allowed color range, as there is one sign with red color but it's small object, and then it makes shifts based on location of these colors and their count. Partially it works well for me, but I'm sure that I made another useless program as it can be achieved with other software. Is there any software that can helps me for such stabilization?  Thank you.

I've been playing around with some time lapse sequences shot from the roof of our building in New York.  It's terribly windy and the resulting sequence exhibits some slight camera shake.   I'm seeking a software solution to align the images to compensate.  Note: I don't have PhotoShop.


Earlier today, I started a bounty (with 50 reps.) on my question "" and as per the rule it deducted 50 reps. from my total reputation immediately upon applying. Here is the screenshot of the same:        I was expecting to see "-50" reputation (in a Red box) gained since my last visit next to my total reps. in the REPUTATION box. But all I see is my new total reps. 2,090 (2,140 - 50). It does show a "-50" reps. that I have earned (in a Blue background box) next to my "reputation" tab.   When you get an up-vote on your post, you will see either +5 (for a question) or +10 (for an answer) reputation gained since your last visit in a little Green background box next to the total reps. (at '?' mark spot in the above screenshot) shown in the REPUTATION box.  So, is REPUTATION box only for displaying positively gained reps. since your last visit? Can anyone please explain?

The "Recent achievements" icon (looks like a bar graph in the top bar for signed in users) doesn't highlight when one only has recent reputation losses.  I'd like it to highlight whenever my reputation changes, positive or negative - in fact I'd suggest it's far more important for me to review posts that get a downvote than those that got an upvote.  Is there a reason negative reputation events don't cause it to highlight?


I read somewhere recently (in a general topology book), that the set of all continuous functions $f : [a,b] \rightarrow R$ forms a vector space. Here $[a,b]$ is just an interval on the real line.     I only vaguely recall that trick from my linear algebra classes some N years ago. I mean... it sounds familiar but I want to know a bit more.    So I wonder now: 1) is this true? 2) what is the dimension of this vector space? 3) what is its basis?      I guess the dimension is infinite but ... I mean... is it countable infinite or maybe having same cardinality as $R$ or maybe "bigger" cardinality?

Show that the vector space $C(\Bbb R)$ of all continuous functions defined on the real line is infinite-dimensional.   I get that if $C(\Bbb R)$ contains an infinite-dimensional subspace, then it is infinite-dimensional, but how do I prove that? Obviously $\Bbb R$ is infinite…


I started my app today and it said that I needed to verify my email. But I don't know the email I chose. I logged on every email in but there was never a verify email. Is there a way to know your email on Pokemon Go?


I have installed Talend Open Studio by simply unzipping the archive in my home folder. The application is launched via a shell script. Then I created a desktop file :  [Desktop Entry] Name=Talend Open Studio Comment=ETL Exec=/home/franck/devel/outils/TOS/TOS_DI-linux-gtk-x86.sh Path=/home/franck/devel/outils/TOS/ Terminal=false Icon=/home/franck/devel/outils/TOS/24_talend-icon.svg Type=Application Categories=Development;ETL   I put it in ~/.local/share/applications/tos.desktop Finally I added the launcher to my favorite apps, so it stays in my dash-to-dock bar (Ubuntu Dock).  Now when I click on the icon (second on screenshot), TOS launches, but another icon (fourth) pops up for the running application; instead of the custom icon I put in my .desktop file, I get another (pixelized) icon.    So here are my questions:   how does gnome-shell affect an icon to a running application? where does it find a suitable icon? (a poor one in my case) how can I force it to take my .desktop icon? ideally, it would not show two icons while running (the launcher and the running one). What mechanism is implied here?

I'm using Ubuntu 17.10 with GNOME shell and Numix-Circle icon theme.   When I hover over the Numix icon for Nightly Web Browser, which is pinned to the dock I get the title "Nightly Web Browser".      But when I launch the program, another icon pops up at the bottom, with the name "Nightly".


Hi  I want to add a column in my table like the given image. How to produce this type of difficult symbol in latex?

Inspired by Paulo Cereda's  here, I would like to draw tally marks using PSTricks (or TikZ, if no one can help with PSTricks).  I have no idea how to start, so I cannot even present a try myself. :( (This is not good, I know!)  What I would like to have, is a command like \tallymarks;  \tallymarks{1} \tallymarks{2} ... \tallymarks{10}   and get an output like the following:    without the table and the arabic numerals, i.e., only the tally marks themselves.  Update 1  Inspired by Herbert's idea, here is an attempt to use PSTricks.  \documentclass{article}  \usepackage{pstricks-add}  \newcommand*{\tallymarksOne}{   \pslineByHand(0,0)(0,1) } \newcommand*{\tallymarksTwo}{   \pslineByHand(0,0)(0,1)   \pslineByHand(0.25,0)(0.25,1) } \newcommand*{\tallymarksThree}{   \pslineByHand(0,0)(0,1)   \pslineByHand(0.25,0)(0.25,1)   \pslineByHand(0.5,0)(0.5,1) } \newcommand*{\tallymarksFour}{   \pslineByHand(0,0)(0,1)   \pslineByHand(0.25,0)(0.25,1)   \pslineByHand(0.5,0)(0.5,1)   \pslineByHand(0.75,0)(0.75,1) } \newcommand*{\tallymarksFive}{   \pslineByHand(0,0)(0,1)   \pslineByHand(0.25,0)(0.25,1)   \pslineByHand(0.5,0)(0.5,1)   \pslineByHand(0.75,0)(0.75,1)   \pslineByHand(-0.75,0)(1,1) }  \newcounter{TallyTemp} \def\tallymark#1{%   \setcounter{TallyTemp}{#1}%   \ifnum#1>5     {\Tally E}\addtocounter{TallyTemp}{-5}%   \else{\Tally%        \ifcase#1\or     \tallymarksOne\addtocounter{TallyTemp}{-1}\or     \tallymarksTwo\addtocounter{TallyTemp}{-2}\or     \tallymarksThree\addtocounter{TallyTemp}{-3}\or     \tallymarksFour\addtocounter{TallyTemp}{-4}\or     \tallymarksFive\addtocounter{TallyTemp}{-5}%     \fi}%   \fi%   \ifnum\theTallyTemp>0 \expandafter\tallymark\expandafter{\theTallyTemp}\fi }  \begin{document}  \tallymark{0} \tallymark{1} \tallymark{2} \tallymark{3} \tallymark{4} \tallymark{5} \tallymark{14}  \end{document}   When compiling, I get an error:  ! Undefined control sequence. \tallymark ...ounter {TallyTemp}{-5}\else {\Tally                                                    \ifcase #1\or \tallymarksO... l.50 \tallymark{0}   Update 2  Garbage Coloector's hinted me to the following in the PSTricks manual, but the code won't compile:  \documentclass{article}  \usepackage{pstricks-add}  \def\PstLineFuzzy[#1](#2,#3)(#4,#5)(#6,#7)(#8,#9){% \pscurve[#1](! #2 rand 101 mod 1000 div sub #3 rand 101 mod 1000 div sub) (! #4 rand 101 mod 1000 div sub #5 rand 101 mod 1000 div sub) (! #6 rand 101 mod 1000 div sub #7 rand 101 mod 1000 div sub) (! #8 rand 101 mod 1000 div sub #9 rand 101 mod 1000 div sub)}  \def\PstSticks#1{% \multido{\iStick=0+1,\nXA=0.1+0.1,\nXB=-0.5+0.1, \nXC=-0.35+0.10,\nXD=-0.15+0.10}{#1}{% \pst@cnta=\iStick \pst@cnth=\iStick \divide\pst@cnth by 5 \multiply\pst@cnth by 5 \ifnum\iStick>0\relax \ifnum\pst@cnta=\pst@cnth \PstLineFuzzy[linecolor=red]% (\nXB,0.2)(\nXC,0.4)(\nXD,0.6)(\nXA,0.8) \hbox to 0.2\psxunit{} \fi \fi \PstLineFuzzy[](\nXA,0.1)(\nXA,0.4)(\nXA,0.7)(\nXA,1)}}  \begin{document}  \psset{xunit=0.8,yunit=0.3}% \begin{tabular}{|l|r|p{5.5cm}|} \hline Linux & 27 & \PstSticks{27} \\ \hline Mac OS X & 14 & \PstSticks{14} \\ \hline Windows XP & 43 & \PstSticks{43} \\ \hline \end{tabular}  \end{document}   The error is  ! Undefined control sequence. <inserted text> \pst                       @cnta=\iStick \pst @cnth=\iStick \divide \pst @cnth by ... l.38 & 27 & \PstSticks{27}                            \\ \hline


I would like a way to put a "secret" message into into the output pdf that's only readable if the reader highlights the text (or something similar).  more details:  I would like the text to be invisible and only appear if the reader highlights it with their cursor.   One possibility is suggested in the comments: I could use white text (or the same color as the background). Then the message is hidden, but it's only revealed if the reader copies and pasts it. I would prefer it to be revealed when the reader selects the text (i.e., the step before copying, not sure what this is called).

I'm making a file of exercises, and I occasionally leave hints next to some of the problems.  The issue is that if the hint follows directly after the problem, I find myself immediately and unconsciously jumping to the hint without thinking about the problem first.    In order to prevent myself from doing this, I was hoping there'd be a good way to make the text just hard enough to read that I wouldn't be able to do this unconscious jumping.  Ideally I would be able to click a "Hint" button which would show the hint, but more realistically I think doing something like flipping the text of the hint upside down would do the job.  Of course, there's probably other reasonable solutions to my problem which I'd be more than happy to hear as well!


I have 2 distributions in my PC. Ubuntu and Linux Mint. Linux Mint was installed second, but I work mostly in Ubuntu.  Whenever I install new kernel in my ubuntu, I have to run update-grub from Linux-Mint to get it updated in Grub screen. Is there anyway to make the GRUB in my ubuntu as the one which loads the operating systems?

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


We've got this problem $$ y= \lim_{n \to \infty} \cos\left(\frac{x}{2}\right)\cos\left(\frac{x}{4}\right)\cdots\cos\left(\frac{x}{2^n}\right)$$  I have got stuck in this problem of evaluating the limits. What I was thinking was to convert $$\cos\left(\frac{x}{2^n}\right)$$ somehow to $\sin$ and thus term might fully get dissolved for a shorter expression and we can evaluate value of limit.

This limit seemed quite unusual to me as there aren't any intermediate forms or series expansions which are generally used in limits. Stuck on this for a while now .Here's how it goes :    $$ \lim \limits_{n \to \infty} \left[\cos\left(x \over 2\right)\cos\left(x \over 4\right)       \cos\left(x \over 8\right)\ \cdots\ \cos\left(x \over 2^{n}\right)\right] $$


I am trying to open a form which contains a drop-down select menu and have the option already selected based on the response from an ajax call. From what I have read I should be using the following code to select the option in the dropdown based on the ajax response. I have tried all sorts of combinations using the prop('selected', true but nothing I have tried works.  $('#EditRoomOverrideRoom option').val(result[2]).prop('selected', true);   My drop-down menu:  <select size="1" name="EditRoomOverrideRoomSelect" class="input-field" id="EditRoomOverrideRoom" required>  do {  <option value="<?php echo $row_MultiRoomSelect['ConfRoomID']?>"><?php echo $row_MultiRoomSelect['ConfRoomName']?></option>  } while ($row_MultiRoomSelect = mysql_fetch_assoc($MultiRoomSelect)); $rows = mysql_num_rows($MultiRoomSelect); if($rows > 0) { mysql_data_seek($MultiRoomSelect, 0); $row_MultiRoomSelect = mysql_fetch_assoc($MultiRoomSelect); }  </select>   May ajax response:  success: function(data){     var result = JSON.stringify(data);     result = JSON.parse(result);     console.log("RESULT", result);     var recordid = result[0];     $('#EditRoomOverrideRecordID').val(result[0]);     $('#EditRoomOverrideRoomID').val(result[1]);     $('#EditRoomOverrideRoom option').val(result[2]).prop('selected', true);     $('#EditRoomOverrideClientName').val(result[3]);     $('#EditRoomOverrideFromDate').val(result[4]);     $('#EditRoomOverrideFromTimeH').val(result[5]);     $('#EditRoomOverrideFromTimeM').val(result[6]);     $('#EditRoomOverrideToDate').val(result[7]);     $('#EditRoomOverrideToTimeH').val(result[8]);     $('#EditRoomOverrideToTimeM').val(result[9]);     $('#EditRoomOverrideCompanyImage').val(result[10]);     var imagepath = '../../../../conf/conf_images/roomoverride/'+ hotelid +'/'+ result[10];     //$("#EditRoomOverrideCompanyImage").attr("src",imagepath);     $("#EditRoomOverridePreview").attr("src",imagepath);     $('#EditRoomOverrideFullBoardRoom').val(result[10]); }   Where am I going wrong?

I have a drop-down list with known values. What I'm trying to do is set the drop down list to a particular value that I know exists using jQuery.  Using regular JavaScript, I would do something like:  ddl = document.getElementById("ID of element goes here"); ddl.value = 2; // 2 being the value I want to set it too.   However, I need to do this with jQuery, because I'm using a CSS class for my selector (stupid  client ids...).  Here are a few things I've tried:  $("._statusDDL").val(2); // Doesn't find 2 as a value. $("._statusDDL").children("option").val(2) // Also failed.      How can I do it with jQuery?     Update  So as it turns out, I had it right the first time with:  $("._statusDDL").val(2);   When I put an alert just above it works fine, but when I remove the alert and let it run at full speed, I get the error     Could not set the selected property. Invalid Index   I'm not sure if it's a bug with jQuery or Internet Explorer 6 (I'm guessing Internet Explorer 6), but it's terribly annoying.


After staying in a US university (specifically MIT) as a visiting scholar, a colleague of mine says that most of research labs are still working at midnight. I suspect that he is exaggerating. Don't Americans have life?  I know that there is no working hour limit for research, but based on my experience in UK, people used to leave following the official working hours.  Apart from exceptional cases, is it really common for research labs in the US university to work at night?  NOTE: I did not mean competition of early-stage researchers, I mean the common working styles. In any country, student might be in the library during the night (and similar in the lab). I meant does a US university professor expect to keep his lab active during the night? And does he visit the lab at night?

I'm finishing a PhD in Sweden this year and seeking a post-doc in the United States (atmospheric remote sensing).  It is clear that a job in academia is not a nine to five job; nor do I want it to be.  I often work late in the evening when I'm on a productive spur.  When an important dead-line is coming up, one needs to work harder, and there is no overtime paid.  I accept that.  However, no matter how much I'm interested in my research, I do enjoy and need a reasonable amount of spare time, too; relaxing on the weekends, occasionally a long weekend away, and sometimes a longer trip, such as three weeks in the wilderness.  Regarding the normal work ethos for early-career academics in the United States, I have a hard time judging what is normal and what is excessive.  Some examples:    warning post-docs that he expects all of the members of the group to work evenings and weekends. My apparent naïveté in believing that , despite Wikipedia  as a rest from work, or a hiatus, often lasting from two months to a year.  I was thinking of my friend, who spent a year between his PhD and his first post-doc travelling from France to Mongolia mostly on foot. Someone  I am not a good role model, but when I don't work on a Sunday, I count that as a vacation day.  having no employment-related benefits such as paid vacations, sick leave, or unemployment compensation. Question    We don't have such a work-ethos where I'm at.  I belief that working too hard risks stress and burn-out, and does not increase productivity in the long run, nor human well-being.  I want to do science.  Doing science makes me happy, but having time to relax while not doing science is important for me.  Does the selection of examples I gave above represent a normal situation in U.S. early-career academia?  Should I expect an attitude where asking for a 3-week holiday during the summer is considered as being not serious, or is the situation in practice usually not as bad as the examples above make it sound?  How hard to early-career academics in the United States work, really?


Is the price of a share's future contract in the secondary market dependent on supply demand of the share in the secondary market or is it also influenced by the supply demand of the future's contract also. I know theoretical values of futures using cost to carry model also affect the price which is once again function of the spot price of the share

For instance, at this current moment the SP500 index is at 2094 while the futures on this market, symbol /ES with a contract of June is at 2088.  Can someone please explain how traders and investors use this price difference to trade? And most importantly how the futures market affects subsequent moves in the stock market?


I am adding following JVM parameters to connect the application via JMX. After connected the application via jconsole over JMX, is there a menu that shows me the running application PID?  -Dcom.sun.management.jmxremote  -Dcom.sun.management.jmxremote.port=5592  -Dcom.sun.management.jmxremote.authenticate=false   -Dcom.sun.management.jmxremote.ssl=false   Linux Redhat 6.2 java JDK 1.6

How do I get the id of my Java process?   I know there are several platform-dependent hacks, but I would prefer a more generic solution.


Let $M_2 := \{ (x_i) \in \ell_2 : \sum_{i=1}^\infty x_i = 0\}$. I want to show that $\operatorname{cl} M_2 = \ell_2$ using the following definition of closure:  $$\operatorname{cl} A := \{x\in \ell_2 : \forall \varepsilon > 0 : B_{\varepsilon}(x) \cap A \neq \emptyset\}$$  where $B_{\varepsilon}(x)$ is the open ball of radius $\varepsilon$ around $x$.  So given $x\in \ell_2$ and $\varepsilon > 0$ I need to find a $y\in M_2$ with $\| x - y\|_2 <\varepsilon$. I don't have any clue what kind of theorem I could use to establish the existence of such a $y$. How can I prove this?

$M = \{(x_n) \in \ell_2 :\sum_{n=1}^\infty x_n = 0\}$  It is obvious that it is a linear set. But I don't know how to prove it is closed. I try to prove the complement is open, but it doesn't work. Can anyone help me?


I need to display in random order posts in multiple categories that have multiple pages. Example - 100 posts in an Automotive category with only 20 posts displayed per category page - the order is random but does not duplicate across pages.  Right now I have this code below but it is not working - it keeps randomizing on each page which causes people to see duplicate posts.   It would be better if we could have a way to tell it to reorder - much like Turboseek or Powerseek  add_filter( 'posts_orderby', 'randomise_with_pagination' ); function randomise_with_pagination( $orderby ) {     if( is_category( 'art, asseen, auto, baby, business, cstore, candles,  cell-phones, closeouts, clothing, collectibles, cosmetics, crafts,  customer-returns, dollar-store, dvd-video, electronics, fashion-accessories,  flags, food-grocery, furniture, general-merchandise, gifts, handbags,  health-beauty, holiday-seasonal, housewares, incense, jewelry, knives, lawn- garden, leather, licensed, logistics, made-in-usa, military, music,  novelties, party-greeting-cards, patriotic-items, perfumes, pet-supplies,  professional-supplies, promotional items, religious, security defense,  shoes, smoking-products, socks-hosiery, sporting-goods, store-supplies,  sunglasses, tools-hardware, toys-games, trade-shows, uncategorized, vaping,  watches' )  ) {         // Reset seed on load of initial archive page         if( ! get_query_var( 'paged' ) || get_query_var( 'paged' ) == 0 ||  get_query_var( 'paged' ) == 1 ) {             if( isset( $_SESSION['seed'] ) ) {                 unset( $_SESSION['seed'] );             }         }          // Get seed from session variable if it exists         $seed = false;         if( isset( $_SESSION['seed'] ) ) {             $seed = $_SESSION['seed'];         }               // Set new seed if none exists             if ( ! $seed ) {                 $seed = rand();                 $_SESSION['seed'] = $seed;              }               // Update ORDER BY clause to use seed              $orderby = 'RAND(' . $seed . ')';      }      return $orderby;  }   My question was identified as already answered but it is different because the code is not working across pages - I must have done something wrong.

I found this problem on Wordpress Support and the topic unfortunately is now closed.  I have this same issue... (read below)    We have created a site where members can recommend things like favourite books, movie, songs, etc. For this problem I will use the Movies page as an example.  The "Movies" page is ultimately a custom page template that asks wordpress to display a random list of ALL posts that have been given the category "movies" (category 31). It displays the title of these movies in random order using the code below.  <?php  $rand = new WP_Query("cat=31&showposts=-1&orderby=rand");  while($rand->have_posts()) : $rand->the_post(); ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?> <?php endwhile; ?>   Problem is the list is getting rather long and I would like to split it up into two or more pages of about 10 movies each. To achieve this, I have used the code below.  <?php  $page = (get_query_var('paged')) ? get_query_var('paged') : 1;  query_posts("cat=31&orderby=rand&showposts=10&paged=$page");  while ( have_posts() ) : the_post()  ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?> <?php endwhile; ?>   But there is a problem because although it splits up the data into pages of 10 posts each (paginates), it fails to include a new set of 10 posts on page 2 and so forth. In other words, because it is listing things in a random order, it just goes out and gets another 10 random posts (or in this case movie titles). As a result, we have some repeated movie title posts instead of a new set of 10 random movie titles on page 2, etc.  My question is - what can I add to this code to get wordpress to "remember" which random 10 posts it included on page 1, and then have it get a new set of 10 posts to put on pages 2, 3, etc. until all posts are displayed. I would like there to be only one occurrence of a post per page when sorted randomly in sets of 10.


Is it correct to say or write an student or an store?

In the following example, is it appropriate to use a or an as the indefinite article, and why?     He ate __ green apple.   I know that in the case of just "apple", it would be "an apple," but I've heard conflicting answers for "green apple," where the noun is separated from the article by an adjective.  Also, which is more appropriate in this case:     He ate  __ enormous Pop-Tart.


I have a file containing search and replace string in a single line.  And I am reading that file, using split to separate search and replace string and apply it on a variable.    File:  (.*) pre_$1     Perl Code:  $str = "a";  $line = < FILEHANDLE>; # Read above file.Contains (.*) pre_$1  my ($ss,$rs) = split /\s/,$line;  $str =~ s/$ss/$rs/ee;     This seems to be not working.  I tried to look online, one result is close which is wrap the replace string in both single and double quotes.  i.e.:  $rs = '"pre_$1"';   This works if its in the script, but if I read from file I done see any replacement.  Can someone point me to what I am doing wrong here?  Thanks.

I would like to do the following: $find = "start (.*) end"; $replace = "foo \1 bar";  $var = "start middle end"; $var =~ s/$find/$replace/;  I would expect $var to contain "foo middle bar", but it does not work. Neither does: $replace = 'foo \1 bar';  Somehow I am missing something regarding the escaping.


I have configured a Custom Logout button on the header component on my Community using the below code. Clicking on it, it would then redirect to a page(I call it as Logout screen). But it is not logging out of the session completely. The user session is not killed and I can still access the community from other windows and tabs.
                             <svg class="slds-icon slds-icon-text-default slds-icon--cust1" aria-hidden="true" style="">               <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/support/resource/14/svg/symbols.svg#logout">               </use>             </svg>

I'm using a force.com site and it has a login method that allows you to redirect them to different landing pages from within apex via Site.login(username,password,url). However it appears there is no Site.logout() method. Its my understanding that logout is configured via the customer portal settings and then called using {!$Site.Prefix}/secur/logout.jsp.  My issue is what if I want to redirect the user to different logout pages conditionally? Is there any way to do this or am I stuck using only the URL in the customer gateway settting.  Thanks!


We know that two black holes can merge to form a single black hole with the release of vast amounts of energy. Can the reverse happen? That is can it happen that large energy is supplied to a black hole and it splits into two?

Classically, black holes can merge, becoming a single black hole with an horizon area greater than the sum of both merged components.  Is it thermodynamically / statistically possible to split a black hole in multiple black holes? If the sum of the areas of the product black holes would exceed the area of the original black hole, it seems to be a statistically favorable transition by the fact alone that would be a state with larger entropy than the initial state


I am beginner to Neural Network and this question might be very basic and stupid. Expecting some intuitive answer.

I am working in a classification problem in which I use RBF with a single hidden layer. I want to use SoftMax activation function for the output layer. I already read some documents about the activation function of the output layer but can't find my answer. I try to write the equation for softmax and linear activation function and compare them. in my opinion yes they are different, but after I saw some documents I become confused so to become sure about I decide to ask it here.   is there any difference between linear and nonlinear activation function in a single hidden network?


I've built a wooden house and decided that, with the proper precautions, I would like a fireplace. I built a stone-brick-and-glass cage around a piece of netherrack, but when I lit it, the fire still spread to the rest of the house. I've replaced the burnt part of the house, and I have a piece of glowstone in the fireplace, but I would still like to have actual fire in my fireplace. I you tell me where fire can spread, I can probably figure out how to aesthetically keep it from spreading, or else scrap the idea. Any ideas?

I built a wood house that I'm rather proud of. I've built a fireplace that seem safe, but I don't want to risk burning my house down. I've seen plenty of tutorials online for making safe fireplaces, but most of them are more than 1 year old, and possibly obsolete. I tried reading the Minecraft Wiki article on fire, but it gets pretty wordy and difficult to understand. Is the fireplace pictured below safe?  View from inside. (The wood planks in the fireplace will be the fuel, and eventually replaced with netherrack):   Up close view. (Fuel has been removed):   Outside view. (4 dirt blocks have been removed to show base of chimney):


There is a list of services to choose from, I need the user to enter a service from the list and it outputs what they chose and the cost.  This is my code, it compiles correctly, I just don't understand why it keeps outputting invalid input every time when I type in exactly what is in the array into the input box.  Any ideas?  import javax.swing.*; public class CarCareChoice {    public static void main(String[] args)    {       final int NUM_OF_ITEMS = 4;       String[] validChoices = {"oil change", "tire rotation", "battery check", "brake inspection"};       double[] prices = {25, 22, 15, 5};       String strOptions;       String careChoice;       double choicePrice = 0.0;       boolean validChoice = false;       strOptions = JOptionPane.showInputDialog(null, "Please enter one of the following care options: oil change, tire rotation, battery check, or brake inspection");       careChoice = strOptions;       for(int x = 0; x < NUM_OF_ITEMS; ++x)       {          if(careChoice == validChoices[x])          {              validChoice = true;              choicePrice = prices[x];          }      }      if(validChoice)         JOptionPane.showMessageDialog(null, "The price of a " + careChoice + " is $" + choicePrice);      else         JOptionPane.showMessageDialog(null, "Sorry - invalid entry");     } }

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


On a Windows running computer, can we access files stored on the computer via the WSL (Windows Subsystem for Linux) ?  For example I'm using the Ubuntu WSL version on my Windows 10 computer. Using Ubuntu WSL, can I run a cat command on a text file stored in My Documents on the C: disk ?

Why, when I create a file from within Windows for example, can I not see it under the Linux sub system in Windows 10 (bash.exe)   The screenshot should explain.  Folder: OMG was created from within Windows Explorer.  Folder OMGBash was created from with Linux sub system bash.exe  When a folder OR file is created outside of bash.exe I can never see it, regardless of permissions and ownership.  To show the information I have had to use Cygwin to show file permissions, I have also altered the permissions to see if the folder would appear. (The two command windows at the bottom)   Screenshot showing folder, bash.exe and Cygwin permissions:    I am trying to move all my Cygwin scripts over to the Linux subsystem, but I don't fancy recreating every file, then having to copy and past using bash, then reformatting then using Dos2unix (very long winded).  Found this on GitHub for the Linux subsystem:      copying directly into the Linux subsystem from Windows is not   supported, according to discussion on other tickets. There is a   directory under AppData somewhere (I forget where) that appears to   contain the files for the WSL filesystem. But if you put new files   there, or modify existing files there, your changes are not reflected   correctly inside WSL.      My best guess is that Linux needs to store different metadata (and   more caching information, etc, since its disk-buffering model is also   different) about its files than Windows does, and that this is   currently implemented by storing the master copy of the structure of   the Linux filesystem in a database of some sort, and just using the   Windows filesystem as a convenient BLOB-store for that database.      If you really need to do this, a workaround would be to write a   drag'n'drop .bat script or somesuch that does bash.exe -c "mv %1   /home/$USER/". (You'll have to do some clever work with sed and tr,   probably, to translate %1 to a valid WSL path.)      Alternatively -- could you put your files in a Windows directory and,   within WSL, do "cd ~; ln -s /mnt/c/path/to/my/files" to make them   appear to be in your WSL homedir?


Ok, according to the grammar, we use "The" for definite noun.  But my question is:  When is a noun definite?  See this conversation:     A: I saw a big rat in my back yard last night.      B: How big is THE rat?   Why does "B" use "THE" when he has never seen that rat?  So, we can use "THE" even though we have never seen or known it before, can't we?  See other conversation:     A: Let go to the zoo      B: I want to see THE elephants   Does this above conversation make sense? So, we use "THE" because we identified THE elephants in the zoo, don't we?  But see other conversation:     A: I want to see elephants      B: Let go to the zoo   The plural "elephants" without any article in the above conversation mentioned elephants in general, didn't it?  I am so confused! When is a noun definite?

When I tell people about the football/baseball/soccer/basketball game they are supposed to have today, I say     We have a game today.   which I think is strange. It is strange that it sounds idiomatic and even grammatically correct.   But this is the specific game we have today at some specific place at some specific time. And there is only one game that I am talking about. So why is it not 'we have the game today?'  Side thought: Also should  I say 'the specific game we have today' or 'a specific game we have today'? I think both are acceptable, but have slightly different meaning. Can't explain the difference though.


I am running Windows 7 and its console has been configured to use Consolas font, which gives me a possibility of Unicode output. The ability to read Unicode in console has been proved by me many times for programs such as Far Manager: both Cyrillics and German äöü letters can be read on the same console in the same string without encoding switching.  Now about Python.  I am trying very hard, but can't see Unicode in it's output. By default print(sys.stdout.encoding) prints cp866 and stdout is unable to output any characters except ASCII and Cyrillics.  It gives me following results:  print("Ля-ля äöüÄÖÜß")  UnicodeEncodeError: 'charmap' codec can't encode characters in position 6-12: character maps to <undefined>  print("Ля-ля äöüÄÖÜß".encode("utf-8"))  b'\xd0\x9b\xd1\x8f-\xd0\xbb\xd1\x8f \xc3\xa4\xc3\xb6\xc3\xbc\xc3\x84\xc3\x96\xc3\x9c\xc3\x9f'  Ok, I've set the PYTHONIOENCODING environment variable in batch file:  SET PYTHONIOENCODING=UTF-8  and got:  print(sys.stdout.encoding) UTF-8  print("Ля-ля äöüÄÖÜß") ╨Ы╤П-╨╗╤П ├д├╢├╝├Д├Ц├Ь├Я  print("Ля-ля äöüÄÖÜß".encode("utf-8"))` b'\xd0\x9b\xd1\x8f-\xd0\xbb\xd1\x8f \xc3\xa4\xc3\xb6\xc3\xbc\xc3\x84\xc3\x96\xc3\x9c\xc3\x9f'   What to do?

When I try to print a Unicode string in a Windows console, I get an error . UnicodeEncodeError: 'charmap' codec can't encode character .... I assume this is because the Windows console does not accept Unicode-only characters. What's the best way around this? Is there any way I can make Python automatically print a ? instead of failing in this situation? Edit:  I'm using Python 2.5.  Note: @LasseV.Karlsen answer with the checkmark is sort of outdated (from 2008). Please use the solutions/answers/suggestions below with care!!  is more relevant as of today (6 Jan 2016).


This is a question from a textbook: If G is a group and $|Aut(G)|=1$then prove G’=(e) I’m completely stuck (for about a whole day ), A proper hint or an answer would be so appreciated.

Well, this is an exercise problem from Herstein which sounds difficult:   How does one prove that if $|G|>2$, then $G$ has non-trivial automorphism?   The only thing I know which connects a group with its automorphism is the theorem, $$G/Z(G) \cong \mathcal{I}(G)$$ where $\mathcal{I}(G)$ denotes the Inner- Automorphism group of $G$. So for a group with $Z(G)=(e)$, we can conclude that it has a non-trivial automorphism, but what about groups with center?


I'm wondering if there is anyway around the typical limitations on python function names (alphanumerics etc).   Typical function application proceeds like this myFunction(arg1,arg2). But we know there are exceptions, such as functions that use infix notation. As example, consider 3 + 5. Here, the addition function uses infix notation, and also has a rather special name +.   My question is if there is any way (perhaps with aliases) to give a function a name that is a special character such as + or ~. This possibility obviously exists in core python, but is there a way utilize this with defined functions? Thanks

Can you add new statements (like print, raise, with) to Python's syntax?  Say, to allow..  mystatement "Something"   Or,  new_if True:     print "example"   Not so much if you should, but rather if it's possible (short of modifying the python interpreters code)


Well, its a bit more than that.   I created my scene, lets say a living room and did add a plane. I did choose Emission as material for the plane. So it is my only light source for that scene. It makes nice light. Of course the plane shows up in the final render.   But I just want to use the light it creates but don´t want to see the plane it self in the final render in the scene.  Can that be done?  Thanks a lot armin

In my scene it is required to position the lights close to the main object like this:    How I can make the light source invisible to the camera?


Since 13.04, there is no Wubi, why was Wubi removed from the installation phase?

Is there any Windows installer (wubi) for Ubuntu 14.04 LTS?  When I mount the .iso file with Daemon Tools and run wubi.exe, it just asks me if I want to reboot (I think that's useful only when the .iso  is burned on CD), so is there no "real" installation?


When  has been disabled in all ways possible it seems that Internet Explorer 11 on Windows 8.1 honours a website’s X-UA-Compatible value†. This happens outside of compatibility view (the icon is missing from the address bar) and is not caused by compatibility lists or a <!DOCTYPE> directive.  Is there any way for the user (not the web developer) to choose a document mode for a website, overriding the website’s X-UA-Compatible value?   has accepted  that works by defining the default document mode with regard to the <!DOCTYPE> directive. I've tried the registry trick without success. While it may have solved the problem for the other author’s question, my question has to do with X-UA-Compatibile headers.     † Picasa Web Albums defines X-UA-Compatible as IE=EmulateIE7. Opening the F12 developer tools and switching document mode from 7 to anything newer (8, 9, 10, Edge) instantly fixes the website. However changes done through the developer tools do not persist.

Is there any way to force IE10 to open all sites in non-compatibility view? The only way I can do it is by pressing F12 and changing the mode but I have to do it every time I open a new tab. The list for websites to open in compatibility view is empty.  Edit:  The compatibility view settings are like this:     Websites added is empty  Display all is uncheck  Display intranet is uncheck  Download list is uncheck


For which $n, 120\mid n^5-n$ is true?  I could show that $30\mid n^5-n$ is always true by following way:  $n^5-n = (n-1)n(n+1)(n^2+1)$  Since the product of three consecutive integers is a factor of $n^5-n$, the number is divisible by $2$ and $3.$  For divisibility by $5$: $n \equiv 0,1,2,3,4 \pmod 5 \implies n^2 \equiv 0,1,4,4,1 \pmod 5\implies n^2+1 \equiv 1,2,0,0,2 \pmod 5$.  It follows that $n^5-n$ is divisible by $5$.  Combining everything together, we conclude that $n^5-n $ is divisible by $30.$  For divisibility by $120$, since, the number is divisible by $3\cdot5=15,$ consider divisibility by $8$:  $n \equiv 0,1,2,3,4,5,6,7 \pmod 8 \implies n^2 \equiv 0,1,4,1,0,1,4,1 \pmod 8\implies n^2+1 \equiv 1,2,5,2,1,2,5,2 \pmod 8$   Therefore $n^2+1$ is never divisible by $8.$ So, $n^5-n$ will be divisible by $120,$ when $n \equiv 0,1,7 \pmod 8.$  The answer key says that the statement is true for all odd values of $n$. Help me.

Find n such that $n^5 - n$ is divisible by $120$. (*Here $n$ belongs to the natural number set)  Seems a trivial problem, but the answer mentioned in the text book seemed incomplete to me so I'm here just to ensure whether approach to this problem is correct or not.  So my approach is as follows: We know that $n^5 - n$ can be written as $n^5-n = n(n-1)(n+1)(n^2 + 1)$  Now since it's product of three consecutive natural numbers so it's divisible by $3! = 6$. Now using Fermat's Little theorem we can prove that $n^5= n \mod5$ hence $n^5 - n$ is divisible by $5$ as well. So $n^5 - n$ is divisible by $30$. Now to ensure their is another factor of $4$ in the term we need to ensure that $n^5 - n$ is divisible by $8$. I found that all odd natural numbers and multiples of $8$ makes $n^5 - n$ divisible by $8$, hence $n^5 - n$ is divisible by $120$. But in the text book they have only mentioned odd natural numbers as answer, which seemed incomplete to me.  Thanking everyone in advance:P


From my phone:  From Windows 7 SP1 x64 Ultimate:

I have critical low storage level and can't understand what takes much of it and how that's possible that the installed applications can use 7 GB? I only use a few social media clients without any games or soft like Photoshop. Also on the second screenshot it indicates that the apps are using just 1.13 GB and so I can't understand the situation. Also what is the "Other"?


Why there are different approach to create a button, and which one to use when.  <form> <input type="button"> <button type="button"></button> </form>   I would like to have some explanation.

When looking at most sites (including SO), most of them use:  <input type="button" />   instead of:  <button></button>    What are the main differences between the two, if any? Are there valid reasons to use one instead of the other? Are there valid reasons to use combine them? Does using <button> come with compatibility issues, seeing it is not very widely used?


I am looking for a story which I read probably two decades ago, in the 90s, but which was probably already old at that point. I think I read it in some kind of anthology, in English, and in the USA.  A substantial number of children, all across the world, are the result of some kind of virus which caused infected women to become pregnant. The resulting children are either clones of the virus's creator, or else his DNA acts as the father's and mixes with the mother's in the normal way—I don't remember which.  The children who resulted are identifiable by their appearance. The story follows one such child in school (middle or high school, I'd say). Being one of these children is an embarrassment and makes him an outcast from the normal children.  I believe a band of these "siblings" comes together and end up finding the creator of the virus.

A scientist creates a virus (bacteria?) which, when encountering a woman, implants a fetal clone of him, which the woman is pregnant with.  Millions of his clones have already been born, and society is having a hard time accommodating them.  The man is in hiding, working as a teacher in a special class for his clones.  He is evaluating one particular young clone, who apparently suffered from fetal alcohol syndrome, which was detected based on his unexpectedly low test scores.  It's a short story, read in the 2000s or earlier.


I do physics and math, and so I have accumulated many different "\newcommand"s that make my life much easier that depend really only on the three packages amsmath, amsthm, and amsfonts.   My question is this:   What is the best way for me to carry them from document to document, other than merely copy and pasting all of the new commands into one huge, disgusting preamble? Ideally, I would like to be able to do something as simple as just having a single text file that I call, but it seems a bit more involved than that.

I know how to define a package or a class, but how do I make it available (to myself) at all times?  Say I have the package file commonstuff.sty (or myprettyclass.cls), that I want to be able to include in any .tex file I create on my computer. Where do I put it? Do I need to run some installer on it, or is it enough to keep it in a certain folder?  Note: I know I can just place it in the same folder as the .tex file, but that's not what I'm after here. I'm looking for a way to "install" the package centrally on my computer.


I cannot figure out what I am doing wrong in this basic example. I want to have a function inside my expl3 code draw a simple picture with tikz, but I get an error Package pgf Error: No shape named 0:0 is known. MWE \documentclass{extbook}  \usepackage{tikz}     \usetikzlibrary{arrows,automata,positioning,calc}  % my command to draw an orange rectangle with tikz \newcommand{\drawmyshape}{     \tikz[font=\normalsize]{         \draw[color=orange!50, fill=orange] (0:0) -- ++(\linewidth,0) -- ++(0,-2em) -- (0,-2em) -- (0,0);     }%%%%% }%%%%%  \usepackage{xparse}%allows the NewDocumentCommand  \ExplSyntaxOn  %Why does the tikz code inside the expl3syntax break it? I need to be able to call this here. \NewDocumentCommand{\drawmyshapeagain}{}{     \tikz[font=\normalsize]{         \draw[color=orange!50, fill=orange] (0:0) -- ++(\linewidth,0) -- ++(0,-2em) -- (0,-2em) -- (0,0);     }%%%%% }%%%%%  \ExplSyntaxOff  \begin{document}  \drawmyshape  \drawmyshapeagain  \end{document}

What I want to do  I want to create a command \planfigur{<edges>}{<angles>} which draws a triangle using TikZ. \planfigur should have 2 mandatory arguments, which let me specify edges and/or angles (where a = alpha, b = beta and c = gamma) of the triangle, which are drawn in red instead of black color.   E. g. \planfigur{ab}{bc} draws a black triangle, where the edges a and b and the angles beta and gamma are red.    I use expl3 and xparse. I already have read (), that there are problems in using expl3 and tikz together (which makes sense).  So I played around and tried to outsmart TikZ. I had the following idea, which unfortunately doesn't work (1:0 for TikZ :-)). The approach is to move all expl3 code into a new command, where I can use \tl_if_in:nnT to check the arguments.  Code  \documentclass{article}  \usepackage{expl3, xparse}  \usepackage{tikz} \usetikzlibrary{calc}  \ExplSyntaxOn  \tl_new:N \__edu_planfigur_temp  \DeclareDocumentCommand \planfigurLines { m } {    \tl_clear:N \__edu_planfigur_temp    \tl_if_in:nnT {#1} {a} {     \tl_put_right:Nn \__edu_planfigur_temp {\draw (b) -- (c);}   }    \tl_if_in:nnT {#1} {b} {     \tl_put_right:Nn \__edu_planfigur_temp {\draw (a) -- (c);}   }    \tl_if_in:nnT {#1} {c} {     \tl_put_right:Nn \__edu_planfigur_temp {\draw (a) -- (b);}   }    \tl_use:N \__edu_planfigur_temp }  \DeclareExpandableDocumentCommand \planfigurAngles { m } {   \tl_if_in:nnT {#1} {a} {     \tl_put_right:Nn \__edu_planfigur_temp {\draw ($(a) + (0:1)$) arc (0:40:1) ($(a) + (20:0.7)$) node {$\alpha$};}   }   \tl_if_in:nnT {#1} {b} {     \tl_put_right:Nn \__edu_planfigur_temp {\draw ($(b) + (120:1)$) arc (120:180:1) ($(b) + (150:0.7)$) node {$\beta$};}   }   \tl_if_in:nnT {#1} {c} {     \tl_put_right:Nn \__edu_planfigur_temp {\draw ($(c) + (220:1)$) arc (220:300:1) ($(c) + (260:0.65)$) node {$\gamma$};}   }    \tl_use:N \__edu_planfigur_temp }  \ExplSyntaxOff  \DeclareExpandableDocumentCommand \planfigur { m m } {   \begin{tikzpicture}[scale=0.65, line join=round, thick]      \coordinate (a) at (0,0);     \coordinate (b) at (5,0);     \coordinate (c) at (3.37, 2.83);      \draw (a) -- node[below] {$c$} (b) -- node[above right] {$a$} (c) -- node[above left] {$b$} (a) -- cycle;      \draw (a) node[left] {$A$};     \draw (b) node[right] {$B$};     \draw (c) node[above] {$C$};      \begin{scope}[color=red, fill=red!25, very thick]       \planfigurLines{#1}       \planfigurAngles{#2}     \end{scope}  \end{tikzpicture} }  \begin{document}  \planfigur{ac}{a}  \end{document}   Error     ! Package pgf Error: No shape named 0:1 is known.      See the pgf package documentation for explanation. Type  H     for immediate help.  ...                                                      l.70 \planfigur{ac}{a}


How do I find an integer $a$ such that that :  $$ (x-a)(x-12)+2$$   can be factorized as $(x+b)(x+c)$ where $b$ and $c$ are integers too.  I have tried expanding the equation and taking the determinant as $k^2$ . But I can't proceed any further from that

I need to solve following problem, but don't know to start with, please provide hints and solutions.  Find all integer values of $a$ such that the quadratic expression $(x+a)(x+1991) +1$ can be factored as a product $(x+b)(x+c)$ where $b,c$ are integers .


I know that since some version StreamWriter stopped support Finalizer, but in  I see it calls GC.SuppressFinalize(this). Why does it call it? I thought it is actually only for the object which has Finalizer.  Update I am wondering whether GC.SuppressFinalize() has some effect if the object has not Finalizer?

In .NET, under which circumstances should I use GC.SuppressFinalize()?  What advantage(s) does using this method give me?


I can't install Midnight Commander (mc) on Ubuntu 18.04.1.  /etc/apt/sources.list file:  deb http://archive.ubuntu.com/ubuntu bionic main deb http://archive.ubuntu.com/ubuntu bionic-security main deb http://archive.ubuntu.com/ubuntu bionic-updates main   And this is the reply I get when I try to install:  $ sudo apt-get install mc Reading package lists... Done Building dependency tree Reading state information... Done Package mc is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or   is only available from another source   This didn't help (#1):  $ sudo apt-get update   This didn't help (#2):  $ sudo add-apt-repository ppa:eugenesan/ppa sudo apt-get update sudo apt-get install mc   It also didn't help to change mirror to http://de.archive.ubuntu.com, for example.

How do you use terminal to enable Universe source? Or any those 4 from Software Sources: Main, Universe, Restricted, Multiverse Main is on by default and Restricted is on if durring Ubuntu installation i tick Enable Restricted Formats. Answer with line where version checked so it auto detects it. Like command I know for partner but that goes to Other Software tab sudo add-apt-repository "deb http://archive.canonical.com/ $(lsb_release -sc) partner"


Let $𝐺$ be the group generated by the matrices $𝐴=\begin{bmatrix}2&0\\0&1\end{bmatrix}$, $𝐵=\begin{bmatrix}1&0\\1&1\end{bmatrix}$, where the group operation is matrix multiplication.      Prove that $𝐺$ contains a subgroup $𝐻_𝑖$ for each $𝑖\in \mathbb{Z}$ such that   $$ \cdots \subset H_{-2}\subset H_{-1} \subset H_0 \subset H_1 \subset \cdots$$   So this is all that is given and i'm not sure where to start from this question. I know that $ABA^{-1}$ is just B with the bottom right replaced by $1/2$. From this we can replace A with $A^2$ and so on but i am not sure how i would prove this. Can someone help please?

Let $𝐺$ be the group generated by the matrices $𝐴=\begin{bmatrix}2&0\\0&1\end{bmatrix}$, $𝐵=\begin{bmatrix}1&1\\0&1\end{bmatrix}$, where the group operation is matrix multiplication.      Prove that $𝐺$ contains a subgroup $𝐻_𝑖$ for each $𝑖\in \mathbb{Z}$ such that   $$ \cdots \subset H_{-2}\subset H_{-1} \subset H_0 \subset H_1 \subset \cdots$$   So this is all that is given and i'm not sure where to start from this question. I know that $ABA^{-1}$ = $B^{2}$. From this we can replace A with $A^2$ and so on but i am not sure how i would prove this. Can someone help please?


private string MethodName {    get    {       MethodBase m = MethodBase.GetCurrentMethod();       return String.Format("{0}.{1}", m.ReflectedType.Name, m.Name);    } }   I'd like to do something like this but of course now the call is made from a different method to the one I want to describe. Is there a simple way around this or an obvious alternative?

When logging in C#, how can I learn the name of the method that called the current method? I know all about System.Reflection.MethodBase.GetCurrentMethod(), but I want to go one step beneath this in the stack trace. I've considered parsing the stack trace, but I am hoping to find a cleaner more explicit way, something like Assembly.GetCallingAssembly() but for methods.


How can  I show that $\{x \in \mathbb{R}^{2}: |x| =1\}$ has measure zero using the definition of measure zero? I don't want to use the interpretation of measure in $\mathbb{R}^2$ as area (and then show this by using the fact that the area of a circle is $\pi r^2$. I was thinking somehow find rectangles to that contain the circumference of this circle and keeping one of the sides of each rectangle free to make $\varepsilon$-small. I'm not able to get ahead with this approach though. Thoughts and ideas?  Note - this question is NOT a duplicate of  because it focuses on a specific example. The results from the other question might be modifiable to apply here, but look at something different.

Let $f\colon[a,b] \to \mathbb R$ be a continuous function. Show that its graph has measure zero.  I've tried with the following idea but I got stuck:  Let $\epsilon >0$, since $f$ is uniformly continuous, there exists $\delta>0$ such that $ |x-y|< \delta \implies  |f(x)-f(y)|<\epsilon$. Let $P=\{x_0,\dots,x_n\}$ be a partition of the interval $[a,b]$ with $ |x_i-x_{i-1}|<\delta$.   The graph of $f$ is $G(f)=\{(x,f(x)) : x \in [a,b]\}$, and $G(f) \subset \bigcup_{i=1}^n [x_{i-1},x_i]\times[m_i,M_i]$, where $m_i=\min_{x \in [x_{i-1},x_i]} f(x)$,$M_i=\max_{x \in [x_{i-1},x_i]} f(x)$.  We have $ |G(f)|_e \leq \sum_{i=1}^nm([x_{i-1},x_i].m([m_i,M_i])<n\delta\epsilon$. At this point I got stuck, I need to arrive to an inequality with $\epsilon$ times a constant or something of the sort. I would appreciate some help.


Assuming that you hear that X affects 1% of the global population, is it safe to assume that it should affect 1% of the population of your country/city/subgroup?  Given that there is nothing in the subgroup to affect the distribution of X. (Assume that the distribution of X is not mentioned, so should we assume normal/Gaussian?*)  I'm asking because, often, I hear X disease is very rare, it only affects 1% of the global population, which sounds HUGE to me.  *if so, you could say that your country is an outlier and it's much less that 1%, but on average, you should be correct, right?

Let's say you have a large random sample of soccer players in Europe but you are only interested in what happens in Spain. Could you reduce your sample to players in Spain and still call it a random sample (but of a different population)? If not, how would you call that subsample and which specific precautions should you take to be able to make inferences on the population of spanish soccer players?  My feeling is that using that subsample would be fine as long as it is large enough, but maybe I am missing something.


How can I loop through every file in my file system with AppleScrip? And by every file I literally mean every single file, including hidden ones. Can it be done with AppleScript and how?   I will check Date Modified of every single file to investigate what changed after playing around with a specific program.

I want to run a script on all files with two specific extensions on a disk with a hierarchy of multiple nested folders.  My script works fine when I choose a folder further down the line with fewer subfolders but I'd like to run it on an entire archive with over a thousand folders.  The AppleScript takes forever to get all the files and then exits without returning anything and without executing the operations after getting the files.  No timeout message, no error message.  And the Finder becomes unresponsive (and remains stuck after the script exits).   set myFolder to choose folder with prompt "Choose a folder:"     tell application "Finder"         try             set eafFiles to (every file in entire contents of myFolder whose name ends with ".eaf") as alias list         on error             try                 set eafFiles to ((every file in entire contents of myFolder whose name ends with ".eaf") as alias) as list             on error                 set eafFiles to {}             end try         end try         try             set pfsxFiles to (every file in entire contents of myFolder whose name ends with ".pfsx") as alias list         on error             try                 set pfsxFiles to ((every file in entire contents of myFolder whose name ends with ".pfsx") as alias) as list             on error                 set pfsxFiles to {}             end try         end try         set myFiles to eafFiles & pfsxFiles     end tell      repeat with CurrentFile in myFiles         set CurrentFile to CurrentFile as string          do shell script "perl /path/to/perl/script.pl " & quoted form of CurrentFile     end repeat


Often in novels (and other written works, though I'm personally most familiar with them from novels), within a chapter you'll find a little glyph that marks a transition to a different scene.    Usually it is centered, and has at least a couple of blank lines both preceding and following it, thus:                                                                                ⁂  or:                                                                                ❧❧❧  I had thought there was an official name or at least broadly-accepted term for these marks, but  claims:     Space between paragraphs in a section break is sometimes accompanied by an asterism (either proper ⁂ or manual * * *), a horizontal rule, fleurons, or by other ornamental symbols.      An ornamental symbol used as section break does not have a generally accepted name. Such a typographic device can be specifically referred to as dinkus, space break symbol, paragraph separator, paragraph divider, horizontal divider, thought break, or as an instance of filigree or flourish.   Is that true?    Please note: I am asking for the name of the general typographic convention, not the specific glyphs. So the symbol names  (⁂), or dinkus (***) are inadequate.

For example, when some long prose passage ends, this appears:  * *  *  Then some new prose passage begins.  The three asterisks dividing the two prose sections are understood to divide the two sections into non-continuous temporal spaces.  I am interested in knowing if there is a specific name to describe symbolic or graphical markings that are meant to suggest temporal discontinuity.


I recently encountered a problem:  a = 0.0001 b1 = a + 1 + 1 b2 = a + 2 b2 = a + 2 c1 = str(int(b1-a)) c2 = str(int(b2-a))   the result:  c1=1, c2=2  why? who can help me?

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


I'm trying to optimize a vector graphic for laser cutting at the fastest possible speed. Since the laser takes much longer to do curved paths, I wanna try converting all my curves into a series of straight paths and see if that will help. My files are large and complex, but here's a simple example:    The original path is on the left. The end result is on the right.  Is there any way to automate this, either using Illustrator, Inkscape or other vector graphic software?

I have a script that reads SVG  coordinates and creates a dot on each anchor point. The problem is that it does not work with curves so I need to transform the curves of any shape into straight lines - example:    A basic object like that is somewhat easy, but I actually need it on a larger scale. The simplest would look like this:    Is there any way to achieve that automatically with Illustrator CC?   I could adjust the script to read another file extension as long as it only outputs X and Y coordinates (no curves). Ex:  -20.8,262.5 -4.3,263.6 4,264.9 13.4,267.2 23.5,270.6 34.5,275.4


I am unable to find debian package for truecrypt-7.1a version. Any idea where should i look for this debian? Please share if you have source code of truecrypt and steps for creating debian package for same.

1.I have downloaded the linux version from  2. Right click on the file (truecrypt-7.1a-linux-x86.tar.gz), ->Open with Archive Manager. 3. Double click on the extracted file (truecrypt-7.1a-setup-x86), nothing happens.   Someone can help me installing truecrypt on ubuntu 14.04 LTS 32 bit?   SOLUTION!! The extracted file works if in the terminal is typed: ./truecrypt-7.1a-setup-x86


Many years ago I read a short (?) sci-fi story that I've since lost track of.  Here's what I remember:   A man came from the future, met a girl, fell in love, told her he was from the future and (not so sure about this part) found out that she was dying and left her a pill/shot of nanomachines to save her from her illness The girl lived in a remote part of the United States (?), in a very distinct rural area with mountains and trees that meant a lot to her. Said man then went back to the future (?), Humanity gained access to nanomachines, became immortal and started exploring the Universe. The girl/woman was one of the the first explorers and visited many planets She came back from her exploration, back to the place where she was born to wander amongst the tress/mountains she grew up with The nanomachines were injected in the brain stem   Sorry in advance if the details are a bit fuzzy but it was many years ago. Scoured Google but was unable to find anything (likely on the account of misremembering some/most of the details).

I believe she loses a loved one and decides to take a pill to make her better. She eventually embraces technology and becomes a interplanetary (and possibly inter-galaxy) traveler. She travels using beacons of some sort. Eventually returning to earth (Washington state area, maybe Oregon. ). Wow - I know that's vague. Thanks for any help. I did try and search.


How can I find the limit of the following sequence:  $$\frac{1}{2} . \frac {3}{4} ....... \frac {2n - 1}{2n} $$  The problem for me is that they are multiplied and not added, also I can see that the numerator is the set of odd numbers and the denominator is the set of even numbers but then what?

I know I can transform the above product as follows  \begin{eqnarray*}\lim_{n\rightarrow\infty}\left(\frac{1}{2}\frac{3}{4}\frac{5}{6}...\frac{2n-1}{2n}\right)&=&\lim_{n\rightarrow\infty}\prod_{k=1}^n\left(\frac{2k-1}{2k}\right)\\&=&\lim_{n\rightarrow\infty}\prod_{k=1}^n\left(1-\frac{1}{2k}\right)\\&=&\lim_{n\rightarrow\infty}\prod_{k=1}^n\left(1+\frac{-1/2}{k}\right) \end{eqnarray*}  My thoughts are this is going to go to $e^{-x/2}$, but I can't figure out how to go from   $$\lim_{n\rightarrow\infty}\prod_{k=1}^n\left(1+\frac{-1/2}{k}\right)$$  to  $$\lim_{n\rightarrow\infty}\left(1+\frac{-1/2}{n}\right)^n$$


I rendered a scene and all of the textures worked perfectly. I saved, left, and move some textures to different files. now, when I came back and I rendered, part of the texture was missing. Help!

I made a character, and its one of my first times texturing, and I saved my character into a new folder, and when I came back to the model ALL the textures were pink, I used to know what to do, but I stopped texturing, how do I bring my textures back?


We all know that mostly stars are at the center of planetary systems, but is it possible that instead of a star there was a rocky planet in the center with stars (and other planets and moons) orbiting it?  To be more concrete: Is it possible for a star to have the same mass and radius as e.g. the Moon and orbit a planet like Earth at the same distance (at which Moon orbits Earth in actuality)?  To further distinguish this from similar questions, I want to further ask whether the star will still be able to shine and fuse hydrogen if its mass and radius would be the same as the mass and radius of the Moon. Or is there a lower limit to the size of a star that can shine and fuse hydrogen?

I wonder if there ever could be a star (really small) which may orbit around a planet (really big)?


We have a git branch with huge number of java and SQL files (Approx. more than 50,000+ files). Cloning this branch to the local machine is taking too much time (Approx. more than 30 mins). Usually, we don't require the whole branch code, only need a sub-directory.   Please share some information, how to clone a specific sub directory from git using Eclipse.

I have my Git repository which, at the root, has two sub directories:  /finisht /static   When this was in , /finisht was checked out in one place, while /static was checked out elsewhere, like so:  svn co svn+ssh://admin@domain.com/home/admin/repos/finisht/static static   Is there a way to do this with Git?


Being on Review queue pages you can scroll the page while review block itself remains on the top of the page. In such situation some items from the reviewing post (e.g. accepted tickmark or timeline icon) are showed over review block. See animated gif below for clarification:    I'm using FF 73.0.1 on Windows 7

I was having a look at an old question of mine when I browsed the  from the timeline. I scrolled downwards and realized the Review completed panel comes along for the ride. While that might be , tags flowing over top of it as pictured below probably isn't.  Here's a .gif of the Question and Duplicate tabs flowing over it as well. Note that the timeline button also flows over. If vote buttons are present, they will also flow over it.  Reproduced on Chrome and Microsoft Edge. Update Per  by Tiago Martins Peres, this issue also happens in other Review types, namely Late Answers, First Posts and Low Quality Posts. In addition to that, it is causing the action buttons on reviews to become unclickable if you scroll low enough.  As a temporary workaround, you can use 's , which  this issue.


In playing 8-ball pool, if you have only your final object ball remaining, can you call the object ball and the 8-ball at the same time, as long as the object ball is pocketed first, and win the game?

If I am able to shoot in the 8-ball and my last object ball in a single shot and I call the 8 ball in a pocket, do I win? Does the order in which the 2 balls leave the table matter?


Coming from someone who knows a tiny bit about the subject but who really wants to learn. I know it's the square root of -1 but I would like some insight as to why it's used at all.

I am trying to understand how complex numbers made their way into QM. Can we have a theory of the same physics without complex numbers? If so, is the theory using complex numbers easier?


This is a question from binomial theorem. How do i approach these problems, can we find the coefficient of any arbitrary power of x, if there is some particular concept linked to these problems? Please help

Find the coefficient of ${x^9}$ in the expansion of $\left( {1 + x} \right)\left( {1 + {x^2}} \right)\left( {1 + {x^3}} \right)..\left( {1 + {x^{100}}} \right)$. The official answer is 8. How do I find the general term, Dividing the above equation by $(1-x)$ is not generating the required result.


Is there a set which cannot be proven to be finite or infinite? The set must be not be proven to be infinite of any cardinality.  I am a novice at set theory regarding these topics, so if this is something that I can solve for myself if I study the right topics, pointing out the topics will be very helpful to me.

Let $S$ be an infinite subset of $\mathbb{R}$ with the property that the existence of $S$ can be proved within ZFC (and in particular the definition of $S$ does not invoke the negation of the continuum hypothesis), but the cardinality of $S$ is undecidable within ZFC.  Are there some concrete examples of such sets?  I.e. something more constructive than $S:=$ some subset of cardinality $\aleph_1$?  This question results from musing about intuitively obvious equivalents of $\neg CH$ in order to find evidence against the validity of $CH$. My (undoubtedly too optimistic) thinking was that if some such example of $S$ is concrete enough, it would be perhaps intuitively obvious whether it should be countable or continuum, despite this being undecidable formally.  My best guess for the moment is something along the lines of  $$S=\left\{\sum_n\frac{1}{a_n}:\; (a_n)\;\text{is a strictly increasing sequence of primes}\right\}$$  but surely the cardinality can be determined (though not quite sure how).


The elements of the group $\mathbb Z^*_{31}$ is $1$ to $30$. I found the first element with order $30$ is $11$ by checking the powers of each element by $2,3,5,6,10,15,30$. My professor mentioned that the other elements with order $30$ can be found after finding the first element using a theorem. Could someone please help me with that.

Let us say I have to find all the generators for modulo $p=7$. That must mean that:  $$\mathbb{Z}_7 = \mathbb{Z}^*_7 = \{1,2,...,7-1\}$$  So now I need to get all the generators for $7$. Now I choose randomly from the group $\mathbb{Z}_7$ and pick the number $3$. So if $3^n$ for $n = \{1,2,\dotsc,7-1\}$ can generate all elements from $\mathbb{Z}_7$, the number is considered a generator.  $$3^1 \pmod 7\equiv 3\\ 3^2 \pmod 7\equiv 2\\ 3^3 \pmod 7\equiv 6\\ 3^4 \pmod 7\equiv 4\\ 3^5 \pmod 7\equiv 5\\ 3^6 \pmod 7\equiv 1$$  Now I have found one generator. Someone claimed one can find all generators in the group with a faster method, when one already has one generator. Can someone please show me how that works?


Is there any front end  that sit over R and execute codes - basically making usage of R further simpler? In my team we used to run lots of statistical things using R. There are some people who are from different background and don't have  any knowledge of statistics. For them we are planning to make some front end using R. Using which they can run the analysis by doing some simple clicks.But before doing that I thought to check with you guys if there is any readily available front end for R  Thanks in advance

Is there any GUI for R that makes it easier for a beginner to start learning and programming in that language?


I'm studying engineering and I'm very interested in knowing more about topology. I've studied Calculus, so I'm not new to the subject. I was looking for a book that's not too difficult, and gives an overview of topology. That way I can know if I'd like to read more about it. What should I read? Edit: do you think that I should study abstract algebra before topology?

I am a graduate student of math right now but I was not able to get a topology subject in my undergrad... I just would like to know if you guys know the best one..


I've added a torus knot using the the "Add Curve: Extra Objects" addon. I've done some work on the scene, and now would like to go back change the knot parameters that were in the operator settings when I first added the curve.   How do I get back to that panel to adjust operator settings?

When you first add a cylinder, you have the option to change the number of vertices, etc, but once you do anything else in blender, it seems you no longer can edit those parameters.   Is there a setting anywhere or an add-on that allows these parameters to be edited later on? If not, how easy would such an addon/feature be to create for anyone reading this?