Search Results

Search found 422 results on 17 pages for 'luke'.

Page 14/17 | < Previous Page | 10 11 12 13 14 15 16 17  | Next Page >

  • Non-object when adding code into html

    - by Luke
    Hello. I am getting the following error: Fatal error: Call to a member function error() on a non-object in /home/gamepla3/public_html/football/result.php on line 177 The line for this is <?php echo $form->error("homescore"); ?> I'm failing to see how this could be the case? The thing worked fine before I added working code into my html document so it looked better. Now I can't get it working?? EDIT. When the code is not within HTML, it works fine. Once I have it within the HTML, it throws back an error? Has anyone seen anything like this before?

    Read the article

  • Wordpress Contact Form 7 in a hidden div.

    - by Luke
    Hi there, I'm using Contact Form 7 on Wordpress. I have it set up so the upload appears in the 3rd of three divs that hide and show depending on a clicked link. Everything is fine except when I click submit it hides the uploads div and shows the first div again. The form is submitting fine and you see a message that it has sent if you navigate back to the uploads section. Is there any way to keep the div you're in open and keep the rest hidden on submit? This is the code i'm using for hiding and showing. I'm sure it's not perfect but it works. // My Files function basic_myfiles($atts, $content = null) { return '' . $content . ''; } add_shortcode("myfiles", "basic_myfiles"); // Sound Library function basic_soundlib($atts, $content = null) { return '' . $content . ''; } add_shortcode("soundlib", "basic_soundlib"); // Uploads function basic_uploads($atts, $content = null) { return '' . $content . do_shortcode( '[contact-form 4 "Client Upload Form"]' ) . ''; } add_shortcode("uploads", "basic_uploads"); Thanks

    Read the article

  • IE 6 dropdown selection area too narrow

    - by Cool Hand Luke UK
    Hi, I have a dropdown menu with the width set to 142px however the selection area when you drop down the menu needs to be larger as it has text that exceeds this width. Firefox (and most modern browsers) is clever and extends the selection area to fit in this text. However IE 6 and unchecked newer versions of IE do not show this text and keep the selection area the same width as the dropdown unclicked. The problem lies here, how can I get IE to extend the selection area where you click the selection you want without increasing the width of the dropdown area with out the dropdown selection showing. Hope that makes sense. :D cheers (DEATH TO IE)

    Read the article

  • Is there a way to prevent SQL Server silently truncating data in local variables and stored procedure parameters?

    - by Luke Woodward
    I recently encountered an issue while porting an app to SQL Server. It turned out that this issue was caused by a stored procedure parameter being declared too short for the data being passed to it: the parameter was declared as VARCHAR(100) but in one case was being passed more than 100 characters of data. What surprised me was that SQL Server didn't report any errors or warnings -- it just silently truncated the data to 100 characters. The following SQLCMD session demonstrates this: 1 create procedure WhereHasMyDataGone (@data varchar(5)) as 2 begin 3 print 'Your data is ''' + @data + '''.'; 4 end; 5 go 1 exec WhereHasMyDataGone '123456789'; 2 go Your data is '12345'. Local variables also exhibit the same behaviour: 1 declare @s varchar(5) = '123456789'; 2 print @s; 3 go 12345 Is there an option I can enable to have SQL Server report errors (or at least warnings) in such situations? Or should I just declare all local variables and stored procedure parameters as VARCHAR(MAX) or NVARCHAR(MAX)?

    Read the article

  • When asked "How do I make a website?" how do you answer?

    - by Luke CK
    A (non-technical) friend of mine has asked me how to make a website. I get this question all the time. After a few questions I found out that she has an idea that could turn into a commercial site. I described three options to her: a) Get a book/enroll in a class/follow some online tutorials and learn how to do it. She's pretty smart and her personality seems like a good match for this sort of thing so I'm sure she could learn but she doesn't have a lot of time spare. Maybe if she started with one of those WYSIWYG editors at first? I stressed that this would take a longer than a couple of weekends of playing around. b) Hire someone to build it. Ranges from ultra cheap to ultra expensive, crappy to good and everything in between. I didn't mention sites like Rentacoder because she hasn't worked on a project like this before and doesn't know what to ask for. At this stage she'd likely ask for a Youtube-MySpace-Google for a few hundred bucks because she doesn't yet understand just how much is involved. c) Find someone technical and partner up with them. I explained that this can either work really well or be a disaster because she'd have to give up some of her ownership of the idea. How do you respond in these situations?

    Read the article

  • Console.WriteLine does not show up in Output window

    - by Luke
    I have put some Console.WriteLine calls in to test, but they aren't appearing in the output box? public static ArrayList myDeliveries = new ArrayList(); public mainForm() { InitializeComponent(); } private void mainForm_Load(object sender, EventArgs e) { if (!File.Exists("../../MealDeliveries.txt")) { MessageBox.Show("File not found!"); return; } using (StreamReader sr = new StreamReader("../../MealDeliveries.txt")) { //first line is delivery name string strDeliveryName = sr.ReadLine(); Console.WriteLine("some tetttttttttt23423423423423423ttttttttttttttttttttttt"); while (strDeliveryName != null) { //other lines Delivery d = new Delivery(strDeliveryName, sr.ReadLine(), sr.ReadLine(), sr.ReadLine(), sr.ReadLine(), sr.ReadLine(), sr.ReadLine()); mainForm.myDeliveries.Add(d); //check for further values strDeliveryName = sr.ReadLine(); } } displayDeliveries(); } private void displayDeliveries() { lstDeliveryDetails.Items.Clear(); Console.WriteLine("some tettttttttttttttttttttttttttttttttt"); Console.WriteLine(mainForm.myDeliveries.Count); foreach (Delivery d in mainForm.myDeliveries) { lstDeliveryDetails.Items.Add(d.DeliveryName); } } Can anyone help??

    Read the article

  • Alphanumeric and more

    - by Luke
    So I am designing a registration page and checking the username is alphanumeric. "^([0-9a-z])+$" I use that to do so. Is there any way I can get that to include underscores (_), dash (-), and spaces? Thanks

    Read the article

  • What is the best way to go about grouping rows by the same timestamp?

    - by Luke
    Hello all. I am looking for some advice. I have rows of data in the database that i want to group together. There is a timestamp involved. That column is called date. What is the best way to go about grouping rows by the same timestamp. EDITED..... <? $result = mysql_query("SELECT * FROM ".TBL_FIXTURES." ORDER BY date"); $current_week = null; while ($row = mysql_fetch_assoc($result)) { if ($row['date'] != $current_week) { $current_week = $row['date']; echo 'Week ' . $current_week .': '; } echo $row['home_user']; echo $row['home_team']; echo $row['away_user']; echo $row['away_team']; } ?> I have this code. What i am trying to do is organise each round of fixtures in a row with a title Week 1 - date. I want Week 1 and the date and all fixtures with that date displayed. Then move onto week 2 and the date and all fixtures again. This should be done for every fixture in the database, so if there are 6 rounds of fixtures, there will be 6 dates and therefore 6 blocks of fixtures.. Please help, thanks

    Read the article

  • Agile web development with Rails 4 interface difficulties

    - by Luke Annison
    I've been following along with the examples in the book in making a online catalog and am having a couple of discouraging difficulties in Chapter 8 task C: Catalog display. I have input the code for the stylesheets as instructed but it has created a slightly skewed result as compared to what is shown in the book. Whilst minor and aesthetic in nature its a little shock to my confidence and slightly irritating when trying to carry on through the book. I have too little rep to post a pic, but heres the link: http://s11.postimage.org/3pwlzfiwj/Screen_Shot_2012_10_08_at_22_29_56.png) As you can see the boarder seems a little confused and the image at the top is covering the header text. I've been through the code time and time again but can't seem find out where I've gone wrong. Could anybody give me some clues?

    Read the article

  • Foreach wont split a string

    - by Luke
    //assign variables string measurementIn; //read in file in array string[] lines = File.ReadAllLines("../../convert.txt"); //ask user for date Console.WriteLine("Enter the conversion in the form (amount,from,to)"); measurementIn = Console.ReadLine(); //array for splitting input string[] conversionArray = measurementIn.Split(','); Console.WriteLine("{0} , {1} , {2}", conversionArray[0], conversionArray[1], conversionArray[2]); Console.ReadLine(); //check lines for conversion foreach (string line in lines) { //array for the measurement string[] measurementArray = line.Split(','); Console.WriteLine("{0}", measurementArray[0]);

    Read the article

  • Drupal menu permissions question

    - by Luke
    I'm creating an admin module for my client that gives then access to some administration functionality concerning their content. I'm starting off my adding some permissions in my module by implementing hook_perm: function mymodule_perm() { return array( 'manage projects', ); } I can then create my menu by adding to the admin section that already exists: function mymodule_menu() { $items['admin/projects'] = array( 'title' => 'Projects', 'description' => 'Manage your projects.', 'page callback' => 'manage_projects_overview', 'access callback' => 'user_access', 'access arguments' => array('manage projects'), 'type' => MENU_NORMAL_ITEM, 'weight' => -100, ); $items['admin/projects/add'] = array( 'title' => 'Add project', 'access arguments' => array('manage projects'), 'page callback' => 'mymodule_projects_add', 'type' => MENU_NORMAL_ITEM, 'weight' => 1, ); return $items; } This will add a Projects section to the Administration area with an Add project sub section. All good. The behavior I want is that my client can only see the Projects section when they log in. I've accomplished this by ticking the "manage projects" permission for authenticated users. Now to give my client actual access to the Administration area I also need to tick "access administration pages" under the "system module" in the users permissions section. This works great, when I log in as my client I can only see the Projects section in the Administration area. There is one thing though, I my Navigation menu shown in the left column I can see the following items: - Administer - Projects - Content management - Site building - Site configuration - User management I was expecting only the see Administer and Projects, not the other ones. When I click e.g. Content Management I get a Content Management titled page with no options. Same for Site Building, Site Configuration and User Management. What's really odd is that Reports is not being shown which is also a top level Administration section. Why are these other items, besides my Projects section, being shown and how can I make them stop from appearing if I'm not logged in as administrator?

    Read the article

  • A good way to release fixtures

    - by Luke
    Hey, my problem is as follows, I am trying to create code where a set of sporting fixtures are created with dates on. Say I have 8 teams, with 7 rounds of fixtures. I have generated the fixtures, but want to add a date generation on them. So if i had 7 rounds, I would put 28 days and it would make each round 4 days from now, 8 days from now, etc. What would be the best way to go about doing this? Thanks

    Read the article

  • Data not entering the table

    - by Luke
    //loop through usernames to add to league table for ($i = 0; $i < count($user); $i++) { //set some new variables in an array $username = $user[$i]; $squad = $team[$i]; //add details to league table if ( $username != "Ghost") { $database->addUsersToLeagueTable($username, $squad); } } I use this code to add to the league table, the following is more code: function addUsersToLeagueTable($username, $squad) { $q = "INSERT INTO `$_SESSION[comp_name]` ( `user` , `team` , `home_games_played` , `home_wins` , `home_draws` , `home_losses` ,`home_points, `home_goals_for` , `home_goals_against` , `away_games_played` , `away_wins` , `away_draws` , `away_losses` , `away_points` , `away_goals_for` , `away_goals_against` ) VALUES ( '$username', '$squad', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0')"; return mysql_query($q, $this->connection); } Can you see any obvious reason why this isn't happening? Thanks

    Read the article

  • when to use Hibernate vs. Simple ResultSets for small application

    - by luke
    I just started working on upgrading a small component in a distributed java application. The main application is a rather complicated applet/servlet combo running on JBoss and it extensively uses Hibernate for its DataAccess. The component i am working on however is very a very straightforward data importing service. Basically the workflow is Listen for a network event Parse the data packet, extract a set of identifiers Map the identifier set to a primary key in our database Parse the rest of the packet and insert items in a related table using the foreign key found in step 3 Repeat in the previous version of this component it used a hibernate based DAL, that is no longer usable for a variety of reasons (in particular it is EOL), so I am in charge of replacing the Data Access layer for this component. So on the one hand I think i should use Hibernate because that's what the rest of the application does, but on the other i think i should just use regular java.sql.* classes because my requirements are really straightforward and aren't expected to change any time soon. So my question is (and i understand it is subjective) at what point do you think that the added complexity of using an ORM tool (in terms of configuration, dependencies...) is worth it? UPDATE due to the way the DataAccesLayer for the main application was written (weird dependencies) i cannot easily use it, i would have to implement it myself.

    Read the article

  • C# XML parsing with LINQ storing directly to a struct?

    - by Luke
    Say I have the following XML schema: <root> <version>2.0</version> <type>fiction</type> <chapters> <chapter>1</chapter> <title>blah blah</title> </chapter> <chapters> <chapter>2</chapter> <title>blah blah</title> </chapters> </root> Would it be possibly to parse the elements which I know will not be repeated in the XML and store them directly into the struct using LINQ? For example, could I do something like this for "version" and "type" //setup structs Book book = new Book(); book.chapter = new Chapter(); //use LINQ to parse the xml var bookData = from b in xmlDoc.Decendants("root") select new { book.version = b.Element("version").Value, book.type = b.Element("type").Value }; //then for "chapters" since I know there are multiple I can do: var chapterData = from c in xmlDoc.Decendants("root" select new { chapter = c.Element("chapters") }; foreach (var ch in chapterData) { book.chapter.Add(getChapterData(ch.chapter)); }

    Read the article

  • A logical problem with two tables

    - by Luke
    Hey guys, I created a list for fixtures. $result = mysql_query("SELECT date FROM ".TBL_FIXTURES." WHERE compname = '$comp_name' GROUP BY date"); $i = 1; $d = "Start"; while ($row = mysql_fetch_assoc($result)) { $odate = $row['date']; $date=date("F j Y", $row['date']); echo "<p>Fixture $i - $d to $date</p>"; } As you can see from the query, the date is displayed from the fixtures table. The way my system works is that when a fixture is "played", it is removed from this table. Therefore when the entire round of fixtures are complete, there wont be any dates for that round in this table. They will be in another table. Is there anyway I can run an other query for dates at the same time, and display only dates from the fixtures table if there isnt a date in the results table? "SELECT * FROM ".TBL_CONF_RESULTS." WHERE compid = '$_GET[id]' && type2 = '2' ORDER BY date" That would be the second query!

    Read the article

  • MySQL query problem

    - by Luke
    Ok, I have the following problem. I have two InnoDB tables: 'places' and 'events'. One place can have many events, but event can be created without entering place. In this case event's foreign key is NULL. Simplified structure of the tables looks as follows: CREATE TABLE IF NOT EXISTS `events` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `name` varchar(255) COLLATE utf8_bin NOT NULL, `places_id` int(9) unsigned DEFAULT NULL, PRIMARY KEY (`id`), KEY `fk_events_places` (`places_id`), ) ENGINE=InnoDB; ALTER TABLE `events` ADD CONSTRAINT `events_ibfk_1` FOREIGN KEY (`places_id`) REFERENCES `places` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION; CREATE TABLE IF NOT EXISTS `places` ( `id` int(9) unsigned NOT NULL AUTO_INCREMENT, `name` varchar(255) COLLATE utf8_bin NOT NULL, PRIMARY KEY (`id`), ) ENGINE=InnoDB; Question is, how to construct query which contains name of the event and name of the corresponding place (or no value, in case there is no place assigned?). I am able to do it with two queries, but then I am visibly separating events which have place assigned from the ones that are without place. Help really appreciated.

    Read the article

  • Undefined function

    - by Luke
    Just a simple problem for most of you i'm sure. I have a function addTeamFixtures and it calls on a function flip. That function is defined later in the script. But I don't think it is happy with that. The code where it calls the function: $rounds[$round][0] = flip($rounds[$round][0]); Any ideas?

    Read the article

  • An array with values 4 days apart

    - by Luke
    I have a piece of code that generates soccer/football fixtures. The idea is that for every round of fixtures, the date will be 4 days further than the last round. So round one will be 3rd may, round two will be 7th may, round three 11th may, etc. I am not sure how to do this? The code that currently makes the fixtures are as follows: $totalRounds = $teams - 1; $matchesPerRound = $teams / 2; $rounds = array(); for ($i = 0; $i < $totalRounds; $i++) { $rounds[$i] = array(); } for ($round = 0; $round < $totalRounds; $round++) { for ($match = 0; $match < $matchesPerRound; $match++) { $home = ($round + $match) % ($teams - 1); $away = ($teams - 1 - $match + $round) % ($teams - 1); // Last team stays in the same place while the others // rotate around it. if ($match == 0) { $away = $teams - 1; } $rounds[$round][$match] = "$user[$home]~$team[$home]@$user[$away]~$team[$away]"; } } The teams would be the total users in the league. So if there are 8 teams, there will be 7 rounds. And i will want each round 4 days apart. And that date will be within each fixture within each round. Any further information needed just ask! Thanks, really stuck on this

    Read the article

  • two sql queries in one place

    - by Luke
    <?php $results = mysql_query("SELECT * FROM ".TBL_SUB_RESULTS." WHERE user_submitted != '$_SESSION[username]' AND home_user = '$_SESSION[username]' OR away_user = '$_SESSION[username]' ") ; $num_rows = mysql_num_rows($results); if ($num_rows > 0) { while( $row = mysql_fetch_assoc($results)) { extract($row); $q = mysql_query("SELECT name FROM ".TBL_FRIENDLY." WHERE id = '$ccompid'"); while( $row = mysql_fetch_assoc($q)) { extract($row); ?> <table cellspacing="10" style='border: 1px dotted' width="300" bgcolor="#eeeeee"> <tr> <td><b><? echo $name; ?></b></td> </tr><tr> <td width="100"><? echo $home_user; ?></td> <td width="50"><? echo $home_score; ?></td> <td>-</td> <td width="50"><? echo $away_score; ?></td> <td width="100"><? echo $away_user; ?></td> </tr><tr> <td colspan="2"><A HREF="confirmresult.php?fixid=<? echo $fix_id; ?>">Accept / Decline</a></td> </tr></table><br> <? } } } else { echo "<b>You currently have no results awaiting confirmation</b>"; } ?> I am trying to run two queries as you can see. But they aren't both working. Is there a better way to structure this, I am having a brain freeze! Thanks OOOH by the way, my SQL wont stay in this form! I will protect it afterwards

    Read the article

  • A brief question about JS or AJAX

    - by Luke
    I have been finding ways around this for a long time but think it's time I addressed it. If I have a page that has a dropdown menu, is there anyway I can select a value which will subsequently load other values further down. Can this be done without a page reload? I will give you an example. Say I was making some tools for an admin panel, but first of all they needed to select a member to work with. They would select the member and then below, the fields about that member would be populated based on what was selected in the first menu. As I have already asked, can this be done without a page reload? Thanks for reading.

    Read the article

< Previous Page | 10 11 12 13 14 15 16 17  | Next Page >