25 Topics

Member Avatar for
Member Avatar for Curious Gorge

Hello again I'm working with the Poco internet library trying to understand it but I have come across some syntax that I don't quite understand. This may be a beginner question. Here it is: Poco::AutoPtr<Poco::Notification> pNf (_queue.waitDequeueNotification); I know AutoPtr's contain a count of how many objects reference the object …

Member Avatar for Curious Gorge
0
308
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 johnas.delacruz

Is there a data type that can allow a user to input a 25 digit number... because the largest data type for numbers that i know is long long int and uintmax_t which can only store 18 numbers (i'm not sure about this)... because my problem should allow a user …

Member Avatar for David W
0
460
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
342
Member Avatar for chrispitt
Member Avatar for Clan Onion

In Assembly there's not going to be much insight on linked lists, B trees, arrays, etc. In fact those don't even exist at the bit level. Sure, they help solve some problems from all the way up to your compiled language syntax, but such symbols don't exist in machine code, …

Member Avatar for mathematician
0
295
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
204
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
248
Member Avatar for nasimalotaibi

[CODE] import javax.swing.*; import java.awt.*; import java.awt.event.*; public class Test extends JFrame implements ActionListener { JTextField t1=new JTextField(10); JTextField t2=new JTextField(10); JTextField t3=new JTextField(10); JTextField t4=new JTextField(10); JTextField t5=new JTextField(10); JTextField t6=new JTextField(10); JButton b1=new JButton("MakeReservation"); JButton b2=new JButton("DeleteReservation"); JButton b3=new JButton("searchReservation"); JButton b4=new JButton("printResrevation"); JButton b5=new JButton("clear"); JButton b6=new …

Member Avatar for stultuske
0
342
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 b.netana

[CODE]import java.util.Arrays; import java.util.Comparator; public class CameraInventory2 { // The main entry public static void main(String[] args) { // create the array Camera[] camera = new Camera[3]; Cam cam = new Cam(); camera[0] = new Camera(1, "Nokia", 20, 30.0, 8); camera[1] = new Camera(2, "Polaroid", 10, 21.0, 14.1); camera[2] = …

Member Avatar for hfx642
0
281
Member Avatar for Godservant1

Someone gave me this challenge See how large a type is by storing powers of 2 in this list of types: float, double, long double. To determine if a number will fit, start with 1.0, double it, then divide by 2 to see if you get the previous number. For …

Member Avatar for nyquist
0
143
Member Avatar for ozy123

Hi all, I'm trying to design an application for a recruitment application. I have two types of users - a coordinator who works for an agency who logs in and posts jobs and searches for canidates. And a candidate who logs in and searches for jobs. I'm not sure if …

Member Avatar for adam_k
0
146
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 toadzky

I am writing a supplemental program for the software that came with a programmable robot. The DLL structure has about 6 DLLs that I can reference, with another set that I need to load at runtime. The ones I need to load at runtime have a class inside them that …

Member Avatar for toadzky
0
203
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 matthewkeating

Hello, I am looking into testing the performance of different numerical datatypes like double, integer, float, etc and see which one is the fastest. Is there a way to do this in C++. Time the time it takes to do basic arithmetic with numbers. Starting and end a timer within …

Member Avatar for mrnutty
0
125
Member Avatar for Castiel1631

I am creating an abstract data type for strings implementing the string functions but not using the string library. I have my .c file and my .h file below. The problem seems to lie in addMystring I have commented out the area's that seem to have the problem. when they …

Member Avatar for Castiel1631
0
2K
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
175
Member Avatar for jeffcogswell

With the recent release of Visual Studio 2010, Microsoft has updated.NET and the C# language, both now at version 4. One of the new features of C# is the ability to handle dynamic types. But what exactly does that mean? Essentially, if you're very careful, you can use C# in …

Member Avatar for Tekmaven
5
723
Member Avatar for sravan953

Hey all, I'm working on a program where I calculate powers of two upto 60. I've made my own formula for calculating it which is: 10^([value of log 2 here]*y), where 'y' is any power as big as, say, 31. So here it is: [code=python] two=0.301029995664 final=math.pow(10,(two*n))-1 [/code] Now... as …

Member Avatar for TrustyTony
0
190
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.