64,152 Solved Topics
Remove Filter ![]() | |
thus iterators predefined functions? I am confuse between function and predefined functions. | |
Hi there, Here is the problem: I have a Text file with several hundreds of lines and I want to store line 100 to 200 in another text file. I wrote the following piece of code but result is all of the lines not just the ones that I need. … | |
Hello, Is there someway that I can randomly assign an x y and z axis to a geometirical object? Any programming language is fine just need some insight. Thank you, Suhail Rawal | |
Hi, I'm trying to display a message in the compiler output using VS2010. In C/C++ we can use:[icode] #pragma message(">> Win32 <<") [/icode], but for C# I'm not really sure what options are available. | |
Why do I get: Traceback (most recent call last): File "./2csvtbl.py", line 31, in <module> print row[k], row[-k] IndexError: list index out of range after running this code: #!/usr/bin/env python import csv import random alpha = 'abcdefghijklmnopqrstuvwxyz' e = range(0,99) x = random.sample(alpha,14) y = random.sample(e,14) c = csv.writer(open("test2.csv", "wb")) … | |
Hi, I am starting to learn C programming. I recently stumbled across a structure below #include <stdio.h> #include <stdlib.h> [CODE] #include <stdio.h> #include <stdlib.h> typedef struct { int value; } fteid_t; typedef struct { fteid_t *fteid; // Optional Ins 0 } context_t; typedef struct { context_t default_bearer; } send_request; [/code] … | |
I'm using jpgraph to generate GPA chart. the x-axis is for the GPA value, while the y-axis is for the year/semester. my problem is : i fetch the value for both x-axis and y-axis element from the database. i pack all elements in an array variable using array_unshift(). everything is … | |
Hello,,, Hi,can you help me please i apologize if i post here.I don't know if i get the right forum to post.... Here is my problem in the IBM DB2 i created the database and i have 4 tables,but the problem is i forgot where did i make the foreign … ![]() | |
Hello, I have this code [CODE]#!/usr/bin/env python import csv import random alpha = 'abcdefghijklmnopqrstuvwxyz' e = range(0,99) x = random.sample(alpha,14) c = csv.writer(open("test2.csv", "wb")) c.writerow([x]) cr = csv.reader(open("test2.csv","rb")) for row in cr: print ', '.join(row) print "How many rows?" l = input() k = 1 while k < int(l): y … | |
can anyone tell me how here the count of [B]st[/B] is [B]incrementing[/B] like this[B] 2,4,6,8,10 and not like 1,2,3,4,5 [/B] how could i get the count of [B]st[/B] to increment as [B]1,2,3,4,5[/B] [CODE] PrinterJob printJob = PrinterJob.getPrinterJob(); Book book = new Book(); for(int i=0;i<5;i++) { book.append(new IntroPage(), printJob.defaultPage()); } [/CODE] … | |
[B]I have one select list, which is populated from the DB like this:[/B] [CODE] <select name="position" id="position" onChange='itemdisplay(this.value)'> <option value="<?php echo $til_subject; ?>"><?php echo $current_subject; ?></option> <?php while($row=mysqli_fetch_array($result)){ echo '<option value=' . $row['id'] . '>' . $row['linknavn'] . '</option>'; } echo "</select>"; ?> // Next to this list i have … | |
[CODE=php]<?php session_start(); if(!isset($_SESSION["username"])) { header('Location: login.php'); exit; } ?>[/CODE] I have this code on the page I want to be password protected. Everything is working perfectly fine on Firefox, but in Internet Explorer it doesn't load the content of the page once the login information has been verified. Any suggestions? … | |
Hello everyone! I want to write my connection strings and functions in a class and always call the class when i need to make a connection to my database to avoid code repetition and increase code reuse but i have an error. Here is my code below [ICODE]Public Class ConnectionString … | |
it doesn't have any error but also i doesn't update in my database? <head> </head> <?php include('connect.php');?> <body> <?php mysql_select_db("dbusers",$connection); $result=mysql_query("UPDATE tblinfo SET idno='$idno', name='$name', address='$address', birthdate='$birthdate', contact='$contact', email='$email' WHERE 'index'='$id'"); $result = mysql_query($update) ?> </body> </html> | |
Hello everyone, I am developing a form in VB.Net and ASP.Net that enables a user to grab data from a SQL Server 2005 Express database and display the data on the screen depending on the search criteria that they provide. What would be the best way to go about doing … | |
My java application has been running smoothly for the last 2 years in one linux server. Recently, we moved it to another linux server and it's then that it started giving the error as shown below: [CODE] java.sql.SQLException: Prepared statement needs to be re-prepared at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:946) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2870) at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1573) … | |
Here is simple form contain multiple checkboxes options and textarea input: [CODE] <form method="post" name="form1" action="<?php echo $editFormAction; ?>"> <table> <tr><th colspan="2">BREATHING CIRCULATION</th></tr> <tr><th>#</th><th>Instruction Name</th></tr> <tr><td><input name="InstrCheck[]" type="checkbox" id="InstrCheck" value="Respirations normal rate"></td><td>Respirations normal rate</td></tr> <tr><td><input name="InstrCheck[]" type="checkbox" id="InstrCheck" value="Respirations effort normal"></td><td>Respirations effort normal</td></tr> <tr><td><input name="InstrCheck[]" type="checkbox" id="InstrCheck" value="Breath Sounds-normal"></td><td>Breath Sounds-normal</td></tr> … | |
Hi All, When I run this script using bulk insert i got an error message but when I try the first 6 records there is no problem. can anyone give the reason and what is the problem? [CODE]Use chrisMartin Bulk Insert SampleTable_Jonel FROM 'c:\planning\ProductRecoveryDataFeedytd_3.csv' --Sheet 1 With ( DATAFILETYPE = … | |
Hey, this code accepts data (type int) into a 4 by 4 array. im using 1234 as an example when entered, the data would be stored as: 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 the code the rotates it once to … | |
Hello. Does anyone know why strip_tags() is apparently returning an empty string in the code below? If I get rid of the strip_tags(), it works, but with strip tags, it displays the message about no ticket number being entered. I'm just sending it "http://[omitted].php?ticketNum=1", so there aren't even any tags … | |
I'm impressed with Aptana Studio 3 and it is wonderful. I have decided to go back to eclipse after years of using Netbeans. In NB I was having option of [B]separating my files from project meta data [/B]but I cannot find how to do it with AS. Also in Netbeans … | |
Hey everyone, I'm getting familiar with TkInter, and while it's a cool program, I'm having a hell of a time with keeping all the classes straight. As of now, I'm trying to build a program with a menubar and some other widgets. I can get the program working if I … | |
hello: I'm trying to modify the following query so that it only select rows where [code]90 - DATEDIFF(CURDATE(),date) as days_remaining[/code] is greater than negative 15. (days_remaining > -15) [code]$query="select servicearea, date, customerid, clientID, 90 - DATEDIFF(CURDATE(),date) as days_remaining from servicesrendered where servicearea=' Oil Change ' and DATEDIFF(CURDATE(),date) > 79 group … | |
Hello, I'd Like to do the Same thing as in this post I posted a while back. But in a Listview Control [url]http://www.daniweb.com/software-development/vbnet/threads/369754[/url] But there is no Selected rows... There is an Item Active But that did not work. And I cant find this anywhere else. Can someone help? Thanks, … ![]() | |
Hi, I have a table with 10,000 records but I only want to read 250 at a time. I know the row number of the 250 records that I have to read and so I want to avoid reading all 100,000 records each time. For example, if I want to … | |
I'm quite new to programming and I've just started Java, I'm not sure about why my program is stuck in a loop - [CODE] import java.util.Scanner; public class Tplayer { static int numplayer; static int startvalue; public static int dice1; public static int dice2; public static int bet = 20; … | |
Hello Everybody prop lame i am making a access sql helper and for writing the insert this code [CODE] Dim i As Integer TextBox6.Text &= "Insert Into " & ComboBox2.Text & " (" For i = 0 To ListBox1.Items.Count - 1 TextBox6.Text &= ListBox1.Items.Item(i).ToString() & "," Next TextBox6.Text &= ")"[/CODE] … | |
is there a way to have the text in a label scroll horizontally,if the text do not fit into the label... please help... | |
Hi all, I want to approve records in my page. For that i have created a search where data retrieves based on account_number. Now i want to approve records. For that i have created a page called [B]approve_page.php[/B]. But it seems to be applied for all the data. I just … | |
Hi, I'm not able to toggle a ui class in my page. Basically here is my code: in the jquery document.ready I subscribe to the event $("#bBuscar").hover(changeButtonBackColor, normalizeButtonBackColor); then the other two funtions are like this: function changeButtonBackColor(evt) { $("#bBuscar").toggleClass("ui-state-hover ui-corner-all"); } function normalizeButtonBackColor(evt) { $("#bBuscar").toggleClass("ui-state-hover ui-corner-all"); } the button … | |
in my access database the column "foods" has multiline text..but when i view it in datagridview in my c# form it only has single line text,,, the width and height in datagridview is not the same as in my access database... my access database looks like this [U]|primary key|[/U][U]|foods|[/U][U]|servings|[/U] 00000001 … | |
I am having problems getting my cookies to work on my site where I am using a combination of session_start, setcookie and include. I believe I have followed all of the rules by declaring session_start() as the first statement in every page on the site, however, I am also using … | |
Hi, I am working on login form.When i redirect a page its showing an error given below. Warning: Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\job\login.php:49) in C:\xampp\htdocs\job\login.php on line 50 need help. Thanks [CODE]<?php //Start session session_start(); $host="localhost"; // Host name $username="root"; // Mysql … | |
Hi can someone help in in understanding the following code esp the "?".I cant understand how the output 9:10:5 as obtained. Thank You. The code is as followed: [CODE]#include <iostream> using namespace std; int main() { short hour =9, minute =10, second =5; cout << (hour <10 ? "0":"" )<<hour<<":" … | |
Ok This is my first post on this forum, and would really appreciate some help on an assignment... I have a 2d array and I need to add up all the numbers within the rows and the columns of the array. I'm really not to familiar with arrays or for … ![]() | |
Hey there DaniWeb! I have a bit of a problem! I am in need of a way to get the size of a remote file, without download the file itself (so that i can show download status in a status bar) is this even possible? Thank you a lot, Weliaz … | |
I need to parse a csv file, whose encoding format is in utf-16 format. Actually the csv file contains the list of directories to the file. for reading i used following code BufferedReader br = new BufferedReader(new InputStreamReader(new FileInputStream(str))); But the output i got is not in the correct format … | |
Hi friends , How to post a picture with url link in the forums . please help me . if we click that picture means it will goes to my target url . how to create this link ? . pls help me | |
Hi guys.. Can anybody tell me about how to increment default session timeout(20 mins) in dot net..? It's urgent.. Hope anybody will help me.. Thanks in advance... | |
Hi All, If someone can help me with this I would be eternally grateful here. I have created a form on one page with php validation. Once cleared through the validation I have Sessioned the inputted data to catch them on the "insert data page" on the "insert data page" … | |
I wrote a program that solves graphing programs. I am still very new to c++ and mt program is very very rough around the edges but my main problem is when the function returns the value to the main function it outputs random numbers in stead of the correct value. … | |
Hi all, am using eclipse IDE.I want to connect mysql database with jsp/servlet for that i want to add mysql j/ connector. I added properties -> Java build path-> Add External jar file but still it calls the exception Driver not found "com.mysql.jdbc.Driver". Am not filmier with Eclipse any one … | |
Hi, I am using [CODE]ereg [/CODE] for validations of field and I want to allow some fields that are optional but ereg does not allow me to validate space or empty field.My code for validation is [CODE]while(list($var,$val)=each($_POST)){ if(!ereg($var,$admin_data)){ if(ereg($reki[$var],$val)) {$class="good";}//this condition is checking the values of all the fields but … | |
Hi, Recently I started working on a project (it's called 'fd') that needs to retrieve the current processes running. It is written in C using the WinAPI. I am running Windows XP SP3 and am using MinGW compiler with Code::Blocks. After much searching I found the PSAPI to provide the … | |
Hello, I'm using php code to retrieving an array from database and place the result into checkboxes but after the last checkbox input there is text input (hidden by default) and the last check box name is 'other'. I want to make the text in visible if 'other' is checked … | |
ist possible to have another if statement after the first if statement.. this is just an example [ICODE] private void button_click(object sender, eventargs e) try { if(age>5||age<=10) {massagebox.show("young");} else if(age>10||age<20); messagebox.show("example"); } catch(exception) messagebox.show("error"); //can i have another if statement here??? if(something ==eg) {messagebox.show("thanks"); } [/ICODE] | |
Just started learning MySQL, more specifically using Python and MySQLdb and everything is up and running fine. I have an interface where i generate buttons: 1) Firstly the main catagories are generated. 2) on clicking these buttons, sub-catagories of these catagories have thier buttons generated. 3) once again on clicking … | |
Dear friends I need free vertical tree menu as shown in the link (green one) [url]http://dhtml-menu.com/menu/dhtml-floating-menu-sample.html[/url] I have heard something related to FISH, fishmenu or starfish menu, I am not sure. I have seen some fish named menu, but now I am not able to find that link or forgot … | |
I am a beginner in learning Python and I am currently reading "Learning Python the Hard Way." In one of its exercises, there's a code that says: [CODE]def bear_room(): print "There is a bear here." print "The bear has a bunch of honey." print "The fat bear is in front … ![]() | |
I am going to make a calculator and I am having some Issues arranging the buttons. You should be able to see the layout when you run the code. Some clarification though there will be a blank spot under the "3" for a "+/-" button (switches between positive and negative). … |
The End.