Questions tagged [setstring]
25 questions
8
votes
2 answers
Why Does SetString Take Less Memory in Delphi (with Unicode)?
This is Delphi 2009, so Unicode applies.
I had some code that was loading strings from a buffer into a StringList as follows:
var Buffer: TBytes; RecStart, RecEnd: PChar; S: string;
FileStream.Read(Buffer[0], Size);
repeat
…

lkessler
- 19,819
- 36
- 132
- 203
8
votes
1 answer
Convert populated Set to [String] in swift
I am kind stuck with the following.
I've got the following array
var selectedItems = Set()
That has some items from parse inserted to it
self.selectedItems.insert(objectToAppend)
Then I've created the following variable where I intend to…

GuiSoySauce
- 1,763
- 3
- 24
- 37
3
votes
3 answers
Add items to a Set in proper order Java
I am creating a song playback app. I have a Set that I keep in SharedPreferences. I want to add and remove file names from it, and keep them in the same order as I added them in for example:
recentsp = getSharedPreferences("recentkey",…

MJDude
- 73
- 10
2
votes
2 answers
F# Random elements from a set
I'm working on a project that requires me to write a function that selects a designated number of random elements from a set. Then map those elements to a variable for later comparison.
So in my scenario I have to select 5% of any given set.
let rec…

Mark
- 1,633
- 1
- 11
- 26
2
votes
6 answers
Set doesn't maintain order the same as the order the elements were added in
Edit: this is actually for an Android application, which means (as far as I know), I can only use a HashSet.
Set set = new…

Michael Yaworski
- 13,410
- 19
- 69
- 97
1
vote
0 answers
Persist Set through JPA
How to persist Set as one entry in the oracle database row using JPA.
Which will be best option convert set to jsonNode and storing as BLOB
or Single string and storing as BLOB ?

Aditya Singh Bisht
- 11
- 1
1
vote
2 answers
How to add each and every value of sharedpref.getstringset to an arraylist?
I'm trying to put user names in string set by using SharedPreferences.putstringset, the problem is that I want to get each name(value) the user put and add it to an arraylist and print each value.
I tried pref.getstringset but I don't know how to…

peter Estifanos
- 131
- 10
1
vote
1 answer
setString NSMutableString
I am new to programming in XCode, and as a first familiarisation exercise, I would like to make a small Calculator app. So obviously I came upon a few problems:
I try to have the user use buttons to type the digits and operators into a string, which…

Jonathan Goyens
- 21
- 1
- 4
1
vote
1 answer
c++ mysql setString not replacing placeholders in prepared statement
I have the following code to set default values:
int main()
{
try
{
sql::Driver *driver;
sql::Connection *con;
sql::PreparedStatement *pstmt;
/* Create a connection */
driver =…

Ray Foo
- 39
- 8
0
votes
2 answers
Can I get the string from preparedStatem.setString()?
I have a problem - I create my SQL queries dynamically and basing on user input options. So the user has 5 parameters (actually it's more) and he can choose to use some of them (all if he wants) or none and specify their value in the query. So I…

srd.pl
- 571
- 10
- 22
0
votes
1 answer
setting null to parameter in select sql statement
I need help as I am struggling to assign null as a parameter to the select statement in my java program.
my script read values from the csv file and then selects the parameter based on the index provided. However, the values are sometime empty…

Rashid Khan
- 29
- 2
- 8
0
votes
2 answers
PreparedStatement setString doesn't work, there are still question marks
i am currently working on a Project with a database in the back and i wanted to order the files by coloums with this method:
For this reason there are 4 different parameter in the method head, the first one is for the connection, the next one is the…

HTLgurl
- 11
- 2
0
votes
1 answer
Java setString() can not find the?
I am quite new to programming but I am making a screen for a back office application. The goal of this application is that you can select the station name and when you press check status then all the statuses of the locker on that station are shown.…

questions
- 49
- 5
0
votes
1 answer
Teradata JDBC not recognizing PreparedStatement parameter as VARCHAR without quotes
I am using JDBC PreparedStatement to query a Teradata database from a web service. My table has a PHONE_NUMBER column, stored as VARCHAR(10). I have always used PreparedStatement setString() to supply the parameter for this column, like…

ktmq
- 43
- 1
- 8
0
votes
2 answers
SharedPreferences clears itself when the app opens
I've added SharedPreferences to my HomeActivity.java, in order to save IDs for shopping cart. This is the code which I've initialized for it in HomeActivity.java, which is the launcher activity:
SharedPreferences cartItems =…

Ido Naveh
- 2,442
- 3
- 26
- 57