- Strength to Increase Rep
- +6
- Strength to Decrease Rep
- -1
- Upvotes Received
- 60
- Posts with Upvotes
- 50
- Upvoting Members
- 39
- Downvotes Received
- 1
- Posts with Downvotes
- 1
- Downvoting Members
- 1
A Perl Hacker, a C language Raconteur, a Teacher and Ultimately a Dreamer....
- Interests
- Perl, Linux, Unix, C, Objective-C, C++, Java
196 Posted Topics
Re: Hi, What have you tried, and where are you having issues with your script? What desired output are you expecting? | |
Re: Dear Jag_1, I have seen the effort you put into having the result you wanted. But you are not doing it rightly. You can, like you are doing use regex to pick what you need and modify the file to want you need. Since, this is your first post on … | |
Re: Dear Dev_9, Welcome to Daniweb and we are glad to help. To start with you will have to show **what you have done** and where you are have a problem or then show the error codes or statement you your program is displaying. You may also like to provide some … | |
Re: Hi, Yes, using `(new Triangle_Calculator()).setVisible(true);` java swing did what you asked of it. Knowing that you made your class *extends* JFrame, yet you are using **another** frame to get all your components. And when it was done in your class constructor that frame was not set to visible. So, you … | |
Re: Hi Shirin_2, Just got to see your question you asked on this forum. You are welcome to the world of Perl where impossible things are made possible and difficult things made easy :) As regards your question. It actually a straight forward hash parse with no need for either of … | |
Re: Hi newbee_jv, Consider using this: `String reg = ".+?\\d{3}_v\\d{2}_TIL.pdf$";` What I included in your reg expression is **.+?** that matches one or more character before the expression you wanted. The **$** means match end of line. Without this, the expression should still work though... Ttry it out.... Hope it helps. | |
Re: Hi, Why your program is print the the input lines is because of line 8 in your script. Also your regex is not matching like you wanted. Well, looking at your input file and expected output, I think what your regex should do is take the last alphabeth of required … | |
Re: Hi debayanenator, One would have love to see the *bunch of errors* that you are having. However, the routes you took in solving the problem will only give you hash entry that has only one as the value. What you could do is use an hash to get the data … | |
Re: Hi Muhammad_112 , You should start a new thread instead of using an old one opened by someone else about 4 years back. Then don't just tell what you want done. Show some work that you have been able to on your own, and where exactly the help is needed, … | |
Re: Hi, Your main issue is the drawBoard function as you have it. You are printing what you wanted, not what is in the array. Something like so, could do better for (int i = 0; i < 3; i++) { for (int j = 0; j < 3; j++) cout … | |
Re: Hi, A lot of people are willing to help, but you have to show how you are going about this. Where are you having issues and the output you are getting. Yes, you have shown what you wanted but how should it be solved? One can't just assumed. | |
Re: hi nblan180131, > if it is a <textarea>, in javascript you can go: > document.getElementById("textarea1").innerHTML = ""; using ` document.getElementById("textarea1").value = "";` works perfectly for textarea. Hi hastings.george.5, I would suggest you use the reset button for form on HTML, since you would probably have more than one text field. | |
Re: Hi, Your question is not clear as to where you purpose to add the text and how you are going about it. Though what you wanted is very possible. So there is the questioin; Are you adding text to the third paragraph? What text are you adding and where? Something … | |
Re: Hi, Intend of `if(cStr == true)` use `if(cStr !== -1)` on line 12 in your original post. You should get what you wanted. But your script could be made a lot better than what you have. For example, you have to reload the page again and again to compare two … | |
Re: Hi, If you include the header `limits` in your program you can get the limit of `wchar_t` max to be `65535` and lowest to be `0`. Something like thus: #include <iostream> #include <limits> int main() { std::cout << "lower limit for wchar_t: " << std::numeric_limits<wchar_t>::min() << "\nupper limit for wchar_t: … | |
Re: Hi, How are you getting it done. You need to provide more information. Probably some code examples will also help. | |
Re: Hi nikhil_7, The error you have simply shows that you don't have the the module you intend to use . When this happens the first place of call to check is either [CPAN](http://www.cpan.org/) or [meta::cpan](https://metacpan.org/). Check if the module you wanted is there. If not check the original script, maybe … | |
Re: Hi Thomas_31, There are numbers of errors in your script. Bu the obvious one in which you presently batteling with occurs on line 22 of the OP. You are taking the vaule of text in the textbox you provided, but you are not assigning it to any variable, hence it … | |
Re: Hi, This is actually quite easy. Just to say what some other have said in a easiler way. Something like this below will change your image src, when you mouseover and mouseout. <img src="piz/pic1.jpg" onmouseover="src='piz/pic2.jpg'" onmouseout="src='piz/pic1.jpg'"/> <img src="piz/pic3.jpg" onmouseover="src='piz/pic4.jpg'" onmouseout="src='piz/pic3.jpg'"/> <img src="piz/pic5.jpg" onmouseover="src='piz/pic6.jpg'" onmouseout="src='piz/pic5.jpg'"/> Please note that the same image … | |
Re: Hi johntim, > the problem i have is when i output the new file i cannot get the columns back in order, ie the column 'B' is always the 1st column The reason is because, you might still have being outputing your final result in the same order the script … | |
Re: Hello, To start with, you are coding in C++, so use `#include <string>` instead of `#include <string.h>` which is old and several compiler might not include those header sooner or later. Then use string, instead of char arrays, since you have to keep us with the array size. It is … | |
Re: Hi, Where is the code you were given? And what have you also done trying to solve the problem. If you have try some what, where are you having problems? What error message do you have. These are many more are what shows that you really need help. | |
Re: Hi rantnna, It is quite easy to compare two or more files in Perl. In fact, if you have taken your time to filter through theis forum, you will disccover that that has been done times and again. However, since you have several data you might consider using database, not … | |
Re: Hi Micheal_48, Someone has mentioned that the number of character in "male" is 4 while "female" is actually 6, counting from 0. So, your gender char should be longer than 5 as you have it. Secondly, if you are using `strcmp` you should include `string.h` header in your program. Then … | |
Re: Hi Callie C, You didn't state what the problem is. Neither did you show the error messages you are getting. But I guess if you have looked more closely, you would have seen in **line 19** of your code that `fstream infile;` should have been `ifstream infile;` Notice the **i**? … | |
Re: Hi phoenix254 , You are not returning an array using ` int ordincreasente (..)` like you are doing. Am sure you know that would only return an integer not an aggregate which array is. More so, in your main function on **line 20** `ordincreasente(arr,b);`. I suppose, your array is called … | |
Re: Hi IrinaAnohina, knowing that this question is answered about a year ago. I think you should start a new thread to get help. State what the problems are, what you have done so far and where you are having issues, also don't forget to show your expected output. Cheeers. | |
Re: Hi Killingmonk, **Is there another way?** Yes! There is more than one way to do it! Using the method **looks_like_number** in the **core** module *Scalar::Util*, you can get want you want without using regex. You can read the documentation of this module from the CLI like so: `perldoc Scalar::Util` Using … | |
Re: Hi Ahmed_65 , Getting your desired result is **not** difficult. Only that you have to write the data structure for what you wanted. Please see [perldsc](http://perldoc.perl.org/perldsc.html). You will be glad you did eventually. Since you could use XML::Twig half of the job is done. What you could do, is making … | |
Re: Hi, Just like it was pointed out initially. There are more than one way to achieve your desired result. You could do everything in an hash variable and two while loops or you could use two hash variables and a single while loop. [Taywin] actually gave you a pseudo code … | |
Re: Hi jwenting, Collection can be sorted. So using `Collections.sort(collectionName, new Comparator<collectionName>(){ ... };);` will work, just has others have said. | |
Re: It is quite simpler than what i first proposed. I didn't know that you are not comparing these file with a prime file, but within themselves. So, simply, write a subroutine that read these files, split each line, then get a key and the corresponding value. And if a files … | |
Re: Hello, Why don't you check what you are getting as your keys and values of the hash. You can print out your values to see if you are getting the expected string. You might also look at `Data::Dumper` to print out your hash so that you can see what they … | |
Re: Hi vivek.vivek, Going by your output show, rightly like you are doing, one can use an hash. But since what is really needed is the hour and the number of value one can skip the rest. What i don't get in your post is what you pointed out as the … | |
Re: Hi, Please sorry, this reply is coming this later. It's better later than never... :) I think basically, all you needed is a recursive subroutine. Using `ref` to check the value dataset. Something like this: sub dump_data { my $ref = shift; for ( keys %{$ref} ) { print $_, … | |
Re: Could you show what you have done, how you are doing it and the issues you are facing? You might also want to see `cpan` and check if there are modules that can do what you want to do. Something like [HoneyClient::Manager::VM](http://search.cpan.org/~mitrehc/HoneyClient-Manager-0.99/lib/HoneyClient/Manager/VM.pm) | |
Re: Please check this link. [Perl CGI Debugging: Solving a 500 Internal Server Error](http://www.thesitewizard.com/archive/servererror.shtml) It gives an in-depth solution to the error you are getting, using perl cgi. | |
Re: Hi Anna123, First off, you need know that Perl as a language could be written better than what you have in your post. Moreover, one should **ALWAYS** write a Perl program using the two pragmas: `use warnings;` and `use strict;` Secondly, though one could hack perl sytanx togehter yet it … | |
Re: Hi, > Plz can anyone help me with a program below That is not a problem at all **but** you will have to show us what you have been able to do on your own. Then show the error you are getting and **what** output you will like to have. … | |
Re: Hi, Read documentation of `File::Copy` on your System. Using `perldoc` | |
Re: > But I have no idea how to find out where the premature header is being sent. How are you printing the html header? Check this: use warnings; use strict; use CGI qw/standard/; my $cgi = CGI->new(); print $cgi->header, # header printed $cgi->start_html(-title => "Perl Programming"), $cgi->end_html; Of course, you … | |
| |
Re: Hi rama.krishna.9003: What have you tried? And where are you having problems? I will be willing to help. | |
Re: Hi premkiran, Welcome to learning, Perl. It is one of the best Computer languages you can learn. What you want is quite easily done in Perl. To read a text file you will use `open` function to open the file and readin the file using, the `readline` command. Please check … | |
Re: Hi Ghazal_1, I want to believe you are new on this forum, thus you don't know how things works. People cannot just **give** you a working script on gene palindromes, when they don't know what you have tried and the problems you are having. Except, that they know you are … | |
Re: Hi, Please, What have you tired? Show some effort and others will point you in the right direction. Thanks. | |
Re: Hi, The first question I would ask is does these UNIX commands you gave work from your CLI to start with that is on their own? If no, then, make sure you get to make it work first before putting it in a script. Secondly, in line 30, am wondering, … | |
Re: Hi Anirudh1, Please can you show us what you have been able to do. All you need do is use *open* function, read in the first file into an *hash* and then read in the second file and compare, just like *Taywin* had previously mentioned. The lenght of your file … |
The End.