Posts by Matheus Saraiva • 2,157 points
108 posts
-
0
votes1
answer43
viewsA: UWP Horizontal alignment of streaks in a Relativepanel
I got the answer on MSDN forum. In practice it implements via code-Behind what should work via XAML bindings but doesn’t work. Why the hell, I don’t know.…
-
0
votes1
answer43
viewsQ: UWP Horizontal alignment of streaks in a Relativepanel
I’m creating a Hambugermenu similar to the Win10 Apps. The basis of Hambugermenu is SplitView and to distribute their children in the SplitView I chose to use a RelativePanel so I can choose which…
-
1
votes1
answer39
viewsQ: System.Runtime.Remoting.Remotingexception no Designer XAML VS2015
I have a problem in Visual Studio. When I create a new UWP10 project in white, it comes the basic code. <Page x:Class="FoxMovieStoreMain.MainPage"…
-
1
votes1
answer247
viewsQ: How does the Dependency Property (Dependencyproperty) "work"?
I’m trying to understand the feature of dependency properties. I’ve read some tutorials on msdn but the feature is still unclear to me. Example: using System; using System.Collections.Generic; using…
-
4
votes1
answer356
viewsQ: MVVM, Should I use Icommand on all controls?
Part of the MVVM is the use of commands through the interface ICommand. The question is, should I use commands on all controls? Even those that are not connected with the business rule? For example,…
-
2
votes2
answers79
viewsQ: Color Visualization and New Creation
I need to make use of the class Colors defined in namespace Windows.UI. There are many colors available and I need to find a way or place to see a preview of these colors, because only by name it is…
-
0
votes0
answers43
viewsQ: System.Runtime.Serialization on UWP 10
I’m making an exception in a UWP, however, it seems that apps UWP do not have the same resources for serialization as classic applications. The code below does not work for UWP. using System; using…
-
2
votes1
answer48
viewsQ: Universal Apps 8.1 on Windows 10
Does Windows 10 have backward compatibility with Universal Apps from Windows 8.1? That is, applications written in for Windows 8.1 run on Windows 10?…
-
0
votes1
answer133
viewsQ: Vertically center a label on Stackpanel
I’m trying to center vertically on one label within a StackPanel. I’ve already defined the attribute VerticalAlignment="Center" but I didn’t notice any difference in vertical positioning, as can be…
-
0
votes1
answer15
viewsQ: Validating event with `?`operator
I was implementing a method to launch the event PropertyChanged of INotifyPropertyChanged. I did the validation of the event in a traditional way, ie with if (PropertyChanged != null). But the VS…
c#asked Matheus Saraiva 2,157 -
1
votes1
answer570
viewsQ: TFS unable to locate part of the path
I’m trying to check in a project for my repository at visual studio online (Team Fundation Service). But I’m getting the following error message: Someone’s been through this trouble?…
-
12
votes2
answers1960
viewsQ: Empty delegate ( delegate { } )
What returns the instruction delegate { }? Would be an empty delegate? In which situations would it be necessary to create an empty delegate?
-
0
votes1
answer63
viewsQ: Help with a MVVM view
I’m reading the that MVVM tutorial. But I’m not understanding the following: <Window x:Class = "MVVMDemo.MainWindow" xmlns = "http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x =…
-
1
votes1
answer795
viewsQ: Select to check where a primary key is referenced
I have the following tables: _________PERSON_________ serial id PK name varchar(50) NOT NULL email varchar(100) NOT NULL tel varchar(14) NOT NULL _________CLIENT__________ integer person FK/PK --(FK…
postgresqlasked Matheus Saraiva 2,157 -
2
votes3
answers92
viewsA: Capture which key Unique was raped
Since the version I am using is 9.5, the ideal solution is the command GET STACKED DIAGNOSTICS. Example: create table foo (a int not null, b int not null, unique(a), unique(b)); insert into foo…
postgresqlanswered Matheus Saraiva 2,157 -
0
votes3
answers92
viewsQ: Capture which key Unique was raped
I have a function that does insert in a table. This table has two columns that are unique email and login. In other tables there are also unique Keys compostas. Thus, an exception of the type…
postgresqlasked Matheus Saraiva 2,157 -
1
votes1
answer116
viewsQ: **kwargs optional with default
It is common to find several Pis who make use of the KeyWordArgument python. My question is how to use this decline for object attributes. Sometimes when I use an API and pass a named parameter…
-
1
votes1
answer441
viewsQ: Understanding structures in the Assemblyinfo.Cs file
Taking a look at the file AssemblyInfo.cs of a C# project I came across some structures of which I am not recognizing. These are the lines: [assembly: AssemblyTitle("")] [assembly:…
-
2
votes1
answer106
viewsQ: Understanding #line directive
I’m trying to understand the directive #line. I read in that documentation and I was able to understand the applicability of #line hidden but not that of #line [any_numer]. Taking as example a file…
-
3
votes1
answer1240
viewsQ: How to call and display a WPF Window that is in a dll
I have a DLL containing a WPF window, created through a project of the type WPF User Control Library. How do I display this window from another project? XAML window (DLL project): <Window…
-
5
votes2
answers203
viewsQ: Documentation on WPF with pure C# code
WPF is what’s "new" for development, not only desktop but also mobile. However, almost all material that is available on WPF is fully tied to the use of IDE and XAML. But XAML is an intermediate…
-
0
votes2
answers1265
viewsQ: Visual Studio copy file to output directory
Hello! In my project I have an xml file and I want to copy this file to the output directory at the time of compilation so that it stays together with the executable file and other files. For this I…
-
3
votes2
answers297
viewsQ: List Comprehension for this case
How can I use comprehensilist on for that case: >>> a = 'A' >>> lista = [1, 2, 8, 5, 10] >>> l = [a, num for num in lista if num%2 == 0] File "<stdin>", line 1 l =…
-
3
votes2
answers2340
viewsQ: Iterating over nested dictionaries (Pythonic)
I always lag behind when it comes to thinking of nested repeat loops to iterate over some container (typical of C/C++), because I know that python has very particular ways of iterating over…
pythonasked Matheus Saraiva 2,157 -
2
votes1
answer581
viewsQ: Help with the argparse library
I’m trying to use the library argparse to guide the main module (__main__) between two possible executions: import unittest import argparse arg = argparse.ArgumentParser(description='Execution…
-
0
votes2
answers118
viewsQ: Separate front-end and back-and from executable
My idea is to separate the application into three distinct files, in the file MinhaAppBackend.dll, will be, as the name suggests, all classes and other elements that are part of the back end of the…
-
-1
votes1
answer273
viewsQ: Create side menu like Windows 10 Weather App
The friends who accompany me here, they must have read one previous question I did with that same theme. But as I mentioned in my last comment there, I gave up the initial idea because I concluded…
-
3
votes1
answer560
viewsQ: How to create professional designs in WPF
Well, I’m not Designer that’s fact, and those who do not have designer skills suffer a lot with the new interface technologies, among them the WPF. Who does not have a knowledge of designer will…
-
9
votes1
answer585
viewsQ: What are namespaces in XML?
Well, I understand the concept of namespaces in C#, C++, etc. But I don’t understand the concept of namespaces in WPF (XAML). I’ve been trying to understand the parameters xmlns in a XAML code. I…
-
3
votes2
answers843
viewsQ: Overwrite methods based on name only
I’m creating an abstract base class to provide a pattern for other classes. The base class methods shall be superscripted in the derived class. Now comes the cat jump. The superscript should happen…
-
1
votes1
answer136
viewsQ: INSERT inside WITH clause
I basically learned SQL from Postgresql, I’m making use of SQL Server for the first time and I couldn’t figure out how to do it. Let’s say I have two tables. The first is a generic table of…
-
3
votes3
answers271
viewsQ: Change read-only property in class itself
A read-only property implements only the provider get. But what if I want to modify this property in the class itself? Let’s say public class MinhaClasse { public string PropriedadeDeMinhaClasse {…
-
3
votes1
answer199
viewsQ: How to launch custom T-SQL exception?
I have a Tigger for CPF validation, and I want to make an exception if the reported CPF is invalid. About the release of exceptions I’ve been reading this publishing, but in the author’s examples he…
-
1
votes0
answers203
viewsQ: Npgsql failed to call plpgsql function
I’m running some tests on the Npgsql. One of the tests tests the return of a plpgsql function. But the test is failing saying that the function does not exist. In the error description the name in…
-
3
votes1
answer142
viewsQ: Nullreferenceexception when calling function
I’m creating some unit tests for a class library that does manipulations in a database. The method being tested is this: public object ExecuteNoQueryOperation ( string spOrSqlInstructions,…
-
1
votes1
answer40
viewsQ: Error trying to set Npgsqldataadapter Missingschemaaction property
I’m trying to set the property MissingSchemaAction of an object NpgsqlDataAdapter, but Visual Studio is complaining that the property does not exist. I looked at the github of the project and saw…
-
6
votes2
answers519
viewsQ: What is the best place to store the connection string?
There are some possible places to store the string connecting. Leave tied inside the code, app.config, Windows registry and configuration file. What is the best place to store string connection?…
-
1
votes2
answers261
viewsQ: Inheritance in the Entity Framework
I am now reading about cross domain inheritance in EF. I came across this example: public abstract class BillingDetail { public int BillingDetailId { get; set; } public string Owner { get; set; }…
-
3
votes2
answers222
viewsQ: Entity Framework and parameterized constructor
When I create domains, I usually create a parameterized constructor for the same: namespace Models { public class Unity { public string Abreviation { get; set; } public string Description { get;…
-
1
votes1
answer854
viewsQ: List, virtual and Entity Framework
In all the examples I have found about Entity framework, always use ICollection for collections of objects. public partial class Standard { public Standard() { this.Students = new…
-
0
votes2
answers161
viewsQ: Postgresql oid column attribute type with EF6
What type of attribute should I use to represent a type column oid of Postgresql with Entity Framework 6 Code-First? Remembering that the type oid Postgresql is for storing files.…
-
2
votes1
answer165
viewsQ: Entity Framework, you doubt the solution structure (app.config and package.config)
I started a solution with Entity Framework code-first. In the solution structure, I separated the domains from the other EF files (context, etc.). That is, the domains were in a separate project.…
-
3
votes3
answers2266
viewsQ: Entity Framework [Foreignkey]
Reading a tutorial on Entity framework, I came across a somewhat strange example for me. This example is about Dataannotation [ForeignKey] public class Student { public Student() { } public int…
-
9
votes1
answer209
viewsQ: Strange property initialization
While reading a tutorial on Entity Framework, I came across an example of code where there was a line that, for me, is unknown: Student stud = new Student() { StudentName = "New Student" }; I…
-
3
votes1
answer96
viewsQ: LINQ to SQL Inheritancemappingattribute Code property
What is the purpose of the property Code of the attribute InheritanceMappingAttribute? The documentation describes this way: This Property Holds a value that appears in the database table in the…
-
2
votes1
answer183
viewsQ: LINQ to SQL with entities that already exist, inheritance and composition
I’m starting to study LINQ to try to implement a project I’m working on. For examples both in articles as in videos, LINQ has an interface in visual Studio that generates the entity classes from the…
-
5
votes2
answers194
viewsQ: Windows Universal Apps C++ vs C#
What’s the difference between C# and C++ to develop universal apps? I saw that in the templates of Visual Studio 2015 for C++ there is a group Cross Plataform with app templates for android and Ios.…
-
0
votes1
answer134
viewsQ: C++ smart pointers and functions
I am reading an article on msdn about smart pointers. In the article there is this example: class LargeObject { public: void DoSomething(){} }; void ProcessLargeObject(const LargeObject& lo){}…
-
3
votes1
answer48
viewsQ: Understanding the concept of export Symbols in shared libraries
I’m reading about this concept of exporting elements out of a shared library (DLL or OS). I’m reading that one existing publication on the GCC Wiki. The last example of the publication is this: //…
-
7
votes1
answer457
viewsQ: How to create a Custom Attribute?
For some time I’ve been trying to understand the concept of custom attribute of C#. I think it kind of looks like the system of decorators from Python. But I’m not getting it very well. I read in a…