Menu
Menu
DaniWeb
Log In
Sign Up
Read
Contribute
Meet
Search
Search
About 285 results for
spliting
- Page 1
how to access variable outside awk and spliting the string in array
Programming
Software Development
16 Years Ago
by jason.bean
….java. and the such string for other files. I am
spliting
it to get only substring "myCollector" from the…
Re: how to access variable outside awk and spliting the string in array
Programming
Software Development
16 Years Ago
by jason.bean
sorry sir, its not working actually while executing the java program we need only program name without .java extension i.e. java myCollector #No .java as extension that is the reason that i am trying to split the string either using awk or
spliting
string in array but a great thanks radoulov...for taking interest to help me
spliting a string in vb6
Programming
Software Development
16 Years Ago
by guru511
hi, can u plz tell me how to slpit a string using a delimeter... exp: my string is like guru\text now i want it to be splitted into guru text any 1 plz tell me...
Re: spliting a string in vb6
Programming
Software Development
16 Years Ago
by vbCNEW
use this:: dim arr() as string st= "text1/text2" arr= split(st,"/")
Re: spliting a string in vb6
Programming
Software Development
16 Years Ago
by guru511
thanq very much vbCNEW but how can i find the length of the arr i mean i dunno how many splits nah.... if i want to use arr(0),arr(1)..... where should i stop.... arr.length is not working....
Re: spliting a string in vb6
Programming
Software Development
16 Years Ago
by jireh
try to use[B][COLOR="red"] InStr() function[/COLOR][/B]
Re: spliting a string in vb6
Programming
Software Development
16 Years Ago
by Cruize_Invades
if you want to know the length of a string just simply use the [inlinecode]len(string)[/inlinecode] that would return the length of the string.. just the string.. string is the variable you want to get the length.
Re: spliting a string in vb6
Programming
Software Development
16 Years Ago
by debasisdas
is it such that the number of delimerets can can in every string then u need to write a sub-routine for that.
Re: spliting a string in vb6
Programming
Software Development
16 Years Ago
by AV Manoharan
[quote=guru511;405592]thanq very much vbCNEW but how can i find the length of the arr i mean i dunno how many splits nah.... if i want to use arr(0),arr(1)..... where should i stop.... arr.length is not working....[/quote] stop it on [U]ubound[/U] AV Manoharan
Re: spliting a string in vb6
Programming
Software Development
16 Years Ago
by guru511
len(string) work for string.. but mine is string array arr() as string now i want to fine the length of that string array
Re: spliting a string in vb6
Programming
Software Development
16 Years Ago
by QVeen72
Hi Guru, use [COLOR=red][B]UBound(Arr) [/B][/COLOR] Gives u Index of Last item in that Array REgards Veena
Re: spliting a string in vb6
Programming
Software Development
16 Years Ago
by guru511
hi hw can i set the font for a string.. i have like this dim str as string str="guru" now i want to set the font for this,.. can u plz tell me ...
Re: spliting a string in vb6
Programming
Software Development
16 Years Ago
by debasisdas
set the font property of the control in which you are displaying that string.
Re: spliting a string in vb6
Programming
Software Development
16 Years Ago
by guru511
i'm not going to display that string... i'm using that string as a subject in my mail code im sending a mail using the vb code... in that i need to set the font.... im not going to display thatin any control
Re: spliting a string in vb6
Programming
Software Development
16 Years Ago
by QVeen72
Hi, U have to set the font of the Display control where u r using it. u cant set the font of the string... Regards Veena
Spliting an Image in java
Programming
Software Development
15 Years Ago
by cebubinary
hi..i was wondering where to find a sample java code that splits an image and each image that was splitted can be click and link to another image...
Re: Spliting an Image in java
Programming
Software Development
15 Years Ago
by kvprajapati
Dear, please refere this link [URL="http://www.javalobby.org/articles/ultimate-image/"]http://www.javalobby.org/articles/ultimate-image/[/URL]
spliting a char string without using token
Programming
Software Development
14 Years Ago
by jp071
Hi, I want to split a char string. We can use “strtok” function for split a string by using token. But in my problem, there is no specific separation/token between each value. The data directly come from an external device through the serial port. I used “ReadFile” function to read and buffer data from serial port. Finally I print buffer to …
Re: spliting a char string without using token
Programming
Software Development
14 Years Ago
by iamthwee
[QUOTE]there is no specific separation/token between each value. The data directly come from an external device through the serial port.[/QUOTE] Bingo, without a delimiter you're basically fubar'd
Re: spliting a char string without using token
Programming
Software Development
14 Years Ago
by William Hemsworth
Yeh, it wont work. For example in the very first part, you want to change this: [B]314.41778E-2[/B] to [B]31[/B] and [B]4.41778E-2[/B] However it could also be: [B]3[/B] and [B]14.41778E-2[/B] or just [B]314.41778E-2[/B] So AFAIK, it's impossible unless you have have some way of knowing where the number starts or ends.
Re: spliting a char string without using token
Programming
Software Development
14 Years Ago
by jp071
So, you told, it is not possible to split as my requirement. is it possible to separate when it retrieve data from serial port (when it call "ReadFile" function)?
Re: spliting a char string without using token
Programming
Software Development
14 Years Ago
by iamthwee
There's only one way you're gonna get this to work. And that is to get your hardware device to spit out the data with a delimiter. How you do that is irrelevant in terms of c/c++.
Spliting a prime number.
Programming
Software Development
13 Years Ago
by n3red
Hi, I need two functions one that checks if the inputed number is a prime number and second one that splits the given number in to prafactors. I have the first function done but the second one is a bit annoying. The function has to take the given number and split it and save the results in a list. Needs to split the prime number on factors and …
Re: Spliting a prime number.
Programming
Software Development
13 Years Ago
by Gribouillis
I know how to do it using the pari library [code=python] >>> from pari import factor >>> x = 252 >>> g = factor(x, x) >>> zip(*(eval(str(g[i])[:-1]) for i in (0,1))) [(2, 2), (3, 2), (7, 1)] [/code]
Re: Spliting a prime number.
Programming
Software Development
13 Years Ago
by woooee
Start with the smallest divisor, 2; see if it is a divisor and increase up to the square root + 1. So in this case 252 / 2 = 126 So 2 is a divisor. Then using 126 (divide by 2 up to square root 126 + 1) 126 / 2 = 63 -----> 2*2 Using 63 63 / 2 = False 63/3 is a divisor = 21 21 / 2 = False 21 / 3 = 7 (square root + 1 = 3) and …
Re: Spliting a prime number.
Programming
Software Development
13 Years Ago
by TrustyTony
You need not check already tested factors like 2. I would suggest for loop containing while and break out to quit the loop.
Re: Spliting a prime number.
Programming
Software Development
13 Years Ago
by TrustyTony
[QUOTE=tonyjv;1389056]You need not check already tested factors like 2. I would suggest for loop containing while and break out to quit the loop.[/QUOTE] Generator version of the function has 7 lines of code, list building version little more.;)
Re: Spliting a prime number.
Programming
Software Development
13 Years Ago
by woooee
Well?? What happend to the code? Code to, say, find the lowest divisor to start?
Re: Spliting a prime number.
Programming
Software Development
13 Years Ago
by woooee
[QUOTE=woooee;1390336]Well?? What happend to the code? Code to, say, find the lowest divisor to start?[/QUOTE]My quick and dirty solution, so I can delete this code. [CODE]def find_divisor(input_number): sq = int(input_number**0.5) + 1 print("-->sq for %d = %d" % (input_number, sq)) for ctr in range(2, sq+1): …
Re: Spliting a prime number.
Programming
Software Development
13 Years Ago
by TrustyTony
OK, woooee, here is my code also [CODE]import random def factors(value): if value > 3: for this in [2] + range(3,int(value ** 0.5)+1, 2): if this*this > value: break while not (value % this): if value == this: break value /= this yield this yield value…
1
2
3
5
Next
Last
Search
Search
Forum Categories
Hardware/Software
Programming
Digital Media
Community Center
Latest Content
Newest Topics
Latest Topics
Latest Posts
Latest Comments
Top Tags
Topics Feed
Social
Forums
Top Members
Meet People
Community Functions
DaniWeb Premium
Newsletter Archive
Markdown Syntax
Community Rules
Developer APIs
Connect API
Forum API Docs
Tools
SEO Backlink Checker
Legal
Terms of Service
Privacy Policy
FAQ
About Us
Advertise
Contact Us
© 2024 DaniWeb® LLC