419 Archived Topics
Remove Filter I have a few questions about libraries and header files. Since libraries are binary files and header file are source/text files why do they not just compile the header files along with the rest of the library files? It doesn't make sense to me to have libraries that are binary … | |
I recently re-installed my Mint system and now vim does not auto indent when writing code and has poor color coding. Does any one know what I need to change and where the config file for that is? Thanks. | |
I'm currently building a headless Debian NFS media server and I'm doing most of my testing on my desktop. My cliant streaming device will by my "WD TV Live' TV streamer because it can read a Linux NFS network, I hate Samba. One of my problems is that the TV … | |
If you're creating a media server how do you control if the files are pushed out via tcp or udp? Or is that a client thing? I'm currently building a headless Debian media server and I was wonsering how that words. As far as streaming videos in my house either … | |
When I delete files on any given file system like hard drives that I have mounted to my system or USB stick I get a directory that usualy named '.Trash-1000'. How does that directory work? Do I need to manually delete the .Trash-1000 directory because it might remain taking up … | |
I don't know if this is a Linux Mint problem or a Debian problem. I use Mint as a desktop but I just installed a standard no GUI edition of Debian for my media server. I was going to use the Mint file browser Nemo to connect to the Debian … | |
Just got my nephew an HP Windows 8.1 laptop and either he can't remember the password that he just created or something is messed up. Is there a way to reset the password or do a hard reset if you can't even get logged in? Thanks. | |
In the following program it says that there is a conflict between my getline and the getline in stdio.h. I understand what it's saying because stdio.h has it's own getline function. What's confusing me is that this is the program that my programming book (The C Programming Language) is giving … | |
I was using the Linux Mint Flawless media server to host all my movie rips as .mkv files but I decided to go with a standard no GUI Debian server instead. I set up an NFS server to host my files with the most likely client to be my Western … | |
I need to use the tar command to unpack a .tar.gz file and I need to do it from root but when the files unpack I want them to be owned by a specific user, not the root user. Can someone give me a hand?. I found the man pages … | |
[Linux] Mint I wrote the following code from an SDL book I have and it seems to be building just fine but when I go to run the program I get this error -> "Launch failed, Binary not found." I used Eclipse as my IDE and the setting are adjusted … | |
When I compile the following two programs one of them compiles and one of themse does not but I don't see a difference. The smaller program is the same only I've taken out a lot of the code so that I'm left with only the minimum that I need to … | |
I have I Brother Laser printer and it seems to be pring everytying just fine. But when I go print some property listings from a realesate company it all the sudden will not print at all and I get the following error. -> There was a problem processing documents 'flexmls'(job … | |
I'm a little confused about inlining member functions. Does all code actually have to be on one line or does it simply mean writing the whole function inside the class rather than from outside using the :: syntax? | |
In the following program, where is pt1 getting it's values (1, 0)? I get pt3's values (5, 10) because I can see them in the code. #include <iostream> using namespace std; class Point { private: int x, y; public: Point() {} Point(int new_x, int new_y) { set(new_x, new_y); } void … | |
In the program below I'm a little confused with these two lines -> `fbin.seekp(n * recsize);` & `fbin.write(reinterpret_cast<char*>(&age), sizeof(int));` In the first one, why would we start writing to the file at position n * recsize instead of position 0? I would think that we would start writing at 0 … | |
I have an iBasso digital music player and I need a little help uisng rsync. I want to copy all of my muisc from /home/garrett/Music/ into my SD card which is at /media/garrett/6BF6-AC8A/ I'm currently using the command `rsync -a --delete /home/garrett/Music/ /media/garrett/6BF6-AC8A/` The thing is I would also like … | |
I've been reading 'Learn C++ By making Games' and it uses the SDL library. The problem is the book has poor code examples, a lot of them don't even show the #include <libraries> instead jump straight to the main() function. So I just ordered the book 'Linux Graphics Programming with … | |
I'm trying to add /home/garrett/bin/libpy/ to my python path so I can import my own libraries, I would also prefer not to overwrite the default python path but rather append my own path to the default. When I try to `echo $PYTHONPATH` or `$PYTHONHOME` I get nothing and even if … | |
In the following program what is `ifstream`? It looks like it might be a Class name making `file_in` an object of that class passing `filename` as an argument but this particular book hasn't touched OOP yet so I wasn't sure. #include <iostream> #include <fstream> using namespace std; int main() { … | |
One of my C++ books was showing the line `cin.getline(arg, arg)` and later showing `getline(cin, arg)`. Why is the second one not object.function and yet have the object as one of the arguments? What's the difference? | |
#include <iostream> class Book { public: Book(char* char*); private: char* title; // dynamic pointer to char array char* author; // dynamic pointer to char array public: Book& Book::operator=(const Book& b) { if(this != &p) // make sure it's not the same object { delete [] author; // delete author memory … | |
The book I'm using continues to give me code and fails to explain the syntax. I got to a chapter on operator overloading and it gave me some code but didn't actually explain any of the code. I having trouble understanding the Rectangle operator+ line and that methods contents. Why … | |
What is the difference between these two classes? In the second one `protected:` looking like it isn't doing anything at all, there's nothing under it umbrella. class Tank { protected: int wheels; public: void setWheels(int newWheels) { wheels = newWheels; } int getWheels() { return wheels; } }; /////////////////////////////////////////////////////////////// class … | |
I'm reading my C++ book and I've come to a chapter on structures and unions. The book has tried to explain the difference but I'm not getting it's explanation. Playing with the structure examples in the book reminds me of accessing attributes to a python Class but apart from that, … | |
I'm reading 'C++ Programming in easy steps' and the program the book has given me will not compile. Compile line -> `g++ -g -Wall "${ARG}" -o "${ARG:: -4}" &&` ARG is command line argument 1. object.cpp:7:5: error: ‘string’ does not name a type string color; ^ object.cpp:14:19: error: ‘string’ has … | |
In the program below what is the difference between rand and srand? My book says that rand returns an int between 0 and RAND_MAX, which is never smaller than 32,767. Yet this code returns a number from 1-6, how is that? I see the line `( rand() % 6 ) … | |
I just re-installed my Mint system and now I can't get php to work. I've tested apache and it seems to be working just fine, entering localhost into the URL brings up that default page in /var/www/ but when I created a small php file called testphp.php with nothing but … | |
I copied the following from a back but I'm getting the erros that you see at the bottom of the page. #include <SDL/SDL.h> #include <stdio.h> #include <stdlib.h> int main() { int main() SDL_Surface *screen; if(SDL_Init(SDL_INIT_VIDEO) != 0) { printf("Unable to initialize SDL: %s\n", SDL_GetError()); return 1; } atexit(SDL_Quit); screen = … | |
I'm reading a book on C and it's telling me how to use gcc and about the -c option/flag. It reads "-c Compiles to an object (.o) file instead of an executable. This is important for creating library files." What is an object file and how is this good for … | |
I have an iBasso DX50 digital music player and I have all of my music for it stored on a 128 GB micro SD card. I sync my music directory to it using the following command. `rsync -a --delete SRC DEST` but I've noticed some odd behavior. I thought the … | |
I recently installed Windows Server 2008 and how my BIOS keeps setting the Windows boot as the default boot rather than Linux even though I keep setting the Linux SSD as the primary. Any ideas on why it keeps getting reset to Windows in the BIOS? I have 3 OSs … | |
I just tried installing MS Server 2008 R2 and it seemed to install fine but when I try and start it this is what I get and the black and white screen with all the BS. File \Windows\systm32\winload.efi Status 0xc0000428 Any ideas? | |
I'm trying to mount my SD card to my computer because the auto mount feature isn't working for some reason. The card shows up on the first line of the 'lsusb' command, I know that's it because that line goes away when I take the card out and re-run the … | |
I just gutted one of my old desktop as am thinking about building a server. How do I know what size form factor this case needs. I'm assuming it's ATX or micro-ATX but I don't know. | |
builtins.UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd2 in position 14: invalid continuation byte I'm getting the following error that pops up not in my script but in the codecs.py file. I've used code exactly like this in another program and it worked just fine. Any ideas? Script below. #/usr/bin/env python3 … | |
In the following program I'm getting the warning -> unused variable ‘fn’. I'm following along with a book so I don't know why it gave me that portion of code if it's unusable. Also, I don't understand this line at all. -> `void(*fn)(int& a, int* b) = add;` #include <iostream> … | |
(Linux) I just installed eyed3 for python using apt-get, everything installed fine but when I tried to import eyed3 I got a trackback error, no such module. Do I need to do something special to let python know where the module is at or do I need to move the … | |
I know that all you really need to execute a python program is the python interpriter, what what if your program uses config files that might be in /etc, ~/.program, or C:\users\Name\Appdata ? How would you go about creating an installer for you python program and all of it's files … | |
#!/usr/bin/env python3 import sys import re file = sys.argv[1] f = open(file, 'rb') seek_positoin = 0 artist_string = b'artist=' line = b'' f.seek(seek_positoin) while artist_string.upper() or artist_string.lower() not in line: line = f.readline() if artist_string.upper() or artist_string.lower() in line: seek_positoin = line.find(artist_string) f.seek(seek_positoin, 1) word = f.read(10) #line = str(line) … | |
Why am I getting the above error message when I run this program? I'm running this program with an mp3 file as an argument, the mp3 file is in the same directory as the python program. There are 30 space reserved for the Title at positoin 125 from the end … | |
I'm trying to write a program to get the artist and album from mp3 files. A simple test run on the Alice in Chanins song Rooster yielded this result -> `b'Rooster\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'` I set read to read(20) and if you count Rooster plus all the \x00s you'll see that it 20, … | |
I'm going to try and extract the artist and album from the meta data of an mp3 file with python but I need a little help. This is what I get on the tag line when I open an mp3 file in vim: ----> `ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿTAGRooster^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@Alice In Chains^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@DIRT^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@1992` This is what … | |
Below is what I'm getting when I try nad start tor, any ideas? M ay 25 14:38:35.000 [notice] Bootstrapped 25%: Loading networkstatus consensus. May 25 14:38:45.000 [warn] Received directory with skewed time (server '193.23.244.244:443'): It seems that our clock is behind by 6 hours, 59 minutes, or that theirs is … | |
When I try to compile the program at the bottom this is what I get. `-> qtprogram.cpp:1:24: fatal error: QApplication: No such file or directory` I got this code from a C++ QT book and I'm compiling this on Linux with this command. `-> g++ -g -Wall "${ARG}" -o "${ARG:: … | |
In my /var/www/ directory I have a lot of sub directories, one is learning/, which is where I place all my web projects that I'm following from different PHP or CSS/HTML books, another called projects/, for actualy projects I might undertake. I currently have port forwarding set up on my … | |
I just set up a samba media server and I got it up and running but it currently has to have a username and password to access the files. Do you know lines I need to edit in these two files to allow anyone, user or not to access the … | |
I have a 120 Gig iPod classic but I think it's HD must be getting some bad places, it at leat 3 years old, but I think a few years older. A lot of the songs will not play, I have to plug it into my Mint desktop and delete … | |
greens = dict(green="#0080000", olive="#808000", lime="#00FF00") >>> print("{green} {olive} {lime}".format(**greens)) -> #0080000 #808000 #00FF00 In the program above what are green, olive, and lime in the dict function? I've seen and read about supplying a function with keyword arguments but only when the function was written with default argument. Even then … | |
I'm trying to create this site with a solid black top bar the extends from the left img all the way to the right of the screen, then add some text on top of the horizontal block. I created the block just find but when I went to add text … |
The End.