182 Solved Topics

Remove Filter
Member Avatar for lewashby

I just went in to edit /boot/grub/grub.cfg and the first thing I seen in the file was this: # # DO NOT EDIT THIS FILE # # It is automatically generated by grub-mkconfig using templates # from /etc/grub.d and settings from /etc/default/grub # How am I to make changes if …

Member Avatar for lewashby
0
132
Member Avatar for lewashby

I'M trying to output a message if the PHP query on the MySQL database come back empty. But when I uncomment this line `//echo "No result found for entry";` not only does it fail to output this message when there is no match but it also fails to load the …

Member Avatar for Geffory
0
212
Member Avatar for lewashby

What's gvfs and why can't root access it? Emphasized Text Heremint-desktop ~ # du -sh /home/garrett du: cannot access `/home/garrett/.gvfs': Permission denied 73G /home/garrett

Member Avatar for lewashby
0
193
Member Avatar for lewashby

Note that this is on a Linux machine. I'M just starting to learn PHP and MySQL. I wrote the following php program that executes from an html form. Note that at this point the date from the html form is not being used to query the MySQL database. At this …

Member Avatar for pixelsoul
0
350
Member Avatar for lewashby

I've been having a problem with my php, apache, mysql. I can't find the problem so I'M gong to uninstall all of them and re-install them using tasksel. But when I type sudo apt-get remove mysql, it returns the following: garrett@mint-desktop ~ $ sudo apt-get remove mysql Reading package lists... …

Member Avatar for cereal
0
185
Member Avatar for lewashby

The following code block is producing and endless loop and I can't figure out why. Note that charv is just he second command line argument in the main function. int testNumber = 1; while(argv != '\0') { std::cout << testNumber; argv++; testNumber++; } I wrote this piece of code just …

Member Avatar for Suzie999
0
164
Member Avatar for lewashby

In the following html/php page why is my "select" tag not showing all the options? <html> <head> <title>Learning PHP & HTML</title> </head> <body> <form action="somefile.php" method="post"> <form> <table width="25%"> <tr> <td>First Name:</td> <td align="right"> <input type="text" name="fName"></td></tr> <tr> <td>Last Name:</td> <td align="right"> <input type="text" name="lName"></td></tr> <tr> <td>Phone Number:</td> <td align="right"> …

Member Avatar for lewashby
0
291
Member Avatar for lewashby

Is there a way I an compress a file in Linux for Windows? I recently sent a compressed folder to a Windows recipient and I don't think they were able to open the file.

Member Avatar for cereal
0
146
Member Avatar for lewashby

I have been told that in C++ the concept of a string does not exist. A string is just an array of type char. So in the following code, is message an array because it doesn't really look like one? char *message = "I am having trouble understanding pointers"; std::cout …

Member Avatar for lewashby
0
246
Member Avatar for lewashby

In the following program how or the two while statements working, `while(szTarget[targetIndex])` & `while(szTarget[targetIndex])` since the their first element is initialized to zero? Zero is false and one is true so how are they getting even one iteration? The book I'M reading also made a point of saying this: "It …

Member Avatar for vmanes
0
77
Member Avatar for lewashby

I'M reading "C++ FOR DUMMIES" 4th edition by Stephen Randy Davis and the chapter on arrays as just introduced this line -> `cout.width(3);` with absolutly no explanation to waht width is. I would like any of you guys to help me wout here but in addition to telling what .width …

Member Avatar for lewashby
0
248
Member Avatar for lewashby

Does anyone know how I can add "0" to the left side of a string? If I get "1234" I'd like to make it "012345", if I get "1234" I'd like to make it "001234". Any suggestions?

Member Avatar for Moschops
0
155
Member Avatar for lewashby

Just got a 16 GB PNY flash drive from Wal-Mart and formatted it to ext4. Any idea how I could put access security on the drive? I would prefer security to protect against other OSs as well. Thanks.

Member Avatar for lewashby
0
168
Member Avatar for lewashby

Can anyone tell me whay the following funtion that should be returning true if the year is leap year and false if it is not, is givign me unexpected results? when I entered 1985 I got true? when I entered 2012 I got false. When I entered 2000 I got …

Member Avatar for lewashby
0
198
Member Avatar for lewashby

In code like int `main(int argc, char **argv)`, I'M trying to understand command line arguments a little better. And what would be the difference between `char ** argv` & `char * arg[]`? Thanks.

Member Avatar for Lerner
0
128
Member Avatar for lewashby

I'M getting a "DateValidation.cpp:10:2: error: ‘numberOfDigits’ was not declared in this scope" error. Here is my call to the function: numberOfDigits = getNrDigits( int date ); The function is declared in the file functions.h and I have #include "functions.h" at the top of my page. Any ideas?

Member Avatar for MIND_HACKER
0
116
Member Avatar for lewashby

In the program below I need to get month to hold the first two digits of date, day two hold the digits 3 & 4, & year to hold the last four digits. Any idea on how I can accomplish that? #include <iostream> #include <string> #include "functions.h" int main() { …

Member Avatar for lewashby
0
435
Member Avatar for lewashby

In the following program, when I enter a number I'M getting strange output back. When I enter 5 I get 0x6011a85 back on the cout << "you entered" line. #include <iostream> //#include "functions.h" int main() { std::cout << "Please enter a number. " << std::endl; int date = 0; std::cin …

Member Avatar for CGSMCMLXXV
0
91
Member Avatar for lewashby

I need to store the number of digits from a number into a variable. e.g. 538, i need to store 3. How can I accomplish this is C++? Thanks.

Member Avatar for Moschops
0
107
Member Avatar for lewashby

In the following script I can't get the variable STARTPOINT to increment by 3 each time through the loop. I con't get it because the variable NUMBEROFGROUPS is incrementing by -1 each time and both increment lines look identical to me. #!/bin/bash set -x leading_zeros() { local NUM=${1} local NUMBEROFDIGITS=${2} …

Member Avatar for rch1231
0
166
Member Avatar for lewashby

The following line of code should result in GROUPS holding a number from 1 to probably 4 or 5. I need the next line to simply add 1 to whatever this lines results to. I've tried a lot of tings in bash but I can't make it happen. Any ideas? …

Member Avatar for L7Sqr
0
108
Member Avatar for lewashby

I've got an array CALENDER=(31 28 31 30 31 30 31 31 30 31 30 31) I have two if statements that Need to get an index from the array above but when I feed a value into the brackets e.g. ${CALENDER[${SECONDDIGIT}]} or ${CALENDER[${FIRSTDIGIT}]} it seems to only be getting …

Member Avatar for lewashby
0
119
Member Avatar for lewashby

I wrote the following script to try and get validate if a date was valid or not. I think I've about got the script done but I'M having some trouble getting the values from the array. When I input 11291985 into the program I'M getting "29 is invalid" I can't …

Member Avatar for lewashby
0
125
Member Avatar for lewashby

I'M trying to test a function that would be able to determine if it was or was not leap year. I believe my problem lies in the if statement but due to my lack of knowledge concerning shell I don't know what else to do here. #! /bin/bash read -p …

Member Avatar for Watael
0
190
Member Avatar for lewashby

I'M trying to write a small program that will validate weather or not a string is valid. Assuming that the date will always be 8 digits (12/21/2012) I need a function that will count the number of digits in a string. What I've got below is only returning "'is not …

Member Avatar for Watael
0
138
Member Avatar for lewashby

garrett@mint-desktop ~ $ c++ -v Using built-in specs. COLLECT_GCC=c++ COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.6/lto-wrapper Target: x86_64-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.6.3-1ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.6 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --enable-objc-gc --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu Thread model: posix gcc version …

0
106
Member Avatar for lewashby

( make 2>&1 | tee make.log && exit $PIPESTATUS ) && Could someone give me a detailed explanation of the above line? I know that tee is creating a text file while also allawing the output to come to the screen but need a better understanding of $PIPESTATUS. Is "exit" …

Member Avatar for JasonHippy
0
232
Member Avatar for lewashby

I need to view a text file that located somewhere in a file.tar.bz2 file. Anyway I can explor a tar.bz2 file and view a text document there in?

Member Avatar for mike_2000_17
0
118
Member Avatar for lewashby

I've set up a small php file called phpinfo.php the script is below. <!DOCTYPE html PUBLIC "_//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/ xhtml-transitional.dtd"> <html xmlns="http://www.w3.org/1999/ xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="content-type" content="text/tml; charset=utf-8" /> <title>First PHP Script</title> </head> <body> <?php phpinfo(); ?> </body> </html> I've already installed both php5 and apache2, …

Member Avatar for cereal
0
331
Member Avatar for lewashby

I just got a new Netgear N router. I didn't use the install CD because there is no computer besider our router and DSL modem. I just plugged it up and at all the Windows computers in the house seem to be able to connect just fine but my Linux …

Member Avatar for JorgeM
0
52
Member Avatar for lewashby

I'M having a bit of a problem with audio books on Linux. I buy my books from audible.com but since they don't support Linux it's just one more thing keeping me from fully leaving Windows. There audio formats are in .aax. Their books play fine in iTunes and on my …

Member Avatar for lewashby
0
144
Member Avatar for lewashby
Member Avatar for lewashby

data = open('sketch.txt') for each_line in data: try: (role, line_spoken) = each_line.split(':', 1) print(role, end='') print(' said: ', end='') print(line_spoken, end='') except: pass data.close() I'M gettin the following error when I run this code but it looks exactly like what I'M seeing in my Head First book. File "sketch.py", line …

Member Avatar for lewashby
0
202
Member Avatar for lewashby

I'M trying to learn php and I use Mint Linux as my OS. I don't know if php is installed or not. I went to synaptic package manager and input php, I got back a big list of php-xyz packages and I dont' know which one to get. Any suggestions?

Member Avatar for cereal
0
382
Member Avatar for lewashby

bash: bld: line 11: syntax error: unexpected end of file I'M gettting the above when I source the attached script file. Can someone please let me know what I've got wrong here? Thanks The script file was build from the commands here > http://www.linuxfromscratch.org/lfs/view/stable/chapter06/gmp.html

Member Avatar for Kwetal
0
140
Member Avatar for lewashby

I've got a 58 minute mp3 file and I'd like to burn it to an audio CD with multible tracks. Right now it's just one big file. Any dieas?

Member Avatar for Reverend Jim
0
175
Member Avatar for lewashby

/root/bin/go-lfs I need to add teh above to PATH. If I simply write "export PATH="$PATH:~/bin/go-lfs" will it cause a problem? I'M assuming that this would remove enerything already in PATH and that might cause problems for the duration of my shell. If so, how could I added it without overwritting …

Member Avatar for imamyth
0
116
Member Avatar for lewashby

I've attached my output error and my script is below, also the link the the directions. http://www.linuxfromscratch.org/lfs/view/stable/chapter05/perl.html Here's my script: ( patch -Np1 -i ../../../perl-5.14.2-libc-1.patch 2>&2 | tee patch-perl.log && exit $PIPESTATUS ) && sh Configure -des -Dprefix=/tools && cp -v perl cpan/podlators/pod2man /tools/bin && mkdir -pv /tools/lib/perl5/5.14.2 && cp …

Member Avatar for lewashby
0
126
Member Avatar for lewashby

lfs@debian:/mnt/lfs/sources$ tar xjvf binutils-2.22.tar.bz2 tar (child): bzip2: Cannot exec: No such file or directory tar (child): Error is not recoverable: exiting now tar: Child returned status 2 tar: Error is not recoverable: exiting now lfs@debian:/mnt/lfs/sources$ the file binutils-2.22.tar.bz2 is in this folder, why am I getting this?

Member Avatar for L7Sqr
0
121
Member Avatar for lewashby

lfs@debian:~$ scp output garrett@192.168.1.10:/home/garrett ssh: connect to host 192.168.1.10 port 22: Connection refused lost connection lfs@debian:~$ Why is the above not working? I am wasily able to ssh from on computer to the other, why will scp not work here? output is just a simple text file.

0
93
Member Avatar for lewashby

Guys I feel really stupid asking this but I can not downlaod debian. Everytime I try I get on of these (http://cdimage.debian.org/debian-cd/6.0.5/amd64/bt-dvd/) pages and I have no idea what to do with it.

Member Avatar for lewashby
0
125
Member Avatar for lewashby

I recently compressed a whole username(I think the file was DeveloperBackup and I think the extention was .gz but I'M not certain) in ubuntu and I had one copy of the file on my ubuntu laptop and one on my external HD. I know this sounds really stupid of me …

Member Avatar for caperjack
0
114
Member Avatar for lewashby

When taking the LPI exam do you have to take both the LX0-101 and 102 exams at the same sitting or can you take the two on two different dates? Thanks. Even if I had a job as a Linux admin I would find it almost impossible to do that …

Member Avatar for JorgeM
0
104
Member Avatar for lewashby

I've been using iTunes for a while now but I'M really sick of their prodected file crap, having t authorize and de-authorize different computers all the time. What I'M looking for is a program with extensions/add-ons for different online music stores. Maybe one for amazon's music store where you would …

Member Avatar for CimmerianX
0
187
Member Avatar for lewashby

I'M working my way through a C++ book and now I'M doing a card deck program. Here's the line I'M having trouble with. r = card % 13; // r = random 0 to 12 card in this case is just a random int number from 0 to 51. 52 …

Member Avatar for TrustyTony
0
174
Member Avatar for lewashby

#include <Stdafx.h> #include <iostream> #include <stdlib.h> #include <time.h> #include <math.h> using namespace std; int rand_0toN1(int n); int hits[10]; int main() { int n; int i; int r; srand( static_cast<unsigned int>(time(NULL))); // set seed for random numbers cout<< "Enter number of trials to run "; cout<< "and press ENTER: "; cin>> …

Member Avatar for VernonDozier
0
169
Member Avatar for lewashby

I've got a linux ubuntu media server running in my house but I've got two small problems with it. How can I set it with a perminate IP so I will not have to physically go to the box each time I turn it on to check the IP? Also, …

Member Avatar for JorgeM
1
201
Member Avatar for lewashby

Does anyone know a way to make my msconfig setting stay. When I restart my computer all that crap come right back. Windows has no respect for user preferences. I know you can set it to start up in bare minimum but I'M afraid that would me a little to …

Member Avatar for caperjack
0
139
Member Avatar for lewashby

I'M reading "Linux + Guide to Linux Certification" and I've come to samba and I'M having trouble understanding a few things. The book says I need to add a username and password on the Linux system that corresponds to the username and password on the Windows clients? And then another …

Member Avatar for androtheos
0
192
Member Avatar for lewashby

I just installed Ubuntu Server but I'M not getting any network activity, let alone an internet connection. When I type ifconfig I only get the local ip address of 127.0.0.1. I have connect the eth0 port to one of the open ports on my wireless router and I'M still getting …

Member Avatar for lewashby
0
199

The End.