In my database there is a table without geometry. how to read that from from pyqgis. self.uri = QgsDataSourceUri() self.uri.setConnection(self.Hostname, self.Portid, self.Dbname, self.Username, self.Password) db = QSqlDatabase.addDatabase(&quot;QPSQL&quot;) db.setHostName(self.uri.host()) db.setDatabaseName(self.uri.database()) db.setPort(int(self.uri.port())) db.setUserName(self.uri.username()) db.setPassword(self.uri.password()) self.dbresult = db.open() self.uri.setDataSource(self.Schema, &quot;project_ids&quot;, &quot;geom&quot;, &quot;&quot;) lay = QgsVectorLayer(self.uri.uri(True), &quot;project_ids&quot;, &quot;postgres&quot;)  print(&quot;Layer fields Names&quot;,lay.fields().names())   is shows not showing any fields How to read the No geometry Tables in pyqgis?
I had to backup a PostGIS model in a geopackage and I wonder how to load a non-spatial table, aka a table with NO geometry_column.
How to get back to a site when viewing one of its questions When viewing a question on a site which I don't use (I never registered on it), I can't figure out how to get back to the list of questions of the site.  See this example  from the Stack Exchange Android app. Where should I click to see the list of questions? (I chose Mathematics Educators because it's the most recent site, it is very likely that most users don't have an account on this website)  Here is a random example:    When viewing a question, I don't know how to view the list of questions. This site can't be found in the sidebar since it's not in my Your Sites list. The top menu containing the site's title only opens the sidebar. I've looked through a number of the "Vote too old to be changed" questions, but I think this one's different.  I gave a downvote to an answer I thought had a critical defect, and I left a comment describing the defect. The answer was edited to satisfy my criticism, but it was done within the short grace period where edits aren't recorded as such. When I try to cancel my downvote I get the error - "Your vote is now locked in unless this answer is edited" - but it was edited!  In reference to this answer: I have some data which looks like:  sampleA    ATGC    10   100 sampleA    ATGC    120  230 sampleA    ATGC    200  110   I want to print the min and max using the values in both column 3 and 4. So my output should look like:  sampleA   10  230   Thanks in advance Template specialization based on inherit class why is my careers profile reputation lower than my actual repuation? Piping for loop output prevents local variable modification Why would I want to use Interfaces? I understand that they force you to implement methods and such but what I cant understand is why you would want to use them. Can anybody give me a good example or explanation on why I would want to implement this. Recommended ways to upgrade AlwaysOn AG from 2014 to 2016 What is the recommended process of upgrading Availability Groups with one Sync Replica from SQL 2014 to 2016?  My understanding is that in-place upgrades are not really liked among database professionals. Is there a way to avoid in-place upgrades in Availability Groups? Is there a possibility to join a 2016 server into an existing 2014 availability group and to failover there, then "kill" one of the other instances and upgrade it? (e.g. by removing/re-installing SQL side-by-side on the same host)  Are there any other upgrade scenarios that we should consider?  The ideal solution would be that we always have 2 online replicas, and that we don't need to do any in-place upgrades. When umpire change the cricket ball, was the old ball thrown as waste or keep for reuse? Calculate $\sum_{k=1}^n (-1)^{k+1} \binom{n}{k}\frac{1}{k}$ How to show $A\times (B\cup C) = (A\times B)\cup (A\times C)$ iPhone call log / history How can I upgrade to Java 1.8 on an Amazon Linux Server? I tried sudo yum update but it just keeps java "1.7.0_75". I need 1.8 for it to work with another application but can't figure out how to upgrade it. Do I need to manually install it somehow? There's not much information on this on the internet as far as I can see. Specs:   java version "1.7.0_75" OpenJDK Runtime Environment (amzn-2.5.4.0.53.amzn1-x86_64 u75-b13) OpenJDK 64-Bit Server VM (build 24.75-b04, mixed mode)   When I try update now:     [ec2-________]$ sudo yum update Loaded plugins: priorities, update-motd, upgrade-helper amzn-main/latest                                         | 2.1 kB     00:00 amzn-updates/latest                                      | 2.3 kB     00:00 No packages marked for update   Is there anything else I need to do? Thanks. I am a final year PhD in UK in a scientific discipline and I am writing my thesis. I have already published 2 journal papers and I have submitted 2 more papers for publications. My department does not allow a "publications-based" thesis so I need to write a thesis in the context of a book etc.   As I write my thesis in a couple of places, especially in the literature review, I tend to reuse sentences from my publications. I try to restate them a bit, maybe change some words for their synonyms etc. but it is practically me writing about what I wrote before. It goes without saying that I cite/quote me at the end of a passage if I say something non-obvious (I found that slightly funny. :) ). The problem is that occasionally I am just explaining for instance how a certain estimation technique works; in that case I cite the original authors and not myself. The syntax in those occasions though is practically the same as the original passage I used in my publication; as I have explained it once and was consider good, I find no reason to reinvent myself (I do a mild rewording as I mentioned but that is quite insignificant). Same things goes for listings. I do cite my paper in the beginning of a big list as the list's source but the list itself is almost identical as the one in "my" paper; in those cases I don't use quotations, just attribution "[]".  Is there an obvious guideline? The basic definition of plagiarism "reproducing the work of another person's as your own" is not (directly) applicable to me because I am the other person (almost *); if I am using other people's work I do cite them but I don't cite myself, citing them, in quotation marks!  I am a bit "fuzzy" about how not to plagiarize myself in my thesis (I have had no problem regarding my journal publications).  (* In all publications mentioned I am the first -but not sole- author.) How to learn commutative algebra? I want to learn commutative algebra from scratch. I was wondering, as you are experts in mathematics, what you think is the best way to learn commutative algebra? Is there any video course available for commutative algebra? Will there be some online course for commutative algebra on some website like Coursera, etc?  I know noncommutative algebra up to the Artin-Wedderburn Theorem. Also, I know group theory up to the Sylow theorems and Galois Theory. I also know some basic topology.  I'm new to this site so I don't know what tags I should add for this question. Please feel free to edit my question.  Edit 1: I want to learn commutative algebra for learning Algebraic Geometry. I can never remember how I do this because it comes up so infrequently for me. But in C or C++, what is the best way to read a character from standard input without waiting for a newline (press enter).  Also ideally it wouldn't echo the input character to the screen. I just want to capture keystrokes with out effecting the console screen. How do I delete all empty directories in a directory from the command line? Say I have a directory named foo/. This folder includes subdirectories. How can I delete all the empty directories in one command? Quotient ring of Gaussian integers Cropping the exact same part of several pictures I have several pictures that are exactly the same except for some small variations. It was one picture that was photoshopped in several different ways. Now, I need to crop them all (13 in total) but I need to crop exactly the same part of it. It needs to be pixel perfect.  How do I do that with Pixelmator? Optional argument to \item I am typesetting an ordered list where the entries may appear out of order, but should be assumed in order otherwise. I don't want to have to jump through \setcounter hoops to do this. That is, I want something like  \begin{enumerate}   \item First   \item Second   \item[8] Eighth!   \item Ninth!   \item[4] Fourth \end{enumerate}   to give the following Good output, instead of the Bad output:    A minimum working example follows.  \documentclass{article} \usepackage{enumitem} % preferably something compatible with this guy \begin{document}  Good:  \begin{enumerate}   \item[1.] First   \item[2.] Second   \item[8.] Eighth!   \item[9.] Ninth!   \item[4.] Fourth \end{enumerate}  Bad:  \begin{enumerate}   \item First   \item Second   \item[8] Eighth!   \item Ninth!   \item[4] Fourth \end{enumerate}  \end{document}   It should be noted that I don't want to have to specify the period afterwards, in case my list using a different numbering, e.g. Roman. Compatibility with enumitem is preferred, but not required.  What is the correct way of going about this?