Questions tagged [except]

Used for the MS .NET LINQ Except() method and the Python except keyword for exception handling. Use the tag sql-except for questions related to the SQL operator EXCEPT

This tag is used for two different things:

  1. The Microsoft [.NET] Framework [LINQ] Except() method which produces set differences of two sequences.

  2. The [Python] keyword except used for exception handling.

Please use the tag for questions related to the SQL operator EXCEPT

598 questions
4
votes
3 answers

Try and Except (TypeError)

What I'm trying to do is create a menu-style start in my program that let's the user choose whether they want to validate a code or generate one. The code looks like this: choice = input("enter v for validate, or enter g for…
AntsOfTheSky
  • 195
  • 2
  • 3
  • 17
4
votes
2 answers

List.Except(List) not working as expected

I have two lists of the same type. One list is a deserialized json object loaded from a file and casted to the correct type. The other is a list created of objects of the same type. When I do List2.Except(List1) I expect to see everything in List2…
5SK5
  • 159
  • 1
  • 1
  • 15
4
votes
2 answers

Syntax error, "except pygame.error"

I am a python and pygame noob, looked up a tutorial for loading sprites in to my game, and I'm getting syntax error for this this line of code except pygame.error, message: ^ SyntaxError: invalid syntax This is the entire…
Fatnomen
  • 41
  • 1
  • 2
4
votes
3 answers

SQL UPDATE all rows, except some rows, in table with composite primary key

I'm struggling with a SQL statement. I want to update all rows except some, in a table with a composite primary key. This is what I do now: UPDATE Products SET Active = 0 _ UPDATE Products SET Active = 1 WHERE (Id_A = 1 AND Id_B = 1 AND Id_C = 1)…
Jon List
  • 1,504
  • 1
  • 14
  • 20
4
votes
3 answers

Scope using except is not working Rails

I write Hi, but SO wouldn't let it, so I write longer sentence :) Hi by the way. It looks like my scope is not working. I wrote that scope: scope :ordered, ->(field, order) { except(:order).order("#{field} #{order}") } but it returns the…
Bachet
  • 321
  • 1
  • 2
  • 14
3
votes
1 answer

Try and Except in Pandas operations - how to do it?

So I wrote a code that divides a column by another column: df['division'] = df['numerator']/df['denominator'] But since the 'denominator' is a result of other calculations, sometimes it is equal to 0. When that is the case, of course we get errors.…
Suetam016
  • 101
  • 7
3
votes
2 answers

How to select body except one element?

I'm using a color-picker which should be hidden when a click is made anywhere outside it. The problem is, it disappears even when the click is made inside the picker. $('body :not(#picker)').click(function() { $('#picker').fadeOut(); }); I…
cili
  • 1,037
  • 2
  • 19
  • 34
3
votes
2 answers

Basic set-based operations using a document database (noSQL)

As with most, I come from and RDMS world trying to get my head around noSQL databases and specifically document stores (as I find them the most interesting). I am try to understand how to perform some set-based operations using a document database…
amok
  • 105
  • 5
3
votes
4 answers

SQL Server performance issues when using EXCEPT in query

In general, I have a SELECT query combined with three independent SELECT queries. I am using EXCEPT and UNION operators in the query. When executing the queries independently, I'll receive the results in 1-2 seconds, but when having EXCEPT operator,…
3
votes
4 answers

OOP / try except statements in __init__ of class

I want to control the input of the class Webpage. Meaning, I want to be sure that the webpage's link is appropriately provided, e.g. 'http://example.com'. class Webpage(object): def __init__(self, link): prefix = ['http', 'https'] …
mikeel
  • 33
  • 1
  • 3
3
votes
2 answers

How do I select all of the tr's except the last two tr's

In lxml, I'm using xpath to select all of the tr's in a table (that has varying number of rows) except for the last two rows which contain gibberish. Is there a pattern match that excludes the last two rows? I was looking through xpath tutorials and…
chesspro
  • 125
  • 2
  • 6
3
votes
1 answer

SQL query operator minus is not working

(SELECT IDOperatore FROM operatore) MINUS (SELECT IDOperatore FROM commessaoperatore GROUP BY IDOperatore) This query is no working, even if I try to replace MINUS with EXCEPT. The singular query SELECT IDOperatore FROM operatore and SELECT…
vankraster
  • 31
  • 1
  • 1
  • 2
3
votes
1 answer

perl6, how to match 1 to 10000 times except prime number of times?

What is the best way to match a string that occurs anywhere from 1 to 10000 times except prime number of times? say so "xyz" ~~ m/ <[x y z]> ** <[ 1..10000] - [ all prime numbers ]> / Thanks !!!
lisprogtor
  • 5,677
  • 11
  • 17
3
votes
3 answers

Auto adjust column widths in Excel while excluding certain cells/rows

I have looked to find related questions multiple times, but I have never found a similar question. Everyone is always wanting to know how to adjust column widths, that's easy, I have much more nuanced question. I love auto adjust, makes clean…
kindlin
  • 39
  • 1
  • 5
3
votes
6 answers

How to do Lua math random exception

I need a little help with some Lua code. The idea is to get a random number 0- 18 but it cannot be number 8 or 16. How can I do this? self.currentSkyTexture = math.random(0,18) -- not 8 or 16... how?
WerewolF
  • 39
  • 7