158 Topics

Member Avatar for
Member Avatar for bennetk2

Assignment You are to write a program that will convert any base 10 number a to any base b. Input two values, the first in base 10 and the second value is the base that is to be converted into. Bases only between 2 and 9, and flag invalid input. …

Member Avatar for bennetk2
0
2K
Member Avatar for monkeybut

IT currently is set up for base 3, but should be able to make a couple of minor changes and convert to any base, thanks and hope it helps someone out. [code]#include <iostream> #include <cmath> #include <fstream> using namespace std; void convert_base(int v, int b); ifstream inputdata; ofstream outputdata; int …

Member Avatar for mike_2000_17
1
529
Member Avatar for fenixZ

Hi guys, I am experienced in PHP or at least until today I was thinking so. I am not sure what is it all about exactly. In my opinion the following code should not echo anything BUT IT DOES. [CODE] $cache = 'all'; if($cache == 0) { echo 'Execute something'; …

Member Avatar for fenixZ
0
124
Member Avatar for ddanbe

Although [url=http://en.wikipedia.org/wiki/Roman_numerals]roman numerals[/url] sneak in our lives from time to time, we(luckily) don't use them very often. Probably the reason why the Romans where not that good at calculating things. That changed, more than 1000 years later, with [url=http://en.wikipedia.org/wiki/Fibonacci]this person[/url] who introduced to the Western world the number system we …

Member Avatar for gracefull
0
1K
Member Avatar for IndianaRonaldo

[CODE]void SubGen(char* s) { //rearrange s ... for(int i=0;i<strlen(s);i++) { for(int j=i+1;j<strlen(s);j++) { if(s[i]==s[j]) { char temp=s[i+1]; s[i+1]=s[j]; s[j]=temp; } } } //s arranged.... Sub[0][0].push_back(s[0]); for(int i=1;i<strlen(s);i++) { if(s[i]==s[i-1]) { vector<string> temp; for(int j=i-1;j<Sub.size();j++) { for(int p=0;p<Sub[j].size();p++) { temp.push_back(Sub[j][p]); } } for(int j=0;j<temp.size();j++) { temp[j].push_back(s[i]); } Sub.push_back(temp); } else { …

Member Avatar for IndianaRonaldo
0
214
Member Avatar for atrueresistance

Hello All I'm converting an access database to MS SQL for a webapp and have a question if anyone knows how to do this. 4 fields [TimeReported] [TimeOff] [TimeOn] [TimeAssigned] Access only stored time, so date is incorrect. 1 Field stored date separately [Date] I would like to take each …

Member Avatar for atrueresistance
0
130
Member Avatar for lloydsbackyard

how to convert Month in words to its numeric equivalent.... example: <?php $month = 'JANUARY'; // code to convert the month JANUARY to its numerical equivalent... echo 'help please for the numerical JANUARY equivalent here'; ?> ----------------------------- SAMPLE OUTPUT 01

Member Avatar for karthik_ppts
0
143
Member Avatar for TrustyTony

There was little buggy version of Python base conversion around, so here quick hack for my own program, including test with random numbers to verify it.

Member Avatar for TrustyTony
0
905
Member Avatar for kurtopia

can you help me with this. i have used tcpdf but i dont know how to read the contents of the .doc, .pdf contents and put it in a single pdf for the user to download it. Please help me.. thanks

Member Avatar for twiss
0
67
Member Avatar for Labdabeta

This is a conversion question that has me stumped. I need to convert an unsigned char to a signed float. Some examples: 0xFF becomes 1.0f 0x00 becomes -1.0f 0x80 becomes ~0.0f The only idea that I could come up with was a massive switch statement. But a switch statement will …

Member Avatar for ddanbe
0
337
Member Avatar for tkapadia1102

Hii, I am new to PHP world. I need to convert the video files into flv format. I am having a problem in the code. Its not working. I dont know whats the problem. It gives error " Parse error: parse error in \script\uploadvideopro.php on line 63 " Here is …

Member Avatar for diafol
0
178
Member Avatar for Labdabeta

I have a problem that I am having trouble solving. I have a string of undefined length containing '0' or '1'. I need to convert this string to decimal... but I CANNOT store it in anything but another string. My issue is how to do this?! I have been thinking …

Member Avatar for nezachem
0
146
Member Avatar for denkfix

Hi, I use the stl features to deal with string conversions, especially facets. Now, I am faced with the task to lower a string except its first letter. Please note that I am dealing with multi-byte characters and so I cannot simply replace the first character of the string with …

Member Avatar for denkfix
0
218
Member Avatar for Skabix

I am converting seconds to minutes, hours, days. For some reason I have an issue with the days not calculating when running the program. The 'if' statement seems completely ignored by the program. I think this may be caused by the warning I get. Any help would be greatly appreciated …

Member Avatar for Skabix
0
1K
Member Avatar for manofhouse

Program is suppose to convert binary to hex.. it says that i need a class/struct/union to the left of ".substr" but im pretty sure convert should be working.. [CODE]#include <iostream> #include <string> using namespace std; int main () { string convert [8]; string bin[16]= {"0000", "0001","0010","0011","0100","0101","0110","0111","1000","1001","1010","1011","1100","1101","1110","1111"}; string hex[16]= { "0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F"}; …

Member Avatar for Tomi1988
0
411
Member Avatar for iamthesgt

I am working on a VideoServer for my company, and in making the cgi files for the Web interface, I came across the following error: " invalid conversion from ‘int’ to ‘VideoOutputMode‘ " This was from line 4 of the below code, in the WebInterface file: [CODE]form_iterator vout_mode = formData.getElement("DisplaySettingsVOutMode"); …

Member Avatar for iamthesgt
0
3K
Member Avatar for mjavaid

Hi all. How would I modify my current program to make it perform the conversion with the main method calling other methods instead of performing the conversion in the main method itself? I have attached a .pdf file that has a list of all the methods that must be used …

Member Avatar for mjavaid
0
110
Member Avatar for manofhouse

ok so for some reason its telling me my "else" has no matching "if" in line 51, i have to make it so the binary output is spaced which im pretty sure i did and has to have a separate output if the character length is more than 8 [CODE]#include<iostream> …

Member Avatar for WaltP
0
458
Member Avatar for manofhouse

Need help converting from hex to binary any help is very appreciated!! [CODE]#include <string> #include <iostream> class Hex { private: //constructor std::string hexNumber; int decNumber; public: Hex(std::string hNum): hexNumber(hNum) {} Hex(int dNum): decNumber(dNum) {} ~Hex(); int toInt(); std::string toBin(); std::string toHex(); }; [/CODE] it keeps saying i need to put …

Member Avatar for VernonDozier
0
412
Member Avatar for YodaMerlin

I have a pointer object consisting of different arrays of variable length. I want to get one of the arrays from the pointer array and store is in a different array. How would I go about doing it? When I try the method, it gives an error: [B]initialization with '{...}' …

Member Avatar for YodaMerlin
0
229
Member Avatar for YodaMerlin

I have a variable [B]x[/B] declared as [B]int *x = y[/B], where [B]y[/B] is also a pointer variable. Is there any way to store the variable in [B]y[/B] to [B]x[/B] without making [B]x[/B] a pointer such that it would look like: [CODE] int x = y; //y declaration => int …

Member Avatar for YodaMerlin
0
158
Member Avatar for tinymark

Hello to everyone. I have an old flat database with a couple of hundred entries that I want to convert to a relational design. It was a user database for simple login and some preferences. I would like to know if there is a simple way to convert from one …

Member Avatar for tinymark
0
178
Member Avatar for altic

I want to ask how to convert from FAT32 to NTFS in Windows without losing data on the conversion? And i have read a few article about conversion and it should do in Command Prompt with code[CODE] CONVERT C: /FS:NTFS[/CODE] But i'm not sure if i do that my data …

Member Avatar for altic
0
174
Member Avatar for Labdabeta

I made a header file to convert strings to numbers of base X. That is I want: [CODE]int num=B<16,int>("FFF");[/CODE] To equal: [CODE]int num=0xFFF;[/CODE] Here is the code so far: [CODE]#include <string> int numb(char in) { if (in>='0'&&in<='9') return in-'0'; else if (in>='a'&&in<='z') return in-'a'; else if (in>='A'&&in<='Z') return in-'A'; } …

Member Avatar for Labdabeta
0
138
Member Avatar for Forthright

Hi I am trying to call a 3rd party method which relies on const char* I want to pass an arbitrary value. The (broken) code below should show what I'm trying to do. [CODE] #include <iostream> #define MAX 1000 // 3rd party stuff void ConstPtrMethod(const char* s) { std::cout << …

Member Avatar for Forthright
0
339
Member Avatar for Rickay

[CODE]#include <iostream> #include <windows.h> #include <ctime> #include <cmath> #include <iomanip> #include <string.h> double numerator, denominator; static short multiplycounter; static short dividecounter; const double ten = 10; double* ppnumerator = &numerator; double* ppdenominator = &denominator; using namespace std; /**********************************************************************************/ double lcm(double numerator, double denominator) { if(*ppnumerator > *ppdenominator) { for(long counter …

Member Avatar for frogboy77
0
188
Member Avatar for Rickay

[CODE]int main() { static short multiplycounter; static short dividecounter; double decimal; int rdecimal; cin >> decimal; rdecimal = int(decimal); cout << setprecision(10) << decimal << endl << rdecimal << endl; if(rdecimal % 1 != 0) { while(rdecimal % 1 != 0) { if(rdecimal % 1 == 0) { break; } …

Member Avatar for Rickay
0
623
Member Avatar for speedy94519

Hello, I would like some help on this one problem in my assignment. I have completed the table but something caught my attention and i feel i did something wrong. I attached the same table i filled out on this thread. I would like help on the first row. My …

Member Avatar for lillygil
0
203
Member Avatar for anilkumar-m

i want the java methods or the mechanism which will work as that of COMPOSE and DECOMPOSE functions in ORACLE/PLSQL. please help me out. thanks in advance.. COMPOSE-ORACLE [CODE]compose('o' || unistr('\0308') ) [/CODE] would return ö DECOMPOSE-ORACLE [CODE]decompose('é') [/CODE] would return 'e´'

0
65
Member Avatar for cool_jatish

Hello guys... I am working to module need to convert any UNICODE words/ chars that never change with font To their equivalent HTML numeric & JAVA unicode [\u****]. In the JSP the charCodeAt(i) function works but in JAVA no such utility exit ... Plz write with such an suitable example …

Member Avatar for quuba
0
193

The End.