12 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for newbiewwcode

it's a beginner's problem. I am trying to calculate sum of the first 15 factorials. I know int isn't large enough for the sum, so I used unsigned long long but it still didn't work. why?? Thanks for helping! #include <iostream> #include <cmath> #include <iomanip> #include <cstring> using namespace std; …

Member Avatar for Ancient Dragon
0
356
Member Avatar for Tu Dinh

Hi every body, I tried to search for my own problem, I would think this must be popular issue but unfortunately I found no solution in Google. I tried to use `(boolean) session.getAttribute("IsValidUser")` to get the attribute of Session, but that caused error: org.apache.jasper.JasperException: PWC6033: Error in Javac compilation for …

Member Avatar for Tu Dinh
0
472
Member Avatar for Seba Sama

Hello, Can someone help me understand what is (if it is) the difference between `string* myStr` and `string *myStr`? Or any other type of definitions like that: `int* myValue` vs `int *myValue`, `char* myChar` vs `char *myChar`. The position of the "star" is confusing me. I only used pointers like …

Member Avatar for rubberman
0
344
Member Avatar for rahul.ch

A question that I came across: Q: Can you pass a double to a method when it's argument is a float? A: No. Regardless of the double value, a double-sized variable is too big to fit in a float, so it can't be implicitly cast. Doubt: Shouldn't narrowing happen implicitly?

Member Avatar for JamesCherrill
0
205
Member Avatar for trishtren

Hey, I have a need to define a new type such as int,short etc. I have the class with all the base methods it must perform somewhat equivelant but different from the Integer class, Short class etc. However im not sure whether this is an interface i need to define. …

Member Avatar for sepp2k
0
132
Member Avatar for BThomps

I am trying to change the data type of a primary key in table A from INT(11) to CHAR(11). However, this primary key is a foreign key in tables B and C. SQL is giving me an error whenever I try to change the value type of the primary key. …

Member Avatar for BThomps
0
155
Member Avatar for G_Waddell

Hi All, I know this may seam odd but I'm getting an error navigating through a datagrid of an invalid cast. The trouble is it is of the same types!! I working on customising some Sage code and in the form there is a datagrid that is populated by a …

Member Avatar for G_Waddell
0
250
Member Avatar for superjj

hi I get an error, "has the wrong return type". it has something to do with "tim1.Tick += new System.EventHandler(tim1_tick);" Help me please. [CODE] Timer tim1 = new Timer(); DateTime huidigetijd = new DateTime(); private bool CheckTim1Start; public Wekker() { tim1.Tick += new System.EventHandler(tim1_tick); // tim1.Enabled = true; enable == …

Member Avatar for superjj
0
192
Member Avatar for stemiros

Hi, I have a list of base types which stores multiple derived types. The following code shows a simplified setup. [CODE]#include "Base.h" #include "DerivedA.h" #include "DerivedB.h" #include <iostream> #include <list> void main() { std::list<Base*> base; std::list<Base*> *basePointer = &base; for (int i = 0; i < 10; i++) { basePointer->push_back(new …

Member Avatar for mrinal.s2008
0
2K
Member Avatar for SMITA6076

I'm getting errors when I try to compile this code: [CODE]public class EmployeePayRoll { /*** Class Constants ***/ /*** Defaults ***/ public static final String DEFAULT_EMPLOYEE_NAME = "Employee"; public static final double DEFAULT_PAY_RATE = 10.00; public static final double DEFAULT_HOURS_WORKED = 40.0; /*** Minimums/Maximums ***/ public static final double MINIMUM_PAY_RATE …

Member Avatar for jon.kiparsky
0
289
Member Avatar for ankilosado

I have writen a code for adding (math +) two arrays. Actually, I have two arrays of a class I have also designed, that has two attributess, one of wich is an integer. I would like to sum (add element by element) one array on the other by adding the …

Member Avatar for ankilosado
0
176
Member Avatar for TrustyTony

Ordering objects is one thing that is changing as we will move to Python3 Python 2.6 gives interesting results [CODE]a=[1,'23',('a','b'),False,[[]],[],'bc',['ab','34'],45,'0',{},True] >>> sorted(a) [False, 1, True, 45, {}, [], [[]], ['ab', '34'], '0', '23', 'bc', ('a', 'b')] >>> print True==1 True >>> print False==0 True >>> print False=='' False [/CODE] Python3 …

Member Avatar for vegaseat
0
214

The End.