All Questions

2
answers

Ternary Operator C # [duplicate]

I would like to add one more condition in my ternary operator. Is it possible for more than two conditions? Or is there another possibility? I need to insert the ProductCatalogDigital property, which is of the BasicLongDTO type. Currentl...
asked on 22.02.2018 / 20:31
4
answers

What is the best solution? GetById with id not existing in DB

I'm making a call in my repository but the CPF does not always exist in the DB. When it does not exist in the database I get the following error. Repository public VendedorModel GetById(int CPF) { using (var db = new Pow...
asked on 12.01.2018 / 12:32
2
answers

How do you calculate (with ease) total and subtotal in Django?

I'm using Django 1.7.8 I have models.py class SaleDetail(models.Model): quantity = models.PositiveSmallIntegerField(_('quantidade')) price_sale = models.DecimalField( def get_subtotal(self): return self.price_sale * sel...
asked on 29.05.2015 / 20:11
2
answers

Make a website not run in any version of IE

I have a site that should not run in any version of IE , when they try to open the url I want a background-image to appear, site is not supported in IE . Is this possible? I put this solution in my code: <script type="text/javascr...
asked on 27.05.2015 / 18:18
1
answer

Copying table in MySQL

I need to make a copy of a table in MySQL for a simulation, is there any function for this? How could I do that?     
asked on 24.06.2015 / 14:00
1
answer

Correct use of DOM with react.js

Knowing that ReactJS uses a virtual DOM where elements are rendered in a DOM representation in memory so that all changes are made faster then it would be "wrong" to use findDOMNode to directly access a DOM element and manipulate your state?   ...
asked on 23.07.2015 / 04:27
2
answers

Conflicting slides

I have the following problem I have a slide right at the beginning of my page in the <header> tag but one of your codes is imported this would be url but now in my <section> I have another tag that is from another slid...
asked on 15.07.2015 / 21:54
2
answers

Error with arrays in Java

Could someone tell me what's wrong with this code? The result is always the 1st number before space, but it has to be the sum of all the numbers in the array. import java.util.Scanner; public class Main { public static void main(String[] args...
asked on 05.08.2015 / 01:09
1
answer

How to have multiple addresses in a person class?

If a person has more than one address. Is the code below correct? public class Pessoa implements Serializable { private static final long serialVersionUID = 1L; private int codigo; private String descricao; private String data...
asked on 06.08.2015 / 04:46
1
answer

How to detect the connection to the internet via javascript? [duplicate]

Is there any way to "know", via javascript , if the internet connection has been lost? For example, to attempt a reconnection with websocket, if it detects that the internet connection has been lost and then reestablished.     
asked on 03.08.2015 / 15:59