Posts by felipearon • 715 points
41 posts
-
0
votes0
answers14
viewsQ: List of properties with Soapobject on Android
I have the following parameter structure in the webservice, and the Alistafoto parameter is a list (array): <parameters> <NCodCli></NCodCli> <AListaFoto>…
-
1
votes1
answer341
viewsQ: How to remove space from the JSON (String) value in C#?
I have the following JSON stored in a String variable: {"novosPedidos":[],"pedidos":[{"Apagar":" 633.56"}]} The "Delete" value contains a space which I need to remove. I tried using the Replace()…
-
-1
votes1
answer960
viewsQ: Change DIV order to mobile with Bootstrap
In my example, I am using Bootstrap to change the order of DIV between PC and Mobile. Is there any more elegant (correct) way to do it without having to replicate the DIV code? <div…
bootstrap-3asked felipearon 715 -
1
votes1
answer224
viewsA: Delphi Service Application: How to install the service by passing parameters that will be read via code when running?
I was able to solve it this way: I added the parameters to the service property. In the Onstart() event in Delphi, I can get the values of these parameters through Param[index]:…
-
0
votes1
answer224
viewsQ: Delphi Service Application: How to install the service by passing parameters that will be read via code when running?
I created a simple service application by Delphi. I need that at the time of installing the service in windows, I pass some parameters that will be read and used at the time the service starts:…
-
0
votes1
answer469
viewsQ: Send special character in Request body via Httprequest in Delphi XE2?
I am consuming an API (POST), via Delphi for sending NF-e XML. I am using Httprequest. In the body of the request (body) I must pass the xml as follows: xml= But the issuer’s social reason (xName)…
-
-2
votes1
answer184
viewsQ: Remove value quotes in Jsonobject on Android
In my Android project I need to generate the following Json result: {"value":164.40} However, how to remove the quotes from the String result? JSONObject json = new JSONObject(); json.put("value",…
-
0
votes1
answer175
viewsQ: Problem with HTML code when sending email using Acbrmail
I am using Acbrmail to send a standard Html that is hosted on the Web. I take the Html source code from the Utf8tostring(idHTTP.Get()) and replace the tags needed to send with Stringreplace().…
-
0
votes1
answer40
viewsA: Error debugging webservice (asmx) locally in Visual Studio
Just updating, I found the "problem". I opened the project remotely (networked). After I copied the project to the local machine, I was able to debug without problems. Here’s the tip.
-
1
votes1
answer40
viewsQ: Error debugging webservice (asmx) locally in Visual Studio
I’m trying to locally debug a webservice (asmx) from Visual Studio. When trying to create the connection to the database, the following exception occurs: Failure to request type permission…
-
0
votes2
answers161
viewsA: I can’t convert to whole
To convert to integer just do a cast: int(variable). You can also simplify the process by creating an IP Array using split(). See the code example (Adapt to your code): ip = '200.201.202.256' nums =…
pythonanswered felipearon 715 -
2
votes1
answer1113
viewsA: How to open a URL by passing hidden parameter?
I solved the problem using Twebbrowser: procedure TForm1.Button1Click(Sender: TObject); var Data: String; I: Integer; Flags, PostData, Headers: OleVariant; begin Flags := navOpenInNewWindow; Data :=…
delphianswered felipearon 715 -
0
votes1
answer1113
viewsQ: How to open a URL by passing hidden parameter?
Need, via Delphi, to open a Url/Site by passing a hidden parameter (not shown in the Url). I tried to Shellexecute: ShellExecute(Handle, 'Open',…
delphiasked felipearon 715 -
1
votes0
answers385
viewsQ: How to register a Dll for Delphi in Windows XP?
I need to register a dll by Delphi (xe2) in Windows XP, but when running the windows method opens a "Run as" window where you need to indicate the user who will perform the action. Even though my…
-
2
votes2
answers924
viewsQ: Know how many properties an INI session has?
I have an INI file which a session has several properties: [DLLS] Dll1=... Dll2=... Dll3=... In the above example there are 3 properties. Is there any method in the Delphi to identify how many…
-
0
votes1
answer418
viewsQ: Asp.NET webservice with blank page on IIS 8
I have a webservice (asmx) hosted on Kinghost. After an update in IIS (from version 6 to 8) the webservice stopped working. When trying to access the webservice by the browser shows a blank page, it…
-
3
votes2
answers371
viewsQ: Uses Unit - Out of memory
My class Tlog inherits from the Tbasemodel class: uses BaseModelo; TNFLog = class(TBaseModelo) ... end; But my Tbasemodel class needs to have a Tlog-type attribute: uses Log; TBaseModelo =…
delphiasked felipearon 715 -
7
votes1
answer1564
viewsQ: How to browse a Tobjectlist property via Rtti?
my class has a Tobjectlist property: TBaseModelo = class(TInterfacedPersistent) public property ListaCamposValidacao: TObjectList<TCampoValidacao> read FListaCamposValidacao write…
-
2
votes1
answer1847
viewsQ: Get the name of an object attribute
I have the following class TLog = class private FDescricao: string; FCodigo: Integer; public property Codigo: Integer read FCodigo write FCodigo; property Descricao: string read FDescricao write…
delphiasked felipearon 715 -
0
votes2
answers122
viewsQ: android.permission.MODIFY_PHONE_STATE - How to assign system permission?
People need to use in my App the following permission: android.permission.MODIFY_PHONE_STATE But it shows an error in Manifest saying that permission is only granted to system apps. I need to…
-
1
votes2
answers2413
viewsQ: How to calculate the average speed (Km/h)?
I need to calculate the average speed (Km/h) and show this information in the Activity in "real time", as shown in the GPS Apps. How to do such calculation and encode it on Android?
androidasked felipearon 715 -
5
votes1
answer329
viewsQ: Convert to String number with scientific format
I have the following number, in scientific notation: 7.89894691515E12 I need to convert it to String, in the common format: 7898946915150 How to do this through Java?
javaasked felipearon 715 -
0
votes1
answer205
viewsQ: Web API - How to validate the model from Dataannotation.Remote()?
I have the following model (DTO): public class PessoaAcesso : Pessoa { [Remote("LoginUnico", "Pessoa", ErrorMessage = "Esse Login já existe! Escolha outro.")] public virtual string Login { get; set;…
asp.net-mvcasked felipearon 715 -
1
votes1
answer210
viewsA: Error returning data using Fluent Nhibernate (Many to Many)
After several researches, I understood why the "problem". When generating the N:N data, create an infinite circular loop, exemplifying: group1: { Description: "group1", units: [ groups: [ {…
-
0
votes1
answer210
viewsQ: Error returning data using Fluent Nhibernate (Many to Many)
I have a relationship of many to many (M:M) using Fluent Nhibernate: Class/Map - Unit: public class Unidade { public virtual int Id { get; set; } public virtual string Descricao { get; set; } public…
-
0
votes2
answers1107
viewsA: Error returning list with Fluent Nhibernate
The problem was in the session block: using (var session = NHSessionFactoryManager.GetSessionFactory().OpenSession()) In case, I need to leave open the session so that the result can be delivered…
-
5
votes3
answers8755
viewsQ: What is the best way to replace a character in a given String position?
I need to replace a character at a certain String position(). Example - Swap character[21] with 'X': String Original = 01078989469150999134B B 2116456 Modified String = 01078989469150999134B X…
-
3
votes2
answers1107
viewsQ: Error returning list with Fluent Nhibernate
Within the Web.API project, I created a Get() method which returns a list of objects - Ilist. This Personal Classaccess has a Log list (1:N). When executing the Get() method, an exception occurs:…
-
1
votes1
answer350
viewsA: How to change the name of the References column by Fluent Nhibernate?
I indicated the column name for both Personal Map() and Logmap(). It worked. public class PessoaAcessoMap : SubclassMap<PessoaAcesso> { public PessoaAcessoMap() { KeyColumn("Id_Pessoa"); Map(x…
-
0
votes1
answer350
viewsQ: How to change the name of the References column by Fluent Nhibernate?
In the "LOG" class, I am trying to enter the column name, which is a FK, using Fluentnhibernate References. I have the following class structure: public class Pessoa { public virtual int Id { get;…
-
3
votes2
answers1253
viewsQ: Attach TXT file using Javamail
I’m using Javamail for sending email, with attachment, on Android. When attaching a file with extension ". txt" it is assigning the content to the body of the email, not as attached file. My file…
-
3
votes3
answers1649
viewsQ: Send email with STARTTLS porta 587
I need to send an email using client settings. Host access uses STARTTLS security using port 587. For testing I set up the following code (I changed the customer data for security): try { String…
-
6
votes3
answers21251
viewsA: What is a virtual class, attributes and methods?
Class is a structure/model representing a real-world object/purpose. Examples: class Veiculo {...} class Animal {...} class Pessoa {...} Attributes are characteristics that the class has. Example -…
-
2
votes1
answer713
viewsA: Httptransportse gives "java.io.Eofexception" error using Ksoap2 on Android
Apparently solved my problem by adding two additional commands to the code: transport.getServiceConnection().setRequestProperty("Connection", "close"); System.setProperty("http.keepAlive", "false");…
-
0
votes1
answer78
viewsA: Autocompletetextview, how to search at any point in the sentence?
I managed to fix it. I did the following: I created a Basedapter implementing Filterable and in it I made the filter logic: @Override public Filter getFilter() { Filter filter = new Filter() {…
androidanswered felipearon 715 -
1
votes1
answer78
viewsQ: Autocompletetextview, how to search at any point in the sentence?
Galley, I have a Autocompletetextview and I need it to filter not just the beginning of the sentence but any part of it. ex> my list: KMF Avaré, Florisio (KMF Sorocaba) When I type the letter "K"…
androidasked felipearon 715 -
2
votes1
answer713
viewsQ: Httptransportse gives "java.io.Eofexception" error using Ksoap2 on Android
I am using the lib Ksoap2 in the Android project, for communication with webservice. All communication is within an Asynctask(). In some moments of access to the method, an Exception occurs:…
-
2
votes1
answer565
viewsQ: How to transform Json into an object with dynamic fields using Gson on Android?
I have the following json: {"Data" :{ "Description": "app", "Campo2": "app2", "Campo3": "app3"}, "Instring" : "1", "Token" : "Zoebarw9nimk9o"} The "Date" field may contain 1:N fields. To illustrate,…
-
0
votes4
answers3330
viewsA: How to use Asynctask on Android?
ALWAYS separate "responsibilities" from each action! Create two separate classes for Asynctask. Remember, Asynktask is a separate thread from the main thread. In order to receive the return of your…
-
0
votes1
answer89
viewsQ: How to send List<T> with Kvmserializable?
I am implementing Kvmserializable for communication with web service with complex types. I have a property of type List. However I am indicating the type List.class and I am not getting this list…
androidasked felipearon 715 -
3
votes1
answer121
viewsQ: How to use a list in Listview Footer?
I added a Footer (footer) in a Listview, but this Footer will contain a list (List<>). Footer is showing, but is showing only the first item in the list. How to show the list correctly in…
androidasked felipearon 715