419 Archived Topics
Remove Filter Please take a look at my fstab below. I'm trying to mount the HD stb onto /home/garrett/ but I don't know waht options I should choolse. Thanks for any and all replies. # /etc/fstab: static file system information. # # <file system> <mount point> <type> <options> <dump> <pass> proc /proc … | |
I need to make a script run under my username each time the computer boots up. I have been told that the file I need is in the /etc/init.d/ directory but that's all I know. This script will not be service I shouldn't have to mess with all the 'S' … | |
In the following program I'm trying to set the first, second, & third character values stored in processTheseThree [0], [1], & [2] to the int values D1, D2, & D3. When I tested my code with the line `std::cout << processTheseThree[firstSecondThird] << std::endl;` I was getting the correct values but … | |
In the following script I'm trying to have an automated task to move all the screen shots I have taken with the "Prt Scr" button from ~/Pictures to ~/Pictures/ScreenShots Any ideas why it's not working. I did it at first with the mv command but was told by my instructor … | |
// Array for one's place char arrayOnes[10] = {"", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine"} In the code above I'm having trouble declaring this array. I either get > error: too many initializers for ‘char [10]’ | |
I'M trying to get backtrack Linux to boot from a USB flash drive. The book I'M reading is haivng me to a lot of formating and what not on the flash drive from the CLI and then use rsync to copy the contents of the backtrack disk to the flash … | |
In the following css and html document can anyone tell me why my page width css code isn't working? mystyle.css #page { width: 25%; } Here's the html page. <html> <head> <title>Bail Bonding</title> </head> <body> <link rel="stylesheet" type="text/css" href="mystyles.css" media="screen" /> <form action="bail.php" method="POST"> <div id="page"> <table width="25%"> <tr> <td>First … | |
In the following program I'M trying to take a number no more than 12 digits long and make it a factor of 3. If the input is 1, the program would turn the number into 001. If the input is 12, the program would turn the number into 012. If … | |
I'M wanting to write my own command/script for compiling my c++ files. I use g++ -g -Wall filename.cpp -o filename I'M trying to figure out how I can trip of the last four characters (.cpp) from a string. Any ideas? | |
I'M trying to make the following web page fluid, or liquid. I want the page and form to resize as the browser is resized. Any idea on how I can accomplish this? Thanks. <html> <head> <title>Test</title> </head> <body> <link rel="stylesheet" type="text/css" href="mystyles.css" media="screen" /> <form action="bail.php" method="POST"> <div id="page"> <table … ![]() | |
Note that I'M using Mint Linux with Cinnamon. I just got a new 250 Gig SSD and I'd like to have it mounted at /home/garrett. First of all, what's the best way to do this? Should I simply add a mount command to my .profile file? Secondly, I'M assuming that … | |
I recently had problems with Cinnamon DE and I had to temporarily download and install gnome3, which then altered the login screen a little. After I fixed my cinnamon problem and removed gnome3 I'M still stuck with this other login screen that I don't like as much as the original … | |
Just purchased a new Samsung 250 Gig SSD, extern & internal. When I pluged it into my Mint Linux desktop via USB it never showed up or auto mounted. When I tried to run the command 'sudo mount /dev/sdc /mnt' it gave me this error, 'mount: you must specify the … | |
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 … | |
How can I make the following web page liquid? I want the fomr to resize with the browser. <html> <head> <title>Bail Bonding</title> </head> <body> <form action="bail.php" method="POST"> <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>Address:</td> <td align="right"> <input … | |
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 … | |
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 | |
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 … | |
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... … | |
When I click a link a simple HTML web form linked to a php file, the browser is downloading the PHP file rather than executuing it in the browser. Any dieas? | |
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 … | |
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"> … | |
I ran the command ifconfig and in addition to lo and eth0 I got this item that I have never seen before. Can anyone tell me what it is? virbr0 Link encap:Ethernet HWaddr da:1c:6c:2a:cb:80 inet addr:192.168.122.1 Bcast:192.168.122.255 Mask:255.255.255.0 UP BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX … | |
I tried to run ./configure on a small program that the Linux book I'M reading instructed me to download and I got the error "no acceptable C compiler found in $PATH" I then tried to run atp-get install gcc, but then I got "unable to locate package gcc". Any dieas? | |
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. | |
Segmentation fault (core dumped) Can someone please explain what that error message means? I'M tryin to use `strcat()` to add "0" to the left end of char `*argv[1]` I want it to do this only when the lenth of `argv[1]` can not evenly be divided by 3. So if I … | |
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 … | |
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 … | |
How can I grow the size of a char array? `char myArray[6];` Assumming that all the current elements are occupied how can I add more empty element to the array to input another value into? | |
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 … | |
How would I take a liquid layout from a site such as http://www.graceworkskids.com/index.html and use that same design style on a sitle like http://1stbytes.com/ What am I looking for in he html code? | |
My css file is size.css and it contains -> `body { width: 100%; }` My html file is below. I can not see a difference between using and not using the css file. I'M trying to get everything on the page to get smaller(including images) and reduce down into one … | |
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? | |
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. | |
In the following test case program I'M trying to figure out how I can use the remainder of divison to make a decision but I can not seem to get this test case to respond in the way that I think and want it to respond based upon the remainder … | |
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 … | |
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. | |
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? | |
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() { … | |
I've been told to study up on four c segments: code, data, stack, heap. I know that googleing stack and heap will probably give me a mountain of information. But what the heck is code and data? If I type c code into google I'M going to get a lot … | |
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 … | |
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. | |
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} … | |
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? … | |
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 … | |
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 … | |
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 … | |
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 … | |
    I have Western Digital TV Live that plugs into my TV and also into my 1TB external HD. I have attached four pictures to help with what I'M confused and having trouble with. Take a look at my network1.png, notice that the … | |
Below is a short program I'M working of from udacity.com but I can't figure out why I'M getting the value 6 from the first call to the function. # Define a procedure, biggest, that takes three # numbers as inputs and returns the largest of # those three numbers. def … |
The End.