Posts by Marcell Alves • 2,453 points
66 posts
-
10
votes1
answer421
viewsQ: What are software design antiparks?
Is there a catalog of them for consultation, just as there is for design standards? Antipadrons are the same as bad practices?
-
0
votes2
answers1536
viewsA: Convert string in binary format to PDF
One of the new features of C# 7.0 is the Binary literals. With it, the solution to this case would be simpler: var bytes = 0b0100_0101_0101_1110_0111_1111; File.WriteAllBytes(@"C:/teste.pdf",…
-
4
votes2
answers1768
viewsA: Single quotes are allowed in JSON?
No, only double quotes are allowed in JSON. The question example generates an invalid object as it can be tested in the link: http://jsonlint.com/ The right thing would be: { "helloWorld": true }…
jsonanswered Marcell Alves 2,453 -
4
votes2
answers1768
viewsQ: Single quotes are allowed in JSON?
I can represent a JSON object this way? { 'helloWorld': true }
jsonasked Marcell Alves 2,453 -
15
votes2
answers4859
viewsQ: What is von Neumann’s architecture?
How it works and why it has become the dominant computer model?
-
3
votes1
answer2563
viewsQ: Use single or double quotes for strings in Javascript?
Is there any difference between writing a literal string between single and double quotes? Example: var s = 'texto'; // ou var s = "texto";
javascriptasked Marcell Alves 2,453 -
1
votes1
answer192
viewsQ: SET ENABLE_BROKER taking too long to run
I executed the command ALTER DATABASE [Banco] SET ENABLE_BROKER; but it’s been running for over 20 minutes and counting. It would have a faster way to execute?
-
2
votes1
answer192
viewsA: SET ENABLE_BROKER taking too long to run
Yes, there is a quicker way: ALTER DATABASE [Banco] SET ENABLE_BROKER WITH ROLLBACK IMMEDIATE; SQL Server does not allow the command to run until all pending transactions are complete. With the…
-
1
votes2
answers396
viewsA: fill array to generate json javascript
The right way to do this is by using the method push: var array_fotos = []; array_fotos.push({ "id": 1, "foto": imgName, "tamanho": $(".tamanho_fotos").val(), "quantidade":…
arrayanswered Marcell Alves 2,453 -
0
votes1
answer372
viewsA: Take Image Separately with Jquery
Use the onclick event in the span tag marked with the 'remove' class and create a function that receives the id of the image to be removed. Example (I adapted your code because I had no access to…
-
5
votes2
answers1223
viewsA: SQL - Searching for best-selling product in a date range
The WHERE clause should come before GROUP BY and ORDER BY. Example: SELECT produto_id FROM conta_produtos WHERE updated_at BETWEEN '2017-03-03' AND '2017-03-08' GROUP BY produto_id ORDER BY count(*)…
sqlanswered Marcell Alves 2,453 -
3
votes2
answers499
viewsA: Show/ Hide div, changing icon
The problem is occurring because the Document.getElementById selector expects to return a single element, since the id property serves to identify a unique element in the DOM. An alternative would…
jqueryanswered Marcell Alves 2,453 -
1
votes1
answer809
viewsA: Simple Injector + Uow + DDD + Multiple Contexts + Entity Framework
A solution to your problem would be to create an interface and a Unitofwork class for each context. In this way, it eliminates the problem of ambiguous relationship. In the case of context class…
-
0
votes1
answer293
viewsA: Select button with one click and only open with two clicks
One solution is to use jQuery’s dblclick event. Example: ASPX <asp:Repeater ID="rtInlineBlock" runat="server"> <ItemTemplate> <div class="block"> <asp:HiddenField…
-
2
votes1
answer1528
viewsA: Carousel Bootstrap
Here is an example of the implementation of Bootstrap Carousel with text in place of the next and previous buttons: <div id="myCarousel" class="carousel slide" data-interval="3000"…
-
4
votes1
answer1897
viewsA: Return JSON with ASP.NET/C#
To make this ajax call work in your Webforms application, you will need to change the route setting. In the "~/App_start/Routeconfig.Cs" file, change from: settings.AutoRedirectMode =…