64,152 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for volkang

hi, is there any code that calculates the cdf of lognormal distribution? i came across one in codecogs.com but it requires commercial license:/ any help would mean a lot. thanks from advance

Member Avatar for volkang
0
113
Member Avatar for computerbear

Hello, This is part of code I posted in another thread. Seems like the process works, I can load my arrays. But when I make a choice from a menu list. it just jumps out of the while loop. It does not enter the switch. I am sure I am …

Member Avatar for abelLazm
0
113
Member Avatar for fibbo

Hey, it's me again. Again with a topic that has been covered here but reading through the old threads didnt help me to solve my problem. And I am pretty clueless at the moment. Consider the class passenger_queue with 2 functions, namely: [CODE]int passenger_queue::get_passengers_waiting() const { // Insert your code …

Member Avatar for fibbo
0
7K
Member Avatar for adam80

Hi Experts, I am working on the project that is going to be complate in some days. I want to limit trial usage of program for 1 month. I am succeded to do it. If trial period expired the program doesnt work and prints warning messages. I want to add …

Member Avatar for adam80
0
2K
Member Avatar for maxrio

Hi! im trying to make a procedure wich saves what is on screen in a variable defined on the data segment (antes dw 2000 dup (?)). It compiles well but it freezes the program when it is called by it(program). BTW: this program is in textmode 80x25 16-bit and i …

Member Avatar for maxrio
0
360
Member Avatar for swathys

hi, this is my connection string to connect to mdb file but i'm getting error as remark in red... i create the password using open exclusive method and i generate the p/w. i guess its the way i connect using username and p/w but I have no idea what i …

Member Avatar for swathys
0
228
Member Avatar for leo88

hi, i wants to ask some string problems, as below: string []first 1 2 3 4 5 1 4 5 1 3 4 5 string second="2 3"; [code] double sum=0; foreach(string a in first) { if( ) // what should i write here? { sum++; } } [/code] In program …

Member Avatar for leo88
0
101
Member Avatar for nssltd

Hello, Hi i have been just looking at C++ games programming and i have bought a book and learned the basics of C++ aswell as some indepth games programming. I have been thinking of developing a small game with physics and stuff but for physics i'd like to use the …

Member Avatar for DarKKendO
0
142
Member Avatar for ggeoff

Hi I am using the PHP include statement to enable publication of a piece of news. The news is filed as "news.txt" and the user has access to a directory to upload the file or delete old news but no access to the code. If the file does not exist …

Member Avatar for diafol
0
211
Member Avatar for sergent

I am trying to allow user to input something while there is time so I took a function sleep() that I found somewhere and changed it for input. Well, it doesn't work. [CODE] char sleep(clock_t wait) { char c; clock_t goal; goal = wait + clock(); while(goal > clock()) { …

Member Avatar for sergent
0
2K
Member Avatar for Christoph928

I'm relatively new to this and need help counting the number of times a user provided word appears in a user provided file this is what I got:[CODE]#include <iostream> #include <fstream> #include <string> using namespace std; int main() { ifstream infile; string str, filename; int count, num; count = 0; …

Member Avatar for bharathmakawana
0
176
Member Avatar for venomxxl

I'm writing a pure C game engine. I assert every pointer returned by malloc() in my code. Now I'm writing a function that will "slice" a loaded texture into new textures (parts of the parent texture). The parent texture is loaded correctly (other textures loaded by the same loader were …

Member Avatar for venomxxl
0
325
Member Avatar for avinash_545

Dear All, I am working on an assignment. I am using graphics.py to draw polygons and so on. My problem is that I have to get the pixel color under getMouse() or just get that pixel color. Can you all please help me with it.

Member Avatar for TrustyTony
0
104
Member Avatar for hercx

hey everyone need to set focus onto a text box when the tab key is pressed because at the moment the focus jumps all over the place lol any help greatly appreciated

Member Avatar for hercx
0
101
Member Avatar for gerard4143

How do you initialize a dynamic structure that has a const data member? I can provide an ugly hack but I'm at a loss as how to do it correctly. Actually, can you do this in a platform independent way? [code] #include <stdio.h> #include <stdlib.h> struct mys { const int …

Member Avatar for Narue
0
164
Member Avatar for debasishgang7

I am using a XXS filter function to filter unwanted code.Here is my function xxs.php [CODE]<?php function clean($data) { // Fix &entity\n; $data = str_replace(array('&amp;','&lt;','&gt;'), array('&amp;amp;','&amp;lt;','&amp;gt;'), $data); $data = preg_replace('/(&#*\w+)[\x00-\x20]+;/u', '$1;', $data); $data = preg_replace('/(&#x*[0-9A-F]+);*/iu', '$1;', $data); $data = html_entity_decode($data, ENT_COMPAT, 'UTF-8'); // Remove any attribute starting with "on" or …

Member Avatar for debasishgang7
0
1K
Member Avatar for Danny1994

Hello guys, im using this function : [CODE] //All Includes of my project #include <windows.h> #include <iostream> #include <fstream> #include <string> #include <direct.h> #include <urlmon.h> if (!File::Exists("c:\\MySettings\\Items.txt")) { URLDownloadToFile(NULL, ("http://download1225.mediafire.com/x6i9klhsm3dg/q6z21pgg9t5t6dn/Items.txt"), ("C:\\MySettings\\Items.txt"), 0, 0); }[/CODE] And i get a compiling error : [I]Unresolved external symbol ""extern "C" long __stdcall URLDownloadToFileA(struct IUnknown …

Member Avatar for Danny1994
0
2K
Member Avatar for shuzay8

hi everyone, i'd like to know of any websites or software that helps in c++ flowcharts. thank you

Member Avatar for jonsca
0
97
Member Avatar for Silent-Regret

Okay, I have a table called InGameTime with the following columns: CharName varchar(30) InTime datetime OutTime datetime HH int MM int SS int I am trying to make a trigger, that will once data is updated, it will update the HH,MM,SS to add the total hours, minutes, seconds spent in …

Member Avatar for Silent-Regret
0
239
Member Avatar for Sarama2030

i'm working on this project in asp.net in conjunction with vb.net.the thing is code behind is just not getting fired, well it used to but then it stopped. I'm using visual studio 2010 ultimate edition as my editor and of course IIS as my web server. I really don't get …

Member Avatar for Sarama2030
0
186
Member Avatar for chico9

[CODE] public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((temp1== null) ? 0 : temp1.hashCode()); result = prime * result + ((temp2== null) ? 0 : temp2.hashCode()); return result; }[/CODE] I don't really understand about haschodes, yet, so I …

Member Avatar for chico9
0
355
Member Avatar for triumphost

Can someone help me with this? I No matter what I do, when I press F9, the message box pops up showing F9, But when I press F10, the message box for F9 pops up.. Is it because MSG msg and MSG msg2 are the same?? How do I fix …

Member Avatar for triumphost
0
137
Member Avatar for hercx

Can anyone help with this i am trying to populate a combobox with the returned values of an SQL statement from an access database the statement returns the values that i want but don't know how to pass the values into the combobox. SQL statement SELECT DISTINCT Stock_Name FROM Stock …

Member Avatar for hercx
0
261
Member Avatar for Clinton Portis

Trying to make a quick little tool in response to the [URL="http://www.msnbc.msn.com/id/42348642/ns/technology_and_science-security/"]FBI's request for assistance[/URL] on cracking a code.. getting an error that takes me outside the scope of my program.. not sure what is causing the problemo. Maybe another set of eyes can help: [CODE] #include <iostream> #include <fstream> …

Member Avatar for Clinton Portis
0
245
Member Avatar for sergent

Once I was trying to create an object inside a switch statement. It looked something like this. [CODE] cout >> "Enter how many objects you want to create: "; int nofobjects; cin << nofobjects; switch(numberofobjects) { case 1: objectclass object1; break; case 2: objectclass object1; objectclass object2; break; case 3: …

Member Avatar for WhiZTiM
0
193
Member Avatar for eman 22
Member Avatar for eman 22
0
85
Member Avatar for sunny124

Hi guys, I am trying to display validation error messages when form validation fails. Currently it does display the error messages but then disappears straight away. How can I stop the page from refreshing when validation fails? I have return false in my code when validation fails but still having …

Member Avatar for sunny124
0
324
Member Avatar for tanisa

hi friends i want to do one pro. inwhich i take 2 buttons 1 as on 2 as off by clicking on the onbutton the audio file should be palyed & by clicking on off it stop the playing audiofile plz anyone can suggest me what can i do ?

Member Avatar for mahpour
0
106
Member Avatar for TheWhite

[CODE] import java.util.regex.Matcher; import java.util.regex.Pattern; public class test_regex { public static void main(String[] args) { String text = "(asdf) (123) (zxcv)"; Pattern p = Pattern.compile("^\\((\\S+)\\) \\((\\S+)\\) \\((\\S+)\\)$"); Matcher m = p.matcher(text); if (m.matches()) for (int i=0; i<m.groupCount(); i++) System.out.println(i+".) "+m.group(i)); else System.out.println("no match"); } } [/CODE] [QUOTE] Output: 0.) (asdf) …

Member Avatar for TheWhite
0
222
Member Avatar for disposable_zero

OK I'm pretty green at this so do bear with me. What I want to do is have an area where people can upload files to me. I found a script that I'm trying to make work and I've almost got it there but I'm having an issue. Everything actually …

Member Avatar for disposable_zero
0
112
Member Avatar for penguino138

So i'm transferring all the files from my mom's website and on a very important javascript file, I'm getting an unknown error on line 9. Here's the code: [CODE] /** * @package Kinetic Template - RocketTheme * @version 1.5.3 March 18, 2010 * @author RocketTheme http://www.rockettheme.com * @copyright Copyright (C) …

Member Avatar for penguino138
0
147
Member Avatar for sergent

I don't understand why goto's are so bad. I LOVE to use it in an if-else or switch to quit a loop. But everyone says they are bad and I should not use them but no one says why! Can you explain it to me?

Member Avatar for arkoenig
0
547
Member Avatar for thephpdev

I have no idea what's wrong, I googled but I couldn't find the answer :/ it's probably really obvious but i'm rather new to PSQL Statement: [CODE] INSERT INTO drop_users VALUES ('John_Bucky','John_Bucky','a83b3735814aa577651a55b7c838a6a0',02-04-2011_02:20:55,'object', DEFAULT,DEFAULT,13,DEFAULT,DEFAULT[/CODE] Thanks for your time! ~Josh

Member Avatar for thephpdev
0
93
Member Avatar for BLUEC0RE

My original plan was to pipe "ls -l", get the permission string that represented the file in question. Translate the string of 'r's 'w's 'x's '-'s into 0s and 1s then convert it from binary to octal. This seems really cumbersome and annoying and I gotta figure there is some …

Member Avatar for BLUEC0RE
0
174
Member Avatar for CrumbledCookies

I don't fully understand what is wrong with my code, it will read the first lines of any text file but then overloads and keeps displaying "0.00" and then crashes the program. I'm trying to get it to read student's last names and read their GPA scores, and the sentinel …

Member Avatar for CrumbledCookies
0
2K
Member Avatar for Climber Ty

Okay here's what I have so far... The error I receieve is below... The HCP Header File [CODE] #ifndef HEALTHCAREPROVIDER_H #define HEALTHCAREPROVIDER_H #include "stdafx.h" #include <string> #include <iostream> using namespace std; class HealthCareProvider { protected: string fullName; string profession; int yearsExperience; string companyType; string apptAvail; double bill; double fee; public: …

Member Avatar for Climber Ty
0
158
Member Avatar for msqueen082

Hi I could sure use some help. In a form of a push in the right direction. I am tryig to remove all multiple tcode (stock name) and add (if tcode is "B" add the shares and if tcode is "S" subtract the shares) them together in just one line …

Member Avatar for hercx
0
128
Member Avatar for Robert955

Hi, I am making a 2D game with XNA 3.1 where I want to make my space ship move with the arrow keys. atm when I press left or right arrow the ship rotates around its own axis. but now I want to make it fly into the direction its …

Member Avatar for Robert955
0
77
Member Avatar for eman 22

[CODE] int main(){ // I have an error in the next line read_file("F:/2nd year_2/Data structure 2/books/lecture-26.pdf"); return 0; } string read_file(char* address){ string line; ifstream myfile (address); if (myfile.is_open()) { while ( myfile.good() ) { getline (myfile,line); cout << line << endl; } myfile.close(); } return NULL; }[/CODE] this program …

Member Avatar for eman 22
0
139
Member Avatar for Rockpile

Hello, is this a bug? I get different results when I run this from command prompt and IDLE. [CODE] name = input('Hello what is your name: ') print('Hello ' + name + '.') [/CODE] From IDLE, it works correctly. The result shows as Hello Bob. If I run the program …

Member Avatar for vegaseat
2
448
Member Avatar for phpDave

Hey, header is working just fine in f.f but not in i.e. I.E. seems to clear the Query String up to index and redirect me to the index page. If I cancel out the header func. page seems to work . Here is some of the code. [CODE]if ($Result1) { …

Member Avatar for phpDave
0
115
Member Avatar for Ancient Dragon

I tried to write up a test program that uses std::copy and istream_iterator to copy one text file to another. But it doesn't work because the '\r' and '\n' in the file are lost. I've tried opening the input and output files in text mode and I've tried opening them …

Member Avatar for vijayan121
0
717
Member Avatar for caut_baia

Is this ok to do or have i forgot my manners?Thank you [code] struct A { virtual A* func()=0; }; template <typename T=int> struct B : public A { A* func () { return this; } }; typedef B<> B_int; typedef B<float> B_float; struct C : public B_int { A* …

Member Avatar for caut_baia
0
134
Member Avatar for Buffalo101

Hello, I'm trying to understand a very simple example of using html + servlets using Eclipse EE. I have an [B]index.html [/B]: [code=html] <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <title>Ze title!</title> </head> <body> <form action="MyServlet" method = post> <input type= text name …

Member Avatar for Airshow
0
111
Member Avatar for jmalbornoz

Hi, I have been programming in C for some time and now I am trying my hand at C++. As we all know, global variables are baaaaad... However, I am developing a collection of classes and I need them all to share a common variable (a time step) whose value …

Member Avatar for jmalbornoz
0
3K
Member Avatar for mg120

I am trying to seperate JTextArea colums as you can see on the pic. How can i do that any idea ?

Member Avatar for mKorbel
0
73
Member Avatar for Falcon25

Hi i'm new to C# and programming in general. First of all this site has been very helpful and I was wondering if someone could explain what constructors are to me as simple as possible. I'm teaching myself at home and the book is either not very good or i'm …

Member Avatar for Falcon25
0
80
Member Avatar for Derice

Column A (datetime) ----------------------- 2011-04-01 00:00:00.000 2011-04-01 00:00:00.000 2011-04-09 00:00:00.000 2011-04-01 00:00:00.000 2011-03-31 00:00:00.000 Column B (datetime) ----------------------- 2011-03-25 15:45:56.457 2011-03-25 15:52:37.933 2011-03-25 15:54:37.197 2011-03-25 16:05:30.023 2011-03-27 00:43:23.713 When i try to query the above record [CODE] Select * from table where A between '1900-01-01' and '2012-01-01' [/CODE] this work …

Member Avatar for Derice
0
175
Member Avatar for youvi

hello, See "ABC4_HUMAN" is a database value.i need to search this value using a character say"A" or by a word say"ABC".But i need to check this value only in "ABC4" part of the value "ABC4_HUMAN". please provide me the query using "like" operator.. thanks

Member Avatar for Stefano Mtangoo
0
100
Member Avatar for Bazzaah

Hello After some help please I have a website which links to a database. I would like to be able to echo the contents of the database onto a new page. The new page is generated with the following code; [CODE]echo '<tr><td align="left"><a href="word.php?w=' . $r['word'] . '">' . $r['word'] …

Member Avatar for Stefano Mtangoo
0
93

The End.