54 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for ZZMike

This is Python 3.4.2 The documentation says that s2 = s1.strip('a') will strip out all the 'a' in s1. When I run it, only the leftmost character - and only if it is 'a' - is stripped. The default s2 = s1.strip() takes out all whitespace. PS: I understand that …

Member Avatar for tinstaafl
0
13K
Member Avatar for JosesMelo

Hello, I have 2 **wstring** variables: std:wstring first =L"Jose"; std:wstring second = L"James"; How can I combine these variables: first + second gives an error in Visual Studio. Cheers

Member Avatar for rubberman
0
4K
Member Avatar for mattyd

Hello, I am currently using bound parameters in regards to user input on my form. I have read about escape strings also and thought of using both together. Is this possible and, importantly, is it necessary considering I am already using bound parameters? I would like to use both. Thank …

Member Avatar for mattyd
0
267
Member Avatar for Papa_Don

Hi Group, I attempting to save a file to a specific folder that is begins with the hotels property number. Currently I've manually listed the properties complete folder name in a text file. This is proving to be a management problem that needs to be fixed. The code I'm using …

Member Avatar for Papa_Don
0
285
Member Avatar for Pyler

So I'm trying to remove 2 brackets from lines I'm reading from a file. For some reason when I run my program the characters in between the delimeters is removed. for example `greetings pe()ple` would end up as `greetings pe` I'm using a char array of delimiters. `char delimiters[] = …

Member Avatar for Pyler
0
201
Member Avatar for Rashmi_1

Hi, I need some help with sorting my string comparison. Bascially what I have to do is this: To have numbers sorted properly even when they aren't justified with leading 0's: 1 2 ... 9 10 Instead of: 1 10 2 ... 9 Also to have numbers sorted properly even …

Member Avatar for Rashmi_1
0
896
Member Avatar for daino

Hi I'm having a little trouble understanding C++ string arguments if that's what you call them. The below example illustrates. I'm not sure I understand what line 14 does. The vector 'myvector' is passed to myfunction (called on line 35. I'm assuming string w takes in the first value of …

Member Avatar for daino
0
351
Member Avatar for Riteman

Am working on a project right now and almost stuck at a point. Say, I have a text document with contents like: `abc,123.xyz;praise;end,file,clear` Now I want abc , 123 . xyz ; praise ... in an array. I used split method with array of characters. Though I retrieved abc,123,xyz,praise,end,file,clear I …

Member Avatar for ddanbe
0
3K
Member Avatar for Riteman

Am working on a project right now and almost stuck at a point. Say, I have a text document with contents like: `abc,123.xyz;praise;end,file,clear` Now I want abc , 123 . xyz ; praise ... in an array. I used split method with array of characters. Though I retrieved abc,123,xyz,praise,end,file,clear I …

Member Avatar for Riteman
0
596
Member Avatar for Alonso_1

So I'm trying to count the number of occurrences of each digit within an array. My code I've got so far looks like the following: #include <stdio.h> #include <string.h> int main() { int numbers [10]= {1, 4, 5, 5, 5, 6, 6, 3, 2, 1}; int count = 0; for(int …

Member Avatar for deceptikon
0
3K
Member Avatar for matt.harding.14203

I'm having trouble with this: import java.util.Scanner; public class triangleLoop { public static void main (String[] args) { int height, row, col, spa; String hyp; Scanner kbd = new Scanner(System.in); System.out.println("Enter the desired height of the triangle: "); height = kbd.nextInt(); System.out.println("What side do you want the hypoteneuse on? (left/right)"); …

Member Avatar for cmps
0
2K
Member Avatar for eldiablo1121

Hello, First of all I want to thank all the help with my posts. I have a program where I have to convert a phrase from lower case to upper case, but I cannot use any of the toupper() isupper() functions and vice versa. I think I almost got it, …

Member Avatar for eldiablo1121
0
2K
Member Avatar for Alexkid

Hi There, I need to re-write any mention of .tellg() in my code as the function is not supported on the desired hardware. I have the following lines of code: getline(file,line); { std::istringstream stream(line); stream >> first >> second >> third >> forth; UINT32 file_pos = stream.tellg(); file_pos++; fifth = …

Member Avatar for vijayan121
0
724
Member Avatar for androidz

HI i have this error null reference i don't know why Imports System.Data.SqlClient Imports System.Configuration Imports System.Configuration.ConfigurationSettings Public Class Form1 Private ConName As New DataAccess Private Sub cmdconnect_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdconnect.Click Dim conn As String Dim m_server As String Dim m_db As String m_server …

Member Avatar for androidz
0
278
Member Avatar for Qonquest

I am getting this output: This is the source string╠This is a destination string╠╠╠╠╠╠╠╠╠╠╠╠╠╠5Press any k ey to continue . . . My code is: void Problem5(char strDestination [], char strSource []) { int intIndexOfStrSource = 0; int intConcatenatedStringIndex = 0; int intStringDestinationIndex = 0; int intLengthOfDestination = strlen(strDestination); int …

Member Avatar for deceptikon
0
999
Member Avatar for TarkiB

Hi there, I've been learning C lately, and in one of the exercises I've encountered a bit of a frustrating issue. The exercise is to accept a string of characters that are answers to a multiple choice quiz, and then compare them to the correct answers which are in another …

Member Avatar for TarkiB
0
217
Member Avatar for Labdabeta

I am trying to find a bug in my new and (theoretically) improved syntax highlighter program. I have made 3 versions now and have been able to debug them all with ease. Unfortunately my debugger does not do well with std containers as it shows ALL the information they contain …

Member Avatar for Labdabeta
0
350
Member Avatar for ThomsonGB

I am trying to parse main(argc, argv[]); and i need to look at individual characters with in the strings pointed to by *argv[]. I though of a string as an array of chars. This builds fine but causes an error in execution. So what is a simple and straight forward …

Member Avatar for ThomsonGB
0
1K
Member Avatar for arathy nair

I want to delete the strings file1 and file2 after its merged to a single pdf merge12. Please suggest your valuable ideas.. Thanks in advance package com; import java.io.FileOutputStream; import java.util.ArrayList; import com.itextpdf.text.Document; import com.itextpdf.text.pdf.PdfCopy; import com.itextpdf.text.pdf.PdfImportedPage; import com.itextpdf.text.pdf.PdfReader; /* * author * @282532 */ public class PdfMerger { public …

Member Avatar for arathy nair
0
341
Member Avatar for HadoukenGr

[CODE]#include<stdio.h> #include<string.h> void FindWord (char used[30] , char string[30] , int wordsize); char* CleanString (char string[30], int wordsize); int main (void) { FILE *fp; char letters[30]; char words[30]; char used[30]; char *string; int wordsize; int input_size; input_size = wordsize = 0; fp = fopen("dictionary.txt","r");/*contains a list of words in the …

Member Avatar for HadoukenGr
0
134
Member Avatar for hamby

Hi i'm making a function that will return make a series of strings and perform a function returning a value for each. I've stored the strings in one vector v, and the integer values in another v2. Then it is supposed to return the string that corresponds to the smallest …

Member Avatar for hamby
0
7K
Member Avatar for inuasha

How would I find the amount of characters in a string and then use that to print a certain amount of some character that you choose. For example: [CODE=Python] a = 'string' # this holds 6 characters print '*' * # amount of characters in string [/CODE]

Member Avatar for inuasha
0
241
Member Avatar for Kyle Willett

I need help with a programing assignment for my CS 2 class, the task is to check rather a user inputted string is a palindrome meaning it is the same forwards as it is backwards. I have most of the program working, I input a string then copy it and …

Member Avatar for frogboy77
0
263
Member Avatar for NetJunkie

Before I get started with this question I would like to point out that this is a small app I am creating to not only learn more C++ coding but also to choose who drives the fifth day in my carpool group for college. I am creating an application in …

Member Avatar for mrnutty
0
192
Member Avatar for charlybones

Greetings. Ok so my problem is that I get a "Currency" formatted value from the database and this value sometimes comes as a whole number (without decimals) and sometimes it doesn't. But, when I output the information as "string" into an XML File, I [B][I]always need to show the 2 …

Member Avatar for charlybones
0
213
Member Avatar for Muhammad Anas

A part of one of the programs in my assignment requires to declare three arrays of same size which will be used in parallel to store gpa's, registration numbers and names of the students respectively. When I use a single loop to take input in all these three arrays then …

Member Avatar for Muhammad Anas
0
2K
Member Avatar for mangopearapples

Hey guys, I'm having a little bit of trouble here. I have a variable called Latest1 and it's value is some HTML and PHP code. I have a function that does document.getElementById().innerHTML = Latest1; So when that happens, it runs the HTML code but for some reason it doesn't run …

Member Avatar for mangopearapples
0
216
Member Avatar for bensewards

Hey everyone, In my COMP 208 class, I was asked to do the following: "Redo Lab 2 Problem 2, only this time use vectors to hold the names and gpa’s instead of arrays. So you will work with 2 vectors, one holding the gpa’s (type double) and the other holding …

Member Avatar for user422
0
197
Member Avatar for RodEsp

Hey guys, so I'm trying to write a little program that will put together any number of strings passed to it into a single string and then print out that string backwards. I think I have everything correct but I keep getting a "Segmentation fault (core dumped)" error after compiling …

Member Avatar for RodEsp
0
1K
Member Avatar for Scooterman1

So I've been working on a program that takes a string and then puts it in an i * 6 char array but I can't seem to get it to work, any help with the problem would be much appreciated. Here is the unsatisfactory code I have so far: [CODE] …

Member Avatar for Scooterman1
0
375

The End.