How do i return an array with the file names from folder? I have this till now but doesn't work. function showFiles($path) { $folder = "gallery/$path"; $i = 0; if (is_dir($folder)) { if ($handle = opendir($folder)) { while (($file = readdir($handle)) != FALSE) { if ($file === "." || $file === ".." || $file === "index.html") { continue; } if (!in_array($file, array('.', '..')) && !is_dir($folder.$file)) $arrayName = array($file); foreach ($arrayName as $fileArr) { $files[] = $fileArr; print_r($files); } } return $files; closedir($handle); } } } Any help will be appreciated :)

Member Avatar
Member Avatar
+0 forum 2

How to make below function to return true if success, otherwise false. I have make return on it but the result is **'undefined'** when i call it to other javascript on the same page like `**if(onloadCallback == false)`**. Thank you for helping. <script type="text/javascript"> var onloadCallback = function () { grecaptcha.render('dvCaptcha', { 'sitekey': '<%= ReCaptcha_Key %>', 'callback': function (response) { $.ajax({ type: "POST", url: "product-info.aspx/VerifyCaptcha", data: "{response: '" + response + "'}", contentType: "application/json; charset=utf-8", dataType: "json", success: function (r) { var captchaResponse = jQuery.parseJSON(r.d); if (captchaResponse.success) { $("[id*=txtCaptcha]").val(captchaResponse.success); $("[id*=rfvCaptcha]").hide(); return true; } else { $("[id*=txtCaptcha]").val(""); $("[id*=rfvCaptcha]").show(); var error = …

Member Avatar
Member Avatar
+0 forum 2

Hi All, I am trying to write perl code for extract 'C' user defined function from 'diff' format file. I am using the below keyword to identify the function 'starting pharse' (return value). I am not familar about 'C'. Please suggest some addtion return type which missing from the below list $c_start='void|int|signed|unsigned|char|float|double|long|short|extern|static|auto|boolean'; Thanks in advance, Manimuthu

Member Avatar
Member Avatar
+0 forum 1

Hi Everyone. this is the last part of my function Case "December" If cbMonthly.SelectedItem = "December" Then Dim DecStart As String = "-12-01" Dim DecFin As String = "-01-01" M12S = String.Concat(Year, DecStart) M12F = String.Concat(Year, DecFin) End If End Select Dim Places As New List(Of String) Places.Add(M12S) Places.Add(M12F) Return Places in my button click event, which calls my function, i get an out of bounds error Dim Places As New List(Of String) GetMonth() Dim M12S As String = Places.Item(0) Dim M12F As String = Places.Item(1) Can anybody tell me what i am doing wrong. Many Thanks

Member Avatar
Member Avatar
+0 forum 1

Hi, I want to create a SP in mySQL to insert records and return the Primary Key. But when I try and create the SP I get error: mysql said #1064, You have an error in your SQL Syntax, Check the manual that corresponds to your MySSQL server version for the right syntax to use near "SET @UG_ID = LAST_INSERT_ID() at line 3 here is my sql CREATE DEFINER = `root`@`localhost` PROCEDURE `SPNEWUG` ( IN `@GroupName` VARCHAR( 255 ) , IN `@HeadOffice` TINYINT( 2 ) , OUT `@UG_ID` INT( 8 ) ) COMMENT 'Add New User Group' NOT DETERMINISTIC NO …

Member Avatar
Member Avatar
+0 forum 1

Hello, So I'm having trouble figuring out what the correct syntax is for a function with a return type that is a template type and is within a namespace. Anyone see anything wrong with the code below? -------.HPP file: #pragma once #ifndef EC_UTIL_H #define EC_UTIL_H #include "../CommonHeaders.hpp" #include "../core/common/APVertex.hpp" #include <QString> class QWidget; namespace EditorCommon { template <class T> T *findAndAssert(QString id, QWidget *root); } #endif #include "ECUtil.hpp" ------------------- .CPP file: #include <QApplication> #include <QWidget> #include <QMessageBox> namespace EditorCommon { template <class T> T *findAndAssert(QString id, QWidget *root) { T *w = root->findChild<T *>(id); if(!w) { QMessageBox::critical(root , QString("Critical Application …

Member Avatar
Member Avatar
+0 forum 1

This code works perfectly in IE 7 and above. The PHP/HTML code has a button to delete/undelete some data. When the icon/button is clicked it enters the javascript function "setdelete". The following HTML code sets up the button for entry into the javascript function. <button id="$delete_icon" value="Delete" onclick="setdelete($key)"><img id="$m_d_img_name" src="images/x_undelete.ico"/></button> When the javascript is entered, it sets a few variables (not shown), changes the button icon (shown) and returns to the PHP code. Basically, it just returns to the indows where various items haven been displayed. In IE it reurns to the window without any problems and the icon has …

Member Avatar
Member Avatar
+0 forum 2

onsubmit return false still submitting form HTML: <!DOCTYPE html> <head> <script src = "Scripts/script.js"></script> </head> <body> <form action = "http://posttestserver.com/post.php" method = "post" onsubmit = "return age()"> <label for = "dob">Date of Birth</label> <input class = "TextArea" type = "date" id = "dob" name = "dob" required/> <br/> <p><span id = "invalid">&nbsp;</span><br/></p> <input id = "FormSubmit" class = "Buttons" type = "submit" value = "Submit"/> </form> </body> Javascript: function age() { var invalidStr = "You must be at least 18 to subscribe."; var submitOK = true; var dateOfBirth = document.getElementById("dob").value; var dateOfBirthD = dateOfBirth.split("/")[0]; var dateOfBirthM = dateOfBirth.split("/")[1]; var dateOfBirthY …

Member Avatar
Member Avatar
+0 forum 3

Hi all, I've started to get acquinted with Perl's HTML::Parser, which does a really good job at parsing html (duh ;-) But for the life of me, I can't get it to return the actual text from subroutine! I keep getting references to it :\ :\ use HTML::Parser; package MyParser; sub start { my ($self, $tagname, $attr, $attrseq, $origtext) = @_; if ($tagname eq 'img') { my $Title=$attr->{ title }; # now this works well, and actually prints the value and not the reference! print "Image title found: ", $attr->{ title }, "\n"; return($Title); } else {return();} } my $parser …

Member Avatar
Member Avatar
+0 forum 2

Hello Does every function in C++ returns value? If yes what is that value and what is the use?

Member Avatar
Member Avatar
+0 forum 6

Hey guys, That newsletter *reminder* that's said (it's been awhile i didn't visit) was a good thing. So here i am. I see, it change alot from my last visit. Great work Dani and the gang. So yeah, i didn't code since 2012. My carreer path is been a rollercoaster from business to geek and vice versa. It look like 2014 is going to pull me on the geek side again. Beeing hire by an engineer firm to supervise the technicians on the road. So i'll try to visit more on my free time and help out if i can. …

Member Avatar
Member Avatar
+0 forum 3

Hi.. i want to get all columns from tbl_class where course_id of tbl_course is equal to course_id of tbl_class more over course_id of tbl_course should be thw one who has semester = 5 brife structure of tables are: tbl_class >class_id >course_id >class_room tbl_course >course_id >semester i have design this kind of querry logicaly as m not good in sql but it doesnt work it return multiple values from subquerry that is i am getting 2 course ids now i want * from tbl_class where course_id = result by subquerry SELECT * FROM tbl_class WHERE course_id = (SELECT course_id FROM tbl_course …

Member Avatar
Member Avatar
+0 forum 2

I know I am probably over thinking this but I cannot seem to figure this out. I am trying to check if the value is null and if not to continue. /** * */ public Item getItem(String theItem) { Iterator iter = myItems.iterator(); while(iter.hasNext()) { Item anItem = (Item) iter.next(); if(anItem.getName().equals(theItem)) { return anItem; } } if(anItem == null) { continue; } return null; }

Member Avatar
Member Avatar
+0 forum 4

I am new on this forum. If I want to reply to someone's message, what is the proper thing to do so I can reply to a message posted on the forum? What icon or link do I click on to make a reply to someone's post?

Member Avatar
Member Avatar
+0 forum 5

Hi Friends, I am struggling from last couple of days with this paypal return array. After completion of successful transaction in Live account, Paypal sends empty resultset to my website. Is there anything i need to set in Mercant paypal account ? Coming to Sandbox, everything is working fine. Please give me some suggestions.

Member Avatar
Member Avatar
+0 forum 1

This function always returns `FALSE`: function rank($applicant_id_number = 0) { $this->load->model('advert_model'); $application = $this->advert_model->get_applications(); // $user = $this->flexi_auth->get_user_by_identity_row_array(); $rank = 0; $sql1 = "SELECT * FROM applicant_details"; $results = $this->db->query($sql1)->result(); $sql3 = "SELECT * FROM job_advert"; $job_advert = $this->db->query($sql3)->result(); foreach ($results as $key => $applicant) { $applicant_age = $applicant->age; $applicant_id_number = $applicant->id_number; $applicant_job_experience = $applicant->job_experience; $applicant_industry_type = $applicant->industry_type; $applicant_qualification_type = $applicant->qualification_type; $applicant_city = $applicant->city; $applicant_relocate = $applicant->relocate; $applicant_first_name = $applicant->firstname; $applicant_phone = $applicant->upro_phone; $applicant_min_salary = $applicant->minimum_salary; $applicant_prefered_salary = $applicant->preferred_salary; $applicant_licence = $applicant->license; $applicant_employment_equity = $applicant->employment_equity; $applicant_email = $applicant->uacc_email; $applicant_gender = $applicant->gender; $applicants = array(); $sql = "SELECT DISTINCT account.uacc_group_fk, demo.id_number …

Member Avatar
Member Avatar
+0 forum 9

Dear All I am using Vb.net to update a database running on SQL Server. I am using the following to increase the value of the NextPlan in the SystemControl table in a SQL database. Command.CommandText = "UPDATE SystemControl SET NextPlan = NextPlan + 1" Command.ExecuteNonQuery() Once the Command is executed and I look in the actual database I can see the value has been incremented. How can I get the Command to return the new value of NextPlan so I don't need to then do a table read to get the new value. Thanks

Member Avatar
Member Avatar
+0 forum 2

why constructor don't have return type

Member Avatar
Member Avatar
+0 forum 3

Hi, I'm using a plugin in Wordpress to display events on my page, but instead of making it simple, they are requiring me to use php to display the title of the pages as I want to. The rest of my pages display with a little icon and then the title of the page (see here: http://dev.rjthompsonmusic.com/about). This is displayed in my themes html as follows: <i class="icon-book"></i><?php echo wpb_page_title(); ?> But the Events Calendar plugin uses the following php to display the title on my Tour / Single Events pages ([http://dev.rjthompsonmusic.com/tour](http://dev.rjthompsonmusic.com/tour)): add_filter('tribe_get_events_title', 'my_get_events_title'); function my_get_events_title($title){ if( is_tax() ){ return …

Member Avatar
Member Avatar
+0 forum 2

Hi everyone. I am doing a USACO training assignment, and the instructions are as follows: > Is Friday the 13th really an unusual event? > > That is, does the 13th of the month land on a Friday less often than on any other day of the week? To answer this question, write a program that will compute the frequency that the 13th of each month lands on Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, and Saturday over a given period of N years. The time period to test will be from January 1, 1900 to December 31, 1900+N-1 for a …

Member Avatar
Member Avatar
+0 forum 3

Hi, I am having a problem regarding the return statment, for some reason it is not working, can someone please tell me what i am doing wrong? The return is taking a selection of table collumns not all e.g. the simple return all "return $x" Thanks for $x in doc("Suppliers.xml")/dataroot/Suppliers[Country != "France"] return $x/SupplierID $x/CompanyName $x/ContactName $x/ContactTitle $x/Address $x/City $x/Country

Member Avatar
Member Avatar
+0 forum 5

Hi. I am working on my Online Examination project in my web development subject but I am having a hard time to code how to go back to my previous page where I put session on it. my online exam are categorize by subject then inside the subject there is a test name. FOr example: Subject: Math -Algebra -Calculus In admin side, if I want to view and edit all the question, the link will direct me to **"view_subject.php"** here's the code: <?php <h2>Subjects</h2> <table width="1000" height="104" bordercolor="#666666" border="0"> <tr bordercolor="#666666"> <center> <td width="100" height="33" bgcolor=" #d4d6f8" align="center"><b>Subject ID</b></td> <td …

Member Avatar
Member Avatar
+0 forum 6

basically i am working on a project for uni, which is to create a form of an abacus model. - peg_array[] stores the number of counters/beads present in each of the pegs(lines) of the abacus. i am trying to use 2 boolean methods: "boolean removeCounter(int thisPeg)" "boolean removeCounter(int thisPeg)" thisPeg - An integer that refgers to any of the pegs in the abacus Please can someone help me solve this? All i am trying to do is to recognise where possible errors may occur and prevent them from happening. E.G. if conditions are true then add one counter to the …

Member Avatar
Member Avatar
+0 forum 6

I have an xml file that I have to read in, convert all the carriage returns to \x0D and line feeds to \0xA, then call it into a function as a string. So for example my XML file is: <TEST> this is a string </Test> I would want a string that contains "<TEST>\x0D\0xAthis is a string\x0D\x0A</Test>" I've been able to read the XML file with pugiXML but I have not been sucessful in converting it to a string or finding the carriage returns/line feeds. ANy help would be appriciated. Thanks.

Member Avatar
Member Avatar
+0 forum 1

import java.io.*; import java.util.*; class Q9 { public static void main(String args[]) { int a,b,c; System.out.println("\n\t Enter the value of A,B & C "); Scanner sc = new Scanner(System.in); a = sc.nextInt();b = sc.nextInt(); c = sc.nextInt(); System.out.println("\nLargest = "+func(a,b,c)); } public static int func(int a,int b,int c) { if((a>=b)&&(a>=c)) { return(a); } if((b>=a)&&(b>=c)) { return(b); } if((c>=b)&&(c>=a)) { return(c); } } }

Member Avatar
Member Avatar
+0 forum 4

I want to create a method that is meant to protect against entering a wrong value for gender. The method **fineGender** below, will return true if the correct gender is entered and false otherwise. // postcondition: fineGender returns true if argument g equals M, m, F or f // and returns false otherwise. public static boolean fineGender(char g)

Member Avatar
Member Avatar
+0 forum 6

My problem is with a **Polymorphic** method , getSalary (which should be of type double. The problem is that the salary in this case depends on the average mark of a student and thus I felt the need for an **If Statement** because of the 2 conditions. However java does not seem to allow 2 returns in the same method and considers the following code as not having a return statement. @Override double getSalary() { int avg=average(); //average is just a method which returns an average of an array of numbers if (avg>=50) return 150.00; else if (avg<=50) return 80.00; …

Member Avatar
Member Avatar
+0 forum 1

I'm writing a class to represent a flight. The only error I'm getting is on line 97. Flight.java:97: error: missing return statement /** Class Flight represents a plane at an airline Author: Anna Mae Decker E-mail address: adecker0033@kctcs.edu Last changed: 02/10/13 Assignment1 */ public class Flight { /* * declare instance variables * each flight object that is created will have its own copy of these * These are declared as private to ensure that external Java code * cannot access them directly and assign any arbitrary values to them. */ String flightNumber; int rows; int seatsPerRow; boolean [][] seat; …

Member Avatar
Member Avatar
+0 forum 3

class Emp { int name, emp_no, addrs, ph_no, deprtmnt, post, project; Emp(int a, int b, int c, int d, int e, int f, int g) { name=a; emp_no=b; addrs=c; ph_no=d; deprtmnt=e; post=f; project=g; } Emp(int a, int b, int c, int d) { name=a; emp_no=b; addrs=c; ph_no=d; } Emp(int a, int b, int c, int e, int f) { name=a; emp_no=b; addrs=c; deprtmnt=e; post=f; } Emp(int a, int b, int c, int e, int f, int g) { name=a; emp_no=b; deprtmnt=e; post=f; project=g; } Emp() { System.out.println(name+","+emp_no+","+addrs+","+ph_no+","+deprtmnt+","+post+","+project); } } class Emp1 { public static Void Main(String[]args) { Emp obj1= new …

Member Avatar
Member Avatar
+0 forum 7

why void functions cannot contain return type?

Member Avatar
Member Avatar
+0 forum 2

The End.