I’m working on a little matrix class for my own use and because for me, it is just fun! Now I noticed a lot (10 and more) of the methods always seem to follow the same pattern: - Iterate over the rows - For each row iterate over the columns - Do something with each element of the matrix An example: // <returns>the zero matrix</returns> public static MMatrix Zero(int row, int col) { MMatrix MA = new MMatrix(r, c); for (int i = 0; i < row; i++) { for (int j = 0; j < col; j++) { MA[i, …

Member Avatar
Member Avatar
+0 forum 9

Hello. I have and event.php page and del_single.php page. event page has a form: <form action='del_single.php' method='get'>//<-i already have the method as get <input type='hidden' name='event_id' value='$id'> <input type='checkbox' name='check[]' class='check' value='$id'> <a href= '#' value='$id' name='e_n' onclick='getsum(".$id.")' >$name</a> <label>$formatDate</label> <input type='submit' name='del_single_event' value='Delete'> </form> as you can see i have the form to be processed on a different page which is the del_single.php: <?php if(isset($_SESSION['sess_user_id'])) { require "connection.php"; $userid = $_SESSION['sess_user_id']; $id = $_GET['event_id'];//<-get id $sqlqueer = $dbh->prepare("DELETE FROM event WHERE event_id = :id AND euser_id = :userid"); $sqlqueer->bindParam(':id', $id, PDO::PARAM_INT); $sqlqueer->bindParam(':userid', $userid, PDO::PARAM_INT); $sqlqueer->execute(); if($sqlqueer->rowCount() > 0) { …

Member Avatar
Member Avatar
+0 forum 1

I have some basic logic here and im getting crazy how can do this. what I want is to submit my form when the hyperlink is being click. here sample code: <form id="myForm" action="for-filtering.php"> <input type="hidden" name="fname" value="<?php echo $account_fname; ?>"> <input type="submit" id="submit" style="display:none;"/> <a onclick='myFunction()' href='reponse-to-customer.php?id=".$cus_id."'>$firstname_email</a> </form> <script> function myFunction() { document.getElementById("myForm").submit(); } </script> I know Sir you can improve this thnx.. ^^

Member Avatar
Member Avatar
+0 forum 5

I am using NetBeans and I have the MySQL server with SQL db running on my computer. I have a desktop app with embedded db. I would like to find some good info on how to add button functionality to initiate another desktop app. I would like to explore possibilities to initiate the MySQL command window. Is there a good way to add functionality of these applications so to have them available on my main desktop? My interest concern importing the eclipse file that could start the???.jar when the button actions fired. so I would need Java code that I …

Member Avatar
+0 forum 0

hi. can any one help. i am doing a java application. and using a button listener class. and says cannot find the text box object. can you help. will do the sample code. how to get this to work. marvin. ps: here's the code if(e.ActionCommand().equals("btnName"}} {JOptionPane.showMessageDialog("My name is: " + txtName {+ " "); System.exit(0); } how to fix this. what is the correct code. and then get this error. marvin.

Member Avatar
Member Avatar
+0 forum 1

Hello good day. I am having trouble letting my listeners wait on each other. I have a 1. JComboBox 2. JList - groups 3. JList - students The choice from the JComboBox, clears and updates the groups JList by way of an actionlistener. The ListSelectionListener for the groups JList, then responds to you selecting data (that was just added). The choice is refelcted in the students JList. The trouble is I am getting a NullPointerException at random times. I believe this happens because in order to update the groups-JList via the ComboBox's ActionListener, I need to clear it's contents first. …

Member Avatar
Member Avatar
+0 forum 6

Hi, i have a form that when filled out sends and email. I want to be able to validate it, so check that all the fields are filled using PHP. I have found this website: [URL="http://www.phpjabbers.com/phpexample.php?eid=27"]http://www.phpjabbers.com/phpexample.php?eid=27[/URL] that i used to validate it but i am not sure how to combine the two PHP scripts to validate and then send. how would i do it? The reason i am having trouble is both the validation and the email sending PHP require the use of "action" property. By the way: i dont really know PHP

Member Avatar
Member Avatar
+0 forum 12

Hi, I am not for sure if I am posting in the correct room. I have a flash photo gallery question. I am making a flash webpage using CS4 using a previous and next button. Both the previous and next button work but one problem. It does not stop at the first gallery instead it goes all the way to the end to the very last gallery. Example. One gallery is name food, the next family, and after sports, and etc. The next and previous button goes to the next gallery without stopping. My question is, is there a way …

Member Avatar
Member Avatar
+0 forum 2

#Web app state management# The current state of the user interface determines which application actions are enabled and thus which html elements are enabled for the user to invoke them. Classes are used in the html to indicate elements that need to be managed. Then jQuery is used to configure the user interface as the state of the application changes. ##Function to enable/disable elements based on state## Here is a javascript/**jQuery** function, dobles(), that can be used to enable/disable and show/hide page elements to keep the page in synch with the current state of the application. The html elements that …

Member Avatar
Member Avatar
+2 forum 1

Hey, Im trying to implement a search in the action bar in my android app. Ive got the serachView to show and Im able to write in it. But when I press enter to make it submit the request should just open my SearchActivity were I should just be able to handle the request. The problem is that the searchActivity gets called 2 times where the second time it makes the app crash. hHas anyone had the same problem ? The Manifest: <activity android:name="com.example.qrepublic.MenuActivity" android:label="@string/menu_title" android:theme="@android:style/Theme.Holo.Light" > <meta-data android:name="android.app.default_searchable" android:value=".SearchActivity" /> </activity> <activity android:name="com.example.qrepublic.SearchActivity" android:label="@string/search_title" android:parentActivityName="com.example.qrepublic.MenuActivity" android:theme="@android:style/Theme.Holo.Light" > <intent-filter> <action …

Member Avatar
+0 forum 0

Now then, It's not often I start a thread but I'm struggling to find the answer after a lot of tries on Google. The issue is that I have a "Profession" comboBoxCell as well as a "Discipline" comboBoxCell which is populated/ repopulated with a short list of disciplines dependent on the value selected in the "Profession comboBoxCell. This would mean I'd need a selectedValue Changed action event at cell (just the "Profession" comboBoxCell) level rather than the entire DGV or that counts for all cells like below: dataGridView1_CellValueChanged() If anyone could suggest anything other than point me in the right …

Member Avatar
Member Avatar
+0 forum 5

Hello DaniwWeb Members :) I'm a fairly new programmer and I'm kinda embarressed to ask this question considering that the answer is probably blatently obvious. So forgive my ignorance :) But here goes, I have a String called "Ctype", It is relevant to my combobox which I created. My combobox works perfectly fine, and I can get it to work without using a "JButton" but I would like to use one. If I selected one of my options in the Combobox, it will instantly follow the instruction instead of waiting until I pressed "Next". I changed the code around abit …

Member Avatar
Member Avatar
+0 forum 2

Hi all. I have been working on a action script and finally got it working. I am totally lost of how to write my PHP email codes for when the person press submit all the information they fill in is sent to me via email could someone help me please. I found tons of example off the internet to write a basic one but nothing close to what I have. Or better said none with check boxes buttons. Could someone please help me. Below is my action script code I use. The cb is for checkbox and radio buttons says …

Member Avatar
Member Avatar
+0 forum 2

Hello, I want to implement Change Listener in the Action Listener of a Button I have a color graph chooser and 2 buttons...Apply and Cancel to select the color of the color chooser i have implemented the Change Listener but I want the change listener to act on the Apply button click... Since the listener which I have written is not in the apply button it takes place even when I click on cancel button.... code for change listener final JColorChooser ColorChooser = new JColorChooser(Color.black); ColorChooser.getSelectionModel().addChangeListener(new ChangeListener() { public void stateChanged(ChangeEvent e) { newColor = ColorChooser.getColor(); } } ); code …

Member Avatar
Member Avatar
+0 forum 2

This is a question about Mac OSX Objective C (Cocoa) Hello I currently have a webview inside a panel which I have set as a sheet, the website inside the web view in the panel can go to other pages of the site, unfortunately one of these pages has a button which closes the webpages window, because I am running it in a sheet and the window has been closed the sheet no longer comes to the front as it's been incorrectly closed. I don't really want the user to go away from the page that loads at the beginning …

Member Avatar
Member Avatar
+0 forum 1

When "ENTER" button in value class clicked the show class wil be run. but nothing happend import java.applet.*; import java.awt.*; import java.awt.event.*; import javax.swing.*; /*<applet code ="value" width=200 height=200> </applet>*/ public class value extends Applet { private JLabel lab1; private JButton btn1; public void init () { // Construct the TextFields this.lab1 = new JLabel("Press the button"); this.btn1 = new JButton("ENTER"); // add the button to the layout this.add(lab1); this.add(btn1); transfer tran=new transfer(); btn1.addActionListener(tran); } private class transfer implements ActionListener { public void actionPerformed(ActionEvent e) { show sh = new show(); sh.setVisible(true); } } } import java.applet.*; import java.awt.*; import …

Member Avatar
Member Avatar
+0 forum 6

Hi, How can i create a link in my PHP code (index.php) that when a user click on that link it will: 1. call doSomething() function within index.php 2. then call Myhtml.html Thanks for your help

Member Avatar
Member Avatar
+0 forum 7

Hello, I have a form that I really don't want to use captchas with. The problem I have is that people cURL my site and send messages on my system slowing it down for my legit users. I am looking for a way to change the name of the form fields. In a way they would change together my submit page and my action page. Where I could add a list of names for the form fields and they either change with every submit or they change every so many hours of the day. Anyone with any ideas...I would really …

Member Avatar
Member Avatar
+0 forum 7

Hi all, I'm trying to make a multi-language website that allows the user to change language by clicking on a button (a flag representing the country/language). I have been able to achieve this using locale and a combo box so far but I'm struggling to implement it using buttons. This is my code so far: [CODE] ActionScript Code: import fl.data.DataProvider; import flash.events.Event; import fl.events.DataChangeEvent; //------------------ // SETUP LOCALE OBJECT: var languages:Object = new Object(); // Stores flags for loaded languages var localeDefault:String = "en"; // Default language var locale:String = "en"; // Current language selected in combobox // Event handler …

Member Avatar
+0 forum 0

Hi All, I am using Struts framework, and finding that my url is showing parameters values. Actually after calling action I am redirecting to some other page on SUCCESS . (through Struts.xml config). Now in jsp I am redirecting with " method = post ". still when showing success page its showing parameter in the url. what could be the reason for that. I cannot use all the parameters as hidden. ( Also there is no sense as readymade scripts are available to find the hidden parameters) Is there any struts configuration for that. Please explain.

Member Avatar
+0 forum 0

Dear Experts, Thanks in advance for helping me out. I am new to C# as well asp.net. I have already running appllication asp.net , needs to change in asp file with C# code. Scenario: My application is using third party software "activepdf server,webgrabber" to convert and print to pdf. BUT latest version of Activepdf Webgraber is doing all alone. Problem : I can not put code on proper location as given in example by Activepdf at : [url]http://examples.activepdf.com/WebGrabber%20WBE/2010/WebGrabber%20Basic%20Conversion.vbs[/url] Kindly help me to change the code of here . [code] //APWebGrabber wb=new APWebGrabber(); APWebGrbNET.APWebGrabber wb = new APWebGrbNET.APWebGrabber(); //APServer aps=new APServer(); …

Member Avatar
+0 forum 0

[CODE]<%@page contentType="text/html" pageEncoding="UTF-8"%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>XYZ Travels Pvt Ltd.</title> <script type="text/javascript" language="javascript"> function a(){ var x = document.forms.frm1.UserID.value; var y = document.forms.frm1.Pass.value; if(x=="" || y=="") { alert("Required Field cannot be left Blank"); if(x!="") { document.forms.frm1.Pass.focus(); } else{document.forms.frm1.UserID.focus();} } else { [COLOR="Red"] document.forms.frm1.action("Reg.jsp");[/COLOR] } } </script> </head> <link href="projstyle.css" rel="stylesheet" type="text/css" /> <body><font color="white"> <form method="post" name="frm1"> Login : <input name="UserID" type="text"/> <br> Password : <input name="Pass" type="password" maxlength="18"/> <br> <input name="btn1" type="button" onclick="a();"/> <a href="Reg.jsp">Register Now!</a> </form></font></body> </html>[/CODE] how do i cause the form to post to another …

Member Avatar
Member Avatar
+0 forum 4

Hi, Am setting a value in request objet like this: [icode]request.setAtttribute("Hello","true");[/icode] Now i am redirecting to the action class: [icode]new RedirectingActionForward(request, url.getInwardRedirectURL());[/icode] In the redirected action class, am using this to retrieve value from request object: [icode]String example = request.getAttribute("hello").toString();[/icode] Am getting nullpointerexception.. Could anyone help me on this..!!

Member Avatar
Member Avatar
+0 forum 1

I used one action listener for an array of buttons that do different things. Exploring methods. I am fairly new to java. I just made a tic tac toe program. I am hoping for people to look it over and tell me what they think, ways to make it better, new areas to explore. ect. I know the Check method is more complicated then it has to be, but I freakin love it. [CODE]import javax.swing.*; import java.awt.*; import java.awt.event.*; public class tictactoe extends JFrame{ public static JMenuBar MenuBar = new JMenuBar(); JMenu File = new JMenu("File"); JMenu Help = new …

Member Avatar
Member Avatar
+0 forum 11

g'mornin peeps. I'm going for an interview tomorrow at a company that uses the ZEND framework. As such, I have been reading up on it, as well as MVC among other things. The question I'm asking is about the ZEND controller action. Could someone please point me to an example of the controller action being implemented? I have tried to google it, but the results I get are not satisfactory [U]at all[/U] Thank you in advance.

Member Avatar
Member Avatar
+0 forum 2

Hello everyone, I am trying to get an ActionListener to work in Java. On lines 310 and 312 it says 'cannot find symbol: variable calcDisplayF'. I am a complete noob when it comes to Event Handling so any help on this subject would be greatly appreciated. Here is the code (warning, it's long (315)): [code=java] /* * Creating here for development * * Please save all questions until the end of class... */ package macey; /** * @author Mike */ import java.awt.*; import java.awt.event.*; import javax.swing.*; public class normCalcDev implements ActionListener { public void normCalc() { // Content Pane JPanel …

Member Avatar
Member Avatar
+0 forum 5

Hi, I am kind of new to PHP, learning through books and online resources but I am having difficulties with what seems like an easy problem. [CODE]if($pageid == 1){ echo ""; } else { [COLOR="Green"]echo '<form action="delete_ad.php" method="post">'; echo '<input name="deleteid" type="text" value="" id="deleteid" hspace="10"/>'; echo '<input name="delete" type="submit" value="Delete Ad" id="deletebtn"/>';[/COLOR] echo '<br /><br />'; [COLOR="Red"]echo '<table id="emailform" class="signup"> <th colspan="2" align="center">Email Form</th> <form method="post" action="send.php"> <tr><td>Name</td><td><input type="text" maxlength="32" name="name" /></td> </tr><tr><td>Email</td><td><input type="text" maxlength="32" name="senderemail" /></td> </tr><tr><td>Message</td><td><textarea name="message"></textarea></td> </tr><tr><td colspan="2" align="center"> <input type="submit" value="Send" /></td> </tr></form></table>';[/COLOR] }[/CODE] The green part works, while the form in the red part does …

Member Avatar
Member Avatar
+0 forum 4

Hello, I have doubt on passing value from Java script to action script.I have flash player which load the songs from the XML and it was in Iframe parent window. When user login in child window iframe HTML_login page, the username from java script passes the value to flash and load the flash in the same Iframe of parent window with selected path. My concept: Action script: import flash.external.ExternalInterface; ExternalInterface.addCallback("sendTextToFlash", getTextFromJavaScript); function getTextFromJavaScript(str:String):void { var path = +str+ "/song_list.xml"; } mp3player.loadxml ("xml/song_list.xml"); Java script: function load_right(url_src,user_name) { //window.frames["mp3player"].location.reload(); getFlashMovie("test_callback").sendTextToFlash(user_name); document.getElementById("mp3player").src = url_src; } Any help is appreciated…Any suggestion or guidance. …

Member Avatar
+0 forum 0

Hi, just recently playing mmos on my pc, namely 'fusionfall', graphically it is a good game but it is very slow. So i was wondering if there are any other browser based mmos you could recommend? i dont want to download anything as my computer is slow enough already! Not looking for runescape or anything, that game looks rubbish. Preferably 3rd person, and also free. Additional info MMO - massively multiplayer online (game) Browser based - No download

Member Avatar
+0 forum 0

hello, can somebody tell me why when i use a link on <form action="http://www.mysite.com/login.php" method="POST"> the login script won't work :( first i used only action="login.php" but now i need to use the link because i want other login forms on diferent pages (directory) like [url]http://www.mysite.com/news/[/url] and i can't put on every directory the script login.php ! in IE works fine but in netscape firefox or chrome sometimes don't work i don't know why in firefox without the www. works better :| i made a javascript to change the action="" link but don't work for some users.. ps: all the …

Member Avatar
Member Avatar
+0 forum 12

The End.