All Questions

2
answers

Error: The name 'ViewBag' does not exist in the current context

Good morning, I have projects using System.Web.MVC na versão 4.0.0.1 , I was working normally on the 2013 version of Visual Studio, now I'm trying to work with Visual Studio 2015 and my Views do not recognize some properties for example...
asked on 18.11.2015 / 13:07
1
answer

Access to shipping file .NET ticket

I'm using the .NET ticket booster in my application. The ticket is generated, however how do I process the shipping file? Is this file saved somewhere in the application? I took the example project that is in Git, but I do not know how to...
asked on 27.07.2016 / 23:42
2
answers

Which is safer: session or cookie? [duplicate]

Thinking about security , what is the best option to keep the user logged in in an ASP.Net MVC application, cookie or session ?     
asked on 07.03.2016 / 15:03
2
answers

Readability of javascript codes

When writing a code you should do it so that the time required for your understanding is minimal. This is the most important metric for having readable code and is the foundation of the fundamental readability theorem. The longer you spend, t...
asked on 19.06.2017 / 12:42
1
answer

___ ___ erkimt I extend an abstract class or concrete? ______ qstntxt ___

When I need to extend a class, following the concept of Object Orientation, should I extend my code from an abstract or non-abstract class? What is the best practice to join?

    
______ azszpr89237 ___

There is no better option, you extend the class you need to extend. Whether it is abstract or not, it makes no difference to its code other than the fact that an abstract will possibly have unimplemented methods and its new class will have the obligation to create an implementation for all abstract methods contained in the class. optional).

If you want to know if it's better to create an abstract class or not, then it depends on what you want. An abstract class can not be instantiated. It is designed to be used as a template for other classes. Non-abstract can be used as models but can also be instantiated directly. You just make it an abstract class if you want to ban its instantiation (which is bound, if it is incomplete).

Of course, if the class has methods without implementation, they act as contracts for the derived classes to follow, that is, they function as if it were an interface, then the class must necessarily be abstract. Unable to instantiate classes with methods without implementation.

For example. If you have a class %code% and the derivatives of it %code% and %code% . Probably you do not need and maybe can not instantiate only the %code% . It is probably incomplete. You just created it to support the two (who knows other) derivatives I mentioned. It is almost an interface, but probably has variables and some methods with implementation. So %code% should probably be abstract.

Remembering that you can only inherit from a class. Abstract or not. Interface can several.

    
___

When I need to extend a class, following the concept of Object Orientation, should I extend my code from an abstract or non-abstract class? What is the best practice to join?     
asked on 27.09.2015 / 00:44
1
answer

How the websocket works in php

I have this doubt, for example, I have a server written in PHP. When a user A connects to that server, the server performs an action that takes 4 seconds for example, if before that time a new user B connects, it will have to wa...
asked on 23.12.2015 / 23:52
2
answers

What is the pointer-events property for?

I was researching a way to style the set of <select /> and I came across a solution that used a <label> with the value pointer-events: none . I'd like to know what pointer-events is with the none...
asked on 31.10.2017 / 20:07
1
answer

Write on the Javascript screen

I need to make an area on the form that the user digitally signs with a touch screen pen to store the signature of the same. As if he were writing on paper but on screen. I read about the Canvas but I just learned to make lines, rectangles...
asked on 02.03.2017 / 20:20
1
answer

Compare Strings by non-value format

I have a format of String , for example: xxxx-xxxx-xxx However, instead of x you can enter several letters or numbers, for example: A216-0450-013 X2LP-1018-589 Y585-0000-047 What I need to do is compare to see if t...
asked on 17.04.2017 / 22:28
3
answers

Position caption above div

I'm using the bootstrap carousel with caption. Between the slide image and the caption there is a div with the image of an orange triangle. I need the caption to stay above the triangle. I have already used z-index but I can not position this ca...
asked on 22.06.2017 / 23:22