37 Discussion / Question Topics

Remove Filter
Member Avatar for
Member Avatar for preslav_milev

Hello ! I have a task that is difficult for me to handle. The task is: Create recursive function that can be generate a string of length N (N <= 100), formed by the letters 'A', 'B' and 'C' and does not containing two identical adjacent substring. For example: enter …

Member Avatar for preslav_milev
0
618
Member Avatar for Gribouillis

Given a unicode string or file, what is the best way to find a short unicode string that is **not** a substring of the first one ? I want a working algorithm that avoids transforming the first string into a list of characters. My first idea is to choose a …

Member Avatar for Gribouillis
0
327
Member Avatar for gregarion

Hello All, I am facing a problem coming up with a SQL query for a certain issue: Table 1 ------------------- Client ID|Name of Client|Customer Type|Account Type| 01| A | AB | 30 | 02| B | AB | 30 | 03| C | CD | 30 | 04| D | …

Member Avatar for gregarion
0
205
Member Avatar for arunkumars

select SUBSTRING('hello 世田谷区経堂世田谷区経堂 ',5,10) as Japanese gives output as "o ????????". Is there any way i can get the substring of above string ? Thanks in advance for your help.

Member Avatar for h4ng4r18
0
260
Member Avatar for Szabi Zsoldos

Hello people :) Having some difficulties regarding a simple substring. Then length of my line is 52 and I iterate it without any problems. When I use this untill the 22nd character it is working final String articleNumber = StringUtils.trimToEmpty(StringUtils.substring(lineValue, 0, 22)); If I want to pass over the 22nd …

Member Avatar for Lucaci Andrew
0
268
Member Avatar for nouth

how to `.replace()` the `'error'`? only use `a` and `b` var str = 'bla bla anything error anything bla bla'; var a = 'anything', b = a; im not good with regular expressions so im asking for how to do this with variables so i can set them up all …

Member Avatar for diafol
0
6K
Member Avatar for neha_8

I wrote this code to find if string s2 is a substring of string s1. However I'm getting time limit exceeded. How can I make my algorithm better? #include<stdio.h> int main() { char s1[20], s2[20]; scanf("%s %s", s1,s2); char *p, *q, *count; p=s1; q=s2; int i=21; do{ if(*p==*q) /* the …

Member Avatar for neha_8
0
188
Member Avatar for scheppy

Hi all. What im trying to accomplish is to get strings from within a string. These strings are seperated with "//*//" an example would be String ExampleString = ("//*//helle//*//goodbye//*//1965//*//this is an example//*//the end"); then I would like to seperated into seperate strings. hello goodbye 1964 this is an example the …

Member Avatar for scheppy
0
286
Member Avatar for sabarinadh.ch

I want to show only first 50 lines of the $name of the player using string. I used substring but its not work for me. Can anyone edit the code and show only first 50 lines of name. Thanks for the help.... <?php include('config.php'); $tbl_name="players"; // Table name $sql="SELECT * …

Member Avatar for sabarinadh.ch
0
163
Member Avatar for paku_dnj

How to read a specific value from a text file and then save the value in another text file. Example: in data.txt file there is some values. Item Name : m-01 Item Brand : One Man Item size : XXL Item Price : 1000 Item vat : 15% these are …

Member Avatar for paku_dnj
0
482
Member Avatar for biscayne

I have a table with product codes, the first two chars of the product code is the product group. using the product group I'd like to test the content of certain data. Would this be proper coding or is there a better way ? if prodcust_code[:2] == "AB" do: ABsubroutine …

Member Avatar for vegaseat
0
228
Member Avatar for Clodan

Hi guys, well my question is the following: I am using XPATH in php. Let me say I have the following in a HTML file: <p>This part I want but not this part</p> I want to have the text "This part I want". I did research and have the following …

0
76
Member Avatar for saaz

Hello, I have created a program where a user can input a recipe, and then press a button and this will then be written to a file. On the other side of the interface, the user can select this previously saved recipe and the contents will be read from this …

Member Avatar for saaz
0
198
Member Avatar for Aditya1991

I have my `$arr` of key value pairs like this: array(7) { ["No"]=> string(6) "101" ["Paper_id"]=> string(6) "WE3P-1" ["Title"]=> string(80) ""An Electrically-Small, 3-D Cube Antenna Fabricated with Additive Manufacturing"" ["Author"]=> string(13) "NassarIbrahim" ["Auth_order"]=> string(9) "WE3P-1-01" ["Aff_list"]=> string(51) ""University of South Florida, Tampa, United States"" ["Abstracts"]=> string(723) ""This paper presents the …

Member Avatar for diafol
0
236
Member Avatar for adam.adamski.96155

Hello :D I am using the twitter API to perform a search for a certain author, and storing the results in a database so that I can perfrom an action on each entry. However, there are many duplicate results that have small differences at the beginning of the string or …

Member Avatar for adam.adamski.96155
0
4K
Member Avatar for arishy

The string is about 3k long. It contains a substring several times with the following specification: 1. First part is FIXED number of characters. The same for all the substrings. 2. Second part is the one to be extracted and stored in an array.It is of variable length 3. Third …

Member Avatar for arishy
0
318
Member Avatar for leyla

Hi, I have made a code where I write a recipe to a file and then I can read from the file and it is output in a listbox. I need to allow the user to change the amount of people served and then the quantities change to suit the …

0
112
Member Avatar for Zemorg

Hey guys, i'm Working On A Project That Gets All Employees And Their Data From the User Then Saves Them in A Txt File ( Fstream ) Anyway, i figured out how to Do That But What im at stuck at now is how to search through the txt file …

Member Avatar for Clinton Portis
0
1K
Member Avatar for ahoysailor

Hey, I'm trying to search a List for a substring, but even if it does exist the result is coming out as negative (not present) using the BinarySearch. The idea is that once the file has been loaded into the list I search to see if substrings exist (i.e. IDS_STRING1 …

Member Avatar for ahoysailor
0
204
Member Avatar for ahoysailor

Hi, I want to search a managed list, List<String^>^ list, for a variable substring (i.e. the substring changes it's contents every time it is looped). The list is populated by a Unicode (UTF-16LE) text file. The substring to be searched for is basically an ID for the Strings that occurs …

Member Avatar for thines01
0
234
Member Avatar for TheWayEnd

Hi,everyone My project is scanner for example. Then This is my code... [CODE]Dim htmlele As HtmlElementCollection htmlele = WebBrowser1.document.GetElementsByTagName("h3") For Each htm As HtmlElement In htmlele Dim chld As HtmlElementCollection = htm.GetElementsByTagName("a") For Each ch As HtmlElement In chld ListBox1.Items.Add(ch.GetAttribute("href")) Label1.Text = ListBox1.Items.Count & " Bulundu." Next Next[/CODE] but here …

Member Avatar for TheWayEnd
0
294
Member Avatar for pwolf

Write the function search(word, substring) that takes in a word and a substring as arguments and returns the position (0 indexed) of the substring if it is found in the word. The function returns -1 if the substring is not found. is there a method to do this? i tried; …

Member Avatar for TrustyTony
0
180
Member Avatar for ahoysailor

Hello, I'm having a problem with finding and printing an element in a vector. I want to search my vector to see if an element starts with a sub-string, and if it does, I want to write the whole string to a file. The first part is done, I just …

Member Avatar for ahoysailor
0
294
Member Avatar for sunmania

Hi Friends how to extract following data and store in string variable. All variable are string no need to use any other data type like datetime and so on. [CODE] Deposits and Additions Date Description Amount Refe 11/01 Test1 201f13050000100 NEWEDGE 1,500,000.00 OBI:FFC SAN LAZARO, SA A/C 430 11/01 Test2 …

Member Avatar for dmanw100
0
2K
Member Avatar for jaxi

For a program I'm writing, I'm trying to get rid of doubles in my string (which is a concatenation of a keyword and the alphabet). My code was compiling fine until I added the code about concatenating the substrings before and after the character I'm trying to get rid of. …

Member Avatar for NormR1
0
201
Member Avatar for nofanman4311

I need some help with this. For my class I have to make a game called hexo, basically "Hexo is a game loosely based on the television game show Lingo. Rather than trying to guess 5 letter words (as in Lingo) the Hexo player will have sixteen tries to guess …

Member Avatar for CSloan7597
0
153
Member Avatar for 8mir

I have textbox-- (texbox1)= aaa bbb ccc [COLOR="Green"]<e2>[/COLOR][COLOR="Red"]code[/COLOR][COLOR="green"]</e2>[/COLOR] aaa bbb ccc just i want (textbox2)= I want the code between <e2> and </e2> the code Where the code is a variable

Member Avatar for thines01
0
199
Member Avatar for ankurvit

Hi, I'm looking to code the following problem in python. If (for example) dict={A:0.7,B:0.8,C:0.9,D:2.3,E:0.1,F:2.4} and so on.. (i have a big dictionary of A-Z something like this) I'm looking to find repeated substring in a string that has a dissimilarity of no longer than 0.5 (between highest and lowest). The …

Member Avatar for TrustyTony
0
193
Member Avatar for StormHawk

[B]Question:[/B] Write a program to read in a sentence. Output the sentence and then sort all letters in descending order. Allow users to enter a letter and output the letter with the number of occurrences of that letter, or else indicate that the letter is not found. [B][COLOR="Red"]Use: "I compute …

Member Avatar for JamesCherrill
0
189
Member Avatar for bertm81

Hey All, am looking for a way to break an xml Tag line into tag and attributes. Say I have This line [code=xml] <event time="12:30" value="This is a Sample Value" type="event"> </event> [/code] I have this so far [code=python] # Open file to read f=open("myTest2.xml") #start reading File for line …

Member Avatar for bertm81
0
202

The End.