Posts by Tiago S • 4,234 points
136 posts
-
1
votes1
answer1018
viewsA: Google Maps address search for Android?
You can use this function: adderess = c.getString(c.getColumnIndex(SQLiteAdapter.KEY_CONTENT3)); // get address in string for used location for the map /* get latitude and longitude from the…
-
1
votes1
answer74
viewsA: Help with TCP Connection
Have this example: Tcpclient import android.util.Log; import java.io.*; import java.net.InetAddress; import java.net.Socket; public class TCPClient { private String serverMessage; public static…
-
0
votes2
answers505
viewsA: Leave XML in a single line
You can separate lines in array and then concaterate string xml = dadosdoxml.ToString(); var separar = xml.Split(new string[] { "\r\n", "\n" }, StringSplitOptions.RemoveEmptyEntries); string final =…
-
1
votes1
answer144
viewsQ: How to protect access tokens in a web application?
I have an application on AWS and to access it I need to pass a access token and a SSID. To access the AWS application I have a website, but the keys are written in the HTML code, and anyone…
-
4
votes3
answers2971
viewsA: Generate an xml in c#
Using the Vitor model, you can also use the attribute class Serializable: [Serializable] public class Pessoa { public string Nome { get; set; } public int Idade { get; set; } public Pessoa() { }…
-
1
votes1
answer160
viewsA: Windows phone 8.1 deploy error: DEP0001 : Unexpected Error: -1988945906
This error is caused by the reason of the service IpOverUsbSvc stand still. Go to Task Manager >Services Tab > Search for Service Ipoverusbsvc Right-click and start service.…
-
0
votes1
answer160
viewsQ: Windows phone 8.1 deploy error: DEP0001 : Unexpected Error: -1988945906
When deploying or debugging the project this error appears DEP0001 : Unexpected Error: -1988945906. It compiles everything right, however, when it goes to install on the phone appears the error. The…
-
1
votes1
answer303
viewsA: Pass object to Webservice
Unable to pass an object to the webservice. You have to convert the object to string and send the string to the webservice and in the webservice convert the string to an object again. Normally I use…
-
0
votes1
answer198
viewsA: Android VM - Connection Error
I had the same problem. The solution for me was to go into the settings of wifi of android and manually configure the network by changing the IP settings as Static and the IP address being that of…
-
0
votes0
answers42
viewsQ: Can’t Convert error to color: type=0x2
In Xamarin, when debugging the application, this error appears Can’t Convert to color: type=0x2 in the method SetSupportActionBar(...); Excerpt: Android.Support.V7.Widget.Toolbar myToolbar =…
-
2
votes2
answers1292
viewsA: Xamarin Error - aapt.exe/Resources
Follow the steps below to identify the problem: 1 - In Visual studio: Tools > Options > Projects and Solutions > Build and Run. 1.1 - In the dropdown: Msbuild project build output…
-
1
votes1
answer51
viewsA: Display a Direct Message on the Mainpage page
To keyword await can only be used in methods that have the keyword async. However, manufacturers do not allow keyword async, only the methods. In your case I recommend that you use the event loaded…
-
0
votes1
answer59
viewsA: Save image and rename without SQL
You can use the method below to convert the imagens in string of base64. private string ImageToBase64(string imagePath) { using (Image image = Image.FromFile(imagePath)) { using (MemoryStream m =…
-
0
votes1
answer60
viewsA: String to Date conversion
You can convert a string to date like this: new Date('2011-04-11') for more information: MDN|Date…
-
1
votes1
answer197
viewsA: Count result of a variable
Thus use: foreach($notasAlunos as $notaAluno){ $resXML = $xml->avaliacao->disciplina->questao->resposta; if($resXML == $notaAluno){ $valor++; }else{ $valor = 0; } } echo $valor; In your…
-
1
votes1
answer246
viewsA: How to list Mysql results in the listview
To popular a listview use this way: foreach (BDependente bDepe in lDep) { ListViewItem lvItem = new ListViewItem(bDepe.Nome); lvItem.SubItems.Add(bDepe.Grau_parentesco);…
-
0
votes3
answers447
viewsA: Search for more than one value in the same column?
Make sure it fits you: 2 years SELECT id, data_exame, resultado FROM Minha_tabela where YEAR(data_exame) = 2015 OR YEAR(data_exame) = 2016; 3 years old SELECT id, data_exame, resultado FROM…
-
2
votes1
answer220
viewsA: Where to implement Facade in the MVC?
The main objective of Facade is to mediate the interaction between a view and a model, or in some cases only one model. In your case you implement on controller.…
-
21
votes2
answers548
viewsQ: What’s the difference between a js file with . min and no . min?
What is the file difference Javascript containing .min (for example jQuery.min.js) and the file without the .min (for example jQuery.js)?…
-
0
votes1
answer171
viewsA: Identify the largest number
See if this solves: private static double Max_avvv=0; public string max() { System.Diagnostics.Process[] ieProcs = Process.GetProcessesByName("devenv"); double avvv = 0; string abi = null; if…
-
0
votes2
answers256
viewsA: Windows Forms and Panels
You can use the UserControl to build the components of login, registration and etc... and add in the main form the corresponding control. Creates a UC login and other record and in the main form you…
-
0
votes2
answers78
viewsA: How I Address a Partialview ASP MVC
Recently I had to do exactly that and after so much research I decided to use javascript to do the job of carrying the partialview within the div. Javascript function RefreshList() { var url =…
-
3
votes3
answers1322
viewsA: Add "name" to a JSON object
You just need to turn your json in array: Convert that: {"nome":"aluno","nome":"barbara_cristina","nome":"carolina_deus"} In this:…
-
0
votes3
answers910
viewsA: Close the Bootstrap dropdown by clicking on another dropdown in the same menu?
One solution: Remove the check if (($('.dropdown.open').length > 1)) $(function() { $('.dropdown.opened') .on({ "shown.bs.dropdown": function() { this.closable = ($('.dropdown.open').length >…
-
1
votes2
answers78
viewsQ: How I Address a Partialview ASP MVC
I have a View who has a div and within it goes a partialview EX: <div> @Html.RenderPartial("MeuPartial"); </div> In the right page render load, however, I needed it to render every time…
-
2
votes3
answers5944
viewsA: CSS - Align image inside table with inline css
In your code I found a padding-left <td style="display: inline-block; width: 50px; padding-left: 30px;"> in the image column and, if you remove it, apparently it works. <table>…
-
1
votes5
answers946
viewsA: Bootstrap: prevent the menu from closing when clicked out of it
I found this solution: HTML <li role="presentation" class="dropdown keep-open"> <a id="drop6" href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true"…
-
2
votes1
answer26
viewsA: How to create relationships between different data to perform an action?
I don’t know if I got it right, but you can create attributes inside an html tag. What I mean is this: <select id="billing:region_id" name="billing[region_id]"> <option value=""…
-
0
votes3
answers1145
viewsA: Asp.net MVC Session ends
Check that the Kinghost server does not have any timeout settings. That of session time may be related to the server and iis, I once had a site on a shared server where sessions blew up in 5 minutes…
-
0
votes4
answers1784
viewsA: Confirmation of sending email?
Yes has as. Using the tool Mautic. Mautic is a marketing automation tool, it has a feature that would suit you that would be sending email to a customer list. When you send emails with mautic, you…
-
1
votes2
answers611
viewsA: Send email using ASP.NET
Here’s an example with Asp.net mvc4 and javascript: MVC: public ActionResult SendEmail() { var fromAddress = new System.Net.Mail.MailAddress("[email protected]", "From Name"); var toAddress = new…
-
9
votes4
answers24789
viewsA: Menu and submenu with bootstrap
<ul class="nav nav-pills"> ... <li role="presentation" class="dropdown"> <a class="dropdown-toggle" data-toggle="dropdown" href="#" role="button" aria-haspopup="true"…
bootstrap-3answered Tiago S 4,234 -
2
votes1
answer396
viewsA: How can I put these random questions?
I don’t know if this will be useful to you. But I show below an example of how to leave a random collection (List,Array). Call of the Method public void RandomizarMinhaLista() { List<string>…
-
0
votes1
answer220
viewsA: Image in WPF menu with C#
The solution is very simple: <Image Source="pack://application:,,,/**Coloque.Aqui.O.Namespace**;Component/Image/minhaimagem.png" />
-
0
votes1
answer1757
viewsA: Exception Error "' ', hexadecimal value 0x1F, is an invalid Character. Line 1, position 1"
To avoid abrupt closure change your code like this: try { ... } catch (System.ArgumentException erro) { LoadDataHoje(); contador++; if (contador == 5) { // throw new ArgumentException(); Remova…
-
1
votes2
answers3120
viewsA: The name 'parameters' does not exist in the Current context
Do it so it will solve your problem: *Note that I only enter the variables at the beginning of the method. Depending on your application, you may need to check the variables. public DataSet…