Menu
Menu
DaniWeb
Log In
Sign Up
Read
Contribute
Meet
Search
Search
About 21 results for
shiftleft
- Page 1
Re: Help displaying Uppercase to lowercase
Programming
Software Development
11 Years Ago
by sbesch
ShiftLeft
already answered why adding or subtracting 32 won't work. …
Re: help so confused
Programming
Software Development
8 Years Ago
by David W
@
ShiftLeft
, I think the OP stated ... > average; // ... display in decimal …
Class Template Problem - Constructor Issues - Please help
Programming
Software Development
16 Years Ago
by doublediamond
… *data; int size; int capacity; void grow(); void shiftRight(); void
shiftLeft
(); }; [/code] I think I understand how to do it, and…; i > 0; i--) { data[i] = data[i - 1]; } } void
shiftLeft
() { size--; for(int i = 0; i < size; i++) { data…
Re: Class Template Problem - Constructor Issues - Please help
Programming
Software Development
16 Years Ago
by doublediamond
…; int size; int capacity; void grow(); void shiftRight(); void
shiftLeft
(); }; template <class T> myVector<T>::…n) throw(BADINDEX) { if(size > 0) { n = data[0];
shiftLeft
(); } else { throw BADINDEX(); } return *this; } template <class T&…
Re: Multiplying Polynomials
Programming
Software Development
13 Years Ago
by Gribouillis
… So in the expression [icode]addPoly(mulPoly(shiftRight(lst1),
shiftLeft
(lst2)), scalePoly(constCoef(lst1), lst2))[/icode], the first shiftRight…if isZeroPoly(lst1): return [] else: return addPoly( mulPoly(shiftRight(lst1),
shiftLeft
(lst2)), scalePoly(constCoef(lst1), lst2) ) P = [1, 2, …
Re: Multiplying Polynomials
Programming
Software Development
13 Years Ago
by JJHT7439
…So in the expression [icode]addPoly(mulPoly(shiftRight(lst1),
shiftLeft
(lst2)), scalePoly(constCoef(lst1), lst2))[/icode], the first …if isZeroPoly(lst1): return [] else: return addPoly( mulPoly(shiftRight(lst1),
shiftLeft
(lst2)), scalePoly(constCoef(lst1), lst2) ) P = [1, 2,…
Multiplying Polynomials
Programming
Software Development
13 Years Ago
by JJHT7439
… p2 = (anx^n + ... + a1) * (p2 * x) + a0 * p2 = shiftRight(p1) *
shiftLeft
(p2) + constCoef(p1) * p2 (Explains that if you keep shifting… left ([2,3,4] => [0,2,3,4]) def
shiftLeft
(lst): newlst = [] newlst.append(0) for x in range(0…
Re: Multiplying Polynomials
Programming
Software Development
13 Years Ago
by Gribouillis
Why don't you try the algorithm explained above ? I would write [code=python] def mulPoly(lst1, lst2): if isZeroPoly(lst1): return [] else: return addPoly( mulPoly(shiftRight(lst1),
shiftLeft
(lst2), scalePoly(constCoef(lst1), lst2) ) [/code]
Re: Multiplying Polynomials
Programming
Software Development
13 Years Ago
by JJHT7439
…): if isZeroPoly(lst1): return [] else: return addPoly( mulPoly(shiftRight(lst1),
shiftLeft
(lst2), scalePoly(constCoef(lst1), lst2) ) [/code][/QUOTE] I did try…
Re: problem with my c++ algorithm assginment
Programming
Software Development
15 Years Ago
by shamila08
… arr[i] = arr[j]; arr[j] = t; } void
shiftleft
(int *arr, int start, int SIZE) { int tmp = arr[… swap(arr, i, j); starterequiv(arr, i, SIZE); count++ ; }
shiftleft
(arr,i,SIZE); } } } void initiate(int *arr, int SIZE) {…
Re: Program does not declare win or lose
Programming
Software Development
16 Years Ago
by pacman326@gmail
… how to put line #s, I couldnt find it. :( My
shiftLeft
function does not work, for some reason, the last statement…
Re: how to eliminate number
Programming
Software Development
15 Years Ago
by shamila08
…;n; ++j) { shift(x, i, j); equiv(x, i, n); }
shiftleft
(x, i, n); } }} [/code] sorry i 'm not familiar about…
Re: problem with my c++ algorithm assginment
Programming
Software Development
15 Years Ago
by shamila08
…; j++) { swap(arr, i, j); starterequiv(arr, i, SIZE); count++ ; }
shiftleft
(arr,i,SIZE); } if (count == 4) exit(0); } my output…
Re: DBMS - Database Management System
Programming
Computer Science
8 Years Ago
by london-G
Thanks
Shiftleft
for the clear explanation! Makes sense now. Thanks guys!
Re: Write a program to check the password is too strong or strong or weak
Programming
Software Development
8 Years Ago
by hadisur_rahman
i can not get correct answer yet>>>> ##
ShiftLeft
Re: Class Template Problem - Constructor Issues - Please help
Programming
Software Development
16 Years Ago
by Narue
If you define a member function for a template class outside of the class definition, you need to recreate the template parameters: [code=cplusplus] template <typename T> myVector<T>::myVector() { size = 0; capacity = 10; data = new T [capacity]; } template <typename T> myVector<T>::~myVector() {…
Re: Class Template Problem - Constructor Issues - Please help
Programming
Software Development
15 Years Ago
by Laiq Ahmed
what it actually does. Let me tell you what it actually does, and what it should do first what it does [code] template <class T> void myVector<T>::grow(){ while(size >= capacity) { T* temp; temp = data; capacity *= 2; data = new T[capacity];…
Re: Class Template Problem - Constructor Issues - Please help
Programming
Software Development
15 Years Ago
by doublediamond
Yeah, I found that last night, thanks. temp is a pointer, not an object, so I just needed to change temp.data[i] to temp [i] and it worked. I have some sort of small logic error with popback and popfront, but everything else works fine. Thanks for your help.
Re: Class Template Problem - Constructor Issues - Please help
Programming
Software Development
15 Years Ago
by doublediamond
Figured out my last logic error. Solved. Thanks!
Re: Multiplying Polynomials
Programming
Software Development
13 Years Ago
by TrustyTony
For me looks like line 4 should be [B]while[/B] not if, from the comment, so it can remove more than one trailing zero.
Re: Multiplying Polynomials
Programming
Software Development
13 Years Ago
by Gribouillis
[QUOTE=tonyjv;1365937]For me looks like line 4 should be [B]while[/B] not if, from the comment, so it can remove more than one trailing zero.[/QUOTE] Yes, there are many possible improvements. For example isZeroPoly could be the one liner [icode]return not lst[/icode]
Search
Search
Forum Categories
Hardware/Software
Programming
Digital Media
Community Center
Latest Content
Newest Topics
Latest Topics
Latest Posts
Latest Comments
Top Tags
Topics Feed
Social
Meet People
Forums
Top Members
Community Functions
DaniWeb Premium
Newsletter Archive
Markdown Syntax
Community Rules
Developer APIs
Connect API
Forum API Docs
Tools
SEO Backlink Checker
Legal
Terms of Service
Privacy Policy
FAQ
About Us
Advertise
Contact Us
© 2024 DaniWeb® LLC