Posts by mzavarez • 111 points
8 posts
-
0
votes1
answer368
viewsA: Sequelize foreign key error
In the condominium model you need to add one of the columns as Unic const Condominio = db.sequelize.define('condominios', { nome: { type: db.Sequelize.STRING, allowNull: false, unique: true }, ...…
-
-3
votes3
answers5041
viewsA: How to make a project public to private on Github?
Yes! Choose your project, go to your project settings, at the bottom of the page you have an option Tornar Privado.
-
3
votes1
answer956
viewsA: Add a 'Virtual' column to a SELECT in Oracle
You can use the CASE to achieve this in your select. Example on this link. SELECT a.cd_usuario, ... a.cd_nivel, CASE WHEN a.cd_nivel = 5 THEN 'Exclui' END AS DescNivel FROM ... Remembering that the…
-
0
votes3
answers3992
viewsA: Convert Date to year / month
Try it this way: select format(CAST('04/01/2019' AS DATE), 'yyyy/MM'); That test I did had to date it as 'MM/dd/yyyy'.
-
2
votes1
answer33
viewsA: Convert a string to number
You can use it as follows, showing that it is a float: decimal d = Decimal.Parse("1.2345E-02", System.Globalization.NumberStyles.Float);
-
-1
votes2
answers44
viewsA: Choose the order in which items are listed in Mysql
According to the link would be just that: SELECT column1, column2,... FROM tbl ORDER BY column1 [ASC|DESC], column2 [ASC|DESC],... Are you making a mistake? You can post more information to help…
-
1
votes2
answers778
viewsA: Python pandas: Drop rows with duplicate column and another column with null value
According to the documentation you can use the dropna of the pandas themselves. df = df.dropna(how='any') or by modifying the existing one, using the inplace: df.dropna(how='any', inplace=True) You…
-
2
votes1
answer380
viewsA: traverse python int lists by skipping consecutive numbers
If I understand your doubt, follow the script to do what you need: from itertools import groupby, count l = [1,2,3,4,5,6,8,10,11] l = list(set(l)) # Remove números duplicados l.sort() # Ordenar os…
python-3.xanswered mzavarez 111