Posts by pnet • 14,727 points
909 posts
-
5
votes3
answers20971
viewsQ: How can I open a modal window with window.open()?
How can I open a modal window with window.open() in Chrome, IE, opera, etc? It is possible to do this?
-
4
votes1
answer13542
viewsQ: Startar site on IIS is returning error 500
Trying to learn how to set up a site on IIS, by typing the site URL, this gives the following error: Server Error 500 - Internal server error. There is a problem with the resource that you are…
-
2
votes1
answer1432
views -
1
votes2
answers811
viewsQ: Record and recover information in files
How do I write data to a file and then recover it? I have a enrollment system. I start a folder in Windows and within it I generate the enrollments sequentially. I finish and go home and the next…
-
1
votes1
answer758
viewsA: Write to a label when it loads with the form
When you create a Form, the system creates a Form Builder: ..... public Form1() { InitializeComponent(); label1.Text = "Escreva o que tu quiseres aqui";// Faça isso em baixo do…
-
28
votes4
answers25170
viewsA: Format a CPF string?
I don’t know windows phone, but in pure c# would be like this: public string teste(string cpf) { return Convert.ToUInt64(cpf).ToString(@"000\.000\.000\-00"); }…
-
1
votes0
answers111
viewsQ: Grouping Radiobutton in Windows Form
Everyone says that it is enough to place a container object (Panel, Groupbox and etc) and inside it the Radiobutton controls that the container groups. However, there is no way to work with the…
-
0
votes0
answers162
viewsQ: Namespace
I installed system.web.helpers and now I need to install system.web.mvc. It turns out that both have a dependency called: system.web.webpages and therefore the installation of mvc is giving error.…
-
0
votes2
answers320
viewsQ: Installation of Namespace
I have a test project that came without the Namespace System.Web.Helpers and others. I searched and didn’t find it. I should be, but it’s not. How to install the guy? Well, I can hunt on the…
-
-1
votes2
answers181
viewsA: visual studio sql error
A question: Is the name of the instance you passed? Try to pass the Nome_da_Máquina\Nome_da_Instância. Open the Sql Management or the VS2013 and copy as it is there and paste there in your code…
-
0
votes2
answers119
viewsA: Render View for a string
That help you? I hope this link can clarify something. The only thing is that it is in English.…
-
2
votes2
answers9037
viewsA: CPF mask in the textbox?
Wouldn’t the client side be better? Here’s a suggestion using javascript with jQuery. Those would be your includes: <script type="text/javascript" src="js/jquery-1.2.6.pack.js"></script>…
-
0
votes2
answers653
viewsA: Manipulating event button in various formats
I do not know if it comes to the case, but beyond what proposed by Marcelo Nascimento, you can also create a delegate that receives a parameter that is your form trigger, take this parameter and…
-
8
votes2
answers121
views -
5
votes2
answers209
viewsQ: Create Fibonacci in a linear function with delegate
Using a list for the Delegate(I learned it’s called linear function, is that right? ) I decrease the list to get the respective values, but I can’t do a simple arithmetic operation with "X", because…
-
3
votes2
answers104
viewsQ: Understanding a delegate’s lambda parameters in a function
I have the function below. I would just like to understand who is X and what values it is reaching in the course of the function. I could not catch the debug. You don’t have to say the exact values…
-
0
votes3
answers1270
viewsQ: How to remove the first item from an array without for or foreach
How to remove the first item from an array without for or foreach. I tried this, but it says that there is no method to remove or remove. int[] arr = {1,2,3,4,5}; var removeu =…
-
0
votes2
answers1247
viewsQ: How to implement a function to return the sum of squares in the proposed form?
I did not understand the proposal here. The whole question is in the Commoner, by the statement, I understand to be a delegate. See, they do not need to post codes, I would like only one way to…
-
14
votes6
answers2762
viewsQ: How to walk an Enum?
Here’s what I need to do: string and go through it and pick up each letter found and add with its corresponding value, type: a = 1, s = 19 and etc. Well, I made a enum with all the values of string,…
-
1
votes1
answer485
viewsQ: Doubt with binary tree
I have this question: Write a function that takes a tree and an id and returns an array of path ids from the root node to the node passed as parameter. int[] caminho_arvore(Arvore a, int n);…
-
2
votes2
answers473
viewsA: End of ASP.NET Webforms?
Dude, to say so will be the end, I don’t think should, because the choice of which platform to follow, will depend exclusively on the Architect and/ or Gerproj. Now, as for the trend, I think the…
-
-1
votes3
answers401
viewsA: SQLSERVER error in C#application
Try it this way: data source=Máquina\Instancia; initial catalog=Nome_Banco; persist security info=True; user id=usuario; password=senha; MultipleActiveResultSets=True; App=EntityFramework"…
-
2
votes1
answer120
viewsA: Asp.Net Drop Down List
See if this really suits you. Just make the appropriate changes. public bool preencheTipo_Usuario(DropDownList dl) { StringBuilder sb = new StringBuilder(); sb.AppendLine("select ");…
-
3
votes3
answers919
viewsQ: String Suffix and Prefix. Take a piece that serves both
I need to do a function that returns the Length of a part of the string that is both suffix and prefix. So: Given the string: abbabba, the answer would be 4, because that would be: Prefix: a ab abb…
-
2
votes3
answers183
viewsQ: Return the difference between the last two records
What I need to do is in this image. How I do? This is the query I did and it’s coming empty and I don’t know why. SELECT event_type, value from teste t1 Where exists (select event_type, value from…
-
2
votes1
answer123
viewsQ: Stored Proc X Entity - Is this a good decision?
On Entity Framework days, is doing an MVC project using Stored Procedure a good way forward? I have always heard this: If you opt for RU it makes no sense to use SP, but I have heard people say that…
-
2
votes2
answers533
viewsQ: Create a type corresponding to a playing card
I need to create a guy that matches a playing card. I tried it like this: Create a class for each suit and within the class create the properties of those classes that would be the cards themselves,…
-
2
votes2
answers159
viewsA: Fetch previous position and two positions back in for loop
I solved it. A colleague from another forum posted this algorithm to me: 1 - Declare an integer variable with the name of (a), starting at 0;2 - Declare an integer variable named (b) starting at 1;3…
-
-3
votes2
answers159
viewsQ: Fetch previous position and two positions back in for loop
In a noose for, i need to take the previous value of the variable i and the value before the previous one. See, subtracting the variable from -1 and -2 does not work. This is not taking two or a…
-
0
votes2
answers931
viewsA: C# Webmethod - Send and Receive the same object (custom) via Parametro
Dude, I think you should serialize. The problem that what your jquery sends back might be getting lost. I work in a similar way, but I use serialization to do it. See below an example of me. In my…
-
5
votes2
answers490
viewsQ: Doubts about the use of delegates
I still have not been able to fully absorb the use of the delegates, at what point I really should use a delegate and why of their construction. Then I ask the following question to the community.…
-
1
votes2
answers1018
viewsQ: My js file is not loading
Studying Ajax with Jquery, in Mauricio Samy Silva’s book is not working with me. I made a js file out and now I can’t load it. What I did I think is not wrong. I debugged the browser with F12 and I…
-
1
votes1
answer47
viewsA: Category check in use C#/ASPX
Not In breaks the performance of any BD. Do the reverse query, with IN or Exists and not Not In. If you did this: SELECT Categoria FROM Produtos where Categoria = @Categoria. If you return NULL,…
-
3
votes2
answers83
viewsQ: doubts about localDB in MVC C#
I made a post here about where the application stores template information Register that comes in MVC applications when we create a new project. Well, the question would be as follows: If I wanted…
-
1
votes2
answers1027
viewsA: Center image in Nav menu bar
Here resolved: ..... </button> <div class="navbar-header"> <a class="navbar-brand" href="#"> <img alt="Brand" src="~/Images/Logomarca_mini.jpg"> </a> </div> .....…
-
5
votes2
answers1027
viewsQ: Center image in Nav menu bar
How do I center an image in the Menu bar? When I talk about centering, I mean not the image in the middle of the bar, but whatever position it is in, that has the same "measurements" for the top and…
-
4
votes1
answer98
viewsQ: MVC 5 template or other: initial user form, information, database
Templates that come in VS2013 or any other version, when starting a project, it mounts a menu with: Home, About, Contact, Register and Login. Question: How does it store information from the default…
-
0
votes1
answer38
viewsA: Import or add Folder from an old project
Solved. I forgot something important. O Include in Project. I copied the folders inside and added them. Sorry for the lack of observation to this feature. Thanks and thanks.
-
1
votes1
answer38
viewsQ: Import or add Folder from an old project
I did a project and it was a problem in Solution. I had to create a new project and now I’m adding the old files. What happens that when I import folders it does not matter, only files. So far it is…
-
5
votes1
answer2655
viewsQ: My project no longer opens
My project was working perfectly. I went to open it now and gives me this error: When I arrived my grandson was with my notebook, but I don’t think he (3 years) would damage. It’s more likely to be…
-
2
votes1
answer1718
viewsQ: How to create schema and use it in table creation
I need to create some tables, but have that structure. For the tables of Registers I put: Registration.Company, Registration.UF, Registration.Address and so on. For the Logo tables I do: Log.Hits,…
sql-serverasked pnet 14,727 -
0
votes1
answer66
viewsQ: pick up customer with certain types of purchases
I have these tables: Sales : Idvenda(int)PK, Datavenda(Datetime), Qdeitem(Decimal), Valuation(Decimal). Iditem(FK),Idcliente(FK) Item: Iditem(int)PK,Descricao(Varchar),Valoritem(Decimal)…
-
3
votes1
answer408
viewsQ: Var inside the FOR when starting at 0(zero) Count should be Count-1?
I picked up a system at the company where I work for another colleague. I note that all FOR’s are like this: for(int i = 0; i < lista.count; i++) { //meu código } I learned that when a variable…
-
10
votes2
answers16045
viewsQ: Foreach or lambda in lists
Which one do I get the best performance to get the value of a given in a list? I do foreach or lambda(when possible, of course)? I can have this: foreach(var i in lista) { var teste = i.NmCampo; }…
-
0
votes3
answers1148
viewsQ: Take a variable value from Sql Server
I have this Sql block: SET NOCOUNT ON; Declare @QueryString as NVarchar(4000), @Datazero as varchar(20), @Datamn as varchar(20), @CdUsuario as integer, @SitProcesso as int ,@DsUsuarioRede…
-
0
votes1
answer71
viewsQ: Load variable with Split Expressions by scrolling through a list
First I made this code: for (int i = 0; i < vlstAcessos.Count - 1; i++) { if (vlstAcessos[i].DsURLTransacao == "frmANAAguardeProcesso.aspx") transacaoANA = vlstAcessos[i].DsURLTransacao =…
-
0
votes1
answer128
viewsQ: Date of last publication
We are having problems with publishing. We use TFS to convert the application. However, there are two people doing the final publication (I don’t accept this). There’s how I go to Visual Studio and…
-
1
votes0
answers26
viewsQ: How to put a break point in Web Service Soap
We have a normal web service, normal say: Not WCF. There are methods that are consumed by the application developed by us. As is giving an error and the message is in WS, I would like to know how I…
-
6
votes2
answers599
views -
0
votes1
answer109
viewsQ: Variable is always with value, when it should be null at certain times
I have this code: This rptAprovaDocumento is a Repeater public List<ENTSISRegistroPendencia> RegistrarPendencia() { CheckBox vchkTornarObrigatorio = null; for (int i = 0; i <…