Posts by brazilianldsjaguar • 3,303 points
103 posts
-
0
votes2
answers191
viewsA: OnExit event in editText?
I would use the Android attribute itself, the FocusChangeListener. In Xamarin, you can put something like this: translateButton.FocusChange += (sender, e) => { if ( e.HasFocus ) { //ganhou foco }…
-
0
votes1
answer158
viewsA: How the PHP include function works behind the scenes
There is no serialization of objects when using include. However, the PHP process the file and gives it a specific scope, depending on where includes the other article. The documentation explains a…
-
1
votes2
answers293
viewsA: I am Inciante , and I have a problem with a question, on the part of instantiating the objects
Print out in this sense, probably refers to the function System.out.print(). Example: System.out.print(c1.getNome());
javaanswered brazilianldsjaguar 3,303 -
1
votes1
answer365
viewsA: Consume php Web Api
I believe you are trying to interpret the XML you received from the web-api. In this case, you can use the SimpleXML PHP itself to interpret. Be below a simple example using SimpleXMLElement, using…
-
0
votes3
answers419
viewsA: Hide mandatory and non-compulsory field
Then I’d need to create a Validator, implementing IValidatable and IClientValidatable. A suggestion would be to create something like [Required], but only if another property or condition were true.…
-
5
votes3
answers308
viewsA: problems with distinct in mysql
Making a JOIN between the produtos and a union of produtos_pedidos should satisfy it. Something like that: SELECT a.id, a.unidade, a.posicao, a.nome, a.peso, sum(d.qtd) quant FROM produtos a JOIN (…
mysqlanswered brazilianldsjaguar 3,303 -
0
votes1
answer78
viewsA: How to create a Bitmap from a Color[][]?
Unfortunately there is no constructor or method for Bitmap that even accepts a two-dimensional array (as noted in the comments). The solution given in Luiz Vieira’s comments would be an appropriate…
c#answered brazilianldsjaguar 3,303 -
2
votes2
answers189
viewsA: What is class to draw circle on Android?
There is the OvalShape that can be used as a circle as well. https://developer.android.com/reference/android/graphics/drawable/shapes/OvalShape.html I’d wear it like this: protected void…
-
3
votes1
answer786
viewsA: Fluent Nhibernate - Composite key mapping one to many
I found that answer in Stack Overflow in English, but in my experience something like this helps and even solves: HasMany<AcessoDepartamento>(x => x.AcessoDepartamentos)…
-
1
votes1
answer154
viewsA: Guidelines for Visual Assets
Looking at the link you posted yourself, there’s this little information tequila: This is the size of Branding Bar (i.e., the name of the application) when the scale is 100% (normal). The article…
-
3
votes1
answer433
viewsA: Automapper Entities Viewmodel
Looking briefly at the images you posted, I see the following problem: Your Model view is a IEnumerable<UsuarioAtivosViewModel>. Obviously, a IEnumerable<T> does not have a property…
-
2
votes1
answer316
viewsA: Is there any difference in using the Read() method of the Sqldatareader object?
Every call to Read() will advance the reading of the search results. In that case, the difference would be: //contiuna lendo o próixmo até não houver mais while (reader.Read()) { ... } //lê o…
c#answered brazilianldsjaguar 3,303 -
2
votes2
answers405
viewsA: HTML and Javascript integration
As mentioned, you are using code that is based on jQuery. You’d have to include it first through a tag <script/>. Being already included, you could rewrite your code as follows: <script>…
-
1
votes2
answers200
viewsA: Patch Methods with Route and Authorize - webApi
I have already been frustrated with this doubt as well: I need to do something specific but it does not fit the POST, GET, PUT, or even the PATCH. My answer? Use the POST, with the appropriate…
-
7
votes2
answers4960
viewsA: What is the difference between "lambda" and LINQ? How to differentiate them in a sentence?
LINQ uses Amble, but Amble can be used without LINQ as well. Example: //declara uma função que retorna um bool, para ver se um int tem todos os mesmos números public static bool TodosIguais( this…
-
0
votes3
answers97
viewsA: Each does not work
The code works the way it is written (see below): https://jsfiddle.net/ds4duhzf/ Check that there are no errors in your Browser Console, particularly that jQuery is being included correctly.…
-
1
votes1
answer58
viewsA: Transforming a content into an image
One way would be to use the classes Bitmap and Graphics to make a screenshot. I did not test and I do not know if it will work, but it follows a code that shows an example of how to do screenshot of…
-
1
votes2
answers166
viewsA: Double insertion with mssql_query
Check that the form is not being submitted twice. A good way to do this is to take the mssql_query and simply make a echo "Test"; or something appeared. If you can’t, try using the Developer Tools,…
-
2
votes1
answer117
viewsA: Problem with the datakeynames property of the listview component
The estate DataKeyNames does not support the use of sub-class properties. That is, in order to have this Codigo, will have to be in class FluxoAprovacaoDocumento. You can create a property called…
-
14
votes15
answers4487
viewsA: Determine if all digits are equal
Using C#, you can also use the operators bitwise, making a binary comparison: public bool TodosIguais( int original ) { var deveSer = int.Parse(new string(original.ToString()[0],…
-
30
votes15
answers4487
viewsA: Determine if all digits are equal
A response in C#, using the method of comparing the characters of a string: public bool TodosIguais( int num ) { char comparar = num.ToString()[0]; foreach( var n in num.ToString() ) { if ( comparar…
-
3
votes2
answers108
viewsA: Project Empty Mvc. I can’t startar
I know you already answered your own question, but I wanted to expand a little more. As you have noticed, MVC uses a lot conventions. However, there are ways to do outside the conventions and do…
-
3
votes1
answer495
viewsA: Task.Run locking inside a "tick" (Forms.Timer)
I understand what you’re trying to do, but the System.Windows.Forms.Timer was simply not created for this. This quote, direct from MSDN: The Windows Forms Timer Component is single-threaded, and is…
-
3
votes3
answers859
viewsA: Use explodes to separate categories
Although what you are doing is subject to SQL Injection, you can use the implode() to transform an array to a string. Suppose your $_GET is like this:…
-
8
votes3
answers1792
viewsA: Is it a good idea to declare variables with accents?
The biggest problem with using extended ASCII characters is that not every computer interprets them equally. All computers interpret ASCII the same, but when it comes to extensions - e.g. characters…
-
0
votes1
answer50
viewsA: Received Webresponse String Editing
According to the comments of the question, I think you wanted to know how to change the contents of a string. In that case, what @David said is a possibility:…
-
1
votes3
answers256
viewsA: use the PHP implode
Based only on the code you posted: $valor = "valorA"; $valor .= "valorB"; $valor .= "valorC"; It could be altered to give you the desired result: $valor = "valorA"; $valor .= ",valorB"; $valor .=…
phpanswered brazilianldsjaguar 3,303 -
1
votes4
answers1027
viewsA: How to set a value in an input tag of another site?
The fields of a form are usually pre-filled by the attribute value="". Simply by calling another site, there is no way you can modify this attribute to by any data. Sometimes, as @Matheuscristian…
-
4
votes1
answer180
viewsA: Is it true that ++$variable (preincrement) is faster than $variable++ (post-increment)?
Editing I don’t know with PHP, but with C++ (which PHP has as inspiration), the only difference is found when referring to a class. That reply from Soen explains the difference between ++v and v++.…
-
1
votes2
answers76
viewsA: Save data to a text file to read later
The strategy you want to use is something very simple: write the data to a file, and when re-opening the app, read the same data and put it in the right place. C# (and the .NET framework) provides…
-
0
votes4
answers9200
viewsA: Query using like operator
Analyzing your query: select * from despesas where palavraChave like "%escola%" or data like '2015-08%' Are you telling SQL: Please give me all Tablea records expenses, where the cuss it’s like…
sqlanswered brazilianldsjaguar 3,303 -
1
votes1
answer530
viewsA: <button> does not work in Firefox within a Wordpress theme
To my mind, a <button> is rent and act quite different than a <a>, this being a link. It looks like IE and Chrome are interpreting your HTML in a way that ends up giving the desired…
-
4
votes3
answers3759
viewsA: Using Token method GET Webapi Httpclient
Samuel is absolutely right. To give you more information, understand that: client.DefaultRequestHeaders.Authorization is equivalent to: HTTP/1.1 Authorization: <tipo> <token> The…
-
2
votes2
answers455
viewsA: Read remote xml file
Clayton, PHP contains a way to read XML files natively, without another library. There is documentation here, in Portuguese itself, from the XMLReader. It doesn’t matter if the XML file comes from a…
-
1
votes2
answers108
viewsA: C# and Mysql with Aspnetusers, deleted tables
I think it must be using the Entityframework. This bizarre thing may come from it, because of the configuration when initializing a database. You have four options to initialize the database:…
-
0
votes1
answer92
viewsA: How to set the values of a Propertyinfo of the instantiated classes within a class?
If I understand correctly, you have a class that has a mixture of normal properties (from int, double, decimal, etc.) and class properties (of Class1, OutroClasse, etc..). If you want to access the…
-
1
votes1
answer241
viewsA: How to export Reportviewer to Excel while maintaining field types?
Unfortunately, the Reportviewer that comes with SSRS is very hard - you will not be able to edit with the data type (datatype) to be something different in Excel downloaded. That question and answer…
-
0
votes2
answers619
viewsA: How to get data from two tables in the same column?
One option you would have is to create a View in SQL Server: CREATE VIEW vw_Tabelas AS SELECT [Id] , [Nome] , [Sexo] , 'Tabela1' AS [Tabela] FROM Tabela1 UNION SELECT [Id] , [Nome] , [Sexo] ,…
-
3
votes2
answers170
viewsA: How to edit a Partial Class?
Maniero explained very well - that a partial class is only one class divided into multiple files. Example: auto/Pessoa.Cs namepsace App.Gente { public partial class Pessoa { public Pessoa() { } } }…
-
1
votes6
answers12215
viewsA: How to view php/mysql and Angularjs data?
I know you already have several answers here, but I’d like to remedy your problem based solely on the data you had given. First, let’s start where you started, at con-bd.php: <?php ... $conn =…
-
1
votes1
answer504
viewsA: Text overwriting the header
Inspiring me with various responses to this question of en.SE, and even having never used the itextsharp, I believe I could do so: Inserts the content not in the OnStartPage(), but yes, in the…
-
2
votes1
answer1038
viewsA: How to load JSON in Mysql, including JSON specific fields
The error you are getting: "Fatal error: Uncaught Exception 'Pdoexception' with message 'SQLSTATE[42S22]: Column not found: 1054 Unknown column 'business_id' in 'field list'' in C: wamp www…
-
6
votes2
answers16374
viewsA: What is the difference between Ajax dataTypes in jQuery?
The reply of @Jeffersonsilva is quite skeptical, but I would like to present a more technical answer. jQuery dataTypes are based on MIME Types. These are used in the HTTP header, where it refers to…
-
1
votes2
answers999
viewsA: Difficulty creating sessions to save form data
In his novaRequisicao.php, add the session_start(): $sql="SELECT COD_GRUPO, DES_GRUPO_PRODUTO FROM supervisor.GRUPO_PRODUTO"; $query= mssql_query($sql) or die ('Erro ao realizar consulta ao banco de…
phpanswered brazilianldsjaguar 3,303 -
2
votes3
answers933
viewsA: How to remove the last character, store the result in a variable and use the variable outside of foreach?
Although the @rray answer is quite simple and useful, there is also another way to get the desired result. Use a bool to know if an item is first or not on the list. An example: <?php $rows =…
-
3
votes1
answer70
viewsA: How to display the error coming from Mysql?
Your PHP code needs to return an HTTP code other than 200. Simply returning true or false is not sufficient - in both cases, the $http.post() returns successively, but simply the success has the…
-
0
votes2
answers232
viewsA: C# error when trying to add an inherited component in Toolbox
Check that the version of . NET that made the components is compatible with the version of the project where you want to use them. For example, do not create a component in . NET 4.5 and try to use…
-
0
votes2
answers543
viewsA: Video Jquery Exchange
When you’re calling the setVideo(), is modifying HTML directly from <div id="div_video">. Your page, however, originally has no HTML inside the <div>, and a tag of <video>…
-
1
votes3
answers10027
viewsA: How to show values stored in JSON in Javascript
It depends a lot on how this data is archived in this JSON. For example, it may exist like this: { valore: [ 2.51, 2.56, 2.87, 2.89, 2.94 ] } If it is, putting that value on a <div> may not…
-
19
votes4
answers23451
viewsA: How to convert seconds to "Hour:Minute:Second" format?
You can use the function gmdate(): echo gmdate("H:i:s", 685); Refers to that answer soen…