A string is a sequence of zero or more characters. It is commonly used to represent text or a sequence of bytes.
0
votes
3answers
34 views
Convert this.tb.Text = DateTime
Maybe a dumb question, but why does this not work?
Convert.ToDateTime(this.tb_start_date.Text) = DateTime.Now.AddDays(-90)
I know you can't just = a string to a DateTime, but I thought having the ...
1
vote
2answers
33 views
Convert double to String in Java [duplicate]
I am to convert a double value to a String.
double d=12345678.999;
String str = String.valueOf(d);
or, just plain
String str = ""+d;
Does it, however in the exponent form-- returning the String ...
-1
votes
1answer
22 views
Split characters from a list of tuples?
Im new at python and i have the following list of n tuples:
[('Mi', 'dp1css'), ('colega', 'nccs000'), ('me', 'pp1cs000'), ('ayuda', 'ncfs000'), ('a', 'sps00'), ('programar', None), ('cosas<', ...
-1
votes
1answer
25 views
How to pass an array of strings through a COM (C++) API
We have a COM API for our application (which is written in VC++) which exposes a few functionalities so that the users can automate their tasks. Now, I'm required to add a new method in that, which ...
-2
votes
2answers
48 views
what does backward-slash b do in Python?
what is the purpose of backward-slash b in python, I ran print "\"foo\bar" in the python interpreter and got this result:
>>>print "\"foo\bar"
"foar
-1
votes
4answers
46 views
How to split a window title?
I'm currently making a program that will list all windows open of a certain application. The application is called "Tibia" and it's a game. When you login to a character, the window title changes to ...
-4
votes
2answers
44 views
C++ find method not working
I am quite new to c++ so my apologies for the lack if knowledge,however for some reason, my find method isn't working. Any help would be great, here is the code I'm using.
www.pastie.org/9434690
...
0
votes
0answers
8 views
How to check membership of string-type items in a set in Python 3 [duplicate]
I'm creating a 4x4 sudoku solver, and now I need to check if the numbers 1, 2, 3, 4 are in every line/column/square of the sudoku. Here you have the code (the sudoku is an incorrect one for problem ...
0
votes
3answers
20 views
How to extract substring in Groovy?
I have a Groovy method that currently works but is real ugly/hacky looking:
def parseId(String str) {
System.out.println("str: " + str)
int index = href.indexOf("repositoryId")
...
2
votes
1answer
39 views
How can I use regex pattern to replace this following string
How can I use regex pattern to replace this following string
The result is {A or D} or {Ef or G}.
to
The result is {AD} or {EfG}.
Just need to remove that _or_ in brackets.
0
votes
2answers
15 views
message displayed when trying to run
error : Error: no resource found that matches the given name (at "hint" with value "@string/edit_message")
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
...
0
votes
1answer
9 views
Regex to not allow String Start or End With Special Character and should not have consecutive special characters
I want to set a password in my application. Password should not start and end with special characters and special characters can be added between the string. It may have special characters, But it ...
0
votes
0answers
18 views
String comparison fails in Fortran 90 using TCP
Some of you may have read my previous question about TCP with Fortran from a few days ago. I got the issue I was having resolved but have now run into a new issue.
When I try to compare a string ...
0
votes
1answer
5 views
NSRegularExpression conditionals to find terminated and non-terminated strings
Does NSRegularExpression support conditional inside the pattern? I seem to not get the desired effect when I use the following expression to match strings within quotes and strings that are missing an ...
5
votes
5answers
57 views
How to convert Swift Character to String?
I want to return the first letter of a String as a String instead of as a Character:
func firstLetter() -> String {
return self.title[0]
}
However, with the above I get Character is not ...
0
votes
0answers
24 views
Simple text coding/decoding Excel VBA
I have made nice macro that will send login details to API which will return as response security string that is used for sending further commands to API and executing them.
I am a bit worried about ...
1
vote
3answers
40 views
Getting the minimum value for multiple string values R
Bare with me, I'm working with a juvenile crime database and need to report the onset offending age. I currently have the names and age at offending, many of the subjects are repeat offenders and I ...
0
votes
1answer
62 views
“??*” C++ escape sequence
Note that the * in the title is meant to be a placeholder, in my case the culprit was ??[.
I just came over C++ (also "C") escape sequences, formed by double question marks. What was this ever used ...
2
votes
1answer
30 views
Insert “-” in String Lua
i am working on generating License keys in LUA. I want to separate the characters with the "-" of every 5 set of character. the number of character will remain 40 Always. so far i have found one code ...
1
vote
1answer
39 views
String Comparison - Replacing Word in Char Array
I'm writing a function that accepts a char array containing the title of a book as parameter, the following then has to take place:
Extra white spaces between words need to be removed [DONE]**
Text ...
0
votes
0answers
44 views
Properties file read java and putting result to string
I have been coding a chat program with login, but to transfer username from login class to chat class I'm using .properties file. And I want to get
prop.getProperty("username")
into string ...
-3
votes
1answer
36 views
How to separate special string in android
I need to Bold and italic where is start of the special character in the sentence(only @,#).
@ --> bold and italic
# --> bold
Example:
Google Plus style #ListViews are all the rage these ...
0
votes
2answers
36 views
Python Log Parsing [on hold]
I am new to parsing in Python. I have a log file of the following format:
<20>1 2008-12-18T09:46:28.806-07:00 NET-RT - RT_FLOW_CREATE [[email protected] source-address="192.168.30.170" ...
-10
votes
1answer
44 views
method in java to count the length of each word in a string [on hold]
i want the output to be: the cats sat on a mat: There are 0 words of length 0 There are 1 words of length 1 There are 1 words of length 2 There are 3 words of length 3 There are 1 words of length ...
0
votes
2answers
43 views
Reloading a url in JAVA
public class ReadIp{
String nextLine;
public int getIP() throws MalformedURLException, IOException {
try
{
URL url = null;
URLConnection urlConn = null;
...
0
votes
2answers
20 views
Need to break up and get values using String Manupulation
I need to draw a dynamic graph i.e. monitoring a Linux machine Server. Below is the result output of the Linux machine server, using this I will draw a graph.
02:54:09 PM kbmemfree kbmemused ...
30
votes
9answers
1k views
Why does this Java code output that?
I do not understand the output of this code:
public class StringDemo{
public static void main(String args[]) {
String blank = "";
String comma = ...
1
vote
3answers
58 views
How would I go about splitting a sentence in Java [duplicate]
I am attempting to split a sentence that is being printed to the console in order to avoid cut offs like so @ 80 chars:
Welcome to fancy! A text based rpg. Perhaps you could tell us your name brave ...
-4
votes
2answers
20 views
Extracting and storing characters from String
I want to write a program that reads an English word and stores it in "char" form like this:
"Apple" --> "A", "p", "p", "l", "e"
How can I do this?
0
votes
1answer
65 views
Declare String in class or method
I just started thinking about this but can not come up with whats best. The string declared will only be used in one method and will never be changed. Should the string be declared in the method or as ...
0
votes
2answers
50 views
Does the std::string::resize() method manages the terminating character?
I am copying some data from a stream into a string, so I thought about resizing the string with the actual number of characters plus one for the terminating one, like this:
std::istringstream stream ...
0
votes
1answer
32 views
Comparing two strings in excel sheets [on hold]
I have two strings as follows. I am using jxl api to write in excel sheet with java. The following strings extract some data from excel sheet. Now I want to write 'project1' data to an excel file ...
0
votes
0answers
48 views
c or c++ on visual studio
i ma using visual c++ for my dictionary project .....
but visual c++ hangs on compilation ....while this same code runs well on Linux mint....
i am using visual studio for that i want to give my code ...
0
votes
1answer
37 views
Trouble converting NVP string to array..?
Quick version of question
I'm trying to take a string like this...
BUTTONSOURCE[18]=AngellEYE_PHPClass&VERBOSITY[4]=HIGH&USER[6]=tester
and turn it into this for logging purposes...
...
0
votes
2answers
30 views
Can't find split() method or replacement in string module in python 3.4.1? [duplicate]
I'm trying some text manipulation stuff out and am bumping into the error:
wordlist = string.split(" ")
AttributeError: 'module' object has no attribute 'split'
I have imported the string module ...
0
votes
3answers
38 views
In Java how do you insert a String into a 2D array of string?
Well I'm new to Java.
String[][] data=new String [][];
data[0][0]="Hello";
This does not work, can anyone explain why and how to make it work,
Well in C++/Cli this works perfectly but not ...
0
votes
1answer
18 views
Cannot implicitly convert type 'string' to 'var'
I am getting this error : Cannot implicitly convert type 'string' to 'var'
using System.Web.Helpers;
public partial class test : System.Web.UI.Page
{
protected void Page_Load(object sender, ...
2
votes
5answers
34 views
Regex Split Around Curly Braces
I have a string like :
"abc{d}efg{hi}{jk}lm{n}"
And I want it to be split into:
"abc","{d}","efg","{hi}","{jk}","lm","{n}"
I used this pattern [{}] and the result is ...
2
votes
1answer
54 views
Java Beginning Scanner
I am a novice programmer and I am trying to do projects that I find fun to help me learn more about the language then my school classes have been able to provide. I have wanted to try reversing a ...
0
votes
1answer
40 views
String statement returning null from switch statement
I am currently working on an Android application that allows you to watch streaming video in a VideoView. I have a method for allowing you to select one of four streams via a switch statement. That is ...
2
votes
2answers
16 views
How to check issubset for the whole words separated by commas?
string = 'NotAllowed,Trinity,Allowed'
string1 = 'NotAllowed,Allowe'
name = frozenset(string1)
if name.issubset(string) == 1:
print 'yes'
else:
print 'no'
This produces the output of yes. ...
2
votes
2answers
33 views
Replace, But Only Include Delimiters in Certain Cases
In PHP, I need to replace a fixed prefix and suffix surrounding a variable value.
The quotes around the value are stripped, except if the value is a string.
[blargh="5"] => ...
3
votes
5answers
57 views
Can I change the font color on a portion of a string? [on hold]
Can I change the color on the portion of the following string represented by m_pwd and m_senior?
string m_pwd = "PWD";
string m_senior = "Senior";
lblMarquee.Text = "Hi" + m_senior + "and" + m_pwd;
...
0
votes
0answers
80 views
Can I use String[] as HashMap values in Java?
I am a beginner in Java programming. I want to create a HashMap whose values are String[]'s. Can I do this?
Suppose I have a JTable parametersTable with values in columns 2, 3, and 4 that I wish to ...
-4
votes
1answer
40 views
How do i make a string temporarily appear for 10 seconds then dissapear [on hold]
Im using eclipse and making an android app and need to make a string appear for 10 seconds and then dissapear.
-1
votes
1answer
39 views
converting string to integer in PHP but don't work ( using (int) and intval )
look at 2: and 3: in the image.
It should be 4, but return me '0'.
0
votes
1answer
13 views
Keep list of hashs
I am working on a small project to keep my skills from completely rusting
I am generating a lot of hashes(in his case md5) and I need to check if I've seen that hash before so I wanted to keep it in ...
0
votes
0answers
6 views
Ironpython Array[byte] to byte string
Within IronPython 2.7, I am running a few calls to a .Net dll :
from System.Guid import NewGuid, ToByteArray
from System import Array, Byte
import clr
clr.AddReferenceToFile( ThePathToDLLFile )
from ...
-8
votes
1answer
45 views
A function to print copies of a character [on hold]
How to write a function which gets a character and the number of copies as function arguments? A sample code is below.
#include <string>
std::string printSplitter (int N, char C)
{
// ...
0
votes
2answers
18 views
Get a comma separated list of first cell values for rows with classname (using Jquery)?
Trying to grab ids from the table below when a row is selected. For example, the jquery should return: "12,14"..My code below returns empty string?
My html:
<table id="display" width="100%">
...