Posts by Guilherme de Jesus Santos • 6,566 points
77 posts
-
6
votes2
answers4616
viewsA: Login with network user(AD)
If you are going to create a new project, just use the ASP.NET Web Application project template, choose MVC, next there is the Change Authentication option : Then choose Windows Authetication…
-
3
votes1
answer856
viewsA: What is the correct way to declare an asmx Webmethod in C# to receive POST requests with parameters?
There was nothing wrong with your method. So much so that if you test with : <script> $(document).ready(function () { $.ajax( { url: "/Services/PublicacaoService.asmx/UploadFiles",…
-
4
votes2
answers839
viewsQ: How to check if a class implements a C#interface?
How to check if a class implements an interface? For example, I want to include an if that checks if an object is of the Idisposable type. How to do? I tried something like : MinhaClasse meuObjeto =…
-
1
votes2
answers180
viewsQ: Why does the universal selector * have a negative impact on browser rendering?
I was just applying a CSS Reset to my website. I usually use the one suggested by Eric Meyer http://meyerweb.com/eric/tools/css/reset/ . But I was looking at Diego’s suggestion…
-
8
votes2
answers4221
viewsQ: What is the difference between SOAP 1.1 and SOAP 1.2?
When I use SOAP UI ( http://www.soapui.org/ ) and I refer to my asmx webservices, it always creates the interface of operations for SOAP 1.1 and 1.2. And I don’t understand what the practical…
-
17
votes2
answers4840
viewsQ: What are AMD and Commonjs?
Recently I’ve heard a lot about Asynchronous Module Definition (AMD) and Commonjs. It seems like two terms are in fashion. I read some things about, but I’m still confused. AMD and Commonjs are…
-
1
votes4
answers3935
viewsA: Automated tool to join multiple style sheets (CSS) into 1 and to join Scripts (JS) into 1 Sheet only
To make "bundling" (join multiple CSS and javascript files into one) I use the Web Essentials extension for Visual Studio Express 2013 for Web ( http://vswebessentials.com/features/bundling ) But…
-
2
votes5
answers23429
viewsA: Calling js function in another file - Dependency between Javascript scripts
You know the Requirejs ? http://requirejs.org/ Requirejs is a Javascript and module file loader. It is a javascript library. Download into http://requirejs.org/docs/download.html#requirejs or refer…
javascriptanswered Guilherme de Jesus Santos 6,566 -
7
votes1
answer523
viewsQ: Why is it risky to run Java applets in browsers?
In my company, we have two websites that need a Java applet (to authenticate using digital certificates). And these two sites give a lot of headache, mainly, whenever Oracle releases an update from…
-
1
votes2
answers138
viewsA: Animation when the element reaches the center of the page (jQuery)
You can use the jquery Waypoint plugin http://imakewebthings.com/jquery-waypoints/ Download the plugin, and refer to your HTML. Then use the parameter offset: 50%, so is the center of the view.…
-
3
votes2
answers9928
viewsA: Tables with Bootstrap
To create the proposed layout, here is the example below : <div class="container"> <div class="row"> <div class="col-md-6">CNPJ</div> <div class="col-md-6">Razão…
-
2
votes4
answers6579
viewsA: Resize image
You’re wearing it to yourself. NET MVC, could create in your Controller an Actionresult that receives as parameters the desired image, width and height. For example : public ActionResult…
-
2
votes2
answers180
viewsA: How to produce JSON in the format that Flot expects?
As Wakim commented, the generated format was already correct. What I had wrong was in the so-called Ajax. The correct call should be $.ajax({ url: '/graficos/GeraTesteFlot', method: 'GET', dataType:…
-
1
votes2
answers180
viewsQ: How to produce JSON in the format that Flot expects?
Doubt on how to serialize to return this JSON. I’m using the Flot library (http://www.flotcharts.org/) to display a chart. I can generate the charts. In my view I’m wearing it like this : $.ajax({…
-
32
votes5
answers1927
viewsQ: Why is multiplication faster than division?
Bit brushing question, but I was reading an article about javascript in which says that division is slower than multiplications. And for example, I would recommend changing the code below : var…
-
74
votes5
answers2194
viewsQ: Exceptions consume a lot of processing. Truth or legend?
I’ve seen shows like this : if(!clienteExiste(1)) { return "Cliente não existe."; } and others like that if(!clienteExiste(1)) { throw new Exception("Cliente não existe."); } The second code will…
-
17
votes2
answers4913
viewsQ: How to check if a file is in use without launching C#exception
I have an application that processes a file queue. I need to open the files for reading and writing. Sometimes the files are in use when I go to process them. How can I check if the file is in use?…
-
10
votes5
answers462
viewsQ: Internet Explorer, should I still be worried about him?
Today when developing a new website, should still worry about compatibility with old versions of Internet Explorer, or we have already overcome this phase? I ask this because today I received the…
-
10
votes5
answers18134
viewsQ: Using jQuery, how to select elements with two CSS classes
I have a div that uses two CSS classes. Here is the HTML : <div class="box1"></div> <div class="box1 destaque"></div> <div class="box2"></div> <div class="box2…
-
4
votes2
answers442
viewsQ: Code First with Complex Types, when making Scaffolding the properties of Complex Types are not found in the views
I’m following Sergey Barskiy’s presentation on http://www.youtube.com/watch?v=l3WzYZsN0gU, where it demonstrates the Entity Framework approach with Code First. I loved it, but I had a problem. In…
-
2
votes6
answers1227
viewsA: Property readonly . NET
One way is to create a property without the Set public int PropriedadeReadOnly { get { return propriedadeReadOnly; } } And a second form, which allows the property to be written only once, usually…
-
3
votes1
answer674
viewsA: How to define the culture in a WCF Webservice?
If you only use HTTP, you can activate the property aspNetCompatibilityEnabled, so WCF will read the settings of globalization. <serviceHostingEnvironment aspNetCompatibilityEnabled="true"/>…
-
50
votes7
answers6727
viewsQ: In object orientation, why are interfaces useful?
Someone can give a practical explanation of why interfaces are used and why they are useful to us developers?
-
58
votes7
answers20675
viewsQ: What are lambda Expressions? And what’s the point of using them?
When I started using LINQ I saw I could use the famous lambda Expressions. Until I know that x => x * x is a lambda Expression, but I could not explain to a colleague what they really are, and…
-
29
votes7
answers9251
viewsQ: In C#, what is the await keyword for?
I was studying this documentation about Asp.net Identity, and in the examples in C# has a keyword that I don’t know, which is the await, example : [HttpPost] [AllowAnonymous]…
-
6
votes1
answer1212
viewsQ: Is it possible to create a Rigger that invokes a web service?
I am working on the integration of two databases. It is a system that needs the status of employees in HR. For performance reasons, I can not point out all queries that depend on employees for the…
-
16
votes2
answers1245
viewsQ: Why is Addrange so much faster than Add?
I’m working on a data integration between two databases, and I’m using Entity Framework for that reason. I then generated the following code, which iterates each record in the Base Situations table…