Search Results

Search found 1527 results on 62 pages for 'rob windsor'.

Page 42/62 | < Previous Page | 38 39 40 41 42 43 44 45 46 47 48 49  | Next Page >

  • Echoing a pseudo column value after a COUNT

    - by rob - not a robber
    Hi Gang... Please don't beat me if this is elementary. I searched and found disjointed stuff relating to pseudo columns. Nothing spot on about what I need. Anyway... I have a table with some rows. Each record has a unique ID, an ID that relates to another entity and finally a comment that relates to that last entity. So, I want to COUNT these rows to basically find what entity has the most comments. Instead of me explaining the query, I'll print it SELECT entity_id, COUNT(*) AS amount FROM comments GROUP BY entity_id ORDER BY amount DESC The query does just what I want, but I want to echo the values from that pseudo column, 'amount' Can it be done, or should I use another method like mysql_num_rows? Thank you!!!

    Read the article

  • Why is my Repeater null in code behind?

    - by Rob Stevenson-Leggett
    I'm just starting a new project and I am getting some really weird stuff happening. ASP.NET 3.5, VS2008. I've tried rebuild, close VS, delete everything and get from svn again but I cannot understand why the repeater in the following is null on page_load. I know this is going to be a headslapping moment. Help me out? Markup: <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="GalleryControl.ascx.cs" Inherits="Site.UserControls.GalleryControl" %> <asp:Repeater ID="rptGalleries" runat="server"> <HeaderTemplate><ul></HeaderTemplate> <ItemTemplate> <li>wqe</li> </ItemTemplate> <FooterTemplate></ul></FooterTemplate> </asp:Repeater> Code behind public partial class GalleryControl : System.Web.UI.UserControl { protected void Page_Load(object sender, EventArgs e) { rptGalleries.DataSource = new[] {1, 2, 3, 4, 5}; rptGalleries.DataBind(); } } Why is my repeater null? What the F is going on?

    Read the article

  • sql server 2008 multiple inserts over 2 tables

    - by Rob
    I got the following trigger on my sql server 2008 database CREATE TRIGGER tr_check_stoelen ON Passenger AFTER INSERT, UPDATE AS BEGIN IF EXISTS( SELECT 1 FROM Passenger p INNER JOIN Inserted i on i.flight= p.flight WHERE p.flight= i.flightAND p.seat= i.seat ) BEGIN RAISERROR('Seat taken!',16,1) ROLLBACK TRAN END END The trigger is throwing errors when i try to run the query below. This query i supposed to insert two different passengers in a database on two different flights. I'm sure both seats aren't taken, but i can't figure out why the trigger is giving me the error. Does it have to do something with correlation? INSERT INTO passagier VALUES (13392,5315,3,'Janssen Z','2A','October 30, 2006 10:43','M'), (13333,5316,2,'Janssen Q','2A','October 30, 2006 11:51','V')

    Read the article

  • How can I restore the order of an (incomplete) select list to its original order?

    - by Rob
    I have two Select lists, between which you can move selected options. You can also move options up and down in the right list. When I move options back over to the left list, I would like them to retain their original position in the list order, even if the list is missing some original options. This is solely for the purpose of making the list more convenient for the user. I am currently defining an array with the original Select list onload. What would be the best way to implement this?

    Read the article

  • What exactly does this PHP code do?

    - by Rob
    Alright, my friend gave me this code for requesting headers and comparing them to what the header should be. It works perfectly, but I'm not sure why. Here is the code: $headers = apache_request_headers(); $customheader = "Header: 7ddb6ffab28bb675215a7d6e31cfc759"; foreach ($headers as $header => $value) { // 1 $custom .= "$header: $value"; // 2 } $mystring = $custom; // 3 $findme = $customheader; // 4 $pos = strpos($mystring, $findme); if ($pos !== false) { // Do something } else{ exit(); } //If it doesn't match, exit. I commented with some numbers relating to the following questions: 1: What exactly is happening here? Is it setting the $headers as $header AND $value? 2: Again, don't have any idea what is going on here. 3: Why set the variable to a different variable? This is the only area where the variable is getting used, so is there a reason to set it to something else? 4: Same question as 3. I'm sorry if this is a terrible question, but its been bothering me, and I really want to know WHY it works. Well, I understand why it works, I guess I just want to know more specifically. Thanks for any insight you can provide.

    Read the article

  • Automated URL checking from a MySQL table

    - by Rob
    Okay, I have a list of URLs in a MySQL table. I want the script to automatically check each link in the table for 404, and afterward I want it to store whether the URL was 404'd or not, as well as store a time for last checked. Is this even possible to do automatically, even if no one runs the script? ie, no one visits the page for a few days, but even with no one visiting the page, it automatically ran the test. If its possible, how could I go about making a button to do this?

    Read the article

  • Why doesn't MongoDb store my slashes in this string?

    - by Rob Dudley
    Can anyone tell me why this command doesn't work from the MongoDB shell client: db.coll.update({'live':true},{$set:{'mask':"\D\D\D\D\D\D\D\D"}},false,true) but db.coll.findOne({'id':'someId'}) returns the mask field as: "mask" : "DDDDDDDD", Where are the slashes going? I've tried "double escaping" with \\D and that inserts both slashes: "mask" : "\\D\\D\\D\\D\\D\\D\\D\\D", MongoDB shell version: 2.0.6, MongoDB version: 2.0.5, OSX Lion Thanks

    Read the article

  • YQL Open Data Table for Wikipedia

    - by Rob Young
    Has anyone written a YQL open data table for accessing Wikipedia? I've had a hunt around the internet and found mention of people using YQL for extracting various bits of information from Wikipedia pages such as microformats, links or content but I haven't been able to find an open data table that ties it all together.

    Read the article

  • Eclipse outline of Prototype javascript classes

    - by Rob Agar
    Is there a way to show the structure of a javascript class declared using Prototype's Class.create function in the Eclipse outline view? The declarations look like: var Foo = Class.create({ bar: function() { ... }, baz: function() { ... }, }); At the moment all I get is "Foo:". (A google search turned up http://marketplace.eclipse.org/content/prototypewtp, but the link to the plugin homepage is dead)

    Read the article

  • ASP MVC2 - Dynamic Field Layout

    - by Rob
    I'm new to MVC and ADO.net Entity Framework. Instead of having to create an edit/display for each entity, I'd like to have the controller base class generate the view and validation code based off metadata stored in a table - something along those lines. I would imagine something like this has already been done, or there are good reasons for not doing it. Any insight or suggestions are appreciated.

    Read the article

  • How do you use C++0x raw strings with GCC 4.5?

    - by Rob N
    This page says that GCC 4.5 has C++ raw string literals: http://gcc.gnu.org/projects/cxx0x.html But when I try to use the syntax from this page: http://www2.research.att.com/~bs/C++0xFAQ.html#raw-strings #include <iostream> #include <string> using namespace std; int main() { string s = R"[\w\\\w]"; } I get this error: /opt/local/bin/g++-mp-4.5 -std=gnu++0x -O3 rawstr.cc -o rawstr rawstr.cc:9:19: error: invalid character '\' in raw string delimiter rawstr.cc:9:5: error: stray 'R' in program What is the right syntax for raw strings?

    Read the article

  • Multiple Payment options within the same order

    - by Rob Y
    I have a requirement to be able to accept different forms of payment within the same order - ie not just the usual credit card or paypal for the whole thing, but perhaps paypal for one item, cheque for another. I know this sounds quite crazy, but there is a good business reason for the requirement so I can't just push back. The best way I can think of implementing it at the moment is to have kind of a hub page, where you can "launch off" into multiple flows for each of the payments by opening new windows. I can't figure out a way of doing this in a linear flow as for example you can't guarantee that a user will come back from paypal, so you'd then lose the user completely. Is there a neater way of doing this that anyone can think of, or can anyone point me to an example of a site that does somethign similar for inspiration?

    Read the article

  • Django sub-applications & module structure

    - by Rob Golding
    I am developing a Django application, which is a large system that requires multiple sub-applications to keep things neat. Therefore, I have a top level directory that is a Django app (as it has an empty models.py file), and multiple subdirectories, which are also applications in themselves. The reason I have laid my application out in this way is because the sub-applications are separated, but they would never be used on their own, outside the parent application. It therefore makes no sense to distribute them separately. When installing my application, the settings file has to include something like this: INSTALLED_APPS = ( ... 'myapp', 'myapp.subapp1', 'myapp.subapp2', ... ) ...which is obviously suboptimal. This also has the slightly nasty result of requiring that all the sub-applications are referred to by their "inner" name (i.e. subapp1, subapp2 etc.). For example, if I want to reset the database tables for subapp1, I have to type: python manage.py reset subapp1 This is annoying, especially because I have a sub-app called core - which is likely to conflict with another application's name when my application is installed in a user's project. Am I doing this completely wrongly, or is there away to force these "inner" apps to be referred to by their full name?

    Read the article

  • No "Distribution" setting in latest XCode??

    - by Rob
    For some reason, a choice for "Distribution" configuration is not showing up for building an app in the latest XCode 3.2.2 with iPhone SDK 3.2 when I'm trying to build an app for the iPad Any one else seeing this? I can set it to "Debug" or "Release" but there isn't even an option for Distribution.

    Read the article

  • How do i convert a string to a JSON object in JQuery?

    - by Rob
    I have a string in my db I want to pull into my page and convert to a json object. [ {id: 1,title: "Long Event", start: new Date(2009, 5, 6, 14, 0),end: new Date(2009, 5, 11)}, {id: 2,title: "Repeating Event", start: new Date(2009, 5, 2)}, {id: 3,title: "Meeting", start: new Date(2009, 5, 20, 9, 0)}, {id: 4,title: "Click for Facebook", start: new Date(2009, 5, 27, 16),end: new Date(2009, 5, 29), url: "http://facebook.com/"} ] How can I do this using JQuery?

    Read the article

  • Multi-Precision Arithmetic on MIPS

    - by Rob
    Hi, I am just trying to implement multi-precision arithmetic on native MIPS. Assume that one 64-bit integer is in register $12 and $13 and another is in registers $14 and $15. The sum is to be placed in registers $10 and $11. The most significant word of the 64-bit integer is found in the even-numbered registers, and the least significant word is found in the odd-numbered registers. On the internet, it said, this is the shortest possible implementation. addu $11, $13, $15 # add least significant word sltu $10, $11, $15 # set carry-in bit addu $10, $10, $12 # add in first most significant word addu $10, $10, $14 # add in second most significant word I just wanna double check that I understand correctly. The sltu checks if the sum of the two least significant words is smaller or equal than one of the operands. If this is the case, than did a carry occur, is this right? To check if there occured a carry when adding the two most significant words and store the result in $9 I have to do: sltu $9, $10, $12 # set carry-in bit Does this make any sense?

    Read the article

  • What broke in this Javascript 1.2 snippet?

    - by Rob Kelley
    A friend has pointed me to his old website and says "the submit form just stopped working a while ago. I'm sure it's something simple." The form asks a child for a certain word from a book, and based on the answer, it should redirect the child to a success page or a failure page. It's using Javascript 1.2, circa 2001. You can see this form in in-action at: http://www.secrethidingplaces.com/login1.html Any idea why it's failing? The HTML does this: <script src="password.js" type="text/javascript" language="JavaScript1.2"> </script> <script type="text/javascript" language="JavaScript1.2"> <!-- function showRightPage () { return window.location.href = "extra.html" ; } function showWrongPage () { return window.location.href = "sorry2.html" ; } //--> </script> and then this: document.write ( '<form name="questionForm" action="javascript:checkAnswer()" method="post">' ) ; ... document.write ( '<input type="text" name="userAnswer" value="" size="90">' ) ; document.write ( '<INPUT TYPE="image" NAME="submit" SRC="stock/btn_send.gif" width="121" height="41" BORDER="0" ALT="submit">' ) ; document.write ( '\</p>' ) ; document.write ( '\</form>' ) ; I'm assuming there's something ugly in CheckAnswer from ./password.js . I can hack the form to bypass that javascript and go straight to the success page: document.write ( '<form name="questionForm" action="extra.html" method="post">' ) ; but I'd like to help my friend get his kids site working again. The CheckAnswer function is below. Is something going wrong in here? function checkAnswer () { currentAnswer = answersArray [ choiceNumber ] ; if (agt.indexOf("msie") != -1) { rawAnswer = document.questionForm.userAnswer.value ; } else { rawAnswer = document.callThis.document.questionForm.userAnswer.value ; } lcAnswer = rawAnswer.toLowerCase ( ) ; includedAnswer = lcAnswer.indexOf ( "currentAnswer" ) ; zadaAnswer = lcAnswer.indexOf ( "zada" ) ; brendanAnswer = lcAnswer.indexOf ( "brendan" ) ; nineAnswer = lcAnswer.indexOf ( "nine" ) ; thirtyAnswer = lcAnswer.indexOf ( "thirty" ) ; if ( choiceNumber == 0 ) { if ( includedAnswer == -1 && zadaAnswer == -1 && brendanAnswer == -1 ) { checked = "wrong" ; } } if ( choiceNumber == 8 ) { if ( includedAnswer == -1 && zadaAnswer == -1 && nineAnswer == -1 ) { checked = "wrong" ; } } if ( choiceNumber == 16 ) { if ( includedAnswer == -1 && zadaAnswer == -1 && thirtyAnswer == -1 ) { checked = "wrong" ; } } if ( choiceNumber != 0 && choiceNumber != 8 && choiceNumber != 16 ) { if ( includedAnswer == -1 && zadaAnswer == -1 ) { checked = "wrong" ; } } if ( checked == "wrong" ) { showWrongPage () ; } else { showRightPage () ; } } Thanks!

    Read the article

  • How do partialviews work in asp.net MVC when passing parameters back?

    - by Rob Ellis
    I have a page with a partialview on it which is a list of items. I have a button on it which shows the next 5 items. This is done via ajax:- using (Ajax.BeginForm("ShowUpdates", new AjaxOptions() { UpdateTargetId = "statusUpdateContainer", InsertionMode = InsertionMode.InsertAfter })) { <input type="submit" class="formbutton" value="Show More" style="width:100%;"/> } My partial view controller: [HttpPost] public ActionResult ShowUpdates(string page, string pagesize) { //get data code hidden here return PartialView("_statusUpdates"); } My question is that I need the 'page' variable to increment each time someone presses the form button which is contained within the partialview. How do I keep track of that variable?

    Read the article

  • ASP.NET MVC 2 user input to SQL 2008 Database problems

    - by Rob
    After my publish in VS2010 the entire website loads and pulls data from the database perfectly. I can even create new users through the site with the correct key code, given out to who needs access. I have two connection strings in my web.config file The first: <add xdt:Transform="SetAttributes" xdt:Locator="Match(name)" name="EveModelContainer" connectionString="metadata=res://*/Models.EdmModel.EveModel.csdl|res://*/Models.EdmModel.EveModel.ssdl|res://*/Models.EdmModel.EveModel.msl;provider=System.Data.SqlClient;provider connection string=&quot;Data Source=localhost;Initial Catalog=fleet;Persist Security Info=True;User ID=fleet;Password=****&quot;" providerName="System.Data.EntityClient" /> The second: <add xdt:Transform="SetAttributes" xdt:Locator="Match(name)" name="ApplicationServices" connectionString="Data Source=localhost;Initial Catalog=fleet;Persist Security Info=True;User ID=fleet;Password=****;MultipleActiveResultSets=True" /> The first one is the one that is needed to post data with the main application, EveModelContainer. Everything else is pulled using the standard ApplicationServices connection. Do you see anything wrong with my connectionstring? I'm at a complete loss here. The site works perfectly on my friends server and not on mine... Could it be a provider issue? And if I go to iis 7's manager console, and click .net users I get a pop up message saying the custom provider isn't a trusted provider do I want to allow it to run at a higher trust level. I'm at the point where I think its either my string or this trusted provider error... but I have no clue how to add to the trusted provider list... Thank you in advance!!!

    Read the article

  • How can I stop cURL from outputting the contents of the page it loads into the browser?

    - by Rob
    I currently use curl_multi_* to connect to a few sites. Its only sending a few $_GET variables to start a script, but it outputs the html from the sites to the browser. I want to stop this. I already use a short timeout, but sometimes the scripts start fast, and I don't want to set the timeout any lower, in case it causes it not to connect. So how can I stop the output to the browser from cURL?

    Read the article

  • suppress keyboard in iphone UiWebViews

    - by rob
    I have an app that uses UiWebViews, and I need to not show the keyboard for a text field within such a view. I provide my own buttons that insert the limited sorts of text the field allows, but I also need to allow pasting (I will filter what gets pasted) and adjusting the cursor position. Any way to do this?

    Read the article

  • How to make one ASP.NET MVC site "derive" from another.

    - by Rob Levine
    My question is similar to "ASP.NET 2 projects to share same files", but with an ASP.NET MVC slant. Basically, we have two sites, one being based mostly on the other (roughly 90% views, controllers, images, in the second are identical to the first). However, in some cases, the views may be different, or a controller in the second site may be different to the first. Are there any simple ways of achieving this in ASP.NET MVC? So far, we've looked at using linked files to have two totally seperate projects where the second project shares the files it needs from the first. One problem with this approach is that most pages in the second project don't literally exist in the virtual directory, it makes debugging a pain - you have to publish in order to generate the files so you can debug. Does anyone have any better approaches, or ways this approach can be simplified?

    Read the article

< Previous Page | 38 39 40 41 42 43 44 45 46 47 48 49  | Next Page >