Posts by Matheus Saraiva • 2,157 points
108 posts
-
2
votes0
answers50
viewsQ: Set url(path) when importing fontawesome with Sass
Hello! I’m working with Node+webpack+Sass. When I run the script wabpack, is made the compilation of Sass, the Bundle of the js files and the result is all placed in the directory build/. Until…
-
1
votes1
answer232
viewsQ: Use Sass bootstrap semantically and selectively
When it comes to Sass and Bootstrap the recommendation/advantage that is most around is, "import only what you will use, so your final css will be smaller and will contain only the bootstrap parts…
-
-1
votes1
answer118
viewsQ: Relationship between different file tables
In Access it is possible to link between tables that are in different databases (files), this resource is called in Access table binding. I mean, I can have a table called CLIENTE in an archive…
-
0
votes1
answer56
viewsQ: Flask template with nodejs and webpack
I have no experience with the "new" front-end technologies. I have always devoted more to the back. Question: You can work with flask (Jinja) templates using Node + webpack to develop the front?…
-
2
votes1
answer49
viewsQ: What is the lifetime of a class instance and a "module instance"?
An object instance exists until its father is destroyed, i.e.: class AnyClass: def __init__(self): self.any_date = datetime.date.today() (any_date)It will exist until the moment that its "parent…
pythonasked Matheus Saraiva 2,157 -
0
votes1
answer141
viewsQ: Pool and Transactions with Pymongo
I am making use of Mongodb + Pymongo for the first time, I am looking for information on how to work with Connections Pool and Transactions with pymongo. To date with the documentation found the…
-
1
votes1
answer48
viewsQ: Pass Descriptor by parameter to another Descriptor
Let’s imagine that in a class I have two properties of the Scriptor type. The first of them ensures that the property in question is negative the second must ensure that the property associated with…
-
1
votes2
answers69
viewsQ: Find out if a timedelta object has any negative attribute
I have a function that takes a parameter of type timedelta. I’m looking for ways to know if the object passed by parameter has any of its attributes (days=0, seconds=0, microseconds=0,…
-
3
votes1
answer223
viewsQ: Override Property() in Child Class
A few days ago I asked a similar question to this, however, the method employed in creating the property was via decorators (@property and @name.setter). Here I am creating the property via function…
-
0
votes2
answers70
viewsQ: Override de Propriedade
According to some examples I found I’m trying to implement an override of a property, but the override does not work. I think this is a theme still a little obscure with few examples and little…
-
1
votes1
answer452
viewsQ: Know the size of each element of a list
Assuming I have one List<byte[]> Imagens; and I want to know if any element on that list has more than 1 mega, I could do it via foreach, checking item by item: foreach (var item in Imagens)…
-
-2
votes1
answer385
viewsQ: Compare lists that are exactly the same
I’m trying to implement a list comparison method that checks if they are equal. It must return true when the two lists passed by parameter are exactly equal (number of elements, elements and…
-
4
votes2
answers132
viewsQ: SHA512 hexadecimal return
I found an example of encrypting a string with SHA512. public static string HashedString(string text) { SHA512Managed sha512 = new SHA512Managed(); byte[] hash =…
-
0
votes0
answers106
viewsQ: Dapper in 1-1 grating where in class there is no foreign key
When working with ORM it is common (Will it be mandatory?) to create the model classes as if they were a mirror of the tables of the bank. But I have a different case and I was wondering if Dapper…
-
1
votes0
answers25
viewsQ: SSDT SQL71561 reference error not solved
I created a database project for Azure SQL Database using visual Studio (SSDT). For now I have only two tables: CREATE TABLE [dbo].[ServiceOrder] ( [Id] INT NOT NULL IDENTITY, [Name] VARCHAR(50) NOT…
-
0
votes1
answer40
viewsA: Changing content of a page based on the <a> that called it
Solution: var img_capa; var h2_titulo; var li_lancamento; var li_duracao; var li_direcao; var li_gerero; var p_sinopse; var iframe_video; if (typeof window.location.hash != "undefined" &&…
-
1
votes1
answer40
viewsQ: Changing content of a page based on the <a> that called it
I have a file index.html multi-tagged <a> the href of them all point to the same file, detalhe.html. In this file detalhe.html i have tags for <image>, <ul><li>,…
-
2
votes2
answers60
viewsQ: Column type List
I worked a long time with Postgresql and now with SQL Server I have missed some features that made life much easier. I have for example a table that one of your columns should be a list of strings,…
sql-serverasked Matheus Saraiva 2,157 -
2
votes0
answers27
viewsQ: Spatial data
What are the . net classes for working with geographic data (latitude, longitude, etc)? During a search I found the namespace System.Spatial but I saw in a forum someone advising against its use for…
-
1
votes2
answers91
viewsQ: Testing Plans in VSTS
I’m trying to create Tests Plans on VSTS (Free version), but I am not finding the location indicated in the documentation: Instead, I get this interface: By chance the Free version of VSTS does not…
-
1
votes1
answer34
viewsQ: Bytearray disk size
Suppose I convert some image to bytearray. with open("img.png", "rb") as imageFile: f = imageFile.read() b = bytearray(f) print b[0] How do I know how much disk space this bytearray will take over…
-
1
votes1
answer149
viewsQ: Circular import
To doc of Flask, despite using in its examples, warns at the end of the page about the bad practice of using circular imports. Another thing that bothers me is creating "global objects" inside a…
-
0
votes1
answer164
viewsQ: Xamarin.Android App with Bing Maps
I saw that the Bing Map API does not provide an SDK for Android. How I could create an app Xamarin.Android with Bing Maps?
-
3
votes1
answer271
viewsQ: Maximum number of lines recommended
Is there any PEP or a good practice suggestion setting out the maximum recommended number of lines a module should have? In my case for example, I keep more than one class per module, obviously…
-
6
votes1
answer76
viewsQ: Dynamic typing and team development
Is there any good practice, standardization, recommendation, etc. aimed at preventing invalid types from being passed to methods and functions? If I am working alone is more quiet, I even wrote the…
-
1
votes1
answer183
viewsQ: Javascript compiled in the browser
Is there a way to compile Javascript code and distribute it together with the other files of the site instead of distributing the source code itself? As in Java that compiles to bytecodes, so you…
-
0
votes1
answer166
viewsQ: Calling.html file from a function
The most common is that links to other html files are made through the tag <a href>, however, how would I call a.html file from within a javascript function? That is, the user clicks on the…
-
2
votes2
answers130
viewsQ: Datetime without the year
I need to represent holidays and in my holiday class I need to set the start and end date of the holiday. As start date and end date I need to inform only the month, day, hour and minute. But the…
-
2
votes1
answer53
viewsA: Descriptor with meta class vs traditional
In fact I was completely outdated with regard to the new features of python3.6+. Python3.6 introduced the descriptor protocol object.__set_name__(self, owner, name) called at the time the class is…
-
0
votes1
answer53
viewsQ: Descriptor with meta class vs traditional
I’ve been watching the videos (example) by Luciano Ramalho on Descriptors with metaclass. I wanted to know the advantage of this model in relation to the more traditional implementation of…
-
0
votes1
answer286
viewsA: Configure unittest in vscode
Solved! As my tests are not from the project root directory, I had to inform the directory in the configuration file, so it was like this: "python.unitTest.unittestArgs": [ "-v", "-s", "tests",…
-
1
votes1
answer286
viewsQ: Configure unittest in vscode
I am unable to configure the unit test feature of Visual Studio Code. The extension keeps informing that no test has been found: My argument setting is in default mode, ie: #// Arguments passed in.…
-
1
votes1
answer29
viewsQ: Set array type property size
I have a property that is of type array. This array should have two dimensions being 7 rows and 4 columns, ie, Anytype[7.4], code: public class WorkingDays { public TimeSpan[,] Times { get; set; } }…
c#asked Matheus Saraiva 2,157 -
1
votes2
answers86
viewsQ: Comparison of dates with custom date class
For design reasons, the class Datetime do. NET is not suitable for me. So I decided to create my own version: public class HolidayDateTime { public readonly uint[] RangeValueDay = { 1, 31 }; public…
-
0
votes0
answers379
viewsQ: Class diagram from already created classes does not show the relationship
When I create a class diagram in VS2017 from existing classes, the relationship link does not appear. namespace CloudEye.Domain { public class Car { public CarPlate CarPlate { get; private set; }…
-
1
votes1
answer260
viewsQ: Datetime object with DIA, MES, HORA
I need to create an object of the type Datetime that contains only Day, Month and Time. You may have minutes and seconds but you can’t have a year. How do I do that?…
c#asked Matheus Saraiva 2,157 -
4
votes3
answers3627
viewsQ: Format a string for phone format
I have the following string "49988070405" and I want to format it for "(49) 98807-0405". I tried the code: Convert.ToUInt64("49988070405").ToString(@"\(00\)\ 00000\-0000"); But to no avail…
c#asked Matheus Saraiva 2,157 -
0
votes1
answer1360
viewsQ: Validate geographical coordinates
How can I validate a geographic coordinate to know if it actually corresponds to a valid location? For example, -47.888477, -100.555444; These coordinates I didn’t pick up on any map, they’re random…
-
1
votes2
answers123
viewsQ: Property with private set
There is a difference between declaring the set private or simply omitting it? public int UmaPropriedade {get; private set;} public int OutraPropriedade {get;} The two lines of code are equivalent?…
-
0
votes1
answer184
viewsQ: UWP Desktop and database
I’m developing an application for leasing-related business management purposes. The trivial CRUD, reports, controls etc, commonly developed in windows Forms. However, I am making a UWP application.…
-
2
votes2
answers113
viewsQ: XML for Datatable
I’ve been searching on how to pass the data contained in an XML to a DataTable and found the following reply. Doubt: By doing so, the method theDataSet.ReadXml(theReader); is able to identify data…
-
0
votes0
answers43
viewsQ: Webservice with generic contract interface
I’m trying to host a Web Service on a Windows service. And when setting up serviceModel in the App.config I’m getting the following error warning from the editor: Webservice is a project of the kind…
-
1
votes1
answer112
viewsQ: IsGenericType, GetGenericTypeDefinition e Nullable.GetUnderlyingType
In a code snippet I was suggested the use of these three members in order to verify if the properties of an object are Nullable. p.PropertyType.IsGenericType &&…
-
3
votes2
answers1194
viewsQ: Fill a Datatable from a list of a complex type
I’m looking to create a method that gets a list of some kind of complex List<T> and return a datatable with all the data. In my code I managed to get here. protected virtual DataTable…
c#asked Matheus Saraiva 2,157 -
-1
votes1
answer225
viewsQ: Generic interface
I’m creating a web service WCF which will expose methods to do CRUD operations in a database. And I’m having doubts on how to create the contract interface. The Service will enable CRUD in multiple…
c#asked Matheus Saraiva 2,157 -
1
votes1
answer264
viewsQ: Exchange of XML between service and client
I am studying WCF and all the initial material that I find it all comes down to very basic things, exposing methods that receive some parameters and return some value. I need to create a web service…
-
2
votes1
answer84
viewsQ: Alphabetical ordering in Listview equal to the People App
I’ve been searching how to make a list like the App People (People) contact list of Windows 10 and found a good one example. But the example does not implement the alphabetical ordering that exists…
-
0
votes1
answer570
viewsA: TFS unable to locate part of the path
The archive FoxCcoManagerDatabase.sln was no longer in the location indicated by the error. Just remove the file through the window Control Source Explorer.
-
2
votes3
answers96
viewsA: Link selection between two Listviews
Ramaral’s answers served to remind me that I had seen something similar, that is, something related to Triggers in the UWP. Well, the equivalent of TargetedTriggerAction of WPF is an active element…
-
3
votes3
answers96
viewsQ: Link selection between two Listviews
It would be possible to link the single selection between two objects ListView via Xaml? For example, I have two ListView, the TopListView and the BottomListView, both configured for simple…