199,114 Archived Topics
Remove Filter ![]() | |
For class, I had to write a simple program that would calculate the surface area and volume of a torus. I did that, but my answers are long decimal numbers. How do I get the answer to round off? Thanks in Advance | |
Does anybody have a good example of a Functor in Python? | |
#include <iostream> #include <string> /*i want to compare string and char as char is a subset of string*/ string S [50]; //algorithm is somewhat like: i=0; while(i<23){ char c = (char) i; S[i] = c; } for(i=23;i<50;i++){ S[i]="hello"; } //i want to check how many hello are there i=0; x=0; … | |
I have been developing window form applications for probably the last 4 or 5 years, and have drasticially improved my UI designing, which I am rather proud of, as it's a art form you might say. A whole thing of its own on top of development. But while I have … | |
I want to build an simple android download app without using download manager. I try to implement it with asynctask. But I don't know how to implement "pausing and resuming when Based on the internet condition". That is when I click the start button, it start to download if connected. … | |
Hello, sorry for the rudeness for asking for help on the first post but I'm still a beginner in programming. I am trying to create a GUI for plotting function using Tkinter and Python. In the top a label will show the current position of the mouse in the canvas … | |
I cannot get this table to work even though i hav eit working PERFECTLY in 3 other instances, now what i dont get is it seems to be a connection issue between the database and the form, now that makes some sense to me. What doesnt make sense is when … | |
The following is a part of a hailstone cpp program. I want to write an option to let users enter 2 numbers and the program evaluates the longest sequence the number has within the 2-number range and return the count. I have been struggling it for hours :P but the … | |
Greetings I'm using InstallShield for deploying projects and I'm new in using it I need to know how to include some applications and executable files to be installed while installing my application what I mean is that I need to include for example the .NET framework 4.0 so if it … | |
![]() | Hey guys, I need some advice. Basically I want to know what is the easiest way to do this. I have a bunch of pdfs which are actually generated from excel as A4 documents and I want to be able open the pdf in a web browser, have the user … ![]() |
hi, i have placed a table between a web page which display details of a user dynamically. Here is the code for it <?php $con=mysqli_connect("abc.com","avc","abc","abc"); // Check connection if (mysqli_connect_errno()) { echo "Failed to connect to MySQL: " . mysqli_connect_error(); } $result = mysqli_query($con,"SELECT * FROM employee"); echo "<table class='table … ![]() | |
c++ program that will convert between function kilogram to convert pounds to kilogram, a function celsius to convert temprature in dgrees fahrenheit to degrees celsius, A function fahrenhiet to convert temperature in degrees celsius to degrees fahrengeit. [Click Here](null) | |
Hey everyone. In stumped. How would you take a string and verfiy it is a word? Example: String a = sldkjf String b = dog The results should be, "dog" is a word and "sldkjf" is not. Any direction would be greatly appreciated. | |
Hi all, I have an ArrayList that contains 70 items. I would like to display these items in Listview. Therefore, I used the following code. However, When I press the button, program will only display the first seven items in the arrayList. The rest of items are not being displayed. … | |
I need your help i'm using access database create simple login form in the database record Username is Admin or Password is Admin so i wanna need this add username and save record ask me record already available how to do this on vb.net 2010 or 2012 looks like this … | |
Hello everyone!!!! I need some help to make a condition that if a user will select or click more than 1 button, there would be a MsgBox("You can only select one seat for every Process") appeared.... The scenario is this: I have 5 buttons(A3, A4, A5, A6, A7) and on … | |
quick question how can I work around this char * dat = "08/11/2014"; char test[10] = dat; I need to be able to take a string and put it into an array of chars, how can i do this? | |
I am using PHPASS to store password encrypted and compare when login. here is the code ob_start(); $userName = $password = ""; $userNameErr = $passwordErr = $loginErr = ""; $hasher = new PasswordHash(8, false); if (isset($_POST['subEmployee'])) { if (empty($_POST['user_name'])) { $userNameErr = "User name is required"; } else { $userName … ![]() | |
Hello, I need to create a PHP script that reads some of the fields of an RSForn and creates a QR code with them. I've been doing a little bit of research and I've found a PHP library that may suite my needs: http://phpqrcode.sourceforge.net/. Now the question is how do … ![]() | |
How to get the position of a device that is connected to the network but there is no internet connection? The connection is wifi. I can't use GPS because it uses internet and i don't want to use the cell network data to get the position. Is there a way … | |
<?php require_once("../includes/session.php");?> <?php require_once("../includes/connection.php");?> <?php require_once("../includes/function.php");?> <?php confirm_logged_in();?> <?php require_once("../includes/validation_functions.php");?> <?php if(isset($_POST['submit'])){ //process the form // often there are form values in $_POST $product_name = mysql_prep($_POST["product_name"]); $product_amount = (int) $_POST["product_amount"]; $visible = (int) $_POST["visible"]; foreach($_FILES['files']['tmp_name'] as $key => $tmp_name ){ $file_tmp =$_FILES['files']['tmp_name'][$key]; $uploaded_dir = "images/"; $filename = $_FILES['files']['name'][$key]; $path = … ![]() | |
On the Page_Load of my action page, I'm getting the form variables like this `string name = HttpContext.Current.Request.Form["Name"];` I then have two functions that use these variables. In the first function, I'm inserting the values into a database and get an error that the procedure expects a parameter that wasn't … | |
I am learing c# and confused on streams What are they?? Arey they used to store data or transfer data ?? Pls explain in very simple words | |
i am a student of computer science , i like to be a software application developer , but i am confused still about be ** a java software developer or .Net software developer**.....because in Pakistan 1) .net jobs are more ,2) .net application takes less time to compute,3) mostly people … | |
I got everything until to the point that check if the space is emprty or not. I dont know how to do it. can someone give me an example? | |
![]() | Anyone knowledge with reading binary file intro struct? I got weird error.. The first line is correct but then its only trash.. http://s14.directupload.net/images/141003/nz6k6cd2.jpg it starts 1,0,450 and then it should be 2,450,1200 3,1200,xxx and so on. Load file function: bool CNtlFileSerializer::LoadFile(char* pszFullPathFileName, bool bCrypt /* = FALSE */, char* szCryptPassword … |
I have a curious issue with Twitter bootstrap, I include the bootstrap.js , but my popovers and tooltops dont work? `<button type="button" class="btn btn-lg btn-danger" data-toggle="popover" title="Popover title" data-content="And here's some amazing content. It's very engaging. Right?">Click to toggle popover</button>` All my other js stuff works fine, I have a … | |
Hello... I have three textboxes on a form. The first two are for entering numbers for addition. And the third is for displaying the result of addition. I want the result of addition to appear in the third textbox as soon as I enter the numbers in the first two … | |
Hello I have a text-editor (CKEditor one) whereby am retrieving all the texts (which are in 3 paragraphs), in a single string variable, using Java codes. However, all the 3 paragraphs being retrieved have leading spaces, and I want to remove them for display purposes. How can I do so, … | |
Hi all, I have a data grid that need to be with the same width of the windows that it is showing, but for some reason i can matain that width. Can anybody give a hand here. Best Regards | |
I have this PHP code that creates a QR code with the given data: <?php include(JPATH_LIBRARIES . '/phpqrcode/qrlib.php'); $tempDir = JPATH_SITE . '/images/'; $codeContents = 'This Goes From File'; $fileName = 'qr_'.md5($codeContents).'.png'; $pngAbsoluteFilePath = $tempDir.$fileName; $urlRelativeFilePath = JUri::root() .'images/' . $fileName; if (!file_exists($pngAbsoluteFilePath)) { QRcode::png($codeContents, $pngAbsoluteFilePath); } else { echo … | |
hi guys. so i have this page that i have setup so the data gets submitted without refresh although the message saying data has been added is displayed, no data is submitted into database. I need a pair(or more) of fresh eyes. please and thank you. form: <form id='addspouse'> <fieldset … | |
There are no errors or anything in my code, and the program runs and works. However, when I only enter a value in one of the text fields to test the error message, it enters "0" in all of the text fields below it. How can I get it so … | |
I have an Access Database on which I have tables with similar structure and columns name columnA and columnB.I can use the below query on tables created design time to get this output. Table | result -------|-------- SELECT "Table1" AS Table, SUM(a) - SUM(b) AS Result FROM table1 UNION SELECT … | |
HI and good day to all, Since my 2nd year of my uni life, i have hardly touch C++ programming especially OOP in C++.Now starts my revision on C++ OOP. Since I have forgotten many OOP knowledge there is a question I wish to ask. Below is my code. #include … | |
I have this script that will NOT work no matter what i add to it, i have fopen not working and i believe that is the root of all my other errors but i cannot be sure, i originally had 8 errors but 4 of them were simple notices for … | |
Ok so here's the thing my classmate did a very good html file...this is the basis of the design of our homepage...there is a part where I should put the news on a collapsible group blah blah..i need help Here's the query to show news and events(nevermind the paginator Im … | |
i want to show a video from a url that its stored on the database. What am i doing wrong <object width="620" height="320" data="<?php echo $profileurl;?>"> </object> the string works because when i use it it appears e.g. https://www.youtube.com/watch?v=DbVkiN0Zip4 | |
can someone give me a detailed explaination why this won't compile, thanks` #include <iostream> using namespace std; int main () { int num1 = 5, num2 = 10; if (num1 < num2) { cout<<”num1 is less than num2”; else cout<<”num1 is not less than num2”; } return 0; } | |
If I have a form as in the below script: <html> <?php session_start(); $con=mysqli_connect("localhost","root","","QSTNS"); if (mysqli_connect_errno()) { echo "Failed to connect to MySQL: " . mysqli_connect_error(); } $dsply=$_SESSION['q_indx'][$_SESSION['cindx']] ; //echo $dsply ; $qstn = mysqli_query($con,"SELECT * FROM qstns where qid = '". $dsply ."'"); $qstn = $qstn->fetch_array(MYSQLI_ASSOC); //echo $qstn['qname'] . … | |
What is wrong with my java code in Eclipse? I have 4 different classes and it won't give an output. the problems are in the scorestest with the print function and in scores with the nodes. Please help. ScoresTest: public class ScoresTest { public static void main(String[] args) { // … | |
I downloaded daily build and did python3 setup.py build and then python3 setup.py install So far so good! I tried import wx and no errors I tried to run the program [here](http://wiki.wxpython.org/Getting%20Started#Getting_started_with_wxPython) and all I got was the error below. Have anyone got wxPython working with Py3 especially on Linux … | |
hi im having a hard time fixing and identifying the problem. sorry abstraction really confuses me. the problem is I should write a weather prediction program using the random number generator. three outcomes should be possible: rain sun and cloud. import java.util.Random; public abstract class WeatherPredicMain { public static void … | |
how can i stop looping sound in c# (visual studio) if (ConditionTrue) { SoundPlayer simpleSound = new SoundPlayer(@"C:\Users\BIB HUTI\Desktop\beep.wav"); simpleSound.Play(); } // it keeps playing and never stops. | |
I have a simple class named as Invoice, in which I'm taking four instance variables to intialize PART NO, PART DESCRIPTION, QUANTITY PURCHASED & PRICE PER EACH ITEM. I have made getters and setters for each variable, also a method is created in the same class as InvoiceAmount which Calculates … | |
hello i have a php file named index.php. within that file two php scripts are there ... they have to share four $variables values with each other...how coud i do this?? global,superglobal or static??? ` | |
Okay so Im gettin an error of Fatal error: Call to a member function fetch_array() on a non-object in C:\wamp\www\Usersearch\search.php on line 54...Im trying a tutorial on AJAX live search...http://ninetofive.me/blog/build-a-live-search-with-ajax-php-and-mysql...I only replaced the database connection to my own database... here's the Usersearch.php <?php /************************************************ The Search PHP File ************************************************/ /************************************************ … | |
How do I use pipes to communicate with another proccess that is being run using an execl command? I know how I can send info to that process but how do I get info back from that proccess? Some more information on what Im trying to do: I am trying … | |
An international courier, express and parcel Services Company is setting up a package shipping system for customers to ship packages. Whenever a customer wishes to ship a package, they can call the company’s customer service personnel to place a shipment request. A computer system is needed to track the shipment … | |
Hi all,have this code: Hi all,have this code: How do i implement binary search to display item.. found at index.. #include "stdafx.h" #include<fstream> #include<iostream> #include<string> #include<iomanip> using namespace std; struct sDetails{ int kNum; string Name; }; int _tmain(int argc, _TCHAR* argv[]) { sDetails students[5]; ifstream infile; infile.open("student.txt"); for (int i … |
The End.