Hi all. Been fiddling with an idea about combining setters and getters in PHP. I really don't like magic methods (`__get` and `__set`) as they're not very flexible (IMO), but equally bore myself to distraction with set/get methods. Anyhow, having used jQuery for some time, I really liked the non-verbose methods of setting and getting in the client code: var p = myDiv.html(); //getting myDiv.html("Hi all"); //setting So I came up with this as an example: public function producers( $producers = null ) { if(func_num_args() > 0){ $this->_producers = $producers; return $this; }else{ return $this->_producers; } } It uses the …

Member Avatar
Member Avatar
+1 forum 7

I have two questions does its possible to encrypt get parameter same like the passwords are? If NO whats the best method to do it i have simple parameter `articleID=1`, i want to encrypt the number which user is not able to see it or hack it so should look something like this `articleID=jt8asd9HG43u52Jh1jk94X`

Member Avatar
Member Avatar
-1 forum 6

How can I add parameter to this <a href="javascript:;" Or is there any way to post data on the same page on that link above Thanks

Member Avatar
Member Avatar
+0 forum 1

I have this query as part of a stored procedure, and this query as it is listed here works: INSERT INTO OPENROWSET('Microsoft.ACE.OLEDB.12.0', 'Excel 8.0;Database=G:\KF\GBSData.xls;', 'SELECT * FROM [Sheet1$]') SELECT * FROM [KWF_GBSData].[dbo].[tblKWF_WorkTable2] WHERE invoiceNumber IN ( SELECT invoiceNumber FROM [KWF_GBSData].[dbo].[tblKWF_WorkTable2] WHERE stockNumberShipped LIKE 'CCCOMBO%' ) I would like to change the `'SELECT * FROM [Sheet1$]'` to something a little more dynamic so that I can use a parameter for the Excel worksheet name rather than it always using Sheet1$. I would also like to use a parameter for the `WHERE stockNumberShipped LIKE 'CCCOMBO%'` so that I can pass in the …

Member Avatar
Member Avatar
+0 forum 4

Hello fellow earthlings. Using VB6, I want to write a MENU program that executes exe files, or executes dll files. The MENU file should have a function that sends a parameter to A.exe, or B.dll as an example. If A.exe or B.dll received the parameter from the MENU, then they would run normally. If on the other hand, A.exe or B.dll did not receive the parameter from the MENU program, they would not function. In other words, the only way that A.exe or B.dll could execute would be through a command from the MENU program. Thank You so much for …

Member Avatar
+0 forum 0

Hello, My sincere apology, I have been posting almost 4 questions now where I have received 2 answers being solved. These are simple questions which any one familar with VB.Net can solve easily. Please understand, I'm a newbie to VB.Net. Now my next issue is; I have a a form which has text boxes from where the user has to enter the data for the MS Access backend. I am getting the error as INSERT SYNTAX Error when entering the data and clicking the Save button. What is wrong with my insert statemnet below which is at the click even …

Member Avatar
Member Avatar
+0 forum 4

Can't get this work properly: FormatRange(ref ws.Range[curRange.Offset[1, 0] , gives A property or indexer may not be passed as an out or ref parameter Any help would be thankfull public static void WriteDetailData(ref Worksheet ws, string type, ref int row, int col, Hashtable parts, Hashtable refList) { Range curRange = null; Component component = null; curRange = ws.Cells[row, col]; curRange.Value = type + "Component Summary"; FormatRange(ref curRange, 10, "Green", true, false, false, XlHAlign.xlHAlignLeft); curRange.Font.Underline = true; curRange.Offset[1, 0].Value = "Ref-Desig"; curRange.Offset[1, 1].Value = "Part Number"; curRange.Offset[1, 2].Value = "Shape Code"; curRange.Offset[1, 3].Value = "Type"; curRange.Offset[1, 4].Value = "Side"; curRange.Offset[1, 5].Value …

Member Avatar
Member Avatar
+0 forum 2

I tried to create a context menu for a griedview and when i test it it works greacefully private void gridView1_PopupMenuShowing(object sender, DevExpress.XtraGrid.Views.Grid.PopupMenuShowingEventArgs e) { ContextMenu c = new ContextMenu(); DevExpress.XtraGrid.Views.Grid.GridView view = (DevExpress.XtraGrid.Views.Grid.GridView)sender; DevExpress.XtraGrid.Views.Grid.ViewInfo.GridHitInfo HitInfo = view.CalcHitInfo(e.Point); if (HitInfo.InRow) { view.FocusedRowHandle = HitInfo.RowHandle; c.MenuItems.Clear(); c.MenuItems.Add("sample", sampsss); c.MenuItems.Add("sample", sampsss2); c.Show(view.GridControl, e.Point); } } private static void sampsss(object sender, EventArgs e) { MessageBox.Show("sample 1"); } private static void sampsss2(object sender, EventArgs e) { MessageBox.Show("12321344"); } the code above work as i wanted, then it comes in my mind that i am always using it. so i decide to create a static …

Member Avatar
Member Avatar
+0 forum 3

Hi below code prints tempnum correctly but not tempname. Kinly look into this. <html> <head> <script type="text/javascript" src="jquery-2.0.3.min.js"></script> <script type="text/javascript"> $(document).ready(function(){ $(".mylinktempnum").click(function(){ alert($(this).attr('href').match(/tempnum=([0-9]+)/)[1]); *alert($(this).attr('href').match(/tempname=([a-z]+)/)[1]);* }); }); </script > </head> <body> </body> </html> <?php <a class=\"mylinktempnum\" href=\"home.php?tempnum=$num&tempname=$name\"></a> ?>

Member Avatar
Member Avatar
+0 forum 3

Hi to all I want use one reportviewer for several reports each with a parameter. This person has done it here http://www.sourcecodester.com/visual-basic-net/load-rdlc-report-using-report-viewer-programmatically.html without parameters. How can it be used with parameter for each report. when I change line 15 to da.Fill(ds.Employees,txtEmployeeID.text) (where txtEmployeeID holds employee ID as a SQL parameter), code runs but no report. I get the error "An error occurred during local report processing. The report definition for report 'Employees' has not been specified. Could not find the file C:\Users\...\Bin\Debug\Employees.rdlc" And curiously my report path is C:\Users\...\Desktop\MyReport\RepTrial\RepTrial\Employees.rdlc Some say that if we change the report's Build Action property …

Member Avatar
+0 forum 0

Help me! I have a domain, I would like to handle subdumain with .htaccess file. for example: http://usa.hotbizzle.com or http://india.hotbizzle.com should not redirect to sub folder. URL should not change in the browser but it has to call a file php file and give result. Is there any possibilities in .htaccess or php.ini file?

Member Avatar
Member Avatar
+0 forum 2

<html> <body> <?php $username = 'root'; $password = ''; $hostname = 'localhost'; //connection to the database $con = mysql_connect($hostname, $username, $password,'contactmanager') or die('Unable to connect to MySQL'); echo 'Connected to MySQL<br>'.'<p>'; mysql_query($con,'INSERT INTO Personalinformation(Name, YearOfBirth, Email,Location,PhoneNumber) VALUES(Peter,2008-03-05,peter@hotmail.com,kasland,0269015748)'); mysql_close($con); ?> </body> </html>

Member Avatar
Member Avatar
+0 forum 8

Hey guys, I am trying to dynamically parametize my url, but it gets lost and I have no idea why. Perhaps some insight from you guys will help. Here's the code: while($row = mysql_fetch_assoc($getID)) { echo "<tr>"; echo "<td><a href='View.php?id='" . $row['ID'] . "'>" . $row['ID'] . "</a>" . "<br />" . "-" . $row['Description'] . "</td>"; echo "<td style='text-align:center; width:35%'>" . $row['dateCreated']. "</td>"; echo "</tr>"; } In View.php I have this to try and debug: if (isset($GET['ID'])) echo $GET['ID']; else "Not set"; When I am redirected to this page, nothing displays and the url reads View.php?id= Why is it …

Member Avatar
Member Avatar
+0 forum 7

I always getting this error in my dropdownlistfor: Value cannot be null. Parameter name: items View code: @Html.DropDownListFor(model => model.SiteId, new SelectList(ViewBag.ListSiteClass, "SiteId", "SiteName"), "", new { @onchange = "GetSiteid(this.value);" }) Controller Code: [HttpPost] public ActionResult Create(ServiceDTO ms, FormCollection form) { if (ModelState.IsValid) { int sid = ms.SiteId; ServiceDAO.Insert(sid); } else { return View(); } } In loading View: public ActionResult Create() { List<SiteDTO> LSSiteNameList = SiteDAO.GetSiteNameList(User.Identity.Name); ViewBag.ListSiteClass = LSSiteNameList; var service = new ServiceDTO(); return View(service); }

Member Avatar
Member Avatar
+0 forum 14

Just asking about the relevancy/meaning of 'page' in requests based on 'members'. e.g. http://www.daniweb.com/api/members?page= http://www.daniweb.com/api/members/{:IDS}?page= When used in this manner, I seem to get a random bunch of members (when not set to 1), regardless of IDS. How many members/page ?

Member Avatar
Member Avatar
+1 forum 9

Hi everyone, I am working on a wee small project using cURL. From the documentation, it states "The Server will HTTP POST a string in a parameter called (INCOMING)" to the given callback URL. I know the list of parameters in the string as this is given in the documentation, What I dont know how to do, is "echo" the value(s) of each parameter in the string. I have tried using _POST foreach($_POST as $key=>$value){ echo $key, ' => ', $value, "<br/>\n"; } $QueryID = $_POST['QueryID']; if($QueryID) { echo '<p/>QueryID: ', $QueryID, "<br/>\n"; } else { echo '<p>No ID parameter.</p>'; …

Member Avatar
Member Avatar
+0 forum 3

Hello ! I'm developing a WebApp using [this example](http://www.primefaces.org/showcase/ui/datatableRowSelectionByColumn.jsf) where I: 1. Connect to MySQL and download data. 2. Populate dataTable with downloaded data using. 3. Fetch(view button) the record and display its details in a dialog. Problem begins when I download the records and click on the viewButton(no matter what record) it displays in a dialog only the first downloaded record. My problem is in line: > <f:setPropertyActionListener value="#{car}" target="#{tableBean.selectedCar}" /> The aplication pattern: jsp -> managedBean -> sessionBean -> entityBean My code: JSP: <h:form id="form"> <p:growl id="msgs" showDetail="true" /> <p:dataTable id="dataTable" selection="true" value="#{cars.getCarList()}" var="car" style="font-size: 12px"> <f:facet name="header"> …

Member Avatar
Member Avatar
+0 forum 1

I have a bash script (test.sh) which reads parameters from the command line. The parameters could look like this: param1 param2 param3&ext param4 param5 The problem is that when the script reads the parameters and then echo them I get the following: param1 param2 param3 No command 'ext' found did you mean: <different commands from different packages> ext: command not found [1]+ Done ./test.sh param1 param2 param3 I want the output to look like this: param1 param2 param3&ext param4 param5 The source code of my script is: #!/bin/bash # # test script # echo $1 echo $2 echo $3 echo …

Member Avatar
Member Avatar
+0 forum 9

ok i dont quite know why i keep getting these error in my program.. here is the program: #include<stdlib.h> #include<stdio.h> #include<math.h> Void open(void); int read(float*); float average(float*); void write(float*,float); void close(void); FILE *fptrin,*fptrout; main() { float number[10],non,ave; open(); read(number); non=read(number); ave=average(number,non); write(number,ave,non); close(); return(0); } void open(void) { fptrin=fopen("avg.dat""r"); if(fptrin==0) { printf("\nFile Will Not Open!!!!\n); exit(0); } return; void close(void) { fclose(fptrin); fclose(fptrout); return; } void write(float *number,float,ave,int non) { int i; for(i=0;i<non;i++) { fprintf(fptrout,"%f\n",number[i]; printf("\n%f",number[i] } fprintf(fptrout,"%f",ave); printf("\n%f",ave); return; } int read(float *number) int i,done; for(i=0;i<non;i++) { done=fscanf(fptrin,"%f",&number[i]; if(done==-1)break; } return(i); float average(float *number,int non) float sum,avg; printf(\navg is …

Member Avatar
Member Avatar
+0 forum 2

in this program i'm writing the functions that have qt classes as parameters Qlabel, QSpinbox, etc. are causing compile errors, my other functions work fine i get the same 2 errors for each QT object i use as an argument this is the function definition that uses QT classes as 3 of the parameters the first isnt [CODE] void fraction::displayfraction(fraction toDis, QLabel nWhole, QLabel nNum, QLabel nDen) { nWhole.setText(QString::number(toDis.Whle())); nNum.setText(QString::number(toDis.Num())); nDen.setText(QString::number(toDis.Den())); }[/CODE] this is a test function call that causes the error [CODE]MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) { ui->setupUi(this); fraction myfraction(7,4,5); QLabel d; QLabel n; QLabel w; /*error function*/myfraction.displayfraction(myfraction,w,n,d); …

Member Avatar
Member Avatar
+0 forum 3

i have this problem for checking for duplicate username in database. this error appear whether the username is duplicate and does not duplicate. Please help. Warning: mysql_num_rows() expects parameter 1 to be resource, boolean in <?php include_once 'db/db.php'; include_once 'admin-class.php'; $admin = new itg_admin(); if(isset($_POST['Submit'])) { $con = mysql_connect("localhost","username","password","tablename"); if (!$con) { die('Could not connect: ' . mysql_error()); } //---Encrypt ---// $confirmcode=md5(uniqid(rand())); $password=md5($_POST['password']); //---Insert value to table---// mysql_select_db( 'tablename' ); $getduplicates = mysql_query("SELECT * FROM users WHERE username =$_POST[username]"); $duplicates = mysql_num_rows($getduplicates); if($duplicates){ echo "Username has been used.Please choose another username"; ?> <script type="text/javascript"> alert("Username has been used.Please choose another …

Member Avatar
Member Avatar
+0 forum 2

(I'm a Computer Science 101 student writing programs in C on a virtual Linux machine.) Suppose I wanted to apply a single (arbitrary) function to every element of an array, one at a time. Doing this once is easy enough, but I'd like to find a method that could accomplish the task in a variety of scenarios. In other words, I'm trying to make a function that would do this: /* With "array[y][x]" already defined and containing values */ int i, j; for (j = 0; j < y; j++) { for (i = 0; i < x; j++) { …

Member Avatar
Member Avatar
+0 forum 1

HI I would like to modify the following function so that it could take any of the operators such as +,-,* or /. I want to know if its possible to do this without having to write bunch of ifs and else to define each of the operators separatly like i did the division one. template <typename t> t reduceArray(t myArray[], int size, char op) { if(size < 0 && op == '/') return 1; else if(size == 0) return myArray[size]/reduceArray(myArray, size-1, op); else return reduceArray(myArray, size-1, op)/myArray[size]; } .. .. .. What I want to accomplish is this int …

Member Avatar
Member Avatar
+0 forum 4

Let's say I have a method called 'test' which should return the arraylist called 'theList' containing X number of Integers. How would I do that? public static void test(){ SOME CODE ... return theList } What should 'void' and 'theList' be replaced with in that code to make it work?

Member Avatar
Member Avatar
+0 forum 2

import java.util.*; public class GenericDemo4 { public static void main(String r[]) { Set s1 = new HashSet(); s1.add(0); s1.add("1"); dostuff(s1); } static void dostuff(Set<Number> s) { do2(s); Iterator i = s.iterator(); while(i.hasNext()) System.out.println(i.next() + " "); Object [] oa = s.toArray(); for(int x = 0; x<oa.length; x++) System.out.println(oa[x] + " "); System.out.println(s.contains(1)); } static void do2(Set s2) { System.out.println(s2.size() + " "); } } On line 10 there is a type-safe set as a parameter for the method dostuff and it accepts non generic Set s1. How can it not flag an error for one of it's element being a …

Member Avatar
Member Avatar
+0 forum 7

Hello, i am programming an API so far i've coded so i can create new customers but my taughts here is that i have a function (i think that is the right word for it) public void writeCustomer (string CustomerNumber, string CustomerOrgNumber, string CustomerName, string PostAdr, string PostAdr2, string GLN, string VisitingAdr ) { //write to the API code code } but is this an good way to go? before im finnished i will have about 10-15 or more parameters that need to be in there aswell. is it good to use struct to save memory? with all the strings? …

Member Avatar
Member Avatar
+0 forum 14

Hello everybody! I'm currently creating my first employee monitoring system here in Visual Basic 6. I have a problem with regards to my program, it has an error of no value given for one or more parameters. The code that I will show here is just a part of my program (a form specifically). Please help me guys! Private Sub Combo1_Click() If Combo1.Text = "Employee_Name" Then Adodc1.RecordSource = "Select Employee_Name from Table1" Adodc1.Refresh End If If Combo1.Text = "Employee_ID" Then DataGrid1.DefColWidth = "1900" Adodc1.RecordSource = "Select Employee_ID from Table1" Adodc1.Refresh End If If Combo1.Text = "Employee_Position" Then Adodc1.RecordSource = "Select …

Member Avatar
Member Avatar
+0 forum 3

Hi I am trying to automate svn checkouts using python script. this below command works from windows command prompt. I tried to use subprocess.call and subprocess.Popen , C:/Program Files/TortoiseSVN/bin/TortoiseProc.exe /command:checkout /url: http://xxx-svn/svn/branches/Common/module/Common_Jars_v1_1/lib /path:D:/svn-test1 /closeonend:2 it is not able to recognise the parameter > C:\Users\rajesh\Desktop>python svn-test.py > Traceback (most recent call last): > File "svn-test.py", line 5, in <module> > process = subprocess.call(["C:\\Program Files\\TortoiseSVN\\bin\TortoiseProc.exe /command:checkout"], stdout=subprocess.PIPE) > File "C:\Python32\lib\subprocess.py", line 471, in call > return Popen(*popenargs, **kwargs).wait() > File "C:\Python32\lib\subprocess.py", line 745, in __init__ > restore_signals, start_new_session) > File "C:\Python32\lib\subprocess.py", line 964, in _execute_child > startupinfo) > WindowsError: [Error 2] The …

Member Avatar
Member Avatar
+0 forum 2

i have added the $random in line 53 and '$random' ,'0' in 57 line inside the (),in the database i have added random and activated with boolean value which is 0 or 1,and when i click the previu/debug in browser button it show me this: Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\site 2\register.php on line 22 Please fill in all fields! when i click in another page the register link i open normaly not like this,where is the problem?? <?php $submit = @$_POST['submit']; //form data $fullname = strip_tags (@$_POST['fullname']); $username = strtolower(strip_tags (@$_POST['username'])); $password= strip_tags(@$_POST['password']); …

Member Avatar
Member Avatar
+0 forum 5

Hi Friends **Example:** URL: http://localhost/sitename/page=name i want to print **name** in my page. like You Are Here: Home ยป **name** Please can any one help me.

Member Avatar
Member Avatar
+0 forum 2

The End.