I want to know how to shut down my laptop automatically after completion of certain task. I know how to do that settings in control panel but i just want my laptop to shutdown automatically after completing the task. Tasks for eg. download in progress, file copying, watching movie etc..  The setting in control panel never ask for the completion of the task. That just shuts down after certain interval of time.

Can anyone suggest a way of asking Windows to shut down after it has finished doing something? For example it would be handy sometimes if burning a DVD or copying a lot of files to be able to set it off at the end of the day and just say "hey Windows, when you've finished doing this, shut down."  At the moment the best alternative I've found is to use a commandline shutdown and guess at a time but particularly with things like file operations windows can make it a trifle difficult to predict how long they will take so you have to be very conservative in your guesswork and probably leave the computer running for much longer than necessary in most cases or risk the job not being finished.


I'd like to lock my Mac, that is, require a password before any input.   This is normal.   What's different, though, is that I'd like to be able to show the exact same output as if the screen was not locked.   Let's say, for a trivial example, that I was watching a the output of a long-running process.   If I could do this, I could then lock the mac, but still be able to see the output. If I wanted to do anything other than watch the output, though, I'd need to unlock the Mac.   Note: I have done some cursory research on this.   But it's pretty hard to find this in a search engine.   Even on the StackExchange, most of the questions are about how to lock the screen without putting the Mac to sleep or activating a screen saver:         For those sorts of things, control+⌘+Q works just fine. I'm asking about something different.   Update: Looks like this guy asked something similar:    And the best Invisible Screen Saver for multiple monitors is Transparent by Monkey Bread Software.     Now I just need to find out how to lock the screen and go to that screensaver in one stroke.

On my iMac, I keep a lot of supervision windows (displaying alarms and trends). These windows lead to priviledged access to very sensitive equipments. I would like to protect this iMac from any accidental typing on the keyboard or mouse mouve, and password protect it from any other local access.  I would like to be able to start my screen saver (which will lock my mouse and keyboard by asking my password), but to keep a full acces to the actual display.  Is there any way to make a transparent locked screen?


I have simple requirement to insert number of Accounts. Now what I noticed to call the following I have to pass SOQL which is irrelevant since there will be no use of the result of this query  Please suggest how can I call batch apex without passing SOQL.  Database.executeBatch(new BatchAccountsProcess('Select id from Account limit 1'));   global class BatchAccountsProcess .... {    global BatchAccountsProcess(String qryStr)  {      Query = qryStr;  }    global Database.QueryLocator start(Database.BatchableContext BC)  {      return Database.getQueryLocator(query);  }  global void execute(Database.BatchableContext BC,List<sObject> scope)  {        for(integer iAcc = 0 ;iAcc < 5000 ; iAcc++) {         Account accObj =  new Account(name='Arijit_batch_'+iAcc);         lstAccount.add(accObj);     }                Database.insert(lstAccount);   }   }

I had one batch class in which i am passing some data required for creating object record.But when i call that batch class from parent class variables are initialized but start method are not called as there is no record to query i also tried with iterable object but not able to do that.My code is as below  global class testBatchClass implements Database.Batchable<SObject>,Database.Stateful{     public List<sObject> sObjectList;     public string objectName;     public String dataList;      public testBatchClass(String objectName,String inputdata){          String listType = 'List<'+objectName+'>';         system.debug('list type value is'+listType);         List<SObject> castRecords = (List<SObject>)Type.forName(listType).newInstance();         this.sObjectList = castRecords;         this.objectName = objectName;         this.dataList = inputdata;      }     global Iterable<SObject> start(Database.BatchableContext batchableContext) {         return new sObjectList{};     }     global void execute(Database.BatchableContext batchableContext, List<sobject> scope){          List<OpportunityRenewal__mdt> mdtList = new List<OpportunityRenewal__mdt>([Select id,Api_Name_of_Fields__c,Sobject_Name__c from TestFileUploadCustomSetting1__mdt where Sobject_Name__c=:objectName]);         List<String> fieldName = new List<String>();         for(OpportunityRenewal__mdt md : mdtList){             if(md.Sobject_Name__c == objectName){                 fieldName = md.Api_Name_of_Fields__c.Split(',');                 break;             }         }         List<String> dataRowsSplit= dataList.split(',');         dataRowsSplit.remove(0);         for(String eachRow: dataRowsSplit){             List<String> splitString = eachRow.Split(',');             sObject sobj = Schema.getGlobalDescribe().get(objectName).newSObject();             for(Integer i=0; i <= splitString.Size(); i++){                 sobj.put(fieldName[i],splitString[i]);             }             scope.add(sobj);         }         if(scope != Null && scope.Size() > 0){             upsert scope;         }     }      global void finish(Database.BatchableContext batchableContext) {} }   Thanks


I want to run a for loop where its initialiser and condition are based on the values of an integer array. for eg:-  int[] array = [0,5,8,12..]      for(initialiser = array[0], condition < array[1], initialiser++)     {         //program condition is satisfied.         break;     }  in the first looop initialiser is array[0] and condition is array[1] in the second loop initialiser is array[1] and condition is array[2] and so on array lenght is not fixed.So far i am unable to make it work efficiently. This is what is have tried.             int idx = 0;             foreach (int id in oId)             {                 if (id != oId.Last())                 {                     for (int k = 1; k < oCnt; k++)                     {                         for (int j = id; j < oId[k]; j++)                         {                             //Logic condition is satisfied vId is an array here                         }                     }                     r[idx++] = vId[0];                 }                 if (id == oId.Last())                 {                     for (int j = oId.Last(); j < totalLength; j++)                     {                         //Logic condition is satisfied vId is an array here                     }                     r[idx++] = vId[0];                 }             }

If I have an IEnumerable like:  string[] items = new string[] { "a", "b", "c", "d" };   I would like to loop thru all the pairs of consecutive items (sliding window of size 2). Which would be   ("a","b"), ("b", "c"), ("c", "d")   My solution was is this       public static IEnumerable<Pair<T, T>> Pairs(IEnumerable<T> enumerable) {         IEnumerator<T> e = enumerable.GetEnumerator(); e.MoveNext();         T current = e.Current;         while ( e.MoveNext() ) {             T next = e.Current;             yield return new Pair<T, T>(current, next);             current = next;         }     }   // used like this :  foreach (Pair<String,String> pair in IterTools<String>.Pairs(items)) {     System.Out.PrintLine("{0}, {1}", pair.First, pair.Second)  }   When I wrote this code, I wondered if there are already functions in the .NET framework that do the same thing and do it not just for pairs but for any size tuples.  IMHO there should be a nice way to do this kind of sliding window operations.  I use C# 2.0 and I can imagine that with C# 3.0 (w/ LINQ) there are more (and nicer) ways to do this, but I'm primarily interested in C# 2.0 solutions. Though, I will also appreciate C# 3.0 solutions.


We have a peculiar problem, for which we have many questions, but cannot seem to find satisfactory answers (we did find a few ideas as to what to do, but we are not very certain they apply to our problem). If you find any of the following questions to have already been answered, and those answers should apply to my problem, then a pointer in the right direction would be very much appreciated.   First some info about the data. Different models (that work differently) are feed the same data from which the models produce a numeric value for each input. These numbers become our (scale variable) data. We would like to use these values to show with some statistical certainty that different models produce different (or not) results. For this we planned on using the Wilcoxon signed rank test or the Sign test (depending on the distribution of differences; the related samples t-test is not really an option, because the differences are never normally distributed).   The problem becomes the sample size that we use. In total each model produces 12million values. We have read that big samples tend to lead to significant differences between groups even though there might not be one (the samples mentioned however, were always much smaller). Legacy dialogs tests in SPSS confirm this by returning the sig. of 0.0 followed by 35 more 0 (which is as far as we can tell the most decimal places one can get out of SPSS) for all the combinations of models (even though some look somewhat similar from their descriptive statistics and histograms). What further confuses us is the use of Wilcoxon sign rank test in the "new" dialog, where sig. value for all the pairs of data equals 1.0 (even for models that are clearly very very different). We cannot find a suitable reason for such differences between what should be, as we understand it, the same test (we do realize that a different functions are been called in the background (NPAR TESTS and NPTESTS), we are not however aware how this would cause such drastic differences; the fact that sig. values alternate between 0 and 1 makes us think that something is very wrong (let us just add here that Sign test returns sig. 0.00 in the "new" dialog as well).  So, to sum up we are interested to know:    is there any point in even using tests like Wilcoxon signed rank test or the Sign test on sample sizes this big? could some other method me used instead (or should we just use descriptive statistics)? and what causes the differences in the test results for the same test in different dialogues?   Finally we would like to mention that we are not competent statisticians (or mathematicians) so we would ask you to be tolerant if we have made a mess of things ;). We would be happy to provide any more information. Any help would be appreciated.  Edit  Apparently the best solution to our problem would be to use the effect size. We chose to expand on the original post rather than ask a new question, because the circumstances are connected (although maybe that would be a better option).  Anyway our current plan is to first do a Friedman test to show there are differences between models, followed by the Wilcoxon and Sign tests and report that sig. is smaller than $\frac{0.01}{Bonfferoni\hspace{2mm}correction}$ (and kind of gloss over the fact that as far as SPSS is concerned it's complete 0) - is it viable to use different tests for Post-hoc testing (Wilcoxon and Sign tests) or would it be more appropriate to just use Sign tests?. After that we will calculate the effect size. We are considering using the $r = \frac{z}{\sqrt{N}}$ calculation as suggested . We believe this formula can also be applied to the Sign test, but we are not certain? Would it then be reasonable to also add ? Basically what we are asking is if this sequence of tasks is reasonable and viable.  Thanks to everybody for the previous and future help ;).

In a  of Amstat News, the authors (Mark van der Laan and Sherri Rose) stated that "We know that for large enough sample sizes, every study—including ones in which the null hypothesis of no effect is true — will declare a statistically significant effect.".  Well, I for one didn't know that. Is this true? Does it mean that hypothesis testing is worthless for large data sets?


I'm having files like given below I want to validate my file if first line is having "ZZ=" and third record is having only "XXX"  If this pattern doesnt match am rejecting file.    File example  ZZ=101 OO XXX 111111111111 222222222222  00000000000 AAAAAAAAAAAA   valid file example   ZZ=101 OO XXX 111111111111 222222222222  00000000000 AAAAAAAAAAAA   Not valid file   ZZ=101 OO XSS  (should be rejected except XXX) 111111111111 222222222222  00000000000 AAAAAAAAAAAA   Not valid file   HH=101 (should be rejected except ZZ=) OO XXX  (should be rejected except XXX) 111111111111 222222222222  00000000000 AAAAAAAAAAAA   Is there any way I could use regex to match this pattern?  Any suggestions please..  Thanks !!

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


I'm looking for a word that means not being upfront about your intentions in the beginning of your stated goals. Emphasis on the word stated, a goal has to be explicitly stated. It should be an adjective. Below are example sentences.  Richard Nixon passed laws and policies against drugs, but he was _____ in his public appearances, as he failed to disclose he wanted to target the anti-war hippies against the Vietnam war and also black people.   Theresa May claimed that the Investigative Powers Act would prevent and tackle serious crime and organized crime, but she was being ____ as the amount of government departments with access to data was excessive and people could be subpoenaed without there being suspicion of a crime.   In Kyle's attempts to seduce Kathy to be his girlfriend, he decided to be ______ in his seduction attempts by going to the after school computer club and playing multiplayer flash games with her on a pally level.  The words disingenuous, secretive and deceitful isn't suitable. Secretive isn't suitable because to use it in the example sentences above, it would imply that the person (or speaker) already had a preconceived intention that they kept a secret while implementing new plans, when it's more likely that someone other than them who would change the spirit of the law, procedure or rules. Deceitful isn't suitable because to gain something from deception, whether financial or not, it is fraud, and no fraud is going on. Disingenous is too broad a word with too much scope than my desired word is for, also it's not about pretending to know less than you actually do, but instead doing more in future then you say you're going to do.

For example: A situation needs both Fact A and Fact B to be explained, but a person accepts Fact A and rejects Fact B, misconstruing the situation?     Do you think this is just ignorance or deliberate _____?


I have a macro to hide a few columns that shows additional information however i can't get it to unhide the same data. I know it's simple I am just really unfamiliar with Macros. Any help would be awesome! Here is the Macro I use to hide the columns.    Sub Unhide() ' ' Unhide Macro '  '     Columns("C:K").Select     Range("C2").Activate     Selection.EntireColumn.Hidden = False End Sub   I also use this Macro   Sub Hide_E() Dim LastRow As Long, c As Range Application.EnableEvents = False LastRow = Cells(Cells.Rows.Count, "E").End(xlUp).Row On Error Resume Next For Each c In Range("E1:E" & LastRow)    If c.Value = "N/A" Then         c.EntireRow.Hidden = True     ElseIf c.Value = 1 Then         c.EntireRow.Hidden = False     End If Next On Error GoTo 0 Application.EnableEvents = True End Sub   Would it be possible to add a similar code to unhide the rows I hid?   Thank you so much!!

I have an excel file that has dynamic data that changes daily. For example, a user will populate data on the data tab and the percentages are calculated using an "if Command" if there isnt any data N/A is populated in the cell. (screenshot)  I'd like to add a macro that will hide any rows that contain cells with N/A This is what I am using and I either delete the rows or it hides all rows. Depending on the value I set.  "N" removes all rows N/A doesn't do anything. I have checked other examples but i couldnt get any others to work.   Thank you in advance!   Sub HideRows() BeginRow = 9 EndRow = 50 ChkCol = 20  For RowCnt = BeginRow To EndRow If Cells(RowCnt, ChkCol).Value = "N/A" Then Cells(RowCnt, ChkCol).EntireRow.Hidden = True Else Cells(RowCnt, ChkCol).EntireRow.Hidden = False End If Next RowCnt End Sub


A subset of autistic users  that they are not always able to use the pronouns that another user requests.  The problem  The current Code of Conduct is clear on this matter: Using stated pronouns is . The users in question report that this is unfortunately impossible for them.  It is  to consistently and inconspicuously use gender-neutral language, but that may not always be possible for these users: natural and inconspicuous writing correlates poorly with rigidity of language! It can also easily come off as hostile to trans users, and even at best shows less respect than using appropriate pronouns.  I am asking about users who wish to show respect to trans and non-binary users, and therefore to comply with the Code of Conduct, but who are currently unable to do so.  How does the problem work?  What situations does this apply to?   Using different pronouns for different people, as opposed to the same pronoun for everyone? Changing a previously assumed pronoun (from username, avatar, previous knowledge of the person before transition, etc.)? Using pronouns outside a closed set (e.g. able to use "he" or "she" but not "they", or "they" but not "zie")?   How does the difficulty work? Understanding this may be helpful in coming up with solutions.   What are its causes? What worsens or alleviates it? Is it a difficulty perceiving users as their stated gender, or using language that expresses this perception?   What would make it easier for these users?  What can the StackExchange software, user-supplied software, or human editors do to help these autistic users use the correct pronouns?  For example, would some macro like %possessive@JaneDoe (that reads JaneDoe's profile and expands to "hers") help? Or a user script that, before posting, highlights every personal pronouns so that the writer can fix them manually?

Over the past week we've been busy reviewing our previous FAQ to directly address concerns over pronoun usage. We tried to anticipate likely questions, but… missed the mark a bit. Inspired by the Community's excellent curated one, we created a new combined FAQ and, after running it by the moderator team, we're happy to officially release it. Check it out in its new question:   We know some of you may still have questions or additional clarification on some points. We're happy to further improve the wording of either questions or answers or add answers to new questions. This post here is the place to talk through that. For ease of voting and responding, please limit each answer to one specific concern.  However, note that debating the core of the new rule ("please use stated pronouns") or the validity of people's identities or gender expressions is off-topic for this post, and we won't be entertaining those debates at this point and posts that aren't questions or requests for clarification may be deleted.  Please also note that the FAQ is very long as it is but the questions in it represent a broad spectrum of questions we've seen repeatedly over the last weeks. It doesn't cover many edge cases as an FAQ is not meant to cover/address every edge case that may come up - trying to preemptively legislate for everything hypothetically is a bad practice. Some of the bridges we will have to cross when we get to them, and the Community Management team will work with Moderators to deal with those as they come.  So, with all that said... Here's the place to post your requests for clarification/new questions.


Am planning to make a resume in pages. I want some of the sub headings to come in between lines. I have attached the image which I want to add in my document.Can somebody please help me?    I am able to get a line below the word summary picture below,

How can I make something that looks like this?  --------   Text   ---------  where the horizontal rules extend to the margin on either side?


I'm running Ubuntu 18.04. I haven't done much to it besides installed Google Chrome, git and sublime text 3.  Multiple apps sometimes become frozen after use. Why?  For example, sometimes after using Firefox (59.0.2) just fine for a while it will suddenly only display the page I'm on with a  cursor. Any action attempts (e.g. scrolling, link clicks, highlighting etc.) have no effect. Can't even close the app.  I don't know what brings this behavior about on Firefox but I can consistently repare it on Sublime Text 3 (3143) by launching the app then giving it a CTRL+O command. Game over.  Any ideas?   has great ideas for an infrequent issue that one could live with. But this is happening many times per day to me, making 18.04 almost unusable. So I need an actual fix. The ideas in that link do not permanently fix my issue.  Here's my hardware: Dell Inspiron, 8GB memory, Intel Core i7-3612QM CPU @ 2.10GHz x 8, Intel Ivybridge Mobile graphics

All operating systems freeze sometimes, and Ubuntu is no exception. What should I do to regain control when...   just one program stops responding? nothing at all responds to mouse clicks or key presses? the mouse stops moving entirely? I have an    In what order should I try various solutions before deciding to pull the power plug?  What should I do when starting up Ubuntu fails?  Is there a diagnostic procedure I can follow?


My Mac Pro keyboard was working fine few minutes ago, but some keys are typing in shift mode now. What should I do to fix it?  I thought of restarting the laptop but suddenly realised I wont be able to log in.  A-Z in non-caps mode appear like:  aBCdefghijklMNopqrstuVwXyZ

This is an attempt to write a canonical QA for this issue, as per the Meta post:   I expect it to be periodically edited with the goal of becoming a comprehensive information resource.  I have a MacBook Pro that has a key(Shift, Return,   Command, P, etc.) that doesn’t respond when pressed or is stuck in the down position.    It's possible that my favorite beverage was spilled (or some other liquid damage).  It's also possible that I have no idea what happened.  It was working yesterday and suddenly today it's no longer working.  Is there any way to bypass or remap the key?  Can I  have the system ignore it completely?  (This question can also apply to external USB keyboards or the Bluetooth keyboards)


How can I proof this:     Show that no application $f: \mathbb{R}^2 \rightarrow \mathbb{R}$, of $C^k$ class, $k \geq 1$ can be injective, i.e., there are $A,B \in \mathbb{R}^2$ such that $A \neq B$ and $f(A) = f(B)$ (Hint: show that given $(a,b) \in \mathbb{R}^2$ in every open neighbourhood of $(a,b)$ there are points $(c,d),(c_1,d_1)$ where ${\partial}_1f(c,d) \neq 0$ or ${\partial}_1f(c_1,d_1) \neq 0$).   The problem is that I have no idea how to use the hint.  Thanks for all your comments.

I am getting bored waiting for the train so I'm thinking whether there can exist a $C^1$ injective map between $\mathbb{R}^2$ and $\mathbb{R}$. It seems to me that the answer is no but I can't find a proof or a counterexample... Can you help me?


i managed to install Xubuntu 16.04 on a inspiron 1012. After almost 2 weeks of struggle with the black screen problem i finally got to get it going. My PCI ID is 14e4:4315  Everything is fine, everything works, buuut: When i try to enable monitor mode i get   Error for wireless request "Set Mode" 8B06  I´ve read in other post that this is cause by the "wl" "b43" driver problem.  Im pretty new to Linux, so im just looking to get the driver change done.

I'm having serious problems installing the Broadcom drivers for Ubuntu. It worked perfectly on my previous version, but now, it is impossible.   What are the steps to install Broadcom wireless drivers for a BCM43xx card?  I'm a user with no advance knowledge in Linux, so I would need clear explanations on how to make, compile, etc.    lspci -vnn | grep Network showed:   Broadcom Corporation BCM4322 802.11a/b/g/n Wireless LAN Controller [14e4:432b]      iwconfig showed:  lo        no wireless extensions. eth0      no wireless extensions.   NOTE: Answer below is updated every time new information is added and confirmed working.


The reference manual  gives all supported options by command. Unfortunately, there is no description about the conventions used.                 ¹           ² \setuphead [...,...] [..,..=..,..] ¹ SECTION     OPT ² frontpartlabel    =  name   ...   expansion         =  yes NO xml   ...   sectionstarter    =  COMMAND PROCESSOR->COMMAND   ...   sectionsegments   =  NUMBER NUMBER:NUMBER NUMBER:* NUMBER:all SECTION SECTION:SECTION SECTION:* SECTION:all   ...   referenceprefix   =  + - TEXT   ...   incrementnumber   =  YES no list empty   ...   page              =  inherits \page   ...   hang              =  line broad fit NONE NUMBER   ...   command           =   \...##1##2   ...   Furthermore, we don't know anything about the options. What are these options for? How to use these options?  The notation is partially presented in  (c.f. page 10, page 117) but the complexity of the notation (often unknown) makes the exploitation very hard.  How to understand (know) ConTeXt commands?

Where would be a good place to start learning ConTeXt if you haven't got a lot of experience under your belt yet? Any place online or in a bookstore is welcome, provided that the reading is well-structured, well-written and beginner-friendly.  I know there is quite a heap of "official documentation", including "ConTeXt, an excursion", the official handbook and the contextgarden.net Wiki.   Still, often ConTeXt novices find it very difficult to get a good start with the documentation provided -- the command syntax seems to work sometimes, sometimes not; some commands work well with each other, others only in a specific order (which isn't documented anywhere) and some don't work with each other at all etc. The consequence is that there is a lot of experimenting with the code while the focus should be on the topic to be published itself.  This question would love to get RTFM answers, so please point out any Ms which should TF be R.


If $$f(x)=\frac{4^x}{4^x+2}$$      Calculate,      $$f\bigg(\frac{1}{1997}\bigg)+f\bigg(\frac{2}{1997}\bigg)+f\bigg(\frac{3}{1997}\bigg)\ldots  f\bigg(\frac{1996}{1997}\bigg)$$   My Attempt:  I was not able to generalise the expression or get a solid pattern, so I started with smaller numbers and calculated,  $$f\bigg(\frac{1}{2}\bigg)=\frac{1}{2}$$  $$f\bigg(\frac{1}{3}\bigg)+f\bigg(\frac{2}{3}\bigg)=1$$  $$f\bigg(\frac{1}{4}\bigg)+f\bigg(\frac{2}{4}\bigg)+f\bigg(\frac{3}{4}\bigg)=\frac{3}{2}$$  I could see that,  $$f\bigg(\frac{1}{n}\bigg)+f\bigg(\frac{2}{n}\bigg)+f\bigg(\frac{3}{n}\bigg)\ldots  f\bigg(\frac{n-1}{n}\bigg)=\frac{n-1}{2}$$  So,  $$f\bigg(\frac{1}{1997}\bigg)+f\bigg(\frac{2}{1997}\bigg)+f\bigg(\frac{3}{1997}\bigg)\ldots  f\bigg(\frac{1996}{1997}\bigg)=998$$  which is indeed the right answer. But I am not satisfied with my method. How else can I solve it?

$f(x)=\frac{2}{2+4^x}$  find $f(\frac{1}{2014})+f(\frac{2}{2014})+.....+f(\frac{2013}{2014})$  Please guide me through it, the only step I know is probably to eliminate the denominator ps. Not a homework


I was wondering: are the Winter Bash hats a temporary thing that disappears after some time, or are they here to stay and can we use them whenever we like?   Edit: If the hats disappear after a couple of weeks, will the hats we earn let's say in 2018 be available in 2019 or are we gonna start with a completely new set of hats from scratch?

I was wondering if the hats that I gained during this period will remain or I have them only during Christmas.  If it has an end, when does Winter Bash and hats period ends?


Suppose $A$ is an $n\times n$, symmetric, positive definite matrix, i.e. $(Ax,x) > 0$ for all $0 \neq x \in \mathbb{R}^{n}$ and $A^{T} = A$. Propose the following norm, called the "A"-norm, by $$ \|x||_{A} := (Ax,x)^{1/2}.$$ Trivially, this satisfies nonnegativity of the norm as well as scalar multiplication. How may it be shown that the triangle inequality, i.e. $\|x+y\|_{A} \leqslant \|x\|_{A} + \|y\|_{A}$, is also satisfied?

We define a symmetric, positive-definite matrix $A$ to be one such that $A = A^T$ and for $x \neq 0$, $x^TAx > 0$.  If we have a norm $\|x\|_A = \sqrt{x^TAx}$, how can we show the triangle inequality?    That is, we want to show that $\|x + y\|_A \leq \|x\|_A + \|y\|_A$ as is the case for typical matrix norms.    $\|x+y\|_A^2 = (x+y)^TA(x+y) = (x^T + y^T)A(x+y) = x^TAx + x^TAy + y^TAx + y^TAy = \|x\|_A^2 + x^TAy + y^TAx + \|y\|_A^2$.    This is what I have so far, but I feel like I'm not really on the right track.  Ideas?


i'm trying to prove the next problem, and I wanted to know if my answer is correct. Problem: Let $(\Omega,\mathcal{F},\mu)$ be a $\sigma$-finite measurable space. If $f\in L^p$ for all $p\in [1,\infty)$, show that $$\|f\|_{\infty} \leq \liminf_{p\to \infty}\|f\|_p.$$ Solution: Suppose $0<\mu (\Omega)\leq \infty$. Let $0\leq M\leq\|f\|_{\infty}$, and $A=\{x\in \omega:|f(x)|>M\}$, then $\mu (A)>0$ and $\liminf_{p\to \infty} \mu(A)^{1/p}=1$. Then, $$\liminf_{p\to \infty} \|f\|_p \geq M \liminf_{p\to \infty} \mu(A)^{1/p}=M,$$ for all $M\in [0,\|f\|_{\infty})$. Hence, $\|f\|_{\infty}\leq \liminf_{p\to \infty}\|f\|_p$.

Let $(X,B,\mu)$ be a complete measure space,Show that $$\lim _{q \rightarrow \infty}\|f\|_{q}=\|f\|_{\infty}, \quad \forall f \in \bigcup_{p} \bigcap_{p \leqslant q<\infty} L^{q}$$ So,$\lim _{q \rightarrow \infty}\|f\|_{q}$ , $\|f\|_{\infty}$ are equal-norm with space $ L^{\infty} \cap\left(\bigcup_{p} \bigcap_{p \leqslant q} L^{q}\right)$. Case 1: $m(X)<\infty $.It's easy to prove that. Case 2: $m(X)=\infty $. I have no idea about it,And I started to doubt the correctness of this conclusion. Can somebody give me a hint for this problem or just give an example to prove that this is a wrong conclusion when $m(X)=\infty $. Thanks in advance.


Suppose a smooth tunnel is dug along a straight line joining two points on the surface of the earth and a particle is dropped from rest at its one end. Assume that mass of earth is uniformly distributed over its volume. Prove that the acceleration of the particle will be proportional to its distance from midpoint of the tunnel.  I have tried to find velocity using  energy conservation and then differentiate to get acceleration.But I am not getting it right.  Any help is appreciated.

Special mention to the  that kicked this off:  Anyway, the host points out that a tunnel that connects a pair of points on the earth's surface can be thought of as a gravity train - where the force of gravity along the tunnel allows an object to fall through it and emerge on the other side. Any force perpendicular to the tunnel (in case the tunnel doesn't pass through the center of the earth) is ignored.   I worked it out and the equation is $a = -\frac{4}{3}\pi\rho G d$, where $d$ is the distance from the center of the tunnel and $\rho$ is the density of the earth.   Clearly, it is simple harmonic and therefore the period is constant and has no dependence on which two points were used to make the tunnel.   Does anyone have an intuition for why this should be the case? I imagine some Gauss' law type of argument should work here, but I cannot see it.  EDIT: More to the point, why even when the tunnel does not pass through the center, one obtains the same period. Is there any deeper explanation as to why this should be the case?


I assume implication is the operator that is most of the times used in mathematics, am I right? (i.e. whenever if/then construct is used)  If yes, then I think it is known that it has some   Merely that implication is true if premise is false. Which doesn't make sense in real world because I could say: if pigs can fly, then we can cure any illness. But this is not true in the way we understand if/then in real life, isn't it? Because we can't cure any illness so far.  So my question is more philosophical in nature, if we agree that mathematics is using an operator implication which is problematic from philosophical point of view and doesn't very well align with the real world meaning of if/then, then doesn't this cause problems for mathematics when we try to apply some results of mathematics to real world? More particularly because the operator (implication) that was used in math may not be the one that reflects the one in real life? This means we can't use some results from math which relied on implication, in real life?

I studied propositional logic, and everyday I see applications of what I learned on the internet, in mathematical books and miscelaneous resources.        One particular case is sentences in the form $a \rightarrow b$ , that is, material implications. While I fully understand the mathematical logic approach to the study of those kinds of formulas, sometimes I get confused about what someone ( using implication sentences in the ordinary language ) is trying to say.        In ordinary language, I often see affirmations in the form of an implication.  One example would be someone affirming that "the moon is made of cheese" $\rightarrow 2+2=4$. [ Kleene, Mathematical Logic ].      I perfectly understand that if we choose the interpretation that gives the antecedent as false ( and the consequent as true ) we get that the whole implication is also true, but I would like to understand EXACTLY what he is trying to say when he AFFIRMS a sentence in the form of an implication. Is he saying that under the commonly agreed interpretation of that sentence ( antecedent = false, consequent = true ), that implication becomes true?      Another example, totally different, would be someone affirming that $x \in \mathbb{N} \rightarrow x \in \mathbb{N}$ or $x \in \mathbb{Z}_{<0}$. Is he now affirming the same kind of sentence or saying something totally different?      When he affirms that sentence, is he saying that he finds the sentence to be a tautology?   Why didn't he say that?          Then, with these two examples we have an affirmation of the same kind of sentence (implication) meaning completely different things, in one case he affirms to say that under the commonly agreed interpretation of the sentence, it is true. In another case, he affirms to say that there's no interpretation that makes the sentence false.       Am I missing something? There is really that ambiguity in ordinary language, when people are affirming sentences?  Can't I just take some general instance of the affirmation of a sentence in the form $a \rightarrow b$ in ordinary language and know exactly what he's trying to say, regardless of the propositions he chooses the substitute $a$ and $b$ for?       Thanks a bunch.


Is there a way to take a process substitution like <(grep foo some/file), and save it to a "file-like entity" on disk (reminiscent of a fifo), so that, every time this thing was opened for reading by some process P, the grep foo some/file command (or whatever) would get run anew, and the output returned as the content being read by the process P?

Is there any way to create a virtual file, such that reading from the file actually reads from the stdout of a command; writing to the file is acually writing to the stdin of a command?  So far I have kludged this with an inotifywait on a file, which calls a command when the file is modified, taking it's input from the file and writing back to it.  I don't like that the inotifywait has to be constantly restarted though (and I have to ensure that it is always running). I only use this file perhaps twice a week.


I am a relatively new Ubuntu user having been using 16.04 on an ancient HP laptop.  I have now been bought a new Lenovo "Idea Centre" by my wife but would like to at least have Ubuntu installed as dual boot (initall) however I hae read some horror stories about issues with 17.10 and Lenovo pc's being irredeemably screwed up when Ubuntu is installed as a dual boot.  Has this issue been fixed ?  Am I safe to install 18.?? on my new Lenovo ?

I have a device on which I would like to install Ubuntu. How do I find out if Ubuntu will work on it?


I have bought a couple of games on steam for my kids. Everything worked great until I bought another computer for them. So now I have 2 computers for them to use. I thought that login om same account they could use both computer as long as they not played the same game. That didn't work. So I created another steam account and used familysharing to share the games between the two computers. That did not work either!! As soon as one computer used ANY game on the "library" the other computer could not play anything.. what the heck! How am I supposed to let my children play som games from steam without buying multiple copies of every game??!! I found something about creating multiple libraries. But for that I need to partition the hdd for each library which would contain only one game each.  Can that be an option? If I create multiple libraries will they all be locked while sharing to another computer? Please help me. Many people (parents) must have this problem?? Should I create a new steam account for each game?? Thanks!

I thought the whole point of Family Sharing was so that multiple copies of the game didn't have to be bought. I have no problem downloading the game, but instead of "Play", my only option once it's downloaded is "Buy". Am I missing something?


Calculate $\int \tan(x)dx$, $\int \tan^2(x)dx$. Give a formula to $\int \tan^n(x)dx$ in terms of $\int \tan^{n-2}(x)dx$. Use this to calculate $\int \tan^4(x)dx$, $\int \tan^5(x)dx$  I have calculated the first two integrals:  $$\int \tan(x)dx = \log(|\cos(x)|) + C$$ $$\int \tan^2(x)dx = \tan(x) -x + C$$ where $C\in \Bbb R$. But I can't see the relationship between them to obtain the formula. Could you give any hint?  Thanks in advance.

Reduction formula for  $$I_n = \int \tan^n x dx$$     Let $u(x) = \tan^{n-2} x \qquad \qquad v^{'}(x) = \tan^2 x$   Integrating by parts  $$I_n = (\tan x - x)(\tan^{n-2} x) - \int (\tan(x) - x)(n-2)(\tan^{n - 3} x + \tan^{n- 1} x) dx \tag{0}$$  Let the second integral be $J$,  After expanding and simplifying I get,  $$J = (n-2)I_{n-2} + (n-2)I_n - (n-2)\int x\tan^{n-3} x + x\tan^{n-1} dx \tag{1}$$  Let $w(x) = \tan^n x \qquad \qquad z^{'}(x) = 1$  Integrating $I_n$ again by parts,  $$I_n = x\tan^n x - n\int x\tan^{n+1} x  + x\tan^{n-1} x dx$$  For $I_{n-2}$,  $$(n-2)\int x\tan^{n-3} x + x\tan^{n-1} dx = x\tan^{n-2} x - I_{n-2}$$  Substituting this in $(1)$  $$J = I_{n-2}(n-1) + I_n(n-2) - x\tan^{n-2} x $$  Substituting this in $(0)$,   we get,  $$I_{n} = {\tan^{n-1} x \over n-1} - I_{n-2}$$.  Is this correct ? I know the final answer is correct but is the method correct ? looks a bit circular to me.


I am trying to do some chrome console coding to implement a calendar in javascript, but I am facing a very basic problem.     a = new Date(2017, 9, 9); // Mon Oct 09 2017 00:00:00 GMT+0530 (IST) b = new Date(2017, 9, 9); // Mon Oct 09 2017 00:00:00 GMT+0530 (IST) console.log(a == b);     But they are not equating:  a == b  false   It has to be some stupid mistake I am making but can't seem to find out, Any help please??

A strict equality operator will tell you if two object types are equal. However, is there a way to tell if two objects are equal, much like the hash code value in Java?  Stack Overflow question  is similar to this question, but requires a more academic answer. The scenario above demonstrates why it would be necessary to have one, and I'm wondering if there is any equivalent solution.


Give three reasons why $D_{12}$ and $S_{4}$ are not isomorphic. More precisely, prove that $D_{12}$  and every group isomorphic to it satisfy three properties that $S_{4}$ does not satisfy. So I have proved that $D_{12}$ has an element of order $12$ and that $S_{4}$ does not. I am hoping to prove that there are a different number of elements of one order than in the other group but I don't know what else to do because neither are cyclic or abelian and the groups both have the same order. Please help

Why $S_4$ is not isomorphic to $D_{12}$? where $S_4$ is symmetric group and $D_{12}$ is dihedral group of order $12$.here number of element are same $S_4$ has $4!=24$ elements and $D_{12}$ has also $2n$ means $12(2)=24$ elements. but i can't find that property which holds in one of this group but another doesn't has that property.please help me thanks in advance.


Find the value of the following (if it exists):     $$\lim_{n\to\infty}n\sin(2\pi en!)$$   Does it exist? I think that it doesn't exist but I can't prove it. Please help me.

I tried and got this   $$e=\sum_{k=0}^\infty\frac{1}{k!}=\lim_{n\to\infty}\sum_{k=0}^n\frac{1}{k!}$$ $$n!\sum_{k=0}^n\frac{1}{k!}=\frac{n!}{0!}+\frac{n!}{1!}+\cdots+\frac{n!}{n!}=m$$ where $m$ is an integer. $$\lim_{n\to\infty}n\sin(2\pi en!)=\lim_{n\to\infty}n\sin\left(2\pi n!\sum_{k=0}^n\frac{1}{k!}\right)=\lim_{n\to\infty}n\sin(2\pi m)=\lim_{n\to\infty}n\cdot0=0$$  Is it correct?


I spent a bit of time aligning my hat, but every time I glanced at the top bar it looked off, well either way, it seems to be a pixel or so off to the right.

I carefully positioned my hat to fit my head just right:     But it seems to be shifted to the left a few pixels elsewhere (same in Firefox and Chrome):   Stack Overfow   Skeptics   The top bar is also affected on some sites:   Stack Overfow   Meta SE   InfoSec   However, it is in the correct position in the top bar on some sites somehow:   Skeptics   Bricks   It's not a huge deal of course, it just bothers perfectionists like me.


How to integrate $\displaystyle \int\frac{x}{1+x^3}dx$? I tried using partial fractions and substitution but it didn't work, thanks.

I'm new here!  The problem: integrate from zero to infinity x over the quantity x cubed plus one dx. I checked on wolfram alpha and the answer is that the indefinite integral is this:  $$\int \frac{x}{1+x^3} dx = \frac{1}{6}\left(\log(x^2-x+1)-2 \log(x+1)+2 \sqrt{3} \arctan((2 x-1)/\sqrt{3})\right)+\text{constant}$$  and the definite integral is this:  $$\int_0^\infty \frac{x}{1+x^3} dx = \frac{2 \pi}{3 \sqrt{3}}\approx 1.2092$$  I am trying to figure out all the steps in between. I see that there are logs, which are equivalent to the ln variant that i am more familiar with, which means it was integrating $1/x$ at some point; I also see an inverse tangent in there.  I started with long division to simplify and I got (which could be wrong because I am very tired right now) $x/(x^3+1) = x^2+ 1/(x^3+1)$ which seems to be a step in the right direction. Wolfram Alpha thinks I definitely did that step wrong. The two equations do not evaluate as equal.  Then I cheated and took the wolfram alpha factorization of $(x^3+1) = (x+1)(x^2-x+1)$...I probably should have known that but didn't offhand. Now it is looking like $x^2$ plus the partial fraction decomposition $1/(x^3+1) = A/(x+1)+(Bx+C)/(x^2-x+1)$. Am I heading in the right direction with this? At this point do I just plug in and crunch?


I'm create the class  public class MarkerAttribute : Attribute {  }   and set this attribute in MyTestClass  [Marker] public class MyTestsClass {  }   How can I receive the names of all classes which have this attribute in my project?  Thank you.

Question based on .  Let's say we have some C# classes with HelpAttribute in standalone desktop application. Is it possible to enumerate all classes with such attribute? Does it make sense to recognize classes this way? Custom attribute would be used to list possible menu options, selecting item will bring to screen instance of such class. Number of classes/items will grow slowly, but this way we can avoid enumerating them all elsewhere, I think.


I'm working as a programmer for about 20 years and invested a lot of time into understanding programming and computers before earning money with it.  I've learned to program Java, use Windows, then Python, Linux. Now I'm a Devops learning Docker and Keycloak ... what I mean to say is: I've picked up a pretty pile of tech but TeX, well ... this always remained a love-hate relationship.  I've made a couple attempts at differents flavours of TeX in the past and was never really happy with the whole thing. In the last month I was using Pandoc over a Docker container, which generates PDF from a Markdown document. I generate the Markdown file from my own Python program. This is fine. I just needed to nudge the default theme and I almost got everything that I wanted.  My problem is: I know I don't master the TeX behind it. How do I learn TeX (or LuaTeX or whatever) so I really am in control?  I want to know about what the nitty-gritty details are. I want to know what consequences are of choosing this flavour of TeX and choosing that package etc.   How do I learn this? What is the starting point to get on that path?  Update: I've read (or at least skimmed over) many tutorials. Some of my recurring problem about those:   Many tutorials aim to teach you how to write a scientific paper in the end (which I'm not really interested in). Many times the tutorials are old and I'm uncertain if the information is still relevant (just as an example), let's say if I already know I'll be using LuaTeX/LuaLaTeX.   My goal is: I want to know about the today relevant foundations of TeX. About the architecture of it. What the limits of which parts are. I want to be able to make an informed decision about which part of TeX is going to be good about tackling what kind of problem.

I know that there are a already number of questions on this site about good instructional (La)TeX materials for users at different levels.  What I am interested in, though, is what set of documents will give me (in which reading order) as complete an understanding as possible of TeX and LaTeX. If one would like to know all, why bother with "intros" anyway ;-)  I was gonna write that for TeX the best first document (and, in the sense described above, technically the only necessary one) should be "The TeXbook", but then there's e-TeX, which is not covered. And I don't know to what extent there is other, hidden advanced knowledge one can only learn only from various advanced tutorials or from looking at the source code.  Let's, for simplicity, assume that I am excluding knowledge about LaTeX packages from this question. For those, the best way is to read the package documentation. One should skim the package documentation of certain frequently used packages (those one is using) anyways.  Once one has an understanding of (e-)TeX, I have the same question for LaTeX 2e.  One reason for asking this question is that I never cease to be amazed at what gems of obscure tricks there exist. There's gotta be a way of acquiring this knowledge in a most efficient way other than by "reading around randomly and perusing the source code".


Why does this cause the error?  if (extras != null) {     if (extras.getString("ActionBar") != null) {         if (extras.getString("ActionBar").equals("NO")) {             if (bar != null) bar.setDisplayHomeAsUpEnabled(false);         }     } }   I check to make sure that it is not null first.

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?


How can I share my Wireless Internet with an existing local network?   I don't want to create new Wireless Network Connection 2 using this command:  netsh wlan set hostednetwork mode=MODE ssid=SSID key=KEY keyusage=KEYUSAGE    Currently I use this:   Open Network Connections by clicking the Start button, clicking Control Panel, clicking Network and Internet, clicking Network and Sharing Center, and then clicking Manage network connections. Right-click the connection that you want to share, and then click Properties. Administrator permission is required. If you are prompted for an administrator password or confirmation, type the password or provide confirmation. Click the Sharing tab, and then select the Allow other network users to connect through this computer’s Internet connection check box.   That is a lot of clicks. Using the command line can speed up this process. But I don't know how to do it by command line.  In Windows XP, a user can use   netsh routing ip autodhcp install netsh routing ip autodhcp set interface name="Local Area Connection" mode=enable netsh routing ip autodhcp set global 192.168.0.1 255.255.255.0 11520   but in Windows 7 command netsh routing does not exist.

I can do it manually by right-clicking on a network connection, opening the Sharing tab and clicking on the "Allow other network users to connect through this computer's Internet connection" check box.  Now I need to automate this task. Is there a command-line tool or a Powershell cmdlet to accomplish this?


In D&D 5e, the last part of the Sentinel feat contains this text:  When a creature within 5 feet of you makes an attack against a target other than you (and that target doesn't have this feat), you can use your reaction to make a melee weapon attack against the attacking creature   Thematically, why shouldn't you get the opportunity attack if the target has Sentinel? I can't think of any flavor/narrative reasons why your ally having an ability would prevent you from using your own ability.  If that clause was included strictly to prohibit combos among fellow sentinels, is there an official source that says as much?   EDIT: This is not a duplicate. The linked answer only clarifies that Sentinel says what it says. It does not say why, nor give any sources that describe the reason for this design decision.

The third bullet of the sentinel feat text reads:     When a creature makes an attack   against a target other than you (and that target doesn't   have this feat), you can use your reaction to make a   melee weapon attack against the attacking creature.   This reads to me as saying if both I and the target of the original attack have sentinel, then I can't take the reaction attack.  Is this correct?  If so, does anyone have insight into why?  I could maybe understand if the text is actually in error and meant to say "and the attacking creature doesn't have this feat," but it pretty clearly doesn't actually say that.


Consider two vectors $V_1$ and $V_2$ in $\mathbb{R}^3$. When we take their dot product we get a real number. How is that number related to the vectors? Is there any way we can visualize it?

I know how to calculate the dot product of two vectors alright. However, it is not clear to me what, exactly, does the dot product represent.  The product of two numbers, $2$ and $3$, we say that it is $2$ added to itself $3$ times or something like that.  But when it comes to vectors $\vec{a} \cdot \vec{b}$, I'm not sure what to say. "It is $\vec{a}$ added to itself $\vec{b}$ times" which doesn't make much sense to me.


There is an ISTQB certificate for model-based testing, but I cannot understand what it is studying and who will need it?

I just attended a webinar for Tricentis and their Tosca tool which looks promising.    How can this be applied to the real world? Would this tool replace manual testing?    What does Model Based testing really mean?


Since my understanding of rational number says that it can expressed as fraction of 2 integers.  $Q = \frac{p}{q}$ where, $p,q$ belongs I  What I don't understand is how does PI fail to qualify these conditions?  Since, $\pi$ is an angle and   $\theta = \frac{circumference}{radius}$  So does $\pi$ could be expressed in same terms and we can always make a circle with integral circumference and radius and find the value of $\pi$.  Thus, $\pi$ should be a rational number. What am I missing?

$\pi$ can be represented as $C/D$, and $C/D$ is a fraction, and the definition of an irrational number is that it cannot be represented as a fraction.   Then why is $\pi$ an irrational number?


While I can get the right answer for these problems by memorizing how to do it, I want to understand it conceptually.  There is a (massless) pulley with a rope through it. A person sits (in a bucket/chair/box) and pulls down on the other end of the rope to lift herself up. The question is how much force she needs to pull down with to lift herself at constant velocity.  From practice, I know the answer is half the force of her weight. This is because the pulling force is equal to the tension. When she pulls on the rope, it creates tension throughout the rope. The tension pulls her up on both sides, so the total upward force is twice the tension (2T). Then, you subtract her weight (mg) from the upward force to get 2T - mg. Since velocity is constant, acceleration = 0, so according to Newton’s Second Law the net force is 0. Thus, you set the equation to 0 and solve to get T = mg/2. I do understand why the answer ends up being half the weight, and why the tension pulls on both ends of the rope. (I’ve clarified the question to focus on what I’m actually confused about.)  My question is, why is the tension equal to the pulling force applied by the person? If an object hangs from a rope, the tension in the rope is equal to that object’s weight. The person is, after all, hanging from the rope as she pulls it. So as she pulls herself up, why does the tension only equal her pulling force, and not include her weight? Doesn’t the person’s weight strain the rope more?   I would really appreciate any and all help. Thank you.

If the spring in Figure A is stretched a distance d, how far will the spring in Figure B stretch? The spring constants are the same.  The answer is "by half". I don't get it, to me it's the same.


Today I asked this question:   After I got 3 good answers and many comments, my question was closed as a duplicate of this one:    But that question has no answers, just comments. Is this a valid closure?  Also, why did my question receive a score of -5 and the linked question got a score of +5, even both are similar and discussing the same subject? Is there any problem with my question?  (Note: I just want to get a better idea about Stack Overflow. That's why I'm asking for an explanation)

When we flag/vote-to-close a question as a duplicate on Stack Overflow, and that potential duplicate doesn't have any upvoted or accepted answers, we are alerted that we can't use that question as a duplicate and can't continue. This same check does however not seem to apply to Meta questions. Why not?


Will I be given an option to upgrade to Ubuntu 14.04.1 from 14.04 when I bootup from a cd or usb drive? Or do I need to do a complete new install?  Thank you.

There are so called "point releases" for LTS versions of Ubuntu. 10.04.3 for instance.  What are those "point releases" releases?


I have a list [1, 2, 3, 4, 5, 6] and I want to write a for loop to get an output that looks like this: [1,2], [3,4], [5,6]  Most answers that I found online end up giving [1,2], [2,3], [3,4], [4,5], [5,6], but that is not what I want. I did try options such as: s = [0,0,0,1,1,2,1,3]  for value in zip(s, s[2:]):     print(value)  but that did not help.

I have a list of arbitrary length, and I need to split it up into equal size chunks and operate on it. There are some obvious ways to do this, like keeping a counter and two lists, and when the second list fills up, add it to the first list and empty the second list for the next round of data, but this is potentially extremely expensive.  I was wondering if anyone had a good solution to this for lists of any length, e.g. using generators.  I was looking for something useful in itertools but I couldn't find anything obviously useful. Might've missed it, though.  Related question:


I need to remove city names 5 characters or less from cities list:  The below code works, but I feel the code is too long and there should be another method I can use to cut down the length of the code.  cities = ["New York", "Shanghai", "Munich", "Tokyo", "Dubai", "Mexico  City", "São Paulo", "Hyderabad"] count = 0 loop = 0  print("City List:",cities)  for x in range(len(cities)):     if len(cities[x]) <= 5:         cities[x] = 'small'  for x in range(len(cities)):     if cities[x] == 'small':         count += 1  while loop < count:     for x in cities:         if x == 'small':             cities.remove(x)             loop += 1  print("Filtered:",cities)

I would want to do something like:  >>> lst = [1, 2, 3, 4, 5] >>> lst.find(lambda x: x % 2 == 0) 2 >>> lst.findall(lambda x: x % 2 == 0) [2, 4]   Is there anything nearing such behavior in Python's standard libraries?  I know it's very easy to roll-your-own here, but I'm looking for a more standard way.


I often observed that whenever I click the picture of my laptop display I get the following pattern there  This pattern looks like one side of hyperbola. This is not visible to naked eyes. If I capture the video of the screen it appears to be these hyperbola are moving in certain direction. What is the reason for this phenomenon? Why they are invisible to naked eye? I am sure that this is something to do with the wave nature of light.

I am not entirely sure this is an appropriate question for PSE, however since many of you have such diverse backgrounds, I'll give it a shot.  I have noticed that when one takes a picture of a computer, TV screen with a phone, you can "see" what looks like a saddle phase portrait.     Why does this happen? Does it have any relevance to differential equations or other areas of math?


I asked this in another question as if it was an answer so as to use a bit of that questions popularity and possibly get some clarifications on this but I also prefer to make a question of my own, so here goes a copy, in case you haven't read it...  What if... gravity and magnetism are actually one and the same? I'm just pondering here basing on an assumption and a few observations, so please, bear with me...  Actually this idea of mine started after watching a video of "Veritassium" and another one of "Minute Physics"( they are linked to each other at the end of the video) on youtube explaining about magnets and then it kept on developing on it's own in my mind...  When they started talking about magnets in the atomic level, talking about protons, eletrons and neutrons, how magnetism works differently on the micro-scale to our scale, and remembering another video (which I don't actually remember who recorded it or which youtube channel) that talked about ferromagnetic, diamagnetic and paramagnetic objects and a frog that they made levitate with a strong enough magnetic field, that got me thinking...  If electrons and protons have their own magnetic field and everything is made of electrons, protons and neutrons, and everything in our scale(size) and the macro-scale(planets, stars, etc) is made out of atoms... wouldn't magnetism also work differently in the macro-scale? Also, couldn't gravity be the accumulated magnetic force of all that? And magnets in our scale, could they actually be way stronger on a non-gravitational environment like space, as in, actually being "weaker" here on earth? I know there are ferromagnetic, diamagnetic and paramagnetic matter and that should cause alteration when talking about gravity or mass if it were the case but, wouldn't such a MASSIVE magnetic force, or even magnetic wave as the core and the planet or star is also spinning REALLY fast, beat that? also, after seeing this video yesterday:   That got me thinking about the planets and moons locked around a star or planet and why they don't simply "fall" towards each other... and a black whole would be a really tiny accumulated volume of super dense matter, right? Spinning at an ASTOUNDING speed which would make it's magnetic field... stronger? Like, SUPER strong...  Is that possible? I don't actually have a degree in anything but I have a 145 IQ and always had ease of learning and good observational skills when it comes to physics, so, it sounded pretty good to me... I've been thinking of ways to try and see if that is a reality or just a figment of my imagination, but sounds pretty logical and solid...  Hope someone here is able to test it or give me some clarifications concerning it.  And if you do test it and end up make a breakthrough, at least quote my name or this message... would make it a bit easier for me to find a job as I'm unemployed for about a year, now ç.ç I don't care much about money or fame, but not having any of them makes life quite hard on you ç.ç ahushauhsuaha  Gabriel Canongia |Random Brazilian Guy

Recently, I  was pondering over the thought that is most of the elementary particles have intrinsic magnetism, then can gravity be just a weaker form of electromagnetic attraction? But decided the idea was silly.    But I then googled it and found  article. Is this idea really compatible with other theories as the article mentions? Is there any chance of this proposition being true?


When performing some testing, I noticed that after installing Avast and checking in both my "Run" registry key and my "Startup" folder that a startup entry wasn't present in either location. Taking this into account, in which location do the majority of anti-virus programs locate themselves so that they will automatically start at OS boot time?

I have Acer Aspire One A521 with brand new SSD disk, on which I've just installed brand new Windows 7 HE 64. After installing system I installed all drivers, including Conexant audio driver. Starting from that moment, after each system restart I see Windows prompt asking me, if I really want to run application C:\Program Files\CONEXANT\cAudioFilterAgent\cAudioFilterAgent64.exe.  Situation like that is quite normal to me, and I always use some "startup scanner" to find such software and purge system out of it. I have very, very old Startup Control Panel 2.8 by Mike Lin. It can have even ten years, but it has never disappointed me, so I continue using it. It scans Startup folders for current user and common one, HKLM Run, HKCU Run and Run Once sections of Windows Registry. For past ten years I thought that these are all locations where application, that is being autorun during system startup can coexist. Turns out, I was wrong.  Since this is brand new Windows, just installed, its autorun locations are empty. The only entry I do have is ATI graphic card driver manager startup string in HKLM Run. I have checked that fact ten times (but only with above mentioned program and manually) and I'm 100% sure, that in none of known to me autorun locations there are no traces of Conexant program startup string.  What do I miss? Does Windows 7 introduces some new startup location or a new method of autorunning programs, that is beyond, what I know and what Startup Control Panel scans?  Solving this problem is a snap for me. I can use brute-force method of removing manually that file or renaming it or I can uninstall Conexant audio driver at all (for the very, very limited use of audio in my laptop, that I have, Windows driver will for sure be enough, I've installed Conexant one "just in case"). But I'm really, really curious, how Windows is possible to run this program each time I restart it? Where autorun string for it can exists?


A beamer file that I had created last year will not compile now. Here is a minimal example:  \documentclass{beamer}  \begin{document} test \end{document}   The log file is long but here is the relevant part:  (C:\Users\petrovic\AppData\Roaming\MiKTeX\2.9\tex\latex\beamer\beamerbasetranslator.sty (C:\Users\petrovic\AppData\Roaming\MiKTeX\2.9\tex\latex\translator\translator.sty Package: translator 2019-05-31 v1.12a Easy translation of strings in LaTeX ) ! Missing = inserted for \ifnum. <to be read again>                 - l.15 \usedictionary                {translator-basic-dictionary} I was expecting to see `<', `=', or `>'. Didn't.  )   I have reinstalled translator and beamer packages, but it did not help. I am using MikTex (which I also updated).

I'm trying to get siunitx working. For some reason I keep getting this error:  ! Missing = inserted for \ifnum. <to be read again>                     - l.3 \begin           {document}^^M   I have tried a minimal document to make sure it is not some kind of compatibility issue. And I get that same error in the most minimal document possible.  I'm using pdfLaTeX to compile, and have tried both from TeXWorks and from bash. I'm using TeXLive, if that matters. I have also tried reinstalling siunitx, l3packages, and l3kernel. There was an issue with l3kernel before this, due to an apparently old version. But all three packages are now up to date. I've also reinstalled expl3 while trying to debug the original issue.  My minimal document is:  \documentclass{article} \usepackage{siunitx} \begin{document} \end{document}   The output I get is:  This is pdfTeX, Version 3.14159265-2.6-1.40.16 (TeX Live 2015/Debian) (preloaded format=pdflatex) restricted \write18 enabled. entering extended mode (./untitled-2.tex LaTeX2e <2016/02/01> Babel <3.9q> and hyphenation patterns for 81 language(s) loaded. (/usr/share/texlive/texmf-dist/tex/latex/base/article.cls Document Class: article 2014/09/29 v1.4h Standard LaTeX document class (/usr/share/texlive/texmf-dist/tex/latex/base/size10.clo)) (/home/<name>/texmf/tex/latex/siunitx/siunitx.sty (/home/<name>/texmf/tex/latex/l3kernel/expl3.sty (/home/<name>/texmf/tex/latex/l3kernel/expl3-code.tex) (/home/<name>/texmf/tex/latex/l3kernel/l3pdfmode.def)) (/home/<name>/texmf/tex/latex/l3packages/xparse/xparse.sty) (/usr/share/texlive/texmf-dist/tex/latex/amsmath/amstext.sty (/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsgen.sty)) (/usr/share/texlive/texmf-dist/tex/latex/tools/array.sty) (/home/<name>/texmf/tex/latex/l3packages/l3keys2e/l3keys2e.sty) (/usr/share/texlive/texmf-dist/tex/latex/beamer/translator/translator.sty (/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty) (/usr/share/texlive/texmf-dist/tex/latex/beamer/translator/translator-language- mappings.tex))) ! Missing = inserted for \ifnum. <to be read again>                    - l.3 \begin          {document}^^M ?   Does anyone have any idea what might be going wrong here?


I will eventually have 7 ground wires, and then another 7 neutral wires to connect each. (obviously I'm not connecting ground wire to neutral wires). I plan on installing leviton smart light switches.  I found a black colored push-in connector that has 8 ports at home depot. Is it ok to leave 1 port unused? I can buy one for the ground and 1 for the neutral wires I was thinking.

I need a wire nut large enough so that I can bundle seven 14 gauge neutral wires together. I am trying to splice it so I can connect it to my new smart wifi leviton light switch.  I don't know which wire nut size to buy.  The boxes say for example: minimum 2#14 gauge - maximum 2#10 gauge.   My question is, can you tell me which wing nut or brand or size to buy so I can group 7 neutral wires together? None of the sizing chart on the box says the exact words of "ok to bundle seven #14 gauge wires together.  Which one should I use?


Problem  Let $Y=(0,\infty)$ and define the metric $d(x,y)=|x-y|+|\displaystyle\frac1x-\displaystyle\frac1y|$ on $Y$. Let $d_e(x,y)=|x-y|$ be the usual Euclidean metric on $Y$, then show that both the metrics $d$ and $d_e$ are topologically equivalent on $Y$.  What I want to show is, any $d$ open ball is $d_e$ open ball and vice versa. Now $B_d(x;r)\subseteq B_{d_e}(x;r)$ proves that any $d_e$ open ball is $d$ open. But for the converse, I could not prove it. Any hint please!! Or, is there any easy way to look at this problem? Because $d$ is sum of two matrics. Thank you.

Let $X=(0,\infty)$. Define two metrics on $X$ by   $d_{1}(x,y)=|x-y|$ and   $d_{2}(x,y)=|x-y|+|\frac{1}{x}-\frac{1}{y}|$   for all $x, y \in{X}$.   Let $(x_{n})$ be a sequence in $X$ and $x\in{X}$.   Show  $d_{1}(x_{n},x)\rightarrow{0}$ if and only if $d_{2}(x_{n},x)\rightarrow{0}$.  Note: $d_{1}$ and $d_{2}$ are then said to be equivalent metrics on $X$.  Since $d_{1}$ and $d_{2}$ are equivalent metrics, will it be sufficient to show $c*d_{2}(x,y)\leq{d_{1}(x,y)}\leq{C*d_{2}(x,y)}$?  So far I have the following: $d_{1}(x,y)=|x-y|\leq{|x-y|+|\frac{1}{x}-\frac{1}{y}|}=d_{2}(x,y)$. Therefore, $d_{1}(x,y)\leq{C*d_{2}(x,y)}$ where $C=1$. Is there a $c$ that would satisfy the left-hand side of the inequality?  Any help would be appreciated. (this is not homework)


Using Boston dataset in MASS library, I'm trying to find correlation of all columns against the column medv.  For each column, I'm doing similar to below:    cor(Boston$crim, Boston$medv)   The correlation between crim and medv as calculated above is a negative value.  I understand negative values means they are not related closely and therefore the values in crim column is not suitable to use to predict the values in medv column. Which means the Crime Rate (crim) data is not sufficient to predict the Median house pricing (medv).  Did I get that right?  Also, do I have to check each column against medv for correlation? Is there a way to check all columns against medv at once?  Is it ok to say that the highest correlation value would mean that the column is best predictor for medv?

A few days ago, a psychologist-researcher of mine told me about his method to select variables to linear regression model. I guess it's not good, but I need to ask someone else to make sure. The method is:      Look at correlation matrix between all variables (including Dependent   Variable Y) and choose those predictors Xs, that correlate most with Y.     He didn't mention any criterion.  Q: Was he right?   [I think that this selection method is wrong, because of many things, like it's the theory that says which predictors should be selected, or even  omitted variable bias (OVB).]


Are there any known vulnerabilities in SHA-1 that can be exploited? Certain patterns that it shows? I recently performed a frequency analysis using 20,000 common words, and found nothing exploitable. What others techniques can I use to assert the security of SHA-1?

Is there a known pair of distinct bit strings (A,B) such that SHA-1(A) == SHA-1(B)?  If the answer is no, then how can SHA-1 be considered broken?


I was wondering what the evaluation of the following summation is for any $|a|>0$ $$\sum_{n=-\infty}^{\infty}\frac{1}{(n-a)^2}.$$ Any help or a direction to a reference would be appreciated. There is a related , but I am unsure of its validity.

I've already see a  by Marko Riedel which I list it follows:     The standard way to treat these sums is to integrate   $$ f(z) = \frac{1}{(z+\alpha)^2} \pi \cot(\pi z)$$   along a contour consisting of a circle of radius $R$ and with $R$ going to infinity and hence being larger than $\alpha$, where the circle does not pass through the poles on the real axis.   Now along the semicircle in the upper half plane we have   $$|f(z)| \le \frac{1}{(R-|\alpha|)^2}\pi \left|\frac{e^{i\pi R\exp(i\theta)} + e^{-i\pi R\exp(i\theta)}} {e^{i\pi R\exp(i\theta)} - e^{-i\pi R\exp(i\theta)}}\right|= \frac{1}{(R-|\alpha|)^2} \pi  \left|\frac{e^{2i\pi R\exp(i\theta)}+1}{e^{2i\pi R\exp(i\theta)}-1}\right| < \frac{1}{(R-|\alpha|)^2} \pi   \frac{1+e^{-2\pi R\sin(\theta)}e^{2i\pi R\cos(\theta)}} {1-e^{-2\pi R\sin(\theta)}e^{2i\pi R\cos(\theta)}}$$   This last term is clearly $O(1/R^2)$ as $R$ goes to infinity as the quotient of the two exponentials goes to one since $\exp(-R)$ vanishes and there is no singularity when $\theta = 0$ or $\theta = \pi$ as $R\cos\theta = \pm R$, which is not an integer by the assumption that the circle avoids the poles and hence cannot be one.     My question: It is clear that for each $z=Re^{i \theta}$ , $f(z)=O(1/R^2)$ ，but can this guarantee that the last term on RHS is uniform bounded ? Since $\theta$ varies on a compact interval $[0, \pi]$ , I want to show that for each $ \theta \in [0, \pi]$ , and a fixed positive number $M \gt 1 $ there exist an open ball contains $\theta$ and a fixed $R_{\theta}\gt 0$ , for every $R \ge R_{\theta}$ and $x \in $ the open ball $$\frac{1+e^{-2\pi R\sin(x)}e^{2i\pi R\cos(x)}} {1-e^{-2\pi R\sin(x)}e^{2i\pi R\cos(x)}} \le M$$  For $\theta \neq 0,\pi$ , it is easy to find the desired $R_{\theta}$ and the open ball , but if $\theta = 0$ or $ \theta = \pi$ , for every open ball containing $\theta$ , it behave erratically near $\theta$ , I have no idea how to deal with this .


I have a program called f in my $PATH, I can simply execute it by typing f into a terminal. However, typing which f into that same terminal afterwards, it errors out: which: no f in (...), and it gives the full path in brackets (which indeed contains the correct path for f itself).  Using type f however I get the correct result.  Does anyone have an idea why that is the case?    Here are the answers to questions from the comments:   f itself is a symlink to a perl script:  vwos3xz@vwososuvs012:~$ls -l $(command -v f)  lrwxrwxrwx 1 root root 42  2. Aug 2012  /tef/tegf/06_CAE_System/064_soft/PERL_SCRIPTE/bin/f -> ../CRASH_SCRIPTE/FEMSTARTER/fem-starter.pl   In fact, fem_starter.pl itself is a symlink to fem_starter-1.77.pl in the same directory I'm reasonably sure there's no typo in the path because I can simply type f in a terminal and have it run (also, type and command -v work). I set the path in .bashrc, but .bash_profile exists and just sources .bashrc. Also, I have BASH_ENV set to my .bashrc. type f returns f ist /tef/tegf/06_CAE_System/064_soft/PERL_SCRIPTE/bin/f, and command -v returns /tef/tegf/06_CAE_System/064_soft/PERL_SCRIPTE/bin/f. Also, type -a f returns the same as type f. "Have you opened a new window?"... do you mean a new terminal? I did, but that did not make a difference. I used both xterm and konsole, and I did start each from the window manager as well as from another xterm. Everytime, the $PATH was correctly set, but which did not work as expected.

How would I validate that a program exists, in a way that will either return an error and exit, or continue with the script?  It seems like it should be easy, but it's been stumping me.


Consider two subspaces V and W of $\mathbb{R}^n$. Show that dim(V) + dim(W) = dim(V ∩ W) + dim(V + W).  Can anyone provide me with the proof for this?

If $M$ and $ N$ be the subspaces of a vector space $V$ then prove that  $(\dim M) + (\dim N) = (\dim M+N) + (\dim M \cap N)$.


My ISP is blocking outgoing port 25 so i need to redirect only outgoing port 25 via my backup vpn. Is this posible? Destination     Gateway         Genmask         Flags Metric Ref    Use Iface 0.0.0.0         192.168.0.1     0.0.0.0         UG    0      0        0 enp3s0 10.9.0.0        10.9.0.153      255.255.255.0   UG    0      0        0 tun1 10.9.0.153      0.0.0.0         255.255.255.255 UH    0      0        0 tun1  vpn is at tun1 How to make it?

I have a php / bash application on top of a Linux machine with 1 physical interface connecting to e.g., outbound webserver 123.123.123.123 :80. I do this via several openvpn providers. I have both tun and tap providers, but my favorite provider uses tun.  Actually I'm perfectly able to serially:   open the vpn sudo route add 123.123.123.123 tun0 send traffic to 123.123.123.123 :80 close the vpn sudo route del 123.123.123.123   I use the "route-nopull" option inside the .ovpn config file in order to keep the Linux machine reachable and allow simultaneous openvpn connections.  Now I need to open several independent requests, always to outbound webserver 123.123.123.123 :80. But my actual flow is serial and I need to wait the first connection to close and clear itself before attempting a second connection.  I'm quite sure that I can achieve it mangling with "fake ports". Eg:   interfaces tun0, tun1, tun2 fake ports 9000, 9001, 9002 multiple routing tables rt0, rt1, rt2   So conceptually speaking:   123.123.123.123:9000 -> mark for rt0 (tun0 is default gateway) -> rewrite as 123.123.123.123:80 -> rt0 123.123.123.123:9001 -> mark for rt1 (tun1 is default gateway) -> rewrite as 123.123.123.123:80 -> rt1 123.123.123.123:9002 -> mark for rt2 (tun2 is default gateway) -> rewrite as 123.123.123.123:80 -> rt2   I can only represent the concept because I have almost no skills on iptables. If you have different ways to achieve the result, they're welcome. Thank you for reading and helping.


This can be explained by .. This could be explained by ..  Are these two interchangeable or do they conform to different situations? Let's take for example the following two sentences:  All available classification schemes for internet trolls are incomplete. This can (could) be explained by the fact that the species is evolving rapidly.  Will both can and could look OK here?

Can you please explain this to me?          Could you please explain this to me?   I am unable to figure out which to use which situation. I did google, and some posts say they are both the same, even if the second one is more formal. Other posts say could is the past tense of can, but in the above example, I don't think could is used as past tense of can.  What is correct way to use these words?


How cooktop buttons works? In this picture can see circles (marks) from control board.   Here are control board with buttons. If i touch that black "buttons", it is like dish wash sponge.   How that buttons works ? Because in glass have no holes or some wires. Those black "buttons" are some special material?

David mentions capacitive touch buttons in  and indeed I have read about capacitive touch buttons before like in the documentation of  which unfortunately is only available in .  But how do they work and can I easily make my own with a little microcontroller programming (and a PCB)?


I created sqlite database in android as follows:  db.execSQL("CREATE TABLE ratecard (fat NUMERIC, lac NUMERIC, snf NUMERIC,  cow NUMERIC, buf NUMERIC)");   Then I Inserted records in it as follows    DecimalFormat degreeformat = new DecimalFormat("#.#"); DecimalFormat rateformat = new DecimalFormat("#.##"); Double csn = 0.20; Double bsn = 0.00; Double cft = 0.50; Double bft = 0.00; Double crt = 20.00 - cft - csn; Double brt = 0.00 - bft - bsn; for (Double ss = 7.0; ss <= 8.0); ss = ss + .1) {     ProcSnf.setText(degreeformat.format(ss));     crt =   crt + csn;     brt =   brt + bsn;     Double crrt =   crt;     Double brrt =   brt;     for (Double ff = Double.valueOf(fromfat); ff <= Double.valueOf(tofat);      ff = ff + .1) {         ProcFat.setText(degreeformat.format(ff));         Double l    =   (ss - 0.36 - (ff * .21)) * 4.0;         ll = Double.valueOf(degreeformat.format(l));         crrt = crrt + cft;         brrt = brrt + bft;         DB.DeleteSelectedRateCard(ff, ss);         DB.AddRateCard(ll, ff, ss, crrt, brrt);      } }   Records created in database.  Then I pulled this database from emulator to hard disk. Then I browse this data using sqlite browser.  All records shown properly.  Now filter records in browser for fat = 5.0.  All records shown.  Now going to Execute SQL tab in Sqlite Browser I tried following sql statement and getting following result.   select * from ratecard where fat = 3.5 (12 rows returned)   select * from ratecard where fat = 4.1 (12 rows returned)   select * from ratecard where snf = 7.0 (18 rows returned including fat > 4.1)   select * from ratecard where fat = 4.2 (0 rows returned "this result is upto fat = 5.0")   select * from ratecard where fat > 4.1 (108 rows returned) This problem also occurs when I fire query in android app. So my problem is Is there problem in creating table or problem is in query statement.

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


I am having below like code in asp.net mvc controller...  IEnumerable<object> object = null; IEnumerable<object1> object1 = null;  object = object1.where(s=>s.IsActive);  If(object.Any()) {     ... }   or  if(object.Count > 0) {     ... }   My question is, if any data exists in "object" will the object.Any() and object.Count > 0 both will return same result (true or false) or both are different?  Please, can anyone help me on this?

in the System.Linq namespace, we can now extend our  to have the  and  extension methods.  I was told recently that if i want to check that a collection contains 1 or more items inside it, I should use the .Any() extension method instead of the .Count() > 0 extension method because the .Count() extension method has to iterate through all the items.  Secondly, some collections have a property (not an extension method) that is Count or Length. Would it be better to use those, instead of .Any() or .Count() ?  yea / nae ?


I'm doing a little research for a course on which computing speed over collections on different cpu types. I'm writing my tests in C++ (bad choice as I started with the language three weeks ago) and I'm trying to measure the amount of clock ticks.  I thought I'd implement an arbitrary map (yes, yes, transform) function first. For some reason I decided to encapsulate the functions I'm writing in different classes. I first tried making a function that takes an arbitrary collection, but that didn't work, so I thought of making a function that takes two iterator pointers, so I'm currently having problems with this:  .h  #include <vector> #include <map> #include <ctime> using namespace std;  class MapTests { public:     static unsigned long halve(unsigned long in);      template <class InputIter>     static clock_t getHalveTest(InputIter begin, InputIter end); };   .cpp  #include "MapTests.h"  unsigned long MapTests::halve(unsigned long in){ return in/2; }  template<class InputIter> clock_t MapTests::getHalveTest(InputIter begin, InputIter end) {     vector<unsigned long> store = {};     auto beginTime = clock();     transform(begin, end, store, &MapTests::halve);     return clock()-beginTime; }   I'm still planning on making a seperate function for std::map, but this is what I was planning to use for list, vector, array and such.  When I try to compile and print the clock ticks for the forward_list I get this monster of an error:      Undefined symbols for architecture x86_64:     "unsigned long MapTests::getHalveTest*> >(std::__1::__forward_list_iterator*>, std::__1::__forward_list_iterator*>)", referenced from:         _main in main.cpp.o   ld: symbol(s) not found for architecture x86_64   clang: error: linker command failed with exit code 1 (use -v to see invocation)   And I have no clue what I'm doing wrong here. I suspect I should do something with my template, but I don't know what.

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


The travel history to UK states if you were refused a visa to uk. Our last vist visa which got refused and then we complained to MP and complained to UK visas and immigration complaint department and then our decision was overturned. So is this still considered visa refusal for that part of application and in notes to state that visa did get approved after complaint ?

A few years ago, I applied for a UK visa. The visa was initially refused and I had no rights of appeal. However, the refusal letter had some glaring mistakes and I sent an email to the Embassy. The refusal was "overturned" by an ECM.  I am now making an application for a visa which has the question "Have you ever been refused a visa?". How should I answer it?


I am having an issue with resizing a bar chart using matplotlib in jupyter notebook, and even after going through other answered questions ( and ) and using the methods described within the answers to those questions, my bar chart does not change size.  Output before resize:   Output after resize:   As you can see, even though the rcParams have clearly changed, the plot still remains the same size. Any pointers as to how I can resolve this issue would be greatly appreciated!

How do you change the size of figure drawn with Matplotlib?


I would like to have output turned 90 degrees so I could print envelopes and spread sheets. I use TeX (not LaTeX) and ocular on linux.

I'm trying to start using plain tex (in fact, the pdftex that comes with texlive2010) to write a document but I'm having some trouble with the page layout. My question is at which point is it decided what the dimensions of the page and the margins will be?   As far as I investigated the \plainoutput routine in plain.tex only sets the height and width of the \box255 plus headers, footers, etc, but page dimensions (like A4, letter, portrait, landscape, etc) and margins are never defined. Moreover the TEXBOOK says that by default the page layout has 1in of margin at each side (page 251) but I don't know when are these margins defined nor why in my final pdf output the document appears with A4 size, 1in of left margin and approximatley 0.7in of right margin. So the question again is when are these dimensions decided?


I'm currently learning Unix and have come across a question in a book that I'm trying to solve.  I'm trying to write a script that asks a user to enter a file name. Then, the script needs to check for file existence. If the file does not exist, that script should display an error message and then exit the script. If the file exists, the script should ask if the user wants to delete the file:   If the answer is yes or y, the script should remove the file. If the answer is no or n, the script should exit from the script. If the answer is neither yes nor no, the script should display an error message and exit from the script.   This what I have written so far but have come across with a few errors:  #!/bin/bash  file=$1  if [ -f $file ]; then echo read -p  "File $file existes,do you want to delete y/n" delete case $delete in n)    exit y) rm $file echo "file deleted";; else echo "fie $file does not exist" exit fi   If anyone come explain where I have gone wrong it would be greatly appreciated

I want to pause input in a shell script, and prompt the user for choices. The standard Yes, No, or Cancel type question. How do I accomplish this in a typical bash prompt?


I am a pretty new contributor so forgive me if this is some common phenomenon. I was writing an answer a few minutes ago on MathSE, but when I opened my profile to check on my reputation, there was a weird increase in my reputation (from 481 to 531) with no indication in my reputation summary (no new upvotes or downvotes). Also, when I checked on my account section from other sites, I found that my reputation was still 481. Is this a bug or something else?

My reputation on Stack Overflow suddenly raised from 35k to 45k! And it seems that on other sites as well! It must have been in the past hour!  What happened? I don't see any record in the reputation history or jump in the chart, everything is just smooth! And it seems it happened on other sites as well!  I'm not complaining, just curious! :-)  EDIT: The discussion was "it was in the banner, you should have read it", and when I replied that I am closing banners without reading, and important announcements like that should be in the notification box, I got comments like "Oh yeah not reading banners is bad".  Now look at this and tell me: is anyone still surprised that I got used to closing banners without reading?? ;-)


How to count the number of columns in a table using SQL?  I am using Oracle 11g  Please help. t.

how do you count the number of columns in a table in oracle?


I am beginning to explore Ubuntu as a new user.  I am running Ubuntu 18.04.1 LTS from a flash drive. In attempting to install software that was not already bundled in the Ubuntu download I read on this forum that I should use the command line of the terminal to install the Synaptic package manager. I entered the command  sudo apt-get install synaptic    but I get the following responses:  Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package Synaptic   What do I need to do to be able to install widely used open source software apps that are not the defaults in this download of Ubuntu?

When I try to install any package through the command line, I get an error.   $ sudo apt-get install <package> Reading package lists... Done Building dependency tree        Reading state information... Done E: Unable to locate package <package>   Can anyone help me on this?


Evaluate the indefinite integral $$\int\left(a^2-\frac{\sin {(a)}}{a^{2} + 1}-a \cos {(a)}\right)\,da$$ I tried a lot of integration strategies to solve this, but I can't find what will solve the derivative. Can you give me a hint on how to solve this? Specifically, I am thinking that the fact that $$\int\frac{1}{x^2 + 1}\,dx = \tan^{-1} (x) + C$$ can be applied here. Let me share my solution $$\int\left(a^2-\frac{\sin {(a)}}{a^{2} + 1}-a \cos {(a)}\right)\,da =\int\frac{a^2(a^2-1)-\sin {(a)}-a(a^2-1) \cos {(a)}}{a^{2} + 1}\,da$$ $$=\int\frac{a^4 -a^3\cos {(a)}- a^2+a\cos {(a)}-\sin {(a)} }{a^{2} + 1}\,da$$ I got stuck here. I hope you can help me solve the problem. Thank you in advance for your comments.

$$\int \frac{\sin\left(x\right)}{1+x^2}dx$$  I have tried to integrate by parts but it doesn't work. How do I evaluate it? Any advice, hint or well-thought solution will be appreciated.


Further to  we have two very descriptive domains like dog-toys.ie and dogtoys.ie and have decided we will now make one of them canonical, with HTTPS, and do a 302 from the other domain.  My question is which one to use as canon? Note, this topic seems to have been covered here before, but it seems people are asking what to register. We have have both domains registered and in use since 1999 with the dashed version parked on the non dashed one.  Doing a site:dog-toys.ie in Google (4 times to cover both and www and no www for both domains) are all similar between 1,660 and 1,900 URLs indexed.  In Google Analytics, here are the comparative sessions over a recent period:  www.dogtoys.ie  183,410 www.dog-toys.ie 27,635 dogtoys.ie  8,403 dog-toys.ie 872   This may strongly suggest to go with www.dogtoys.ie, but I feel this may be skewed as if you land on dog-toys.ie, most of the links you click in will lead to  www.dogtoys.ie  So, to summarize,  of the two already registered domains, which if any, will be better for a search for Dog Toys?

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 a Thinkpad L380 with Intel 8265, on which I installed Debian 9 base system (from a netinstall USB stick). I downloaded , which had the file iwlwifi-8265-22.ucode, which I copied to /lib/firmware and rebooted the machine.  The output of  dmesg | grep iwlfifi has the following lines. (There might be some typos, since Ihad to read it from the laptop and type it here, since iwlwifi isn't working on it, and I can't connect it to ethernet for want of a mini-RJ45 connector!)  firmware: failed to load iwlwifi-8265-26.ucode (-2) Direct firmware load for iwlwifi-8265-26.ucode failed with error -2   Similarly for -25, -24 and -23. Then  firmware: direct-loading firmware iwlwifi-8265-22.ucode loaded firmware version 22.361476.0 op_mode iwlmvm Detected Intel(R) Dual Band Wireless AC 8265 REV=0x230 L1 enabled - LTR enabled L1 enabled - LTR enabled wlp2s0 renamed frm wlan0   Looking at many online discussions/blogs discussing similar problems, I tried modinfo iwlwifi | more which gave (the first few line)  filename: /lib/modules/4.9.0-8-amd64/kernel/drivers/net/wireless/intel/iwlwifi/iwlwifi.ko licence: GPL author : .... descrption: Intel(R) Wireless Wifi driver for Linux ... ... firmware: iwlwifi-8265-26.ucode ...   Where can I find version -26 (or anything above -22)? The discussion  mentions that the drivers are maintained at kernel.org and asks users to contact the support people at kernel.org, but there I could only find -22.   Is there any workaround for this problem?

I have installed Debian 8/Jessie minimal ISO on my laptop. I get error message during system installation:  Some of your hardware needs non-free firmware files to operate. The firmware can be loaded from removable media, such as a USB stick or floppy. The missing firmware files are: iwlwifi-7265-9.ucode iwlwifi-7265-8.ucode If you have media available now, insert it, and continue. Load missing firmware from removable media?  I found the appropriate firmware on Debian website, downloaded it (zip), extracted to flash drive, and booted with flash drive plugged in. I still get the error message that appropriate firmware could not be found (the error message disappear to fast to copy down). How do I properly format the flash drive? Or is the problem here something else? Windows Explorer on another computer tells me the flash drive is 14.6GB and formatted as FAT32.


So I have an array and trying to print what was input to the scanner. I'm trying to print the matrix that was input. Heres the code, what am I doing wrong here? I tried to print just graph, doesn't work.   /** Accept number of vertices **/     System.out.println("Enter number of vertices\n");     int V = input.nextInt();      /** get graph **/     System.out.println("\nEnter matrix\n");     int[][] graph = new int[V][V];     for (int i = 0; i < V; i++)         for (int j = 0; j < V; j++)             graph[i][j] = input.nextInt();             System.out.print(graph);

In Java, arrays don't override toString(), so if you try to print one directly, you get the className + '@' + the hex of the  of the array, as defined by Object.toString():  int[] intArray = new int[] {1, 2, 3, 4, 5}; System.out.println(intArray);     // prints something like '[I@3343c8b3'   But usually, we'd actually want something more like [1, 2, 3, 4, 5]. What's the simplest way of doing that? Here are some example inputs and outputs:  // Array of primitives: int[] intArray = new int[] {1, 2, 3, 4, 5}; //output: [1, 2, 3, 4, 5]  // Array of object references: String[] strArray = new String[] {"John", "Mary", "Bob"}; //output: [John, Mary, Bob]


$\newcommand{\Spec}{\operatorname{Spec}}$I'm working on the following problem from Vakil's notes:     Show that (scheme) morphisms $X\to\Spec A$ are in natural bijection with ring morphisms $A\to\Gamma(X,\mathscr O_X)$.   Of course, any map $X\to\Spec A$ induces a map of global sections $A\to\Gamma(X,\mathscr O_X)$. I am working out the other direction. It is certainly true if $X$ is affine, because affine scheme morphisms $\Spec B\to\Spec A$ are in bijection with ring maps $A\to B$.  In the general case, we cover $X$ with affine open sets $\Spec B_i$. Then for each $i$ we get a map  $$A\to\Gamma(X,\mathcal O_X)\overset{\text{res}}{\to}\Gamma(\Spec B_i,\mathcal O_X)=B_i$$  which in turn gives a map $\pi_i:\Spec B_i\to\Spec A$ (in particular, if we let $\pi_i^{\#}$ be the map $A\to B_i$, then the map is given by $\pi_i(p)=(\pi_i^{\#})^{-1}(p)$).  How can I show that these glue correctly to give a morphism of schemes $\pi:X\to\Spec A$?

This is question 2.4 in Hartshorne. Let $A$ be a ring and $(X,\mathcal{O}_X)$ a scheme. We have the associated map of sheaves $f^\#: \mathcal{O}_{\text{Spec } A} \rightarrow f_* \mathcal{O}_X$. Taking global sections  we obtain a homomorphism $A \rightarrow \Gamma(X,\mathcal{O}_X)$. Thus there is a natural map $\alpha : \text{Hom}(X,\text{Spec} A) \rightarrow \text{Hom}(A,\Gamma(X,\mathcal{O}_X))$. Show $\alpha$ is bijective.  I figure we need to start off with the fact that we can cover $X$ with affine open $U_i$, and that a homomorphism $A \rightarrow \Gamma(X,\mathcal{O}_X)$ induces a morphism of schemes from each $U_i$ to $\text{Spec} A$ and some how glue them together. But I have no idea how to show that the induced morphisms agree on intersections. How does this work?


I'm new to Javascript The function is not changing the outer variable function edit(array, letter){     array = 0;     letter = 'b'; } let string = 'a'; let array = [1,0,2]; edit(array, string); console.log(array, string);// Result [1,0,2] not 0 b

The primitive types (number, string, etc.) are passed by value, but objects are unknown, because they can be both passed-by-value (in case we consider that a variable holding an object is in fact a reference to the object) and passed-by-reference (when we consider that the variable to the object holds the object itself).  Although it doesn't really matter at the end, I want to know what is the correct way to present the arguments passing conventions. Is there an excerpt from JavaScript specification, which defines what should be the semantics regarding this?


Just building on , where we showed that an odd number $p$ is prime in $\mathbb{Z}[i]$ if and only if $x^2+1$ does not have roots in $\mathbb{Z}/p\mathbb{Z}$.  The last part of this exercise is to show, in this case, that the multiplicative group of units of $\mathbb{Z}/p\mathbb{Z}$, denoted by $(\mathbb{Z}/p\mathbb{Z})^\times$ does not have an element of order 4, and $p \equiv 3 \mod 4$.  We can also conclude that $p \not\equiv 0,2 \mod 4$ because $p$ is odd.  Here is where I am getting a bit stuck. I assume the point is to show that if we assume that $p \equiv 1 \mod 4$, for example, $p = 5$, then $x^2+1$ has roots in $\mathbb{Z}/5\mathbb{Z}$. Here, $x^2+1 = 0 \mod 5$ for $x=2$. By the previous proposition, then $p$ is not prime in $\mathbb{Z}[i]$.  I am lacking the general statement of this proof. How can I go from assuming $p \equiv 1 \mod 4$ to $x^2+1 \equiv 0 \mod p$, in a general way?

So far, I know if $p$ is a rational prime, then $(1)$ if $p\equiv 3\mod4$, then $p$ is prime in $\mathbb{Z}[i]$. $(2)$ If $p\equiv1\mod4$  then $p=π_1 π_2$ where $π_1 $ and $π_2$ are conjugate, Then $π_1 $ and $π_2$ are primes in $\mathbb{Z}[i]$. $(3)$ $2=(1+i)(1-i)$, then $(1+i)$and$(1-i)$ are primes in $\mathbb{Z}[i]$.  What's are all the prime elements in Gaussian integers $\mathbb{Z}[i]$? For example, $-3$ are prime in $\mathbb{Z}[i]$, but not in the above $3$ cases.