Posts by ndr458 • 315 points
5 posts
-
3
votes4
answers190
viewsA: Divide a sentence into 2
I believe that this solution is also valid <?php //Frase para dividir ao meio $nomeProd = "Nome do produto teste cadastrado no banco"; //Quantidade de letras da frase $comprimento =…
-
2
votes3
answers1098
viewsQ: Problem with Padleft
I have a problem using the Padleft method. I need to put some zeros in front of a string, but I’m not getting it. For example: string value = "2001795"; string newValue = value.PadLeft(5, '0');…
-
1
votes1
answer111
viewsQ: Mappingnhibernate
How do I map a table that has a composite key in Nhibernate? For example: I have a table called configuracao. This table has a reference to the table local_estoque. Normally a map would look like…
-
6
votes3
answers23959
viewsQ: Disable SQL Server Column Identity
How do I disable the property identity of a column in the SQL Server? I’ve tried to: SET IDENTITY_INSERT ON/OFF But it didn’t work. I don’t know if it’s only for insertion, but I need to do an…
-
9
votes2
answers354
viewsQ: How do C#properties work?
In Java I usually create private attributes and create methods getters and setters, on account of the encapsulation. I couldn’t quite understand how this works in the C#.…