Firstly, I would like to apologize for the massive number of nooby crap questions that come out of my account. I'm an emerging programmer that doesn't always know what he's doing, so I'm sorry. Secondly, the problem. I'm writing this code: class Object(): def __init_(self, vertices, color, name): self.color = color self.name = name self.vertices = vertices ##Vertices is in list form def editVertice(self, vertice): if vertice in self.vertices: self.vertices.index(vertice) else: print "ERROR: VERTICE NOT RECOGNIZED. INSERT VALID VERTICE" The problem I'm having is that when I run this, it gives an error saying that the term 'vertice' in the …

Member Avatar
Member Avatar
+0 forum 3

Hello, I am currently using bound parameters in regards to user input on my form. I have read about escape strings also and thought of using both together. Is this possible and, importantly, is it necessary considering I am already using bound parameters? I would like to use both. Thank you in advance, Matthew

Member Avatar
Member Avatar
+0 forum 2

Hello all, zoidmaster here. I have a question regarding work with a MS Access database. I have the code written out from a tutorial I found online for a basic database, however all it can do with the database is read, add and delete lines from it. I'm trying to create a similar setup but with the capability to search. My question is this: What are the SQL parameters I can use with my vb.net code? I'm kinda just looking for a general list. I assume they would be readily available somewhere like a Windows Command Prompt help list for …

Member Avatar
Member Avatar
+0 forum 2

I'm trying to create an ASP .NET MVC WebSite that allows the user to enter the website without providing any additional information or by specifying an id or a name. Is this possible? How? I've tried the following method but it's not working public void Index() { //... ProcessClient(); } public void Index(int id) { //... ProcessClient(); } public void Index(String guid) { //... ProcessClient(); } public ActionResult ProcessClient() { return View("Index"); } My thanks in advanced

Member Avatar
Member Avatar
+0 forum 1

I wish to use parameters in a class to change what the class displays how would this be done?

Member Avatar
Member Avatar
+0 forum 1

Hello all, So here is my problem: I have 2 functions that one uses the other's calculations and result: int functionA(int a, int b) { int x = a+b; return x; } int functionB(int a, int b, int c) { int xx = x(a,b); int f = xx * c; return f; } I have reached a point in a program I am trying to write, where I need functions that take too many parameters and I was thinking whether or not there is a better way to do it, like calling the function A or its result directly without …

Member Avatar
Member Avatar
+0 forum 4

Hi, I have been trying to create a little jquery plugin for myself so that I can reuse some helpful multiple button submit code. This plugin will allow me to have a class as a selector for every button I want to use on a webpage, a class for everything I want to show/hide and set the toggle speed to slow, medium or fast. The issue I have is that what I want as my default settings ie the p tag and slow are acting as hard coded to the plugin rather than taking the parameter inputs of the function …

Member Avatar
Member Avatar
+0 forum 4

Hello, I have a problem with my php script. Everything works fine except when i will write the data to the database. I get a error Warning: **Wrong parameter count for mysql_query()** Here is my code: <?php include('../sec/inc_mysql_connect.php'); include 'googledistance.class.php'; $sql = "SELECT VVBnummer, Adres, Postcode FROM tblscheidsrechters";// echo($sql); $result = mysql_query($sql); $sql_sh = "SELECT ID, SporthalAdres, Postcode FROM tblsporthal"; //echo('<br>' . $sql_sh); $result_sh = mysql_query($sql_sh); while($record = mysql_fetch_array($result)) { while($record_sh = mysql_fetch_array($result_sh)) { $fromAddress = $record['Adres'] . ',' . $record['Postcode']; //echo($fromAddress . '<br>'); $toaddress = $record_sh['SporthalAdres'] . ',' . $record_sh['Postcode']; //echo($toaddress . '<br>'); $gd = new GoogleDistance($fromAddress, $toaddress); $vvb …

Member Avatar
Member Avatar
+0 forum 4

I want to pass data from one function to another function in same controller.And then show that data on a view.This is my code parts.But it gives errors in view.Please can you help me? Model function getEmail($logindata) { $emailentered=$logindata['emailpost']; return $emailentered; } Controller public function Login() { $this->load->view('header'); $this->load->view('userLogIn'); if($_POST) { $logindata=array( 'emailpost'=>$_POST['email'], 'passwordpost'=>$_POST['password'] ); $login_confirm=$this->systemModel->loginManagement($logindata); $emailgot=$this->systemModel->getEmail($logindata); $data['emailgot']=$emailgotvalue; if($login_confirm){ $this->user($data); } } $this->load->view('footer'); } public function user($data=array()) { $this->load->view('header'); $data['emailgot']; $this->load->view('user',$data); $this->load->view('footer'); } View <?php echo form_input(array('name'=>'email','readonly'=>'true','value'=>$emaigot));?>

Member Avatar
Member Avatar
+0 forum 4

handover paraeters and simple simple algorithms having atleast 3 parameters needed!!!

Member Avatar
Member Avatar
+0 forum 1

Hi all! I have a big problem that I would like some help. I use Mysql Workbenc 5.2CE. I changed the default port to 3301. The mysql server is up and running well (I access it from an app I'm making with VB.NET). The problem is I can't get mysqldump to backup the database. I'm using the following code (in the command prompt) "C:\Program Files\MySQL\MySQL Server 5.5\bin\mysqldump.exe", "--user=root --password =mypassword" "--host = 127.0.0.1 --port 3301 --databases MySQL databasename -r ""C:\GreatestHR Backup\BackUpDataBase.sql""" (Note: I would like to use an IP Address for host) When I run that, I get the error: …

Member Avatar
Member Avatar
+0 forum 6

my complier is throwing an error up when i run it. the problem is run into is my Increment function is etither given a number to increment by, or if it is left blanlk (Increment()) should default to incrementing 1. i thought i could do just 2 functions, one with a parameter given and the other without(kinda like what you do for constructors). still throwing errors. how would i make it with/without parameters in one function? void Date::Increment(int numDays) { int newDay=0; if(day+numDays > DAYINMONTH[month]) { (month=month+1); newDay = (day+1)-DAYINMONTH[month]; (day = newDay + 0); } else {day = day …

Member Avatar
Member Avatar
+0 forum 9

HI I have a method update.sendUpdate(TrackManager tm); TrackManager is a class how do i create a thread for methods with parameters appreciate a reply thanks

Member Avatar
Member Avatar
+0 forum 2

Hi all, Anyone know how to create a data base gives the name of the same parameterized? Example in a store procedure, named 'x', which has a parameter, this will do since the create dabase @variable create procedure creadatabase @db_name varchar (10) as create database @db_name go But this variable throws syntax error That's what I try to do but I could see how it does. Thnks a toto everybody

Member Avatar
Member Avatar
+0 forum 1

Hello. When I click Add query on combo box for example, I edit the SQL statement by adding 'WHERE Club = @uClub'. Then I get the error: 'An error occured while trying to create parameterized query: Error in WHERE clause near @. Unable to parse query text' So how can I make a parameter in it?

Member Avatar
+0 forum 0

A Example for OLE DB I Compiled. Put back together for fun maybe. # Someone convert this to ASP.Net plz with a splash screen. # # Required Materials # 1. a vb.net compiler(visual studio vb.net express perhaps?) 2. Libzplay dll(your search engine will help) Imports System.Data Imports ESO.libZPlay Imports System.Data.OleDb Imports System.Drawing Imports System.Configuration Imports ESO.Class2 Imports ESO.Module1 Imports System.Threading Public Class Form1 Private player As New ZPlay Private Inc As Integer Dim drag As Boolean Dim mousex As Integer Dim mousey As Integer Friend Const ConnectionString As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=Resources\Database4.mdb" Friend con As OleDbConnection = New OleDbConnection( _ …

Member Avatar
Member Avatar
+0 forum 2

I know this is a basic question. I asked the same question a while ago, even then thinking it was a simple question. The answer I got seemed to be what I already know and was obvious.. however, when I tried it, it did not work, so I just worked around it for a while... But now the same question is coming up, and this method is still not working... [CODE]<p>Name : <input type="text" id="theName" name="theName" value=""></p> <p><input type="button" name="btnGo" value="Go" onClick="goNow(document.getElementByID('theName').value)"></p>[/CODE] that is what I currently have, and for some reason it is not working... am I doing something …

Member Avatar
Member Avatar
+0 forum 10

well i am trying to pass this parameter in a function -->[ICODE]char*[I]filename[/I][/ICODE] [CODE] [U][B]//i just wrote this as an example to explain clearer my question[/B][/U] #include<stdio.h> #include<stdlib.h> void try (char *[I]filename[/I]) //[B] the question is how can i use the pointer to refer to a file? [/B] { printf("try"); } int main () { FILE *f=fopen("lol.txt","w+"); try(*[I]filename[/I]); return 0; }[/CODE]

Member Avatar
Member Avatar
+0 forum 5

i want to read parameters from a file. but the program reads all parameters as if they are zero.any help? here is the code [CODE] typedef unsigned long int WORD; unsigned long int parameters[2]; WORD pt1[2]; void readConfig() { char a[3]; FILE *p; p = fopen("config.data", "r"); if (p) //we are reading { while(!feof(p)) { fscanf(p, "%s %lu", a, &parameters[0]); parameters[0]=pt1[0]; fscanf(p, "%s %lu", a, &parameters[1]); parameters[1]=pt1[1]; } } else //we have an error, could not read { printf("Config file could not be read.\n"); //give warning } fclose(p); } void main() { WORD i, j, k, pt2[2], ct[2] = {0,0}; …

Member Avatar
Member Avatar
+0 forum 4

I am trying to write a few very dynamic procedures and functions and wonder about transferring parameters to a procedure as an Array. This is actually easy enough done.... just that I would like to pass something like [CODE] VAR a,b,c : INTEGER; Name, Text1,Text2 : STRING; todaysDate : TDate; PROCEDURE HandleValues(Const Values:ARRAY OF ???) BEGIN // Code to handle fetching the values. END; BEGIN HandleValues([a,b,c,Name,Text1,TodaysDate]); HandleValues([Name,Text1,Text2,a,c]); END. [/CODE] The whole point is that I do not know in which order the parameters occur in the array. I do not know what type comes where. If it only was a …

Member Avatar
Member Avatar
+0 forum 4

Hello again! I'm having trouble trying to double the value of my coordinates in my point. The object is to create a pair of eyes and their position is identified by clicking a point in the graphic window which would allocated the centre of the left eye, and the second click would identify the radius of the circle by clicking the edge of its circumference. The third eye is placed directly beside it, so I figured I had to make the coordinates of the right eye's centre twice as long as the left eye's centre. I've tried so many arithmetic …

Member Avatar
Member Avatar
+0 forum 1

Hi I understand how to create a button in runtime in vb.net my code to do this is: ' create button Dim btn As New Button ' set some button properties btn.Text = "go" btn.Top = 45 btn.Left = 190 'add button to form Me.Controls.Add(btn) I read on a forum from daniweb that I should add a handler to my button. This is the part I am struggeling with. I dont know how to add the handler or how to use the handler Add the handler: the code information I looked up showed that the handler should be something in …

Member Avatar
Member Avatar
+0 forum 3

I have a C# program that I run on a Windows PC and a camera app running on a Windows CE6 terminal. The two are connected using Activesync 4.5. From the PC app, I want to be able to do the following. 1. Launch the terminal app 2. With the terminal app running, tell it to start a process like image preview 3. With the terminal app running, tell it to take a picture 4. Shut down the terminal app In other words, I want to write the programs such that I have control over a running application from another …

Member Avatar
+0 forum 0

Ok so while reviewing this code which is meant to convert yards, and feet to inches I found on lines 17-19 , and 32. There are "string data" (if that makes sense) as parameters in each method? What do they denote, serve , and their purpose? MSDN usually has convoluted explanations.....on this so I guess im resorting to you faithful guys again! [CODE]using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Lab1 { class Lab1 { static void Main() { int inches, yards, feet; // this prepares to write code to give the instructions to the user DisplayInstructions(); inches = …

Member Avatar
Member Avatar
+0 forum 3

Having problems with the TypeError below: [code]order_list = ['25459 ', '12381 ', '25375 '] cursor.execute("SELECT WVGID6 , WVWHID, WVITNO, WVLOCA FROM WMRSV WHERE OHORNO IN (%s)"% tuple(order_list)) TypeError: not all arguments converted during string formatting[/code] The correct SQL should look like: [CODE]SELECT WVGID6 , WVWHID, WVITNO, WVLOCA FROM WMRSV WHERE OHORNO IN ('25459 ', '12381 ', '25375 ')[/CODE]

Member Avatar
Member Avatar
+0 forum 1

I am having trouble structuring an sqlite update statement that has multiple parameters. The following code does not raise an exception, but nor does it update my table. After extensive googling and searching Daniweb, I think I'm looking right at the blindingly obvious and missing it. I have a list of tuples, PVitems which when iterated (as at the bottom of my code) looks like this: (21, '1570600') (10, '1979203') (7, '1979202') (6, '1979201') The first integer is the PV count while the string is a meshblock number. All my meshblocks are handled as strings because many start with zeros. …

Member Avatar
Member Avatar
+0 forum 6

Hi to all... I am getting a warning, i am trying to avoid that but its not sorted out..Please suggest me to avoid that warning. my code is as follows.. [CODE] const char var[][2][5]={ {"1.95","3.70"}, {"2.40","4.60"}, {"2.70","5.70"}, {"6.60","13.40"}, . . . . }; void fun(int col,int row,char *str) { ... ... //(here i am printing that string...) } main() { fun(var[45][1]); } [/CODE] My definition of fun function, array, main function are in the same file..... [QUOTE]main.c(11498): warning: passing arg 3 of `fun' discards qualifiers from pointer target type [/QUOTE] So this is the warning i am facing...please suggest me …

Member Avatar
Member Avatar
+0 forum 2

I've got lists of links which change order when you click the "most" or "least" buttons, have a quick look at it, easier to understand: [url]http://pinchweb.com/browse/[/url] The problem is, I see a lot of repeated code, which seems pretty inefficient. There's 4 filters - leastrec (least recent), mostrec, leastpop (least popular) and mostpop, and I've had to make a JQuery function for each of them, even though they all do pretty similar things. Is there any way I can configure the JQuery to take parameters, and reduce it to one function? Here's what they look like: [CODE]<script> <!-- var $j …

Member Avatar
Member Avatar
+0 forum 7

I have a lot more code than I'm going to post here, but I am posting the relevant parts. What I have is a Calculator program. Here's the code: [CODE=Python] num1 = None num2 = None oper = None def calculate(num1, num2, oper): print("calculate() called") if(oper=="+"): answ = Decimal(num1) + Decimal(num2) return answ elif(oper=="-"): pass elif(oper=="*"): pass elif(oper=="/"): pass elif(oper=="^"): pass elif(oper=="%"): pass else: pass def addPressedF(): print("addPressedF() called") num1 = dfSV.get() print(num1) oper = "+" root.title("Calculator - '+'") dfSV.set("") def equPressedF(num1, num2): print("equPressedF() called") num2 = dfSV.get() print(num1) print(num2) dfSV.set(calculate(num1, num2, oper)) [/CODE] When someone presses a number button …

Member Avatar
Member Avatar
+0 forum 10

This problem is about passing parameters between functions(define neighbour elements and acess these elements) Here is some HTML [CODE] <ul class="listing"> <li><a href="imgs/eli.jpg" id="1" class="lightbox" onclick="defineNeighbours(this.id);"><img src="thumbs/eli_t.jpg" width="150" height="100" class="images" /></a></li> <li><a href="imgs/ggallin.jpg" id="2" class="lightbox" onclick="defineNeighbours(this.id);"><img src="thumbs/ggallin_t.jpg" width="150" height="100" class="images" /></a></li> <li><a href="imgs/jontarata.jpg" id="3" class="lightbox" onclick="defineNeighbours(this.id);"><img src="thumbs/jontarata_t.jpg" width="150" height="100" class="images" /></a></li> </ul> [/CODE] This Javascript function is about getting the neighbours(next and previous) of given element. [CODE] function defineNeighbours(id){ var nextimages = document.getElementById(++id); var backvalue = --id; var previmage = document.getElementById(--id); alert(nextimages); alert(previmage); } [/CODE] Then I need to pass the nextimages and previmage variables to the next function. This …

Member Avatar
Member Avatar
+0 forum 1

The End.