669 Posted Topics

Member Avatar for Tinnin

The reason you aren't getting what you want out of the command is because you are redirecting the error output from the wc command into time.out. NOT the error output from the time command. What you need to do is this: time (wc filename >wc.out) 2> time.out That will redirect …

Member Avatar for Tinnin
0
142
Member Avatar for emenyke
Re: rpm

The rpm command is the Red-Hat Package Manager - the package management system used by Red-Hat Enterprise Linux, Fedora, CentOS, OpenSuse and many other GNU/Linux distros. rpm is used to build, install, update, query and/or remove software packages which are packaged in Red-Hats .rpm format. I have to admit, I …

Member Avatar for here2serve
0
185
Member Avatar for mini programmer

By default, Ubuntu has Python pre-installed. And the last few versions of the \*buntu family of distros use Python 2.7. So Python should already be available to you. My current Kubuntu 12.04 LTS install reports Python version 2.7.3 installed. And I don't imagine that there will be any critical differences …

Member Avatar for mini programmer
0
1K
Member Avatar for oanahmed

I think Gallium refers to this: https://en.wikipedia.org/wiki/Gallium3D Perhaps the system information is reporting the driver in use rather than the model name of the card! I don't know if there are any proprietary drivers available for that particular card in Linux (probably not if you can't find any), but the …

Member Avatar for oanahmed
0
275
Member Avatar for christinetom

I've never used FLTK myself, so I couldn't comment on that. But wxWidgets is pretty straightforward to use. In the past I have ported/converted a couple of C++/MFC based applications on Windows to use wxWidgets and made additional changes to the codebase to allow the program to build on multiple …

Member Avatar for christinetom
0
253
Member Avatar for Mr.UNOwen

Other than OpenMP (as mentioned by Moschops), another cross-platform library that immediately springs to mind is Intels Threading Building Blocks (TBB) library.

Member Avatar for mike_2000_17
0
199
Member Avatar for mr.muin13

Lucaci's suggestions are good. I have some additional comments. If you want to understand why your original/existing code is failing: Part of your problem is that you are using a single, global stream to deal with file I/O. Another, bigger part of the problem is that you are not closing …

Member Avatar for mr.muin13
0
264
Member Avatar for siss

Looking at your code, I guess you just need to alter formattedCmd and formattedUrl to take temf as an additional parameter so you can add the parameter to the generated URL. So perhaps something like this? import getopt import sys import hmac import hashlib import base64 import urllib def formattedCmd(api, …

Member Avatar for TrustyTony
0
503
Member Avatar for irtza

The reason you are seeing strange values is because in your SetData function you are doing things backwards, you should be doing this: a=x; b=y; NOT this: x=a; y=b; To explain why you are seeing seemingly random values: In your original code, you are passing the values x and y …

Member Avatar for samiz4j
0
295
Member Avatar for vishalkhialani

I agree, Gimp and Inkscape are probably the best options. Also Xara Extreme is another powerful (and free) vector GFX editor for Linux which might be worth trying. Another supposedly good Linux GFX editor is Cinepaint (which is more aimed at photo and video editing I think!). I'm not sure …

Member Avatar for lovelopez
0
205
Member Avatar for russendel

Alongside the missing braces mentioned by Nichito there are a few other problems in your existing code: Your one dimensional char array 'name' will only hold a single name up to 19 characters long (the final place in the array should be reserved for a null!). 'name' will not hold …

Member Avatar for rubberman
0
126
Member Avatar for aadarsh_khare

The code isn't nonsense at all. It is generating a random number (between 0 and 1000) of random numbers (between 0 and 500) and storing statistics in a dictionary on how many times each number is generated. First it determines how many numbers to generate by selecting a random number …

Member Avatar for JasonHippy
-1
277
Member Avatar for bazingatheory

You're doing your memory allocation completely incorrectly. You need to allocate a block of memory for n instances of the laptimes structure. So perhaps declare two pointers to laptimes at the top of main: int n, index; laptimes* lapdata=0; laptimes* competitor=0; The first pointer (lapdata) will be assigned to point …

Member Avatar for Moschops
0
352
Member Avatar for MasterHacker110

OK, sounds like it could be a DNS related issue. This thread in the official kali forum might help you: http://www.kalilinux.net/community/threads/installing-packages.61/ In it, the OP reports being unable to install any packages from the official repos via apt. Turns out their DNS settings were causing the problem. Some way down …

Member Avatar for JasonHippy
0
384
Member Avatar for dancks

I don't know what compiler you're using, but from running your code through visual studio, your program initially seems to be doing what it should. The functions called in dummy_method seem to be working. For me, the fprintf call at the end of main displays `check:_test answer` with some additional …

Member Avatar for dancks
0
281
Member Avatar for mag.magnesia

First up, you've posted in the wrong forum. You've posted C++ code in the C forum, heh heh! Anyway, as you are dealing with whole hours, you might want to consider making hours an int. Also, to take into account somebody parking for a fraction of an hour you should …

Member Avatar for deceptikon
0
235
Member Avatar for bhallarahul

According to the Adobe website, the latest version of Adobe Reader available for Linux is 9.5.4. If you go to http://get.adobe.com/uk/reader/otherversions/ and fill out the download form (select OS, language and version), the only downloads it lists for Linux are several versions of 9.5.4 in different package formats: .bin, .deb, …

Member Avatar for bhallarahul
0
339
Member Avatar for salesman91

You have two options here: 1. Move the code for the two functions above main, so they are defined before main OR: 2. Create two function prototypes for the functions before main e.g. float ctof(float d); float ftoc(float f); Also you appear to be missing an opening brace '{' after …

Member Avatar for salesman91
0
273
Member Avatar for hajkmusic

@Hajkmusic: I'd recommend breaking your program down into separate functions, making it more modular and easier for you to test and debug. The main() function should control the main program loop and user input, then you should perhaps have two bool functions to test for prime and perfect numbers. You …

Member Avatar for JasonHippy
0
245
Member Avatar for Raja_2

I'm not sure why you'd want to have duplicate user IDs offhand, but it is possible: Using the -o option with commands like useradd, adduser and usermod will allow you to use duplicate/non-unique UID's. Take a look at the documentation for them online: [useradd](http://linux.about.com/od/commands/l/blcmdl8_useradd.htm), [adduser](http://linux.about.com/od/commands/l/blcmdl8_adduser.htm) and [usermod](http://linux.about.com/od/commands/l/blcmdl8_usermod.htm). Or take a …

Member Avatar for Raja_2
0
191
Member Avatar for Raja_2

Slow down chap, breathe in! Heh heh. Because all of your posts are related; rather than creating four separate threads, you could have created one thread and asked all of your questions together in the one place! Also, in order for anybody to help diagnose your problem with any degree …

Member Avatar for JasonHippy
0
181
Member Avatar for ztdep

If you want to get the result of multiplying the entire contents of a TinyVector by a double and have the value returned as a double, (e.g. `double result = myTinyVector * 5.034;`) then this might work: `double operator *(const double &x);` Which you could define as: template<typename T_numtype, int …

Member Avatar for ztdep
0
233
Member Avatar for nathan.pavlovsky

It looks OK to me! I've just tried compiling and running the code you posted in gcc on Linux, just to make sure I haven't missed anything. And it compiles and runs with no nasty surprises. It all seems to be doing what it should! The scores are created, the …

Member Avatar for JasonHippy
0
584
Member Avatar for ikhushee
Re: RSA

Just spotted that this post hasn't had a reply yet... And I can see why there are no replies now! :/ @Ikhushee: If you would use more meaningful variable names and include some comments in your code, it would allow others here to better understand the intent behind your code/logic. …

Member Avatar for JasonHippy
0
123
Member Avatar for bluekb

There are a couple of problems. 1. In your function prototype you have declared and defined a function which has RECORD list[].score listed as the type for the first parameter, which isn't a type at all. This is nonsense! 2. Where you're calling the function you are passing list[].score, which …

Member Avatar for JasonHippy
0
376
Member Avatar for kw42chan

In both cases, line 5 is the problem. Looking at Case 1, line 5: `*int_ptr1 = int_ptr2;` int_ptr1 and int_ptr2 are both pointers to int. The Asterisk character (\*) is the dereference operator which is used to dereference the pointer. In other words it will give you the value stored …

Member Avatar for owenransen
0
194
Member Avatar for sbouxsein

I could be wrong, but the code you've posted looks OK. I'd guess that the problem is more likely to be in your code which deals with getting input from the user. I suspect that you may only be getting everything up to the first whitespace character in the input …

Member Avatar for sbouxsein
0
338
Member Avatar for Donna55555

It sounds like you don't have the glut development packages (headers and libraries) installed. I think installing the freeglut3 and freeglut3-dev packages via apt-get will probably do the trick. I have a strong feeling that they will depend on several other opengl dev packages, so apt should download and install …

Member Avatar for JasonHippy
0
1K
Member Avatar for ankitarajdev

In your makefile, you can declare a variable like this: `MYFILEPATH = /home/cmac/` Then for the build targets in your makefile, you can use the variable like this: targetname: $(MYFILEPATH)filename.cpp g++ -Wall -O2 -c $(MYFILEPATH)filename.cpp Although personally; rather than using an absolute path (like /home/cmac/), I'd use a relative path …

Member Avatar for JasonHippy
0
140
Member Avatar for beanmiester

Tinstaafl's suggestion will at least get rid of the error the compiler is producing. But because your linked list class uses the `new` keyword to dynamically allocate memory for each node, you really should be freeing that memory in the linked list classes destructor. Otherwise you have a memory leak! …

Member Avatar for JasonHippy
0
304
Member Avatar for helloworld1234

Took me a little while to understand what you were doing in your code there, it initially looked as if you'd forgotten to return a value from your binarysearch function. But then I saw in the middle of the binarysearch functions code that you were returning the int value mid. …

Member Avatar for helloworld1234
0
166
Member Avatar for Mclovin

Shadwickmans solution using filter is a very good one! Another way is to use regular expressions... Without further ado, here's a simple example using regular expressions: [CODE=PYTHON] #example using regular expressions import re # here's the string we'll be searching: myStr = "abc123def" # search through the string using a …

Member Avatar for Lucaci Andrew
0
2K
Member Avatar for VEL Hassan

I'm not a Mint user, but I have used several other Debian and Ubuntu based distros over the last few years. Assuming Mint 13 is based on Ubuntu 12.04 LTS and Mint 14 is based on Ubu 12.10 and assuming Mint isn't too vastly different to Ubuntu under the hood; …

Member Avatar for naphets
0
270
Member Avatar for masocha

I wonder if this has anything to do with the problem: http://www.theregister.co.uk/2013/01/04/turkish_fake_google_site_certificate/

Member Avatar for JasonHippy
0
239
Member Avatar for daniello

It might be worth opening whatever sound-mixer software ships with that version of Mint (I'm not a Mint user myself, so I'm not sure what programs ship in the default install), but open the default, system sound mixer program and check that all relevant channels are enabled, are not muted …

Member Avatar for JasonHippy
0
145
Member Avatar for ricsaka

The instance of the Uzenet class which you are passing into your function is called uzenet (note the capitalisation). So in the function, where you are trying to call member functions of the class, you need to use the instance name (uzenet) NOT the class name (Uzenet).

Member Avatar for JasonHippy
0
1K
Member Avatar for amnakhan786

I think you need to be doing this: ./sample -c 4 -i input.txt -o output.txt

Member Avatar for JasonHippy
0
236
Member Avatar for vinodinmani

AFAIK, minicom should be in the Ubuntu repositories. Have you tried this?: `sudo apt-get install minicom` That should be all you need.

Member Avatar for JasonHippy
0
35
Member Avatar for Dani

On my phone ATM so can't test it out or anything. But in principle, it looks OK to me. Might be worth getting another opinion though. I'm a little rusty with regex's myself! :)

Member Avatar for BigPaw
0
208
Member Avatar for cmabill

When you're saving your image out from photoshop, what file-format are you using? I'll assume that you are using a lossey format (.jpg, .png etc) Also when you import your image into the flash IDE, what quality settings are you using? For now, I'll assume that you are importing the …

Member Avatar for JasonHippy
0
277
Member Avatar for last1devil

Open up a terminal and try the following commands: `file /usr/bin/gcc` and: `ldd /usr/bin/gcc` What output do they produce? Also is your system 32 bit or 64 bit? I have a feeling that you may be running a 32 bit version of gcc on a 64 bit machine, at least …

Member Avatar for last1devil
0
837
Member Avatar for thammalatha

Put simply the difference is; each key/value pair in a std::map must have a unique key. Whereas a multimap can contain key/value pairs with duplicate keys.

Member Avatar for JasonHippy
0
93
Member Avatar for crazyjdog

The error you're getting is because your setArea function has not been called before the getArea function is called. setArea is where `self.__area` is first declared/initialised. So as your code stands, as far as the python interpreter can see, your class does not have a property called `__area` Personally I'd …

Member Avatar for JasonHippy
0
469
Member Avatar for khakilang

Hmm, I don't know what to suggest. It's probably some lightweight alternative bit of software that Xubuntu uses that is causing the problem. Perhaps a driver or a codec or something! Either way there is something that KDE uses that XFCE does not. But I couldn't tell you exactly what …

Member Avatar for khakilang
0
201
Member Avatar for anjalirwt

@IAMADOG: Your foul language and immature, unprofessional attitude is hardly helpful! Judging by the OP's code it looks as if they are having to use a really old Borland compiler. FYI: Many schools/colleges/universities in places like India and Pakistan force their students to use ancient, outdated Borland C/C++ compilers.... Quite …

Member Avatar for KaeLL
-1
148
Member Avatar for lewashby

$PIPESTATUS is an environment variable that holds the return values from any single, or chained commands in an array.... The page here should explain it far better than I can!: http://www.linuxnix.com/2011/03/pipestatus-internal-variable.html The && is a logical/boolean AND, similar to C, C++, Java etc. As far as I understand it, the …

Member Avatar for JasonHippy
0
231
Member Avatar for pkfx

The description of your problem is a little vague. What does your program do? If you post a snippet of your code which encloses the part that is going wrong, including anywhere where the incorrect value is being accessed or modified, somebody might be able to post some insight into …

Member Avatar for JasonHippy
0
111
Member Avatar for heather.fletcher.2012

Hmm, there are more problems than that in there. If you look at the code properly, there are actually two extraneous braces in the middle of the class declaration. The two occurrences of }; should be removed at lines 14 and 15. The brace at line 17 is the start …

Member Avatar for JasonHippy
0
139
Member Avatar for Brian_L

Seeing as this thread is 5 months old, I guess replying to this is pretty much pointless. But seeing as umesh and Rubberman have resurrected it, I figured "what the heck?!". There are a few obvious errors in the code that I can see (other than the lack of code …

Member Avatar for JasonHippy
0
151
Member Avatar for fdama

In python there is a boolean type, but its states are True and False (note the capitalisation of the first letters) So in your program all occurrences of false should be False. Also, you are defining guess as a bool and then later you are using it as an int. …

Member Avatar for snippsat
0
214

The End.