Posts by Marco Giovanni • 2,768 points
73 posts
-
1
votes2
answers117
viewsA: httpget + URI + Httpclient libraries discontinued. How to update code?
You can use the library okhttp to download json, which extremely easy its implementation and many "big" applications use it such as Spotify and Duo. To add to your project simply add the following…
-
1
votes1
answer73
viewsA: Post with no fronend
I suggest you do not give a Ubmit, if it is a "live chat", do it via javascript. For example: change to not give Submit to your html <button type="button" id="btnSubmit" class="btn btn-warning…
-
2
votes2
answers3931
viewsA: Create dll in C# and use in Delphi 7
I’ve had to do this integration of C# and Delphi and hit my head a lot rsrs.. Good in your C#, you install via nuget o Unmanagedexports And in your C# mark with the Dllexport attribute the method…
-
12
votes2
answers4659
viewsA: Comparing only the Datetime field date in C#
You should take the Date property from Datetime for example DateTime aux = new DateTime(2016, 09, 02, 10, 0, 0); if (aux.Date.Equals(DateTime.Now.Date)) { //Alguma ação... }…
-
2
votes1
answer67
viewsA: Run windows features with Java
Try this way: Imports import java.security.KeyStore; import java.security.KeyStoreException; import java.security.NoSuchAlgorithmException; import java.security.NoSuchProviderException; import…
javaanswered Marco Giovanni 2,768 -
1
votes1
answer43
viewsA: Information on multiple tables or just one?
Creates another table to register the hours, since it can be taken into account that the amount of fields would be hora1 .. Horan, so if in a future you need to create another "time" it will just be…
-
2
votes1
answer455
viewsA: Pass Datatime javascript to ASP.NET MVC Controller by Ajax
The way it worked, after a lot of head bashing was the following: Create Custom Binders for Datetime (C#) Global.asax protected void Application_Start() { ....…
-
3
votes1
answer455
viewsQ: Pass Datatime javascript to ASP.NET MVC Controller by Ajax
I’m having trouble passing date of javascript to the Controller via ajax.. Model: public class ModelA{ .... [Required] DataType(DataType.Date)] DisplayFormat(DataFormatString = "{0:dd/MM/yyyy}")]…
-
1
votes1
answer133
viewsA: Edittext Multiline with lines separated by dashes
Good morning tries to create a component that extends Edittext and overwrite onDraw to draw lines, as an example below: public class LinedEditText extends EditText { private Rect mRect; private…
-
1
votes1
answer1598
viewsA: How to create a virtual keyboard?
I recommend you create a new project (dll), then you can use in any other project your. You can use native windows functions to simulate a pressed key in this link, you find a detailed explanation…
-
0
votes1
answer106
viewsA: Resume to last Activity even when the app is forced to close by the user
I had to do something like this once... I created a class that inherits from application and created, within it these methods to read and record the current Activity. public class AppApplication…
androidanswered Marco Giovanni 2,768 -
5
votes1
answer933
viewsA: XML deserialization
Try passing the string instead of Xmlreader and creating a stringReader for example: public static T LoadFromXMLString<T>(string xmlText) { var stringReader = new…
-
4
votes1
answer1344
viewsA: How to pick up the text from a button?
You must first search for the XML element, final Button btnResposta1 = (Button) findViewById(R.id.btnResposta1); final Button btnResposta2 = (Button) findViewById(R.id.btnResposta2); then implement…
-
2
votes2
answers157
viewsA: Marker id pass to setOnInfoWindowClickListener
Create a class that extends Googlemap.Oninfowindowclicklistener for example public class MyOnInfoWindowClickListener extends GoogleMap.OnInfoWindowClickListener { private int mParametro = 0; public…
-
1
votes3
answers616
viewsA: How to hide the title bar? Crash when changing android:Theme="@style/Apptheme"
Create a theme based on Theme.AppCompat.Light <style name="Theme.AppCompat.Light.NoActionBar.FullScreen" parent="@style/Theme.AppCompat.Light"> <item…
-
0
votes1
answer66
viewsA: How to select by the bank the value of the column using the Random() method
Good morning, In the Tip() method you can pass the word and use Where in sql to search in the database. public String Tip(String palavra){ String dadosDica = new String(); SQLiteDatabase db =…
-
0
votes1
answer44
viewsA: How to send a Stringbuffer select to a class
You create a set for the property or change it to public for example public class Palavras { public String[] palavras = new String[] } and you’d call it that public void Exemplo2(){ Palavras…
-
2
votes1
answer2155
viewsA: Read values from a table in Sqlite
You can take the Random value from SQL itself for example: private void Exemplo(){ SQLiteDatabase db = getReadableDatabase(); String selectQuery = "SELECT dica, palavra FROM palavrasforca ORDER BY…
-
1
votes4
answers447
viewsA: C# Textbox to stop receiving after comma
Good afternoon Try to give a tryparse in value, so will not accept letters and not two commas. To delete the value check if the e.KeyChar = (char)8 (Backspace) Check the cursor position and validate…
-
4
votes3
answers413
viewsA: How to replace dynamic chunk {{chunk}} of a string in C#?
You can use String Replace Try: String teste = "Um teste {{parametro1}} outro teste {{parametro2}}"; teste = teste.Replace("{{parametro1}}", "valor1"); teste = teste.Replace("{{parametro2}}",…
-
1
votes2
answers776
viewsA: Menu screens are above the app’s home screen
Good afternoon, Try to add .addToBackStack() in the transition of Fragment. I had a similar problem, you see here I hope I’ve helped. [Edit] Try this public boolean onNavigationItemSelected(MenuItem…
-
0
votes1
answer124
viewsA: libpng error: Not a PNG file
Good night, The image is in the drawable folder? Try putting in mipmap folder You can see more details here.…
-
2
votes2
answers3031
viewsA: Update Activity previous to end Current Activity
Hello, you can call Activity B, using Startactivityforresult Activity A private static final IDENTIFICADOR_B = 1; Intent i = new Intent(this, ActivityB.class); startActivityForResult(IDENTIFICADOR_B…
androidanswered Marco Giovanni 2,768