520 Posted Topics
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 … | |
Note that I am using MinLinux. I'M trying to launch Team Fortress 2 from Valve's Steam and I'M getting the following error. Required OpenGL extension "GL_texture_compression_s3tc" is not supported. Please install S3TC texture support. I checked my Synaptic Package Manager and I already have the following two packages installed when … | |
I use Mint Linux. What do I need to get in order to get started programming in java? Is there a particular IDE that is good for Java or should I just stick with vi(m)? My skill level is as follows. Iv succesfully written a date validation program in C++ … | |
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} … | |
Re: I just wrote this program myself in bash. I created an array CALENDER=(31 28 31 30 31 30 31 31 30 31 30 31) Dealing with leap year is the trick part. If you want let me now and I'll supply my script. | |
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 … | |
garrett@ubuntu-laptop:/etc$ ls -l vim* total 8 -rw-r--r-- 1 root root 2215 Aug 29 16:23 vimrc -rw-r--r-- 1 root root 662 Aug 29 16:43 vimrc.tiny garrett@ubuntu-laptop:/etc$ cat vimrc cat: vimrc: No such file or directory garrett@ubuntu-laptop:/etc$ Could someone please explain how the abbove is possible? How is vimrc showing up as … | |
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 … | |
Below is a program I'M trying to write that will take an 8 digit date and validate whether or not it's a valid date. I'M very new to shell scripting so I really a have no idea what I'M going. Could you take a look and let me know what … | |
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 … | |
I'M trying to create a flowchart for a simple program that would take a number (1, 16, (100,100,000), or pretty much whatever you can think of and return it as a sting. For example, input -> 100,100,100 return -> one hundred million one hundred thousand one hundred. I've attached my … | |
I've got a guy that has been kind enfough to start teaching me Linux administration and programming. I want's me to write a pseudocode program to take any numberand print it out as a string. I'M woing to attached my pdf version and read below to see his email. I … | |
import wx app = wx.App() win = wx.Frame(None) win.Show() app.MainLoop() Why does the above code only work in python2.7 and not 3? | |
#!/usr/bin/python3 print('Content-type: text/plain') # prints an empty line, to end the headers print('Hello, world!') I'M trying to get the above python cgi output to load in my web browser but the browser is just displaying the code it's self. My apache program is working because I just tried the phpinfo … | |
I'M about to wipe out my installtion of MintLinux and I need to back up my firefox and google chrome favorites. Does anyone know where these files are kept? Thanks. | |
I have a Samsung Galaxy Tab. To my dissapointment it is unable to be mounted to Linux. I found a few website with instructions on how to mount it be so far they haven't worked. I'M really trying to get more and more away from Window$ but I'M finding it … | |
Guys pleas read the following page and don't forget to drop them a really positive email that's given at the bottom of the website. Thanks. Let them know you're willing to buy the product again if necessary to have a native Linux copy of your favorite valve game. Thanks http://blogs.valvesoftware.com/linux/ | |
Just got the book C++ Programming in easy steps. I just did the following program and although I ran it with now problems the book and this program really do not at all help understand how an enum or a typedef are usefull in the real world. #include <iostream> using … | |
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 … | |
( 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" … | |
Why does spell checking not work in the text fields here at daniweb? It works in the title but not here in the actual post. I'M a really bad speller so this is really frustrating. | |
I have been instructed by my instructor to write a pseudocode date program. The program need to accept a date by looking at the year, then the month, and the day as well as to account for leap year. Please do not hesitate to help me out here, it's a … | |
I'M tring to install a bitcoin program and I'M told I need the following package: garrett@toshiba-laptop ~ $ sudo apt-get install libssl-dev libdb4.8++-dev Reading package lists... Done Building dependency tree Reading state information... Done Package libdb4.8++-dev is not available, but is referred to by another package. This may mean that … | |
I'M using Mint Linux. Does anyone know where or how I could download a music store plugin for Rhythmbox? Please don't mention Banshee it refuses to sync to my iPod. I don't really like the idea of having to open Banshee just to purchase music. I think Clementine has the … | |
I need to write a script to where the lower half does not execute until the current shell runs an exit or logout command. How can I do this? The script I need this on is below. mount -v --bind /dev $LFS/dev && mount -vt devpts devpts $LFS/dev/pts && mount … | |
I'M converint all of my videos from iTunes using DRM removal softare. Most of these videos will be played on Linux and or my Samsung Galaxy Tab, my format options are: MPEG-1 NTSC, MPEG-1 PAS, MPEG-1 SECAM, MPEG-2 NTSC, MPEG-2 PAS, & MPEG-2 SECAM, MPG, MP4, & MKV. What should … | |
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? | |
Re: I'M not a big game player but there are a few select games I have to keep Window$ around for (Half-Life original). I've also had bad luck replacing iTunes and running my iPod with Linux software. |
The End.