199,114 Archived Topics
Remove Filter ![]() | |
hi all trying to set up an online shop BUT.. cant get javascript to accept "£" so having to use "$" instead..not good for a uk site lol | |
How can I change the current text style at the current position of the cursor without chnaging the whole div id's font style? [code] document.getElementById('message').style.fontWeight='bold'; [/code] This changes all the previous text styling in the textarea i have been trying to find a way aboutit but can't seem to find … | |
Hi guys...im very happy to interact with you all...I have a problem with my code..i would like to call the javascript value into php.. can any one help me plz.... :- this is my function var cell3 = row.insertCell(2); var element2 = document.createElement("input"); element2.type = "text"; element2.name="name"+rowCount; element2.value="name"+rowCount; cell3.appendChild(element2); .............................................................. … | |
Hi! My question is how could I add the checkbox column to my table. Well, I've tried the following solution, however it provides error message (null), if the table field is empty: [CODE] tableModel = new QueryTableModel(); tableAttributesFormTypes = new JTable(); tableAttributesFormTypes.setModel(tableModel); tableModel.setQuery("select at_code, at_title, at_type from Attributes"); class QueryTableModel … | |
I am using JFrame for my GUI and I want to be able to select a row of text of a bunch of rows of text, one at a time. Like in Microsoft Outlook, you select an email and it selects the whole line for you of all the different … | |
hi guys, just wondering is it possible to set all the textbox align to center within a form using just only one line of code? Rather than using [CODE] 123TextBox.TextAlign = HorizontalAlignment.Center 456TextBox.TextAlign = HorizontalAlignment.Center [/CODE] for every Textbox. Thanks. | |
It shows null pointer exception in Driver class, can anybody find me the error ?? [CODE]public class Node { int iData; double dData; Node leftChild; Node rightChild; public void displayNode(){ System.out.println(dData); } }[/CODE] [CODE]public class Tree { private Node root; //the root of the tree public Node find(int key) // … | |
Hi everyone! I'm currently doing my assignment and I'm stuck on making a form that uploads a picture, save it in a database and retrieve it via datagridview. I don't know where to start, i don't have any idea on putting objects in a database. Can't seem to find a … | |
Hi Everyone I have two aspx pages that updates two values in a database. I have an update button called Button1. Button1 in the first page redirects to the second aspx page. On the second page i want to select a value and then redirect to the first page. How … | |
[CODE]<script type="text/javascript"> function submitmyform(){ { var docx = document.getElementById(formID) document.docx.submit(); setTimeout(function(){self.close();}, 10); }} </script> <?php $xyz=20; $stackid=0; while($stackid<$xyz){ echo'<div align="right"> <form id="'.$stackid.'" name="'.$stackid.'" method="POST" action="updates/comment.php"> <table bgcolor="#E4EFF8" border="0" width="90%" style="border-collapse: collapse" id="table1"><tr> <td align="left"></font></td> <td align="right"><font size="2" face="Verdana"><a href="#div'.$stackid.'" onclick="toggle('.$stackid.')">Comment</a> | Rate </font></td></tr> <tr><td colspan="2" align="center" bgcolor="#E4EFF8"> <textarea rows="1" name="S1" cols="45"></textarea></td></tr> … | |
In php we use the following code to block the url link passing via text boxes or textarea on form submit(For avoid bad link passing from contact us form ).Is there any methode like this in classic asp using vb. if($_POST['Register']) { $username=$_POST['username']; if (preg_match('~(?:[a-z0-9+.-]+://)?(?:\w+\.)+\w{2,6}\S*~i', $username)) { die('Access Denied Avoid … | |
I want to shorten the lower half of this code into a loop statement. The only(x) function is an imported function that makes sure 1 to 9 occurs only once. [CODE] num_1 = str(raw_input("Enter set 1: ") num_2 = str(raw_input("Enter set 2: ") if not only(num_1): ##These two "if not … | |
Hi guys, I know what is meant by vector <string> myvector as it will just take every inputs as string when we are trying to store the inputs in myvector. e.g. myvector.push_back(nick) but what about if we declare the type of vector become like vector <FLATMATE> myvector? Why it won't … | |
What is a differrent between sorted and unsorted lists? The important points... | |
[CODE]i have problem in running c++ program.iam getting more errors .can u help me to run it.[/CODE] | |
Could someone please give me some advice as to why, when I run my program I get a segmentation fault? The code is posted below: #include <stdio.h> #include <stdlib.h> #include <iostream> using namespace std; typedef float Elem; struct Vector { unsigned short int size; Elem* array; }; // Instruct user … | |
i want to reserve 4096 bytes in the memory and initialize all with zeros how should i do that? initialize: mov byte[array:di],0 inc di cmp di,4096 jne initialize array: resw 4096 | |
I would like to program that reads a file with 6 lines that have 7 numbers on each line. The output should save a file with sum, average, max and min of each line. For now I just have to figure out how to get the max and min numbers … | |
In the name of God ...................................... Hi this is my code . i want to add 2 digits and then print them on screen : what's wrong : [CODE] title myprog .model small .stack .data num1 db 12 num2 db 13 .code start : mov ax,@data mov ds,ax ; data … | |
Hi guys, I just started to learn class in C++ and get confused by some of the codes [code]class FLATMATE { string name; public: FLATMATE() { name = "";} FLATMATE(string n){name = n;} string getName(){return name;} void setResident(string n){name = n;} }; //Below are the base class for different duty … | |
Hey guys, i'm fairly new here. Just stuck on a program. It seems like it should be right, based on my pseudo code, but something went wrong. Edit: without using Math.pow; Edit: kind of not looking for the answer, just what i did wrong,, other wise, i wont know it … | |
Can someone explain this short paragraph concerning wave file analysis (what exactly is the input and output?): The default input to this program is a text file containing a uniformly sampled time series, presented as a column of numbers. The default standard output is the magnitude of the discrete Fourier … | |
I'm working on an a grading program that will require the use of a couple classes. The program contains a list of "program assignments" which there are 5, and 3 test scores. The Driver class contains the scores for the students. I'm stuck writing the average methods :$ Along with … | |
The file that I am trying to read has the following contents: 192.168.1.1 48111 test.out 100 25 I am trying to use fscanf to read it line by line and storing each line in a variable. This works if I just have a couple of int variables, but it does … | |
Hi....... This code is useful to check given string is palindrome or not. Actually, there are some other way also to check palindrome. So, be careful which code gives better efficiency. You can [COLOR="Red"]comment the line[/COLOR][COLOR="Green"]-bool caseignore= str.Equals(revstr, StringComparison.OrdinalIgnoreCase);[/COLOR] and in [B][COLOR="Red"]if[/COLOR][/B] condition you can use- if(string.Compare(str,revstr,true)==0) | |
Hi, This is what I have done so far (below) I'm having a problem with the spacing as shown in the output (below the code) Can anyone please help me fix the spacing? Thank You!! ************************************************** ************** CODE: [CODE]#include <iostream> using namespace std; void question (int input); void calendar (int … | |
Please check out This Output required [CODE] Aa Cc Bb Dd Ee Ff jj Ii Hh Gg [/CODE] [CODE] #include<stdio.h> #include<conio.h> void main() { char a = 'a',a1 ='a',A = 'A',A1='A'; int i,j,n; clrscr(); for(i =1;i<=4;i++,printf("\n")) { if(i%2!=0) for(j = 1;j<=i;j++) { printf("%c%c ",a,A); a++; A++; } else { a1 … | |
| |
Hy guys how can I go through each column of a result returned form the database. In other words do this: [CODE] $command = "SELECT * FROM Persons"; $result = mysql_query($command); while($row = mysql_fettch_array($result)) { [COLOR="Red"][INDENT]foreach($column in $row) {[/COLOR] [INDENT]if($column!=null) { ... }[/INDENT] [COLOR="Red"]}[/INDENT][/COLOR] } [/CODE] How to do the … | |
[CODE] public class Node { int iData; double dData; Node leftChild; Node rightChild; public void displayNode(){ System.out.println(dData); } } [/CODE] [CODE]public class Tree { private Node root; //the root of the tree public Node find(int key) // find node with given key { // (assumes non-empty tree) Node current = … | |
I have just started taking Java as a course in college and I am having a problem understanding how to find the syntax errors in a definition for a class.I am not asking for answers I just need help understanding it more. The class is public class AA { private … | |
Hey, I have a homework problem in which I have to multiply two polynomials. I am assuming that the 2 polynomials can each be of any length so I am stuck as to how I am supposed to do that. My homework sheet derives how to do it like this … | |
I found some code to open a link in a new window, and then change the current window to something new as well. This works fine in Firefox, but testing it in IE8 doesn't work. [CODE]<SCRIPT type="text/javascript"> function poptastic(url) { newwin=window.open(url,'name','top=0,left=0,resizable=1,scrollbars=1'); newwin.moveTo(0,0); newwin.resizeTo(newwin.screen.availWidth, newwin.screen.availHeight); if (window.focus) {newwin.focus()} window.location = "thankyou.php"; … | |
I have a Javascript function that dynamically creates a box with document.getElementById('lightbox').innerHTML. In the box will be, among other things, a div with id="div1" and visibility="hidden" and a form which, onSubmit, calls the function myFunction. The function basically looks like [CODE] myFunction() { document.getElementById('div1').style.visibility = 'visible'; }[/CODE] which has worked … | |
can anyone help me with following bit-wise manipulation.thanks! /* * copyLSB - set all bits of result to least significant bit of x * Example: copyLSB(5) = 0xFFFFFFFF, copyLSB(6) = 0x00000000 * Legal ops: ! ~ & ^ | + << >> * Max ops: 5 * Rating: 2 */ … | |
I want to pass some variables from the child form to the parent form. So at the Main form or Parent form I added the variables as a constructor: [CODE] private SampleFunction() { int a, b; //Here is where I want to use the x,y and z from the Second … | |
Hi i have a small calculator app .that add 2 values from the user input.(a windows application on C#). And now what i want is to access that calculate method on a web site,witch is run on my local host. so plz.....somebody can help me........ | |
hai, i was wondering if you guys had any advice on getting into game programming with c++ i have a pretty basic understanding of the language and was trying to find out how to do this kind of stuff but so far i havnt been able to find out much. … | |
Is this possible or are there any ways for this? I need to insert records in two tables using SQL. I believe that having two sqlcommands must have different name so if there would be two of it, how could I execute both. | |
I am currently working on a C# project that contains UDP and TCP connections, and outputs to a serial port,... etc... So I was thinking ... How hard is it to take a C# program and convert it somehow to be embedded on a circuit board? ... i.e: replacing the … | |
![]() | Hi, Does anyone know where I can read about ways to protect a website from potential threats? i.e. SQL Injection, etc. In particular, a website using HTML/JSP/Servlets/Java/Tomcat. Thanks, Ashton. |
hello...i`m a new beginner in c#, is anybody know how to...... i`m trying to create a table. the table have one INSERT button. when i click the INSERT button, an empty row will appear below the previous row, which i have to insert a new data. so now what i … | |
Hi everyone I know there already is a thread on that one, but not enough for me to make it work. So I know I can do : $command = "mysqldump -u [username] -p [password] [databasename] > [backupfile.sql]"; then system($command); the thing is, I'm on a web server (hosting company) … | |
Hi !!! I have two Windows Forms. In First Windows Form i have one Text Box and one Button. In the Second Windows Form i wish to call First Windows Form and get the value of Text Box. Is this is possible? When i create a object of the First … | |
[COLOR="Red"]hey,i'm having trouble with this code...it keeps saying there is an error..can you help me please...thank you in advance[/COLOR] cannot find symbol symbol: constructor CompteBancaire() location: class javaapplication18.compteBancaire this is the class: [CODE] package javaapplication18; import javax.swing.*; import java.util.Scanner; public class CompteBancaire { private String nom,prenom,typecompte,currency; private int numerocompte; private … | |
hello all, actually i am working on sipmle work inwhich i need to import one file whic is of .hex extension, so i need to import a file which should be exactly same name with .hex extension. how should i implement such that it should take that file name with … | |
Can a String object behave like other reference objects such as in the case below? [code] class MyClass { public String Text = ""; } MyClass a = new MyClass(); a.Text = "Text in a.Text"; MyClass b = a; b.Text = "Text in b.Text"; Debug.WriteLine(a.Text); // Prints 'Text in b.Text" … | |
CREATE procedure [dbo].[date_sp_new] ( @fromdate as varchar(50), @todate as varchar(50) ) AS declare @date1 as datetime declare @date2 as datetime select @date1 = convert(varchar(50), @fromdate,120) select @date2 = convert(varchar(50), @todate,120) begin if (@date1 = '' or @date2 = '') select * from mkt_contact else if(@date1 != ''and @date2 = '') … | |
Im from a c++ backround so I am not sure exactly how to do what Im trying to accomplish. If myString1 = "hello" and myString2 = "hello\0\0\0\0\0\0\0" Im looking to trim off all of the null charecters. Thanks. Edit: So i was just trying to use the Remove method. I … | |
i need help to solve this #include <stdio.h> #include <stdlib.h> void toLowerCase(); int main() { system("cls"); toLowerCase(); return 0; } void toLowerCase() { char ch, ch1; printf("\nEnter a character to convert: \n "); scanf("%c", &ch); ch1 = ch+32; printf("Converted value is %c", ch1); fflush(stdout); } |
The End.