64,152 Solved Topics
Remove Filter ![]() | |
The following code used in productlist.php // some code manipulation to generate new values $filetodownload = 'DoubleClick to run.txt'; $filehandler=fopen($filetodownload,"w"); fwrite($filehandler,$generatedValue); fclose($filehandler); header('Content-Description: File Transfer'); header('Content-Type: application/octet-stream'); header('Content-Disposition: attachment; filename='.$filetodownload); header('Content-Transfer-Encoding: binary'); header('Expires: 0'); header('Cache-Control: must-revalidate'); header('Pragma: public'); header('Content-Length: ' . filesize($filetodownload)); ob_clean(); flush(); readfile($filetodownload); header('Location:druglist.php'); After file downloaded page … | |
![]() | CSCI-15 Assignment #2, String processing. (60 points) Due 9/23/13 You MAY NOT use C++ string objects for anything in this program. Write a C++ program that reads lines of text from a file using the ifstream getline() method, tokenizes the lines into words ("tokens") using strtok(), and keeps statistics on … |
what's the difference between these two actually ? Requesting page for the first time (or hitting enter in address bar) gives Ispostback = fasle but when i refresh my page then it sets isPostback = true, why ? it should not do like this for refreshing ? | |
Hi, Imagine a vector of structures with each structure containing various variables. struct Data { double x double y double z } vector<Data> Dataset vector<Data>::iterator it //input some data from a file into DataSet How can I iterate over this vector, comparing say, x at the nth row to the … | |
I've focused my night on better grapsing authentication security and believe I have made good progress. To date I have simply relied on SHA1 hashing and prepared statements - not much, right... So I knew it was time to pick up some new skills. What I came across was very … ![]() | |
How do i compare the months from database where my database records are stored in date format (12/12/2013) Ignoring the days. For example This Month `12/08/2013` Next Month `12/09/2013` if both are match, i will return my true else false? protected void renewCurrentBudget() { Boolean renew = true; DateTime nextMonth; … | |
So I 1. downloaded the odbc drive from the oracle site, "Connector ODBC 5.2" 2. created a user datasource that tested successfully in ODBC Datasources Administrator 3. created a new db in access 4. External Data->More->odbc database->Link ..., selected the datasource i created and got "ODBC - call failed" Data … ![]() | |
I'm making a class dataset. In it, I'm trying to set the minimum max and the mean. In my given test, I am asking the user to input as many grades as they would like so what I did, for example in minimum is this.. class Dataset(object): def __init__(self, grade): … | |
At the moment I am trying to decide which book to buy, there are many that I think would be very interesting, but some are most likely beyond me. The books in my list, along with my thoughts on them are: Concrete Mathematics (I believe this is probably too advanced … | |
max <- 0 for(i in 1:1000){ x1 <- runif(1:10, 1) x2 <- runif(1:10, 1) x3 <- runif(1:10, 1) z <- (exp(x1)+x2)^2 + (3(1-x3)^2) if(z > max) max <- z } print(max) This has to print maximum number between 1 to 10000 and 'z' is the formula. I am getting error … | |
combo box: how to get values associated with it..please help in minutes please.....:-| | |
Hello daniweb community i'm new here and glad to join this amazing website. Well want I need to understand is how I learn to become a competent computer science major and learn to write code very well. I have always had a knack for this and I love it alot … | |
Hello, having a hard time using my Faculty class, where I have to initialize/createObject from my Education class to Faculty. I would like to use the constructors from the Education class, to be implemented to my Faculty class. Here is my attempt Here's my two codes. public class Education { … | |
HI I am trying to make a dll file that performs its tasks using CUDA library. Here is a simple version of my code: CUDADll.cu ` #include <iostream> #include "cuda.h" #include "cuda_runtime.h" #include "device_launch_parameters.h" __global__ void test(int a, int b, int* c) { *c = a+b; } extern "C" __declspec(dllexport) … | |
I have a tab control with three tabs and I have added a datagridview to each of the first two tabs at design time. Programatically, when the second tab is selected, I am attempting to create columns and add them to the datagridview on the second tab. However, they show … | |
Hi, i'm working on a system rate analysis.I just worte the code using oop. i worte a code that inserts a record into the database.when i try to insert a data nothing happens.Please fix my code. //this code is defined in a class Public Function AddWorkItem(ByVal workitemNumber As String, ByVal … | |
I have created a method that changes individual rows back color based on certain criteria within the grid. I have noticed that when clicking the column headers that the grid resets the formatted rows. I would like to know what the best solution would be without impacting performance. | |
con = Connect.ConnectDB(); String sql = "insert into table1 (" +"StudentID," +"FirstName," +"LastName," +"Contact Number," +"E-mail address," +"CarNumber)" + "values("+txtid.getText()+ ",'"+txtname.getText()+"','"+txtlast.getText()+"','"+txtnumber.getText()+"','"+txtemail.getText()+"','"+txtcarno.getText()+"')" ; try{ pst = con.prepareStatement(sql); pst.execute(); JOptionPane.showMessageDialog(null, "Saved"); } catch(Exception e){ JOptionPane.showMessageDialog(null, e); } can any one help me with this? im getting syntax error in insert into statement … | |
I bought a book to help me learning WCF. Lots of people complained that the book was written for VS 2005 at first then there was a reprinting for VS 2008. What it seems is that the code for VS 2005 would not work in VS 2008. I'm wondering why? … | |
> I want to create a program that will calculate the day easter will be on. The user will type in a year and then the program should calculate the day easter will be on. I'm having trouble understanding the if/else and how i can use that with the code … | |
So far I can compute and update seperately a specific row when type it in a text box. What I want now is to read and update rows automatically up until the last record. Imports System.Data.OleDb Public Class Form1 Dim MyConnection As New OleDbConnection("provider=Microsoft.ACE.OLEDB.12.0; Data Source=G:\Raw Data.xlsx; Extended Properties=Excel 12.0;") … | |
ok we know that .net app cannot be directly converted to machine code, first it si compiled to MSIl which is converted to machine specific code by JIT on request, once but what about asp.net app ? e.g. i decelop a web page and put it on my laptop (working … | |
can i host a website from my laptop ? like i have developed a lot of web sites and few are online on servers via free hosting sevice but if i want to serve it from a laptop, so it possible ? i mean making my laptop a live server … | |
Hello, I'm trying to move listView items (1 selected item only) up & do, but only inside the group, I've trying and search but haven't been able to quiet figure it out, this is what I got so far: Just for going up: if (this.listView1.SelectedItems.Count > 0) { ListViewItem Selected … | |
Evening Sirs! Well I have a quiet emberrassing problem caused by i don't know what, but I would like to get rid of this issue. I have a login with session open every .php document. But when I try to open the following file, it stops my session. This is … | |
I have a question hw can i ad 18 years to the folowing date $rowy_geboorte_datum = new DateTime($rowy['geboortedatum']); $geb_dat_echtgenote = date_format($rowy_geboorte_datum, 'd-m-Y'); $rowy['geboortedatum'] is from a mysql data table and could even before 1902 as example 1820-06-10 thanks in advice John | |
whenever i open phpmyadmin it showing that access denied and #1045 - Access denied for user 'root'@'localhost' (using password: YES) phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should check the host, username and password in your configuration and make sure that they … | |
I'm about 80% into my first attack on JQuery/AJAX... how would one correctly write this function: function reloadResponses(){ $('#responses').load('pages/community/load-responses.php?id=<?php echo $id;?>'){ window.setTimeout(reloadResponses, 10000); }; }; I would like to reload `<div id="reponses"></div>` every 10 seconds. Is this the best way? I am currently using this to reload the div every … | |
Hi need some help. Some time ago I created a database and tables doing a tutorial. After I deleted the tables(don't remember why)and now all I have is a database with no tables. Trying to clean up my db I wanted to drop the DB but get this error: ERROR … | |
Tadaa! This is my first attempt at writing in Python, trying to solve a good question posed [here](http://www.daniweb.com/software-development/python/threads/32007/projects-for-the-beginner/17#post2016892) #----------------------------------------------------------------------------------------------- # # Python 2.7 # # Calculating area and radius of polygons with known number of sides and the length of this side # Adapted formulas used from this site: http://www.mathwords.com/a/area_regular_polygon.htm … | |
Hey guys, this is my solution to a simple problem and I was looking for some feedback on my code. Please post any criticism you may have about it. //Test project for string to binary conversion// #include <iostream> #include <string> using namespace std; void binConvert(string ConvertMe){ int ArraySize = ConvertMe.length(); … | |
Hi, thanks for looking at this post. I have searched and experimented and after hours of getting really close I have finally admitted to my self that I'm going to have to stop and ask directions! So, I want the browser address http://drivingmeinsane/Join to be re-written to http://drivingmeinsane/?page=Join I've come … | |
Hi there, i am new with asp.net and i would like to start with it!!! I was wondering if anyone could suggest me any good and easy to understand tutorial where i can learn how to make a list from sql and edit the record in a new page (add, … | |
Hello Experts, First I want to thank you all.I am getting all responses at this Daniweb :) My problem is that I have a sql statement where I want to add where clause in case of dropdown is changed. My database connection part: <asp:AccessDataSource ID="AccessDataSource1" runat="server" DataFile="~/_database.accdb" SelectCommand="SELECT * FROM … | |
How do I check if a query has returned a value or not because this isn't working? I swear I have done it before but I can't work out why it isn't working. echo "<form action = 'NoughtsAndCrosses.php' method = 'POST'> <input type = 'text' name = 'game_search'> <input type … | |
I am currently having difficulty in testing a condition if a certain button do not have a text on it. For example i have a button in an array named btn[] and a textview(JLabel) named "tv", if i execute this code, nothing happened. if(btn[1].getText().toString().isEmpty()){ tv.setText("Okay"); } i also tried these … | |
What do I need that I can add a reference to System.Windows.Controls namespace? | |
how to make auto numbering for an ID? but id has been given an initial value, examples of initial value: 100027 how to make the ID is automatically incremented by 1? thanks, | |
I have a dropdown box to choose topics from a discussiob board so i can then view all the replies for deletion etc. At the minute when I choose a topic i then press a submit button and get all the answers. But is there any wayt i could have … ![]() | |
Hi Guys, Been talking to a friend about my code I have been working on.I could not figure out how for the life of me to check whether an email or code in my database is already in use. So just to cool down for a bit i put conditions … | |
Sorry I´m new to PASCAL and I´m using Lazarus to program for Windows CE I dont know why I´m getting the error Error: constructors, destructors and class operators must be methods I have my Unit1 where I´m declaring my form procedures as bellow unit Unit1; {$mode objfpc}{$H+} interface uses Classes, … | |
Hello Experts, I have a dropdown list which is taking information from a database in which i used as per below SELECT DISTINCT * FROM [Devices] but still it shows multiple same values.I want that the values are unique.How should I fix it ? I already clicked -return only unique … | |
I have a winform that uses a reportviewer to show a list of records. The form load correctly shows all the records in the dataset. The form also has a ToolStrip across the top of the form that allows the user to enter four pieces of information to search by. … | |
I am dynamically creating a Form Popup, and populating it with a variable amount of buttons. (it reads a directory and creates a button for each folder in that directory). I have assigned the button.Name of each button to be the name of the directory. My code to do all … | |
Here is a plan for a (relatively) random numeric dictionary I've put together. I'm hoping that people can help me refine the plan so that I can start incremental coding: #! usr/bin/env python # creates a random dictionary from random import randint # user inputs maximum length of dictionary # … | |
write a program that gets a score from a player and rates it based on the following given a score 0-999,the program should display message 'nothing to brag about' 1000-9999 display message 'good score' if score is over 9999 the program should display the message 'very impressive' if score is … | |
Hi there, I am working on a chart generator application and I'm using google chat as a chart tool. You have to pass different parameters to chart script that you want to show on chart. I want those parameters to be dynamically change. Say there are 20 different parametes showed … | |
I have a problem with one of my php scripts. I've got a file called view.php. If I go to test.com/view?id=7575 it comes up with a 404 error. However if I go to test.com/view.php?id=7575 it works. Why is this? | |
Hi I used below coding for create a excel sheet.I got from on web site. In below coding there is no problem.Its create the excel file.If i run second time,its ask to overwrite the current excel file.If I said "Yes" then it ok ,but If I select cancel button,its generate … | |
Hi, I have a class called "car" with - I have no ideia how to say this in english - "data members" as the following: Public pneu As classDoor Public mat As classTire Public length As Double And so on. All the related classes have null constructors. I have a … |
The End.