16,004,647 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View .NET questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Uilleam (Top 14 by date)
Uilleam
5-Sep-12 10:01am
View
Just a few thoughts:
-you're opening the file to read not write as you appear to think
-what is it exactly that you think that substitution will do? I'm only guessing, but do you want $array1[0] to be replaced by $array2[0], and so on pairwise in the array? If so, that's not how s/// works. You will need to use a loop through your arrays, but since you don't show what didn't work in your attempt I can't help you further with that.
In general, the clearer your question the better the answer will be. As much as I'm happy to help, I don't have the time to code up solutions, make up sample data etc. If you provide a lot more on what your input is, what you tried, what output you got and what output you desire, you'll probably get more help.
Uilleam
9-Aug-12 10:16am
View
I'm still not entirely clear on your task. In your example do you mean to say that the segment you labelled as "range to be extracted" which is delimited by lines of "P5X98A-PGM-INITS" is to be removed from its existing location, then inserted after the line "PERFORM P5X98A-ABC-LIMIT." (which itself should be commented out by an asterisk? Can you generalize this something like "any chunk of lines surrounded by matching PGM lines should be moved to follow the matching ABC lines (which may appear earlier or later)?
If so, I can see the temptation to do this in a rw mode as that is essentially how you would do it manually in an editor. However a better approach to me would be to do two passes:
-first extract all the PGM lines and their associated blocks of text, as well as all the ABC lines, and store it in a couple of hashes for easy reference
-second sort through all that material and write it out in the desired order in an output file. I'd walk through the list of ABC lines and then seek the matching PGM lines and data block, write the lot out, then go on to the next ABC line you found.
Does that make sense? Bear in mind that I don't know why you're doing all this so I may not know enough to give useful advice.
good luck!
Uilleam
1-Aug-12 12:45pm
View
Agree, you need to tell us more. www:mechanize should wait for the http transaction to complete. If some javascript changes are involved on the page however, note that mechanize (without some help) won't notice.
Uilleam
4-May-12 12:18pm
View
I've not done it so I can't authoritatively give an answer of YES, but I don't see why not. The complexity will come in deciding what the bandwidth actually is for a given phone at a given time. My android phone is plenty fast on wifi (e.g streaming HDTV), but not so much on the cell carrier, and real bandwidth via cell will depend a lot on the company supplying service, and the circumstances of the call. So I think you can do this, but you need to either detect the bandwidth (if you have a client installed on the phone) or allow the user to choose a bandwidth somehow. Besides, they may not want highest quality even if the bandwidth is available as they may be paying a lot for data.
Uilleam
2-Dec-11 16:09pm
View
My suggestion is that if you don't know anything about the domain of the application, you better get some (really a lot) of input from key stakeholders before you start building things. You will save yourself a lot of wasted time if you plan before you try to build. If you're doing this as a job, get your specifications in writing, in detail, preferably signed in blood ;-)
Uilleam
21-Nov-11 1:06am
View
I presume this has something to do with your
earlier question
. In that code you simply open the directory and take the XML files in their native order. If you want a specific order, you are going to have to tell Perl that order, it can't guess. Is there something in the files' contents that determine the order? If so, then you would need to open each one and determine the order, then do the merge after. If the order is simply your own list of files, then put that in an array, and have Perl loop through that. If you can explain more about what you're trying to do you will get better answers.
Uilleam
15-Nov-11 17:42pm
View
I'm not sure who this "we" is you're referring to. The wordnet module is well documented here:
http://people.csail.mit.edu/jrennie/WordNet/
, and spreading activation is also easily found via your favourite search
engine
. I suggest you come back when you have a specific problem with your implementation or understanding.
Uilleam
8-Nov-11 17:15pm
View
Could you answer your question with a snippet of code that shows the solution? That would be the best way to close this off I think.
Glad you got it solved.
Uilleam
8-Nov-11 16:13pm
View
What is in your $fileHandler? Did you leave out the code that defines it? If so, Perl will glob for a null filename which will probably produce nothing and the loop won't do anything. I suspect you may want to have an explicit open() and use a file handle there.
Uilleam
22-Sep-11 11:39am
View
Since there are no answers yet, have you tried running two instances of your program, one set each way? I don't know the guts of the Windows sound system but that might at least show whether it is possible to use two sources at once.
Uilleam
10-Sep-11 12:46pm
View
I agree it's a really interesting system, but I mostly do non-GUI work and have only played with this a little bit (one of many cool things I stored with no particular purpose in mind ... yet). Still, I'm willing to give a shot at helping if you can narrow it down to specific issues.
Uilleam
29-Aug-11 10:07am
View
I don't understand why you can't shut down Linux properly. I run Ubuntu from a DVD (i.e. read-only) on my WinXP machine frequently, and it has no problem accessing the Windows C: drive, and no problem shutting down properly either. Could this be a problem with the way you installed Linux on the flash drive perhaps?
Uilleam
20-Jul-11 9:28am
View
Can you supply the entire error message? It should be naming the method it can't find... unless you have found a buggy error message?
Uilleam
19-Jul-11 12:53pm
View
While I do sometimes use simple prints for CSVs too, it is a bad habit and will break easily. In this case, the second and third fields in particular could contain commas (e.g. location of "Dallas, TX"), and Text::CSV will quote that properly to avoid issues when reading it later.
Show More