669 Posted Topics

Member Avatar for jim.lindberg1

This should work: def texten(): filehandle=open ( 'savetonight.txt', 'r' ) text=filehandle.read() return text def smabokstavertext(): text = texten() print text.lower() Basically, where you were calling texten, you need to create a variable to store the returned value. So inside your texten function a local variable called 'text' is created, populated …

Member Avatar for hughesadam_87
0
138
Member Avatar for lewashby

Take a look at my reply in the thread you posted in the Linux/unix forum: http://www.daniweb.com/hardware-and-software/linux-and-unix/threads/434063/python3-linux-directory There are instructions at the end of the post that should allow you to setup geany to use python3 instead of python2.

Member Avatar for lewashby
0
202
Member Avatar for lewashby

Another way is to open up a command line and use the which command. The which command will tell you the path of an executable. So if you want to find out which python3 executable is being used you would simply use: `which python3`. This will output the path to …

Member Avatar for lewashby
0
1K
Member Avatar for lewashby

AFAIK zlib support should be built into Python. So I think it's most likely that you just need to install the zlib libraries/.so's onto your system. Just open your package manager and search for zlib and then install the appropriate files. Although, from seeing some of your previous posts; I …

Member Avatar for lewashby
0
170
Member Avatar for alaa sam

OK, it's been a while since I took a look at Unity, so my memory of it is a little hazy. But at a guess, you might want to check that the keyboard shortcut to lock the screen hasn't been changed or disabled somehow. If you go to System settings->Keyboard->Shortcuts, …

Member Avatar for alaa sam
0
172
Member Avatar for samohtvii

Actually, the problem is that iostream is a c++ header file. Also namespaces are a c++ thing. If you are using GCC for C, then you need to #include <stdio.h> for scanf. If you are trying to compile C++, you need to use g++ not GCC. You might also want …

Member Avatar for Ancient Dragon
0
803
Member Avatar for sampsont

If you are using a version of Visual Studio, you could just pass the `__FUNCTION__` macro into your logging function. e.g. `_log.debug("message", __FUNCTION__);` The function macro will pass the name of the current function as a string. see: http://msdn.microsoft.com/en-us/library/b0084kay%28v=vs.80%29.aspx I think the `__FUNCTION__` macro is also defined in gcc, so …

Member Avatar for sampsont
0
142
Member Avatar for stengeljjj

As the code stands, the two literal values in the calculation are implicitly treated as doubles. Have you tried changing c to a double, or you can change the literals to floats by putting an f at the end of each e.g. 4.0f - 1.99999990f. Those are about the only …

Member Avatar for JasonHippy
0
106
Member Avatar for samohtvii

Continue is a reserved keyword in C and C++, so give your char array a different name.

Member Avatar for samohtvii
0
166
Member Avatar for Geowil

With std::vector, you can do either! If you know what the vector should contain when your class is instantiated, you can initialise the vector with whatever it needs to contain in your class constructor. Or if you know how many elements it will need to contain, you could initialise it …

Member Avatar for Geowil
0
256
Member Avatar for lewashby

I haven't used Mint in a long while, so I don't know the exact name for this package. But try running the following command and see what results it lists: `apt-cache search libglib` The libglib package usually has the version number appended after it, so see what the above command …

Member Avatar for JasonHippy
0
165
Member Avatar for adityasingh95

OK, a couple of things: Firstly you've posted in the wrong forum. This is C code, not C++! (Not the end of the world, but FYI!) Secondly, well done for using the code tags feature (most noobs forget this), but please remember to correctly indent your code in future as …

Member Avatar for JasonHippy
0
4K
Member Avatar for DaveTran

OK, so you've forward declared the classes in the header files. And I could be wrong, but from what I've seen; you haven't included the header files for the forward declared classes in the corresponding .cpp files. Which is most likely why you're getting the error messages you've reported. So …

Member Avatar for JasonHippy
0
409
Member Avatar for lewashby

@OP: The page you posted lists folders with all of the available versions of CentOS. Assuming you want to use the latest version, open the link for '6.3'. Then open the 'isos' link/folder. From here you'll have two choices, 'i386' or 'x86_64'. Depending on your systems architecture, open the appropriate …

Member Avatar for JasonHippy
0
245
Member Avatar for lordinateur

I have an old RM Tablet PC (which uses a Wacom tablet/screen) at home which is currently running Ubuntu 9.04 on it with no problems. The stylus works fine for the usual mouse-like activities (e.g. navigating the file-system and for drawing in gimp, blender and Inkscape etc.) Regarding handwriting to …

Member Avatar for sirisrikanth6
0
534
Member Avatar for SimonFrance

At the end of the day, Linux desktop environments are a very subjective topic. You could ask ten different Linux users and get ten completely different answers. Everybody has their own preference, but there isn't necessarily a 'best' desktop environment per-se. It's more a case of finding the one that …

Member Avatar for JasonHippy
0
153
Member Avatar for sillyboy

Currently reliving my youth, listening to some classic UK Thrash (Slammer, Toranaga and Acid Reign) and some old UK Anarcho/Punk stuff (Crass, Conflict, Discharge, Disorder, Chaos UK, Exploited, MTA and Toy Dolls) :P Aaah nostalgia!

Member Avatar for Helianthus
0
5K
Member Avatar for funnyguy1

Wow, that is truly a mess! Here are some of the problems I've spotted from an initial look (after pasting into a text editor and auto-indenting the code): 1. Your class and functions have all been declared and defined inside main. I recommend that you take the class definition and …

Member Avatar for JasonHippy
0
2K
Member Avatar for lewashby

The page you've gone into there has a bunch of bit-torrent files. You can download the torrent files and then open them with a torrent program like Transmission, which will then allow you to download the dvd images from other users who have seeded the files on their PC's. If …

Member Avatar for lewashby
0
125
Member Avatar for Violet_82

Well, if you are unsure about whether it will work or not, you could just try a live cd. If you have a spare 8gb USB stick knocking about and you wanted to test more thoroughly you could even install a live cd image with persistent storage onto the USB …

Member Avatar for Violet_82
0
230
Member Avatar for lewashby

The link you mentioned seeing on the desktop is the installer for backtrack! Double clicking on it will run the installer.

Member Avatar for lewashby
0
88
Member Avatar for tomtetlaw

Sounds like you're missing the glu package (libglu1-mesa-dev). A quick 'sudo apt-get libglu1-mesa-dev' should solve that problem for you! :)

Member Avatar for tomtetlaw
0
141
Member Avatar for msrikanth

I don't know about Seamonkey extensions, but there is a Firefox extension called ChmFox which can be used to view chm files (Not sure if that's compatible with Seamonkey though). There are also several standalone programs which can be used to view chm files in Linux. xchm is a chm …

Member Avatar for JasonHippy
0
240
Member Avatar for Albino

They aren't ASCII characters, they're Unicode. See [this!](http://en.wikipedia.org/wiki/Chess_symbols_in_Unicode) .

Member Avatar for Albino
0
279
Member Avatar for lewashby

I could be wrong, but I think you just need to open up /etc/network/interfaces (or create it if it doesn't exist) and add the following lines: auto eth0 iface eth0 inet dhcp

Member Avatar for lewashby
0
199
Member Avatar for funkey100

Vern, from what I can gather from the little portuguese I know, it's kinda like a substitution cypher where the letters T E N I S are substituted for P O L A R and vice versa. Incidentally, tenis is portuguese for shoes! So the sentence "A polar bear wearing …

Member Avatar for Schol-R-LEA
0
313
Member Avatar for Albino

Which will be your problem. You have two sets of definitions for those variables. Remove the declarations from main and include globals.h in main and any other files which need to use the globals. And don't forget to set up some inclusion guards in globals.h if you haven't already. And …

Member Avatar for Albino
0
470
Member Avatar for dspjm

Not sure if it's any help, but I had a similar problem with my old tablet pc. Turned out that the main speakers and the headphones were on different channels. I eventually realised when I took a look at the user options/settings for the mixer and found (and enabled) a …

Member Avatar for dspjm
0
189
Member Avatar for pheon

Ubuntu is based on Debian, so other than the UI (No Unity or Gnome 3 in Debian. Debian 6 uses Gnome 2.6) there aren't really many differences. The main differences are: 1. By default, Debian tends to use slightly older, better tested packages. Which pretty much assures a stable and …

Member Avatar for androtheos
0
406
Member Avatar for prem2

With the ls command, the 'l' flag uses a longer listing format, 't' sorts by modification time and 'r' reverses the order of the sort. To list folders recursively you'd need to use the 'R' flag! Remember man pages are your friend. To see all of the available options for …

Member Avatar for DavidB
0
164
Member Avatar for noscimo

You can't return null unless you are returning a pointer from a function. But if you don't want to use pointers there are a couple of options. You could do something like this: Contact getContact(){ Contact c; // initialise c to some default state which indicates it's uninitialised // do …

Member Avatar for noscimo
0
279
Member Avatar for aitm04

Can you post the code in question? It may help to shed some more light on the problems you're having!

Member Avatar for JasonHippy
0
108
Member Avatar for #include <lou>

In short, the private members of your base class should be declared as protected rather than private if you want derived objects to be able to access them directly.

Member Avatar for JasonHippy
0
170
Member Avatar for markbautista19

Well, take a look at what you're doing there: bot.y = player.y - bot.y So if the player is at y=0 and the bot is at y=4: The bot would be moved to y=-4. So the bot jumps suddenly from a y-pos of 4, to a y-pos of -4. Lets …

Member Avatar for JasonHippy
0
135
Member Avatar for gfp91

When you initially declare your array, this is ok: `GLfloat Light_Position[]= {0.0f, 1.0f, 3.5f, 1.0f};` That will create an array and initialise it with the specified values at declaration. But later in your program where you do this: `light_Position[]={tVector3.x,tVector3.y,tVector3.z, 1.0f};` Depending on which version of the C++ standard you are …

Member Avatar for mitrmkar
0
184
Member Avatar for MrEARTHSHAcKER

From what I can see, any compiler should compile the code, but most should issue a warning about the pointer being uninitialised. As far as I understand things: With most compilers, when you declare a pointer and you don't initialise it to point to anything; it will point to an …

Member Avatar for JasonHippy
0
233
Member Avatar for motrcolt

Take a closer look at your code. The problem is occurring because you need to input the year **before** doing any of your calculations. As your code stands, the value of EasterDay is being calculated before the user has even input the year. So the uninitialised year variable is used …

Member Avatar for zeroliken
0
611
Member Avatar for sinnebril

ls and rm are a couple of command-line/system programs in Unix and Linux operating systems, they aren't regular expressions. `ls` is used to list the files/directories in the current directory and `rm` is used to remove/delete files. As stated, `ls -l` lists the files/folders in the current directory. The l …

Member Avatar for sinnebril
0
3K
Member Avatar for linux

01001010 01110101 01110011 01110100 00100000 01100001 00100000 01110100 01101000 01101111 01110101 01100111 01101000 01110100 00101100 00100000 01110111 01101111 01110101 01101100 01100100 00100000 01101001 01110100 00100000 01100010 01100101 00100000 01110111 01101001 01110011 01100101 00100000 01110100 01101111 00100000 01110000 01101111 01110011 01110100 00100000 01101111 01100011 01110100 01100001 01101100 00100000 01101111 01110010 00100000 …

Member Avatar for vinnitro
2
1K
Member Avatar for benswimmin

In your .cpp file you are redefining the Circle class, which was already defined in the header. This would certainly cause a linker error. Remove the entire class statement from your cpp file (lines 7-24 in your 2nd snippet) and you should be good to go.

Member Avatar for JasonHippy
0
127
Member Avatar for lastbencher

Because you're passing rect by value into the area function, a copy of the Rectangle object is created inside the function using the default copy constructor (which will be automatically created by the compiler as you haven't created a copy constructor). The first call to the Rectangle destructor occurs when …

Member Avatar for JasonHippy
0
170
Member Avatar for Vampiricx3

[QUOTE=;][/QUOTE] In my experience most companies just want somebody who can do the job. Personal appearance isn't always that big a factor. However, at the same time attitudes towards personal appearance can vary wildly from company to company, it can also vary depending on the nature of the position you …

Member Avatar for BruceVA
0
204
Member Avatar for Johnathon332

For future reference, please post your code here on the forum rather than on a 3rd party site. And please don't forget to use code tags! For everybody elses benefit, here's the OP's code: [CODE] #include <iostream> #include <string> #include <time.h> using namespace std; const int MAX_SIZE = 100; string …

Member Avatar for Johnathon332
0
119
Member Avatar for sajaddehghan

[QUOTE=;][/QUOTE] A variable preceded by an asterisk * is a pointer. The asterisk is called the indirection operator and is used to dereference pointers. As it's name suggests a pointer is a variable which points to a variable of a specific type. So all a pointer holds is the memory …

Member Avatar for JasonHippy
0
154
Member Avatar for poovalingam.msc

[QUOTE=FraMazz;1673540]Isn't it sufficient to remove CentOS partition and to resize Win 7 one with Win 7 Disk Management tool?[/QUOTE] No, because CentOS (and other Linux distros) replace the windows MBR/bootloader with an alternative bootloader like Grub or Grub2. So simply removing the CentOS partition and resizing the Windows 7 partition …

Member Avatar for jbennet
0
222
Member Avatar for alaa sam

Personally I use [ICODE]sudo[/ICODE] on the command line for most administrative tasks on my Debian/Ubuntu based installs. Except if I have a lot to do, in which case I'll switch to root using [ICODE]sudo su[/ICODE]. You can open a root terminal using the command [ICODE]gksudo gnome-terminal[/ICODE] In older versions of …

Member Avatar for alaa sam
0
408
Member Avatar for Basteon

I have heard that it is possible to set up a cross-compiler environment which will allow you to build executables for other platforms from within Linux, but I've never looked into it. The few cross-platform apps I've worked on have been done as per Rubbermans post. e.g. Using cross-platform libraries …

Member Avatar for jbennet
0
421
Member Avatar for SCass2010

As far as I'm aware libxerces is the same as pretty much any other library in Debian based systems. It should be available in the repositories (the exact version will depend on which version of Ubuntu you're running). You can use apt-get to install the packages for the library and …

Member Avatar for floored1585
0
2K
Member Avatar for cwarn23

Ubuntu, Mint, Debian, Opensuse and Fedora tend to be quite popular choices of distro, but I don't think there is any such thing as 'one true distro'. Peoples views are different about Gnu/Linux and it's many different flavours. What one person prefers, another may detest! The other thing to remember …

Member Avatar for sonal_salkade
0
648
Member Avatar for pspwxp fan

The End.