Questions tagged [getstring]
150 questions
0
votes
1 answer
How do I store a String for later use in Kotlin?
I am trying to store the String from the Hours and Number for use in a new activity. I have found ways of doing it with intent but do not want the strings sent through to the next activity. Is there any way of me saving my String data and being able…

Dan
- 1
- 1
0
votes
0 answers
Need help in working with cs50 library, in window device
I'm using visual studio code, in window 10 device, and live in a area where internet accessibility is not good.
I have completed of lecturers of first week of cs50x.
Had extracted cs50.h and cs50.c and copy them to C:\msys64\mingw64\include\
Now…

Manas Deo
- 23
- 1
- 4
0
votes
1 answer
Kotlin getString() exepects an Int? Why?
I'm going through https://developer.android.com/codelabs/basic-android-kotlin-training-project-lemonade. Here, while trying to make "else" do nothing, I've stumbled upon "Type mismatch" errors.
Regarding setting the view elements, this is what I've…

101is5
- 309
- 2
- 12
0
votes
2 answers
The method 'getString' was called on null. Receiver: null Tried calling: getString("name")
I am having a error The method 'getString' was called on null.
Receiver: null
Tried calling: getString("name")
I already instantiated
firebaseFirestore = FirebaseFirestore.instance;
sharedPreferences = await SharedPreferences.getInstance();
class…

Dijon
- 103
- 1
- 7
0
votes
1 answer
Getting String from Json?
I have a strange problem in my android app. In one method I do this :
try {
String r = responseBody.toString();
JSONArray jArray = new JSONArray(r);
categorys = new String[jArray.length()];
idcategory = new Integer[jArray.length()];
…

Gabrielle
- 4,933
- 13
- 62
- 122
0
votes
0 answers
Recordset getString returns a value but also throws invalid column name exception under SQL Server
I am querying an existing table that I cannot alter using JDBC. My SQL Server query of "SELECT * FROM " returns and I log the results with
logger.debug("Retrieved record firstname=" + rs.getString("FirstName"));
The logs shows the data returned…

Dr Dave
- 550
- 1
- 6
- 22
0
votes
0 answers
cs50: get_string doesn't ask for input
I've been trying to write an encryption program based on CS50's PSET2 - substitution.
For some reason my get_string fails to get input from the user, and compiler doesn't detect an error. Nothing really changes compared to the substitution problem…

Gio
- 11
- 3
0
votes
2 answers
Printing a result set doesn't show all rows
I have some codes line as
Class.forName("com.mysql.cj.jdbc.Driver");
connect = DriverManager
…

Homerux
- 1
0
votes
1 answer
Kotlin getString in another Activity / Function
when I use this code, my recycler view app crashed because I got an null object reference exception bt at the moment I did not know how to fix it. I tried to softcode the strings in my view text but it does not work. When I hardcoded it, it works…

daskaras
- 15
- 5
0
votes
1 answer
How to get a String value from an EditText Int?
Writing this:
note.setOraIn(txtOraIn.getText().toString());
I get this error:
error: incompatible types: String cannot be converted to int
note.setOraIn(txtOraIn.getText().toString());
Indeed txtOraIn is an Integer.
What is the correct syntax to…
user13397948
0
votes
1 answer
Flutter - sharedpreferences getString method
I successfuly saved a string to sharedpreferences. But, I dont understand how to getString and use this a parameter llike below code.
My getstring method;
Future getString(String param) async {
SharedPreferences prefs = await…

jancooth
- 555
- 1
- 10
- 25
0
votes
2 answers
How to pass variable to onActivityResult() from populateViewHolder?
I have a Firebase Recycler View which contains a button like this
final String post_key = getRef(position).getKey();
viewHolder.btnUpload.setOnClickListener(new View.OnClickListener() {
@Override
…

michealchow
- 136
- 4
- 14
0
votes
0 answers
Resultset getstring possible cause of slowness
I am searching a DB and setting what is found in a resultset variable and I saw it took awhile to run my function and i narrowed it down to the resultset.getstring. I say this because all I did was set it to a variable and it took an average of 24…

jfen
- 13
- 1
- 4
0
votes
2 answers
It gives me an error when I use getString method?
I try to use string.xml in java file by using getString but it gives me an error in add, price, and addc variables because it is a different datatype. However, I see the same code on the internet and its work!
private String createOrderSummary(int…
user7333110
0
votes
0 answers
rs.getString() returns empty
I'm trying to get data from MySQL database but getString always returns empty although getInt returns the value in the database. I don't get any Exception. I googled for my issue and found InputStreamReader solution which worked but I really want to…

Eduardo
- 99
- 2
- 11