How to prove the product of the elements of $U_n$ , $B$is congruent to $1$ or $-1$. $U_n$ is the set of all positive numbers less than and relatively prime to $n$. We have to prove $B \equiv 1$ (mod n) where  $B$ is the product of the elements of $U_n$. My Attempt:   We can see the statement is true for $n = 1 , 2$. The number of elements of $U_n$  will be  even for all natural number $n> 3$ as $\phi(n)$  is an even number for all natural number $n \geq 3$. So we will get odd number of elements of order $2$ for each group of order $n(\geq 3)$. $B = b_1 b_2 ... b_k$  where $b_i \in U_n$  and $b_i$ is of order $2$ and $k$  is an odd number for all$n \geq 3$. Now it remains to prove this product is congruent to $1$ or $-1$ mod n. Can anyone please help me ?

How can we compute the product of all invertibles in $\Bbb Z_n$?  In the special case $n=p$ where $p$ is a prime it is Wilson's theorem. By pairing inverses it reduces to computing the product of all $a$ such that $a^2\equiv 1\pmod{n}.\,$  How can we do that?


I'm working in an IT company mostly working on web applications. My company suggested to open a Stack Exchange account for our company where we'll be asking questions if any.  So my question is: Is Stack Exchange valid for companies or groups or should it be just an individual thing?

I'm wondering if there's ever a reason or time when a company should have its own user (like say, Stack Overflow), instead of users that make it up (like, Jeff Atwood).   I figure this is kind of a bad idea as someone with access to multiple accounts could upvote himself over and over.... but is there any point this is okay and/or a good idea?


when anything passes the event horizon of a blackhole, it must be moving faster than light as even light cannot escape. So then, shoundnt it time travel?

In Newtonian mechanics, if we throw an object in against direction of gravity with speed $v$ and it achieve max height of $h$. Now if we allow object to fall from that height $h$, it will eventually attain speed $v$ when it reach position where we launch it.   Now applying same idea to a black hole in general relativity. Speed require to escape black hole gravity is greater than $c$, so if we throw something into black hole with almost the speed of light, the object speed will exceed speed of light $c$ before hitting black hole surface! How relativity explain this? Can space-time curvature reduce speed of this freely falling object from attaining speed of light?


In our application, we receive text files (.txt, .csv, etc.) from diverse sources. When reading, these files sometimes contain garbage, because the files where created in a different/unknown codepage.  Is there a way to (automatically) detect the codepage of a text file?   The detectEncodingFromByteOrderMarks, on the StreamReader constructor, works for UTF8  and other unicode marked files, but I'm looking for a way to detect code pages, like ibm850, windows1252.     Thanks for your answers, this is what I've done.  The files we receive are from end-users, they do not have a clue about codepages. The receivers are also end-users, by now this is what they know about codepages: Codepages exist, and are annoying.  Solution:    Open the received file in Notepad, look at a garbled piece of text. If somebody is called François or something, with your human intelligence you can guess this. I've created a small app that the user can use to open the file with, and enter a text that user knows it will appear in the file, when the correct codepage is used.  Loop through all codepages, and display the ones that give a solution with the user provided text.  If more as one codepage pops up, ask the user to specify more text.


The sequence ${a_n}$ is defined by $a_1=2$, and   $a_{n+1}= {1\over2}(a_n+{2\over{a_n}})$ for $n≥1$. Assuming $a_n$ converges, find its limit.  I've found that the limit is $\sqrt2$ just by plugging a couple points, but not sure how to figure this out without plotting points (ie. by taking $\lim_{n\to\infty}S_n$) but I can't seem to figure out a formula for $a_n$ either.

Let $a_1=1$ define $a_{n+1}=\frac{1}{2}(a_n+\frac{2}{a_n})$ . Show that the sequence converges to $\sqrt{2}$. The idea is to show the sequence is bounded and monotone . But how should I do it?


(Saw this question in a russian forum and wanted to share it here.)  Was Leo Bonhart a witcher?   He was in early senior age and still got an enourmous speed, strength and reaction.   Non-human fishy eyes. He knew the wolf's school fighting style as he could recognize it from Ciri.  Was able to kill 3 other witchers.     Killed Cahir way to easy and mentioned that Cahir have no chances against him, if he is not a witcher.     Yennefer stabbed a fork in his face. A regular human would loose at least the ability to fight.

How was possible that Leo Bonhart, an "ordinary" human, was able to kill three Witchers? Was he just well trained, or had magic to help him as well?


You are an astronaut, traveling through space, but you ran out of fuel and need to get a hold of Houston immediately. How do you do it? You previously gave Houston one of two quantum particles that have been entangled. At the moment of distress you would change one of the particles, so the other would do the same and the distress call would be received.   Is such a system possible? Can we use quantum entanglement to send information instantaneously? If I remember correctly I though there also was a law stating that no information can travel faster than the speed of light. Or maybe I have that idea wrong.

What ever happened to  in entangled quantum states, i.e. the ? I thought they argued that in principle one could communicate faster than speed of light with entangled, separated states when one wave function gets collapsed. I imagine this paradox has been resolved, but I don't know the reference.


I've a single host with CentOS 6.3. I manage that host via SSH. The server itself is uname -n: servername.foo.com. On this host I've multiple, unrelated httpd vhosts.  The problm is: when one vhost sends a mail with PHP mail(), the sent mail header contains multiple servername.foo.com traces (Message ID is xyx@servername.foo.com, Received by is servername.foo.com and so on).  The mail are sent by postfix. No other mail services are used on this server.  The question is: how can I sent e-mail from each vhost pretending to be thatVhost.com instead of leaving traces of servername.foo.com in the mail headers?

So I have several servers all set up to send and receive mails from multiple domains, this all works perfectly fine.  However a few people have complained that within the mail headers you still see the name of the server being used, we'll call it "mail1.example.com". They can send and receive mail fine, it's showing their email addresses, using the right DKIM reports etc but they don't like having to have SPF records within their DNS specifically for my server or the headers.  Is it possible in any way with Postfix to "virtualise" the usage of "myhostname" so that it can pic/choose which server name to use?


So here is a question that was asked on SO on Jan 2 '11 at 16:32    and the other question that was asked on SO on Dec 2 '12 at 16:01    But the first question asked on 2011 is marked as duplicate of the second question which was asked on 2012. My question is why? Is it because the second question is having more views, more votes and a better answer than the first one or it is a honest mistake?

I have seen this many times, a question is being asked because a previous, duplicate question was asked and answered a few years ago and has no longer relevant answers.  The  is to edit the old question, or add new answers to it, but it is not always happening.  I was wondering, should I still mark it as duplicate and vote to close it? Or just leave it as is?


As a non-native speaking programmer, I need a general pattern to name input and output variables of operations where the variables are of the same type and I noticed that employ, employer employee is a great pattern. Can I use this for any verb?  Are the following correct?   merge, merger, mergee (the function is called merge, the one everything is merged into is called merger and the mergees are the ones that go into the merge) split, splitter, splitee (the function is "split", the original item is the "splitter" and the "splitees" are the results) connect, connector, connectee transfer, transferer, transferee approve, approver, approvee support, supporter, supportee manage, manager, managee   And so on.  If no, how do I decide when I can do this and when I can't?

There are a few examples of pairs of words ending with -ee/-er like employee and employer or advisee and adviser. What I was curious about is if there was any rule that would describe the relationship of the objects in a pair like this and situations when it's appropriate to create a counterpart for a given word.   I'll give you an example. It's relatively common in the computer programming world to see the word dragee, which describes an object that is being dragged with a mouse. I understand that this is a relatively new word and could not be found in any dictionary (I've tried). Is that acceptable to make up words like this one or is it just bad English?


I played the first 10 competitive and got ranked to silver 1.    And, when I won my 20 competitive match my rank didn't change, why is that?  I don't understand how the rank system in the game works.

Ever since I started playing with CS:GO, I've been in the bronze rank in Classic Competitive. No matter how many rounds I win, how many times I am the MVP, I won't get a new rank.    How does the ranking system work? How do you progress?


From time to time I hear X dollars in value was erased in the stock market etc. But can money really vanish when, for instance stocks lose value?  For example, Joe buys a stock from Ben for 100 dollars, then the price crashes to 20 dollars. Well Ben still has the 100 dollars, and it is only Joe who lost 80.

For a stock with market cap in hundreds of billions, when the price goes down, it's market cap could drop in billions in seconds. When this happens, does the money just disappears into the thin air? I suppose it's not logical to think it just disappears, for example in gambling, when one guy lost money, the other guy wins the money, the money doesn't just disappears, it just switched from one person to another. So in stock, where did the money go when the price of a stock goes down?  Update: In Aganju's example, no actual money is involved yet because I painted the picture and I haven't sold it in exchange for money yet, so it's just value of the picture goes up or down.  Now assume I sold the picture for $1000 to person A, then few months later person A doesn't want it anymore and want to sell it, but he can only sell it for $900. In this case, the total money involved is $1000, the actual cash didn't disappear. It it correct to say person A lost $100 to me, and he will lost more money to me if the value of the picture keeps going down? Is it correct to say when a stock price goes down, the stock holder lost money to the people who sold them the stocks?


You see this style of graphic usually as a background in a banner or similar.  I'm interested to know if anyone know if there's an established term for graphics in this style (like "irregular matrix" or who knows), and also if you know how to create them fairly easily (preferably using Sketch 3, but CC tools would do as well).

I have been thinking for quite a while how would i make it myself. The difficulty lies in randomness. I Could go on manually but can't help and feel that there is some better way to do it.  For example it was to be generated using some programming language then all i need to do is create mountains with varying hues and let the 3d light lit them.


Why news titles use the Present Indefinite for the events that have already happened? Here is an example (sorry, it was the one that attracted my attention):      Windsor-area mom dies of flesh-eating necrotizing fasciitis   Why "dies"? Is it a feature of the news language? Or is it a standard English? Thank you!

What is the difference between the examples below?  Generally, in a newspaper, news is based on past tense (things which have already happened).   Then why are headlines written in ways that says: He Kills (shouldn't it be: He Killed)?  For example:  Parliament passes bill vs. Parliament passed bill  Also  He kills his friend vs. He killed his friend  Please help.


I've been totally unable to use my server for the last couple of days. I've been contacting the owners of the IP's who are attacking me but its an uphill battle. Since I don't know who is doing the attack, what can I do to stop the attack?  I've already talked to the colocation center and they told me that they don't do any ddos mitigation(although I have a list of IP's from before my server went down.)   I've considered bouncing the packets to some of the smaller hosts which are attacking in hopes that they go down but I really don't like the idea of shooting the messenger. I don't understand why the companies which host the IP's aren't doing anything to stop this. Help!

This is a  about DoS and DDoS mitigation.   I found a massive traffic spike on a website that I host today; I am getting thousands of connections a second and I see I'm using all 100Mbps of my available bandwidth.  Nobody can access my site because all the requests time out, and I can't even log into the server because SSH times out too!  This has happened a couple times before, and each time it's lasted a couple hours and gone away on its own.  Occasionally, my website has another distinct but related problem: my server's load average (which is usually around .25) rockets up to 20 or more and nobody can access my site just the same as the other case.  It also goes away after a few hours.  Restarting my server doesn't help; what can I do to make my site accessible again, and what is happening?  Relatedly, I found once that for a day or two, every time I started my service, it got a connection from a particular IP address and then crashed.  As soon as I started it up again, this happened again and it crashed again.  How is that similar, and what can I do about it?


Here in my company there is a policy that limits me to seeing certain websites, which, to a certain extent, I agree with. Unfortunately, images that are on the Imgur domain (including ) can not be viewed. I tried a technique where I add the term "cache:" at the beginning of the page address to try to see something, but I did not succeed.  Anyway, is there any technique that I can navigate and see the images? I do not think it is going against company policy, but there must be an unnecessary lock.

Imgur is blocked by two of the private ISPs we use. Is there a workaround without involving tunnelling?  Bear in mind that Filmot (an Imgur mirror) and Flickr are also blocked.


I am trying to create something like volumetrics with a falloff: beams of light that shine visibly into the air from an emissive object, becoming gradually less visible as they get farther from the object.    This strikes me as involving some sort of volumetrics, which Cycles supports (yay!), but extruding the actual geometry out and giving it an emission volume shader either produces extreme blocks of light or none at all (and it doesn't have that cool flame appearance).   Plain text on a plane would be perfect!

I was working on a something and I thought, wouldn't sunbeams look great with this. So I searched in google and everywhere but didn't find any answer. So my question is how to make sunbeams in blender?


I am having issues with Merge fields not working with the visualforce page I created.   This is the code where it is having issue;   <apex:commandLink target="_blank" action="https://na99.salesforce.com/a2g/e?CF00N0A000000Okji={!Account_Plans__c.Name}" value="New Key Business Initiative"/>    It is not querying this field; CF00N0A000000Okji={!Account_Plans__c.Name}  Any help is appreciated.   Thanks!

<apex:page standardController="Employee__c" extensions="testPage" id="p"> <apex:form id="f">        <div>         <input type="radio" name="acc" value="Existing" checked="checked"                 onclick="show(true, false);">Existing</input>         <input type="radio" name="acc" value="NEWAcc"                 onclick="show(false, true);">New</input>     </div>     <apex:pageBlock id="pb1" title="Pg Block 1">     <apex:pageBlockButtons >  <apex:commandButton value="save" action="{!saving}"/>    </apex:pageBlockButtons>     <apex:pageBlockSection columns="1">    <apex:inputField value="{!pme.Name}" />    <apex:inputField value="{!pme.Address__c}"/>       <apex:inputField value="{!pme.Phone__c}"/> <apex:inputField value="{!pme.type__c}"/>     </apex:pageBlockSection>     </apex:pageBlock>     <apex:pageBlock id="pb2" title="Pg Block 2">     <apex:pageBlockButtons >  <apex:commandButton value="save" action="{!saving}"/>   </apex:pageBlockButtons>     <apex:pageBlockSection columns="1">    <apex:inputField value="{!pme.Name}" /> <apex:inputField value="{!pme.Job_Title__c}"/>    <apex:inputField value="{!pme.Salary__c}"/>    <apex:inputField value="{!pme.type__c}"/>     </apex:pageBlockSection>     </apex:pageBlock> </apex:form>    <script> function show(showPb1, showPb2) {     // Match Visualforce's prefixing pattern     document.getElementById('p:f:pb1').style.display = showPb1 ? 'block' : 'none';     document.getElementById('p:f:pb2').style.display = showPb2 ? 'block' : 'none'; } show(true, false); </script> </apex:page>   Controller  public with sharing class testPage { public string Existing{get; set;} public string NEWAcc{get; set;} public Boolean radioexisting{get; set;} public Boolean radionew{get; set;} public Employee__c pmepme{get;set;} List<SelectOption> ownershipValues;     public Employee__c emp{get;set;}     public Employee__c pme{get;set;}     public Employee__c emplist{get;set;}     public String var {get;set;}         public boolean editSection {get;set;}          public testPage(ApexPages.StandardController controller) {         radioexisting=true;         radionew=false;             Employee__c emp=new Employee__c();             pme=(Employee__c )controller.getRecord();             editSection =true;             var= ApexPages.currentPage().getParameters().get('Id');              system.debug('erecrrrtrtrt');                  system.debug('erecrrrtrtrt'+NEWAcc);             if(var!=null){             emplist=[select Name,Address__c,Phone__c,Job_Title__c,Salary__c,type__c  From Employee__c where id=:var];             }             }          public PageReference saving(){                         system.debug('erecrrrtrtrt'+Existing);                  system.debug('erecrrrtrtrt'+NEWAcc);             upsert pme;             PageReference p=new PageReference ('/'+pme.id);             p.setRedirect(true);             return p;             }     public PageReference pbBlockRender() {     return null;     }     public PageReference EdittheSection (){ editSection = true; PageReference pf=new PageReference('https://c.ap2.visual.force.com/apex/test6');  pf.setredirect(true); return pf;           }      public String mypbBlock { get; set; } }   iam getting the following please help to fix it     System.SObjectException: SObject row was retrieved via SOQL without   querying the requested field: Employee__c.Name


I have a Non Root User abc,abc2.....  I want to add this to a group of users and want to give the group of user ssudo rights only to restart, start or stop - mysqld service. i.e sudo service mysqld restart. How can I do it so?

I have a Non Root User abc and want to give the user sudo rights only to restart, start or stop - mysqld service. i.e sudo service mysqld restart. How can I do it so?     I would like to do the same to usergroup too!!


I am still learning Java, and I am not sure what the difference is in creating these two types of HashMap? Are they the same? If not, is there any major differences?  HashMap<String,String> hash1 = new HashMap <String,String> ();   vs  Map<String,String> myMap = new HashMap<String,String>();    I understand the fact that one is calling HashMap type, and the other is calling Map Interface.    P.S - there is  that is kind of similar but does not give the exact answer that I am looking for.   Thanks in advance,

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


Let $a>0$. Count $\int_0^1 \frac{\arctan(ax)}{x\sqrt{1-x^2}}$.   Can you show me how to prove it correctly that I can integrate the derivative of this function?

How can I prove that I can differentiate the integral:  $$ \int_{0}^{1} \frac{\arctan(ax)}{x\sqrt{1-x^2}}\,dx $$  First I have to prove this integral converges. Next I have to prove the integral $$ \int_{0}^{1} f_{a}'(x, a)\,dx $$ converges uniformly.  Then I can differentiate integral with Leibniz's rule.  I tried Weierstrass and Dirichlet's tests. Nothing succeeded.   Thank you for help in advance.


How do you create this text effect in Illustrator?  I tried creating a shadow behind the letter, but it did not appear similar to this.  Can anyone point me to the right direction?

I'm bit of a newbie in Adobe Illustrator and have been learning the application by trying to follow some tutorials and recreating some cool stuff I come across on the web.   That being said, I'm having trouble replicating the effect found in the following image using the standard 'Extrude & Bevel' options. I've also tried copying + pasting the text in front, back, in place and that came out even more horrendous. 'Extrude & Bevel' gives me a nice approximation but nothing that pops out like in the example.   Any tips on how to fine tune my 'Extrude & Bevel' settings or an entirely different method of achieving a similar effect would be very much appreciated. Thanks for your time and help!  How can I create a 3D effect on my text similar to the one in the following image, using Illustrator's Extrude and Bevel tools?


Well known k-means algorithm is not guaranteed to converge to global minimum. It only converges to local minimum. So my question is, what are the clustering algorithms that are guaranteed to converge globally? Thanks!

So there are lots of clustering algorithms with different characteristics. What I am interested in now is a clustering algorithm which guarantees to find the optimal clustering result (if exists). And consequently, the algorithm would be deterministic. E.g. DBSCAN is deterministic but is it guaranteed to find the optimal clustering solution? For k-means, this doesn't apply since it is non-deterministic and it can get stuck in local minima.  So is there a clustering algorithm which guarantees to find the optimal solution? And are clustering algorithms classified by their "Finding optimal solution" characteristic? If a clustering algorithm X is deterministic, does it mean that it finds the best clustering that exists? Thanks!


The infinite series $$\sum_{n=0}^\infty n/2^{n}$$ converges to $2$.  But how to show that the infinite series converges to $2$?  Please help. Thank you.

Show that $\sum_{n = 1}^{+\infty} \frac{n}{2^n} = 2$. I have no idea to solve this problem. Anyone could help me?


$E$ be an algebraic extension of $F$. Suppose $K$ is an integral domain s.t. $F \leq K \leq E$. Show that $K$ is a field.  I've been struggling with this one for awhile now! Anyone got any insights? Thanks!

Let $F/K$ be an algebraic field extension. Suppose $D$ is an integral domain with $K\subset D\subset F$. Show that $D$ is a field.   \\\\\My idea was wrong, so I have to delete them. \\\\\\  Thanks!


Is there a good/best SE site to ask a question about the definition a word, in this example: web-api?  What I want to know is, is this a good definition of a api (as commonly used in contemporary discussions about api's):      "A program running on a server that has an api if it can respond with data -- in a known standardized format such as json or xml (not just a html-web-page) -- to a request written in the form of a URL."   Where would I ask this question to get feedback on this?

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


I have this local site where the second page has to only be accessible through a specific button, and not by direct access by writing the URL.  I have this simple example:  Page 1:   <title>page 1</title>  <button type="button">to page 2</button>     Page 2:   <title>page 2</title>
PAGE 2
     Thanks.

What is the most reliable and secure way to determine what page either sent, or called (via AJAX),  the current page.  I don't want to use the $_SERVER['HTTP_REFERER'], because of the (lack of) reliability, and I need the page being called to only come from requests originating on my site. Edit: I am looking to verify that a script that preforms a series of actions is being called from a page on my website.


I'm buying this solenoid:    The data are:    Voltage: 12V DC Current: 8A   I need to build a kicker: push a button, capacitor charge, when is charged the solenoid kick an object.  I want to do it with Arduino, and I have a 2-channel relay module 12V with optical coupler protection.  When I push a button with the first relay channel I charge the capacitor using a  DC-DC boost converter 8~32V to 45~390V booster module 40W, and when the capacitor is fully charged, I will power the solenoid with the second relay channel.  I tried to read something, but I don't understand if a 4700μF 63VDC capacitor is ok for my circuit.    Links: ,   This is basically my circuit: I want to use a cheaper capacitor and I want to use a typical DC power source instead of the battery.

I'm trying to drive a 12v (14W) solenoid and have problems figuring out the components for the driving circuit.  The solenoid draws about 1.166A and the MCU is being operated at 3.3V.  I've seen many driving circuits and they all look something like this:         – Schematic created using   My questions:   What datasheet parameters should I look for when designing this circuit? Is the IRF530PBF-ND a suitable MOSFET for driving this solenoid?    Also, how do I calculate R1's value?  I don't want to blindingly copy a circuit that may or may not work, I want to understand it.  Thank you so much in advance!


Prove that if $a \mid bc$ and $\gcd(a,b) = d$ then $a/d$ divides $c$.  Attempt at solution \begin{align} &a \mid bc \implies \exists \ x \in \mathbb{Z} \ \text{s.t} \quad  bc = ax \tag{1}\\ &\gcd(a,b) = d \implies a \mid b \implies \exists \ t \in \mathbb{Z} \ \text{s.t} \quad b = at\tag{2} \\ &\gcd(a,b) = d \implies a \mid d \implies \exists \ s \in \mathbb{Z} \ \text{s.t} \quad d = as\tag{3}  \end{align} From $(2)$ , we get $a = b/t$. Substituting in $(3)$, we have $d = as = bs/t  \implies b = dt/s$. Substituting this last result in $(1)$ ; $$ bc = ax \implies \frac{dt}{s} c = ax.$$ Since $t,s$ and $x$ are all arbitrary constants in $\mathbb{Z}$, define $sx/t := x^{\prime} \in \mathbb{Z}$. Finally, $$ dc = ax^{\prime}\implies c= \frac{a}{d}x' \implies \frac{a}{d} \mid c  \qquad \square.$$ Can anyone confirm my proof ? I feel like there are some justifications missing. Particularly in the substitions part could there not be divisions by $0$?

I tried to start by showing that $ \frac{a}{\gcd(a,b)} $ is always an integer, let's call it $d$, because $a$ is always a multiple of $(a,b)$ based on the definition of a g.c.d. I then tried to show that if $a | b$ then $a|bc$ from the theorem that states that $a|b$ implies that $a|bc$ for any integer $c$, but I cant seem to prove that $a | b$ or that $a|bc$ only if $d \mid c$ (where $d = \frac{a}{\gcd(a,b)}$ ). Any help would be much appreciated.


class A:      def self_method(self):          pass       @staticmethod      def static_method():          pass   a1, a2 = A(), A()  print(a1.self_method == a2.self_method,       id(a1.self_method) == id(a2.self_method),       a1.self_method is a2.self_method)  print(a1.static_method == a2.static_method,       id(a1.static_method) == id(a2.static_method),       a1.static_method is a2.static_method)      Output:  (False, True, False) (True, True, True)    Why is id(a1.self_method) == id(a2.self_method) True, but a1.self_method is a2.self_method is False? What does it mean? Does python recreate this method/s for every object or not?

My  has failed me.  In Python, are the following two tests for equality equivalent?  n = 5 # Test one. if n == 5:     print 'Yay!'  # Test two. if n is 5:     print 'Yay!'   Does this hold true for objects where you would be comparing instances (a list say)?  Okay, so this kind of answers my question:  L = [] L.append(1) if L == [1]:     print 'Yay!' # Holds true, but...  if L is [1]:     print 'Yay!' # Doesn't.   So == tests value where is tests to see if they are the same object?


I am seeing the red dot indicator for SO's review queues even though I've been temporarily banned from them. Can we remove the indicator?

This is not a duplicate of , because this reports different things from that question. That question is specifically about the case where the user has run out of daily reviews; this question reports different problems outlined in the below bullets. While this post also formerly covered that, that has since been edited out. The review queues indicator shows all reviews in a queue a user has access to, no matter if that user is able to review them.  As a result, there are various circumstances where the review indicator gives false information:  There are items in a queue which the user does not have the reputation to review. (I only know of this happening in the suggested edits queue, where tag wiki edits land in the same queue as post edits.) This once . The only pending edits in the suggested edits review queue are the user's own tag wiki edits. (Users with 5,000 reputation but less than 20,000 can review tag wiki edits, but can't bindingly edit them.) There is a single pending suggested edit, which is currently being reviewed by someone else and has been "checked out" to that reviewer. The reviewer has already voted on a post in the queue (e.g. flagging a current Low Quality post as NAA or VLQ externally, or externally voting to close or reopen a post currently in one of those queues) The reviewer has skipped reviews The user has reviewed all items in a queue, but they have not left it yet  There have been numerous calls to fix all different aspects of this, as you can see by the links above. However, at heart it is all one problem: the indicator appears for queues when a user can’t review the items in the queue. I suggest solving this problem once and for all, by making sure that users are not notified for reviews they can do nothing about. So here’s my plea: please don’t show us the indicator for reviews we cannot perform!


I would like to know what is the main differences between a , a  (PDU) and a .  Thank you.

I just chatted with an APC rep about upgrading the UPSes at our office. She recommended a single higher-capacity 6-outlet Smart-UPS to replace the four Back-UPS units we currently have. When I asked how she recommended plugging in all the current devices, she recommended using a APC's  PDU, but said not to use a power strip. At first she said I had to use an APC brand PDU, but after I inquired about using a Tripp-Lite PDU, she said any brand PDU would be fine.  The APC PDU previously referenced looks like a standard 120V power strip with overload protection but no surge protection. Other than overload protection (which seems redundant if plugging into the UPS), is there something else I'm missing, or should any power strip (without surge protection) be fine?  Edit: I didn't mention it earlier, but we don't have a proper rack--though I did still plan to mount the PDU or power strip to something. I guess I'm wondering if there's any special reason I should pay as much as $180 for the low-end APC PDU (which just looks like a power strip to me) vs. $20-$30 for a .


I am trying to create adjacency list for graph by creating array of arraylist of type edge(include source,dest,weight) as in code below  : public class Main {      static class Edge{          int s;     int d;     int wt;          Edge(int src,int des,int weight)     {         this.s = src;         this.d = des;         this.wt = weight;              } }          public static void main(String[] args) throws Exception     {         //creating array of arraylist of type edge          ArrayList<Edge>[] graph = new ArrayList[7];                  //Doubt regarding this line ,as why is it essential?         graph[0] = new ArrayList<Edge>();                  //creating edge object          Edge e = new Edge(0,1,10);        //adding it into arraylist         graph[0].add(e);                                }  Since I have created array of arraylist of type edge , I think I can directly add into arraylist like graph[0].add(e) without writing graph[0] = new ArrayList(); but it isn't working without it. Why I need to give above statement when my array is of arraylist so can't I add the elements directly?

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


As the title says there's no way for me to get libvirt-bin via apt on Ubuntu 20.04. If you check out this link you can see that its on previous versions.  Is there a way I can install packages from older versions of Ubuntu, or some other workaround for this? Thanks.

I'm trying to install KVM\qemu on Ubuntu 18.10.  According to  I'm running the command:  apt-get install qemu-kvm libvirt-bin ubuntu-vm-builder bridge-utils   and get an error about the packge "libvirt-bin" and "ubuntu-vm-builder":  E: Package 'libvirt-bin' has no installation candidate E: Unable to locate package ubuntu-vm-builder   I see that the package "libvirt-bin" is .  The main repository is set. Anything that I'm doing wrong? Couldn't find any info regrading this issue.  Is it the new Ubuntu version (18.10)?  Thanks


Let's say you have two tasks $T1$ and $T2$. Each task has $2$ sub-tasks. Task $T1$ has $2$ sub-tasks, $T1_1$ and $T1_2$. $T2$: has $T2_1$, $T2_2$.  How may ways to execute these tasks if sub tasks have to be executed in their order within a task, e.g. $T2_2$ cannot be executed before $T2_1$?  Note, even the sub tasks within the task have to be in order, there are no order between the tasks. E.g. $T1_1$ could be executed and $T2_1$, $T1_2$, $T2_2$.  Imagine you have a cpu with $2$ cores which can execute simultaneously two functions, but within the function statements go in order.

Restriction 1: A precedes B  Restriction 2: C precedes D  Note: They can be either adjacent or not.  For example,  ABCD  ACBD  ACDB  CABD  CDAB  but  CBAD   ABDC   are not allowed and so on, as long as A comes before B and C comes before D.  Is there a generalized way to solve such problems?  Another similar problem to the above is finding the number of arrangements of  ABCDE if   Restriction 1: A precedes B, B precedes C  Restriction 2: D precedes E  e.g.   ABCDE  ADBCE  DEABC


I'm sorry if this has been asked and addressed already.   What are the HW pre requisites for Ubuntu 13.04/13.10?  I'm a big fan of Ubuntu and wish to install it on my 9 year old PC. Wondering if it will work.

I'm thinking about installing Ubuntu Desktop, but I don't know what flavor is the best for my system. What are the minimum and recommended hardware requirements? What kind of CPU? How much memory? Should I have Hardware Acceleration? What flavor should I use?  This is an attempt of a canonical answer. My answers have the "official  requirements", the recommended are a mix of official sources and opinion based (along with the answer it's told the source). You can comment or edit if you feel that the information is obsolete or incomplete. It is a good rule of thumb that any system capable of running Windows Vista, 7, 8, x86 (Intel) OS X will almost always be a lot faster with any Ubuntu flavor even if they are lower-spec than described below.


I'm using the Stack Exchange app for Android. The app displays TeX formulas inside questions and answers as expected, but not in comments. Here it shows only the raw TeX code. I first noticed this issue .

MathJax isn't currently working on the Android app, which makes it totally useless for the 'technical' sites like  or .  For example, in the Android app:    Same post in a (mobile) browser:     Please add this functionality!


Say my friend and I are both level 20, with identical XP, and we simultaneously catch an identical 500CP Pokemon. If we then both evolve this Pokemon, will it always have the same post-evolution XP?  Additionally, what other factors would influence variation in post evolution CP?   Would a size/height disparity result in different post evolution HP? (I've seen some discussion on this but no definitive answer).  How about if my friend evolved immediately, but I waited until I was level 21?  Do all Pokemon of the same species increase in post-evolution CP at a similar rate? If so, how does this rate vary across different species?

I was just wondering if there is a set amount of CP gained by evolving a Pokémon or is it based on their level? Your level? Or random?  I just wanted to know if for example it made sense to evolve a Pidgey (CP 150) to a Pidgeotto then a Pidgeot.  To maximize my CP or should I just evolve my Pidgeotto  (CP162) to a Pidgeot.  Just looking for other insight on it.


Based on nowadays human understanding, what are the most fundamental hypotheses or principles in present physics which could deduce all other formula/theorem/details/applications?

It seems there are a lot of respected physicists appearing on pop-sci programs (discovery channel, science channel, etc.) these days spreading the gospel of   Three examples, quickly: 1) Many programs feature Michio Kaku saying that he is on a quest to find an equation, "perhaps just one inch long," which will "describe the whole universe."  2) Max Tegmark has come out with  in which he expresses the gut feeling that "nothing is off-limits" to science.  The subtitle of this book is My Quest for the Ultimate Nature of Reality.  3) In the series  there is talk about a search for the "God equation."  (A good counter-example would be Feynman, but his self-described "non-axiomatic" or "Babylonian" approach does not seem popular with physicists today.)  Is there any sense among physicists that it might be impossible to articulate the "ultimate nature of reality" in equations and formal logic?  It seems to me that physicists are following in the footsteps of the 19th century mathematicians (led by Hilbert) who were on a similar quest which was put to rest by Gödel's incompleteness theorems in 1931.  Is there any appreciation for how the Incompleteness Theorems might apply to physics?  Has any progress been made on  for the 20th century?  Shouldn't this be addressed before getting all worked up about a "God equation?"


I have data in a numpy array that includes coordinates and colors, from a RGB point cloud. I have managed to create a grid which fairly accurately captures the geometry of my data, but I am having trouble creating a matching texture to apply the colors to the object. Ideally I would like to create an empty image texture and then set the individual pixel values.  I've checked the API documentation and google and haven't found much.  I'm aware of the ply import extension for blender, but I don't have my point cloud data in that format.  If I have to do any UV mapping to make this work, I'm happy to do that manually for now.  So, how can I create a texture (with given dimensions) with python in blender, and set the pixel values?

I'm currently trying to extract textures from a binary file, and ideally I'd like to save each texture to a file or embed in the .blend file. However, before saving an image, I need to be able to create an image in memory from an array of pixel data.  The PIL library contains the kinds of functions I need to use, but it is not included with Blender. Is there anything similar to PIL in Blender? bpy.ops.image seems to be close to what I need, but lacks necessary pixel set/manipulation functions.


I want to update my FFmpeg package on Debian 9. the stretch version is FFmpeg (7:3.2.14-1~deb9u1) so I tried to add this line to /etc/apt/sources.list     deb  stretch main non-free deb-src    stretch main non-free   Then I run these commands     $ sudo apt-get update      $ sudo apt-get install deb-multimedia-keyring      $ sudo apt-get update      $ sudo apt-get install ffmpeg      $ ffmpeg -version   But I got FFmpeg 3.3.9  Can someone help me to upgrade to FFmpeg 4? I feel that I am not very far from the answer.


Following , when I have my viewport render open beside my wireframe viewport it is displayed in a very dark colour/lighting. I have added 2 lights to the scene (10 and 30 W). Anybody have any idea how I can get the render from this:  to this according to the tutorial  My Blender file is here

I'm a beginner to Blender and as my first Non-tutorial model, i tried making a Wine Bottle & a Wine Glass. Well, the modelling went fine but the lighting part is still troubling me. Can someone please help me with the lighting . Here is the reference photo of how I want it to look like(except the cap opener) :  And here is my best renders up till now :     I'm also attaching the .blend file :   Thanks in Advance.


I would like to install Ubuntu 14 on my new HP Probook 450 G2 with windows 7. At the step "Installation Type", I don't have the choice "Install Ubuntu alongside Windows 7". I looked at the choice "something else" but I don't understand well what to do.  When I try Ubuntu on my USB live it works well. And the hard drive is divided like this: sda1 : system sda2 : HP recovery sda3 : HP tools.  Do you know why I don't have the choice "Install Ubuntu alongside Windows 7" and how to do a not too comlicated installation? Moreover do you know any problem with this model of computer or this brand?  Thanks  Marcel

Whenever I startup from the LinuxLive USB, and try to install Ubuntu 12.04, it only gives me two options instead of the usual 3 or 4. My options are "Replace Windows 7 with Ubuntu" and "Something Else". Whenever I go into "Something else", it looks extremely confusing. How do I install it side-by-side while using the "Something else" section? These are my partitions.   /dev/sda /dev/sda1 ntfs (104Mb, System Required Partition) /dev/sda2 ntfs (1000097Mb, Windows 7 Partition)   Or should I try reinstalling my installer on a CD rather than USB and maybe then it will have the "Install alongside" function?


Suppose a matrix $A = $\begin{pmatrix} 1 & 0 & 0\\ 0 & 1 & 0\\ 0 & 0 & 1\\ 0 & 0 & 0 \end{pmatrix}  How can we argue that the vectors are independent if we can't take the determinant?

We can easily find out if the vectors are dependent or not by finding determinant of matrices formed from the vectors. But if the matrix is not a square matrix, we cannot find the determinant. Then how do we know if the vectors are linearly independent?


I was using javascript to do some "ratio conversion" on up to two decimal digits numbers (I mean operations like 0.nn => nn% e.g. from 0.21 to 21%) , when I noticed that if I do an operation like 0.56 * 100 I don't get 56 as I'd expect but get an unexpected decimal part togheter (something like 56.000...0001). I noticed this happens with any ((7*2^x)/100) * y values (having y != 2^n number). I experienced this in different platform (desktop and mobile) and different browsers (Firefox, Chrome, IE, Safari) Can someone explain me why does this happen?

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


I have tried to create new table named 'SysObjects' on dbo schema here is an example:  CREATE TABLE sysobjects (Column1 INT ); SELECT * FROM sysobjects WHERE 1 = 0; SELECT * FROM dbo.sysobjects WHERE 1 = 0;   Output is of sys.sysobjects view :  name        id          xtype uid    info   status      base_schema_ver replinfo    parent_obj  crdate                  ftcatid schema_ver  stats_schema_ver type userstat sysstat indexdel refdate                 version     deltrig     instrig     updtrig     seltrig     category    cache ----------- ----------- ----- ------ ------ ----------- --------------- ----------- ----------- ----------------------- ------- ----------- ---------------- ---- -------- ------- -------- ----------------------- ----------- ----------- ----------- ----------- ----------- ----------- ------  (0 rows affected)  name        id          xtype uid    info   status      base_schema_ver replinfo    parent_obj  crdate                  ftcatid schema_ver  stats_schema_ver type userstat sysstat indexdel refdate                 version     deltrig     instrig     updtrig     seltrig     category    cache ----------- ----------- ----- ------ ------ ----------- --------------- ----------- ----------- ----------------------- ------- ----------- ---------------- ---- -------- ------- -------- ----------------------- ----------- ----------- ----------- ----------- ----------- ----------- ------  (0 rows affected)   another example :   SELECT OBJECT_ID('sysobjects'), OBJECT_ID('dbo.sysobjects'), OBJECT_ID('sys.sysobjects')   Output:  ----------- ----------- ----------- -105        -105        -105    and this behaviour is right to all these objects  can anyone explain me how it work ?

I'm experiencing an annoying problem with a table named SysMessages in one of our databases. When I run a select statement I don't get the contents of this table, but of the sys.sysmessages view in the master database. A use [DBNAME] doesn't help, nor select * from [DBNAME].dbo.SysMessages.  I'm in the middle of a migration to a newer SQL Server version. In SQL Server 2008 R2 I didn't encounter this problem with this database, but in SQL Server 2016 I'm not able to query my own SysMessages table.  Any help would be greatly appreciated.


i just want to create a simple application that will allow a user to input a url to a rss feed and display the contents to a user.  what would be a good java library to enable me to read rss feeds?  cheers

I'm using Java, and need to generate a simple, standards-compliant RSS feed. How can I go about this?


We have added custom quote status picklist values and translated them. I can see the german equivalent of these in Translation Workbench > Translate. How can I refer them in the .cmp file? If it is a label, I am referencing as - {!$Label.c.LBL_XXXXX}, how do I reference a picklist value as I don't see them under custom labels? Right now, I reference for a quote as -  {!v.quote.Status}, but obviously will only get the english equivalent. Please advise.

Is it possible to automate the process of picklist values retrieval from the backend?  Here is how I am doing it right now:  @AuraEnabled public static List<String> retrieveMyObjectMyFieldOptions() {     List<String> res = new List<String>();      Schema.DescribeFieldResult fieldResult             = MyObject__c.MyField__c.getDescribe();     List<Schema.PicklistEntry> ple = fieldResult.getPicklistValues();     for(Schema.PicklistEntry f: ple) {         res.add(f.getLabel());         res.add(f.getValue());     }      return res; }   Is it possible to pass two strings to a method and get the same list as above? In other words is it possible to change the signature to the following:   public static retrieveMyObjectMyFieldOptions(String MyObject, String MyField)?


I heard it is possible to get Pikachu as a starting pokemon in Pokemon Go. How do you do this?

I've heard you can start with pikachu in pokemon go instead of the 3 standard starters. How would one do this? Is this even possible?


I have a simple command which takes one argument. Now I want to pass a small listing-environment to the command.  Here is the code:  \documentclass{article} \usepackage{listings} \begin{document}    \newcommand{\test}[1]{ #1 }    \test   {%   \begin{lstlisting}     asdf   \end{lstlisting}   }%  \end{document}   While compiling I get this error:  Package Listings Warning: Text dropped after begin of listing on input line 12.  (/usr/share/texmf-texlive/tex/latex/base/omscmr.fd)) *   Any suggestions would be great appreciated.

I'm trying to this:  \newcommand{\code}[1] {\begin{lstlisting} {#1} \end{lstlisting} }   But I keep getting this error:  Package Listings Warning: Text dropped after begin of listing   I'm calling \usepackage and all so, do any of you knows how to solve this?


Trying to figure how to setup drupal 8 to function like StackExchange.   My goal is to be able to allow users to mark answers helpful so that best answers get moved to the top. Similar to StackExchange.   I can think of two ways to do this but would like some feedback from the experts.   Option 1: Create content Question and add comments to it. Use flag module to flag helpful replies. Create a template for question comments so that each top replies + its replies are groped together.   Option 2: Create Question, Create comment type Answer, Create a new comment type called replies and attach it to comment type Answer.   Or is there another alternative that I am not thinking off?   What would be the best way to create a similar setup such as StackExchange?

Earning badges on StackExchange is, well, fun. But aside from that it promotes quality interaction from users and helps weed out spam (I have never seen a spam post on the site).  I have a community website with about 500 active users, but the spammers are starting to become more prolific.  I would like a way to make the site more engaging while promoting the same quality of interactivity.  How would you recommend to put in a good reputation system, as well as a goal achievement system?


I have run into quite a few occasions when I confused " classic" and " classical".

What's the difference between classical and classic? Should we say classic content in textbooks or classical content in textbooks?


The following passage is from :  Shee is young, wise, faire, In these, to Nature shee's immediate heire: And these breed honour:  According to the research I did  heir is countable. If so, why there is no article before heire? Likewise,  The French finance minister is heir to a tradition of central control that goes back to Louis XIV.

I'm used to always hearing or seeing a  before certain nouns.  Yet on certain occasions the article is totally omitted, and it bothers me.  I'm wondering what the justification for omitting the article is, especially when the definite article would seem to be required, or if it is just bad English either on the part of the individual in question or more likely by tradition.  The most frequent place I hear this is at the doctor or dentist's office. In every one I have ever visited, the receptionist or assistant always says things like "Doctor will see you shortly" instead of "The doctor will see you shortly."  The wikipedia article linked above says this: "A definite article indicates that its noun is a particular one (or ones) identifiable to the listener".  In the case of a clinical setting, I know who the doctor is, especially if this is not my first visit.  The people in the office know the doctor even better than I, so it would seem to be inappropriate to omit the article. Even the indefinite article would be incorrect. It further says, under "Zero article":  "In languages having a definite article, the lack of an article specifically indicates that the noun is indefinite."  Since the noun is not indefinite, why are they omitting the article?  Another place I see the article omitted is with the word "bar".  Bartenders apparently don't say "I tend the bar" they say "I tend bar".  Unless a bartender works in multiple bars, it would seem like an article would be required.  Furthermore, "the bar" can mean any bar a person goes to, so even in a case like , it seems like the word "the" should be in the sentence.  The only thing I can think of in this case is maybe the speaker doesn't want to confuse the listener into thinking they work in the legal field.  Is this just a bad habit, a historical corruption or tradition, or is there really a valid reason (or perhaps more than one) for these omissions?


prove that the set of nonzero numbers is a group under the operation $*$ defined by $a*b = \{ab \text{ if } a > 0 \text{ or } \frac{a}{b} \text{ if } a < 0\}$. Show that it proves closure, identity, inverses and associative properties of a group.

Prove that the set of nonzero real numbers is a group under the operation $*$ defined by   \begin{align} a*b = \begin{cases} ab &\mbox{if } a > 0 \\ \frac{a}{b} &\mbox{if } a < 0 \end{cases} \end{align}   I have trouble proving the associativity propery of a group here. Here is my work so far:  If $a > 0, b > 0$, then $(a*b)*c = (ab)*c = (ab)c$ and $a*(b*c) = a*(bc) = a(bc)$.   If $a > 0, b < 0$, then $(a*b)*c = (a/b)*c = (a/b)/c = a/(bc)$ and $a*(b*c) = a*(b/c) = a/(b/c) = ac/b$.  If $a < 0, b > 0$, then $(a*b)*c = (a/b)*c = (a/b)c = ac/b$ and $a*(b*c) = a*(bc) = a/(bc)$.  If $a < 0, b < 0$, then $(a*b)*c = (a/b)*c = (a/b)/c = a/(bc)$ and $a*(b*c) =a*(b/c) = a/(b/c) = ac/b$.  I had been unable to prove that $(a*b)*c = a*(b*c)$ for all cases but the first one. I cannot understand why...


For $a,b,c>0;abc=1.$ Prove that $$\sqrt{a^2-a+1}+\sqrt{b^2-b+1}+\sqrt{c^2-c+1}\ge a+b+c$$ I will post my solution in the answer. Now I'm looking forward to another solution.

Let $a,b,c$ are positive number such that $abc=1$. Prove that:   $$\sqrt{a^2-a+1}+\sqrt{b^2-b+1}+\sqrt{c^2-c+1}\;\geq\; a+b+c$$   This problem froms my Math teacher. I have attempted to let $$(a,b,c)=(\frac{x}{y}, \frac{y}{z}, \frac{z}{x})$$. The inequality is equivalent to: $\frac{\sqrt{x^2-xy+y^2}}{y}+\frac{\sqrt{y^2-yz+z^2}}{z}+\frac{\sqrt{x^2-xz+z^2}}{x}\geq \frac{x}{y}+\frac{y}{z}+\frac{z}{x}$  Then, I tried to use AM-GM but I stucked on it.


analog signal can b easily made by using PWM in micrcontroller but it is not a real analog signal. please tell me how can i convert PWM into real analog signal

I 'm looking for the best RC time constant and its reason in a PWM to convert digital signal to analog based on duty-cycle and frequency and other parameters. PWM frequency is 10 kHz.


So like, if have a meat that has a particular "use by" date, and I cook it - I will kill a lot of the bacteria. Then if I refrigerate reasonably fast, will it last longer than it would've if I just left it alone? Are the two times I passed it through the Danger Zone negligible in comparison to how much bacteria I've killed?

I pulled a chicken out of the freezer a couple of days ago with the intention of making stock/soup. It's defrosted now and ready to go, but I don't have the mirepoix ingredients and I'm too lazy to go to the store for just that. Since it's just now defrosted, I've got a few days, right?  What if I'm still too lazy to go to the store three days from now, so I roast the chicken close to its maximum expected "still fresh" time and then refrigerate the cooked chicken? Would that effectively "restart the clock"? Lets say I hold on to the cooked chicken for three days before finally getting around to making the stock. Would it be right to expect that stock to have the same shelf life as it would have had if I had made the stock with the freshly defrosted chicken?   For the sake of this question, assume that the chicken was frozen immediately upon purchase, defrosted in the refrigerator, roasted to an internal temperature of at least 165F, rested, then promptly refrigerated.  I could ask the same of a beef stew. Can I cook the meat to give me more time before I put together the stew?  In both of these cases I'd expect a certain quality loss, so I am more concerned about safety than optimum flavor or texture.


How to prove that this series converges: $\sum_{n = 1}^{\infty}{({\frac{n}{n+1}})^{n^2}}$ ?  I tried root test, ratio test, comparison test, Cauchy condensation test, but none works. Any hints?

Determine whether the series $\sum_{n=1}^{\infty}(\frac{n}{n+1})^{n^2}$ is convergent or divergent.  I've tried applying all the basic tests to no avail. I need to find out what the "trick" for this particular series is.


I am trying to close all of the open files in the shared folders of a server via PowerShell script. I found the following script which only close files on one drive (F:), however, this server has 3 drives (F:\, G:\, H:) which I want to close all.   net files |      where   { $_.Contains( "F:\" ) } |     foreach { $_.Split( ' ' )[0] }   |     foreach { net file $_ /close }   Is there a way to add missing drives into this script or I have to use the same script separately for each drive?  I tried { $_.Contains( "F:\", "G:\", "H:\"  ) } but didn't work  Thank you for your help!

I work with a lot of folder shares, but there are a bunch of locked files which have been opened by some other process.  I need to close those files. So far I've been using MMC - System Tools - Shared Folders - Open Files.  It would be far more convenient if I could use PowerShell to filter the list/table retrieved by OpenFiles.exe and once I get the file ID close it with net file  /close, or some other PS native means to similar effect.  I am new to PowerShell, so I wonder if there is a way to create a PS script that receives the file's path and then used the file ID to close that file?


i have Samsung galaxy gt-s7562 phone. i was wanting to reduce my phone memory. my photos and videos have all been cleared. i would like to know to recover them from my phone.

Background:    I put in a friend's SD Card to format it because it was having problems. Then I put mine back in and I think my phone formatted my SD Card. I had a ton of pictures on there that are now gone! I put the card into the computer and there's only 2mb of cache files on there and none of the original directories.   I already tried the following freeware recovery applications:         Neither of them were able to retrieve any files. Undelete took 1minute to scan for files and came up with 0 files.  Recuva took 10 minutes for their "deep scan" which doesn't seem thorough enough at all for this 8GB SD Card. I need something that's a lot more heavy duty.  I don't mind paying for an application to get the data back if necessary...   Questions:     Which application can I use to recover my deleted picture files from my 8GB HD Micro SD Card?   Why did Anroid format my SD card?   How can I tell if it's a phone problem, data problem, or SD Card problem?


I don't know if this will effect anything, but there are strange boxes on the object I am trying to sculpt. I don't know what they are, but is there a way to disable them?

I tried to follow the new Blender 2.8 tutorial from Blender Guru.   When entering "Sculpting" with the icing there were suddenly alot of holes in it. Why is this?


I'm making exercises to prepare for my ring theory exam:     How many elements does the ring $ℤ[X]/(X^2-3,2X-4)$ have? Describe the   structure of the this ring.   I find it always difficult if the ideal is generated by two elements.   I thought about someting like this. $X=2$ and $X^2=3$. Therefore $4=3$ therefore $1=0$. As $2=1$ then $X=0$. And then everyting seems to become $0$.   I'm not sure if I'm allowed to see it this way, but this is the first thing that comes to my mind.

This problem is from a practice exam I was working on.     What is the cardinality of the quotient $\mathbb{Z}[x]/(x^2-3,2x+4)$ ?   Thoughts. If I find a ring that is easier to handle then this then I can go from there. So I think this is isomorphic to $\mathbb{Z}_2[x]/(x^2-3,x+2)$. And then I am stuck.  Am I correct so far? What should I be looking to do from here?  Thanks for your time and your answers.


I need to combine two images in C# ( 4.7.2 ), and have the top image transformed putting each of the four corners at specific coordinates in the image. Is that possible? Preferably with a solution that doesn't require spending a ton of money. As far as I can tell i can't do it with the Bitmap/Graphics classes.

Are there any classes, methods in the .NET library, or any algorithms in general, to perform non- transformations? (i.e. transformations that involve more than just rotation, scale, translation and shear)  e.g.:      (source: )      Is there another term for s?


Version 2.92. Created a UV sphere and lopped off half, so a hemisphere remains. At present there are by default two panes in the UV Editing tab screen--UV Editor and 3D Viewport, side by side. After Edit Mode!UV!Unwrap in the right pane (in the 3D Viewport), the UV Editor (left pane) changes from a square grid and a cursor in the lower left, into a round grid that can accept a round map--where I've thus done so:  Meanwhile the 3D Viewport (right pane) contains the dome perspective, but it's still gray. I want to map the .png in the left pane onto this dome in the right pane.  But how? UPDATE: Here is something in the "Base Color" field for Material Properties:

I am creating a model of a glass and I would like to put a drawing on it (a png picture).  I know how to do it using Blender Render, but not with Cycles Render. Help :)


I have the following code  $username=htmlspecialchars($_POST['username'],ENT_QUOTES); $sql="SELECT * FROM user_account WHERE account_name='".$username."'";   Is this vulnerable to sql injection. If so, how could someone manage to bypass this?

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


Have problem to install wine 1.6 or 1.7 doesn`t matter.  The following packages have unmet dependencies:  wine1.6 : Depends: wine1.6-i386 (= 1:1.6.1-0ubuntu1~ppa1) E: Unable to correct problems, you have held broken packages.  The following packages have unmet dependencies: wine1.7 : Depends: wine1.7-i386 (= 1:1.7.11-0ubuntu1~saucy1) E: Unable to correct problems, you have held broken packages.   Before I reinstalled Ubuntu all was OK. I have tried a lot advises but nothing helps.

Occasionally, when I'm installing stuff, I get an error like the following:  Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:  The following packages have unmet dependencies:  package1 : Depends: package2 (>= 1.8) but 1.7.5-1ubuntu1 is to be installed E: Unable to correct problems, you have held broken packages.   How can I resolve this?


I'm a beginner in learning photography(as a hobby). Since I'm not ready to buy a camera at the moment, what specs/features should I ensure to be present on my phone camera to help me pursue photography as a hobby?

At the current rate by which technology is improving, I believe that mobile photography is not far behind their DSLR counterparts, generally speaking. However, for amateurs like me, it is quite impossible to judge or even know properly how to buy a decent smartphone within $500 (US). And almost every phone these days have OIS, Laser Focus, PDAF, etc. as the bare minimum features. However, different media channels rate the phones (-- speaking from the point of view of photography only) differently. And often, it is hard to detect which source is credible enough if there is a huge gap between the citations therein, given the aforementioned budget limit.   A setback, in this case, is also because of the DxOMark scores for phones, and it is obvious that the phones with extremely good scores are not economically feasible for people with the aforementioned limit. So, my question is how can a person who is new to photography, is really enthusiastic about it, and wants to use his/her smartphone for that learn or research from credible sources given the rate at which technology is changing in our society so that the relevancy of this question remains valid even in near future.    EDIT:   Many people here may have a misunderstanding that I do not know about the basic differences between DSLRs and smartphone cameras. I did know the basic differences. Anyway, this is not their fault, but because of the limited information I put forth in my question as well as the way how I put it. I somewhat do know more now thanks to the inputs I have received thus far as well as  these , and their . To be short, I am saving money for an extended trip after few months and also need a new phone. So, if the details don't matter much now, there's that.


A I haven't received the book I ordered.      B I haven't received the book I have ordered.   Which one would you say is more often used / colloquial, and which one is more formal / more grammatically conservative?

Non-native speakers often get confused about what the various tenses  and aspects mean in English. With input from some of the folk here I've put together a diagram that I hope will provide some clarity on the matter.  I offer it as the first answer to this question. Consider it a living document. Input is welcome, and good suggestions will be  incorporated into the diagram.    Nota bene: What this is not is a discussion of whether there are  more than two tenses in English. , to which this question is not intended to supply arguments one way or the other.  Here, the aim is to provide an overview of what constructions English-speaking people use for conveying information about actions referring to past, present, and future, and to provide it first and foremost to precisely the people who are likely to use "tense" as a catch-all term in their search, rather than to linguists who know better.  Breaking News There is now an excellent ELU blog article titled  . It is highly recommended reading.


I have a database created with sqlite3 (Python). The database has an extension of .db How do I upload/ import this database to PhpMyAdmin? The problem I'm facing is that PhpMyAdmin is allowing .sql.zip only. Is there a way to upload .db file into MyAdmibn?

Anyone know a quick easy way to migrate a SQLite3 database to MySQL?


I know this is a common theme, but all of the other similar threads I've found were either based on a clear change (e.g., upgrading), or were unsolved. I'm a relative newcomer to linux, but have a nice xubuntu setup that's been working delightfully for a few months until just recently.  After selecting ubuntu from grub (I dual boot Windows 7) I get the regular blue loading screen, then black. I can get to a terminal with Ctrl+Alt+F#, so I have hope, but not much idea of what to do.  Booting into recovery mode works, sort of. I get a low resolution GUI and can open a terminal, but any graphical applications I try to launch (like mousepad or the settings manager) open in a window too small to do or see anything, which I cannot resize, so it's not particularly useful.  The only possible cause I can think of for this issue is that right before the problem began I plugged my computer into a projector and messed around with the display settings and resolution to make that work. So, if anyone knows how to reset default display settings from terminal that might be a helpful start.  Computer is a two year old Thinkpad t420, native resolution 1600x900, if that's any help.  Thanks!

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


I have received a train ticket stipulating From U1256 LONDN to BESCOT STADIUM. Can you confirm this covers my underground travel from Heathrow through to London Euston and then my onward travel through to Bescot, Walsall?

I have an off-peak return ticket which is marked:  From: BRIGHTON To: U1256 LONDN   The ticket does not say "travelcard" anywhere.  Just what does that entitle me to in terms of LU travel? I'm scheduled to arrive into London Bridge – am I then able to travel to any station within the zones listed making any necessary line changes along the way? I can't recall if you have to go through barriers in order to change line, thus making it count as an 'exit'.


I follow two specific tags: [*worklight*], [*mobilefirst*] (everything under worklight-* and everything under mobilefile-*.  These tags are not too high volume; something like 10 questions a day. It would be great, for me, if the app would get a notification whenever a new question is submitted. It could function as an option you can enable in your account either in the website or the app...

Currently I can choose to receive email updates about new questions that match filter criteria.  Add an option to show these updates as notifications in the iOS app.  UPDATE:    This is not a direct duplicate of . Filters allow to create complex rules that are sets of tag-site pairs like  on Stack Overflow +  on Super User +  on Server Fault.  At the moment, it is possible to receive email notifications from filters; it seems logical to extend it with mobile notifications.


In our bio class our teacher told us that entropy was the amount of heat lost by a system. But I had learned before that entropy was like chaos / disorder in a closed system. Which definition Is right, or does entropy have different definitions in biology and physics?

As history of thermodynamics say, it was a mystery that what is the required condition for a given energy conversion to take place? Like there are two possible events each conserving energy but only one is chosen. So, in order to resolve this Clausius introduced a quantity called  which was given by $\int dq/T$. But can I know the reason for which Clausius chose this integral or quantity, why not any other quantity (changes in whom, positive or negative, would decide the occurrence of a given event)? I hope there lies an explanation to this which does not use statistical mechanics.


I experienced something strange on  two times:   2016-05-24: Got three downvotes in a row (in 2 minutes) for three different and completely unrelated questions I asked years ago. 2016-05-13: Got four upvotes in a row (in 1 minute) for four different and completely unrelated answers I asked years ago.   Could this be a due to some bug or hack or anything like that? It's really surprising to see the same behavior repeated for old questions/answers with no activity.  Or could it simply be someone who checked my account and went to see the questions/answered I posted and played with the up/down vote button...?

I just noticed that I lost a bunch of points from my reputation score, and I used the "reputation" tab on my user profile page to try and track down the cause.  During my investigation, I noticed there was an unusual event of type "reversal". In the normal place of a question title, it says "voting corrected".     What does this mean, and what caused it?  Did I do something wrong? Why did I lose all of that reputation? Is the system punishing me for leaving too many good answers?  Is there any way to earn it back?


I read this short story a year and a half ago and I can't for the life of me remember where I found it, the name of it nor who wrote it.  It starts off with some aliens, who can only speak from direct contact, from Mars visiting the planet one closer to the sun (Earth) to make some observations, take data, etc. and one of the aliens, who they call a 'poet' decides they wish to stay behind and the captain of the aliens reluctantly lets them go.  The poet then goes on to create a home, and eventually finds a human child who they look over and nurse back to health. Over time they eventually meet an older human who threatens them with a gun before agreeing to assist them. As the story progresses more and more humans congregate to make sort of a town and they start getting better and better until the alien starts to appear sick and dying, so they go into hibernation.  The story ends with the original martians coming back and finding the settlement, now larger, and talking about the poet.

I'm looking for the title of an anthology of children's science fiction stories from the 1950s. The best of the bunch involved a Martian who visited earth, and realized we'd blown ourselves up in a nuclear war and had fallen into savagery. The Martian is a vegetarian who subsists on biscuits made by a machine he brought with him, and communicates by using one of his tentacles to feed messages direction to/from the brain of the person he's talking to.  Inadvertently left behind by his expedition, he initially befriended some children, and eventually managed to rebuild civilization. Presently he dies, but when another expedition comes a generation later, they find the civilization he rebuilt.  there were other stories, but that was the best one.   If I can't find the name of the book it was in, I'd be happy to settle for the name of the author and the title of the story.


Suppose my very trusting friend has a bitcoin private key with a large balance (let's say $1B USD worth of Bitcoin) and wishes to keep a backup copy with me as a trustee. He doesn't want to transfer the raw key over an internet connection for obvious reasons, so he asks me to generate an RSA key and send him the public key so he can encrypt his bitcoin private key and then I can decrypt it on my end offline and store my backup of his bitcoin private key. Is there a realistic risk that someone could brute force the encrypted key that we transferred plaintext over the internet?

It's been over 30 years since Rivest, Shamir and Adleman first  described their algorithm for public-key cryptography; and the intelligence community is thought to have known about it for around 40 years—possibly longer.  It's fair to assume that, during those 40 years, certain three-letter organisations have employed their vast resources toward "breaking" RSA.  One brute-force approach may have been to enumerate every possible key-pair such that, upon encountering a message known to be  encrypted with a particular public-key, they need merely lookup the associated private-key in order to decrypt that message.  Signatures could be forged similarly.  How reasonable is this hypothesis?  How much computing resource would have been required over those 40 years to enumerate every possible {1024,2048,4096}-bit key-pair?  I think it best to avoid discussion and leave the question of whether the spooks could have harnessed such resource as an exercise to the reader.


Final Code I used for this. Thanks to @hakre.  Code(will real variable name):                       $sqlrequest = mysqli_query($conn,"SELECT COUNT(*) AS id FROM skillstable");         $skillstablecount = mysqli_fetch_array($sqlrequest);          $endfor = $skillstablecount['id'];          $sqlrequest = mysqli_query($conn,         "SELECT * FROM skillstable             LEFT OUTER JOIN char_" . $infochar['name'] . "_skills             ON skillstable.skillname = char_" . $infochar['name'] . "_skills.skillname             WHERE char_" . $infochar['name'] . "_skills.skillname IS null;");          for ($x=1; $x<=$endfor; $x++){         array_push($nonrankedskill,mysqli_fetch_array($sqlrequest));         }           ?>   extracting information from array like this:  $nonrankedskill[rownumber][columnnumber];     i'm trying to figure out how to do this but my search have been unsuccessful so far.  I'm using php and MySQLi to compare two table a get the output of the difference between two table based on two column.  rankedskill:  id    skillname    subskill    rank 0     walk         slow        2 1     walk         fast        4 2     run                      1 3     jump                     7   generalskill:  id    skillname    othercolumn1 0     walk         something 1     fight 2     jump 3     dive 4     fly 5     run                           Output wanted:  $nonrankedskill = array();   I want this variable to contain everything from the column "skillname" in tabel "generalskill" that is not contained in table "rankedskill". I should have at the end "fight", "dive" and "fly".  Could anyone refer me to some documentation on a way to achieve this? or explain me how to do it?

Also how do LEFT JOIN, RIGHT JOIN and FULL JOIN fit in?


I am trying switch to ubuntu and only want to use open source software. Should I tick "Install third party software" or should I install what I need manually?

When installing Ubuntu it always has this box which says Install this third-party software, but I am wondering exactly which third-party software and where it is installing it from.  I can see the description below, however I want to know exactly which software is being installed, which packages, and from where.     Ubuntu GNOME uses third-party software to play Flash, MP3 and other media, and to work with some graphics and wi-fi hardware. Some of this software is proprietary. The software is subject to license terms included with its documentation.


Im making lamps which are hand built, and each one is sold as a signed one out of a series of a predetermined number.  The lamps are made of plexiglas, they use an LED strip which is connected to a cable I make with a switch on it - that ends with a female connector like this one:  With the lamps I sell standard power supply that I buy in Europe (comes with a CE mark). The power supply has an output of 12 Volts.  I read lots of documents and still cannot figure out if I need a CE mark to sell in europe. the product is below 50V and it is art and does not fall in any of the categories of the CE mark.  Anybody had to deal with such a thing?  Thank you all in advance Eitan

I haven't been able to come across definitive information regarding the procedure to find out whether an electronics product (PCB) requires CE marking or not.  Since it is difficult to ask hypothetical questions, let me ask by using specific examples. Let's take  as a first example. Would this product require CE marking to be sold in Europe? (Maybe a similar question: would this product require any FCC approval/marking to be sold in the USA?)  Let's look at a . This is an A/D board. Would this product require any regulatory approvals/markings?  It would be a great help if someone with CE/FCC experience could give answers, explaining the reasoning behind those answers.


i am unable to install any app through deb file , terminal, software center. once i tried to install gnome boxes and some other app but it dosent install anything. i installed Ubuntu first it was able to install apps but now it is not able to install any app. i have many important apps to install please help me out.and even not allowing me to install browsers .

There are now errors when updating and I cannot install most software due to a corrupted  /etc/apt/sources.list   file. Is there a copy I can download to replace it?  The file would be for Ubuntu 12.04 (Final Beta) in the United States.


I'm looking at these three Lagrangian. They are the Lagrangians for spin 1 0 1/2 particles. I have been told that these equations were not 'derived' rather they were guessed and confirmed from experimental data. My question is, using hindsight, is it possible to derive all three of these equations from one equations. That is to say, we have one equation that gives us these three? The Klein-Gordon equation spin 0 $$L=c^2\partial _\lambda \phi \partial^\lambda \phi ^* -\left(\frac{mc}{\hbar}\right)^2\phi \phi^*$$ Dirac Lagrangian spin 1/2 $$L=i\hbar c \tilde\psi \gamma ^\mu \partial _\mu \psi-mc^2\tilde\psi  \psi $$ The Proca equation spin 1 $$L=-\frac{1}{16 \pi}F^{\mu \nu} F_{\mu \nu} +\frac{1}{8 \pi} \left(\frac{mc}{\hbar}\right)^2A^\mu A_\mu$$

Recently, I have been looking at the Lagrange equations that describe particles of different spin. I know lagrange takes the form $L=$kinetic-potential, and it seems these equations do take this form. But I dont see how they correspond to the kinetic or potential. How are these equations derived? The Klein-Gordon equation spin 0 $$L=c^2\partial _\lambda \phi \partial^\lambda \phi ^* -\left(\frac{mc}{\hbar}\right)^2\phi \phi^*$$ Dirac Lagrangian spin 1/2 $$L=i\hbar c \tilde\psi \gamma ^\mu \partial _\mu \psi-mc^2\tilde\psi  \psi $$ The Proca equation spin 1 $$L=-\frac{1}{16 \pi}F^{\mu \nu} F_{\mu \nu} +\frac{1}{8 \pi} \left(\frac{mc}{\hbar}\right)^2A^\mu A_\mu$$ I suppose I mean to say, is there one equation that you can get all three of these equations from?


I tried two ways of building a matrix in Python. After building, they seems to be the same. But if I do one same operation on them, they become different. I don't understand what is going on. Look at the following code.  m = [[0]*3]*3 n = [[0]*3 for i in range(3)]  print("m is:") print(m)  print("n is:") print(n)  print("m equals n? {}".format(m == n))  m[0][0] = 1 n[0][0] = 1  print('after operation')  print("m is:") print(m)  print("n is:") print(n)  print("m equals n? {}".format(m == n))   The output is:  m is:  [[0, 0, 0], [0, 0, 0], [0, 0, 0]]  n is:  [[0, 0, 0], [0, 0, 0], [0, 0, 0]]  m equals n? True  after operation  m is:  [[1, 0, 0], [1, 0, 0], [1, 0, 0]]  n is:  [[1, 0, 0], [0, 0, 0], [0, 0, 0]]  m equals n? False

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


There is a group of people that is very smart.  My question is: Does the word that always modify the closest noun phrase? If so, the word students is modified by that here, and the correct version would be:  There is a group of people that are very smart.  If I am right, another question: Is Trump wrong in terms of grammar?  He said: There is a group of people that is very sick

In the construction "one of the [plural noun] who ...", should the verb agree with "one" or "[plural noun]"?   For example, which of the two following sentences is grammatically correct? Or are both acceptable?        She was one of the several children who was sold at the auction    She was one of the several children who were sold at the auction.


So I have this code here. It gets images from imgur and sets a Picturebox.  Code:  private async void getImage(string imgUrl)         {             var  request = WebRequest.Create(imgUrl);             using (var testing = request.GetResponse())             {                 using (var str =  testing.GetResponseStream())                 {                     addTablePic.Image = Image.FromStream(str);                 }             }         }   Answer (Edited)  I have found one of the answer on this .  private async void getImage(string imgUrl)         {             try             {                 var request = WebRequest.Create(imgUrl);                 var response = (HttpWebResponse)await Task.Factory.FromAsync(request.BeginGetResponse, request.EndGetResponse, null);                  using (var testing = request.GetResponse())                 {                     using (var str = testing.GetResponseStream())                     {                         addTablePic.Image = Image.FromStream(str);                     }                 }             }catch(Exception ex)             {                 MessageBox.Show(ex.Message);             }         }   My question is how do I implement the async and await on WebRequest?

How can I use HttpWebRequest (.NET, C#) asynchronously?


A lot of people learning about computer programing for the first time write questions which they later become embarrassed about. In some cases the questions are legitimate, but the original poster (OP) will delete the question after a few months. I guess that the OP does not want to seem naïve, or something; I don't know. In some cases, when the question is deleted, a lot of well-written answers are deleted with along with the question. A few novice programmers next year will probably ask the same question. They might as well read the answer which have already been written. There is no need to delete the question out of embarrassment. I was wondering if a new attribute (or member-variable) could be added to question objects This would be known as a new "column" or "field" in SQL The new attribute could be a boolean, named something like is_anon When loading a stack overflow page, an can replace the user-name of the asker.  display_name = question.author.user_name if (q.is_anon) {     display_name = "Anonymous" }  I am hoping that when a user attempts to delete their own question, that the question will not really deleted. Instead, the is_anon attribute is set to True. If a moderator deletes the question, then the question should be truly deleted, not merely marked as anonymous. If a question's is_anon flag is set to true, then all hyperlinks targeting the OP's profile page will be replaced with the flavor text, and no link.

The Creative Commons FAQ      Third, if the licensor does not like how the material has been modified or used, CC licenses require that the licensee remove the attribution information upon request [...]  in 4.0, this also applies to the unmodified work.   How do I remove / dissociate my name from a post, in accordance with this clause?  Also, what are the effects of having my post dissociated from my account?  Finally, how will dissociation requests be handled for posts licensed under earlier versions of the license, which do not require dissociation upon request in all cases?


How am I suppose to handle this?  $\lim_{x\rightarrow \infty}\left(1+\frac{\pi}{x}\right)^{2x}$

Can someone show me a straightforward proof that  $\lim_{m\to\infty}(1+\frac{r}{m})^{mt}=e^{rt}$  Thanks!


I just need help on a command:   /summon Villager ~1 ~ ~ {Profession:0,CustomName:"Potion trader",CustomNameVisible:1,Career:1,CareerLevel:42,CanPickUpLoot:0,PersistenceRequired:1,Silent:1,Invulnerable:1,Attributes:[{Name:"generic.movementSpeed",Base:"0f"}],Offers:{Recipes:[{buy:{id:"emerald",Count:25},maxUses:9999999,sell:{id:373,Count:1,Damage:8194,tag:{CustomPotionEffects:[{Id:1, Amplifier:3, Duration:1800},{Id:17, Amplifier:3, Duration:1800}],display:{Name:"Speed Potion",Lore:[ "Une potion magique qui permet de gagner en rapidité mais donne faim à l'utilisateur.", "COMMUN"]}},MaxUses:9999999},rewardExp:false},{buy:{id:"emerald",Count:25},maxUses:9999999,sell:{id:373,Count:1,Damage:8201,tag:{CustomPotionEffects:[{Id:2, Amplifier:2, Duration:1800},{Id:5, Amplifier:1, Duration:1800}],display:{Name:"Strength Potion",Lore:[ "Une potion qui donne une force incroyable, mais rends l'utilisateur très lent.", "COMMUN"]}},MaxUses:9999999},rewardExp:false},{buy:{id:"emerald",Count:25},maxUses:9999999,sell:{id:373,Count:1,Damage:8193,tag:{CustomPotionEffects:[{Id:9, Amplifier:1, Duration:6000},{Id:10, Amplifier:2, Duration:5000}],display:{Name:"Regeneration Potion",Lore:[ "Une potion qui permet de régénerer son utilisateur, mais donne la nausée", "COMMUN"]}},MaxUses:9999999},rewardExp:false},{buy:{id:"emerald",Count:25},maxUses:9999999,sell:{id:373,Count:1,Damage:8206,tag:{CustomPotionEffects:[{Id:11, Amplifier:2, Duration:1800},{Id:18, Amplifier:15, Duration:1800}],display:{Name:"Resistance Potion",Lore:[ "Une potion qui permet de rendre son utilisateur plus résistant mais moins fort.", "COMMUN"]}},MaxUses:9999999},rewardExp:false},{buy:{id:"emerald",Count:35},maxUses:9999999,sell:{id:373,Count:1,Damage:8197,tag:{CustomPotionEffects:[{Id:2, Amplifier:3, Duration:1200},{Id:17, Amplifier:2, Duration:1200},{Id:21, Amplifier:1, Duration:900},{Id:22, Amplifier:1, Duration:900}],display:{Name:"Health Boost Potion",Lore:[ "Une potion donnant de la vie en plus à son utilisateur mais le rend plus lent et lui donne faim.", "PEU COMMUN"]}},MaxUses:9999999},rewardExp:false},{buy:{id:"emerald_block",Count:64},maxUses:9999999,sell:{id:373,Count:1,Damage:8195,tag:{CustomPotionEffects:[{Id:5, Amplifier:5, Duration:6000},{Id:11, Amplifier:5, Duration:6000},{Id:15, Amplifier:1, Duration:6300},{Id:21, Amplifier:5, Duration:6000},{Id:22, Amplifier:5, Duration:6000}]},display:{Name:"Potion gouttes de lune",Lore:[ "Une potion très rare rendant son utilisateur très puissant mais lui enlevant la vue", "TRES RARE"]}},rewardExp:false},{buy:{id:"emerald",Count:25},maxUses:9999999,sell:{id:373,Count:1,Damage:16386,tag:{CustomPotionEffects:[{Id:2, Amplifier:1, Duration:200},{Id:14, Amplifier:1, Duration:300}],display:{Name:"Potion de camouflage",Lore:[ "Une potion pour se camoufler lors des assassinats ou vols.", "RARE"]}},MaxUses:9999999},rewardExp:false},{buy:{id:"emerald",Count:40},maxUses:9999999,sell:{id:373,Count:1,Damage:16395,tag:{CustomPotionEffects:[{Id:9, Amplifier:1, Duration:400},{Id:19, Amplifier:2, Duration:200}],display:{Name:"Poison Potion",Lore:[ "Une potion d'assassinat qui empoisonne.", "RARE"]}},rewardExp:false},{buy:{id:"emerald_block",Count:5},maxUses:9999999,sell:{id:373,Count:1,Damage:16388,tag:{CustomPotionEffects:[{Id:9, Amplifier:1, Duration:600},{Id:18, Amplifier:15, Duration:600},{Id:19, Amplifier:5, Duration:300}],display:{Name:"Strong Poison Potion",Lore:[ "Une potion de poison plus puissante qui affaiblis aussi les personnes touchées", "TRES RARE"]}},rewardExp:false},{buy:{id:"emerald_block",Count:35},maxUses:9999999,sell:{id:373,Count:1,Damage:16392,tag:{CustomPotionEffects:[{Id:2,Amplifier:3,Duration:600},{Id:4,Amplifier:3,Duration:600},{Id:9,Amplifier:1,Duration:800},{Id:15,Amplifier:1,Duration:500},{Id:18,Amplifier:30,Duration:800},{Id:20,Amplifier:5,Duration:400}],display:{Name:"Wither potion",Lore:["Une potion mortelle.","MYTHIQUE"]}}},rewardExp:false}]}}}}   I know this is a bit too long, but can you help me? It's saying Unbalanced square brackets, but after many checks I can't see where I failed.

Often, when making a command block contraption, you need to set an entity's data tag. These tags can sometimes be very long, with many layers of nested curly and square brackets. For example, this is the command to summon a villager with a single custom trade:  /summon Villager ~ ~ ~ {Profession:3,Career:2,Offers:{Recipes:[{buy:{id:minecraft:diamond,Count:6b}},sell:{id:minecraft:diamond_hoe,tag:{ench:[{id:16s,lvl:10s}]}]}}   The single-line command block interface of Minecraft makes it incredibly difficult to find and fix errors, especially when it comes to mismatched brackets. In fact, for illustration purposes, I put an error in the above command.  What techniques can I use to find and fix unbalanced square or curly brackets when writing long and complicated data tags?


Checking my pulseaudio config, I just realized there is a /usr/lib/systemd/user/pulseaudio.service provided by the pulseaudio package. It is disabled, but pulseaudio works completely fine without. Have been using it for a year. Don't need to do anything after boot to start the actual executable. (It's an Ubuntu shipped-in package after all.) Why is it so ? Should I enable the service ? If so, why doesn't Ubuntu do this by default ? Also, what will change from current operation ? Thanks in advance PS: The Ubuntu wiki page doesn't give any information.

I just realized there is a /usr/lib/systemd/user/pulseaudio.service provided by the pulseaudio package. It is disabled but pulseaudio works completely fine without. Have been using it for a year. Don't need to do anything after boot to start the actual executable. It's an Ubuntu shipped-in package after all. Why is it so ? Should I enable the service ? If so, why doesn't Ubuntu do this by default ? Also, what will change from current operation ? Thanks in advance PS: The ubuntu wiki page doesn't give any information.


I tried to wage war with France from Scotland, but for some reason I could not attack from the sea tile, while an allied army was. How do I attack from the sea? In general, why can't I land on blocks that are not mine?

I find it very fiddly to embark and disembark, sometimes the ship just refuse to approach the land! does the landing site have to be allied land with a port facility or something...? And  sometimes i click the troop to move toward ship and they eventually do board the vessel, but clicking embark does nothing at all. Its very frustrating and fiddly especially combined with the huge slowdown. makes me wish it was turn based because i lose some conflicts trying to transport troops and clicking again and again to transport them on ships but by the time they eventually  (if ever) board and disembark I've missed the battle and lost again!  lol i lose enough without shipping megabug!


Assume I have the following snippet/screenshot. How can I get Desc2 on the same line as Desc1. So Desc2 should be vertically placed below T2 but horizontally at the same level as Desc1 so that the descriptions are laid out on the same line.  More in general: how to position a node horizontally relatively from node X, but vertically from node Y?  Preferable a solution without calc or matrix (free node placement)   So I am looking something like:   \node[below of=t2 left of d1] {Desc2};   What is the easiest way to do this?  MWE:      \documentclass[tikz]{standalone}     \usepackage{tikz}     \usetikzlibrary{positioning}     \begin{document}         \begin{tikzpicture}[align=center,node distance=2cm]          \node[style={circle}] (t1) {T1} -- (t1)                    node[above left of=t1,style={circle}] (t2) {T2};           \path[draw,->] (t1) -- (t2);                   \node[below of=t1]  (d1) {Desc1};             \node[below of=t2] {Desc2};           \end{tikzpicture}     \end{document}

In TikZ, if I have a node (A), how do I create a node (B) with the same x-coordinate as (A), but a given y-coordinate?


How to raise CancelEventArgs in unit testing using C#   void OnCloseWindow(object sender, CancelEventArgs e)         {             var window = base.DataContext as IWindowManagerService;             if (window != null)             {                 e.Cancel = !window.CloseWindow();             }         }

I have some code that raises PropertyChanged events and I would like to be able to unit test that the events are being raised correctly.  The code that is raising the events is like  public class MyClass : INotifyPropertyChanged {    public event PropertyChangedEventHandler PropertyChanged;       protected void NotifyPropertyChanged(String info)    {         if (PropertyChanged != null)         {             PropertyChanged(this, new PropertyChangedEventArgs(info));         }    }       public string MyProperty    {        set        {            if (_myProperty != value)            {                _myProperty = value;                NotifyPropertyChanged("MyProperty");            }        }    } }   I get a nice green test from the following code in my unit tests, that uses delegates:  [TestMethod] public void Test_ThatMyEventIsRaised() {     string actual = null;     MyClass myClass = new MyClass();      myClass.PropertyChanged += delegate(object sender, PropertyChangedEventArgs e)     {          actual = e.PropertyName;     };      myClass.MyProperty = "testing";     Assert.IsNotNull(actual);     Assert.AreEqual("MyProperty", actual); }   However, if I then try and chain the setting of properties together like so:  public string MyProperty {     set     {         if (_myProperty != value)         {             _myProperty = value;             NotifyPropertyChanged("MyProperty");             MyOtherProperty = "SomeValue";         }     } }  public string MyOtherProperty {     set     {         if (_myOtherProperty != value)         {             _myOtherProperty = value;             NotifyPropertyChanged("MyOtherProperty");         }     } }   My test for the event fails - the event that it captures is the event for the MyOtherProperty.  I'm pretty sure the event fires, my UI reacts like it does, but my delegate only captures the last event to fire.  So I'm wondering: 1. Is my method of testing events correct? 2. Is my method of raising chained events correct?