419 Archived Topics
Remove Filter I'm reading 'C++ For Dummies 7th Edu' and I'v ran into this little snipet that's confusing me. BOOK You can add const-ness, however, as in the following void fn(char* pName) { // declare following is allowed even though // declared Student(const char*) Student s(pName); // ...do whatever... } The function … | |
I followed this site -> https://www.box.com/blog/how-to-debug-php-with-vim-and-xdebug-on-linux/ but I'm not having much luck. I followed the firections and my phpinfo() functions is showing that xdebug is up and running but I see don evidence of xdebug from within vim. I typed in my localhost url, localhost/mysite.php?XDEBUG_SESSION_START=1 and then wen to vim … | |
I hot the following program from the book 'C++ For Dummies' but have two questions about it. First I compiled the program but I'm afraid to run because the memery created from the heap does not appear to me to get de-allocated. Am I correct in not wanting to run … | |
I get the following in my web browser when I try to connect to my mariaDB database. `Error!: SQLSTATE[HY000] [1045] Access denied for user ''@'localhost' (using password: NO)` It also doesn't matter if I use mariaDB root or a regular users credentials, I get the same thing. The error above … | |
Linux Mint I logged into phpmyadmin and set the password option to 'no password' and now I can't log in. If I enter the password I was using I get this error -> `#1045 Cannot log in to the MySQL server` and if I don't user a password at all … | |
garrett@mint-desktop /var/www/html/udemy/php-oop/gallery/backups $ tar --exclude-tag-all=backups -cf lesson20.tar ../* tar: Removing leading `../' from member names I have an empty file called backups in my backups directory to keep the tar file from trying to backup itself. Does anyone know why I'm getting this output? -> `tar: Removing leading ../' from … | |
I need some suggestions on a good cloud server I could use to backup my computer. I want to backup my data (music, pictures, videos, etc...) and I also want to make it better and easier to sync between my desktop and laptop for my coding projects. I currently have … | |
I am trying to create a PDF file that has typeable text boxes, so I guess I'm trying to create a PDF form. I'm using MS Word 2010 to create the document then I select Save As and select PDF. After doing this the text box does not show up … | |
The php/html file I am working on is laid out in this way. <?php // connect to DB $connection ?> html html html <?php foreach($connection-query($sql) as $row) do stuff ?> I'm getting the error 'Invalid argument supplied for foreach()' when I run this page. Can I not break out of … | |
Linux Mint 17 I have recently download the SFML library but I don't know where to put the files. There is a lib directory and an include directory. The lib directory appears to have a lot of sym links in it. garrett@mint-desktop ~/Desktop/SFML-2.3.2/lib $ ls -l total 904 lrwxrwxrwx 1 … | |
When I try to compile the program below in Eclipse I get two erros, ‘const class Fraction’ has no member named ‘n’ & ‘const class Fraction’ has no member named ‘d’ When I compile it on the command line with g++ -Wall FloatFraction2.cpp Fract7.cpp -o FloatFraction I get more errors … | |
So I recently had a catastrophe with using the Mega cloud service with my Linux Mint desktop and I got my whole home directory wiped out. Everything got wiped out about an hour into syncing my 151 Gig home directory to the cloud so needless to say most of my … | |
I recently purchased a 200 GB cloud drive from http://mega.nz but now it's wrecked havoc on my local machine. To give you an idea of what happened I'll start by saying this, when I first purchased my cloud account I didn't realize that it was set to sync in both … | |
I have recently installed LMDE (Linux Mint Debian Edition) onto my laptop but I can't isntall anything because it can't find the sources. I'm assuming I need to edit the /etc/apt/sources.list file but I'm not sure. And if so I don't know in what way I should edit the file. | |
I'm working on a small web project (MariaDB LAMP stack) on my desktop but I'd like to be able to continue working on the project when I am away from home computer. I think I can sync my /var/www/html/ directory without a problem but does how can I export my … | |
The program below is just a simple test to see if I can get it to fetch the correct data from MariaDB and then display it on the screen but so far I'm not having any luck. I left the action attribute's value blank because I want the PHP form … | |
I'm working with MariaDB through PHPMyAdmin and I have a question about how I need to set up my database. For eash person in the table I am currently building I'll also need an array of date values. I don't think there is a way for me to setup a … ![]() | |
In the page below if the screen is to small or is resized it causes the data in the table cells to be out of sight. I would either like there to be a scroll bar at the bottom of the page or I'd like for the data in the … | |
I just installed phpmyadmin with `sudo apt-get install phpmyadmin` but now I can't figure out how to get it started. The installation did place a phpmyadmin directory in /etc/ but I don't have anything in /var/www/html/ . I installed this several years ago and it placed a start icon in … | |
Below is something like what I get when I try to install anything on my just installed OS Linux Mint Debian Edition. Reading package lists... Building dependency tree... Reading state information... The following extra packages will be installed: apache2-data apache2-utils Suggested packages: apache2-doc apache2-suexec-pristine apache2-suexec-custom The following NEW packages will … | |
When I try to create a database with a non root user of MySQL I get this error. -> MariaDB [(none)]> create database cl_db; -> ERROR 1044 (42000): Access denied for user 'garrett'@'localhost' to database 'cl_db' How do I allow my recular username to create databases? Thanks. ![]() | |
In the following code, why is neither "Connected Successfully" nor "Connection failed" ever displayed on my page? Also, I'm trying to place for table side by side in one large table. Does anyone have any idea why Eclipse is giving me warnings about my four tables and my comments? Thanks. … | |
In an php/html document could I create a loop to create html table rows as long as there is a rows to be read from a MySQL database table? I could then populate the html table with the data but I first need to know if I can make a … | |
I just purchased an HP Envy 5642. I can print to it from Linux without a problem but I don't see a way to scan. When I hit scan on the printer it tells me to turn on the appropriate HP application in Windows which I am not running. I … | |
My head is starting to hurt just thinking about all the possabilities and impossabilities of mixing html and css with php and I'd like to understand how's this works. I did a php project for a guy one time and I came close to shooting myself in the face and … | |
[Linux] When using gcc and or g++ is there a way I can have two output files, one with and one without debugging symbols in one gcc/++ command? I don't want to have to write `g++ --Wall program.cpp -o program`, then have to immediately run `g++ --Wall -g program.cpp -o … | |
At my current job me and the rest of the staff that work in my area are uisng a lot of files that when opened look like PDF files but there not. They're actually .exe files and the the program that opens them is called Omni Form Mailable Filler. I've … | |
I just purchased an HP all in one printer and scanner but because I use Linux I can't scan directly to my desktop. As a result I'm having to scan to email and I just noticed that my picture file size was only 244 KB. That's seems small to me … | |
#include <iostream> #include <stdlib.h> #include <cstring> #include <stack> using namespace std; #define MAX_CHARS 100 int main(int argc, char* argv[]) { char input_str[MAX_CHARS + 1], *p; stack<double> num_stack; int c; double a, b, n; cout << "Enter RPN string: "; cin.getline(input_str, MAX_CHARS); p = strtok(input_str, " "); while(p) { c = … | |
Two of my USB sticks have stopped auto mounting. I can still mount them manually by running `mount | grep /dev/sd` and then looking for the device name to mount from but that's having to go a little out of the way. Not all USB stick have stopped auto mounting, … | |
I'm looking at some towers on newegg and I'm trying to pick one out. I'm open to a full tower but I'd like to know if I can get away with a smaller case, mainly because of the price. I'd like to build a media server so the first priority … | |
When I want to sync my music directory to my SDcard I use the command `rsync -a --delete /home/garrett/Music /media/garrett/6BF6-AC8A` and everything works just fine. I got tired of typing all that in every time so I placed that command in the script ~/bin/music-sync and this is what the file … | |
Take a look at the following lsit of files from my media server root@media-server:/home/garrett/Videos/Movies# ls -l total 16 lrwxrwxrwx 1 root root 46 Jun 27 22:17 Adventures In Babysitting.mkv -> ../Movies-Secure/Adventures In Babysitting.mkv lrwxrwxrwx 1 root root 36 Jun 27 22:17 A Far Off Place.mkv -> ../Movies-Secure/A Far Off Place.mkv … | |
There's a few things I'm confused about when it comes to the .mkv file format. It's the file format I use for my media server for several reasons. I'm told it's the format to go with for quality because it can hold HD (which I assume means it's video files … | |
I'm reading the book 'C++ Without Fear 2nd Edu' and I'm a little confused on the subject of shallow copies. The book says the problems can arise if you make a shallow copy of an object and something happens to the original, goes out of scope, is deleted, etc... I … | |
I have ripped the TV show Pushing Daisies Blu-Ray disk as up to 3 episodes on one track. So now my ripped file is one file containing 3 episodes. Is there a good program that would allow me to split the file up into 3 different mkv files? Thanks. | |
#include <iostream> #include <cstring> using namespace std; class String { private: char *ptr; public: String(); String(char* s); ~String(); operator char*() { return ptr; } int operator==(const String &other); }; int main() { String a("STRING 1"); String b("STRING 2"); cout << "The value of a is: " << endl; cout << … | |
I've always been able to navigate through my Windows drive after booting up in my Linux OS but ever since I got Windows 8 there seems to only my a 50/50 change of a successful mount. When I type this command sudo mount -t ntfs -o uhelper=udisks2,nodev,nosuid,uid=1000,gid=1000,dmask=0077,fmask=0177 /dev/sdd4 /media/garrett/Windows I … | |
#!/usr/bin/env python3 tm = open('./timemachine.txt', 'r') Dict = {} for line in tm: line = line.strip() line = line.translate('!"#$%&'()*+-./:;<=>?@[\\]^_`{|}~') line = line.lower() List = line.split(' ') for word in List: if word in Dict: count = Dict[word] count += 1 Dict[word] = count else: Dict[word] = 1 for word, count … | |
I just built my first computer and instlled headless on it. When I boot it up there are a few problems on the black and white screen with all the BS. It usually starts but it takes forever. All the parts are right out of the box via amazon and … | |
#include <iostream> #include <string> #include <stdlib.h> #include <cstring> using namespace std; class Fraction { private: int num, den; // numerator & demoninator public: Fraction() { set(0, 1); } Fraction(int n, int d) { set(n, d); } void set(int n, int d) { num = n; den = d; normalize(); } … | |
I just installed a headless Debian on my first that I'v ever built but I can't install any packages on it. root@media-server:~# apt-get install vim Reading package lists... Done Building dependency tree Reading state information... Done Package vim is not available, but is referred to by another package. This may … | |
I just finished my first computer that I've ever built from the scratch. I used an MSI motherboard, AMD processor, DD3 RAM, and a Samsung SSD. I am wanting to install a headless Debian on it that I'll user for my in home media server but I'm having problems. I … | |
I use Banshee as my Media player and it works just find except that when I rip CDs into .wav files Banshee doesn't always get the ID3 information, artist, album, title, etc... Any suggestion on a good CD ripper for Linux that does a better job at this. I would … | |
I'm looking for a good printer/scanner that works well with Linux, any suggestions on brands and models? Thanks. | |
I just installed CentOS in my Oracle virtual box and now I'm having trouble getting it to connect online. I'm following the directions here -> http://xmodulo.com/how-to-configure-network-interfaces-in.html but the file ifcfg-eth0 is not showing up in /etc/sysconfig/network-scripts/ a lot of ther ifFILES are showing up but not that one. I would … | |
[Linux & gcc] I'm taking C courses and pluralsight.com and I'm both getting an error with a program I got from one of their videos as well as having some trouble understanding something in the code #include <stdio.h> #include <ctype.h> int main() { char message[] = "Hello world!"; for(char *p … | |
I'm trying to install CentOS on my Linux Mint desktop through Oracle's VirtualBox. The instalation screen says it's installing to sda1 and that's it's mount points are /boot -> 500 MB, / -> 5.02GB, & 614 MB. Is this safe or is there a chance this is going to mess … | |
[Linux] I have had a hard time understanding pointers beyond a simple array step through and modifying one address at a time. When I get into pointers to C-structures, C++-objects and classes my head starts to hurt. And that's just to name a few. I find the C syntax `*++p` … | |
if I have something like the following file = open(filename, 'rb') for line in file: #do stuff Once I find what I'm looking for in file and it's placed in the line variable, how could I then capture that position withing file, not just line? |
The End.