The die is six-sided. So, this is easy with a two-sided coin showing exactly $k$ heads, as that is just a Bernoulli trial being run $n$ times (Binomial RV).  You can also approximate this using a normal random variable with $N(3.5\times n, \frac{35}{12} \times n)$. But that doesn't yield an exact answer for $k$. I can get an answer for the value being $at\ least\ k$, that is easy. In fact, as $n$ approaches infinity, .  I can also run a simulation that will get me to a close value for a given $n$ and $k$.  But how do I figure out the exact value? This is not a continuous distribution, this is discrete. i.e. what is the generalized formula for this? There are many posts online that show all the previously mentioned methods, I couldn't find anything for a generalized version of the exact solution to this problem, however.

If I rolled $3$ dice how many combinations are there that result in sum of dots appeared on those dice be $13$?


I am Iraqi passport holder living currently in Iraq with no valid Australian visa. I received an invitation to lodge my 189 visa and I am in process of lodging my PR visa.  While I was studying in Australia 2012-August 2017 (completed and returned back to Iraq), I had a Schengen Visa refusal in March 2017 to Italy as I was going for a conference.  I did something wrong during the Italian visa process. The thing I did was I withdrew my passport from the Italian embassy (between the time of lodging my visa application to the refusal date). I withdrew passport because I had to travel to USA for another conference and the embassy did not issue visa as quick as usual. While I was in USA, I received an email by Italian embassy stating: "One or more member state(s) consider you to be a threat to public policy, internal security, public health as defined in Article 2(19) of Regulation (EG) No 562/2006 (Schengen Borders Code) or the international relations of one or more of the member of states". Within this received email, they give me a chance to explain everything. I did and said that I withdrew my passport for this reason with a lot of supportive documents.   After returning to Australia, I sent back my passport and they sent me this refusal with the same reason quoted above. I am very confident that I do no have anything to hide.  I checked this . I want to local German consulate and sought AZR. I received that "no details are stored under your name". So, the only possibilities, they considered when making decision for my schengen visa, are deceit or false/fake/contradictory.  Q1: How is to mention the above refusal reason in "circumstances of refusal" this form ?  Q2: How severe is this refusal on the likelihood of getting my Australian PR visa approved?  Q3: What is the best approach to handle this?  Thanks in Advance

I applied for German Schengen visa as a medical escort to my relative in a different country from  where I reside, but my visa application was refused and the refusal letter  was written in German as the following:        Ein oder mehrere Mitgliedstaaten sind der Auffassung, dass Sie eine Gefahr für die öffentliche Ordnung, die innere Sicherheit, die   öffentliche Gesundheit gemäß Artikel 2 Absatz 19 der Verordnung (EG)   Nr 562/2006 (Schengener Grenzkodex) oder die internationalen   Beziehungen eines oder mehrerer Mitgliedstaaten darstellen.      I was in Germany for nearly a year with my relative during his treatment; I extended my stay there 3 times; and I returned back home two months ago in order to renew my passport. I applied again using the same documents that I used for my extension in Germany.    First, can anyone tell me what the refusal means? Next, is there any possibility that there is a mistake in the assessment?    Note: In English this reason is...     One or more member state(s) consider you to be a threat to public   policy, internal security, public health as defined in Article 2(19)   of Regulation (EC) No 562/2006 (Schengen Borders Code) or the   international relations of one or more of the member states).


When I was computing $\sqrt{1+i}$, $\sqrt{1+\sqrt 2}$ came up and I could not simplify it. So the question is how to simplify $\sqrt{1+\sqrt 2}$, or is it in the most simplified form?

I feel like this is an extremely simple question but somehow I cannot solve it.      Is it possible to unnest $$\sqrt{1+\sqrt2}\quad?$$    This was motivated by the .   If we let $x^2=1+\sqrt2\implies x^4-2x^2-1=0$ and after solving with substitution $u=x^2$, the argument is circular.


What does the command ./ mean? For example, sometimes we call a file with ./config, sometimes ../config, thanks

What does ./ mean?  For example: Does the following command mean moving files from Gapache2 folder to sites-available:  root@ip-10-112-55-203:/etc/mds-1.2-beta4/sana/config/etc/Gapache2# mv ./ /etc/apache2/sites-available   If not how should this be modified?  I tried getting something from Google Search. But ./ gets ignored by search engines.


I have a query that returns data like below, need to combine the value column into comma-separated string excluding duplicates and null values.  g_name    g_id      v_data     -----     ----      ------ Test      123        ABC Test      123        ABC Test      123        DEG Test      123        None Test      123         Test      123        HIJ   Desired output :  g_name    g_id      v_data     -----     ----      ------ Test      123        ABC,DEG,HIJ   I have tried using XMLAGG but can't remove duplicates and null values.  select g_name,      g_id,      RTRIM(XMLAGG(XMLELEMENT(e, v_data || ',')).EXTRACT('//text()'), ',') from tblData group by g_name, g_id

I have a simple query:  select * from countries   with the following results:  country_name ------------ Albania Andorra Antigua .....   I would like to return the results in one row, so like this:  Albania, Andorra, Antigua, ...   Of course, I can write a PL/SQL function to do the job (I already did in Oracle 10g), but is there a nicer, preferably non-Oracle-specific solution (or may be a built-in function) for this task?  I would generally use it to avoid multiple rows in a sub-query, so if a person has more then one citizenship, I do not want her/him to be a duplicate in the list.  My question is based on the similar question on .  UPDATE: My function looks like this:  CREATE OR REPLACE FUNCTION APPEND_FIELD (sqlstr in varchar2, sep in varchar2 ) return varchar2 is ret varchar2(4000) := ''; TYPE cur_typ IS REF CURSOR; rec cur_typ; field varchar2(4000); begin      OPEN rec FOR sqlstr;      LOOP          FETCH rec INTO field;          EXIT WHEN rec%NOTFOUND;          ret := ret || field || sep;      END LOOP;      if length(ret) = 0 then           RETURN '';      else           RETURN substr(ret,1,length(ret)-length(sep));      end if; end;


How many arrangements of the integers $1,2,\ldots,n$ are such that no number $i$ is ever immediately followed by $i+1$?

In how many ways can the natural numbers from 1 to 10 be arranged so that no two consecutive numbers are adjacent to each other, and how is the formula arrived at?


I am using fprintf to store the values entered by user  in a file . Code is not working as expected (First thing that after prompting "Do you want to continue? Y or N  : " program is automatically taking some value and continues the loop . Secondly it is not storing the value input by user into intended file . Update: I am able to let program prompt use whether to continue loop or not by putting space in scanf before %c but still file admin_db.txt is not getting populated properly.  #include<stdio.h>  typedef struct {  char str[30]; int a[10];  }UNIX;  int main()  {  UNIX admin; char ch; FILE *fp;  fp=fopen("admin_db.txt","w+");  while(1)  { printf("\nEnter the name of admin :  ");  scanf("%s",&admin.str);   printf("\nEnter the age of admin : ");   scanf("%d",&admin.a);    fprintf(fp,"%s%t%d",admin.str,admin.a);    printf("\nDo you want to continue ? Y or N :");    scanf("%c",&ch);     if(ch=='n' || ch=='N')      break;  }  fclose(fp);  }   Output:   Enter the name of admin :  Akhil  Enter the age of admin : 23  Do you want to continue ? Y or N :        //Automatically taking some value                                        //                                        other than n or N and continuing loop. Enter the name of admin :  sukhi  Enter the age of admin : 30  Do you want to continue ? Y or N : Enter the name of admin : Enter the age of admin : ^C    Also , sizeof file admin_db.txt is of 0 bytes.

I've been having a lot of problems trying to figure out how to use scanf().  It seems to work fine with integers, being fairly straight forward scanf("%d", &i).  Where I am running into issues is using scanf() in loops trying to read input.  For example:  do {   printf("counter: %d: ", counter);   scanf("%c %c%d", &command, &prefix, &input); } while (command != 'q');    When I enter in a validly structured input like c P101, it seems to loop again before prompting me.  This seems to happen even with a single:  scanf("%c", &c)    in a while loop.  It'll do the loop twice before prompting me again.  What is making it loop twice, and how do I stop it? When I enter in less amount of input that programmatically wouldn't have another character or number such as q, pressing enter seems to prompt me to enter more.  How do I get scanf() to process both single and double character entries?


I want to check if an apk file is really from a specific developer and that the whole apk has no malware in it.  I unzipped the apk and in the sub-folder META/INF I used the following command in Ubuntu:  keytool -printcert -file RELEASE_.DSA   If I use this technique with a "clean.apk" and a "suspicious.apk" file from the same developer and the MD5 / SHA1 are the same ... does this mean that the "suspicious.apk" really is "clean" ?  Does this work like GnuPG verifying a file? Or is this not reliable to check for integrity / authencity of an apk file?

I have two .apk files that are supposed to be different versions of the same app. What is the best way to check if they where both signed with the same key?  I want to make sure no mistakes were done and the newer version would be treated as an update of the same app.


I have used to two queries to update one column as NULL:  update table_name  set col1 = NULL where col2 = 'MUTHU';  update table_name  set col1 = '' where col2 = 'MUTHU';   But when i used to query with function NVL then i am getting the same result for both queries.  select nvl(col1, 'value') from table_name;   My question is: what is the 'difference' and 'use' between  NULL and '' ?

I know that it does consider ' ' as NULL, but that doesn't do much to tell me why this is the case.  As I understand the SQL specifications, ' ' is not the same as NULL -- one is a valid datum, and the other is indicating the absence of that same information.  Feel free to speculate, but please indicate if that's the case.  If there's anyone from Oracle who can comment on it, that'd be fantastic!


I've recently come back to Blender after not using it for a while and I'm trying to reacquaint myself with everything.  I've been working on a model of a product to be used on a company's website. It's fairly simple, they supply boxes of different drinks to bars, restaurants etc. So the model is just a box which will have different labels on for each flavour.   There are around 50 variations and the render time takes around 25 - 30 minutes each.  Because the only thing that is changing is the textures for the labels I was wondering if there is anyway to either keep the parts of the scene that don't change pre-rendered, or to only render the areas around the labels and then layer those on top of a blank render of the box (in Blender itself or with Photoshop)?  I'm using Cycles if that makes a difference.

Render Border,    is a great little function for reducing render time while experimenting, but what does the 'Render Border' check box in the Properties >View panel do - apart from turning off the red border when un-checked? (there is no Manual reference to this)    Also, after setting a Render Border, in the Tool Shelf >Set Render Border panel, there is a 'Camera Only' check box:    I have tried many different combinations of these with renders, and the result is… confusion! Can someone please clarify this for me?


My in-law applied for UK visit visa with his wife and only son. He is self employed and employed part time with a Korean company. And also employed freelancer with another company in Nigeria. He submitted his business registration certificate, his bank statements for his business and his personal bank statement and his dollars account. All his account statement reflects all the payments he receives. He submitted his payslip. Can someone help explain each paragraph of the refusal. And the eco said he is traveling with his wife and children instead of child

Many of the UK visa refusals we see here share a common pattern and the prevailing reasons refer to V 4.2 (a) and (c).    I do understand that, while the applicants may describe very different individual circumstances, there's a consistent pattern and, broadly, fall into specific categories:    Credibility (lifestyle, lack of ties, visit history, lies & omissions) Funding (insufficient funds, provenance of funds, funds parking) Sponsorship (family, friends, employer)   Question: What most commonly triggers a UK visa refusal where V 4.2 (a) and (c) are given as the grounds?  Secondarily: Given that there is a clear pattern, to what extent are these refusals predictable? Does sponsorship make a difference? Is there a set of personal circumstances, however abstract, where a refusal is all but guaranteed? For example, why do those we see here on TSE who sought entry for the PLAB or British Army appear to be refused with a common theme? Is there a uniform shortcoming or is it just discrimination?   PLAB: What is about applications for a visa, for the purpose of sitting the Professional and Linguistic Assessments Board (PLAB) exam, that seem to invite refusals. After all, the test is given so that international medical graduates can show that they qualify to practise medicine in the UK. The first part, PLAB 1, can be taken in centres outside of the UK. However, PLAB 2 can be taken only in the UK. Why can't you can't get a visa just to sit the exam, promising that you'll leave immediately after?    British Army: Since Commonwealth citizens are eligible to apply online to join, even those who don't reside in the UK, why is it so difficult to get a visa just to attend an interview to see whether you are suitable? Even with an invitation from the Army, such visa applications seem to be unsuccessful. Isn't a career in the British Army a valid reason?     Lastly:  After such a refusal, what approaches would increase the chance of a successful application?


I'm aware that there are more general formulations of these concepts, but I'm just starting to learn these and have been looking at them in a very restricted and simple context. Let $A \subset \omega^{\omega}$. We say $A$ is analytic if there is $B \subseteq \omega^\omega\times \omega^\omega$ Borel such that $A = proj(B)$ ($proj$ being the projection). We say $A$ is $\omega$-suslin if there is a tree $T \subseteq \omega^{<\omega}\times \omega^{<\omega}$ such that $A = proj([T])$ (where $[T]$ is the set of branches of the tree). We say $A$ is $\sum^1_1(z)$ for some $z \in \omega^\omega$ if there is a computable set $P \subseteq \omega^{<\omega}\times\omega^{<\omega}\times\omega^{<\omega}$ such that $$x \in A \iff \exists y \in \omega^\omega \forall n\in \omega P(x_{\big|n}, y_{\big|n}, z_{\big|n})$$ where the bars indicate function restrictions. We say $A$ is $\sum^1_1$ if it is $\sum^1_1(z)$ for some $z \in \omega^\omega$. Goal: Show these three notions are equivalent, i.e, $A$ is analytic $\iff$ $A$ is $\omega$-suslin $\iff$ $A$ is $\sum^1_1$ $\omega$-suslin $\implies$ analytic is trivial. I'm struggling with analytic $\implies$ $\omega$-suslin.My guess is to notice that the topology on $\omega^\omega \times \omega^\omega$ has a base of countable clopen sets. This implies that every Borel set is clopen (I think? that seems way too strong), and closed sets correspond to trees, which would solve the issue. However, this seems too easy; I'm pretty sure I'm missing a lot here. As for $\omega$-suslin $\iff$ $\sum^1_1$, I'm completely lost. I'm garbage at recursion theory to begin with, and I'm not at all comfortable with the concepts being used here. I appreciate all the help I could get; I would especially appreciate being pointed to a book or a set of notes that deals with $\sum^1_1$ and the projective hierarchy more slowly and help me understand where to start at least.

(pg 2) say that A set $C \subseteq \omega^\omega$ is closed if and only if there is an $z \in \omega^\omega$ and a recursive predicate $R \subseteq \omega^{<\omega}\times\omega^{<\omega}$, such that for all $x$, $$x \in A \iff \forall n R(x_{|n}, z_{|n})$$ I am garbage at recursion theory; can someone elucidate on how we obtain this result? Bonus: We know that an analytic set $A \subset \omega^\omega$ is a projection of a closed set $C \subset \omega^\omega\times\omega^\omega$. An alternate formulation would be that a set $A \subseteq \omega^\omega$ is analytic if there is $z \in \omega^\omega$ and a recursive $R \subseteq \omega^{<\omega} \times \omega^{<\omega} \times \omega^{<\omega}$, such that $$x \in A \iff \exists y \in \omega^\omega \forall n\in \omega R(x_{|n}, y_{|n}, z_{|n})$$ Proving the result above would easily give us the equivalence between these two formulations.


print("Player 1 is up")` print("Player 2 is up")`  I would like to be able to print the text in the console as a different color for each player, I've tried a couple of the imports, but it doesn't work. Any help would be gratefully received. As shown below my attempt at trying one of the suggestions on the "How to print colored text in python. I have tried a lot of ways, but they all print the ANSI escape sequence.

How can I output colored text to the terminal in Python?


I am trying to proof the following algorithm to see if a there exists a path from u to v in a graph G = (V,E).   Reach := {u} LastCardinality := 0 while LastCardinality < |Reach| do   LastCardinality := |Reach|   Next := null   foreach i <- Reach do     foreach j <- V do       if(i,j) exists in E then         Next := Next + {j}   Reach := Reach + Next return Reach   So far I have got that the output needs to be Reach = Goal where Goal = {r | r exists V, there is a path from u to r}. I also have three invariants that I am pretty sure will help prove this.  Reach is always a subset of Goal and Next is always a subset of Goal.  After an arbitrary K times through the while loop, for every t that exsits in V, if t has a path of length k+1 from u, then t exists in Reach  If Reach is a subset of Goal before the while loop then LastCardinality < |Reach|  I know that to finish up the proof, I need to prove termination, the invariants, and correctness but I have no idea how. I think I need to use induction on the while loop but I am not exactly sure how.   How do I proof those three characteristics about an algorithm?


Hey all I am getting an error and cannot for the life of me figure out why.  Thanks in advance for help! Error is:  Failed to invoke future method 'public static void pushToLead2(String)' on class 'SomethingAPI' for job id 'something'   caused by: System.JSONException: Malformed JSON: Expected '{' at the beginning of object   Class.System.JSON.deserialize: line 15, column 1 Class.SomethingAPI.pushToLead2NotFuture: line 153, column 1 Class.SomethingAPI.pushToLead2: line 102, column 1  Code: @future(callout=true) public static void pushToLead(String accountId) {     auth(false);     Account account = [SELECT Id, PersonEmail, Name, Phone, Utm_Source__pc, Utm_Campaign__pc,                     Utm_Term__pc, Utm_Medium__pc, Utm_Content__pc, Something_Lead_Id__c FROM Account WHERE Id =: accountId];     HttpRequest req2 = new HttpRequest();     req2.setEndpoint('https://wwwSomething.com/api/v1/lead' + (account.Something_Lead_Id__c != null ? '/' + account.Something_Lead_Id__c : ''));     req2.setMethod(account.Something_Lead_Id__c == null ? 'POST' : 'PUT');     req2.setHeader('x-api-token', auth);     req2.setHeader('Content-Type', 'application/json');     Map<String, Object> bodyMap = new Map<String, Object>();          SomethingLead ll = new SomethingLead();     if (lead.Something_Lead_Id__c != null) {         //   ll.id = Integer.valueOf(account.Something_Lead_Id__c);         // ll.skip_salesforce_update = true;                 }     ll.email = account.PersonEmail;     ll.source = 'Salesforce';     ll.name = account.Name;     ll.phone = account.Phone;     ll.utm_source = account.Utm_Source__pc;     ll.utm_campaign = account.Utm_Campaign__pc;     ll.utm_term = account.Utm_Term__pc;     ll.utm_medium = account.Utm_Medium__pc;     ll.utm_content = account.Utm_Content__pc;          bodyMap.put('lead', ll);          req2.setBody(JSON.serialize(bodyMap));              Http http2 = new Http();     HttpResponse res2;     if (!Test.isRunningTest()) {         res2 = http2.send(req2);     } else {         res2 = new HttpResponse();         Integer randomNumber = Integer.valueof((Math.random() * 10000000));         res2.setBody('{"status":"ok","lead":{"id":' + randomNumber + '}}');     }          System.debug('ALL: ' + res2.getBody());          // Attempt relogin on 500     if (500 == res2.getStatusCode()) {         auth(true);         req2.setHeader('x-api-token', auth);         res2 = http2.send(req2);     }               LeadResponse resBody = (LeadResponse) JSON.deserialize(res2.getBody(), LeadResponse.class);     Account updAcc = new Account(Id = account.Id);            if (resBody.status == 'ok' && account.Something_Lead_Id__c == null) {         ll = resBody.lead;         updAcc.Something_Lead_Id__c = ll.id;         runOnce = false;              }          updAcc.Push_To_Something__c = false;     update updAcc; }

This is a canonical question and answer developed by the community to help address common questions. If you've been directed here, or your question has been closed as a duplicate, please look through the resources here and use them to shape more specific questions. To browse all canonical questions and answers, navigate to the  tag.  This question and answer is owned by the community! If you can improve it and make it more useful, you're welcome to edit it.  I have a specific JSON structure in mind. I need to either deserialize this structure that's coming in from a web service, or I need to serialize data into this structure to transmit it to another system. How should I get started on this project in Apex?


I mean when we should say:shop and store.  For example:        [1] *  He is working at a barbershop.   [2] *  He is working at a barber store.      Why we say coffee shop and not coffee store.  Why we say department store and not department shop?

The day before yesterday I think, my daughter asked me where we were going and since I was not planning to do the weekly shopping on that day and I just wanted to buy some stuff from two stores, I said offhand we are going to the shops! Looking back, it seems when I don't find a NAmE word I turn to UK if I know of.  So what do you say when:   go shopping (it's just go shopping!) you go to buy something specific; I mean you're not going shopping, and it's usually found in any store. You don't have to shop around. you want to buy non grocery or clothing stuff, maybe a can of paint and a spare part for your car together.    I have found some kind of answer for this question on , but I prefer to get a clear answer to my points above, and also if you agree with this native speaker about using store in singular form not plural:     Just as a side note, we don't use the plural in American English. "I'm   going to the store" (even if I may visit several stores), not "I'm   going to the stores". (If we know we are going to several stores I   think it would be more likely to say "I'm going shopping" or even "I'm   going downtown" in smaller towns.)


l set page numbering as follow :  \setbeamertemplate{footline}[frame number]   However l don't want to page the first slide which containts title name ....

I am using the default theme, and use the following to customize the footline,  \useoutertheme{infolines} \setbeamertemplate{footline}{\hspace*{.5cm}\scriptsize{\insertshorttitle \hspace*{50pt} \hfill\insertframenumber\hspace*{.5cm}}\\ \vspace{9pt}}    I don't like it also appears on the title page. Is there a simple way not to show it on the first page?


I'm looking for a way to convert a PDF to a single, continuous JPG.  I've tried:  convert source.pdf output.jpg   But I get all separate pages, eg:  output-1.jpg output-2.jpg output-3.jpg ...   Is there something I'm missing, so that all my pages will be laid out vertically in the resulting JPG, rather than each page to its own jpg?

Is there a tool in Ubuntu to automatically merge two images having a common strip? I need to scan a large image, which will not fit at once in the scanner. I was thinking about scanning it in two parts and hand-editing the result in Gimp to join them. But probably an automatic tool can do the same more quickly and better.  EDIT I think I may have not made my point clear. My difficulty is not aligning two images. My problem is that one has to compensate for the rotation or distortion introduced by the manual process of putting the sheet into the scanner, and an automatic tool should obtain more precise results at analyzing common patterns in the two images to rotate and align them seamlessly.


I find myself writing code like this relatively often:  _munge_text_re = re.compile("... complicated regex ...") def munge_text(text):     match = _munge_text_re.match(text)     ... do stuff with match ...   Only munge_text uses _munge_text_re, so it would be better to make it local to the function somehow, but if I move the re.compile line inside the def then it will be evaluated every time the function is called, defeating the purpose of compiling the regular expression.  Is there a way to make _munge_text_re local to munge_text while still evaluating its initializer only once?  The single evaluation needn't happen at module load time; on the first invocation of munge_text would be good enough.  The example uses a regex, and the majority of the time I need this it's for a regex, but it could be any piece of data that's expensive to instantiate (so you don't wanna do it every time the function is called) and fixed for the lifetime of the program.  ConfigParser instances also come to mind.  Extra credit: For reasons too tedious to get into here, my current project requires extreme backward compatibility, so a solution that works in Python 2.0 would be better than one that doesn't.

Consider the following code:    def CalcSomething(a):     if CalcSomething._cache.has_key(a):       return CalcSomething._cache[a]     CalcSomething._cache[a] = ReallyCalc(a)     return CalcSomething._cache[a]   CalcSomething._cache = { }   This is the easiest way I can think of for simulating a 'local static' variable in python. What bothers me is that CalcSomething._cache is mentioned outside the function's definition, but the alternative would be something like that:    if not hasattr(CalcSomething, "_cache"):       setattr(CalcSomething, "_cache", { } )     inside the function's definition, which is really cumbersome.    Is there a more elegant way?    [EDIT] Just to clarify, this question is not about local function caches, as the example above might suggest. Here is another short example where a 'static local' might be handy:    def ParseString(s):     return ParseString._parser.parse(s)   # Create a Parser object once, which will be used for all parsings. # Assuming a Parser object is heave on resources, for the sake of this example. ParseString._parser = Parser()


Let $G$ be a cyclic group of order $n$ generated by $a$. Then $a^{k} = e$ if and only if $n | k$.   Proof:       I have a question about the above proof. Why is it assuming in both sides that $a^{n}=e$?

Let $G$ be a finite cyclic group of order $n$ generated by an element $g$. I want to show that the order of $g$ is exactly the order of $G$.   My try:   We can write $G=\{g^i\;|\;i\in \mathbb Z\}$. Since $G$ is finite, we know that there will be identifications $g^i=g^j$ that will make $G$ finite. By the multiplication law on $G$ we must have $g^0=1$. Also if $i<j$ and if $g^i=g^j$ then $g^{j-i}=1$. I can see all these but not see why $g^n=1$ and not $g^k=1$ for all $0<k<n$? Thank your for your help!!


I have two functions:   1st - Takes care of all customizer options 2nd - Generates an inline style from those options   In first function I set variables from which I create customizer settings and controls like this:  function im_customize_register( $wp_customize ) {  //Custom Sections  $wp_customize->add_section(     'body',     array(         'title'     => __('Body Settings', 'impressive'),         'priority'  => 200     ) );  //Styles  $bg_color = 'background-color:'; $max_width = 'max-width:';  $styles = array();  $styles[] = array(   'slug'=>'body_bcolor',    'default' => "#F1F2F1",   'label' => __('Body Background Color', 'impressive'),   'css_class' => 'body',   'attribute' => $bg_color,   'section' => 'body',   'type' => 'color' ); $styles[] = array(   'slug'=>'max_container_width',    'default' => '1440',   'label' => __('Maximal Container Width', 'impressive'),   'css_class' => '.header',   'attribute' => $max_width,   'section' => 'body',   'type' => 'number' );  foreach( $styles as $style ) {    $wp_customize->add_setting(     $style['slug'], array(       'default' => $style['default'],       'type' => 'option',        'capability' =>        'edit_theme_options'     )   );   if ( $style['type'] == 'color' ) {   $wp_customize->add_control(     new WP_Customize_Color_Control(       $wp_customize,       $style['slug'],        array('label' => $style['label'],       'section' => $style['section'],       'settings' => $style['slug'],       'type' => $style['type'])     )   );   } elseif ( $style['type'] == 'image' && $style['section'] == 'header_image' ) {     $wp_customize->add_control(         new WP_Customize_Header_Image_Control(         $wp_customize,         $style['slug'],          array('section' => $style['section'],         'settings' => $style['slug'])     )   );  } else {   $wp_customize->add_control(     new WP_Customize_Control(       $wp_customize,       $style['slug'],        array('label' => $style['label'],       'section' => $style['section'],       'settings' => $style['slug'],       'type' => $style['type'])     )   );    }  }  } add_action( 'customize_register', 'im_customize_register' );   In second function I need to type same variables in order for the script to generate inline CSS:  function im_custom_style_create() {  wp_enqueue_style( 'im_custom_style', get_template_directory_uri() . '/css/im_custom_style.css' );  $custom_css = '';  $bg_color = 'background-color:'; $max_width = 'max-width:';  $measurement_unit = '';  $styles = array();  $styles[] = array(   'slug'=>'body_bcolor',    'default' => "#F1F2F1",   'label' => __('Body Background Color', 'impressive'),   'css_class' => 'body',   'attribute' => $bg_color,   'section' => 'body',   'type' => 'color' ); $styles[] = array(   'slug'=>'max_container_width',    'default' => '1440',   'label' => __('Maximal Container Width', 'impressive'),   'css_class' => '.header',   'attribute' => $max_width,   'section' => 'body',   'type' => 'number' );  foreach( $styles as $style ) {  if ( $style['attribute'] == $max_width ) { $measurement_unit = 'px'; }  if ( get_option( $style['slug'] ) == true ) { $custom_css = '' . $style['css_class'] . ' { ' . $style['attribute'] . ' ' . get_option( $style['slug'] ) . $measurement_unit . '; } '; };  wp_add_inline_style ('im_custom_style', $custom_css); }  } add_action( 'wp_enqueue_scripts', 'im_custom_style_create' );   My question is: Is there is a way to pass $styles from 1st function to 2nd or is there isn't one can I combine those two function. I tried combining them but I couldn't make the magic happen.

So...here is part of my code for a plugin.  I'm a newb of sorts so be kind.  I've read up on global variables but I can't seem to get it to work and I've read you shouldn't use them anyway.  So what would be the best way to write the code below without having to re-declare the variables for each function?  Here is the  if necessary.  // Display the product badge on the shop page  add_action( 'woocommerce_after_shop_loop_item_title', 'wc_simple_product_badge_display_shop', 30 ); function wc_simple_product_badge_display_shop() {     $title = get_post_meta( get_the_ID(), '_wc_simple_product_badge_title', true ); // badge title     $class = get_post_meta( get_the_ID(), '_wc_simple_product_badge_class', true ); // badge class     $duration = get_post_meta( get_the_ID(), '_wc_simple_product_badge_duration', true ); // badge duration     $postdate = get_the_time( 'Y-m-d' ); // post date     $postdatestamp = strtotime( $postdate ); // post date in unix timestamp     $difference = round ((time() - $postdatestamp) / (24*60*60));  // difference in days between now and product's post date      if ( !empty( $title ) && empty( $duration ) || !empty( $title ) && $difference <= $duration ){ // Check to see if there is a title and the product is still within the duration timeframe if specified         $class = !empty( $class ) ? $class : '';         echo '' . $title . '';     } }  // Display the product badge on the single page  add_filter( 'woocommerce_single_product_image_html', 'wc_simple_product_badge_display_single' );     function wc_simple_product_badge_display_single( $img_html ) {     $title = get_post_meta( get_the_ID(), '_wc_simple_product_badge_title', true ); // badge title     $class = get_post_meta( get_the_ID(), '_wc_simple_product_badge_class', true ); // badge class     $duration = get_post_meta( get_the_ID(), '_wc_simple_product_badge_duration', true ); // badge duration     $single_opt = get_post_meta( get_the_ID(), '_wc_simple_product_badge_single_page_option', true ); // badge on single page     $postdate = get_the_time( 'Y-m-d' ); // post date     $postdatestamp = strtotime( $postdate ); // post date in unix timestamp     $difference = round ((time() - $postdatestamp) / (24*60*60));  // difference in days between now and product's post date      if ( !empty( $title ) && empty( $duration ) && $single_opt === 'yes' || !empty( $title ) && $difference <= $duration && $single_opt === 'yes' ){ // Check to see if there is a title and the product is still within the duration timeframe ()if specified) and the checkbox is checked to show on single page view         $class = !empty( $class ) ? $class : '';         echo '' . $title . '';         return $img_html; }      elseif ( $single_opt === 'no' ) { // Check to see if the checkbox is unchecked to show on single page view         return $img_html;     }  }


I am attempting to perform a very simple join attributes by location between two shapefiles in the same projection. When I run it, I get an error message indicating that the algorithm could not be run because of errors in geometry. It further states that I can ignore errors by choosing that option. But I don't see that option in the window to run spatial join.  Error message [running a French QGIS here]:     L'entité (1771) a une géométrie non valide. Veuillez réparer la   géométrie ou modifier le paramètre de traitement dans l'option   "Ignorer les fonctionnalités d'entrée non valides". Execution failed   after 2.58 seconds   Screenshot of options for running join by location:    One of the shapefiles (the target shapefile) has features where one polygon is located inside the other polygon. (When I run validate geometry, the error messages look like this: Le polygone 2 est à l'intérieur du polygone 0 [Polygon 2 is inside polygon 0].) This isn't an geographical "error" in the sense that a single feature in the database has some smaller polygons within larger polygons that should be considered a single feature and should not be considered as two separate features in the data table. Thus, I can't "fix" the geometry error without creating a database error. As mentioned in this , this is common in my file and difficult to work around.

In QGIS 2.18, when I used the Vector > Geoprocessing Tools > Intersection tool, I was able to check an option which said "Ignore NULL geometries [optional]".  Now I've downloaded QGIS 3.2 and that option no longer exists. But when I try to create the intersection between two layers I'm working on, I get a message saying that there is an invalid geometry somewhere and that I should either fix it it or "change the Processing setting to the 'Ignore invalid input features' option."   But that option doesn't exist! Or if it does exist, I just can't find it anywhere.  Does anyone know how/where to change this setting in QGIS 3.2?


I know that Real Symmetric Matrices have real eigenvalues and the vectors corresponding to each distinct eigenvalue is orthogonal from . But what if the matrix has repeated eigenvalues? Does it have linearly independent (and orthogonal) eigenvectors? How to prove that?  PS: In the answer I referred to has another answer which might have answered this question. I'm not sure if it answered my question since I didn't understand it. If it did answer my question, can anyone please explain it?  Thanks!

Can someone point me to a paper, or show here, why symmetric matrices have orthogonal eigenvectors? In particular, I'd like to see proof that for a symmetric matrix $A$ there exists decomposition $A = Q\Lambda Q^{-1} = Q\Lambda Q^{T}$ where $\Lambda$ is diagonal.


Here i am faced with problem in destructor of objects. In the program given below i am trying to make object with the base class pointer dynamically and when i am trying delete that pointer than pointer just delete object of A. So how can i delete all the objects at the end of program?  class A{          public:             A(){             cout<<"Object A is created "<<endl;             }             ~A(){              cout<<"Object A is destroyed"<<endl;              }        }; class B{         public:           B(){           cout<<"object B is Created \n";           }           ~B(){            cout<<"Object B is Destroyed"<<endl;            }        }; class C{         public:           C(){           cout<<"constructor of C class"<<endl;           }           ~C(){            cout<<"destructor of C "<<endl;            }        }; class D:public C, public B, public A{      public:        D(){        cout<<"Object D is created "<<endl;        }        ~D(){         cout<<"Object D is destroyed "<<endl;         }   }; int main() {    A *a;    a = new D();    delete a;    return 0; }

I have a solid understanding of most OOP theory but the one thing that confuses me a lot is virtual destructors. I thought that the destructor always gets called no matter what and for every object in the chain. When are you meant to make them virtual and why?


I got my B2 visa 20 years ago and I overstayed for about four years and I worked illegally.  I have a plan to go on a business trip to Las Vegas. I'm not sure what to say to the official if I'm asked if I worked back then. I paid taxes to the IRS and had an SSN, It was not legal to work but I used that number then.  Never got a ticket or trouble there.

I have a particular situation here, In March of 1997 I travelled to the US as a tourist and lived there illegally for almost 9 years. I was never arrested, or had any trouble with the law, I was never deported. I paid my taxed (had a TFN) had a job, bank account bought a house, etc. About 9 years ago I decided to leave as I was tired of living like that, not able to be legal, in fear of deportation and loosing everything. I also got married (to a person in the exact situation as me) we were able to legally migrate to Australia and now we are Australian citizens. We never returned our I-94s and in 2005 left through Mexico (walked through the border) so there are no records of us ever leaving. We have lived here in Australia for over 9 years.  OK so my question is... We have been thinking we would like to visit our friends and family back in the US now that we have a little girl. Is there any chance they won't let us in because they know we overstayed? We would be travelling with our Australian passports.


I am having issues on production server, It is groovy/grails application and I am using quartz to run many crons.  There is one cron which is when enabled crashes the JVM. I have no idea why. I can't find any crash dumps or any logs.  I found that the JVM is calling apport for crash report but apport is ignoring it. I read that apport also creates something.crash file inside /var/crash directory but I don't know it is not creating for Java crashes.  Here's the log from apport.log file.  ERROR: apport (pid 2150) Fri Sep  5 05:29:31 2014: called for pid 2100, signal 11 ERROR: apport (pid 2150) Fri Sep  5 05:29:31 2014: executable: /usr/local/java/bin/java (command line "/usr/local/java/bin/java -Djava.util.logging.config.file=/usr/local/tomcat/conf/logging.properties -Djvmarg=-Xms1024m -Xmx4096m -XX:PermSize=128m -XX:MaxPermSize=1024m -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintTenuringDistribution -Xloggc:/usr/local/tomcat/logs/gc.log -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.endorsed.dirs=/usr/local/tomcat/endorsed -classpath /usr/local/tomcat/bin/bootstrap.jar -Dcatalina.base=/usr/local/tomcat -Dcatalina.home=/usr/local/tomcat -Djava.io.tmpdir=/usr/local/tomcat/temp org.apache.catalina.startup.Bootstrap start") ERROR: apport (pid 2150) Fri Sep  5 05:29:31 2014: executable does not belong to a package, ignoring   Please suggest me how to enable crash dump for apport or any other way to find out why java failed.   Let me know if you require any more information. Thanks in advance.

I have been reading about apport and its usage for a week by now. But could not understand the below things.  Scenario:  I have developed an application and packaged it. And its name is MyApp.deb. The binary package name is MyApp .The application is installed in the path /opt/myapplication/bin/MyApp.   Requirement:   When my application crashes, I want to be able to collect core dump. On each subsequent crash, it has to create a new crash, but not overwriting the existing one. Something like auto renaming with the current time stamp, etc would help me. When I install my application on a customer machine, my installer must not modify his system wide parameters. Say for example, I must not change the pattern of his core file generation, because the user/customer might hate my application as I would change his system parameters without his consent. I am ok with the path of core file generation. Either current directory or /var/crash   Things that I have explored till now:  Apport is a nice utility which enables core file generations. Using /proc/sys/kernel/core_pattern I can format core files. This provides flexibility to redirect the core files to a predefined directory, name core files with pid, file path pattern appended or prep-ended to it,etc.. For non Ubuntu packages, I have to write hooks to generate core dumps (reports). Apport after collecting the report it will upload.  Things that I do not understand:   Is Apport the one I must be looking at?? I mean does it suffice my purpose? Or should I be looking at something else? What kind of package does my application fall under? Do I call it non-ubuntu? 3rd part? what is it? I see different terminologies in documents? As I mentioned, MyApp runs from /opt/myapplication/bin/MyApp, so where will the core files be generated? Current dir or /var/crash? Does Apport detect crashes trigerred from /opt? Does it interpret it? Important question: If I have developed the application and if Apport uploads the report to Ubuntu repositories, it does not make sense. So how can I tell Apport to send the report to me. I get this error: executable does not belong to a package, ignoring. So what am I doing wrong? For apport to recognise my package, do I need to make it a source package? Is it mandatory? I just want to create a binary package?  I also saw somewhere in the documents that Apport recognises:  Ubuntu packages or Launchpad applications but my application is neither of these. So how does Apport help me in the current scenario?


I was studying english and saw this sentence and i could not decide which of them would be better to use? (I am not a native just student)  Mesopotamia was suitable for ancient merchants, but the dangerous passages that … between the towns ... the pillage of many cowboys.  Options were like: lying/have meant - lie/meant - laid/would mean - lay/were meant - are lying/have meant

I'm confused about lay and lie. Please look at these examples:     "Don't lie in the sun for too long."   "The dog was lying dead on the floor."   "She lay back against the pillows."   "I told her a lie about what I was doing."    What are differences between these sentences?


I'm using Ubuntu 14.04. I often use cd .. command in terminal. I want to replace the command with .. or some other shortcut.   Can I do that? If yes, how to do it?

I would like to create an alias to rm command in order to have a confirmation message after executing this command. So I am creating an alias like this alias rm='rm -i'. But as far as I know this is a temporary alias and it lives until you close the terminal.  As it is explained  to save alias permanently I need to execute ~/.bash_aliases or ~/.bashrc commands in terminal and add my alias there. But when I execute ~/.bashrc I get following error message :  bash: /home/bakhtiyor/.bashrc: Permission denied   When I run ~/.bash_aliases I get another error message like this:  bash: /home/bakhtiyor/.bash_aliases: File or directory doesn't exist.   What is the actual problem and how can I solve it?


Description:  I have a desktop that I assembled myself about 1.5 years ago. Recently it has started to freeze occasionally. I haven't noticed a particular application that triggers this to happen. I've had it freeze while just running Chrome and also when I'm multitasking and running Starcraft 2.  Symptoms:  System is completely unresponsive. Mouse won't move and Ctrl+alt+del doesn't do anything. After around 3 minutes, system unfreezes. Audio that was playing at the point when my computer froze is now played back. Eg. I was on a Skype call and the computer froze suddenly, cutting off the audio. When it unfroze a couple minutes later, I heard another 5 seconds of audio from the call that was cut off when the computer froze.  The computer seems to work fine after it unfreezes. No error messages and no critical events in the event log.  Computer components:   Gigabit Z77 motherboard Intel I5-2500K CPU Crucial M4 SSD Sapphire HD6770 video card   Running Windows 7 Pro

I installed Windows 7 in a 3-year-old machine. It installed successfully, took all drivers and running great, but every 5-6 minutes it freezes for a few seconds... 30 seconds to 1 minute, and then it comes back alive.  I checked Event Viewer, but nothing matched the frozen timeline.  I would appreciate any help on how to detect what is causing it, service or hardware.  After it comes alive, everything runs normal. I did run Task Manager and checked CPU usage, at the time it freezes just before and after that no task took more CPU or memory. It was like an idle machine.  There aren't any external USB drives or devices. It is an on-board Intel desktop board with SATA HDD, and the SATA HDD is running in absolute good mode.


I have one class called Square that exetnds a class called Shape. In my main, I instantiating it like this:   Point p1 = new Point(3,3);   Shape s1 = new Square(p1,3);    I am getting the following error when I compile it:  Exception in thread "main" java.lang.NullPointerException at Shape.<init>(Shape.java:19) at Square.<init>(Square.java:18) at mine.main(mine.java:16)   I have one superclass called Shape implemented like this:     abstract class Shape implements Comparable<Shape> {   public Point position;    public Shape(Point p){     position.x  = p.x;      //Line 19     position.y  = p.y;   } }   Point is the following class:   public final class Point {   public double x;   public double y;    // constructor that sets the values of x and y   public Point(double num1, double num2)   {       this.x = num1;     this.y = num2;   } }   Square is the following class:  class Square extends Shape {   private double side; // side is the side length    public Square(Point p0, double side)   {       super(p0);               // Line 18     this.side = side;   }

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?


I have a few vertices selected, obviously in edit mode.  Running bpy.ops.info.select_all(action='INVERT')  in the Python console gives me a RuntimeError: Operator bpy.ops.info.select_all.poll() failed, context is incorrect though ? That's exactly the command the GUI shows me when hovering Select > Invert, and doing it though the GUI works of course.

I keep on getting context errors in the Blender Python API.  I don't understand the issue of the context in the API, how do I know which is the correct context?   Thanks!


i think this is a glitch or something. i bought the Blender Game Asset Creation for my left over money on steam so i cant really get help there so i ask here instead. i am stuck on the Blender: 5.2 UVs - Mirror Modifier video and this always seems to happen when i mirror the traffic cone.  Before adding the modifier:  After adding the modifier:   someone pls help i am a pretty noob in blender and i understand that this might be very easy.

When I add a mirror modifier it sometimes doesn't mirror correctly, giving me an overlapping mesh. How can I fix this?


When I run ls on a folder with directories that have a 777 permission, the ls colors are purple text with a green background, which is unreadable:    What can I do to make this more pleasant to look at?

There are two directories shown by 'ls'.  Normally directories anywhere are blue on black background.  But the first one is blue on green and impossible to read.  Why is this?  How to make it blue on black, or at least something light on something dark?  This is on Ubuntu 12.04, using bash in Gnome Terminal.  In Konsole, the blue is slightly darker, and possible to read, though could be way better.


Using Ubuntu 18. In several applications, Ubuntu appears to be intercepting the Alt key to engage the application's Menu. This interferes with my programming workflow in, say, Spyder. How to disable this behavior? I've google searched without success. I have attempted the following fixes without success:  Disabling all Alt commands in Settings -> Keyboard Using gnome tweak tool, set "Alt/Win key behavior" to "disabled"

How can I stop the Alt key from triggering the menu bar of applications in Ubuntu 19.10?  I know that there are these , , and , as well as  but those solutions are no longer applicable. I did try searching for a similar option to the one in the answer of those questions but with no success.


Let $A$ be a $3\times 4$ and $b$ be $3\times 1$ matrix with integers entries. Suppose that the system $AX=b$ has a complex solution. Prove that the system $AX=b$  has a rational solution and set of all real solution of $AX=0$ has a basis consisting of rationals solutions ?.

Let $A$ be a $3\times 4$ and $b$ be a $3\times 1$ matrix with integer entries.Suppose that the system $Ax=b$ has a complex solution. Then which of the following are true? (CSIR December 2014)         $Ax=b$ has an integer solution.    $Ax=b$ has a rational solution.   The set of real solutions to $Ax=0$ has a basis consisting of rational solutions.   If $b$ is not equal to zero then $A$ has positive rank.      Is it possible to say that 1 and 2 are true as $Ax=b$ has a complex solution? If not  what we have to understand from the statement "the system $Ax=b$ has a complex solution " ? What about 3 and 4  ?


From mathematics:     "Tensors eat vectors and spit out numbers."   Is this an analogy, metaphor or other named figure of speech?

Many a time I've asked what the difference is between an analogy and a metaphor. I've asked it to my teacher, on internet sites, to my parents, so on and so forth. I got a different answer every time, and I never fully grasped what the difference is, so what is the difference?


Prove, disprove, or give a counterexample:      If $\mathcal{P}(A)=\mathcal{P}(B)$, then $A=B$.   Assume $\mathcal{P}(A)=\mathcal{P}(B)$. Since we know $A \subseteq A$, we know $A \in \mathcal{P}(A)$.  Since $\mathcal{P}(A)=\mathcal{P}(B)$, we know that $A \in \mathcal{P}(B)$.  Therefore, $A \subseteq B$ and $A=B$.  Is this proof okay?  Edit: I should note this isn't probability, $\mathcal{P}$ is the power set.

I am really sure that if two sets have the same power set, then they are the same set. I just am wondering how does one exactly go about proving/showing this?  I'm usually wrong, so if anyone can show me an example where this fails, I'd like that too.  The homework just asks for true/false, but I'm wanting to show it if possible. My thoughts are that since the power set is by definition the set of all subsets of a set, if each of the two power sets are identical, we have an identity map between each set, thus it's indistinguishable which power set is a given set's power set. I hope that wasn't verbose. Since a set has only one power set, we can conclude they are in fact the same set.


I started using jQuery validation on this new project I'm working on, and I've been struggling to find a rule to validate if a text input doesn't start "057" or "089" or "093.  I know there is a notEqual rule that matches the whole input value, is there any way I can achieve the same but only for the first 3 characters?

How do you create a simple, custom rule using the jQuery Validate plugin (using ) that doesn't use a regex?  For example, what function would create a rule that validates only if at least one of a group of checkboxes is checked?


I was wondering, if I use an old home machine as a server - how many connections will I be actually able to support. I was able to calculate the connection's capabilities myself as it is quite simple.  30 mbit/s = 3.75 MB/s, with average request size of 150 KB 3750/150 = 25. So theoretically my connection will support 25 requests per second on average.  I am not sure how to do that for the hardware, though. The result will probably be greater than 25 which makes it irrelevant to the situation but I am doing it to learn. As well as there is always the possibility to upgrade my connection.  This is the hardware:  Motherboard  SMBIOS 2.5 present.  Handle 0x0002, DMI type 2, 15 bytes Base Board Information         Manufacturer: BIOSTAR Group         Product Name: G31D-M7         Version:         Serial Number: None         Asset Tag: To Be Filled By O.E.M.         Features:                 Board is a hosting board                 Board is replaceable         Location In Chassis: To Be Filled By O.E.M.         Chassis Handle: 0x0003         Type: Motherboard         Contained Object Handles: 0   Processor     Intel(R) Core(TM)2 Duo CPU     E7500  @ 2.93GHz    Memory  /0/0                        memory      64KiB BIOS /0/4/5                      memory      64KiB L1 cache /0/4/6                      memory      3MiB L2 cache /0/f                        memory      4GiB System Memory /0/f/0                      memory      2GiB DIMM SDRAM Synchronous /0/f/1                      memory      DIMM [empty] /0/f/2                      memory      2GiB DIMM SDRAM Synchronous /0/f/3                      memory      DIMM [empty]   Usage               total       used       free     shared    buffers     cached Mem:          3943        966       2977         77        109        556 -/+ buffers/cache:        299       3644 Swap:            0          0          0   My application executes in 0.023s and uses 225KB of memory on average of 1000 requests.  If any more information is needed I will provide.

This is a  about  Related:      I have a question regarding capacity planning. Can the Server Fault community please help with the following:   What kind of server do I need to handle some number of users? How many users can a server with some specifications handle? Will some server configuration be fast enough for my use case? I'm building a social networking site: what kind of hardware do I need? How much bandwidth do I need for some project? How much bandwidth will some number of users use in some application?


I submitted a paper to arxiv. At first, the status was submitted, then it became on hold for one week and now the status again became submitted. What does this mean?

I have recently submitted a paper to arXiv, but the arXiv moderators put my paper in status "on hold", because they have to make a decision on the right classification for the paper.   To those who have experienced a similar situation, how long did it take before they made a decision and published the paper on the arXiv? I just want to have an idea of how long I will have to wait.


I just installed firefox but it display the following error :  XPCOMGlueLoad error for file /usr/lib/firefox/libmozgtk.so: libwayland-efl.so.1: cannot open shared object file : no such file or directory Couldn't load XPCOM  Is there a way for me to find a package able to fix libwayland-efl.so.1 ? pkgfile doesn't return anything.

I'm looking for a package that provides a specific binary, so I can install it. how can I search to find out what packages provide this binary? (note: I know there's at least one tool that does this, but I have forgotten its name.)


I am having problem finding a group that spans this vector space:  $S={ p(x) \in R_4[x]} \big| p(x)=p(x-1) $  My idea was to substitute: $ a+bx+cx^{2}+dx^{3}+ex^{4}=a+b(x-1)+c(x-1)^{2}+d(x-1)^{3}+e(x-1)^{4}$  But it led me nowhere. what can I do?  Thanks in advance.

I am having a little bit of trouble solving an homework question.  I found that $S={ p(x) \in R_4[x]} \big| p(x)=p(x-1) $ is a vector space.  Now I need to find some set, K that holds ${span(k)=S}$  My idea was to substitute: $ a+bx+cx^{2}+dx^{3}+ex^{4}=a+b(x-1)+c(x-1)^{2}+d(x-1)^{3}+e(x-1)^{4}$  But here I get something that seems a little bit weird, I'd like to look if I have any mistakes that I did not notice. and if I had mistakes, how to make my answer right. I calculated the right side of the equation and I got to  :  $a+b(x-1)+c(x-1)^{2}+d(x-1)^{3}+e(x-1)^{4}=a+bx-b+cx^{2}-2cx+c+dx^{3}-3dx^{2}+3dx-d+ex^{4}-4ex^{3}+6ex^{2}-4ex+e= (a-b+c-d+e)+(b-2c+3d-4e)x+(c-3d+6e)x^{2}+(d-4e)x^{3}+ex^{4}  $  From here, $ (a-b+c-d+e)+(b-2c+3d-4e)x+(c-3d+6e)x^{2}+(d-4e)x^{3}+ex^{4}=a+b(x-1)+c(x-1)^{2}+d(x-1)^{3}+e(x-1)^{4}\Rightarrow $  $(-b+c-d+e)+(-2c+3d-4e)x+(-3d+6e)x^{2}+(d-4e)x^{3}=0+0x+0x^{2}+0x^{3}+0x^{4}$  And the solution to this equation is only whan $a=b=c=d=e=0$.  I think that I am maybe not in the right direction. Do you have any Idea how to find a set $K\Rightarrow span(K)=S$ ?  Thanks in advance.


I have seen a video saying a stationary (from our frame) charge should radiate, because is accelerated, the falling charges are the ones with no acceleration. But he says we cannot test it due some technical challenges, what are those challenges? // Video:

I know that the question of radiation from a gravitationally accelerated charge has been discussed extensively at . Yet the experimental aspect hasn't been touched up on. My question strictly on this topic can appear dumb, yet for a layman like me it appears as a self-evident proposition: why can't it be verified by a test or some observation - whether a freely falling charge radiate photons, how strongly and relative to which frame of reference it does or does not radiate? If it cannot be tested practically, could you please explain why, if possible. Many thanks.


How can i upgrade my existing ubuntu 12.04 to 13.04 using terminal... please help me with the procedure. I am having problem regarding upgrade.

I would like to know how to upgrade from my current version of Ubuntu to the next stable from the Command line interface?


I have started learning python programming language and learning string in python.   i am using following code to find the length of string.  a = "Hello, World!" print(a.len())   but code is not working. I know i am using method len after variable. But why other method works after variable? E.G print(a.lower()) to lower sting, print(a.upper()) to upper string

I know that python has a len() function that is used to determine the size of a string, but I was wondering why it's not a method of the string object.  Update  Ok, I realized I was embarrassingly mistaken. __len__() is actually a method of a string object. It just seems weird to see object oriented code in Python using the len function on string objects. Furthermore, it's also weird to see __len__ as the name instead of just len.


One of our applications is causing a problem in that there is a stored procedure that returns fine in SSMS, in under 1 sec, but in the application its taking anything up to 10 minutes, depending on the parameters used. Any combination of parameters work fine in SSMS and the execution plan looks good to me.   However, when profiled the Application is clearly using a different, less efficient plan. The SqlClient used to connect has the ARITHABORT setting, set to OFF, which when replicated in SSMS I run into the same performance issues.  I'm guessing ARITHABORT OFF will not allow the optimizer to use the cached plan? Or does it run a separate plan?  According to the Apps guys, there is no way to change the SQLClient connection to use ARITHABORT ON  I'm guessing the ARITHABORT setting is a bit of a misnomer here, and it's actually a parameter sniffing thing caused by the optimizer not using the good plan?  I need to force it to use a good plan regardless, so how best to address the issue? Do I create a plan guide or optimize the stored proc in some way?  This is SQL Server 2008R2 SP2.

The query is a single select containing a lot of grouping levels and aggragate operations. With SET ARITHABORT ON is takes less than a second, otherwise it takes several minutes. We have seen this behavior on SQL Server 2000 and 2008.


Im kind of new in Java so I will highly appreciate your help! I am developing an app that allows users to register air crafts information (as many as they need). However, the app needs to assign a random ID to each of the air crafts registered by the user in the following  A-LLLL-NNNN-2018, where:   A is a static value. LLLL is a random series of letters. NNNN is a random series of numbers.    I was thinking of using a random array including the alphabet but I'm not really sure how the to do the string of the ID, Any help will be highly appreciated!  The difference of my questions versus the other questions is that in my case, I need to assign each ID randomly created to the objects I have created and the format has to be specifically as described above.

I've been looking for a simple Java algorithm to generate a pseudo-random alpha-numeric string.  In my situation it would be used as a unique session/key identifier that would "likely" be unique over 500K+ generation (my needs don't really require anything much more sophisticated).    Ideally, I would be able to specify a length depending on my uniqueness needs. For example, a generated string of length 12 might look something like "AEYGF7K0DM1X".


I want the formula to be in one cell, and the result in another cell.  I do not want the answer to populate the cell that contains the formula.

I know that it's possible in Excel to toggle between . I'm required to turn in assignments for a statistics class as a printed Excel sheet showing both the formula and the result. Right now the instructor makes us either copy the formula and paste it as text next to the computed value, or copy the value and paste it next to the formula. This is very inefficient, prone to error (if you change the formula or values after doing the copy-paste), and generally a waste of time.  Is there any way to have Excel show the formula and its value in the same cell? If not, is there any function which will display the formula from a referenced cell as plain text, e.g. =showformula(A1) which would print out =sum(A2:A5)  instead of 25 (if those were the formula and value of cell A1)?  I'm using Excel 2010, but a general answer that works for any recent edition of Excel would be nice.


While searching a particular website or product in Google, sometimes a search box appears under that website in    I've already registered my website in Google Webmaster Tools and properly submitted my sitemap XML file, but this isn't appearing for my site.  I think it is somehow related to Google Custom Search Engine (CSE). How can I get this feature for my website?

Observe the following results for searching the text "dictionary" on Google:    Notice that there is a custom search box at the bottom of the listing for dictionary.reference.com. Is there any documentation floating around that explains the criterion by which Google decides to display such a search box?


I was playing with  the other day and noticed a lack of a five-foot-unit of measurement. There are inches, feet, yards, meters and then fathoms (apparently, six feet). This tool seems fairly old, but the  says it was published in 2006.  At any rate, my question is as follows - when did the five foot square/hex become the standard unit of measurement in Dungeons and Dragons? Or, has it always been that? Call me a sucker for accuracy, but I've considered switching to meters more times than just for AutoREALM measurements.

Perhaps showing my age here, but in "The Good Old Days", 10-foot squares were a standard map size. Each square on the map was 10 feet, and a 10-foot wide corridor was normal.  Now, having started gaming again, it seems 5-foot squares are standard.  So my question is: when did this change happen? Was it 3rd edition?


When I tried usepackage{stix} I got an error .sty not found. Assumed stix was not installed with TeX Live when I downloaded it last year. I use TeX Live 2012 on Windows (Vista) with pdfLaTeX.   So now my first try at installing a font. I got the zip from CTAN and put the resulting "stix" folder in my C:\program files\texlive\texmf-local\ directory. Then basic installation: texhash, updmap, texhash. Still same error, no stix.sty.  I think my install failed. Either the "stix" folder is in the wrong place/format (but I'm the only user+admin on this pc) or updmap --enable Map=stix.map went wrong. Any ideas on how to solve this problem? I would like to at least be able to install a font from CTAN but not spend hours reading expert font/texlive documentation ...

Frequently there are questions about, how to manually install a font, what very often means “Type1 font”. So I thought, we should write a general answer about the several aspects to regard.  Beside the usual approach for  it seems, that for fonts further steps are necessary. What are these steps? Or better:  How to manually install fonts and their associated support files in TeX distributions?


I'm new at Java. I'm studying through Programming Hub app. When i read HeapSort code i find out that method fnSortHeap not return array but main method still can print out it. From informations that i found in main method must be smt like that:      int arr2[];       arr2 = fnSortHeap(arr, i - 1);   and in fnSortHeap method must      return array;   class HeapSort {     public static void main(String a[])     {         int i;         int arr[] = {1, 3, 4, 5, 2};          System.out.println("\nUnsorted Array\n---------------");          for (i = 0; i < arr.length; i++)         {             System.out.print(" " + arr[i]);         }          for (i = arr.length; i > 1; i--)         {             fnSortHeap(arr, i - 1);         }          System.out.println("\n\nSorted array\n---------------");          for (i = 0; i < arr.length; i++)         {             System.out.print(" " + arr[i]);         }     }      public static void fnSortHeap(int array[], int arr_ubound)     {         int i, o;         int lChild, rChild, mChild, root, temp;          root = (arr_ubound - 1) / 2;          for (o = root; o >= 0; o--)         {             for (i = root; i >= 0; i--)             {                 lChild = (2 * i) + 1;                 rChild = (2 * i) + 2;                  if ((lChild <= arr_ubound) && (rChild <= arr_ubound))                 {                     if (array[rChild] >= array[lChild])                         mChild = rChild;                     else                         mChild = lChild;                 }                 else                 {                     if (rChild > arr_ubound)                         mChild = lChild;                     else                         mChild = rChild;                 }                  if (array[i] < array[mChild])                 {                     temp = array[i];                     array[i] = array[mChild];                     array[mChild] = temp;                 }             }         }          temp = array[0];         array[0] = array[arr_ubound];         array[arr_ubound] = temp;         return;     } }

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


My problem is, that even when I use .on, the click event over added div with class added does not triggers. This is my script from page.   $(".added").on("click", function () { alert("halo") });  $("#nextAdress").on("click",function (event) {     event.preventDefault();     $("#trainerRegistrationFields").append('
adsa
'); }   Can you please help me so the click event will trigger also on the dynamically added element with class added?   Tahnk you in advance

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


I think it would be useful if this listed sites I had accounts on first so I can quickly jump between them.  Even better, it could sort them by my rep on each site so that the sites I use the most are at the top.  What is the current sorting method anyway?  Seems random to me.

I am not sure it's the right place to post this as it's common to all Stack Overflow sites. I suggest sorting sites by user reputation and then alphabetically in the all-sites list of the Stack Overflow button.


Can peoples combine arithmetic expansion and brace expansion?  $ for i in {$((1 + 1))..5}; do echo $i; done; {2..5} $ echo "bash laughs at me"

I have the following bash script:  #!/bin/bash  upperlim=10  for i in {0..10} do echo $i done  for i in {0..$upperlim} do echo $i done   The first for loop (without the variable upperlim in the loop control) works fine, but the second for loop (with the variable upperlim in the loop control) does not.  Is there any way that I can modify the second for loop so that it works?  Thanks for your time.


How to get the PropertyName of a class？  For example, How can I get the PropertyName "StudentName" of a Student class instance.  public class Student {     public string StudentName{get;set;} }   Student student = new Student();  //I want to get the PropertyName "StudentName" student.StudentName.GetName();

There has been a lot of sentiment to include a nameof operator in C#. As an example of how this operator would work, nameof(Customer.Name) would return the string "Name".  I have a domain object. And I have to bind it. And I need names of properties as strings then. And I want them to be type-safe.  I remember coming across a workaround in .NET 3.5 which provided the functionality of nameof and involved lambda expressions. However, I have not been able to locate this workaround. Can anyone provide that workaround to me?  I am also interested in a way to implement the functionality of nameof in .NET 2.0 if that is possible.


I have a machine with an Asrock q1900b-itx mobo and I'm experiencing random freezes of the system. By freeze I mean everything hangs and there is absolutely nothing that can be done except reset. I've read lots of threads, which date up to a year ago, about this problem , so this has been going for quite some time. The suggestion I found is to go to the BIOS and set C1 as the max state or to put some "intel_idle.max_cstate=1" line somewhere, which does the same thing.  The problem is that this is not a fix. Disabling CPU features isn't a way to solve problems. I bought this machine for a low power server and disabling power saving features is the last thing I would want to do. If a fix can't be made I suggest that BayTrail CPU's have to be labeled as "Not supported" and I would have to go to Windows, until a proper fix is made.

My system freezes completely at random, frequent intervals. I started to have the same problem in Ubuntu 14.04 but after recent upgrade to 16.04 there is no improvement, in fact it seems worse.  When it happens, it's impossible to do anything. I've tried everything in this thread:  but nothing works, I have to hard reset. I have read all the system logs and journalctl but there is never any information that could help diagnose the problem.  This is a dual-boot system with Windows 10 and there's no problem there, so it's not defective hardware.  My laptop has an Intel Bay Trail processor (Pentium N3540)


I have date strings similar to type of the following format,     7-Dec-16   How can I convert it to the format given below using python??     2016-12-07

I've got a huge list of date-times like this as strings:  Jun 1 2005  1:33PM Aug 28 1999 12:00AM   I'm going to be shoving these back into proper datetime fields in a database so I need to magic them into real datetime objects.   This is going through Django's ORM so I can't use SQL to do the conversion on insert.


I am trying to evaluate the following sum. Here $x\in\mathbb{R^{+}}$. $$f(x)=\sum_{n=1}^{\infty}\frac{(n-1)!}{\prod_{r=1}^{n}(x+r)}$$ At present I do not know how to proceed. Any hints are appreciated. Thanks.

I found the following identity when trying to prove something else: $$\sum\limits_{n=1}^\infty\frac{(n-1)!x}{\prod\limits_{k=1}^n (k+x)}\equiv 1,~ \forall x>0$$ I'm sure there's a name for it (or for a more general identity for which this is a special case). Does anyone know the name?


I'm upgrading the thermostat with a Honeywell wifi one. I found all cables at the thermostat end, but can't figure out where to connect the C wire to the furnace (Rheem REAB 1415J).

So, the spiffy new wi-fi thermostats want power on the C wire from thermostat, but the old thermostat doesn't have a C wire at it.  What's the easiest way to add the C wire/24 volt to the thermostat location?


I need an advice on best practices for DRYing view code. I have three classes (NewsItem, RssItem and BlogItem) in my app, that use separate views, but have similar parts in them. One of the parts is such:  <% if current_user %>    <%= marks_bar(@item) %>   <%= favorite_button(@item, "blog_item") || delete_from_favorite_button(@item, "blog_item") %>   <%= share_button(@item) %>   <% if current_user.is_mine?(@item) %>
<%= link_to "Edit", edit_user_blog_item_path(current_user, @item) %>
   <% end %>  <% end %>   It's almost equal for all three classes, so I decided to take it out to some separate place. And here I am confused: should I use a partial or helper method for it? I know that helpers are used mostly for separating ruby code from HTML, but in this case the helper will look like:  def toolbar_for(item, type_str, edit_path)   if current_user     content_tag(:footer) do |b|       marks_bar(item).to_s <<       (delete_from_favorite_button(item, type_str) || favorite_button(@item, type_str)).to_s <<       share_button(@item).to_s <<       (content_tag(:div) { link_to("Edit", edit_path)} if current_user.is_mine?(@item)).to_s     end   end end   So, there is almost no HTML code here.  Could you please give me advice, what method is better in your opinion and why? Also, are there some performance issues in these methods (for example multiple String concatenation or frequent partial loading might be costly)? (This app is rather high-loaded)

In a rails application, in which situation would you use a partial and when would you use a helper? I find both very similar, since they represent markup fragments.  Is there a convention around this? which is the 'rails way' of using them?  Thanks!


I'm building a website for a friend, and he basically wants to be able to add some youtube videos to his page from time to time.  Trying to keep it simple, and not time consuming, I wanted to simply store the "share video" embed code from youtube.com in the mySql database and simply echo it in the right container using php.  So obviously,  there will be a moment where the embed code is going to be saved in the database using post ( in a session / htaccess password protected admin page )  And there is also a moment where a query will be made to print it in the website document.  MY QUESTION IS : Is this a dangerous practice?  Is there risk of sql failure/injections that could be caused by, let's say the slashes contained in the string ?   example of the saved code :    Thanks a lot Martin

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


I'm a pretty fluent English speaker, but this has been bothering me for a long time... It all started when I saw people, for example, saying Mars' atmosphere, according to my knowledge, the only time you have an apostrophe without an "s" is when said word is plural, so in this case it would be Mars's or not Mars'. Am I correct?   (I'm using the word Mars merely as an example, this applies to other singular words that ends with an "s" as well.)

According to my grammar book, but at variance to the answer to , the correct singular possessive if a word ends in ‑s is:     James’s car   The grammar book allows exceptions for historical nouns, so the examples in the answer to the above-linked question would pass muster.  However, I’m sure that I learnt at school (which, admittedly, was a while ago) that for a singular (proper) noun ending in ‑s, the apostrophe went after the s and there was no additional s.  I don’t wish to start a flame war on which is correct, though my question doesn't really make sense if my grammar book is wrong!  What I’m curious about is when the change occurred.  :  So my question is when did James’s become the correct form and James’ the incorrect one?


Lets say you have tossed a fair coin 100 times. What is the probability that you got at least 10 tails?

Let's say you flip a fair coin 50 times. What is the probability that you get at least 15 heads?   Any hints?


Is there any $n$-dimensional (smooth) manifold $M_{0}$ which has largest symmetry  group, i.e. for any $n$-dimensional manifold $M$, $Sym(M)$ can be embedded in $Sym(M_{0})$? Intuitively, if it exists, I think sphere or whole euclidean space will give answer (because it looks highly symmetric), but I don't know how to show or even such manifold exists.  Is there any known results with more specific conditions? (specific $n$, compact manifold, complex manifold, Riemannian manifold (with isometry group), ...) Thanks in advance.

Given a $n$-dimensional connected Riemannian manifold $(M,g)$, its symmetry group $G$ can be considered as a subbundle of orthonormal frame bundle of $M$ (which I call $F_OM$), yielding: $$\dim G\le \dim F_OM=\dim M +\dim O(n)={n+n(n-1)\over 2}=\frac{n(n+1)}{2}$$ (Here the embedding $\phi:G \hookrightarrow F_OM$ is defined by singling out an arbitrary point $p \in M$ and orthonormal frame $(v_1,...,v_n) \in F_{O,p} M$ and defining $\phi: g \mapsto (gp,g_*v_1,...,g_*v_n)$. However, it takes some work to verify that this map is indeed injective.)  These considerations made me wonder which manifolds have a maximally large symmetry group, i.e. which $M$ do satisfy $\dim G= \frac{n(n+1)}{2}$. Of, course $\Bbb R^n,\Bbb S^n$ and $\Bbb H^n$ have got this property, but are there any other exotic examples?   (Some thoughts of mine on this problem: One can see that $M$ is homogenuous and isotropic. Each stabiliser of a point has to be isomorphic to either $SO(n)$ or $O(n)$. In particular, $M$ has constant curvature, which implies that $M$ has to be one of $\Bbb R^n,\Bbb S^n$ and $\Bbb H^n$ if $M$ is complete and simply-connected.)


Hi guys I am new here.  I am PhD student at the pharmacognosy and started learning/writing in LaTeX two months ago, for practice. Even though I do not have many math formula I gave a latex a chance, because writing in Word is so annoying, it crashes every time after 30 pages. So my question is, from a LaTeX expert perspective, is it good to start slow in LaTeX and in the end write thesis in it, or are there easier ways/better programs to write with?

Which book (free or otherwise) was the most useful to you when you started learning LaTeX?  I am frequently asked this question by friends who want to learn LaTeX, and I recommend the book which got me started, , but I feel that there might be better options around.  Also see .


I am puzzled as to why the  package in R does not allow tuning on the number of trees (ntree) in a random forest (specifically in the  package)? I cant imagine this is an oversight on the part of the package author - so there must be a reason for it? Can anyone shed light?

Software implementations of random forest classifiers have a number of parameters to allow users to fine-tune the algorithm's behavior, including the number of trees $T$ in the forest. Is this a parameter that needs to be tuned, in the same way as $m$, the number of features to try at each split (what Leo Breiman calls mtry)?


Is there a way to output an animation or video file in gif format from blender?  If not, what about VSE? Or can I record a screen inside blender?  Thanks a lot.

I need to save an animation as an animated GIF.  Can this be done from Blender? cheers.


I am planning to perform a Categorical Principal Component Analysis, I have 14 variables with categorical ordinal data (from a 5 point likert scale) and one variable with categorical nominal data. What optimal scaling level should I use?

I have a dataset that has both continuous and categorical data. I am analyzing by using PCA and am wondering if it is fine to include the categorical variables as a part of the analysis. My understanding is that PCA can only be applied to continuous variables. Is that correct? If it cannot be used for categorical data, what alternatives exist for their analysis?


On your user profile page there are six (6) tabs; stats, activity, reputation, favorites, prefs and accounts.  I would like to see in a new tab, maybe named 50 latest viewed questions, which would contain the 50 latest viewed questions.  This would help when I want to follow a question but don't want to bookmark it or add it to my favorites list.   Sometimes, or a few hours later, I can't even find it again. I think this would be good for when you're viewing questions at work and want to check it up at home but can't because it's not in the same browser history.

I'd like to see a list of questions that I've recently viewed. This might go on the user page (but only for the user - not for all to see).   This would be different from favorites, as it would only be recently viewed. This would not be redundant with browser history, as it would persist across computers (so I can see at home what I was looking at from work). This would not be redundant with recent activity, since I may not have had any activity on a question I recently viewed.   Any takers?  Perhaps show recently viewed questions where the Related links currently are, and slide everything else down?


How to change files CREATION time? I tried to use 'touch' command but it changes only the last modified time - it does not change the first date - creation date. (After checking by 'stat' it still shows me the original file creation date)  Is there any option to do this?  thanks in advance

Is it touch(1) from coreutils-8.4-37.el6.x86_64 or my brain which is broken?  $ touch abc $ LANG=C stat abc   File: `abc'   Size: 0               Blocks: 0          IO Block: 4096   regular empty file Device: fd04h/64772d    Inode: 10485773    Links: 1 Access: (0664/-rw-rw-r--)  Uid: (3060399/ nodakai)   Gid: (  418/   quant) Access: 2016-10-14 18:42:06.189751847 +0800 Modify: 2016-10-14 18:42:06.189751847 +0800 Change: 2016-10-14 18:42:06.189751847 +0800 $ touch -a abc $ LANG=C stat abc   File: `abc'   Size: 0               Blocks: 0          IO Block: 4096   regular empty file Device: fd04h/64772d    Inode: 10485773    Links: 1 Access: (0664/-rw-rw-r--)  Uid: (3060399/ nodakai)   Gid: (  418/   quant) Access: 2016-10-14 18:42:17.374235446 +0800 Modify: 2016-10-14 18:42:06.189751847 +0800 Change: 2016-10-14 18:42:17.374235446 +0800 $ touch --help | grep 'access time'   -a                     change only the access time   As you see, it was not only atime but also ctime which was updated by touch -a !?!?  The filesystem is ext4 over LVM if that makes any differences.


How can I prove that:  $\dim(M_1\vec{\oplus}M_2\vec{\oplus}\ldots\vec{\oplus}M_n) = \dim(M_1) + \dim(M_2) + \ldots + \dim(M_m)$  Where $M_i\lt L,\forall i\in\{1,\ldots,n\}$, and $\vec{\oplus}$ is the direct sum.

$V = U_1\oplus U_2~\oplus~...~ \oplus~ U_n~(\dim V < ∞)$ $\implies \dim V = \dim U_1 + \dim U_2 + ... + \dim U_n.$ [Using the result if $B_i$ is a basis of $U_i$ then $\cup_{i=1}^n B_i$ is a basis of $V$]  Then it suffices to show $U_i\cap U_j-\{0\}=\emptyset$ for $i\ne j.$ If not, let $v\in U_i\cap U_j-\{0\}.$ Then \begin{align*} v=&0\,(\in U_1)+0\,(\in U_2)\,+\ldots+0\,(\in U_{i-1})+v\,(\in U_{i})+0\,(\in U_{i+1})+\ldots\\ & +\,0\,(\in U_j)+\ldots+0\,(\in U_{n})\\ =&0\,(\in U_1)+0\,(\in U_2)+\ldots+0\,(\in U_i)+\ldots+0\,(\in U_{j-1})+\,v(\in U_{j})\\ & +\,0\,(\in U_{j+1})+\ldots+0\,(\in U_{n}). \end{align*} Hence $v$ fails to have a unique linear sum of elements of $U_i's.$ Hence etc ...  Am I right?


Im running a debian linux VPS server with a garrysmod server. Today I've recieved a ddos attack and I could log by using tshark the next:  4.213248 91.204.63.5 -> 176.58.101.xx UDP Source port: 28960 Destination pot: 28915 4.213252 194.146.132.110 -> 176.58.101.xx UDP Source port: 28960 Destinationport: 28915 4.213257 217.65.3.29 -> 176.58.101.xx UDP Source port: 28960 Destination pot: 28915 4.213261 208.167.240.68 -> 176.58.101.xx UDP Source port: 28960 Destination ort: 28915 4.213266 94.141.160.17 -> 176.58.101.xx QUAKE3 Connectionless Server to Clien 4.213270 83.217.192.242 -> 176.58.101.xx UDP Source port: 28960 Destination ort: 28915 4.213275 188.134.31.51 -> 176.58.101.xx UDP Source port: 28967 Destination prt: 28915 4.216109 208.167.xx4.111 -> 176.58.101.xx UDP Source port: 28960 Destinationport: 28915 4.216125 66.55.149.202 -> 176.58.101.xx UDP Source port: 28960 Destination prt: 28915 4.216133 208.167.xx4.27 -> 176.58.101.xx UDP Source port: 28960 Destination ort 4.216176 85.21.79.xx -> 176.58.101.xx UDP Source port: 28960 Destination pot: 28915 4.216183 208.167.xx4.127 -> 176.58.101.xx UDP Source port: 28960 Destinationport: 28915 4.216190 94.229.34.11 -> 176.58.101.xx UDP Source port: 28960 Destination pot: 28915 4.216197 91.203.178.84 -> 176.58.101.xx QUAKE3 Connectionless Server to Client   I just figured out that some packets have Quake3 protocol or kind of, that is strange since im not hosting any quake server. My question is, can I use iptables to filter the incoming packets that have that Quake3 conectionless procotol? if so how?

My VPS is under a DDoS attack.  I cannot access RDP, and I cannot take it offline, or access it in any way at all.  What can I do?  They are not trying to bruteforce, just trying to stop access to the VPS.  I don't know if maybe the datacenter messed up or something, but the VPS is online and denying all requests as is normal when under DDoS.  Is there anything that I or my dedicated hosting provider can look at in the logs?  How should I approach forensics after the fact?  I don't know much about DDoS attacks, do they usually stop after a few days?  Is there an existing anti-ddos program or something?


I have been using Beta versions of iOS 13.  Now even after iOS 13 public release is made, My device is still showing iOS 13.1 public beta 4 in the Software update.  What do I need to get the public release ?  Note* You may wonder why I need the public release, I just want to make sure how it behaves in the public version, since some of my apps is facing few UI issues in iOS 13 beta versions.

I have to use a backup of my iPhone but iTunes says that is not compatible with  the beta distribution. So I need to downgrade to iOS 8.0.2 but it seems not possible.   Any Idea?  Now I'm downloading it (iOS 8.0.2) manually and I'll try to replace manually.


Basically, I'm tasked to study the electrical properties of different screws (all in an unspecified titanium alloy, some fully anodized, others only the head) based on previous measurements that estimated the resistance around 0.15 Ohm for the one shown below.  I wanted to try a few different methods the see what was the resistance in DC, before moving on AC where i will study the impedance in function of frequency. In DC, the way I was considering doing the measurements is linked below.  I've tried different configurations. I'm not using crocodile clip, because the wires have a higher impedance, and they don't stay put. So, I'm using twisted wires and "pinch grips".  The results are more stable (around 235 mOhms) than my first try with a 2 point measurement, there is no more significant wild fluctuation. However, I get very similar resistance value for configuration 1 and 2. Why is that? Also, when I try to include the head of the screw in the measurement, the values get really weird. Is it because it is anodized, or am I just doing something wrong?  I know the way I'm doing things is not optimal, so what could I improve, or which method should I use in order to obtain precise measurements?  Thank you for helping me !  the link:

I'm trying to measure the resistance of a surgical screw that seems to have a low resistance, around maybe one ohm. I use a 1908P multimeter and wires having for resistance around 0.005 ohm.  Since the screw resistance is a small value, I've tried the 4 points measurement method. I get something around 0.3 ohm, but the value changes very easily depending on the orientation of the wires (see below). It goes from 0.3 to 70 ohms.     I'm wondering if it's either my circuit that is wired wrong, the screw because of its properties or if its the lack of precision of the multimeter( it a 5.5 digits) that causes that fluctuation.  Any idea of how I can improve this measurement?


$$\sum_{k=1}^{\infty} \frac{k}{2^k}$$   I know that $\sum_{k=1}^{\infty} \frac{1}{2^k}=1$ so the answer is $\frac{k(k+1)}{2}*1$?  the answer is 2

How can I evaluate $$\sum_{n=1}^\infty\frac{2n}{3^{n+1}}$$? I know the answer thanks to , but I'm more concerned with how I can derive that answer. It cites tests to prove that it is convergent, but my class has never learned these before. So I feel that there must be a simpler method.  In general, how can I evaluate $$\sum_{n=0}^\infty (n+1)x^n?$$


I have a lot of directories. Each one of these has a file with a specific extension .ext.  I want to rename these files.  Example:  // Note: The names are random, can have spaces and special characters  Parent  |  |- First Directory  |   |  |   |- Some file.txt  |   |- Another one.pdf  |   `- The one to rename.ext  |  |- Second Directory  |   |  |   |- Some file.txt  |   |- Another one.pdf  |   `- The one to rename.ext […]   I want to rename all the file with the .ext extension to new name.ext2. There is only one file with the .ext per directory, so no problem with that.  What I have done so far is:  find ./Parent -name "*.ext" -exec mv "{}" "{}.ext2" \;   And I get a bunch of The one to rename.ext.ext2, I am stuck about renaming them new name.ext2. If I just set it as the second argument of mv, it will move them into the Parent directory, and thus, each call to the mvfunction will overwrite the previous moved file.  Note: I couldn't make it work using the -exec bash -c '' argument. I tried something along the lines of:  find ./Parent -name "*.ext" -exec bash -c 'mv {} "$(dirname {})/new name.ext2"' \;   But I get some issue with the $() being expanded before {}

I'm using this command to rename files:  for fname in *; do     mv "$fname" $(echo "$fname" | sha1sum | cut -f1 -d' ') done   But it only renames in the current directory. Let's say I have many directories, and each directory contains some other directories, and last directory tree contains files. I want to rename them with random characters.  I think find . -type f should work, and have tried it, but still did not get any working command.


Why the adjacency matrix can be used to determine whether or not the graph is connected.  I saw it from the wikipedia.

What do you think is the most efficient algorithm for checking whether a graph represented by an adjacency matrix is connected? In my case I'm also given the weights of each edge.   There is another question very similar to mine:   That answer seems to be good, except I don't really understand it. How does repeatedly squaring the matrix give information about its connectivity? There is another an answer that claims eigenvectors also give information about the connectivity of the graph, could anyone explain that as well?   I'm asking this because I don't have the background to understand the answers given, I'm just solving a problem that has to do with these topics. Searching around on google didn't give me an answer either, so hopefully someone can clear it up.


A lot of questions about this have unsatisfying answers that either argues how unsafe RSA is when $p=q$ or points out that $\phi(n) \neq (p-1)(q-1)$ for $p=q$.  However, I'd like to know why the RSA fails, i.e why the Decipher $R$ is not equal to the Message $M$ when $p=q$, regardless of safety concerns and assuming the public and private keys are just blindly computed in modulo $(p-1)(q-1)$.

I was curious what's to happen when $p = q$ for $N=pq$ in RSA scheme.  First I realize that one can easily find out $p$ and $q$ by taking a square root of $n$.  However, it appears to me that under $\pmod{N}$ where $p = q$, one cannot reliably retrieve the original message via $m^d$ where $m$ denotes an encrypted message and $d$ denotes the decryption key. Can someone explain why?  Thank you.


I understand that the continuum hypothesis implies (since there are only two infinities; discrete and continuous) that the set of points on an n-dimensional plane is equal to (can be bijected to) the points on a 1 dimensional line. Is there a proof of this for a space of arbitrary dimensionality?

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


If we have a conductor which is in electrostatic equilibrium, then the charge distribution over this surface $\sigma$ is greatest at the sharp edges of that surface.  Why is this the case?  I want both the proof of this result and the intuition behind it.

I learned about the coronal discharge, and the common explanation is because the electric field is strong where radius of curvature is small. But I haven't found anything yet that explains why electrons like to crowd at the peaks, and escape from the holes. My intuition suggests electrons try to distribute on the surface as uniform as they can, but they don't. Why?


i'm building a website to convert PSD files to PNG and i have two options to choose a domain:   convert-psdtopng.com convertpsdpng.com   I need the word convert to be there too.  Which one do you think is better to rank on "convert psd to png" keyword?  Thanks!

Both in terms of SEO and user friendliness, is it better to put hyphens in a multi-words domain name or not ?  For example, is www.stackoverflow.com better than www.stack-overflow.com ?


I have the following array inside a program:    ... #code   $packages = [      'git',        # version control      ...     'iftop',      # monitor network usage by ip     'iotop',      # monitor io usage   ]   ... #more code   I want to use awk to print lines from the first occurrence of $packages to the first ending ], after the occurrence of $packages.  How can I do this?

How can I select first occurrence between two patterns including them. Preferably using sed or awk.  I have:  text something P1 something content1 content2 something P2 something text something P1 something content3 content4 something P2 something text   I want the first occurrence of the lines between P1 and P2 (including P1 line and P2 line):  something P1 something content1 content2 something P2 something


If $f$ and $g$ are continuous on an interval $[a,b]$ and $g$ is nonnegative, show that there is a number $\xi \in (a,b)$ such that $$\int_a^b f(x)g(x) \; dx = f(\xi) \int_a^b g(x) \; dx.$$  I understand the proof for the case when $\xi \in[a,b],$ however, I'm not sure how to proceed when $\xi \in(a,b).$

For $f \in C[a,b], g\ge0$ (or $g\le0$) on $[a,b]$, then there exists $c\in(a,b)$ $\int _a^b f(x)g(x)dx = f(c)\int_a^bg(x)dx$.   It is MVT for integral.  Why $c \in (a,b)$ ? How about $c\in[a,b]$? Is it wrong?  I am wondering this because, in proving progress,   by IVT, there exist $m,M$ s.t $m\le f(x)\le M$   so $m\int_a^bg(x)dx$ $\le$ $\int_a^b f(x)g(x)dx$ $\le$ $M\int_a^bg(x)dx$.  when $\int_a^bg(x)dx>0$ then $m\le$ $\frac{\int_a^b f(x)g(x)dx} {\int_a^bg(x)dx}$   $\le$  $M$ and   $\frac{\int_a^b f(x)g(x)dx} {\int_a^bg(x)dx}$ becomes $f(c)$, so it seems $c\in [a,b]$ might work.  So, I want to know why $c\in(a,b)$, or $c\in[a,b] $ would be okay.