64,152 Solved Topics
Remove Filter ![]() | |
This code wont doest display the answer why???/ #include <stdio.h> #include <conio.h> void main() { int opcode; int num[2]; int result; clrscr(); printf("Program for Addition, Subtraction, Multiplication and Division\n"); printf("Enter First Number:"); scanf("%d", &num[1]); printf("Enter Your Choice: 1 - Add, 2 - Sub, 3 - Mul, 4 - Div: "); … | |
Using Ubuntu 12.10 have been using python 2.7 and python 3.2 successfully. 2.7 is my default interpreter. Now, after installing python 3.3 it looks like the python3.3 version of "/usr/include/python3.3" was not installed (as it is for "usr/include/python3.2" . I have already done "sudo apt-get install python-dev" . I discovered … | |
This might be a very basic question but still I am not able to figure out why is the foll code giving stackoverflow exception in main?? public class HelloWorld{ public static void main(String []args) { System.out.println("Hello World"); Animal c = new Animal(); } } class Animal { Animal e = … | |
Hi, I have a problem I just cant solve. First I will explain what I am trying to do. I have a page with a menu consisting of categories of products, some of these categories have subcategories and some don't. Categories and subcategories are kept in mysql tables. The tables … | |
I wrote a code to represent the factory design pattern as below: package com.factory2; public interface CreditCheck { Double creditLimit(int id); } package com.factory2; public class CreditCheckFactory { public boolean isAgencyUp(){ return true; } public CreditCheck createCreditCheck(){ if(isAgencyUp()){ return new CreditCheckOnline(); }else{ return new CreditCheckOffline(); } } } package com.factory2; … | |
Dim oWord As Word.Application Dim oDoc As Word.Document Dim oTable As Word.Table Dim x As Integer Set oWord = CreateObject("Word.Application") oWord.Visible = True Set oDoc = oWord.Documents.Add Set rs = New ADODB.Recordset With rs .Open "SELECT * FROM ClientTable", cn, 2, 3 Dim r As Integer, c As Integer Set … | |
Iv been developing a parser using java, however due to testing on multiple machines i have errors now on one machine i corrected as the machine was using jdk/jre v1.6, and on my newer machine jdk/jre 1.7 The question i have is, what are the implications of using the String … | |
hi everyone :) what i'm trying to do is to check if word in a string has numbers in it for example: if i enter string of one word "he11o" i want to show error message that says "One or more characters are numeric! Please re-enter the word!" and if … | |
Hi all. I've been learning programming from the web for almost 2 years now and this'll be my first post ever on DaniWeb (or any forum ever). I have no experience with parallel programming but read about the simplicity of working with OpenMP, and that's what I need. Something that … | |
Hi. I want to remove lines with same text. i wrote this code, but it doesnt work. where is the problem ? $total=$_GET['name']; $keyarr=explode("\n",$total); $int=sizeof($keyarr); for($a=0;$a<$keyarr;$a++){ for($b=$a+1;$b<5\$keyarr;$b++){ if($keyarr[$a]==$keyarr[$b]){ unset($keyarr[$b]); } } } echo $keyarr[$int-1]; foreach($keyarr as $new){ echo $new."<br>"; } | |
is it necessary to include base class in the header and or .cpp file of derived class? | |
Hi Everyone, I have the following piece of code & I am trying to use to create an array of "Playing Cards" from a mysql db. I am just not sure how to one single complete array ! Thanks for looking and replying with your suggestions | |
I dont even know if this is an ajax problem, but maybe someone can help me!! I have a menu php file that containd-s categories of products, some of these categories have subcategories. I have it working that when you click a category then it shows all the products for … | |
Hello! I was wondering if someone can take a look at the following if and else statement and point out what I have written incorrectly. In its current form, I cannot get it to work. So, essentially, I'm trying to construct an if conditional statement within another if statement. $var_test … | |
Hi I seem to be lost with this form validation When submited empty the error should display next the input field in red. Thanks in advance D <?php if (array_key_exists('submit',$_POST)){ //Form has been submitted // Fields that are on form $expected = array('name', 'email', 'comments'); // Set required fields $required … | |
Hi, I've just started out with Python and I've been stuck on this problem for a few hours now trying to parse a file into a certain format.. I am trying to create a list in a list out of a list. I currently have this list; ['MPNRRRCKLSTAISTVATLAIASPCAYFLVYEPTASAKPAAKHYEFKQAASIADLPGEVLDAISQGLSQFGINL', 'MQLVDRVRGAVTGMSRRLVVGAVGAALVSGLVGAVGGTATAGAFSRPGLPVEYLQVPSPSMGRSELPGWLQA', 'etc'] … | |
Hello everyone, I am puzzled... when I run a JUnit test, there is no main method in the class and it still runs. Alo, a java/maven web app does not have a main anywhere. My assumption is that it is hidden somewhere on some class I somehow extend or something. … | |
Hello friends, I'm here with a another Question. I wants to redirect all users who are using mobile browsers to m.mydomain.com How can I do that? | |
Hello guys, I really need your help on this one, Please help me out with it I'm using a webBrowser in my application "Visual Basic 2010", And what basically it will do, Once you open up the application, It will show you a URL, let's say for example Google.com by … | |
Evening all I am working my way through Zend Framework 1.x, and seem to have an issue. I am trying to set the `doctype()` to HTML5: class Bootstrap extends Zend_Application_Bootstrap_Bootstrap { protected function __initDoctype() { $this->bootstrap('view'); $view = $this->getResources('view'); $view->doctype('HTML5'); } } I have check the documentation and using `doctype('HTML5')` … ![]() | |
Hi, I’m trying to insert multiple text fields into MySQL database. Each text field has a unique index key under a single user id. The number of indexes will depend on the user. Is this possible? I never had to do this before and I was wondering if anyone could … | |
Hi everyone! I am having troubles making the second IF statment execute in my code: Pattern dl_noise_rates_p = Pattern.compile("\\d+\\s(.+)\\s(.+)\\s(.+)\\s(.+)"); Matcher dl_noise_rates_m = dl_noise_rates_p.matcher(lineString2); if(dl_noise_rates_m.find()){ String s_dl_nr1 = (dl_noise_rates_m.group(1)); //checking for non numbers pulled in the regex if(s_dl_nr1 == "NaN"){ //| s_dl_nr1 == "NaN" | s_dl_nr1 == " NaN" System.out.println ("OMGOMGOMGOMGOMGOMGOMGOMGOMG … | |
I am currently trying to pull high,low, and closing stock data from Yahoo finance, and graph it using Turtle. I was able to pull the data from the url into a list but I can't figure out how to graph it. I know the dates have to be the x-axis, … | |
I created this to make an div containing an intro dissappear after so many milliseconds. It also has a 'skip intro' link at the bottom. Everything works fine, except, the first function seems to fire even after somebody has skipped the intro. So there's a quick flicker as the div … ![]() | |
i figured out the problem it is that Hash function generates different hash each time for same value i.e 12345 and thats why it doesn't match during login with the one that i submitted during signup. so is there any way to make the hash stable for same value e.g. … | |
Hello to everyone, I´m having problems on retrieving data from mysql to a textfield in html, the data appears with queston marks inside of a "black diamond"! I researched and followed the steps like putting the database charset utf8, the table too! When I insert for example Alimentação its goes … | |
Hi, my problem is as follows. My aim is when a user clicks 'comment' for a post, a `<div>` appears with the form, which I can get working just fine. However as moving on with my development, now when a user clicks 'comment', parameters are passed to change the url … | |
Hi, Can you set auto increment in phpmyadmin to be 2? So that it goes 1, 3, 5, 7etc? Thanks............... | |
I'm going through a netbeans tutorial on Java ecommerce located here: http://netbeans.org/kb/docs/javaee/ecommerce/setup-dev-environ.html When I get to "running the web project, step 1", I click the green run button in the NetBeans IDE. In my browser, it goes to http://localhost:8080/AffableBean, but no HTML is displayed. If I view the admin domain … | |
I've got a bit of javascript that changes the background image of a div on hover. Then, when they click on a link, the page rearranges, and the clicked menu item changes background image to show which section they're on. (the page never reloads). Unfortunately, after they click, the hover … | |
I have seen a few different ways to solve this problem, but no solution has worked for me. I am logging into a database and incrementing a hit counter when someone goes to the page. I have two files, hitcounter.php and count visits.php Count visits is used by the visitor … | |
hello. I need to dedupe e text. meaning if i have an array with stored strings, it will check and compare each row of array with each other to test if text[i]==text[i+1]. to dot this i thougt to catch the text from an input, ex:text are and consider it as … | |
i want to set a collision on my tile map using getBounds function. level class int map[][] = { {2, 0, 0} {1, 1, 0} }; 2 = player 1 = ground 0 = sky i want to set collision so player cant go though ground. so he should fall … | |
Hi friends! I got one puzzle. I wonder if there is a way I can create a table but get a table name from a value of the textbox/combo box control. Does anyone have an idea? I mean something like "CREATE TABLE (TextBox1.Text) (".....)" I wonder if that is really … | |
Some time ago, Reverend Jim gave me some good advice on dynamically creating controls with VB.net. Following the advice, I created 26 Labels (with text A-Z) and a event handler for the click event of the labels. Now I need to determine WHICH label was clicked and the text of … | |
Hi this code is to fill up my Combo1 Item which is came from my Table1 .Combo_Main_AM.Items.Clear() Dim da As New OleDbDataAdapter("Select * from Table1", con) da.Fill(dt) For Each myRow In dt.Rows .Combo1.Items.Add(myRow.Item(0)) Next so it will add up the combo1 Jessie James Nick now the question is how can … | |
Hi there everyone, I am having some difficulties getting a regular expression to work. I have a line of text with 5 numbers.I want to ignore the first number, and grab the other 4 numbers. Here is what the text I am dealing with looks like. 1681 12.33754513 7.066246057 6.079261254 … | |
In main method which should I use? CarOwner owner = new CarOwner("Danni", "123456789"); or CarOwner owner = new CarOwner(); owner.setName("Danni"); owner.setPhoneNumber("123456789"); I know how to make both work, I can edit the class file to suit whichever way it is written in the main method. But what do people do … | |
I am having a dialog box opens that lets you select a picture and then copy that picture to another folder but the problem is that i am having an error that says that i can't convert a System::String to a LPCTSTR. I searched this subject on google but i … | |
HI, I am developing a website which needs an option to copy and just paste the embed code to share any kind of video lets say youtube or cnn news, the embed code has to be copied and it should play in front end so basically i have a list … | |
I have problem reading file form command line. I am trying to do " abcd: ./rev < numbers", but it gives me an error: ./rev < numbers Usage : ./rev FILENAME Here is the code: #include <stdio.h> #include <stdlib.h> void reverse(FILE * file) { int fscanf_return_value; char x; /* read … | |
Hello, I am new here. I would like to ask opinion from you guys on what are the best options available for me to develop a database system using Visual basic? I am using Visual Basic Express Edition. My problem: I am currently developing a toolkit that needs the user … | |
Hi everyone I'm new here and posting because I have a problem with a PHP script I'm trying to write. I'm testing it as it goes along, but having a problem. I want to select certain people from my database, and send each of them an e-mail. To test, I … | |
Group, I've got several textboxes within a form that are set to link to a data column that are set to accept a "null" (blank) value. However, these columns are formated to receive numeric data. When the user bypasses entering anything within those textboxes (as they should do), what is … | |
[CODE] $query1 = "SELECT tblpatient_pass.RelationMR_no, tblpatient_pass.username, tblpatient_pass.password, tblpatient_pass.email_address, tblpatient_info.lastname, tblpatient_info.firstname, tblpatient_info.mname FROM tblpatient_pass INNER JOIN tblpatient_info ON tblpatient_pass.RelationMR_no=tblpatient_info.MR_no "; $numrows = mysql_num_rows($query1); if ($numrows!=0) { while ($row = mysql_fetch_array($query1)) { $username = $_SESSION['username']; $query = mysql_query("SELECT * FROM tblpatient_pass WHERE username =".$username); $result = mysql_query($query) or die(mysql_error()); while ($patient = … | |
I am tryn a currency converter using hash table. What is the technique to use to enble covert both ways. Ex: Dollers to Euro and Euro to Dollers . I can understand how to do it one way using currency as the hashKey and rate as Hashvalue. (I hope that … | |
Hello, Could you please assist me i want to deploy this application as an executable file with the MYSQL database embedded. I have clean and build the application, the jar file is there but nothing happens. The database is stored on local host. Thank you | |
hye guyz, Can any one tell me that what the data structure is used behind FACEBOOK ??? I have googled but not found any useful answer... plzz tell me quickly.. | |
I have a trigger on insert CREATE TRIGGER [dbo].[InsertNewCustomersAsGroupMembers] ON [CustomerBase].[dbo].[Cutomers] AFTER INSERT AS BEGIN SET NOCOUNT ON; -- Insert statements for trigger here DECLARE @inserterdCustomerID uniqueidentifier UPDATE [CustomerBase].[dbo].[GroupMembers] ?---? END GO I want to get the values of the inserted record at [CustomerBase].[dbo].[customers] into the trigger inorder to update … | |
<% @ language="VBScript" %> <% Option Explicit %> <html> <body> <% Dim I,j For I = 1 to 4 For j = 1 to i Response.write i Next Response.write "<br>" Next </body> </html> Output: 1 22 333 4444 Please explain me how this output is formed. One bellow the other … |
The End.