Search Results

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

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

  • OOP function and if statement

    - by Luke
    Not sure if I can ask two questions? If i run the following function in my database class function generateUserArray() { $u = array(); $result = $this->selectAllUsers(); while( $row=mysql_fetch_assoc($result)) { $u[] = $row['username']; } return $u; } Would i call it like this? $u[] = $datebase->generateUserArray(); My second question, will this work: else if($database->addLeagueInformation($subname, $subformat, $subgame, $subseason, $subwindow, $subadmin, $subchampion, $subtype) && $databases->addLeagueTable($name) && $_SESSION['players'] == $subplayers && $comp_name = "$format_$game_$name_$season" && $_SESSION['comp_name'] = $comp_name) Thankyou

    Read the article

  • Click to show more - maybe JS?

    - by Luke
    I am not sure what language or how to do this, but I am looking to have a word on a page, and when clicked, it will reveal more underneath. If it is clicked again, that stuff will hide away again? Any ideas?

    Read the article

  • Search function on listview

    - by Luke
    Is it possible to search a listview and restrict the items in the listview by the search criteria? private void displayDeliveries() { lstDeliveryDetails.Items.Clear(); foreach (Delivery d in mainForm.myDeliveries) { ListViewItem item = lstDeliveryDetails.Items.Add(d.DeliveryName); item.SubItems.Add(d.DeliveryAddress); item.SubItems.Add(d.DeliveryDay); item.SubItems.Add(d.DeliveryTime); item.SubItems.Add(d.DeliveryMeal); item.SubItems.Add(d.DeliveryInstructions); item.SubItems.Add(d.DeliveryStatus); } } At the moment that code populates the listview. private void btnSearch_Click(object sender, EventArgs e) { //reset the selection and get the searched text iDeliverySelected = -1; string searchValue = txtSearchBox.Text; //loop through to find the search for (int i = 0; i < myDeliveries.Count; i++) { Delivery d = (Delivery)mainForm.myDeliveries[i]; if (d.DeliveryName == searchValue) MessageBox.Show("name matched"); } } So far this is what I have for search, I'm struggling to take it to the next level! Could anyone offer an ideas? Thanks

    Read the article

  • Using GData and the Google Analytics on Android

    - by Luke Lowrey
    I am wondering what my options are for using GData and specifically the analytics api on android to build a small widget. After searching around for a while I couldnt come up with any libraries with decent examples. Are there any dedicated libraries with some decent examples / doco to do this sort of thing? I would like to target 1.6 but if the are 2.0 only I guess that is fine too.

    Read the article

  • Select in listview, to pass the index through to another form

    - by Luke
    I have a system where a listview is populated. I want to be able to select one of these files and press an edit button, which will then take the selected data into another form. I am trying to find a way to identify the selected item in the listview and take it to the next form. How can i achieve this? What code would I need to show? Thanks

    Read the article

  • Finding the index of a queue that holds a member of a containing object for a given value

    - by Luke Mcneice
    I have a Queue that contains a collection of objects, one of these objects is a class called GlobalMarker that has a member called GlobalIndex. What I want to be able to do is find the index of the queue where the GlobalIndex contains a given value (this will always be unique). Simply using the Contains method shown below returns a bool. How can I obtain the queue index of this match? RealTimeBuffer .OfType<GlobalMarker>() .Select(o => o.GlobalIndex) .Contains(INT_VALUE);

    Read the article

  • Input string was not in correct format

    - by Luke
    using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.IO; namespace measurementConverter { class Program { static void Main(string[] args) { //read in the file StreamReader convert = new StreamReader("../../convert.txt"); //define variables string line = convert.ReadLine(); int conversion; int numberIn; float conversionFactor; Console.WriteLine("Enter the conversion in the form (amount,from,to)"); String inputMeasurement = Console.ReadLine(); string[] inputMeasurementArray = inputMeasurement.Split(','); while (line != null) { string[] fileMeasurementArray = line.Split(','); if (fileMeasurementArray[0] == inputMeasurementArray[1]) { if (fileMeasurementArray[1] == inputMeasurementArray[2]) { Console.WriteLine("{0}", fileMeasurementArray[2]); } } line = convert.ReadLine(); //convert to int numberIn = Convert.ToInt32(inputMeasurementArray[0]); conversionFactor = Convert.ToInt32(fileMeasurementArray[2]); conversion = (numberIn * conversionFactor); } Console.ReadKey(); } } } Hello, I am trying to get the calculating going. On the line conversionFactor = Convert.ToInt32(fileMeasurementArray[2]);, I am getting an error saying "Input string was not in correct format". Please help! The text file consists of the following: ounce,gram,28.0 pound,ounce,16.0 pound,kilogram,0.454 pint,litre,0.568 inch,centimetre,2.5 mile,inch,63360.0

    Read the article

  • How to use group by and having count in Linq

    - by Luke
    I am having trouble trying to convert the following query from SQL to Linq, in particular with the having count and group by parts of the query: select ProjectID from ProjectAssociation where TeamID in ( select TeamID from [User] where UserID in (4)) group by ProjectID having COUNT(TeamID) = (select distinct COUNT(TeamID) from [User] where UserID in (4)) Any advice on how to do so would be much appreciated.

    Read the article

  • How do you deal with the conflict between ActiveSupport::JSON and the JSON gem?

    - by Luke Francl
    I am stumped with this problem. ActiveSupport::JSON defines to_json on various core objects and so does the JSON gem. However, the implementation is not the same -- the ActiveSupport version takes arguments and the JSON gem version doesn't. I installed a gem that required the JSON gem and my app broke. The issue is that I'm using to_json in a controller that returns a list of objects, but I want to control which attributes are returned. When code anywhere in my system does require 'json' I get this error message: TypeError: wrong argument type Hash (expected Data) I tried a couple of things that I read online to fix it, but nothing worked. I ended up re-writing the gem to use ActiveSupport::JSON.decode instead of JSON.parse. This works but it's not sustainable...I can't be forking gems every time I want to use a gem that requires the JSON gem. Update: The best solution of this problem is to upgrade to Rails 2.3 or higher, which fixed it.

    Read the article

  • css layout - break down

    - by Luke
    So I am trying to get the effect of having two frames inside a 750px wide frame. .news {width: 750px;} .news1 {width:550px;} .news2 {width:200px;} Very simple css at this stage. The html/php: <div class="news"> <div class="format"><a href='newspiece.php?news=<?echo $id?>'><?echo "$subject\n";?></a></div> <div class="news1"> <? echo "<div class='content'>"; echo nl2br($comment); echo "<a href='newspiece.php?news=$id'>..[read more]..</a>\n"; echo "</div>"; ?> <h5><? echo "Posted by <a href=\"userprofile.php?user=$posted\">$posted</a> on $final_date\n";?></h5> <? echo "<br />\n";?> </div> <div class="news2"> <img src="images/news/<? echo $id?>.jpg" /> </div> </div>] THe problem I am getting is that the image that should be on the right is going underneath. So in effect, news1 is above news2, rather than side by side. Any ideas?

    Read the article

  • Drop down dynamic

    - by Luke
    I have seen it but dont know how to achieve it. The idea is that I have a drop down menu and when something is selected, something else will appear. Is it AJAX? Any ideas?

    Read the article

  • Image appearing in the wrong place.

    - by Luke
    I have a list that I want to precede on each line with a small image. The CSS: .left div.arrow{background-image: url(../images/design/box.png); float:left; height:15px; width:15px; margin-right:2px;} .left a.list:link, a:visited, a:active {color:black; font-size:0.8em; text-decoration:none; display:block; float:left;} The HTML: <div class="panel">My quick links</div> <div class="arrow"></div> <a href="/messages.php?p=new" class="list">Send a new message</a> <br /> <div class="arrow"></div> <a href="/settings.php#password" class="list">Change my password</a> <br /> <div class="arrow"></div> <a href="/settings.php#picture" class="list">Upload a new site image</a> <br /> As you can see, each image should go before the writing. On the first line, the text "Send a new message" has the preceeding image. However, each line afterwards has the image at the end. So "Send a new message" has an image at the start and finish. It is like the images are staying at the end of the previous line. Any ideas?

    Read the article

  • CALayer and Off-Screen Rendering

    - by Luke Mcneice
    I have a Paging UIScrollView with a contentSize large enough to hold a number of small UIScrollViews for zooming, The viewForZoomingInScrollView is a viewController that holds a CALayer for drawing a PDF page onto. This allows me to navigate through a PDF much like the ibooks PDF reader. The code that draws the PDF (Tiled Layers) is located in: - (void)drawLayer:(CALayer *)layer inContext:(CGContextRef)ctx; And simply adding a 'page' to the visible screen calls this method automatically. When I change page there is some delay before all the tiles are drawn, even though the object (page) has already been created. What i want to be able to do is render the next page before the user scrolls to it, thus preventing the visible tiling effect. However, i have found that if the layer is located offscreen adding it to the scrollview doesn't call the drawLayer. Any Ideas/common gotchas here? I have tried: [viewController.view.layer setNeedsLayout]; [viewController.view.layer setNeedsDisplay]; NB: The fact that this is replicating the ibooks functionally is irrelevant within the context of the full app.

    Read the article

  • Auto refresh when new user comes online

    - by Luke
    Hello. I have a table in the database which includes all active users. I then have a user list which needs refreshing to see who is the latest users online. Whats the best way to tackle this? The user list is always just who is in the active_users table. Thanks for reading.

    Read the article

  • sql inner join problem

    - by Luke
    The following SQL query isn't working. I think the error is on the first line. SELECT SUBSTRING(tbl_news.comment, 1, 250) as tbl_news.comment, tbl_news.id, tbl_news.date, tbl_news.subject, tbl_users.username FROM tbl_news INNER JOIN tbl_users ON tbl_news.creator = tbl_users.id ORDER BY date DESC

    Read the article

  • How can I expose an Objective-C function to JavaScript using WebKit on Mac OS X?

    - by Luke
    I understand to do this on the iPhone you need to trap link requests (as per my other iPhone question UIWebView Expose JavaScript) and you can easily do the reverse and access JavaScript from Obj-C code. However, I would like to have JavaScript be able to call some Objective-C functions that would somehow be registered with WebKit. I assume that you can do this better than trapping links like on the iPhone as on Mac OS X we have access to the full WebKit. I wish to basically do the reverse of Using JavaScript from Objective-C

    Read the article

  • How can I integrate Java with .Net?

    - by Luke
    I have one SDK that is available in Java and another SDK that is available for .Net and would like to write a single application that interfaces with both of them. I imagine I will need to use a cross platform communication framework that can support named pipes (or other in memory communication), what is the best choice? After some more research I found Hessian -- does anyone know anything about the maturity of this project?

    Read the article

  • Helping Kohana 3 ORM to speed up a little

    - by Luke
    I noticed that Kohana 3 ORM runs a "SHOW FULL COLUMNS" for each of my models when I start using them: SHOW FULL COLUMNS FROM `mytable` This query might take a few clock cycles to execute (in the Kohana profiler it's actually the slowest of all queries ran in my current app). Is there a way to help Kohana 3 ORM to speed up by disabling this behaviour and explicitly define the columns in my models instead?

    Read the article

  • C# - UpdateResource - To Remove A Resource

    - by Luke
    I am able to successfully add a resource to a file using UpdateResource and then remove it using: UpdateResource(HANDLE, "TYPE", "NUMER", 1033, IntPtr.Zero, 0); When I add a resource to the file it will add another even though there is an existing resource exactly the same, also I cannot remove any existing resources. When I try to remove an existing resource using that line I get the error ERROR_INVALID_PARAMETER. Any ideas?

    Read the article

  • How to monitor delayed_job with monit

    - by Luke Francl
    Are there any examples on the web of how to monitor delayed_job with Monit? Everything I can find uses God, but I refuse to use God since long running processes in Ruby generally suck. (The most current post in the God mailing list? God Memory Usage Grows Steadily.) Update: delayed_job now comes with a sample monit config based on this question.

    Read the article

  • How To Replace @Resource Annotation with Java 1.4 Compliant Version

    - by Luke
    Hello, I have a test class that has a @Resource annotation for a setter and I need to make it Java 1.4 compliant, so obviously the annotation has to go. I'm using Spring. So, how would I replace something like @Resource("my.resource") so that the setter gets the correct dependency injection? Would I need to make a bean in an xml file? I'm pretty new to this so if I'm not providing enough information, let me know.

    Read the article

  • While loop problems

    - by Luke
    I have put together the following code, the problem is that each while loop is only returning one set of data. $result = mysql_query("SELECT date FROM ".TBL_FIXTURES." WHERE compname = '$comp_name' GROUP BY date"); $i = 1; echo "<table cellspacing=\"10\" style='border: 1px dotted' width=\"300\" bgcolor=\"#eeeeee\">"; while ($row = mysql_fetch_assoc($result)) { $date=date("F j Y", $row['date']); echo $date; echo " <tr> <td>Fixture $i - Deadline on $date</td> </tr> "; $result = mysql_query("SELECT * FROM ".TBL_FIXTURES." WHERE compname = '$comp_name' AND date = '$row[date]' ORDER BY date"); while ($row = mysql_fetch_assoc($result)) { extract ($row); echo " <tr> <td>$home_user - $home_team V $away_user - $away_team</td> </tr> "; } $i++; } echo "</table>"; I should get many dates, and then each set of fixture below. At the moment, the first row from the first while loop is present, along with the data from the second while loop. However, it doesn't continue? Any ideas where I can correct this? Thanks

    Read the article

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