Forum Array

Skip Optional Arguments In A Function Call?

OK I totally forgot how to skip arguments in PHP. Lets say I have: checkbox_field ( $name, $value = '', $checked = false, $compare = '', $parameter = '' ) How would I call this function and skip the second last argument? checkbox_field('some name', 'some value', FALSE, '' , 'some parameter'); Would the above be correct? I can't seem to get this to work.

View Answers

Very Similar Questions

Call COM Function With OLE_COLOR As An Argument?
stackoverflow.com
I am trying to call a COM object from PHP using the COM interop extension. One function requires an OLE_COLOR as an argument? Is there any way to pass this kind of value from PHP? I have tried passing a simple integer value with no success. $this->oBuilder->Font->Color = 255;

Access Function Argument In Different Function?
stackoverflow.com
I have this function: <?php myWidget() { ?> <div id="<?php echo $args['widget_id']; ?>"> <p>Something</p>[code]... (widget_id is Wordpress core function so I have no direct access to that, it just simply generates widgets name)I wanted to add my widget as a shortcode so needed to create another function: function myWidget_shortcode( $atts ) { extract( shortcode_atts( array( /* attributes here */ [code].... the_widget just simply calls widget called myWidget.The point is, everything works good, but id=" " is always empty when I use the second code.I know it's a Wordpress question, but I believe this has more to do with my PHP code.

SetInterval Of Function - Called From Function - Display And Update
www.codingforums.com
I'm trying to make a time script for an app I'm making (this is not an HTML document; it's a .js file to be used with Titanium) however I'm having trouble getting the function to display and update. function updateClock() { setInterval ( 'kiTime()', 1000 ); } function kiTime () { //Get current date and time [Code]... If I use kiTime() under the text field I will get the current time (or at least the time the app was opened), however if I call updateClock() it's blank.

Pass Array Elements As Function Arguments
bytes.com
I have a function which can be called with an unlimited number of arguments. I want to call another function with exactly the same arguments. I know I can get the arguments in the arguments object, and as such also in an array, but how do you pass the elements of an array to another function as parameters?

How To Get Argument Name For Some Function?
bytes.com
For example: function test($left, $right) { } $ret = some_php_api('test'); print_r($ret); //it would be /* array( 1 ='left', 2 ='right', ) */

Using A Function Irrespective Of The Argument
phpbuilder.com
i would like to run a function on a variable but im not sure whether it will be an array or a string. What is the most effective way of doing this? say to run trim() on every value in the array or if it is not an array on the string itself.

Getting Function's Argument Names
stackoverflow.com
in PHP Consider this function: function test($name, $age) {} I need to somehow extract the parameter names (for generating custom documentations automatically) so that I could do something like: get_func_argNames('test'); and it would return Array['name','age'] .

Variable Creation From A Function Argument?
www.daniweb.com
I have come across some code in someone's API that I wish to use myself and I wonder if anyone could advise me on how to use properly.. I am able to call function <?php playerProfile($array); ?> without any return value. Subsequently, in my php I can retrieve with - <?php print $array["variablename"]; //this has a value inside of it ?> It seems like calling that function creates an $array with local scope, yet the initial call to playerProfile() did not have a return value..Does anyone know what I must put in the function definition to mimic this behaviour? Do I need a particular

Command Button: Call Function And Wait Till It&#039;s Done
www.vbforums.com
How can I wait till a function if dome then continue i.e.Private Command1_Click() FirstThingToDo 'Wait till the first is done 'Then SecondThingToDoEnd SubThanks in advance.

Command Button: Call Function And Wait Till It&#039;s Done
www.vbforums.com
How can I make a command button wait till a function it called is done, only then continue?I.E.:Private Command1_Click()check-something-long()'wait till it's done then carry onmore things!End SubThanks in advance!

Calling Function For Command Button
www.vbforums.com
hi, i'm a newbie on programming. i am using smart card reader and have the sdk(gsdkpcsc.dll) for programming.then, i already wite down all the declaratiion for the module.i also have made the command button.my project is, i) when click at the READ button, it will start communication with smart card in the card reader, then it'll get the identification number from the smart card, 12 digit.then, the number appeared at text boxii) by clicking verify buuton,the 12 digit number is compared with the database with m Accessiii) if matches with databse, then it will send a unique charachter such as AEI at the serial port of my microcontrooler. this project is for 2 user.iv) if not match, then it says, access is denied.my problem s, i need help on the code lines for READ and VERIFY..can anyone help?READ > open session, commnubication, get dataVERIFY > match with database and send AEI(user 1), IOU(user 2) to serial port i need to get 12 digit numb for this function Declare Function JPN_IDNum Lib "gsdkpcsc.dll" _my module code :/********************************************************Option Explicit'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@' General Declaration'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@VB Code:Declare Function OpenReader Lib "gsdkpcsc.dll" Alias "_OpenReader@0" _() As Integer    ' open communication session with the card reader Declare Function cardConnect Lib "gsdkpcsc.dll" Alias "_CardConnect@12" _(ByVal port As Integer, ByVal Rdrname As String, ByVal nRdrLen As Integer) As Long' open communication session with the card in the reader Declare Function CardDisconnect Lib "gsdkpcsc.dll" _Alias "_CardDisconnect@0" _() As Integer' Closes communication session with the card in the reader Declare Function CloseReader Lib "gsdkpcsc.dll" Alias "_CloseReader@0" _() As Integer' Closes communication session with the card reader Declare Function CardDetect Lib "gsdkpcsc.dll" Alias "_CardDetect@4" _(ByVal pcExplanation As String) As Integer' Checks if card is in card reader Declare Function ResetCard Lib "gsdkpcsc.dll" Alias "_ResetCard@0" _() As Long' Reset the card Declare Function GetError Lib "gsdkpcsc.dll" Alias "_GetError@0" _() As Integer' returns information on last error that occured Declare Function SelJPNApp Lib "gsdkpcsc.dll" Alias "_SelJPNApp@0" _() As Integer' select JPN to read JPN data Declare Function SelJPJApp Lib "gsdkpcsc.dll" Alias "_SelJPJApp@0" _() As Integer' select JPJ to read JPJ data Declare Function SelIMMApp Lib "gsdkpcsc.dll" Alias "_SelIMMApp@0" _() As Integer'Select IMM to read IMM data '*************************************************************************'                            JPN section'************************************************************************* Declare Function JPN_OrgName Lib "gsdkpcsc.dll" _Alias "_JPN_OrgName@4" _(ByVal pbOrgName As String) As Integer'original name in 150 bytes Declare Function JPN_MyKadName Lib "gsdkpcsc.dll" _Alias "_JPN_MyKadName@4" _(ByVal pbMyKadName As String) As Integer' 3 lines of name stored in blocks 0f 30+30+20=80 Declare Function JPN_KPTName Lib "gsdkpcsc.dll" _Alias "_JPN_KPTName@4" _(ByVal pbKPTName As String) As Integer' KPTName is 40bytes , 2 lines of name stored in blocks of 20+20=40 Declare Function JPN_IDNum Lib "gsdkpcsc.dll" _Alias "_JPN_IDNum@4" _(ByVal pbIDNum As String) As Integer' ID number in 13bytes Declare Function JPN_Gender Lib "gsdkpcsc.dll" _Alias "_JPN_Gender@4" _(ByVal pbGender As String) As Integer' Gender is 1 byte(L for lelaki , P for perempuan) Declare Function JPN_OldIDNum Lib "gsdkpcsc.dll" _Alias "_JPN_OldIDNum@4" _(ByVal pbOldIDNum As String) As Integer' Old ID Number is 8 bytes Declare Function JPN_BirthDate Lib "gsdkpcsc.dll" _Alias "_JPN_BirthDate@4" _(ByVal pbBirthDate As String) As Integer' Date of birth is 4 bytes (numeric) Declare Function JPN_BirthPlace Lib "gsdkpcsc.dll" _Alias "_JPN_BirthPlace@4" _(ByVal pbBirthPlace As String) As Integer Declare Function JPN_DateIssued Lib "gsdkpcsc.dll" _Alias "_JPN_DateIssued@4" _(ByVal pbDateIssued As String) As Integer Declare Function JPN_Citizenship Lib "gsdkpcsc.dll" _Alias "_JPN_Citizenship@4" _(ByVal pbCitizenship As String) As Integer Declare Function JPN_Race Lib "gsdkpcsc.dll" _Alias "_JPN_Race@4" _(ByVal pbRace As String) As Integer Declare Function JPN_Religion Lib "gsdkpcsc.dll" _Alias "_JPN_Religion@4" _(ByVal pbReligion As String) As Integer Declare Function JPN_EastMsian Lib "gsdkpcsc.dll" _Alias "_JPN_EastMsian@4" _(ByVal pbEastMsian As String) As Integer Declare Function JPN_RJ Lib "gsdkpcsc.dll" _Alias "_JPN_RJ@4" _(ByVal pbRJ As String) As Integer *******************************************************/Edit: Added [vbcode][/vbcode] tags for clarity. - Hack

Calling Function For Command Button
www.codeguru.com
hi, i'm a newbie on programming. i am using smart card reader and have the sdk(gsdkpcsc.dll) for programming.then, i already wite down all the declaratiion for the module.i also have made the command button.my project is, i) when click at the READ button, it will start communication with smart card in the card reader, then it'll get the identification number from the smart card, 12 digit.then, the number appeared at text boxii) by clicking verify buuton,the 12 digit number is compared with the database with m Accessiii) if matches with databse, then it will send a unique charachter such as AEI at the serial port of my microcontrooler. this project is for 2 user.iv) if not match, then it says, access is denied.my problem s, i need help on the code lines for READ and VERIFY..can anyone help?READ > open session, commnubication, get dataVERIFY > match with database and send AEI(user 1), IOU(user 2) to serial port i need to get 12 digit numb for this function Declare Function JPN_IDNum Lib "gsdkpcsc.dll" _my module code :/********************************************************Option Explicit'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@' General Declaration'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@Declare Function OpenReader Lib "gsdkpcsc.dll" Alias "_OpenReader@0" _() As Integer ' open communication session with the card readerDeclare Function cardConnect Lib "gsdkpcsc.dll" Alias "_CardConnect@12" _(ByVal port As Integer, ByVal Rdrname As String, ByVal nRdrLen As Integer) As Long' open communication session with the card in the readerDeclare Function CardDisconnect Lib "gsdkpcsc.dll" _Alias "_CardDisconnect@0" _() As Integer' Closes communication session with the card in the readerDeclare Function CloseReader Lib "gsdkpcsc.dll" Alias "_CloseReader@0" _() As Integer' Closes communication session with the card readerDeclare Function CardDetect Lib "gsdkpcsc.dll" Alias "_CardDetect@4" _(ByVal pcExplanation As String) As Integer' Checks if card is in card readerDeclare Function ResetCard Lib "gsdkpcsc.dll" Alias "_ResetCard@0" _() As Long' Reset the cardDeclare Function GetError Lib "gsdkpcsc.dll" Alias "_GetError@0" _() As Integer' returns information on last error that occuredDeclare Function SelJPNApp Lib "gsdkpcsc.dll" Alias "_SelJPNApp@0" _() As Integer' select JPN to read JPN dataDeclare Function SelJPJApp Lib "gsdkpcsc.dll" Alias "_SelJPJApp@0" _() As Integer' select JPJ to read JPJ dataDeclare Function SelIMMApp Lib "gsdkpcsc.dll" Alias "_SelIMMApp@0" _() As Integer'Select IMM to read IMM data'*************************************************************************' JPN section'*************************************************************************Declare Function JPN_OrgName Lib "gsdkpcsc.dll" _Alias "_JPN_OrgName@4" _(ByVal pbOrgName As String) As Integer'original name in 150 bytesDeclare Function JPN_MyKadName Lib "gsdkpcsc.dll" _Alias "_JPN_MyKadName@4" _(ByVal pbMyKadName As String) As Integer' 3 lines of name stored in blocks 0f 30+30+20=80Declare Function JPN_KPTName Lib "gsdkpcsc.dll" _Alias "_JPN_KPTName@4" _(ByVal pbKPTName As String) As Integer' KPTName is 40bytes , 2 lines of name stored in blocks of 20+20=40Declare Function JPN_IDNum Lib "gsdkpcsc.dll" _Alias "_JPN_IDNum@4" _(ByVal pbIDNum As String) As Integer' ID number in 13bytesDeclare Function JPN_Gender Lib "gsdkpcsc.dll" _Alias "_JPN_Gender@4" _(ByVal pbGender As String) As Integer' Gender is 1 byte(L for lelaki , P for perempuan)Declare Function JPN_OldIDNum Lib "gsdkpcsc.dll" _Alias "_JPN_OldIDNum@4" _(ByVal pbOldIDNum As String) As Integer' Old ID Number is 8 bytesDeclare Function JPN_BirthDate Lib "gsdkpcsc.dll" _Alias "_JPN_BirthDate@4" _(ByVal pbBirthDate As String) As Integer' Date of birth is 4 bytes (numeric)Declare Function JPN_BirthPlace Lib "gsdkpcsc.dll" _Alias "_JPN_BirthPlace@4" _(ByVal pbBirthPlace As String) As IntegerDeclare Function JPN_DateIssued Lib "gsdkpcsc.dll" _Alias "_JPN_DateIssued@4" _(ByVal pbDateIssued As String) As IntegerDeclare Function JPN_Citizenship Lib "gsdkpcsc.dll" _Alias "_JPN_Citizenship@4" _(ByVal pbCitizenship As String) As IntegerDeclare Function JPN_Race Lib "gsdkpcsc.dll" _Alias "_JPN_Race@4" _(ByVal pbRace As String) As IntegerDeclare Function JPN_Religion Lib "gsdkpcsc.dll" _Alias "_JPN_Religion@4" _(ByVal pbReligion As String) As IntegerDeclare Function JPN_EastMsian Lib "gsdkpcsc.dll" _Alias "_JPN_EastMsian@4" _(ByVal pbEastMsian As String) As IntegerDeclare Function JPN_RJ Lib "gsdkpcsc.dll" _Alias "_JPN_RJ@4" _(ByVal pbRJ As String) As Integer*******************************************************/

Call Javascript Function From Code Behind After Server Side Code Executes
stackoverflow.com
I have an asp.net button, that when clicked calls a code behind function. The function does some evaluation, and then I want to call javascript from within this asp.net function.

C# - Copy Several Textboxes Data Into Target Textbox Calling Same Function
stackoverflow.com
I have several input textboxes with different id and class name. I want to track changes in any of the input textboxes, and reflect it into target textbox, but don't want to replicate the function for every individual textbox. Is it possible to use one function for all?

How To Pass Object To Function Called With SetInterval
www.webdeveloper.com
I want to pass the object to a function that is called with a setInterval, like so: Code: function Test(obj) { divTest.innerText = obj.id; } function ClickMe(obj) { itv = setInterval( 'Test(' + obj + ')' , 10 ); } So when I click a link I want to execute every 10 msec a test. This off course does not work.

JQuery :: .toggle() Called By Window.setInterval() Not Functioning
stackoverflow.com
I am trying to alternate between two logos every 5 seconds using the following code: window.setInterval( function () { //breakpoint 1 $("#logo").toggle( [Code].... I can get a simple toggle to work, but when I introduce the toggle within window.setInterval(), the toggle's two handlers won't fire. I set breakpoints on the lines directly beneath the comments in the code above. Breakpoint 1 hits every 5 seconds. However, Breakpoint 2 and 3 never hit. Why are neither of the toggle function's handlers firing?

Jquery :: Timing - Setup A Worker Function Thats Called Every 5ms By SetInterval
stackoverflow.com
Im working on processing data. I setup a worker function thats called every 5ms by setInterval. I'm calculating the amount of time it takes the function to run, its 0 to 1ms. I'm also calculating the speed at which the function is actually invoked and its about 80ms. My question is, if it takes only 1ms to run through the function, and I'm calling it every 5ms, why is it invoked every 80ms? I do have a second worker function updating the canvas based on the current data the processing function is doing, but its run in its own setInterval. These numbers were taken while in Chrome. I've tested in Opera, Safari, FF3 and FF4 as well and the issue is the same, though the invoke time is different. (all this on a mac) I know this code does not yet work in IE. I know parts of this are ugly.. I haven't started to clean up the code yet... Lines 77 to 84 are the setInterval calls. You can see a working example here:

Call Database Row Into A Function?
stackoverflow.com
I am writing a function which is called into a page, but I am not sure how to call information form database into the function in order to use them. Basically I am doing some calculation in the function where I need information form database to do them. From a comment... What I am trying to do is this: I have a page in php which retieves some info from database and all works fine. I am writing a function that needs to make some calculation based on some fields in the database. What I cannot solve is how to get this information form the database into my function. I have tired this: function CalculateCost () { $low_season = $row_rsbooking['cost']; etc. etc. then making some calculations but I am getting nowhere. I am not sure if the function is getting the information form database in order to make calculation.

Error: Call To A Member Function Add_current_page()
www.phpfreaks.com
OK, im not too crash hot on classes, so hoping someone can help me with this error: QuoteFatal error: Call to a member function add_current_page() on a non-object in /path/to/includes/application_top.php on line 312 This is from an osCommerce application (I know someone will probably tell me to post in 3rd party scripts, but I am more interested in whats generally causing the error). The thing that confuses me is that application_top.php is only 236 lines long.

Call To Undefined Function Hash() In /var/www/site/
stackoverflow.com
I have called hash function in my code like (php version 5.2.14 ) $username =hash("sha256",trim($_POST['username'])); $password =hash("sha256",trim($_POST['password'])); but I got error like Call to undefined function hash() in /var/www/site/

Call A Js Function On Pressing Enter Key?
stackoverflow.com
I'd like to know how I can initiate a javacsript function when pressing the enter key. I'm trying to create a function called handleEnter(event, fn). I want to use the function on an input field eg code...

JQuery :: Allow Calling Function To Override Default Options
stackoverflow.com
I want the calling Function to be able to override the default options provided in the showDivPopUp function. function calling(){ showDivPopUp("title of pop up box", "message to show", { buttons:{ Yes: function () { $(this).dialog("destroy"); }, No :function () { $(this).dialog("destroy"); }}});} function showDivPopUp(title,msg,options){ var mgDiv = $("#msgDiv"); mgDiv.attr("innerHTML", msg); return mgDiv.dialog({ modal: true, buttons: { Ok: function () { $(this).dialog("destroy"); }}, resizable: true, show: "explode", position: "center", closeOnEscape: true, draggable: false, title : titl, open: function (event, ui) { $(".ui-dialog-titlebar-close").hide(); } });} So, the above code should show two buttons viz. Yes and No instead of just OK. I don't want to do if check for each option. In options parameter there might be options for which default is not applied. So the calling function may specify size option which is not mentioned in the showDivPopUp function.

Call A Function And Get The Error?
www.phpbuilder.com
If I do not have anything in a sql database and I call a function will I get this error?

Checking If An Argument In A Function Is Not Called?
www.phpfreaks.com
im creating a function that detects if the user is coming from an Iphone, Ipad or internet explorer. If i call the function browsercheck(iphone); i want it to specifically check if it is an iphone. And the same goes with Ipad and MSIE. That part of the script I have got to work. But what i want is that if the function is called just like browsercheck();  without an argument is automatically detects what the user agent is and then acts accordingly. The problem I have is writing the part of the code that looks if the variable $agent which is the argument is empty, and if so act upon that, and if its not empty, carry on with the rest of the function. Code: [Select]<?php /* This function is used for checking the user is coming from the correct platform, and if not it will redirect them */ function browsercheck ($agent) { $useragent = getenv("HTTP_USER_AGENT"); if (isset($agent)){ [Code]....

Put The Value As An Argument Of A Function?
stackoverflow.com
supposed a variable named $xlnum value is as this 20,4,56,987,68,96.....the variable $xlnum value is input by the vistor. the next i will passed the value to a sql query. if the value is one. that i can know how to do it. eg: $result=mysql_query("select nid,title form node where nid=20"); while($row = mysql_fetch_object($result)) { echo $row->nid; echo $row->title; } but now the value is 20 4 56...,i want to loop out all the nid and title of 20,4,56,987,68,96.....how do i do.

Can 'get_class($this)' Be Used As An Argument In Defining A Function?
phpbuilder.com
Can 'get_class($this)' be used as an argument in defining a function? function is_class(get_class($this)) {    if (get_class($this) == 'classx')    {        return true;     } } PHP Code:

Deleting Files Using Unlink [function.unlink]: Permission Denied
www.sitepoint.com
I have a record in the db and a picture file name recorded with that record. I am writing a deletion routine which checks that file name and is supposed to delete it using unlink. Although it reports the correct directory and file name, I received the following: Warning: unlink(/home/pab/html/pics/test.jpg) [function.unlink]: Permission denied I checked my permissions and the file is set at my user name and 666. Does anyone know why this won't work or maybe another way to delete the file?

Warning: Unlink() [function.unlink]: Permission Denied In C:Program
www.phpfreaks.com
i'm getting this error when i try to upload an image- Warning: unlink() [function.unlink]: Permission denied in C:Program Filesxampphtdocsepeopleupim.php on line 79 Does this mean i need to change the directory permission to allow php to move/copy an image into the directory?  if so, can i right-click on directory folder (i use windows xp) and go into properties and change the permissions in there? If so, what do i change it to? Code:

Create A Function That Will Use The File Read Function But Not Read The Codes Inside That File
www.phpfreaks.com
What I want to do: What I want to do is create a function that will use the file read function but not read the php codes inside that file. e.g. <?php print "hello"; ?> would just send out the word hello, php codes that get information from a database would do the same, it would print out the information being written by the php code. Example of the database php codes: <?php $sql = "SELECT * FROM TABLE"; $res = mysql_query($sql); if($mysql_num_rows($res)){ while($row = mysql_fetch_array($res)){ print $row["table_data"]; } } ?> Lets say $row["table_data"] equals the name "Bob", that php code will send out the name Bob plus other names that could be printed from that php code and leave the php coding out so it does not get printed after  being put through the ReadFile function. [Code].... All the function above does is reads the file and that means the text between the <? & ?> tags also get read, what I want to know is how I could make a function that calls the page as it is ment to be shown. E.G. - If I wanted to get the current year and on the "footer.inc" page I write <?=date('Y');?> what fopen does is read that as it is but what I need it to do is to run the code as it would normaly do and for example it would print out "2010" and thats what fopen would read. So <?=date('Y');?> on the footer.inc file will print out 2010 after going through the ReadFile function.

Adding A Function To A Command Button.
www.vbforums.com
I'm developing an atm simulation for my college project and I'm trying to assign the delete funtion to a command button so that when a user presses the 'cancel' button using a mouse (there is no keyboard on an atm only a numberpad) it deletes the last number entered.Can anyone help me on how I can assign the delete funtion to a comman key?Mark.Added [RESOLVED] to thread title and green "resolved" checkmark - Hack

Process An Array In Function With External Formatting
stackoverflow.com
I want to pass an array to a function and iterate through it in this function. But I would like to be able to change the way the single entries are displayed. Suppose I have an array of complicated objects: $items = array($one, $two, $three); Right now I do: $entries = array(); foreach($items as $item) { $entries[] = create_li($item["title"], pretty_print($item["date"])); } $list = wrap_in_ul($entries); I would like to do the above in one line: $list = create_ul($items, $item["title"], pretty_print($item["date"])); Any chance of doing that as of PHP4?

Write Function To Retrieve Contents Of Webpage?
stackoverflow.com
I want to write a function to retrieve the contents of a webpage so it works like: $url = "example.com"; $pageContent = RetrievePageContent($url); What would be the easiest way to do this?

Warning: File_get_contents() [function.file-get-contents]: URL File-access Is Disabled In The Se...
stackoverflow.com
i got an error message when i try to do file_get_contents() function Warning: file_get_contents()[function.file-get-contents]: URL file-access is disabled in the server configuration in /data/20/1/112/111/1927437/user/2100551/htdocs/cti-dev/admin/my path My site is https.

Output Current File Contents Without File Reading Functions?
stackoverflow.com
I have an interesting task here.. is it possible to read the current file contents without file reading functions? (without file_get_contents, fopen etc.) so if i have <? echo 'hi'; // function to output this file code ?> the output of the php file should be same as the code (BUT without the file reading functions)

Building A Function
www.xtremevbtalk.com
I am trying to learn to write a function. When I click a button to call the function I get an "Argument not optional" error with SelDate(Mon & Da & Yr) highlighted. Here is my code. Could someone point to what I am doing wrong? Thanks Code:Public Function SelDate(Mon As Double, Da As Double, Yr As Double) As Double Mon = Val(Form1.Monthtxt.Text) Da = Val(Form1.Datelb(SD).Caption) Yr = Val(Form1.txtYear.Text) SelDate = CDate(Mon & "/" & Da & "/" & Yr) End FunctionPrivate Sub Command1_Click() Dim Mon As Double Dim Da As Double Dim Yr As Double Dim Datex As Date Mon = Val(Form1.Monthtxt.Text) Da = Val(Form1.Datelb(SD).Caption) Yr = Val(Form1.txtYear.Text) Datex = SelDate(Mon & Da & Yr) MsgBox Datex End Sub

Using Batch File To Pass Command Line Arguments To Access 2000
www.xtremevbtalk.com
Hello allI am writing a few batch file that start a Access 2000 DB. I wish to pass an argument to start up the correct application after a splash sceen has been displayed.I have tried the "msaccess_path.exe" "DBName.mdb" cmd/ "parameter" but when I use the Command function in VB there is nothing passed in. I have tried making the mdb an mde and using - DBName Parameter but again no luck.Are the help files lying to me or am I a num nut.Pleased to hear from anyone.ThanksMatty

Launching VB App From Html With Command Line Argument
www.xtremevbtalk.com
I cannot for the life of me come up with the syntax to launch my VB6 app via html and pass a command line argument. In this case I want to pass "M" on the command line to the app. But this certainly is not the correct syntax. Any ideas? Thanks.Code:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><title>Untitled Document</title><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></head><body><a href="file:///m:/Engid 1.2/VB Application/IDCODE.exe M">Run Myapp</a> </body></html>

Samsung Fascinate :: Setting Up The Facebook Function?
androidforums.com
i've having a really tough time getting my phone to link up to the facebook widget thingy.... i've tried all sorts of things but it wont link up...

Sony Ericsson Xperia X10 :: Importing Address Book In Phone Email Function
androidforums.com
I have set up my sky.com email address as the default email within the function of the phone. All working fine other than I don't seem to be able to import my address book into the phone email function.

Sony Ericsson Xperia X10 :: Do Have Signal But Cant Call Someone Or Receive Calls Or Send Messages
androidforums.com
i have a problem with my x10: some of the sim cards dont work on it.i do have signal but cant call someone or receive calls or send messages but i can use the internet.

Android :: Link To Another Package's Function?
stackoverflow.com
I've got two android apps, one with a public void. How would the other app call this function?

Receive JSON Array As Argument In Web Service?
stackoverflow.com
I'm using a web service programmed in Visual Basic .NET 3.5 to receive a JSON Array sent from other application. I'm sending a JSON string like this one: [{"idRecoleccion":1,"PIN":"553648138"},{"idRecoleccion":2,"PIN":"553648138"}] And I'm receiving the code in Visual Basic .NET as follows: [code]...

ActionScript 2.0 :: What Does Prototyping A Function Do
www.kirupa.com
What does prototyping a function do?i got this from the tile based games site. game.Tile0 = function () { }; game.Tile0.prototype.walkable = true; game.Tile0.prototype.frame = 1;[code]....

ActionScript 3.0 :: Call Javascript Function With JSON Through External Interface?
www.actionscript.org
I need to call a function in JS that's expecting a JSON object. Can I do this from External Interface? The company's example (after the include file url) in HTML looks like this: //there's an js include URL earlier// Shopwithme.Initialize({ "id":"prod1234", [code]... But, I need to dictate these vars through Flash. How do I call this function using External Interface?This is my EI code, but I'm obviously off base, since it's not working: ExternalInterface.call("Shopwithme.Initialize",[{ "id":"prod1234", "type":"2","URL":"http://www.somelink.com"}]); What do I need to do to call this javascript?

Web Forms :: Are Server.Htmlencode,Urlencode Useless Functions!
forums.asp.net
For protect against  XSS  we should make all input from textboxes thoht Server.Htmlencode function. 1) If i let a input go thorgh Server.Htmlencode and save it in database. But what happen if i letter show this input data from database on browerser ...if database input data have <script> it will then make Xss!!!!.  2) I use Server.Htmlencode.. and the user write <b>ss<b>...  (label.text = userinput.text;)  and i WANT to show ss in browser. What shuld i do for make this happen ?? 

Web Forms :: Call A Code Behind Function Form Html Source Code?
forums.asp.net
I want to call a function present in code behind from front page (html : source code) i want to use like this: Source code <a href='<%# linkAlpha("B").ToString()) %>' title="B" id="B_List" runat = "server">B</a> Code Behind protected string linkAlpha(string value) { //  /market-research/<%#Eval("customname")%>/ string str = ""; if (Request.Url.DnsSafeHost == "localhost") {         // /market-reports/<%# Eval("customname")%>/ str = "Alpha_Category.aspx?q=" + value.ToString().Trim(); // Response.Redirect("Alpha_Category.aspx?q=" + value.ToString().Trim()); } else { //    str = "/market-reports/" + value.ToString().Trim() + "/"; str = "/Alpha_Category.aspx?q=" + value.ToString().Trim(); } return str; }

How To Enable These Functions
www.webhostingtalk.com
My site is running with php scripts It's work fire at bluehost but get some error when i move to new VPS . Quote: Warning: fputs(): supplied argument is not a valid stream resource in /home/xxx/public_html/home/admin/update_categories.php on line 171 Warning: fclose(): supplied argument is not a valid stream resource in /home/xxx/public_html/home/admin/update_categories.php on line 173 Warning: fputs(): supplied argument is not a valid stream resource in /home/xxx/public_html/home/admin/update_categories.php on line 225 Warning: fclose(): supplied argument is not a valid stream resource in /home/xxx/public_html/home/admin/update_categories.php on line 227 I want to enable these functions fopen(),fputs(),fclose(),fputs(),fclose() but i don't know how to enable them .Could you tell me details

Call SQL Function With Multiple Parameters From C# Web Page?
stackoverflow.com
I have an MS SQL function that is called with the following syntax: SELECT Field1, COUNT(*) AS RecordCount FROM GetDecileTable('WHERE ClientID = 7 AND LocationName = ''Default'' ', 10) The first parameter passes a specific WHERE clause that is used by the function for one of the internal queries. When I call this function in the front-end C# page, I need to send parameter values for the individual fields inside of the WHERE clause (in this example, both the ClientID & LocationName fields) The current C# code looks like this: String SQLText = "SELECT Field1, COUNT(*) AS RecordCount FROM GetDecileTable('WHERE ClientID = @ClientID AND LocationName = @LocationName ',10)"; SqlCommand Cmd = new SqlCommand(SQLText, SqlConnection); Cmd.Parameters.Add("@ClientID", SqlDbType.Int).Value = 7; // Insert real ClientID Cmd.Parameters.Add("@LocationName", SqlDbType.NVarChar(20)).Value = "Default"; // Real code uses Location Name from user input SqlDataReader reader = Cmd.ExecuteReader(); When I do this, I get the following code from SQL profiler: exec sp_executesql N'SELECT Field1, COUNT(*) as RecordCount FROM GetDecileTable (''WHERE ClientID = @ClientID AND LocationName = @LocationName '',10)', N'@ClientID int,@LocationID nvarchar(20)', @ClientID=7,@LocationName=N'Default' When this executes, SQL throws an error that it cannot parse past the first mention of @ClientID stating that the Scalar Variable @ClientID must be defined. If I modify the code to declare the variables first (see below), then I receive an error at the second mention of @ClientID that the variable already exists. exec sp_executesql N'DECLARE @ClientID int; DECLARE @LocationName nvarchar(20); SELECT Field1, COUNT(*) as RecordCount FROM GetDecileTable (''WHERE ClientID = @ClientID AND LocationName = @LocationName '',10)', N'@ClientID int,@LocationName nvarchar(20)', @ClientID=7,@LocationName=N'Default' I know that this method of adding parameters and calling SQL code from C# works well when I am selecting data from tables, but I am not sure how to embed parameters inside of the ' quote marks for the embedded WHERE clause being passed to the function.

Javascript - Callback Function With Parameters
stackoverflow.com
I'm using AJAX Page Methods, but I can't seem to be able to pass the needed parameters: function getFavStatus() { //favs is a list of DOM <imgs> that I want to modify their img.src attribute for (i = 0; i < favs.length; i++) { PageMethods.isFavorite(favs[i].alt,setFavImg(favs[i])); } } function setFavImg(fav, response) { fav.src = response; } The problem that I can't figure out is how to use the "response" from PageMethods, AND pass the DOM object to the callback function. I've also tried doing something like this: function getFavStatus() { for (i = 0; i < favs.length; i++) { PageMethods.isFavorite(favs[i].alt, function (response) { favs[i].src = response;}); ); } } In this case, the response works properly, but i is always > favs.length, because it has already iterated through the loop... Edit: My PageMethods.isFavorite signature is: [System.Web.Services.WebMethod] public static string isFavorite ( string p_id )

Web Forms :: Doesn't Support The Format() Function?
forums.asp.net
var date1 = new Date(document.forms.a1.startDate.value); alert(date1.getDate() + '...' + date1.getDay() + '...' + date1.getMonth() + '...' + date1.getYear()); The startDate field has 10/18/2009 and the alert() gives 18...0...9...2009Why does getMonth() return 9 instead of 10??When I type in 101809 in the startDate field, how can I convert it to 10/18/2009?I google and see example of the format() function. I try date1.format('mm/dd/yyyy') but it gives error.It doesn't support the format() function.

How To Pass ID To A Vb.net Function Or Sub
forums.asp.net
I have on my aspx page a lots of controls that have runat = "server" on them...like<div id="mydiv1" runat="server"/>In the code behind I want to pass this ID to a vb.net function or sub ?like Private sub mycode(mydiv as ???) end subSo i would do this : mycode(Me.mydiv1)HOws this done ? NOTE: I have posted three times, and the other two never got into the forum !

How To Pass A Null And Another Value Into A Function
bytes.com
Ok, I keep running into this problem In my aspx I am calling a simple function. But the problem is, that the function is either, string, integer, etc. If there's null's in the data, the function explodes because it's set to a string or integer, etc. How can I make the function accept both a null, and another data type so that I can write some if then's to do different things if it is null or another data type. Here is the code to give you an idea [code]....

Pass A Control Name To A Function?
forums.asp.net
I want to pass a control name to a function and the hide/show the control based on string name. Something like that ShowControl(string controlName) { controlname.visible = true; }   Is is possible to achive this

Get Data From Previous Page For Search Function And Display Returned Data Into Gridview
www.vbforums.com
I implemented PreviousPage to get data from previous page for my search function and display the returned data into a gridview. The gridview's allowpaging is enabled, but every time I go to next page, my previous page data is lost... how can I resolve that?

Forms Data Controls :: Replace Function In A Gridview?
forums.asp.net
I am trying to replace carriage returns from a column in a database (MS access) with the br tag. This could be easily done in classic ASP with <% = replace(recordsetField , Chr(13),"<br>") %> Not sure how I would do it with .net (c#)

How To Write Functions And Methods In C Sharp
forums.asp.net
how to write functions and methods in c sharp?Is it not possible to write function in c sharp if not if i want return some value then how should i execute this

AJAX :: "Invalid Argument." Error When Programmatically Changing Tabs
forums.asp.net
I have a TabContainer that has a button in one of the tabs. When i click on the button, I need to save a few items to the database and then select a different tab. I have tried coding this tab change like this: this.tcItems.ActiveTabIndex = 1; And like this: AjaxControlToolkit.TabPanel tabTwo = (AjaxControlToolkit.TabPanel)this.tcItems.FindControl("tabName"); this.tcItems.ActiveTab = tabTwo; In both instances, I receive a scripting error message "Invalid argument." from the file "ScriptResource.axd". After continuing or ignoring these errors (ussually three of them), the page finishes refreshing and the correct tab is selected. I'm just not sure how to get rid of these error messages or why I get them.

AJAX :: Passing Arguments Between Two Forms Using Jquery?
forums.asp.net
I tried using Ajax & Jquery for the following need, but not able to do... I have Two Forms StringMain.aspx & Returner.aspx.... I have created 4 Divs at StringMain.aspx and a sample text "ToCheck" at First Div.. In the Returner.aspx form page load, i placed a label like this protected void Page_Load(object sender, EventArgs e) { Label1.Text = "hello"; } I have set StringMain.aspx as default running page. So When i run StringMain.Aspx page, the text i placed in the First Div "To Check" should concat with the label Text "hello" of Returner.aspx and display it together in the First Div of StringMain.aspx like this "To Check hello".. The Technique i used is $("div#First-Div").load(" Returner.aspx");--But dint work...

Web Forms :: Passing Multiple Parameters To VB.net Function
forums.asp.net
Im wonding what the correct syntax is to pass 2 parameters from a Ascx control into a Vb.net function? Heres what I currently have: <asp:Literal ID="CommentFooterLiteral1" Visible='<%# Eval("Approved") Or IsModerator() %>' Text='<%# FormatFooter(Eval("Anonymous"), Eval("DisplayName"), Eval("CreatedDate")) &#43; " " &#43; GetModeratorStatus(Eval("UserId")) %>' runat="server" /> The Function "FormatFooter", needs to pass in Anonymous and DisplayName parameters. Anyone know the correct syntax for doing this?

Passing Multiple Parameters To A ClientCallBack Function
forums.asp.net
I'm just starting to learn how to do client callbacks.  I got this code from an article to work with.  --Default2.aspx-- <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Default2" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "[URL]"> <html xmlns="[URL]" > <head id="Head1" runat="server"> <title>Client Callback Example</title> <script type="text/ecmascript"> function LookUpStock() { var lb = document.getElementById("ListBox1"); var product = lb.options[lb.selectedIndex].text; CallServer(product, ""); } function ReceiveServerData(rValue) { document.getElementById("ResultsSpan").innerHTML = rValue; } </script> </head> <body> <form id="form1" runat="server"> <div> <asp:ListBox ID="ListBox1" Runat="server"></asp:ListBox> <br /> <br /> <button type="Button" onclick="LookUpStock()">Look Up Stock</button> <br /> <br /> Items in stock: <span id="ResultsSpan" runat="server"></span> <br /> </div> </form> </body> </html> --Default2.aspx.cs-- using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; public partial class Default2 : System.Web.UI.Page, System.Web.UI.ICallbackEventHandler { protected System.Collections.Specialized.ListDictionary catalog; protected String returnValue; protected void Page_Load(object sender, EventArgs e) { String cbReference = Page.ClientScript.GetCallbackEventReference(this, "arg", "ReceiveServerData", "context"); String callbackScript; callbackScript = "function CallServer(arg, context)" + "{ " + cbReference + ";}"; Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "CallServer", callbackScript, true); catalog = new System.Collections.Specialized.ListDictionary(); catalog.Add("monitor", 12); catalog.Add("laptop", 10); catalog.Add("keyboard", 23); catalog.Add("mouse", 17); ListBox1.DataSource = catalog; ListBox1.DataTextField = "key"; ListBox1.DataBind(); } public void RaiseCallbackEvent(String eventArgument) { if (catalog[eventArgument] == null) { returnValue = "-1"; } else { returnValue = catalog[eventArgument].ToString(); } } public String GetCallbackResult() { return returnValue; } }   1. how can I modify the "Default2.aspx" page to support multiple parameter passing in the javascript part of the code?  I mean I want to do a call in the javascript like CallServer(product,product2,product3,product4,productN, ""); 2. how can I modify the "Default2.aspx.cs" page to support multiple parameter passing?  At first, I though that I could just access my control in the codebehind by using Textbox1.Text or Listbox1.SelectedValue.  But I found out that the codebehind can't access the controls on the page once it is finished with the page load

Get A Function From A String?
forums.asp.net
Is there a way to get a function from a string? something like: //Default.aspx void functionA(int a, int b){} void functionB(int a, int b){} //WebUserControl.ascx void callfunction(Page page){ page.find_function("functionA").call(3,4); page.find_function("functionB").call(5,1); } The thing is that I need to set a functionName to a ascx, because inside ascx I must call the user-defined function I tried width 'delegate', but I think that delegate can use only with the name-known functions As you see in the example, I need something more generic (to use width functionA or functionB)

Way To Set My Returning Function String To Be Displayed In Div With Scroll Bar
forums.asp.net
i have made a simple chat class but for displaying the msg i use a textbox but by ajax and page post back the scroll bar moves up and its very unprofessional so i need a way to set my returning function string to be displayed in div with scroll bar

DataSource Controls :: A Binary Aggregate Overwrite Type Function?
forums.asp.net
Is there a way to do this in either scalar function form or in an aggregate function form?  The problem I'm dealing with is building a security system with multiple tiers of inheritable permissions.  Like you'll inherit certain permissions form the department level and then certain permissions from the supervisor level.  I'd like to find a way to produce these resultsFor user permissions I pull these binary values and get these results, (they are sorted by their tree node depth level in the hierarchy.

DataSource Controls :: Finding For A Binary Aggregate Overwrite Type Function
stackoverflow.com
Is there a way to do this in either scalar function form or in an aggregate function form?  The problem I'm dealing with is building a security system with multiple tiers of inheritable permissions.  Like you'll inherit certain permissions form the department level and then certain permissions from the supervisor level.  I'd like to find a way to produce these results For user permissions I pull these binary values and get these results, (they are sorted by their tree node depth level in the hierarchy.) [code].... Does it look like I will be stuck with manually compiling the tables of departmentpermissions and supervisorpermissions base on every possible outcome of inherited permissions or is there a way to do this on the fly in an efficient manner? 

How To Get The Reference Of GridView FooterRow In A JavaScript Function
bytes.com
I've a gridview with a footer row contains two textboxes and one button for inserting the new records to the gridview. I want to validate the values of these text boxes on client side before entering into the database .im decided to add one javascript function..but how can i get the reference to the textboxes which are there in the footertemplate.

SQL Reporting :: ReportViewer "View Report" Button Not Functioning?
forums.asp.net
Version 9 of ReportViewer in Remote Processing mode, IE 7 or 8 my report loads correctly. The toolbar appears correctly and parameters can be changed however the View Report button does not refresh the page to reload the report with the adjusted parameters - ie clicking performs no action. I am sure this is something simple I have missed?

Looping/setinterval Through Multiple Functions?
stackoverflow.com
issue is, I have 4 functions i would like to sequentially run every 5 seconds or so, and I'm not sure how to go about itI know the code is inefficient as it is. (right now i have it set up this way so the functions can also be triggered by clicked buttons) function tScroll1(){ var $testimonialScrollPos = parseInt($tCont.css('top'), 10); if($testimonialScrollPos == -915){ [code]....

Get A Variable To Increment In A Function Called By SetInterval?
www.daniweb.com
I am trying to get a variable to increment in a function called by setInterval. It does one then stops... All I want is for the slider function to loop through the array over and over again, but it seems to like stopping after the first one. Here is the code: <script type='text/javascript'> var i = 0; function slider(varToSlide) { [Code]......

Database Connection Inside A Function?
www.sitepoint.com
I'm getting the following errors: Warning: mysqli_connect() [function.mysqli-connect]: (28000/1045): Access denied for user 'test@'localhost' (using password: NO) in Warning: mysqli_error() expects exactly 1 parameter, 0 given in Unable to connect to MySQL: I have three files working with each other; config, functions, and view. [Code]...

Identifying Elements That Call A Function - Change The Border Of Several Images On The Page To Show A...
www.codingforums.com
What I want to do is change the border of several images on the page to show a 4px border. There are many images on the page so I just want to call the changeborder() function on the onClick event so as the image that has been clicked changes. However, I don't think using this.style.border to identify the element works when placed within the function. That is, how do I identify, from the function, which image has been clicked? My current code (which does not work) looks like this but I am sure its possible to gather what i'm trying to achieve: <script type="text/javascript"> function changeborder() { this.style.border='4px solid red' } </script> <img style="border: 1px solid #F4F4F4;" onclick="changeborder()" src="images/colours/010.jpg" border="0">

Documentation - Document Functions And Classes Inline?
stackoverflow.com
I know there are many different standards for PHP code inline documentation. Here's what I mean by inline documentation, and please correct me if there is a better term: [Code].... What is the best and most widely-accepted form of inline documentation? Are there any tools to auto-generate such documentation, or does it have to be done by hand? I'm not interested in generating manuals -- I want to know how to generate the type of code commenting above, or "inline documentation."

Add Onclick Function For Submit Button?
stackoverflow.com
Is there a way to add an onclick function to an <input type="submit">? I would like to show a hidden <div> named "div2" when the submit button is clicked inside a form.

Messed Up Date Function
phpbuilder.com
I am trying to use the PHP date() function, but my results are not right. I retrieve a timestamp from my MySQL Database (entitled $date.) echo $date; returns: 2006-04-30 00:00:00 but this code: Code:

Pass Array Elements To Settimeout Function?
stackoverflow.com
I don't understand why the fadeOut works but the remove doesn't. I found out it's a problem with the array. I tried some combinations, but I can't make it work. for (var i=0;i<fieldsblock.length;i++){ $("#"+fieldsblock[i]+"_tr"+nid).fadeOut(); t=setTimeout(function(){$("#"+fieldsblock[i]+"_tr"+nid).remove();},400); }

Switch And Function Problem
phpbuilder.com
I am trying to call functions from a switch and it just won't go into the function at all. I just can't understand why..

Switch Function Variable Not Showing?
stackoverflow.com
I've got this switch function that is suppose to get the value of a parameter passed in a query string, and upon it decide the value of the variable: <?php switch($_REQUEST['textcolor']){ case "white": $textcolor = $white; break; [Code].... The $_REQUEST gets it's value from this link: <a href="index2.php?status=Busy&codigo2=<?php echo $codigo2; ?>&textcolor=white"> and this is the form in which I have a hidden element that;s suppose to show the value, but does not: <form> <input type="hidden" value="<?= $textcolor ?>"> </form> why the $textcolor variable is not showing?

The Function To Switch Values Ie For Alternating Between 2 Colors In Table Display
bytes.com
What is the php function called which allows you to alternate between two values? I've completely forgotten it and my searches in php.net have not been fruitful!

Simple Date Function Not Responding?
www.phpfreaks.com
This is a simple function to check a date between two dates. It works for anything in the current year, but I want it to roll through 2010 and it fails with the end_date. I would typically write this function in a simpler way, but this was how I tested where it was failing, any suggestions on why it won't check into 2010? Code: [Select]<?php function opendates(){ $start_date = date("m/d/Y", mktime(0,0,0,11,01,2009));  $end_date = date("m/d/Y", mktime(0,0,0,01,20,2010));   $today_date = date("m/d/Y", mktime(0,0,0,date(m),date(d),date(Y))); [Code].....

Layout Function
bytes.com
i want to build a function to create layout parts. It has to create tables. What i want now is to have the following function: function doTable($state, $width, $height); { echo ($state === 1)? '<table width="'.$width.'" height="'.$height.'"><tr><td>' : '</td></tr></table>' }; (extremely simlified) And call it this way: doTable(1, 350, 400); echo 'table content' doTable(0); Can/How do i handle the 'missing variables' in the second 'doTable()'?

Jquery :: Trigger Function When Element Is In Viewport
stackoverflow.com
I'd like to trigger an event when jquery.localscroll reaches a certain point of the document, a div. Lets say we're scrolling vertically from the top div to the third. When it gets there, then the action schould trigger.

Distributed - Function To Shard/distribute (consistent Hashing) ?
stackoverflow.com
I have thought a bit about making a somewhat lightweight consistent-hashing-like PHP function to shard ploaded files between different servers.Obviously, rand() would work to distribute the files among the ervers somewhat evenly, but when requesting the files, no one will know which file lies on what server... know that there's some extensive libraries out there to create consistent-hashing, but I wonder how these works and howI can do to roll out my own, very lightweight one?Note: I do not take into account that servers will be removed, but instead more ones added to the pool further on. line of psuedocode: $config['shards'] = array('192.168.1.1, 192.168.1.2'); function shard ($filename) { [code]...........

Hash() Function Error
phpbuilder.com
I have been getting this error and I don't understand why cause I have used the same code for another project and it works fine. This is the error I get: Quote: Fatal error: Call to undefined function: hash() in /home/content/u/n/e/uneedvac/html/admin/index.php on line 14 the code I used is this: PHP Code: $userpass = hash('md5', $_POST['upass']) ; I was thinking maybe the server doesn't support it.

Add A Hash Of Options To A Function?
www.phpfreaks.com
This would seem like a simple question, but I can't seem to find the answer anywhere. Perhaps I'm asking it wrong.What I'd like to do is add a hash of optional arguments for a function.For example, I might have a function that has two required arguments, and three optional arguments.The only way I know to design this function is to put the arguments in a specific order, and fill them out to the degree needed. So if the 5th argument needs to be called, but the 3rd and 4th don't, you'd still have to give them alues. function example($arg1, $arg2, $arg3, $arg4, $arg5)Must be used by: xample('r, 'horse', '', '', 'texas');Is there anyway of designing a function to only use the specified arguments? example('red', 'horse', ['arg5: texas']);

Plain PHP Implementation Of Hash Function
bytes.com
I have a problem compiling the hash function from PECL into my PHP. I get the error configure: error: C preprocessor "/lib/cpp" fails sanity check I would like to use a plain PHP implementation of these functions. Is there a library of them around?

Jquery :: Ajax Function - Standard JSON Library Or Framework?
stackoverflow.com
I use jQuery's ajax function all the time. I eventually wrote a very small lib for my websites that will alert that 1) the server gave an invalid response (basically, it isn't json that is returned or is missing a required field), if the op was successful, an error (such as user is not logged in) and misc things like redirect on success. Is there a standard library I can use for this? Right now my syntax is something like the below. Is there anything out there like this (or is pretty standard to use while dealing with ajax/json?) I also have a tiny (like 10line) implementation to talk to it on server side (.NET) $.ajax({... success: function (data) { if (handleResponse(data)) { //success code. Most of the time empty bc it will redirect or refresh the page } else { //error code. remove readonly from textboxes and disables on buttons. }

Serialization - Side Effects Of Serialize As Hash Function?
stackoverflow.com
I'm looking to create a sort of HashMap class in PHP. For the sake of being able to build upon PHP's associative array functionality, I have a hash function, which should be able to take any variable (primitive or object) and turn it into a string for use as an array key. For this hash function, I am thinking of using serialize(), but I noticed that PHP calls __sleep() on an object when that function is called. I'm assuming this could be problematic. Am I right? If so, what can I use to get a hash of either a primitive data type or of an object? I did look at spl_object_hash(), but its results seem less than unique, as it uses reference locations, which appear to be reused? Update: If anyone's interested, this is (roughly speaking) what I ended up with. The Collection interface can be ignored. Any improvements welcome, of course. Oh, and there isn't a remove method yet. <?php include_once 'Collection.php'; class HashMap implements Collection { private $data; private $hashes; [Code]...

Jquery :: Dynamically Adjusting Width Of Container From Function?
stackoverflow.com
I'm using a script Custom Content Scroller to create a sliding div with a customisable scrollbar. It's almost perfect for my needs and I've written a function to hide images within the scrolling area when a user clicks a category to hide it. This all works fine and when some of the images slide-out the horWrapper div resizes smaller to fit the smaller number of images being contained. However, the reverse is not true. When the images slide-in, horWrapper does not resize and the returned images cause wrapping within the content container. Looking at [URL](scrollbar plugin's home), $.fn.mCustomScrollbar.CustomScroller(); should refresh the slider, and it probably does. But it does not refresh horWrapper. I'm sure there's something within the plugin code that I could use to refresh the width of horWrapper, but I can't see how I'd implement it. HTML <div class="box empty categories"> <h5>categories</h5> <ul class="category"> <li id="devdes" class="cat-hider">category 1</li> [Code].....

Combine Isset And Is_null In One Function?
stackoverflow.com
I'm trying to combine isset and is_null in one function for ease of use :) My approach: class sys { public static function is_null(&$variable) { // if it's not set if (!isset($variable)) { return true; [Code].... The problem I'm having when i use it within an object is following exception: ErrorException [ Notice ]: Indirect modification of overloaded property xxx has no effect.

Addslashes() Function Not Work On My Array?
stackoverflow.com
I have a series of session variables in an array. When I use quotes in one of my string variables, I try to addslashes so I can eventually insert it into the DB, but the addslashes() function is not working. Here is an example.In the comments field, I write this: This is the "comment" I realize this is a problem so I added a function before I enter it into the database that runs through a series of Session variables, including the comments variable. $strip_fields = array($_SESSION['comments'],$_SESSION['employee_id'],$_SESSION['approved_by'],$_SESSION['delivery_email'],$_SESSION['full_name'],$_SESSION['first_name'],$_SESSION['last_name']);[code]....

Get Pointer Position While Mysql_fetch_array Function?
stackoverflow.com
I've got a fairly standard while mysql_fetch_array statement in php, and I'm trying to figure out which row in the result set is being printed. I figured this should be pretty simple, but I've put a fairly standard $i=0; $count=mysql_num_rows($getResults); while($resultArray=mysql_fetch_array($getResults)){ $i++ if($i==$count){ echo "this is the last row"; } } but strangely, that isn't working. is there another way to find the last row?

Function To Validate A Sub-domain?
forums.devshed.com
i'm trying to write a function to validate a sub-domain. I need it to check the string for a valid tld, domain name and subdomain.

Retrieve A Function From Another Page?
www.phpfreaks.com
So I have this function that retrieves a picture, and it needs to be in a separate page because I can't call a header function if I have an echo in front of it.. Is it possible to call a function from another page so that I can display the picture in my page that has a lot of echo's in front of it? Or is there a better solution out there?

How To Retrieve Password Which Is Stored Using Md5 Function
www.webmasterworld.com
"I am using secure md5 to generate a password. In case my user forgets his password, there is any way to reconstruct it."

Isset Function Doesn't Work
phpbuilder.com
I've experienced many problems using isset(). For instance, when I want to know if an user has filled a required field in a form Code:

Exif Functions Not Working
phpbuilder.com
I am teaching myself PHP and getting along reasonable well, but have hit a brick wall with exif functions. The functions don't seem to be recognised: undefined function: exif_read_data() I gather php varies from build to build, so I am using php4.3.1, will this have an effect?

How To Suggest A New Function?
bytes.com
This is my first post and I'm wondering if someone can point me in the right direction. I have seen the following code MANY times in programs and throughout the internet: Code:

CONCAT() Function In A SELECT Field List?
stackoverflow.com
I'm using CodeIgniter's active record features but I'm not able to select the data I'm interested in. What I want to be selected is: CONCAT(t.field1, ' / ', t.field2) AS `finalValue` So I add this: $this->db->select('CONCAT(t.field1, ' / ', t.field2) AS `finalValue`'); But this is the query string that's generated: CONCAT(t.field1, `'` / ', `t`.`field2)` AS `finalValue` Is this a bug? Am I specifying it incorrectly?

Pulldown Function That Builds A Pulldown Menu From An Array
forums.devshed.com
I have a pulldown function that builds a pulldown menu from an array variable called $options. The trick is that I am trying to bring the array like this: $options=array('page1','page2',page3') How can I get the syntax to be like what is needed in the array function from a SQL query. I have tried this. $result=sql_query("select location from locations where parentid=&#390;'", $dbi); $options=array(list($states))=sql_fetch_array($result,$dbi); OUTPUT: Only the first part of the array ($states[1]) gets displayed instead of the whole list from the query. Any ideas on how to fix this??

Override Buddypress Function To Change SQL Conditions?
stackoverflow.com
Id like to add condtions to the bp_forum_topics() loop that only contain posts with certain keywords.Id like to create a custom plugin that overrides the current function bp_forum_topics() that does this. Im new to wordpress development so unsure about filters and tags. Right now it returns all topics (with the exception of loose search terms, newest, popular etc). I want to be able to return topics if the posts related to that topics contains specific search terms. I can manage the coding for this, but what i'm unsure about is overriding the bp_forums_get_post functions while still retaining the other functions used in buddypress, such as get_avatar. UPDATE: Here is the SQL SELECT post.post_id, post.topic_id, topic.topic_title, post.post_text [Code]....

Get Info About The File Originating A Function Call?
stackoverflow.com
Possible Duplicate: PHP: how do I know the caller of a function ? If I have a file named file1.php with the following code: // file1.php file2_func(); And then I have another file named file2.php with the following code: // file2.php function file2_func() { // define info about the file calling me } If I call the function file2_func() from code written in file1.php, is there any way for file2_func() to be aware of that. Specifically I want do define a variable within file2_func() that stores the file path of file1.php.