After a reboot it keeps asking for wifi password and doesn't connect to any networks, it can list networks. After a few reboot it sometimes works but usually doesn't.  lspci -knn | grep Net -A2 04:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. RTL8822BE 802.11a/b/g/n/ac WiFi adapter [10ec:b822]     Subsystem: AzureWave Device [1a3b:2950]     Kernel driver in use: rtw_pci   uname -r 5.0.0-37-generic   It didn't managed to connect during installation either. (it works in windows every time so its not a hardware issue)   It is a completely different problem I get a loop to type in the password and just can't connect to a network (I'v tryed the suggested fix anyway but didnt worked):

Just installed Ubuntu on new HP desktop "pavillion"all in one. Dual boot set up. I get the message no wifi adapter found when attempting to get online. What to do? Oh I do not know how to copy and paste my terminal info so it actually looks like it does on the terminal. (A little help with that would stop annoying people that are reading my questions.)  When I enter sudo lshw -C network I get:  *-network                  description: Ethernet interface product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller vendor: Realtek Semiconductor Co., Ltd. physical id: 0 bus info: pci@0000:01:00.0 logical name: enp1s0 version: 15 serial: c8:d9:d2:7b:00:b3 size: 1Gbit/s capacity: 1Gbit/s width: 64 bits clock: 33MHz capabilities: pm msi pciexpress msix bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=full firmware=rtl8168h-2_0.0.2 02/26/15 ip=10.0.0.223 latency=0 link=yes multicast=yes port=MII speed=1Gbit/s resources: irq:49 ioport:f000(size=256) memory:fea04000-fea04fff memory:fea00000-fea03fff *-network UNCLAIMED description: Network controller product: Realtek Semiconductor Co., Ltd. vendor: Realtek Semiconductor Co., Ltd. physical id: 0 bus info: pci@0000:02:00.0 version: 00 width: 64 bits clock: 33MHz capabilities: pm msi pciexpress cap_list configuration: latency=0 resources: ioport:e000(size=256) memory:fe900000-fe90ffff   So I followed the already answered question advice of making sure I had the correct kernel which is currently 4.15 and I have the most updated rtl8822befw.bin firmware installed and I still am getting the no wifi adapter prompt. I do not know all the commands that I could be using to get this solved. The adapter is found and operational in windows and the Ethernet cable allows me to get online for Ubuntu.  When I enter lspci -nnk | grep -A2 0280 I get:  02:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. Device [10ec:b822]     Subsystem: Hewlett-Packard Company Device [103c:831b]     Kernel modules: r8822be   When I enter rfkill list I get:    0: hci0: Bluetooth       Soft blocked: no       Hard blocked: no     Any other Ideas ?


My question is about what documents should I provide to confirm/prove my home address?  I have not got a mortgage property or property deed because I do not own the place. Me and my husband just pay a rent every month can I provide a bank statement, or my personal phone bill, or health card?

I am married to an EU citizen, I am confused about what to submit on "home address" supporting documents. I don't have a mortgage or property deed simply because I live with my husband. So what should I fill with the missing supporting documents of home address if I am currently living with my husband?


Now I see this is duplicate and is answered in  I am trying to translate coords from WGS84 (file collected using a GPS) to ITM in Israel. I am testing the code by comparing results with the station points in the official documentation to see if working correctly and there are small differences. So what is missing? Where is the mistake? ALON RESULT:   624087.942N 162790.452E Expected: 624088.355N 162789.564E  My code: from pyproj import Transformer  stril2012 = '+proj=tmerc +lat_0=31.7343936111111 +lon_0=35.2045169444445 +k=1.0000067 +x_0=219529.584 +y_0=626907.39 +ellps=GRS80 +towgs84=-24.002400,-17.103200,-17.844400,-0.33009,-1.852690,1.669690,5.424800 +units=m +no_defs' stril = stril2012 transformer = Transformer.from_crs("epsg:4326", stril) #ALON STATION lat =  (28.569400 / 60 + 42) / 60 + 31 long = (23.921960 / 60 + 36) / 60 + 34 alt = 55.671 res = transformer.transform(lat, long, alt) print("ALON") print('RESULT:   {:010.3f}N'.format(res[1]), '{:010.3f}E'.format(res[0])) print("Expected: 624088.355N 162789.564E")


This is my database helper class. I am calling createWord methot to create databese. It is working. But when I calling listEnWords method to display on recyclerview I am taking nullpointerexeption. I think my context is wrong. How should I change my context?     java.lang.NullPointerException: Attempt to invoke virtual method 'android.database.sqlite.SQLiteDatabase android.content.Context.openOrCreateDatabase(java.lang.String, int, android.database.sqlite.SQLiteDatabase$CursorFactory, android.database.DatabaseErrorHandler)' on a null object reference   public class WordsDbHelper extends SQLiteOpenHelper {  private static final int DATABASE_VERSION = 3; private static final String DATABASE_NAME = "words.db"; private Context context;  public WordsDbHelper(Context context) {     super(context, DATABASE_NAME, null, DATABASE_VERSION);     this.context=context; }   @Override public void onCreate(SQLiteDatabase db) {     final String SQL_CREATE_BOOKS_TABLE =              "CREATE TABLE " + WordEntry.table_WORDS + " (" +                      WordEntry.word_iD + " INTEGER PRIMARY KEY AUTOINCREMENT, " +                      WordEntry.word_ENG + " TEXT NOT NULL, " +                      WordEntry.word_TR + " TEXT NOT NULL )";      db.execSQL(SQL_CREATE_BOOKS_TABLE);  }  @Override public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {     db.execSQL("DROP TABLE IF EXISTS " + WordEntry.table_WORDS);     onCreate(db); }  public void createWord(Words book) {     String table_WORDS = "words";     String word_ENG = "engWord";     String word_TR = "trWord";      // get reference of the BookDB database     SQLiteDatabase db = this.getWritableDatabase();      // make values to be inserted     ContentValues values = new ContentValues();     values.put(word_ENG, book.getEngWord());     values.put(word_TR, book.getTrWord());      // insert book     db.insertWithOnConflict(table_WORDS, null, values, SQLiteDatabase.CONFLICT_IGNORE);      // close database transaction     db.close(); }  public List<String> listEnWords() {     List<String> dataEng = new ArrayList<>();      SQLiteDatabase db = this.getWritableDatabase(); //Error is here     String[] columns = {WordEntry.word_iD, WordEntry.word_ENG, WordEntry.word_TR};      Cursor cursor = db.query(WordEntry.table_WORDS, columns, null,             null,             null,             null,             null);      while (cursor.moveToNext()) {         dataEng.add(cursor.getString(0) + "-" + cursor.getString(1));      }     return dataEng; }  public List<String> listTrWords() {     List<String> dataTr = new ArrayList<>();      SQLiteDatabase db = this.getWritableDatabase();     String[] columns = {WordEntry.word_iD, WordEntry.word_ENG, WordEntry.word_TR};      Cursor cursor = db.query(WordEntry.table_WORDS, columns,             null,             null,             null,             null,             null);      while (cursor.moveToNext()) {         dataTr.add(cursor.getString(2));      }     return dataTr; }   I am calling list methods from adapter of recyclerviev like this.  @Override public void onBindViewHolder(RecyclerView.ViewHolder viewHolder, int position) {     WordListRecyclerItemViewHolder holder = (WordListRecyclerItemViewHolder) viewHolder;      WordsDbHelper helper = new WordsDbHelper(null);      List<String> enWordData = helper.listEnWords();     List<String> trWordData = helper.listTrWords();      String itemEnText = enWordData.get(position);     String itemTrText = trWordData.get(position);      holder.setNewsTitle(itemEnText + ". word");     holder.setNewsDesc(itemTrText + ". kelime"); }

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


So I was solving problems in my textbook and I got stuck on this question. It says:  Prove that:    $ ^nC_0^2 - ^nC_1^2 + ^nC_2^2 - ^nC_3^2 + ... + (-1)^{n} .^nC_n^2  $ = $ 0 $ or $ \frac {(-1)^{n/2} n!} {\frac{n}{2}! \frac{n}{2}!} $  ,  when $ n $ is odd/even.  So I tried to bring the required terms and my idea was to multiply $ (1+x)^n $ with $(x - 1)^n$ .  $$ (1+x)^n = ^nC_0 + ^nC_1 x + ^nC_2 x^2 + ... ^nC_n x^n $$ $$ (x-1)^n = ^nC_0x^n - ^nC_1 x^{n-1} + ^nC_2 x^{n-2} + ... (-1)^n .^nC_n $$   I can see that if I multiply the two equations, then I will get the terms I need with their required sign. LHS will contain $ (x^2 - 1)^n $  .  But along with that, there will be many other terms on the RHS which will probably be impossible for me to get rid of. Am I going in the right way or is there an entirely different procedure?

I know that the sum of squares of binomial coefficients is just ${2n}\choose{n}$ but what is the closed expression for the sum ${n\choose 0}^2 - {n\choose 1}^2 + {n\choose 2}^2 + \cdots + (-1)^n {n\choose n}^2$?


I have Pakistani nationality and also an Italian permesso di soggiorno. What do I need in order to visit the UK?

I am non EU national, living in a Schengen country for past 5 years. I hold Indian passport and EU permanent residence card valid for 5 years.   Can i go to UK for few days to visit friends without a visa?  I am aware that UK is not in Schengen, and Schengen visas and residence permits issued by Schengen country is not valid for United Kingdom? But what about the PR card issued by a Schengen country?  I am also aware that EU citizens carrying EU passport have no restrictions to visit UK.


I need to show if $M \times \mathbb{R}^{n}$ is orientable than so is $M$, where $M$ is connected manifold. $R^{n}$ has standard orientation (determined by standard basis ) and by the assumption $M \times \mathbb{R}^{n}$ also orienatable, so how to show that $M$ is orientable?

I'm studying orientability of manifolds currently and I'm having trouble to prove the following: $M\times N$ is orientable iff $M$ and $N$ are orientable.   I am able to prove that the product is orientable if components are orientable (chart is $\{(U_\alpha\times V_{\beta},\phi_\alpha\times \psi_\beta):(\alpha,\beta)\in A\times B \}$, and $\det J=\det J_1 \det J_2>0$ by Cauchy-Binet's theorem), but I don't know how to prove the other direction.   So why this holds: if $M\times N$ is orientable, then $M$ and $N$ are orientable?  Thanks in advance.


It's possible to add a spell checker to the search function?  Something like the Google one...  (for instance if I write blacd hole in this site I found nothing, while in Google he understand that I want to search for the word black hole).  It's not compelling, but it can be really useful especially for non-english native speakers.

I've lost count of the number of times I've either asked a question or been answering a question only to have it closed as an exact duplicate. But searching for the question turns up  a list of seemly unrelated results using the sites builtin search. Then if I switch to a general web search engine and limit its scope to just SO, SF or SU I find the question within the first two or three results.  Why is this?  I'm pretty sure this isn't an exact duplicate of another question though I did find some that were at least somewhat related (using google).  Update:  I also have gotten (somewhat) better results by simply typing a question and browsing the generated list of related questions. Still a search feature that doesn't return good results isn't going to be used by most people.  Common sense would suggest (though common sense isn't always the best indicator) that a targeted solution to a specific problem domain should be superior to a generalized solution. In most cases this appears to hold true.


Input n Repeat   n= n/2 Until n<= 1   i'm not sure whether this has a time complexity of O(n) or O(log n) since n is being halved in every iteration of the loop...  I know that to calculate the time complexity you have to go through each operation and see how many times it will be executed with respect to the input, the part that confuses me is that since we are changing the value of the input with every iteration of the loop, what effect does that have on the total time complexity?  any information about calculating time complexity of algorithms from just looking at code would be appreciated as i still don't quite have a hang of it...

Most people with a degree in CS will certainly know what . It helps us to measure how well an algorithm scales.   But I'm curious, how do you calculate or approximate the complexity of your algorithms?


The latest version of Google Chrome has changed the hotkey for 'back' from backspace to alt + backspace.  The new combination doesn't work on my laptop, however I would actually rather stick with the older key anyway.  I've read in other questions that Chrome doesn't allow you to customise shortcuts, however is there any way to either re-enable the original shortcut or to override it back to being just backspace?    I'm running Windows 10.

Since start of this summer, I think that Google removed the option of using backspace for returning to previous page or so.   I was wondering, if there exist any chance, of undo-ing this thing? Is there such thing that would help me, such as downgrading Chrome or using any additional add-ons or something such as this for getting this glorious function back?  It's nearly impossible for me to forget this shortcut (as old habits die hard, lol) and keep pressing it and later on using the mouse to go back.


How would you solve for x in the equation:  $$x^{x^x}=2$$ using the Lambert W-Function?

We can solve the equation $x^x=c$ using the Lambert $W$ function, but how do we solve $x^{x^x}=c$ ,


This could apply to many situations, but here's just one:  Say Alice asks a question on SO saying "how do I do X?".  Bob then answers the question with "use library Y", and provides a link to the Y page.  Fast-forward several months later, where library Y is outdated and no longer maintained, and the official site that Bob linked to is 404'd.  Carol needs to do X, but can't use library Y like Bob's answer suggested, but she can't post to SO because it'll be closed as a exact duplicate of Alice's question.

Suppose you had a question, and you really want a good answer that would solve your problem, but noticed it was already asked by someone else. Now, a lot of answers had been posted and upvoted, and maybe one was accepted. However, none of the answers solved your problem. The system does not promote the question very much because it is not considered "unanswered", and a lot of users who would otherwise bother to give a correct answer will probably skip the question completely as there are already many highly-voted answers.  Now, what should you do in this case?  One idea is to ask a new, completely identical question, but now you're in control to decide when it is answered. But would that go against SE policy?


If we have 2 control fields within each other and after the 2 fields are created we connect the outer CF to the Inner CF do we still get MU points for the 2 original CFs and the last 2 CF points after the connection is made?

What happens to the Y MU from the outer field when 2 fields are connected AFTER both fields are made. What would be the total MU gained in the checkpoint in the third step?


In this short story, two men -- one more by the book and the other less so -- are the crew on a cargo ship. An accident takes out their oxygen reserves, leaving only enough for one of them to make it back. One detail I can recall: the more easygoing one allows himself the occasional cigarette, infuriating his crewmate. Only the easygoing one survives, and it's one of those mystery reveal type stories where we find out the end of the story before we learn what happened. It possibly may be by Arthur C. Clarke, but just as possibly not. It's driving me nuts not being able to remember! Thank you in advance!

Plot Summary/Details  The story takes place aboard an interplanetary cargo vessel whose route is between Earth and Venus (and vice-versa).  The vessels has an ion-drive propulsion system, which becomes central to the story.  The ion drives produce very low accelerations, making for lengthy transit times between worlds.  IIRC, the cargo vessel travels in elliptical flight paths, in order to take advantage of the planets' orbital position as they revolve around the sun. I remember a line comparing the cargo ship to the pricey passenger liners, which would burn enormous amounts of fuel accelerating directly between planets at velocities approaching 1/10th of a G.  This particular cargo vessel has a crew of two men.  One is something of an alpha male, and a bully.  The other, who is the closest thing to a protagonist in the story, is sort of a meek type who gets pushed around by the other man on a regular basis.  They work together well enough, but neither likes the other.  The crisis in the story comes when a meteorite storm or the like damages the vessel while it is en route to Venus.  Either the air supply or the air recycling system is damaged.  They radio home to Earth about the damage, and it quickly becomes apparent that there isn't enough air supply left to complete the voyage with both men. The realities of space travel make a rescue impossible.  As such, one of the two men will have to commit suicide.  I am fuzzy on how the story proceeds from there.  I do remember that the story becomes public knowledge on Earth and Venus, and IIRC, becomes something of a news sensation.  I also think the last message sent from the men before the ship arrives at Venus is that one of them has taken, or is about to take, the suicide pill.  The twist in the story comes at the end.  I remember the ending, but I am drawing a blank on the rationale for the resolution.  It turns out both men are still alive.  The meek man has holed up in the rear compartment of the ship, sleeping as much as possible to conserve oxygen. Somehow (and I remember, somewhat unsatisfying, from a reader's perspective) beat the odds.  Right before they arrive in orbit, he confronts the other man.  He tells the other crewman (the bullying one), that they cannot both exit the ship.  Not after all the media frenzy and whatnot.   I think the meek man points out to the other man that as the senior crewmember, regulations dictate he (the bully) must be the one who swallows the suicide capsule.   Again, my memory is fuzzy here, and I cannot quite remember the rationale.  Timeframe of Publication  I think this one is an older story - 60's or earlier.  I have a tendency to be way off on story eras of late, however, so I can't be sure of the exact era.  It certainly feels like an older story, given the theme and technological points.


The title pretty much says it. If $p$ is an odd prime, how do I prove the following?: $p = x^2 +2y^2 $ iff p $\equiv$ 1 $\mod{8}$ or p $\equiv$ 3 $\mod{8}$

Let $p$ be a prime number. I could already show, that $\mathbb{Z}[\sqrt{-2}]$ is an euclidean domain and that $$p\text{ reducible }\Leftrightarrow\text{ }p=a^2+2b^2\text{ for some $a,b\in\mathbb{Z}$.}$$  Now I wonder how to prove  $$p\equiv 1,2,3\text{ mod }8 \Rightarrow p=a^2+2b^2\text{ for some $a,b\in\mathbb{Z}$.}$$  Maybe there is a possibility to show  $$p\equiv 1,2,3\text{ mod }8 \Rightarrow p\text{ reducible }?$$


I am trying to prove that $$\sum_{k=1}^{2n} \frac{(-1)^{k-1}}{k} = \sum_{k=1}^n \frac{1}{n+k}$$ for $n \in \mathbb{N}$.  My approach is to prove this by induction and this is what I got so far:  $$\sum_{k=1}^{2(n+1)} \frac{(-1)^{k-1}}{k} = (\sum_{k=1}^{2n} \frac{(-1)^{k-1}}{k}) + \frac{(-1)^{(2n+1)-1}}{2n+1} + \frac{(-1)^{(2n+2)-1}}{2n+2} = (\sum_{k=1}^n \frac{1}{n+k}) + \frac{(-1)^{(2n+1)-1}}{2n+1} + \frac{(-1)^{(2n+2)-1}}{2n+2}$$  However, I am not aware how to proceed from here to get to: $$\sum_{k=1}^{n+1} \frac{1}{(n+1)+k}?$$  I would greatly appreciate any advice/solutions!

The title pretty much summarizes my question. I am trying to prove the following:  $$\displaystyle \forall N \in \mathbb{N}: \sum^{2N}_{n=1} \frac{(-1)^{n-1}}{n} = \sum^{N}_{n=1} \frac{1}{N+n}.$$  I tried proving this using induction. Starting with the base case $N = 1$:  $$\displaystyle \sum^{2}_{n=1} \frac{(-1)^{n-1}}{n} = \frac{1}{1} + \frac{-1}{2} = \frac{1}{2} = \frac{1}{1+1} = \sum^{1}_{n=1} \frac{1}{N+n}.$$  My problem is the inductive step for $N+1$, starting with  $$\displaystyle \sum^{2(N+1)}_{n=1} \frac{(-1)^{n-1}}{n} = \sum^{N+1}_{n=1} \frac{1}{(N+1)+n}.$$  And now my problem:  \begin{align} \sum^{2(N+1)}_{n=1} \frac{(-1)^{n-1}}{n} &\Leftrightarrow \sum^{2N}_{n=1} \frac{(-1)^{n-1}}{n} + \sum^{2}_{n=1} \frac{(-1)^{n-1}}{n} \\[1em] &\underset{\Leftrightarrow}{\text{ind. hyp.}} \sum^{N}_{n=1} \frac{1}{N + n} + \sum^{2}_{n=1} \frac{(-1)^{n-1}}{n} \end{align}  Is this the correct start, and if so, how do I continue?


I'm calling one rest API and it's working properly but I'm not able to deserialize it's reesult.  Below in mentioned my code and what response in I'm getting,I want city value in city variable and temp,humidity in each separate variable's:    public class getCityWeather  {     public string city{get;set;}     public string temp{get;set;}     public string pressure{get;set;}     public string humidity{get;set;}     public string temp_min{get;set;}     public string temp_max{get;set;}      public static void CallingOpenWeatherMap()     {         String accountCity = 'Delhi';         String apiKey = 'd0b522134dc8a5ba20020e0bfbceaafa';          String requestEndPoint = 'http://api.openweathermap.org/data/2.5/weather';         requestEndPoint+='?q='+accountCity;         requestEndPoint+='&units=metric';         requestEndPoint+='&APPID='+apiKey;          Http http= new Http();         HttpRequest request = new HttpRequest();         request.setEndpoint(requestEndPoint);         request.setMethod('GET');         HttpResponse response = http.send(request);          if(response.getStatusCode() == 200)         {             System.debug('Result : '+response.getBody());         }     } }   // And the response is :   { "coord":{"lon":77.22,"lat":28.65}, "weather":[{"id":721,"main":"Haze","description":"haze","icon":"50d"}], "base":"stations", "main":{"temp":34,"pressure":1006,"humidity":52,"temp_min":34,"temp_max":34}, "visibility":3500, "wind":{"speed":5.1,"deg":320}, "clouds":{"all":20}, "dt":1537342200, "sys":{"type":1,"id":7809,"message":0.0045,"country":"IN","sunrise":1537317481,"sunset":1537361480}, "id":1273294, "name":"Delhi", "cod":200 }

How can I deserialize this json object:      {     "response": {         "count": 1,         "benchmark": 0.22567009925842,         "requests": [             {                 "request": {                     "id": 537481,                     "image_thumbnail": "",                     "title": "Request for new bin(s) - residential",                     "description": "Propmain ref  3234-1114",                     "status": "submitted",                     "address": "36 Pine Tree Close",                     "location": "Peterborough, England",                     "zipcode": "PE1 1EJ",                     "user": "",                     "date_created": 1417173208,                     "count_comments": 0,                     "count_followers": 0,                     "count_supporters": 0,                     "lat": 52.599967,                     "lon": -0.233482,                     "user_follows": 0,                     "user_comments": 0,                     "user_request": 1,                     "rank": "0"                 }             }         ],         "status": {             "type": "success",             "message": "Success",             "code": 200,             "code_message": "Ok"         }     } }   What i've tried:   Map<String,Object> rawObj = (Map<String,Object>) JSON.deserializeUntyped(jsonString);     Map<String,Object> responseObj = (Map<String,Object>)rawObj.get('response');     List<Object> reqs = (List<Object>) responseObj.get('requests');     System.debug('Map Size = ' + reqs.size());     Map<String, Object> i = new Map<String, Object> ();     for (Object x : reqs) {          i = (Map<String, Object>)x; }     Map<String,Object> requests = (Map<String,Object>)i.get('request');     System.debug('Map Size = ' + i.size());     for (String field : i.keySet()){          Object id = i.get(field);         Object title = i.get('title');         System.debug('Id : ' + id);         System.debug('title : ' + title);          //System.debug('Title : ' + title);       }


I was watching Episode V with my nephew yesterday.  In the scene in Yoda's hut on Dagobah, Yoda offers Luke some oat porridge like food before revealing himself to be a jedi master.  My nephew's question was:     What are they eating?   He was incredulous when I said 'porridge', but that's my closest guess.

Are the foods in the Star Wars Universe the same as ours'? Do they have strawberries or potatoes or something? I know that they might have some food other than the food that we also have, but I'm wondering if they have any food like ours'.


If in a ring $R$, $x^2=x$ for all $x$ then show that $2x=0$ and $x+y=0$ implies that $x=y$

Prove that if $a^2 = a$ for all elements of the ring $R$, then $R$ has characteristic 2. Is the converse of the statement true?  Attempt:  by the definition of characteristic of a ring, the first statement implies that characteristic of the ring is $\leq 2$. If the ring is assumed to be non trivial ring then, characteristic is 2.  About the last statement can we construct a field of say 8 elements and show that there exists a an element of order $\neq 2$?  Is there a simpler example ?


I'd like to set a password for the guest account.  How can I do this? (This question is not answered under the similar question in this forum, see below.)  The last time this was asked on this forum it was suggested that there was no reason to set a password on guest as it was equivalent to set up a new, regular account with a password.  It seems to me that this is not the same thing.  The guest account is secure by default, limits access to the file system and is self-cleaning, regular accounts are not.  By self-cleaning I mean that it leaves no loose files, no internet history, no potential viruses (I know, Linux has none), etc. since it all takes place in temporary space.    It is good to have the guest account protected, too, in some situations. For example, if you live in a group house and have a common computer you may want to share freely with people you know but otherwise limit expensive internet access. Not everyone has the same situation.  One suggestion last time was to "Open a terminal ... Then type passwd and the user name. So it should be passwd guest"  This didn't work in my hands, even with sudo. Linux replied "user 'guest' does not exist"  Am I doing something wrong?  If Ubuntu is not designed to allow a password on the guest account then, in the spirit of Linux, if you think this is a reasonable thing to do, let's look for a workaround.    Anyone?  (I'm a newbie, so let me know where I'm being naive.)

Want to set a guest session password for login. How do you do this after skipping it at OS install?


I made a new content type in Drupal 7 without problems, but now I want to hide the bottom block in the content Add and Edit fonctions This block as some url's parameters, comments parameters ...I don(t want to show to the users or registered users     I cant't find where and how I mask this blocks, Thanks for your help

I am trying to hide Authoring information, Revision information, Publishing options tabs in create/edit node for any content type. I tried different modules with no luck. Please give me suggestions how to achieve this. Thanks a lot


I have the following code:  Duties & \begin{itemize}[noitemsep]                 \item Inventory management; ordering and full monthly count   This outputs "Duties" and then a new line with the item, and several items follow. This falls within a larger table formed using tabularx. I was wondering if there was a way to prevent the new line and have "Inventory management..." fall to the right of "Duties" but then every subsequent item be below that.

I'm using itemize and tables like the following  \begin{tabularx}{\textwidth}{>{\ttfamily}llX}  \toprule  \textbf{\rmfamily Operator} & \textbf{Typen} & \textbf{Regel} \\  \midrule  = & Alle Typen &   \begin{itemize}    \item This is how we roll    \item Maybe we can talk?   \end{itemize} \\  \bottomrule \end{tabularx}   But it keeps inserting a vertical space before the itemized list. How can I prevent it from doing so?


I want draw     Here is my MWE using the code from      \documentclass{standalone} \usepackage{tikz}   \begin{document}  \begin{tikzpicture} \coordinate (p1) at (0.7,3); \coordinate (p2) at (1,3.3); \coordinate (p3) at (2,2.5); \coordinate (p4) at (3,2.5); \coordinate (p5) at (4,3.5); \coordinate (p6) at (5,4.1); \coordinate (p7) at (6,3.4); \coordinate (p8) at (7,4.1); \coordinate (p9) at (8,4.6); \coordinate (p10) at (9,4); \coordinate (p11) at (9.5,4.7);  % The cyan background \fill[cyan!10]   (p2|-0,0) -- (p2) -- (p3) -- (p4) -- (p5) -- (p6) -- (p7) -- (p8) -- (p9) -- (p10) -- (p10|-0,0) -- cycle; % the dark cyan stripe \fill[cyan!30] (p6|-0,0) -- (p6) -- (p7) -- (p7|-0,0) -- cycle; % the curve \draw[thick,cyan]   (p1) to[out=70,in=180] (p2) to[out=0,in=150]   (p3) to[out=-50,in=230] (p4) to[out=30,in=220]   (p5) to[out=50,in=150] (p6) to[out=-30,in=180]   (p7) to[out=0,in=230] (p8) to[out=40,in=180]   (p9) to[out=-30,in=180] (p10) to[out=0,in=260] (p11); % the broken line connecting points on the curve \draw (p2) parabola (p3) parabola (p4) parabola (p5) parabola (p6) parabola (p7) parabola (p8) parabola (p9) parabola (p10);%Changed % vertical lines and labels \foreach \n/\texto in {2/{a=x_0},3/{x_1},4/{},5/{},6/{x_{k-1}},7/{x_k},8/{},9/{x_{n-1}},10/{b=x_n}} {   \draw (p\n|-0,0) -- (p\n);   \node[below,text height=1.5ex,text depth=1ex,font=\small] at (p\n|-0,0) {$\texto$}; } % The axes \draw[->] (-0.5,0) -- (10,0) coordinate (x axis); \draw[->] (0,-0.5) -- (0,6) coordinate (y axis); % labels for the axes \node[below] at (x axis) {$x$}; \node[left] at (y axis) {$y$}; % label for the function \node[above,text=cyan] at (p11) {$y=f(x)$}; \end{tikzpicture}  \end{document}    I was trying to draw an illustration for Simpson's Rule, even if I changed -- to parabola here is what I got   Edited: From the diagram, it looks as if the (approximating)parabolas are determined by two points. How can I draw a parabola through three points.

I have been trying to build a macro \parabola{...} to draw a parabola passing through 3 coordinates with TikZ but without success.   For example  \parabola{A}{B}{C}   would draw the parabola interpolating the (x,y) coordinates (A), (B) and (C). I would like also to specify the style of the curve, the plot domain, etc.  The main problem I found is that I cannot figure out how to obtain the value of a given coordinate in dimensionless form (given a certain unit).


I run Arch Linux with texlive version 2019.52579-1. When I compile the LaTeX (Beamer) code below the table caption is "Figure: A simple table." That is, it includes "Figure:" instead of "Table:". The problem does not occur when the subfig package is not used. Suggestions (other than removing the subfig package) are welcome. Thank you.   \documentclass{beamer}  \usepackage[utf8]{inputenc} \usetheme{default}  \usepackage{subfig}  \begin{document}  \begin{frame}{A simple frame}  \begin{table}  \caption{A simple table.} \begin{tabular}{ll} \hline a & b \\ c & d \\         \hline                  \end{tabular}  \end{table}  \end{frame}  \end{document}

I run Arch Linux with texlive version 2019.52579-1. When I compile the LaTeX (Beamer) code below the table caption is "Figure: A simple table." That is, it includes "Figure:" instead of "Table:". The problem does not occur when the subfig package is not used or when the deprecated subfigure package is used instead. Suggestions are welcome. Thank you.   \documentclass{beamer}  \usepackage[utf8]{inputenc} \usetheme{default}  \usepackage{subfig}  \begin{document}  \begin{frame}{A simple frame}  \begin{table}  \caption{A simple table.} \begin{tabular}{ll} \hline a & b \\ c & d \\         \hline                  \end{tabular}  \end{table}  \end{frame}  \end{document}


I'm struggling to get my picture to appear straight after the text. I have used the following code:   \begin{figure}[h]   \includegraphics[width=\linewidth]{"Interaction Plot - Data1".png}   \caption{Interaction Plot for Data Set 1}   \label{fig:Interaction Plot for Data Set 1} \end{figure}   It currently appears several pages later after all sections.

I have a problem when a lot of figures are in question. Some figures tend to "fly around", that is, be a paragraph below, although I placed them before that paragraph. I use code:  \begin{figure}[ht] \begin{center} \advance\leftskip-3cm \advance\rightskip-3cm \includegraphics[keepaspectratio=true,scale=0.6]{slike/visina8} \caption{} \label{visina8} \end{center}\end{figure}   to place my figures. How can I tell latex I REALLY want the figure in that specific place, no matter how much whitespace will be left?


I wrote program .. the user must enter a string with format (Barcode,price:number of item) and I calculate the total of barcode  my code is  import java.util.*;  public class hanoofee2 {     public static void main (String args[]) {         Scanner input=new Scanner (System.in);          System.out.println("Enter a string with format (Barcode,price:number of item) ");         String ent = input.nextLine();         String barcode = ent.substring(0,(ent.indexOf(",")));         String price = ent.substring((ent.indexOf(","))+1,(ent.indexOf(":")));         String number = ent.substring(ent.indexOf(":")+1,(ent.length()));          double price2 = Double.parseDouble(price);         int number2 = Integer.parseInt(number);         double total = price2 * number2;          String m = "";         if(barcode == "11A") {             m ="green pen";         } else if(barcode == "22B") {             m ="printer";         } else if(barcode == "44C") {             m ="Memory card";         } else if(barcode == "44D") {             m ="Cook book";         }          System.out.printf("The total price of%2s "+" is:%.2f ", m ,total);     } }   every things are ok but when I press run the value of " m" does not display       Enter a string with format (Barcode,price:number of item)         22B,222:30        The total price of    is:6660.00          ----jGRASP: operation complete.   what is the problem ?!

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


setInterval() Inconsistencies  I am trying to create an object that works like a stopwatch, but there is a 100 millisecond difference between Chrome and Firefox browsers.  The code and test below fails in both Safari and Chrome but passes in Firefox.  Question: Why does this happen?  Questions: How to achieve Consistency with this object across browsers?  You can run this  in several browsers and watch the test pass or fail.  The sample is on JSBIN so you can also make code changes to it.  Timer Object (SUT)  I've built a Timer object that essentially works like a stopwatch:  function Timer() {   this.interval = null;   this.time = 0; }  Timer.prototype.start = function () {   var self = this;   this.interval = setInterval(function () {     self.time += 100;   }, 100); };  Timer.prototype.stop = function () {   clearInterval(this.interval); };   Timer Test (jasmine)  This test starts and stops the timer.  It fails in Chrome but passes in FireFox.  describe("Timer", function () {    it("should stop and record time accurately", function (done) {     var timer = new Timer();     timer.start();     setTimeout(function () {       expect(timer.time).toEqual(600);       done();     }, 600);   });  });

Something that has always bugged me is how unpredictable the setTimeout() method in Javascript is.  In my experience, the timer is horribly inaccurate in a lot of situations. By inaccurate, I mean the actual delay time seems to vary by 250-500ms more or less. Although this isn't a huge amount of time, when using it to hide/show UI elements the time can be visibly noticeable.  Are there any tricks that can be done to ensure that setTimeout() performs accurately (without resorting to an external API) or is this a lost cause?


In my .bashrc file are these lines  if [ -f ~/.bash_aliases ]; then     . ~/.bash_aliases fi   I know that . <file> syntax is very popular...what is it doing exactly? How might this be different than running  source ~/.bash_aliases

I was wondering if the following two ways of running a bash script are equivalent?  . ./myScript.sh  source myScript.sh  Are they both running the content of the script instead of running the script, i.e. not creating a subshell for running the script?


I know... Origin to 3D cursor but it's not that Here's the start:   Here's the end:   And Here's the middle showing the problem:  Is there any way I can stop it from going off?

How do I create a hinged door that opens and closes in Blender? If I knew how to do this, then it would help me also create moving control surfaces on model aircraft, such as the rudder and horizontal stabilizers.


I have a dictionary where each value is a list of lists.  Something like:  sites = {'e1': [[0, 1, 3], [0, 2, 3]], 'e2': [[0, 1, 4], [0, 3, 4]]}   I want to loop through all possible combinations (i.e. pairs in my example) of lists (i.e. one list of e1 + one list of e2, etc.).  Better with the example:  I want to loop through all these combinations:  [0, 1, 3]; [0, 1, 4] [0, 1, 3]; [0, 3, 4] [0, 2, 3]; [0, 1, 4] [0, 2, 3]; [0, 3, 4]   This example dictionary has two keys but in practice I do not know how many keys I'll have in my dictionary. It could be more than two.  Can you help?

How can I get the Cartesian product (every possible combination of values) from a group of lists?  Input:   somelists = [    [1, 2, 3],    ['a', 'b'],    [4, 5] ]   Desired output:  [(1, 'a', 4), (1, 'a', 5), (1, 'b', 4), (1, 'b', 5), (2, 'a', 4), (2, 'a', 5) ...]


At present, any votes that are to close have priority. Normally thing would be that if someone wants the thread closed that a single vote should be registered. Then if someone wants to keep the thread open that that vote should be annulled. At present, close votes are preferences until the thread is closed. But by then the thread loses momentum and is is basically cast aside.   Logic would say that if someone choices to close and some chooses to keep open that the count should be zero.   Why the biased system towards closing threads, is that the policy of stack? Why can't a vote to keep the thread open negate the close vote, before the thread is actually closed?  Simple really, 3 votes to close, 3 votes to keep open. This should mean zero on the close votes .

My request is simple: Many times, there will be a question where some people feel like it should be closed. At the same time, I'll feel like it's a perfectly legit question, and it should therefore NOT be closed. Right now, I have to wait till it gets enough close votes (which it always does for some reason, as soon as 1 or 2 people vote to close, e/o else decides to vote as well) and then vote to re-open. How about, as soon as there's one vote to close, there should be an option to counter the close vote, something like "vote not to close" or whatever. This would then bring the "Vote to close" number down by one. Only when the vote to close outnumbers the vote not to close by 5, that's when a question is indeed closed. Any thoughts?


I want to recover my clash of clans that connected to facebook. And i will save it to google play store. But I dont know how.

I unintentionally and stupidly wiped my Clash of Clans game data. I went to Application Manager on my Android and clicked 'Clear data'. (I used this for fixes before and it never started a new game.)   Now, my level 60 or so base has been wiped as if was to start a new game. Have I doomed myself to starting again or is there a way in which I can retrieve my old game save? Maybe by contacting Supercell? I have a snapshot of my base.


He created it.  Put me in touch with him.   So which is correct and why:   Put me in touch with whomever created it. Put me in touch with whoever created it.

On the subject of "whoever" and "whomever", I was reading this but I am still confused:   What is the correct use of whoever/whomever in the following sentence?     I like your copy, congratulations, whoever is writing it.   Whoever? Whomever?   Is there a difference between US and UK English?


Andy's preferred pronoun is "they". They goes to school in Denver, where they studies philosophy.   or      Andy's preferred pronoun is "they". They go to school in Denver, where they study philosophy.   Also, should Andy refer to himself as "I" or "we"?

This is NOT a question about whether they/them is acceptable as a singular pronoun. I know some of you will have to die before you give that argument a rest, but I am starting here with the presumption that them/them IS an acceptible alternative to refer to non-binary gendered people. On to the question...  I was writing about a person who prefers the pronoun "they/them":     Talk to Abigail when they are a resident.   After I wrote it, I realized (assuming here in 2016 that "they" can serve as a singular pronoun - and more so here in 2017) that technically there is a lack of subject verb agreement. More correctly, I should write:     Talk to Abigail when they is a resident.   But of course that sounds terrible and wrong to my ear.  As they/them becomes an acceptable singular pronoun, do we amend the subject-verb agreement rules to use a plural verb with this singular subject?


By US federal law (or maybe regulation? not sure which) it is not allowed to use the bathroom or get out your seat while the seatbelt sign is lit.  Thank god, it has never happened to me, but what if there is a diarrhea emergency when the seatbelt sign is lit? Assume that the flight attendant tells me to "get back in my seat" if I rise to try to use the bathroom. In that situation should I just crap in the seat? My guess is that the neighboring passengers will not like flying for the next 6 hours smelling my diarrhea, and I certainly will not like sitting in my own diarrhea for 6 hours.  Note that this can be a concern especially when the plane is stuck on the taxiway. Sometimes, while waiting to takeoff, the plane can be stuck on the taxiway for 30 minutes or more.  The problem may also affect parents who are traveling with children.

This question about  over on  made me wonder what a passenger is supposed to do when they urgently have to use the restroom while the fasten seat belt light is on. FAA regulations require passengers to obey the seat-belt sign, even if flight attendants do not.  I saw this happen on a flight where an older gentleman asked the flight attendant if he could use the restroom, and she said "not until the light is off". The flight had been free of turbulence for 15 minutes or so by this time, and the flight attendants were walking freely throughout the cabin, collecting post-meal trash, etc. The gentleman who asked to use the restroom appeared to be in quite some discomfort, and practically ran to the restroom when the light went off 10 minutes later.  So what is a passenger supposed to do when he isn't permitted to use the lavatory, when he has to go and can't wait? Just go in their seat?


I'm a business student and I'm really fond of computer science and engineering. Is it possible to apply for cs major in computer science? If not, is it possible to apply for MaSc in Master of Business Analytic then continue to study in CS?

Can I be admitted to graduate school in a different field from my degree?  Specific cases include:   If I've taken plenty of advanced courses in field X in the process of completing a degree in another field, can I apply to graduate school in X? What if I haven't taken many courses in X, but I have acquired a good grasp of X through self-study or working in a related field? What if I've never studied X, but I have done very well in an unrelated field?  Could I be admitted to graduate school in X on the basis of general intellectual promise, and then make up the missing background after enrollment?   Note that this question is an attempt to provide a comprehensive answer, to avoid the need for a profusion of field-specific questions on this topic (see the associated ). Please feel free to edit the question or answer to improve them.


I am curious to read your thoughts on the matter.

I have observed a growing trend in which people substitute "no problem" for "you're welcome" as a response to "thank you".  In particular, it seems to be an increasingly common response from servers and store clerks.  It seems to me that "no problem" isn't appropriate for all situations as a response to "thank you", such as when I express thanks for receiving a cup of coffee at the local doughnut shoppe.  To me, responding "no problem" to "thank you" implies there might have been a problem, which was somehow narrowly averted.  Are there specific situations in which "no problem" is appropriate to use as a substitute for "you're welcome"?


Is there a way to export and then import downloaded/saved e-mail from the default apple e-mail client to outlook 2011?

I am stuck in a situation here. I am migrating my email database from Apple Mail to Windows Outlook. Plenty of my emails were on the online web mail that were automatically downloaded when I signed in Outlook for windows but there are many emails that are offline and stored in apple mail. How can I migrate those emails from Apple mail to Windows Outlook?


I have the following code for inserting new row into the database:  $query = "INSERT INTO files_requests VALUES (NULL, ?, ?, ?, ?, ?, ?, {$userinfo['id']}, 0, ". time() .", 0)";     $stmt = $mysqli->prepare($query);     $stmt->bind_param('isssss', $listID, $files, $filesize, $audio, $subtitles, $fansub);     $stmt->execute();   Is there a way to see the query after the bind_param is done?  I know I can use echo to view and see the variables: echo "('isssss', $listID, $files, $filesize, $audio, $subtitles, $fansub)"; , I would like to view the query itself with the variables inside it. Is there any function I can run on the stmt object or mysqli, to display the query before it is executed, beside create an echo statement myself?

Is there a way to get the raw SQL string executed when calling PDOStatement::execute() on a prepared statement? For debugging purposes this would be extremely useful.


How does the OS break up command line arguments into an array?  I have a custom interpreter for an application that takes a hideously large number of arguments in complex combinations. I absolutely do not want to use the third-party solutions out there. I have a map set up that allows me to parse and generate these parameters.  While writing unit tests, I would like to take a generated string and split it exactly the way the OS does. I could launch a process with the generated string but I don't want to do that and pollute the unit tests.  Surely Windows must have a function it uses to do this before firing up the executable. I assume that's why we can simply pop the argument array reference off the stack in our entry point.

I have a single string that contains the command-line parameters to be passed to another executable and I need to extract the string[] containing the individual parameters in the same way that C# would if the commands had been specified on the command-line. The string[] will be used when executing another assemblies entry-point via reflection.  Is there a standard function for this? Or is there a preferred method (regex?) for splitting the parameters correctly? It must handle '"' delimited strings that may contain spaces correctly, so I can't just split on ' '.  Example string:  string parameterString = @"/src:""C:\tmp\Some Folder\Sub Folder"" /users:""abcdefg@hijkl.com"" tasks:""SomeTask,Some Other Task"" -someParam foo";   Example result:  string[] parameterArray = new string[] {    @"/src:C:\tmp\Some Folder\Sub Folder",   @"/users:abcdefg@hijkl.com",   @"tasks:SomeTask,Some Other Task",   @"-someParam",   @"foo" };   I do not need a command-line parsing library, just a way to get the String[] that should be generated.  Update: I had to change the expected result to match what is actually generated by C# (removed the extra "'s in the split strings)


I don't know if this could be combined to include a recommendation as well as 2 questions, but I noticed that quite a few questions on SO have duplicates.    I would like to know whether these duplicates remain open forever, or are they eventually removed over time? Also, (the recommendation - kind of - part) are similar questions that are marked as duplicates used for machine learning to train the Lucene search to optimize better and decrease the volume of duplicate questions?

What should I do when I see a question that is a duplicate of another one?   Should I answer it? Should I downvote it? Should I comment? Should I edit the question to indicate it's a duplicate? If I can, should I (vote to) close the question? What happens when I vote to close as duplicate? Or: Why did a comment with my name on it just appear? Should I flag it for moderator attention? What about similar or related questions?


Let $G$ be a group and $|G|=8$, then $G$ has proper nontrivial subgroups of order $4$. I can't see why. Does it follow by Sylow Theorem?

I am participating in an Introductory course in groups and I have the following question:     Let $G$ be a finite group of order $8$. Prove that $G$ has a subgroup of order $4$ and a subgroup of order $2$.   i know how to prove that $G$ has a subgroup of order $2$ but i can't show the existence of a subgroup of order 4. I am only a begginer in groups so please take this into account.


In the Sources Tab, I can see the init() function and have set a breakpoint.  To verify that it works, I want to execute the function to see the output and stop at the set breakpoint. function init() {     console.log("main.js init");   }  In the console, I entered:  > init(); and got back "ReferenceError: Can't find variable: init. Tried:  >init()  and got the same thing. My background is in native code, Swift and ObjectiveC.  So this is new to me and I'm not finding any examples or documentation online.

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


so I got Ubuntu Core up and running on a Raspi 3. Now I tried out a few snaps, but when it comes to snaps with a GUI I face a problem (I am connected via ssh). So I run gimp  and it gives me the output: Cannot open display:    That's it. I know that there are often issues with the display output when connected via ssh, but I could not solve it with the export DISPLAY command. Does anyone have a clue? I would like to see gimp open and running on a screen connected via HDMI to the raspi.  I do not want to use SSH forwarding, because for my problem I won't have another device connected to the raspi during runtime.

How do you use Xforwarding through SSH beetween two ubuntu pc's?


I'm using Akismet for spam in my site comments. Works great but, when I go to my spam box to look for false positives, I would rather not see mouseover previews of the porno sites that have collected in the spam box. Is there a way to turn off these automatic popup link previews in the comment/spam moderation queue?

It can be sometimes bothersome when, in the Discussion (Comments) dashboard, where the admin can see a list of comments, moving the mouse over a link will cause a preview of that link. Sometimes the preview gets in the way of looking at the comment. This is especially true with spam comments.  And I am also concerned that a link to a page/site that had some 'bad' code would cause a compromise of my site.   Is there a way to disable this 'feature'? Not sure where it is coming from.


So I'm new to uniform continuity and this is just an exercise that was scribbled on the board in my real analysis class. But it's is a tricky question for me:  if $f:R\to R$ is periodic with period P (so $f(x+P)=f(x)$) and $f$ is continuous on $(0,p+a)$ for some $\epsilon >0$, then $f$ is uniformly continuous  how can we go about proving this?

A function $f:\mathbb{R}\to \mathbb{R}$ is periodic if there exits $p>0$ such that $f(x+P)=f(x)$ for all $x\in \mathbb{R}$. Show that every continuous periodic function is bounded and uniformly continuous.   For boundedness, I first tried to show that since the a periodic function is continuous, it is continuous for the closed interval $[x_0,x_0+P]$. I know that there is a theorem saying that if it is continuous on a closed interval, then it is bounded. However, I'm not allowed to state that theorem directly. Should I just aim for a contradiction by supposing f is not bounded on the interval stated above?


I was installing Metasploit using the script invocation for quick installation and as I pasted the script in the terminal the error  ./msfinstall: line 1:syntax error near unexpected token 'newline' ./msfinstall: line1: '<DOCTYPE html>'   appeared. How can I fix this?

I want to install metasploit and armitage on my ubuntu 16.04 LTS laptop running kernel 4.6  I've read blogs and posts on how to install it but the problem is is that they are outdated. The packages are not there anymore and or the commands dont work.  If anyone can give me an updated tutorial on how to install it that would be great. I also think other users that see this post and want to install it will also be thankful. Thanks.


I have a Dell Dimension 9150 running Windows XP and Ubuntu 12.04 . Both are 32bit.  Could I load a 64 bit Ubuntu OS ? For instance I am limited to 3.7gb RAM on 32 bit. If I unloaded Windows and ran only Ubuntu, could I use a 64 bit version and would this relly make the machine a 64 bit machine?

I'm using a 32-bit operating system. How can I check if my hardware supports 64-bit?


I am getting the error java.lang.NullPointerException while implementing priority queue with nodes. Does anyone have a solution without using built in priorityqueue class?  class node {                          //NODE CLASS      public String ch;     public int freq;     node right_child, left_child;      public node(String ch, int freq) {         this.ch = ch;         this.freq = freq;      }      public String get_char() {         return ch;     }      public int get_freq() {         return freq;     }  }  //END NODE CLASS class priority_queue {      private final int size;     private final node[] q_array;      private int no_items = 0;      public priority_queue(int max) {         this.size = max;         q_array = new node[size];     }      public void insert(node item) {         int j;         if (no_items == 0) {             q_array[++no_items] = item;             System.out.println("first item");         } else {             for (j = no_items - 1; j >= 0; j--) {                 if (item.get_freq()> q_array[j].get_freq()) {                     q_array[j + 1] = q_array[j];                  } else {                     break;                 }              }             q_array[j] = item;             no_items++;         }     }      public node remove() {         return q_array[--no_items];      }      public void process() {         node first, second;         int new_freq;         while (q_array.length > 1) {             new_freq = 0;             first = this.remove();             //f1 = first.freq;             second = this.remove();             //f2=second.freq;              new_freq = first.get_freq() + second.get_freq();             node new_node = new node("*", new_freq);             new_node.left_child = first;             new_node.right_child = second;             this.insert(new_node);          }      }

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?


My teacher showed us a proof by induction for this equation for $n\in\mathbb{N}$:  $$\sum\limits_{k=0}^n{{n}\choose{k}} = 2^n$$  In the first step, this sum is rewritten using ${{n+1}\choose{k}}={{n}\choose{k-1}}+{{n}\choose{k}}$.   However, he doesn't explain why this would be - and since he just introduced binomials coefficients, I assume it's something trivial, which I just don't see. I can't figure out why this would hold though.  I tried rewriting the binomial coefficients with ${{n}\choose{k}}=\frac{n!}{k!\cdot(n-k)!}$ when $n,k\in\mathbb{N}$ and $n\geq k$:  $${{n+1}\choose{k}}=\frac{(n+1)!}{k!\cdot(n+1-k)!}$$  $${{n}\choose{k-1}}=\frac{n!}{(k-1)!\cdot(n-k+1)!}$$  $${{n}\choose{k}}=\frac{n!}{k!\cdot(n-k)!}$$  But I can't prove:  $$\frac{(n+1)!}{k!\cdot(n+1-k)!} \stackrel{?}{=} \frac{n!}{(k-1)!\cdot(n-k+1)!} + \frac{n!}{k!\cdot(n-k)!}$$  Am I on the right track? Is there a basic idea behind this equation which makes you see it easily?

I'm trying to prove that ${n \choose r}$ is equal to ${{n-1} \choose {r-1}}+{{n-1} \choose r}$ when $1\leq r\leq n$.  I suppose I could use the counting rules in probability, perhaps combination= ${{n} \choose {r}}=\frac{n!}{r!(n-r!)}$.  I want to see an actual proof behind this equation.  Does anyone have any ideas?


I am trying to evaluate the following sum using an algebraic approach. Here is what I have tried.  $$\sum_{k=0}^{n}{n+k\choose n}\frac{1}{2^{k}}$$   The given sum is just the coefficient of $x^{n}$ in the expansion of $\sum_{k=0}^{n}(x+1/2)^{n+k}$, which simplifies to the following expression $$\left(x+\frac{1}{2}\right)^{n}\frac{\left(x+\frac{1}{2}\right)^{n+1}-1}{x-\frac{1}{2}}=2\left(x+\frac{1}{2}\right)^{n}\left[1-\left(x+\frac{1}{2}\right)^{n}\right]\sum_{r=0}^{\infty}2^{r}x^{r}$$  I am not able to proceed further. Any hints are appreciated. Thanks.

How does one show that $$\sum_{k=0}^{n}\binom{n+k}{k}\frac{1}{2^k}=2^{n}$$ for each nonnegative integer $n$?  I tried using the  but I guess I am applying it incorrectly. With the snake oil technique we have $$F(x)= \sum_{n=0}^{\infty}\left\{\sum_{k=0}^{n}\binom{n+k}{k}\frac{1}{2^k}\right\}x^{n}.$$ I think I have to interchage the summation and do something. But I am not quite comfortable in interchanging the summation. Like after interchaging the summation will $$F(x)=\sum_{k=0}^{n}\sum_{n=0}^{\infty}\binom{n+k}{k}\frac{1}{2^k}x^{n}?$$ Even if I continue with this I am unable to get the correct answer.  How does one prove this using the Snake oil technique?  A combinatorial proof is also welcome, as are other kinds of proofs.


Is the word 'neo-scholasticism' capitalized in academic writing, or not? It is lowercase in the Merriam Webster dictionary, but capitalized in the Collins English dictionary. So in a thesis, which would be correct: Option A: neo-scholasticism Option B: Neo-Scholasticism

Do I need to capitalize "modernism" or "modernist"?


Is there at all a way to make underscores and carets persistent in LaTeX math mode? What I mean, is to be able to write several-character sub/superscripts without using curly brackets. Could LaTeX maybe understand that a white space determines the end of my sub/superscript?  A quick example. I'd like to have something like  x_ij y_ij   Compile to the same result as  x_{ij}y_{ij}   I understand that this is probably not a really reliable thing, but I'm looking to take notes faster during class!  Many thanks

Well, I liked the idea expressed in the question . But I want it to work in a sightly different way.  I just want to expand the usual _ and ^. How? So that the code escapes from the sup/subscript if there is a space (see exceptions at the bottom):   a_11 + b_123ijk + c_k\ell should be the same as a_{11} + b_{123ijk} + c_{k\ell}. And the same for superscripts: m^qwpoeriu equal to m^{qwpoeriu}.   At this moment, I have this code in my preamble (it helps if you want to write F_\mathrm{max} you can do it like F_|max|), so the solution should't break it  \makeatletter \begingroup\catcode`\_=\active\protected\gdef_{\@ifnextchar|\subtextup\sb}\endgroup \def\subtextup|#1|{\sb{\mathrm{#1}}}  \AtBeginDocument{\catcode`\_=12 \mathcode`\_=32768} \makeatother   Why?  I usually space my code \biggl( a_b \cdot \cos(x - c) = 1 \times \vec v rather than \biggl(a_b\cdot\cos(x-c)=1\times\vec v, because I find it much more easier to read. So this would easily work well for me since in so many times I wouldn't need to write {}. Of course, there are moments where I still need to do it, i.e., \alpha_k\ell + \alpha_{\ell k} = 1.  EDIT: More things. I'm not particularly interested in a_b_c_d + e to be like a_{b_{c_d}} + e (and the same with ^), but I think it would be great if that also worked (which means that the space should escape all the sub/superscripts).  More things, NOT only the space should escape the sub/superscript, also this:   the alternative sup/subscript, i.e.: a_b^c + 1 = 0 should work as a_{b}^{c} + 1 = 0, and a^blk_ijk as a^{blk}_{ijk}, the ending of math $a_bcde$ should be like $a_{bcde}$, and also a closing brace: \frac{1}{a_ijk} equal to \frac{1}{a_{ijk}}.


Whenever I open a terminal, I have to write  export PATH=~/anaconda3/bin:$PATH   to use any feature of anaconda  I want a persistent path.

How do I add a directory to the $PATH in Ubuntu and make the changes permanent?


Let $\mathbb{P}^n$ be the complex projective $n$-space and let $\mathcal{H}$ be the dual bundle of the tautologic line bundle over $ \mathbb{P}^n$. I have a feeling that the author of a paper I'm reading is calling a section of  $\mathcal{H}^{\otimes r}$ a "homogeneous polynomial of degree $r$ in $n+1$ variables". I can (kind of) roughly see why one might conceive of a section of this bundle as such. My question is: is there an exact correspondence between homogeneous polynomials of degree $r$ in $n+1$ variables and sections of $\mathcal{H}^{\otimes r}$, or is it just convenient and intuitive shorthand, or neither?

In chapter 2 section 7 (pg 151) of Hartshorne's algebraic geometry there is an example given that talks about automorphisms of $\mathbb{P}_k^n$. In that example Hartshorne states that $\mathcal{O}(-1)$ has no global sections. However, we know that $\mathcal{O}(1)$ is generated by global sections. This is stated at the first of the section that if $\mathbb{P}_k^n = Proj k[x_0,...,x_n]$ then the $x_0,...,x_n$ give rise to global sections $x_0,...,x_n\in\Gamma(\mathbb{P}_k^n,\mathcal{O}(1))$.  I guess I don't understand this twisted structure sheaf very well, or to be honest I don't think I understand structure sheaves in general as well as I would like. The twisting part seems simple at first- you shift the grading of Proj over and then take the structure sheaf.  Admittedly I don't feel comfortable using the structure sheaf other than using the basic facts about it that Hartshorne gives when it is introduced. If anyone could give some insight as to what's going on here or how I might be able to understand this better it would be much appreciated. Thanks.


i get this error when ever i try to compile my code here is the error      Error  1   An object reference is required for the non-static field, method, or property   below is my code  private void btnGenerate_Click(object sender, EventArgs e) {     frmFaultyDeviceByPeriod.FirstDate = dateTimePicker1.Value;     frmFaultyDeviceByPeriod.SeconDate = dateTimePicker2.Value;     frmFaultyDeviceByPeriod.Show(); }   the form am trying to call has the below code   public System.DateTime FirstDate; public System.DateTime SecondDate;   what am i doing wrong.. help please

Consider:  namespace WindowsApplication1 {     public partial class Form1 : Form     {         public Form1()         {             InitializeComponent();         }          private void button1_Click(object sender, EventArgs e)         {             //int[] val = { 0, 0};             int val;             if (textBox1.Text == "")             {                 MessageBox.Show("Input any no");             }             else             {                 val = Convert.ToInt32(textBox1.Text);                 Thread ot1 = new Thread(new ParameterizedThreadStart(SumData));                 ot1.Start(val);             }         }          private static void ReadData(object state)         {             System.Windows.Forms.Application.Run();         }          void setTextboxText(int result)         {             if (this.InvokeRequired)             {                 this.Invoke(new IntDelegate(SetTextboxTextSafe), new object[] { result });             }             else             {                 SetTextboxTextSafe(result);             }         }          void SetTextboxTextSafe(int result)         {             label1.Text = result.ToString();         }          private static void SumData(object state)         {             int result;             //int[] icount = (int[])state;             int icount = (int)state;              for (int i = icount; i > 0; i--)             {                 result += i;                 System.Threading.Thread.Sleep(1000);             }             setTextboxText(result);         }          delegate void IntDelegate(int result);          private void button2_Click(object sender, EventArgs e)         {             Application.Exit();         }     } }   Why is this error occurring?     An object reference is required for the nonstatic field, method, or property 'WindowsApplication1.Form1.setTextboxText(int)


With these settings in Chrome, everything works fine.        But with these settings, I cannot login.        And with the above settings, clicking these login buttons also do nothing, no effect, no response.        Is this how Stack Exchange login is designed?

There are lots of question related the same. But none of them helped me to get rid of this error “Third Party Cookies Appear To Be Disabled”.  I get the answer as my sytem time is wrong  from that questions. Yes my sytem time was wrong at first.  But after I corrected the system time, still the error persists in Chrome 23.   The Firefox 17 is working fine for me.


Suppose that a fair $6$ sided die is rolled 100 times. Let $X_i$ be the value obtained on the $i$th roll. Compute an approximation for $ P\left(\prod X_i \le a^{100}\right)$ for $1 < a < 6$.  I'm thinking about using Central Limit Theorem but not sure how. Any help is appreciated!

Ello, my teacher gave me a simple exercise but I'm stuck.     Rolling a die 100 times, denote the outcome of roll $i$ by $X_i$. Estimate the probability $$ \Pr\{\prod_{i=1}^{100}X_i\leq a^{100}\}$$ for real $1<a<6$   I think that $$ \Pr\{\prod_{i=1}^{100}X_i\leq a^{100}\}=(\Pr\{X_1\leq a\})^{100}$$ by trying to find a solution numerically. Is it correct and why ?  Thanks, Herosix


From :     The neutrino was postulated first by Wolfgang Pauli in 1930 to explain how beta decay could conserve energy, momentum, and angular momentum (spin). In contrast to Niels Bohr, who proposed a statistical version of the conservation laws to explain the event, Pauli hypothesized an undetected particle that he called a "neutron" in keeping with convention employed for naming both the proton and the electron, which in 1930 were known to be respective products for alpha and beta decay.[6][nb 2][nb 3]      n0 → p+ + e− + νe James Chadwick discovered a much more massive nuclear particle in 1932 and also named it a neutron, leaving two kinds of particles with the same name. Enrico Fermi, who developed the theory of beta decay, coined the term neutrino (the Italian equivalent of "little neutral one") in 1933 as a way to resolve the confusion.[7][nb 4] Fermi's paper, written in 1934, unified Pauli's neutrino with Paul Dirac's positron and Werner Heisenberg's neutron-proton model and gave a solid theoretical basis for future experimental work.   Can you explain why beta decay could not be explained by adding that tiny amount of energy (attributed to the neutrino) to the KE of the emitted electron?

Why do we need neutrino to explain neutron ? Is there any evidence regarding existence neutrinos in the context of $n\to p + e + \bar{\nu}_e$?


Consider the following scenario.  We have Goku, Vegeta and Trunks. Amongst the 3 they have 2 pairs of potara earrings.   Can Goku and Vegeta fuse using 1 pair of potara earrings and then using the other pair of earrings can Vegito and Trunks fuse ?  I understand potara earrings can only be used once in a lifetime, but here we have 2 pairs of potara earrings. So does the rule still apply ? If it does then Goku and Vegeta both use the potara twice, once in the buu saga and now in the next DBS episode. Or does this mean that Goku can only now fuse with Vegeta using the potara earrings ?

Supreme Kai and Kibito fused using the Kai Earrings. Can now Kibito Kai use the earrings again to fuse with another?  I searched for this and found no creditable source.  I know for a fact that the ear rings still work, since they were offered by Kibito Kai to Goku and Vegeta before the battle against Kid Buu. However they destroyed it. So could Kibito Kai use it to fuse again?  Edit: Accepted answer has added a somewhat relevant frame. It doesn't make it explicit but seems to indicate that fused individuals such as Elder kai, Kibito Kai and Vegeto can no longer fuse again.


Assuming I have a the a list of 9 items,  I want to convert it into a list of 3 by 3 items  from [1,2,3,4,5,6,7,8,9] -> [[1,2,3],[4,5,6],[7,8,9]]  this is the code:  def main():      L = range(1,10)     twoD= [[0]*3]*3     #creates [[0,0,0],[0,0,0],[0,0,0]]      c = 0     for i in range(3):         for j in range(3):             twoD[i][j] = L[c]              c+=1   for some reason this returns   twoD = [[7, 8, 9], [7, 8, 9], [7, 8, 9]]   and I have no clue why, what is making it do this?

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:


You’re given a bag containing $n$ pieces of thread of length $l$.  $ $ You’re asked to reach down the bag and randomly pull out one end of a thread.  You’re then asked to knot this end to another end of a thread (that you also pull out randomly from the bag).  $ $  $ $ You have to do this $n$ times.    At the end of this activity, how many loops of thread will you have?  $$ $$    I was given this problem some time back, but sadly, it didn’t come with a solution. After multiple approaches, I’m fairly sure that we can’t give a definite answer as a function of $n$ and/or $l$ (at least, it doesn’t seem obvious). $ $   It seems the answer will be more probabilistic and less combinatorial $ $ (I may be wrong).   e.g.: the probability of making a loop on the first two picks would be $\frac{1}{2n-1}$, on the next two picks (if you did make a loop on the first two) would be $\frac{1}{2n-3}$, and so on.  $ $  $ $ I’m not sure how to develop much further from here.

There are 100 ropes in a bag. In each step, two rope ends are picked at random, tied together and put back into a bag. The process is repeated until there are no free ends. What is the expected number of loops at the end of the process?


I am a python programer, and have been working on windows 8.1 and 10 for a while, but after a bit of research i think i want to switch to some ubuntu/linux software, which one should i use?

What are the differences between an Ubuntu Long Term Support release (LTS) and a normal release?


Even after downloading and installing icon packages this problem still remains as you can see in the picture

How does one refresh thumbnails in nautilus? In my videos folder I have some MKVs and only half of them have the movie border and a excerpt from the movie and the others (also MKVs encoded in the same way) just have the ordinary film icon.  (F5 doesnt do it.)


When I search my website on Google I get URLs like: http://example.com/article.php?movie=150  And my new url is: http://example.com/online-stuff/150/title-of-article  How do I get Google to re-crawl my website and index only my new URLs?

I'm refactoring my ASP.net application from ASP.net 3.5 to 4.0. Also I'm changing the URLs to user friendly URLs /product.aspx?id=100 to /product-name/100.  All my pages are indexed by search engines and the site has already been online for 6 years. I'm planning to do 301 redirect from the old pages to the new one.  I want to make sure I won't lose the rankings and traffic.  Any suggestion how to do it properly?


I recently installed version Windows7 alongside my Ubuntu 14.04 and noticed that despite the time zone being in the correct setting (Pacific Standard time), that the Clock Was off by several hours in Ubuntu. I searched online for answers and read somewhere that deselecting the 'sync with internet clock' might help the issue. It did seem to resolve the issue for the short-term, but after some updates I have noticed once again that my system clock is 7 hours ahead. Looking into the BIOS I discovered that the clock there was being reset.   What brought it to my attention was that my f.Lux in UBuntu wasn't turning on at the right times, so I went and checked the time in BIOS and noticed that it was forward by 7 hours. This explains a few things, ans I suspected its probably the battery, BUT something weird is happening that tells me otherwise.     If I go into BIOS and set the clock to the correct time, and then load into Windows, everything stays fine. I can restart the system into Windows and nothing changes in the BIOS or Windows time. If I log into Ubuntu via the Windows bootloader the time changes in the Ubuntu Clock to be behind 7 hours. If I reboot again into Ubuntu the Ubuntu clock is still off and the BIOS clock is normal. The only time the clock chnage sin the bIOS is when I change the time in UBuntu clock, (either by selecting manaul or internet sync).    What is strange is that after the BIOS is modified to have the wrong time, the clock in Ubuntu will seem correct by displaying the right time. If I fix the time in the BIOS, log straight Into ubuntu wia windows bootloader, the Ubuntu clock will be off.    Its almost as though Ubuntu cant read the BIOS clock properly or sync with it.   Running Windows7 64 bit alongside Ubuntu 14.04 64 bit

Dual boot system Windows XP Pro and Ubuntu 12.04.  I have the bios set for the correct time and Ubuntu set for US Eastern time.  Ubuntu will boot up and the time will be off by -4 hours.  If I correct the time in Ubuntu then when I boot up in Windows XP the time will be off by + 4 hours.  This is a fresh install of 12.04. I did not have this problem before reinstalling Ubuntu.


When I was 17, I applied for a UK visa with my friend who was noted as my company (since she’s older than 18). On my visa, it specifically says that I can only enter the UK if I am accompanied by her. Now I have turned 18 and would like to travel to the UK alone. Would it be allowed for me to travel without my former company even though it says her name on the visa? Or would I have to wait till my visa runs out and apply for a new one?

I got a visa with my mother when I was 17 years old. On it was stated "Not valid unless accompanied by my mother".    Can I travel to the UK alone now that I am 18?


Many people use "should of" and "would of" which is wrong, where "should have" and "would have" would be right.  (wrong) - You should of gone to the party.  (right) - You should have gone to the party.  Even more people use "if" in a wrong way, where "whether" would be right.  (wrong) - I don't know if she went to the party  (right) - I don't know whether she went to the party  It seems that at some point enough people can use some wrong grammar that they reinforce each other, and it becomes out of control.  My question:  Does this wrong grammar ever become right? If it does, at what point does it? Is it when the majority of native speakers use this wrong grammar?

First let me state the obvious—based on my own experience—that hordes of people are confused about certain basic grammar principles. For example, I so often see mistakes in choosing the pronoun to use with direct objects, especially when introduced by and with another person, as in "Joe talked about the book with Anna and [I/me]." Another one is the near 100% usage of "lay" instead of "lie" (and "laid" instead of "lay") nowadays, even in published sci-fi books that most certainly had professional editors proofread them.  Do you see these kinds of changes as predictors of the future? Will they become correct after enough people have used them long enough?  Both of these problems drive me bonkers, and I fight my own little battle against them when possible.  I know that dictionaries are descriptive rather than prescriptive. They're technically history books. But grammar and style books seem less so, to me. Those seem as though they ought to be prescriptive in order to reduce the erosion of structured and meaningful language.  In this tension between "what people are doing" and "what people should be doing," are we doomed to forever bear these errors just because too many people don't know the proper way? Is it worth fighting against them? Do I capitulate to the people who are quick to accept any mass public usage as a fait accompli?  Update  I don't imagine for a second that my own writing is error free. The difference with me is that when I do learn I have something wrong in my mind, I immediately change once I clearly understand it.  I also am not imagining that language is static or ignorant that today's correctness is all too often yesterday's error. The whole point of my question here, then, is: is there value in slowing the change, and if so, how is that done and how effectively?  Another way to look at what I'm trying to ask is that in a way I am hoping to define the limits of pedantry. If being pedantic is slavish adherence to outdated rules in the face of actual and foregone changed reality, then when do we conclude that a change is a foregone conclusion?  Poking fun at my own errors to highlight supposed pedantry on my part is to miss everything I am trying to say.    Update 2  It may not be an easy question, but since language change actually does or does not happen, and every person acts with more or less intention in regards to language change, there must be an answer. What I wanted to explore is the value in efforts to teach the "proper way" vs. the opposite end of the spectrum where any new usage is not just accepted but welcome or even sought out. You know, I'm reminded of something: the conservative/liberal scale:     |------+------+------+------+------+------| radical              moderate             radical liberal                                 conservative   The funny thing about those at the ends of the spectrum is that they both want things to change. The radical liberal wants language to change to something new quickly, just for the sake of newness or evolution or some other not-necessarily-realistic ideal. Similarly, the radical conservative wants things to change just as much, but back to the way it used to be, just for the sake of sameness or continuity or some other just-as-not-necessarily-realistic ideal.  I'm not particularly asking where we should be on this scale as that's purely subjective. I'm trying to ask about something purely practical and real-world: what is actually effective? Is language change inevitable, and how fast? Are efforts to reduce its rapid morphing either effective or worthwhile in any measure? All these things considered, what position with respect to language evolution is livable, practical, and sensible?  Feel free to edit my grammar. No comment necessary.  Update 3  Something that may be of interest to both my supporters and detractors: . I enjoyed it. I don't disagree with him, but I am not sure I am wholehearted in this lack of disagreement.


How do I efficiently compute $a^b\bmod c$:  When $b$ is huge, for instance $5^{844325}\bmod 21$? When $b$ is less than $c$ but it would still be a lot of work to multiply $a$ by itself $b$ times, for instance $5^{69}\bmod 101$? When $(a,c)\ne1$, for instance $6^{103}\bmod 14$?  Are there any other tricks for evaluating exponents in modular arithmetic?  This is being asked in an effort to cut down on duplicates, see  and .


i am stuck for many hours and i don't understand using the extended euclidean algorithm. i calculated it the gcd using the regular algorithm but i don't get how to calculate it properly to obtain s,t,r.  i understand that from the gcd i can get a linear combination representation, but i don't get how to do it using the algorithm.  how can i find $s,t,r$ for $a=154, b= 84$?  if it is of any importance, the algorithm i am referring to is from the book cryptography: theory and practice  thank you very much. became hopeless because of it

I've only found a recursive algorithm of the extended Euclidean algorithm. I'd like to know how to use it by hand. Any idea?


I have a MyUser object defined in my code with several properties...  public class MyUser {     public Guid UserId;     public string EmailAddress;     public string UserName; }   Then I have a List of these MyUser objects....   List<MyUser> userList   How do I get rid of all duplicates based on only ONE PROPERTY of each myObject, such as UserName?   So basically if I have a List of 100 of these MyUser objects, I only want ONE occurrence of each UserName. So, if the UserName shows up more than once, remove the duplicates and keep only one object per UserName. In the end, I'll have a list that only has unique usernames (along with the other properties).  I thought I could do it with LINQ Distinct, but Distinct doesn't allow me to tell it to only consider ONE property.

I am playing with LINQ to learn about it, but I can't figure out how to use Distinct when I do not have a simple list (a simple list of integers is pretty easy to do, this is not the question). What I if want to use  on a list of an Object on one or more properties of the object?  Example: If an object is Person, with Property Id. How can I get all Person and use Distinct on them with the property Id of the object?  Person1: Id=1, Name="Test1" Person2: Id=1, Name="Test1" Person3: Id=2, Name="Test2"   How can I get just Person1 and Person3? Is that possible?  If it's not possible with LINQ, what would be the best way to have a list of Person depending on some of its properties in .NET 3.5?


In methods when is it necessary to use notation like self.variable_name? For instance, I know that in the constructor method it needs to be like  class A(object):      def __init__(self, name):      self.name = name   in order to give it an instance variable. However, what about in other methods? When do I need to put self in front of a variable name and when is it okay to just use a variable name?

I have been using classes for only a short while and when I write a method, I make all variables reference self, e.g. self.foo.  However, I'm looking through the wxPython in Action book and notice that "self" isn't used all the time. For example:   import wx  class TextFrame(wx.Frame):     def __init__(self):         wx.Frame.__init__(self, None, -1, 'Text Entry Example',             size=(300, 100))         panel = wx.Panel(self, -1)         basicLabel = wx.StaticText(panel, -1, "Basic Control:")         basicText = wx.TextCtrl(panel, -1, "I've entered some text!",             size=(175, -1))         basicText.SetInsertionPoint(0)         pwdLabel = wx.StaticText(panel, -1, "Password:")         pwdText = wx.TextCtrl(panel, -1, "password", size=(175, -1),             style=wx.TE_PASSWORD)         sizer = wx.FlexGridSizer(cols=2, hgap=6, vgap=6)         sizer.AddMany([basicLabel, basicText, pwdLabel, pwdText])         panel.SetSizer(sizer)   The one below does use "self".  import wx class ButtonFrame(wx.Frame):     def __init__(self):         wx.Frame.__init__(self, None, -1, 'Button Example',             size=(300, 100))         panel = wx.Panel(self, -1)         self.button = wx.Button(panel, -1, "Hello", pos=(50, 20))         self.Bind(wx.EVT_BUTTON, self.OnClick, self.button)         self.button.SetDefault()     def OnClick(self, event):         self.button.SetLabel("Clicked")   If I remember correctly, "self" is reference to a particular instance of the class, so when is it not necessary? Is there a general rule of thumb?


I was recently reading a paper and I came across this diagram in the paper:  It basically shows the precision of an approximation algorithm as x and y varies. Does anyone know what sort of package this is?

I have a huge amount of 2D-coordinates, associated with a value, e.g.:    x   |   y   | value 27.50   52.15   12.51 61.83   13.32   57.56 36.23   21.83   41.73 40.46   85.67   25.20 ...   The data is not tabular and I Want the points between two data-points to be interpolated in some way (which way is not really clear, yet)  I want to preset the data as heatmap like this:   Is there any ready-to-use package for PSTricks or TikZ to do it?


I have Gateway LT4010U With INtel Atom N2600 IGB DDR3 memory and 320 GB HDD witch version would be the best...I am thinking of Puppy but I have used Ubuntu before and would like to choose a version from here is there any suggestiolns

For a given hardware configuration, how do I find out if Ubuntu will run on it? What considerations should I take into account when choosing an Ubuntu version and  such as:    with a lighter desktop than the usual Gnome and Unity  with the even lighter LXDE desktop   Obviously Ubuntu does not run on some processor architectures. So how do I go about choosing the right version and derivate. How can I find out the minmal system requirements?


i have created all the classes in this link just to see how the Test mock working.     but i ended up in error when creating a test class and try to save it.  The entire classes that has been created,  Success:  @isTest global class WebServiceMockImpl implements WebServiceMock {    global void doInvoke(            Object stub,            Object request,            Map<String, Object> response,            String endpoint,            String soapAction,            String requestName,            String responseNS,            String responseName,            String responseType) {        docSampleComDocsample.EchoStringResponse_element respElement =             new docSampleComDocsample.EchoStringResponse_element();        respElement.EchoStringResult = 'Mock response';        response.put('response_x', respElement);     } }   Success:  public class WebSvcCallout {     public static String callEchoString(String input) {         docSampleComDocsample.DocSamplePort sample = new docSampleComDocsample.DocSamplePort();         sample.endpoint_x = 'http://api.salesforce.com/foo/bar';          // This invokes the EchoString method in the generated class         String echo = sample.EchoString(input);          return echo;     }    }   Error:    @isTest private class WebSvcCalloutTest {     @isTest static void testEchoString() {                       // This causes a fake response to be generated         Test.setMock(WebServiceMock.class, new WebServiceMockImpl());          // Call the method that invokes a callout         String output = WebSvcCallout.callEchoString('Hello World!');          // Verify that a fake result is returned         System.assertEquals('Mock response', output);      } }   Error Description:  Save error: Method does not exist or incorrect signature: Test.setMock(Type, WebServiceMockImpl)  What could be the issue here? i not even changed a single bit of code and did exactly what it has been given in the above article. But i do not know why i am getting this error.

when i try to save the following code, i got the error below. Following same instructions given in this link, but still errors. Am i doing anything wrong here? please suggest.    @isTest private class WebSvcCalloutTest {     @isTest static void testEchoString() {         Account a = new Account(name='Tester',SAP_KUNNR__c='1172');         insert a;                       // This causes a fake response to be generated         Test.setMock(WebServiceMock.class, new WebServiceMockImpl());      } }   Error:  Save error: Method does not exist or incorrect signature: Test.setMock(Type, WebServiceMockImpl)    WebSvcCalloutTest.cls         @isTest global class WebServiceMockImpl implements WebServiceMock {    global void doInvoke(            Object stub,            Object request,            Map<String, Object> response,            String endpoint,            String soapAction,            String requestName,            String responseNS,            String responseName,            String responseType) {          sapComDocumentSapSoapFunctionsMcS.Z_GSSMWFM_HNDL_EVNTRQST00 sap1 = new sapComDocumentSapSoapFunctionsMcS.Z_GSSMWFM_HNDL_EVNTRQST00();                Map<String,String> mapSAP = new Map<String,String> {};         sapComDocumentSapSoapFunctionsMcS.ZgssmbstDatarcrd01 req = new sapComDocumentSapSoapFunctionsMcS.ZgssmbstDatarcrd01();               sapComDocumentSapSoapFunctionsMcS.ZGssmwfmHndlEvntrqst00Response_element ret =  sap1.ZGssmwfmHndlEvntrqst00('',req);         response.put('response_x', ret);     } }


-exec ls -s  is part of my program just want to know what does -s {} mean. This is my whole program, I know what it does:  find $root -type f -exec ls -s {} \; | sort -n | tail -n 15 >> ~/prog.log

I wanna solve some problems in compiz with my brain and hands.  By the way I entered following command to build compiz from source in Ubuntu 12.04  find /opt/compiz-built/share/gconf/schemas -exec gconftool-2 --install-schema-file={};   I referred that command at   And following message is shown.  How to use -exec option in find command, I guess that it's my mistake.


Yesterday I started leveling my first pokemon what worked quite different as I expected.  I caught a Raticate and when I made power it up, I noticed it hit a CP cap when the bar was full. I challanged a arena with it (If this is related for the next part) and my whole time died. Today I noted the same Raticate's CP value remained the same to yesterday, but the cap raised, what led me to my question:  What determines the CP cap, and what may effect this cap(up to whcih final cap)?  And how I can determine early what the cap for a pokemon will in its final stage be so I don't have to waste stardust on them.  Also are there cases where evolving makes the pokemon worse? I had a rattata with XL in size and weight which came to a relative high CP and HP value. So I thought "Ok, this is gonna be extrem if you evolve it!". I evolved it and both stats turned into XS and while still beeing at CPcap, the Raticate had almost the same stats as rattata. So all this is pretty confusing to me, and I don't dare to raise addtional mosnters in fear of wasting resources, but staying low to jsut don't make errors is mindering the fun and therfor I'm lookign here for help. And how can I de

For a given trainer level; is the max CP going to be the same for all final evolutions such as Parasect and Pidgeot, or same for all 'stage 2' evolutions such as Parasect and Pidgeotto, or some clear pattern on which pokemon will have the highest CP at their max evolution?  Max CP may be dependent on the particular Pokemon line (Pidgeot) or type (Flying) or rarity (how to determine easily??) or other factors. What I want to understand is, how can I figure out which of my captures is potentially much higher CP without actually evolving and leveling them.


I could not find an answer to this question.  I am panning to deploy windows server and I am confused with the licensing. Do I need Windows License key for every machine that will be using CAL from the domain controller ? How many licenses I really need in order to run clients properly?

This is a  about Licensing.    Questions on licensing are off-topic on Server Fault.  If your question has been closed as a duplicate of this question, then this is because we want to help you understand why licence questions are off topic rather than just telling you "it just is". In all likelihood, this question will not address your question directly, it was not meant to.    I have a question regarding software licensing. Can the Server Fault community please help with the following:   How many licenses do I need? Is this licensing configuration valid? What CALs do I need to be properly licensed? Can I run this product in a virtual environment? Can I downgrade this product to an earlier version? Am I entitled to feature X with license Y?


Ubuntu LTS 20.4 distributes Glade version 3.22.2 can't open old files with the editor. can't make new Gtk-window with the editor my old programs using gtk-builder are working but I'm not able to modify the *.glade files. Editor immediately crashes Glade has actually version 3.38.2 Where can I report bugs I helped myself by sudo snap install glade it installed version 3.38.2 after that operation the regular installation was also running

I found a problem with an application on Ubuntu.   Questions :   How do I best report the issue?  What sort of information should I provide?


I just upgraded my texlive and can no longer use tabu spread when floatrow is loaded.  It seems that array.sty might be the problem as this is the only package to change recently. I tried downgrading array.sty from [2018/11/13 v2.4j] to [2018/04/30 v2.4h], the MWE compiled without problems.  I am working on a template, so I have no control over package version.  Can anyone suggest a workaround?  MWE  \documentclass{article} \usepackage{floatrow} \usepackage{tabu} \listfiles \begin{document}  \begin{tabu} spread 0pt {|X|}   anything \\ \end{tabu}  \end{document}   It yields:  ! Missing } inserted. <inserted text>                 } l.9   \end{tabu}   File versions in use:   article.cls    2018/09/03 v1.4i Standard LaTeX document class   size10.clo    2018/09/03 v1.4i Standard LaTeX file (size option) floatrow.sty    2008/08/02 v0.3b floatrow: float package extension   keyval.sty    2014/10/28 v1.15 key=value parser (DPC) caption3.sty    2018/09/12 v1.8c caption3 kernel (AR)     tabu.sty    2011/02/26 v2.8 - flexible LaTeX tabulars (FC)    array.sty    2018/11/13 v2.4j Tabular extension package (FMi) varwidth.sty    2009/03/30 ver 0.92;  Variable-width minipages    color.sty    2016/07/10 v1.1e Standard LaTeX Color (DPC)    color.cfg    2016/01/02 v1.6 sample color configuration    xetex.def    2017/06/24 v5.0h Graphics/color driver for xetex

Below is a MWE with a tabu table that compiled perfectly fine up until I updated packages today (Dec. 16, 2018) with TeX Live Utility.  \documentclass[11pt]{article}  \usepackage{amsmath} \usepackage{xcolor} \usepackage{tabu}  \title{Example} \author{Andrew Turner}  \begin{document} \maketitle  \begin{table}[h!]     \centering      \tabulinesep = 3pt      \begin{tabu} spread 0pt {X[c$$]X[c$$]} \hline         a & b \\ \hline     \end{tabu}      \caption{test} \end{table}  \end{document}   After the update, trying to compile gives a whole bunch of errors like this:  ! Missing \cr inserted. <inserted text>                  \cr  l.19 \end{tabu}  I'm guessing that you meant to end an alignment here.  ! Misplaced \cr. <inserted text> \cr   l.19 \end{tabu}  I can't figure out why you would want to use a tab mark or \cr or \span just now. If something like a right brace up above has ended a previous alignment prematurely, you're probably due for more error messages, and you might try typing `S' now just to see what is salvageable.   If I comment out the xcolor package, this fixes the issue, or if I get rid of the spread 0pt and keep the xcolor package this also fixes the issue. I looked at what just updated in TeX Live Utility, and I wonder if it has to do with the recent update of colortbl.  Any help would be greatly appreciated.    Here is a further example. This is actually exact same, as recent version(s) of fancyvrb require package xcolor.     this is obsolete since release 3.2 (2019/01/08) of fancyvrb which does not load xcolor anymore.   \documentclass{article} \usepackage{fancyvrb} \usepackage{tabu} \begin{document} \begin{tabu}spread 0pt {XX} A & B \end{tabu} \end{document}   breaks with  ! Missing } inserted. <inserted text>                  } l.10 \end{tabu}  ?    Simply commenting out loading of fancyvrb it compiles, or using TL2017 (my TL2018 is already fully updated...) it compiles also.