|
by: David Morgenthaler |
last post by:
How does one overide the iterator implied by the construct "for line
in file:"?
For example, suppose I have a file containing row,col pairs on each
line, and I wish to write a subclass of file that will transform these
to x,y coordinates using an affine transform. I'd like it to look
something like this (but this clearly doesn't work):
class myFile(file):
def __init__(self,name,affine):
|
by: mehul |
last post by:
hi all,
i am just starting with PERL and had this doubt related to the speical
operator +.
what it says is that in the line split( / +/,$line);
it will not ignore the initial spaces as it starts a word when it
encounters a space...
so if possibly there is only a single space in the staring,then it
shldnt be a problem isnt it?
and also if there are more than 1 spaces then it says that also the
word count would be 1 more than the total no...
|
by: Alan Silver |
last post by:
Hello,
I have been having problems with some blindingly simple ASP that fails.
I have the following code ...
Dim sAds, sAdverts()
sAds = "1" & vbTab & "Ferret" & vbTab & "Furry" & vbCrLf
sAds = sAds & "2" & vbTab & "Gibbon" & vbTab & "HAiry" & vbCrLf
sAds = sAds & "3" & vbTab & "Vole" & vbTab & "Small" & vbCrLf
sAdverts = Split(sAds,vbCrLf)
|
by: NewToThis |
last post by:
I am trying to use the split function to bread up lines in a file I am
reading from. Some lines are working just fine, but a couple of the lines
don't split up the way I would have thought.
Here's part of the code.
Dim strDelim As String = "*~"
Dim delimiter As Char() = strDelim.ToCharArray
Dim split As String() = Nothing
Dim fieldCount As Integer
Dim s As String
|
by: dchan1 |
last post by:
String line = " I am new to c# ";
How to use Regex to split the string so that It would return a String array
with:
token = "I"
token = "am"
token = "new"
token = "to"
token = "c#"
|
|
by: acatejr |
last post by:
I have a text file and each line is a list of values. The values are
not delimited, but every four characters is a value. How do I get
python to split this kind of data? Thanks.
|
by: Shawn Minisall |
last post by:
I'm trying to unpack a list of 5 floats from a list read from a file and
python is telling me 5 variables are too many for the string.split
statement. Anyone have any other idea's? NOTE: the only reason I
convert it to a float instead of just leaving it as a string in the loop
is because I have to have it printed out as a float besides the names
and then the average displayed underneath
thx
#read in data line by line
|
by: Horacius ReX |
last post by:
Hi,
I have to search for a string on a big file. Once this string is
found, I would need to get the number of the line in which the string
is located on the file. Do you know how if this is possible to do in
python ?
Thanks
|
by: Gangreen |
last post by:
Hi, I'm new to Perl but I have some experience in other languages.
Anyway I need to split a string on the character "|".
let's say our string is "one|two|three"
when I try the following code:
@fields = split('|' , $line);
My line gets splitted into serperated letters instead of one two and three. Same when I replace '|' with /|/
|
by: sicarie |
last post by:
I am attempting to parse a CSV, but am not allowed to install the CSV parsing module because of "security reasons" (what a joke), so I'm attempting to use 'split' to break up a comma-delimited file.
My issue is that as soon as an "empty" field comes up (two commas in a row), split seems to think the line is done and goes to the next one.
Everything I've read online says that split will return a null field, but I don't know how to get it to...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
|