Posts by Randrade • 21,612 points
490 posts
-
2
votes1
answer49
viewsA: Remove first character by Index
Just change the PATINDEX for that reason: %[^0]%' And to remove the first character, you can use the SUBSTRING(), in this way: DECLARE @ID_CUSTOMERNUMBER varchar(60) SET @ID_CUSTOMERNUMBER =…
-
2
votes2
answers394
viewsA: Calculate percentage of total HTML columns with Jquery
I will add my answer with the premise that your function to add the total value is correct, so I will use the HTML posted in your reply, already with the total, as basis. I will not use the class…
-
1
votes3
answers419
viewsA: How to know if a key in sql server is Identity
You can use the COLUMNPROPERTY for that reason. select columnproperty(object_id('NomeTabela'),'NomeColuna','IsIdentity') This way will return one of the options: 1 = TRUE 0 = FALSE NULL = The input…
-
7
votes2
answers441
viewsA: Query that returns if the child has inherited the parent’s and/or mother’s surname
You can create a function to perform the split of the data and then just do a join simple. A functional example would be this: CREATE FUNCTION dbo.SplitStrings_XML ( @List NVARCHAR(MAX), @Delimiter…
-
4
votes2
answers690
viewsA: Return xml to preview browser Asp.net mvc
You can create a Custom Actionresult for that reason. An example would be: We’ll call in our Custom ActionResult of XmlActionResult. public sealed class XmlActionResult : ActionResult { private…
-
1
votes1
answer53
viewsA: Unsolicited Truncation of Time
In his View you’re passing a DateTime complete and the EditorFor() is with the guy’s field Time. It’s the same thing as you doing it: <input type="time" value="04/07/2017 01:59:00" /> This…
-
3
votes1
answer116
viewsA: How to run html on an Activity?
Just open the file in a Webview. Add to WebView me your layout file: <WebView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/webview"…
-
8
votes2
answers17712
viewsA: Inputmask() function for Cpf and cnpj
I didn’t quite understand your problem. Using this library of Inputmask, your code works perfectly. See an example of it below. $("input[id*='cpfcnpj']").inputmask({ mask: ['999.999.999-99',…
-
4
votes1
answer743
viewsA: Upload to Drive
Let’s go in pieces. First, The example of Oauth in Asp.NET MVC you can see here, but I will transcribe the form of use here. Install the package Google Apis Auth MVC Extensions, with the following…
-
1
votes1
answer786
viewsA: Change google Chart values by clicking on an element
I don’t quite understand how you populate this data, whether it comes from a WS, or whether it’s manual. So I created two functions, one for popular per day and one per month. By clicking on the…
-
0
votes1
answer309
viewsA: Correct semantics to make an entire div become an anchor
From HTML5, the element a can have paragraphs, lists, tables and even sections, as long as it has no interactive content (buttons and other links). With that, it is not incorrect to add to div…
-
2
votes3
answers219
viewsA: Check function existence in C#
I don’t see a point in doing that. As was said in the comments, C# is not a dynamic language that the function may or may not exist. However, I will answer anyway. As you said in the question, you…
-
5
votes1
answer246
viewsA: How do I stop watching the changes in a particular file?
You can use the assume-unchanged for that reason. It would look something like this: git update-index --assume-unchanged path/file And to return to "obervar", just do this: git update-index…
-
9
votes1
answer605
viewsA: How to login without using the Identity standard?
I will respond with the premise that you already have the facebook app configured correctly, including with valid return Uris. First, let’s look at the Facebook API (the others like Google follows…
-
7
votes2
answers15150
viewsA: Error login facebook
This error occurs because the return URL is not registered on Facebook. To do this, you must access your application and add the return URL. Here is a short tutorial on how to do this: 1: Go to your…
-
7
votes2
answers558
viewsA: How to deserialize a json to int?
In your JSON testing, the properties Icone and Color are receiving the value of aaaa. Logically, aaaa is not an integer value. If you are sure the value will be text, change the type of properties…
-
4
votes2
answers584
viewsA: Center text vertically
I don’t know if I understand you correctly, but all you had to do was add the signature class to the image. body { padding: 50px; font: 14px Verdana, Helvetica, Arial, sans-serif; background: #444;…
-
4
votes1
answer940
viewsA: How to know which is the PID of a currently running Python script?
Before we answer, let’s talk a little about PID. Process Identifier (process identifier), PID, or process ID is a unique number that is assigned by the operating system when a process is executed.…
-
1
votes1
answer402
views -
3
votes5
answers1015
viewsA: Line with image in the middle
You may not need to make an image in photoshop, just style a div to behave the way you want, as in the example below: .hr-middle { display: flex; flex-basis: 100%; align-items: center; color:…
-
1
votes0
answers31
viewsQ: What is Covariance, Contravariance and Invariance?
Reading this article by Microsoft I came across these three terms, with the following meanings (translation via Google Translate): Covariance Allows to use a type more derived than originally…
terminologyasked Randrade 21,612 -
4
votes2
answers406
viewsA: Tolist vs Typed Tolist
In fact, the two are the same thing, because the generated code will be the same. It only makes sense to use the typed method if you want to specify a different type than IEnumerable. Other than…
-
3
votes1
answer1815
viewsA: How to add vertical line in column type chart
Add columns to your chart with the scroll Annotation and with that just set the text to the line. See the example below: google.charts.load("current", { packages: ['corechart'] });…
-
1
votes2
answers70
viewsA: How to fetch a json value from the goo.Gl API to C#
Google has the package Google.Apis.Urlshortener. Just install the same via Nuget and use it. To install, type the following command in Package Manager Console: Install-Package…
-
5
votes1
answer82
viewsQ: How to make Stripe only with CSS?
How can I make one Stripe (diagonally striped) with CSS only? The image below illustrates my question better.…
-
5
votes1
answer82
viewsA: How to make Stripe only with CSS?
You can use the repeating-linear-gradient for that reason. A practical example, taken from the documentation itself, would be this: div { display: block; width: 50%; height: 30px; border-color:…
-
4
votes1
answer2461
viewsA: Bootstrap - How to increase the size of the input column?
If you started the project on Asp.Net MVC5, the visual studio creates a file called Site css.. It gets in ~/Content/Site.css In this file, it has the following line: input, select, textarea {…
-
1
votes1
answer155
viewsA: Treat Exception in Jquery Post
In the documentation of $.post(), there is the .fail(). Use it to do something if an error occurs on the server. A simple example would be this: $.post("MinhaUrl/AsyncMessage", function() {…
-
10
votes5
answers1252
viewsA: What are the advantages and disadvantages of using pagination and infinite scroll on websites?
What is Infinite Scroll? Scroll Inifino is a way to have an infinite page (if you have data for that, of course). This way, as the user reaches the bottom of the page, new records will be added…
-
2
votes1
answer124
viewsA: Display text coming from the database under @Html.Actionlink()
In place of @Html.DisplayFor(model => item.Resumo) just switch to something like: @Html.ActionLin(item.resumo, "ACTION", "CONTROLLER", new{id = item.PUBLICACAOID}) This way, the text will be the…
-
4
votes1
answer177
viewsA: How to integrate Tinymce with ASP.NET MVC
I’m not gonna talk too much about Tinymce, I’m gonna talk about his problems and a way generic to solve. First, you own two forms on the same page. Even using Ajax indirectly, you may have some…
-
2
votes1
answer694
viewsA: Mult Mapping Dapper
The problem is that the name of the Field in the database (your select) is different from the name of your Entity. Just change it to be equal and everything will be solved. A simple option is to use…
-
2
votes1
answer625
viewsA: Get specific login data through facebook
The Facebook API has undergone several changes over time, which has made most of these methods lagged. What you can do is the following: In his Startup.Auth.cs, add the following code:…
-
1
votes1
answer106
viewsA: How to make Web Publish from nested applications to IIS?
I think the solution is simpler than you think... First, run a profile of Web Deploy of the system Portal. After that, a file similar to this should be generated (edited in Sublime Text). <?xml…
-
4
votes2
answers2474
viewsA: How to use Chart.Js with ASP.NET MVC
One simple way to use is by using the Chart.Mvc. To use this package, simply install via Nuget with the following command: Install-Package Chart.Mvc After that, do something like this in your View:…
-
2
votes3
answers519
viewsA: Sending temporary information between classes with C# 4.0 MVC 4
One option would be to work with cookies. To be exact, with domain cookies. According to the your comment, both systems are subdomains of the same domain, that is, they all end with .site.com.br.…
-
2
votes3
answers519
viewsA: Sending temporary information between classes with C# 4.0 MVC 4
Assuming you have access to both systems, you could perform a POST from Projectoa to the Projectob passing a value. And, in the projectB you check if this value exists and fill your TempData. An…
-
2
votes2
answers818
viewsA: How to disable old dates in Bootstrap Datepiker version?
Simple, just use the startDate, as in the example below. $('input').datepicker({ autoclose: true, startDate: 'd' }); <script…
-
4
votes3
answers2135
viewsA: How to put an element in Fullscreen
You already have the code ready, just change the document for the desired element, as in this example below: function toggleFullScreen(id) { var div = document.getElementById(id); if…
-
2
votes2
answers836
viewsA: Click button more using list (li)
There are several ways you can get what you want, one of them is this: First we will set the value that will start to display (for easier execution, put 5 instead of 10). This value is in var count…
-
1
votes1
answer116
viewsA: Using model Annotations for C#controller
In this case you will have to work with the famous Reflection. To do this, you will need to read the selected property and return the desired value. An example would be something like this: public…
-
3
votes1
answer195
viewsA: how to create index order desc through Dataannotations
By default, there is nothing to do what you want. However, nothing prevents you from doing your Custom Migrations Generator, as shown in this answer. To do this, simply create a class inheriting…
-
12
votes3
answers44552
viewsA: How to connect Python to Mysql database?
The site itself mysql has an area focused on this subject, but I will try to summarize a little. First, you need the Mysql for Python connector. After installing the Nector, just import it into your…
-
4
votes1
answer763
viewsA: How to Save Files to Separate Server by Extension
I won’t go into detail about the MultipartFormDataStreamProvider. It could be something a little extensive, so I’ll just show you how to modify your code to do what you want. First, as you want to…
-
1
votes2
answers71
viewsA: Controller code is executed but nothing happens
You’re making some trouble there. First, you are using Ajax to do a normal search. However, you are not doing anything with it. As your return is a RedirectToAction(), Ajax doesn’t know what to do.…
-
3
votes1
answer465
viewsA: Googlelocationservice problem getting latitude and longitude
The API finds nothing because the address you are passing is "invalid". Your address is invalid to the requested parameters because you are passing a part that is not part of the address, which is…
-
7
votes1
answer52
viewsA: What is the need to inform the parameter "Order" in the object of type Indexannotation?
First of all, let’s get the exact description of the property Indexattribute.Order. Obtains or defines a number that determines column sorting for multiple column indices. This will be -1 if no…
-
4
votes2
answers114
viewsA: How to mark/deselect a link on a page by clicking on next/back?
Well, the simplest way I imagined is to keep the counter from the current position and go regressing or increasing according to the click. Let’s go in pieces: First, we will have our counter that…
javascriptanswered Randrade 21,612 -
2
votes1
answer50
viewsA: Selections boxes required at least 1 with Data Annotations
What you want is a conditional validation. There are several ways to do this and some of them I will demonstrate below: Interface Ivalidatableobject. With it you can perform some extra checks on the…
asp.net-mvc-5answered Randrade 21,612 -
0
votes2
answers1724
views