Search Results

Search found 1862 results on 75 pages for 'matt varblow'.

Page 61/75 | < Previous Page | 57 58 59 60 61 62 63 64 65 66 67 68  | Next Page >

  • Using innerHTML to add ordered list fails in IE

    - by Matt
    I'm using the following Javascript code to populate a DIV with an ordered list: // send script back in split list var scriptList = script.split("\n"); var finalScript = "<ol>\n"; var count = 0; while(scriptList.length >= count) { if((scriptList[count]=="") || (scriptList[count] == undefined)) { count ++; continue; } finalScript = finalScript + "<li>" + scriptList[count] + "</li>\n"; count ++; } finalScript = finalScript + "</ol>"; scriptingDiv.innerHTML = finalScript; In firefox, if i look in the DOM using Firebug, this correctly translates to the following and correctly displays an ordered list. <ol> <li>This is the first item in the list</li> <li>This is the second item in the list</li> </ol> In IE, it displays as if the </li> tags are <br /> tags and ignores all the other tags, like this: This is the first item in the list This is the second item in the list Do I need to dynamically add the ordered list to the DOM for this to work? As opposed to just setting the html code in the div using .innerHTML? TIA

    Read the article

  • jqGrid: Is it possible to commit a cell change when tabbing off instead of pressing Enter?

    - by The Matt
    I have a simple in-line edit in my grid, and I want to commit the change when the user tabs off the textbox. The default behavior of jqGrid forces the user to press 'Enter' to commit the change, but this is non-intuitive for our users. onSelectRow: function(id) { $(gridCoreGroups).editRow(id, true, undefined, function(response) { alert("hello world"); } } I've worked my way through the events provided, but they all happen as a result of the user pressing 'Enter', which I want to avoid. Is there something I can wire up that would trigger an action when the user tabs off this cell?

    Read the article

  • Help with basic php and xml needed

    - by Matt
    Hi, I'm really new to xml, with this being my first dip into it. I'm trying to add some text to an image using php and xml. I keep getting the following error: Parse error: syntax error, unexpected '}' in /home/a8744502/public_html/userbar.php on line 18 Below is my code. <?php header ("Content-type: image/jpeg"); $doc = new DOMDocument(); $doc->load( "http://phogue.net/feed/". LIBXML_DTDLOAD ); $procon = $doc->getElementsByTagName( "procon" ); $packages = $procon->getElementsByTagName( "package" ); $value = 0; foreach($packages as $package) { $downloadsA = $package->getElementsByTagName( "downloads" ); $downloads = $downloadsA->item(0)->nodeValue; $value = $downloads + $value } $font = "visitor1.tff"; $font = 4; $im = ImageCreateFromjpeg("procon_plugindeveloper.jpg"); $x = 360; $y = 0; $background_color = imagecolorallocate ($im, 255, 255, 255); $text_color = imagecolorallocate ($im, 255, 255, 255); imagestring ($im, $font, $x, $y, $value, $text_color); imagejpeg ($im); ?> The xml file is of the form <procon> -<packages> --<package> ---<downloads> ---</doanloads> --</package> --<package> ---<downloads> ---</doanloads> --</package> --<package> ---<downloads> ---</doanloads> --</package> -</packages> </procon> The idea is that it should print out the sum of all the downloads tags that are contained in . Any help is appreciated :-)

    Read the article

  • Excluding a specific substring from a regex

    - by Matt S
    I'm attempting to mangle a SQL query via regex. My goal is essentially grab what is between FROM and ORDER BY, if ORDER BY exists. So, for example for the query: SELECT * FROM TableA WHERE ColumnA=42 ORDER BY ColumnB it should capture TableA WHERE ColumnA=42, and it should also capture if the ORDER BY expression isn't there. The closest I've been able to come is SELECT (.*) FROM (.*)(?=(ORDER BY)) which fails without the ORDER BY. Hopefully I'm missing something obvious. I've been hammering in Expresso for the past hour trying to get this.

    Read the article

  • Html 5 Time Tag not recognized by IE8 when cloning

    - by matsientst
    I have been having trouble getting IE to recognize the new Time tag in this context. This all works great in FF. Here is the code: var origComment = $('.articleComment:first div'); if (origComment.length > 0) { var commentHtml = origComment.clone(true); commentHtml.find('time').text('today'); var html = '<article class="' + ((side == 'LEFT') ? '' : 'that') + '">' + commentHtml.html() + '</article>'; $(html).insertAfter('.articleComment:last'); The HTML looks something like this: <article class="articleComment that"> <div id="156" class="parent"> <div class="byline"> <p>Posted <time pubdate="pubdate" datetime="2010-05-07T09:11:08">today</time> by<br/> <a class="username" href="/u/matt">matt</a> </p> <p class="report"><a href="#">Report?</a></p> </div> <div class="comment">left</div> </div> </article> IE can find the Time tag but it returns a collection of 2 elements. I assume the beginning and ending. However, I cannot access it to modify it. I have tried val(), html() and text(). I also can't drop to the actual HTMLElement. I can't get(0).innerHTML. But, if I .get(0).tagName it actually is the Time tag I've got. Any ideas? I hope this makes sense.

    Read the article

  • Are background threads a bad idea? Why?

    - by Matt Grande
    So I've been told what I'm doing here is wrong, but I'm not sure why. I have a webpage that imports a CSV file with document numbers to perform an expensive operation on. I've put the expensive operation into a background thread to prevent it from blocking the application. Here's what I have in a nutshell. protected void ButtonUpload_Click(object sender, EventArgs e) { if (FileUploadCSV.HasFile) { string fileText; using (var sr = new StreamReader(FileUploadCSV.FileContent)) { fileText = sr.ReadToEnd(); } var documentNumbers = fileText.Split(new[] {',', '\n', '\r'}, StringSplitOptions.RemoveEmptyEntries); ThreadStart threadStart = () => AnotherClass.ExpensiveOperation(documentNumbers); var thread = new Thread(threadStart) {IsBackground = true}; thread.Start(); } } (obviously with some error checking & messages for users thrown in) So my three-fold question is: a) Is this a bad idea? b) Why is this a bad idea? c) What would you do instead?

    Read the article

  • MySQL Query still executing after a day..?

    - by Matt Jarvis
    Hi - I'm trying to isolate duplicates in a 500MB database and have tried two ways to do it. One creating a new table and grouping: CREATE TABLE test_table as SELECT * FROM items WHERE 1 GROUP BY title; But it's been running for an hour and in MySQL Admin it says the status is Locked. The other way I tried was to delete duplicates with this: DELETE bad_rows.* from items as bad_rows inner join ( select post_title, MIN(id) as min_id from items group by title having count(*) 1 ) as good_rows on good_rows.post_title = bad_rows.post_title; ..and this has been running for 24hours now, Admin telling me it's Sending data... Do you think either or these queries are actually still running? How can I find out if it's hung? (with Apple OS X 10.5.7)

    Read the article

  • Fluent nHibernate - How to map a non-key column on a junction table?

    - by The Matt
    Taking an example that is provided on the Fluent nHibernate website, I need to extend it slightly: I need to add a 'Quantity' column to the StoreProduct table. How would I map this using nHibernate? An example mapping is provided for the given scenario above, but I'm not sure how I would get the Quantity column to map to a property on the Product class: public class StoreMap : ClassMap<Store> { public StoreMap() { Id(x => x.Id); Map(x => x.Name); HasMany(x => x.Employee) .Inverse() .Cascade.All(); HasManyToMany(x => x.Products) .Cascade.All() .Table("StoreProduct"); } }

    Read the article

  • Stable/repeatable random sort (MySQL, Rails)

    - by Matt Rogish
    I'd like to paginate through a randomly sorted list of ActiveRecord models (rows from MySQL database). However, this randomization needs to persist on a per-session basis, so that other people that visit the website also receive a random, paginate-able list of records. Let's say there are enough entities (tens of thousands) that storing the randomly sorted ID values in either the session or a cookie is too large, so I must temporarily persist it in some other way (MySQL, file, etc.). Initially I thought I could create a function based on the session ID and the page ID (returning the object IDs for that page) however since the object ID values in MySQL are not sequential (there are gaps), that seemed to fall apart as I was poking at it. The nice thing is that it would require no/minimal storage but the downsides are that it is likely pretty complex to implement and probably CPU intensive. My feeling is I should create an intersection table, something like: random_sorts( sort_id, created_at, user_id NULL if guest) random_sort_items( sort_id, item_id, position ) And then simply store the 'sort_id' in the session. Then, I can paginate the random_sorts WHERE sort_id = n ORDER BY position LIMIT... as usual. Of course, I'd have to put some sort of a reaper in there to remove them after some period of inactivity (based on random_sorts.created_at). Unfortunately, I'd have to invalidate the sort as new objects were created (and/or old objects being removed, although deletion is very rare). And, as load increases the size/performance of this table (even properly indexed) drops. It seems like this ought to be a solved problem but I can't find any rails plugins that do this... Any ideas? Thanks!!

    Read the article

  • Adding new records in Access without wrecking the form

    - by Matt Parker
    I'm working on a simple Access 2003 application to keep track of things that need to be done for clients for some colleagues. Each colleague has a set of clients, and each client has a set of actions that need to be taken by a certain date. I've set up a form that consists of a combobox for client ID (indexed), a drop-down for the person who is handling that client's case, and a button for adding new clients (a standard Access-created Add Record button). The actions are listed in a subform below these three elements. The problem I've run into is that the first person I tested this on clicked the button to add a new record, then didn't fill it out and tried to select another client from the drop-down list. Access interprets this as an attempt to set the selected Client ID as the ID for the new record and rightfully throws an error for duplicate primary keys. I can think of a couple of ways around this problem, but I'd much rather hear your elegant solutions than kludge together some junk in a language I don't know. Let me know if you have any questions. Thank you.

    Read the article

  • Eclipse Doesn't List Classes Within Java Packages

    - by Matt Robertson
    Usually when I'm typing a Java import statement in Eclipse or otherwise referencing a class via the packages that it is in, Eclipse shows a context menu with a list of all classes within that package. There have been several times, however, that it would only shows subpackages within a package and would not show classes within that package. Does anyone know why this is? It sounds like a setting/preference was changed, but I never knowingly changed anything related to this.

    Read the article

  • MPMoviePlayerController iPhone 3G & .mov file format

    - by Matt
    Just posting a question to the world... My app is currently setup to play video files. The app is setup to play .mov files and when tested on a 3GS, iPhone 4, and an iPad, it works great. But when playing on an iPhone 3G, the file does not play. Is this based on different compression standards that the 3G can't handle? I liked the .mov extension as it was compressed nicely to stream to the device. I have now converted the video files to .m4v so it will play on the 3G, but the file is now 3 times the size. Thanks in advance for any answers I get!!

    Read the article

  • How is this input tag linking to another page?

    - by Matt
    Response.Write("<div><input type='submit' name='submit' value='Update Cart' /></div>") Response.Write("<div><input type='submit' name='submit' value='Shop More' /></div>") Response.Write("<div><input type='submit' name='submit' value='Checkout' /></div>") that is some example code from my teacher, but he hasn't answered my email in a couple days so I need some help. When you click the Update Cart button it just updates the cart page it's on, but when you click the Shop More button it links to Shop.aspx a different page, and the Checkout links to another page as well. I can't figure out how it is linking just from that code, anybody have any insights?

    Read the article

  • Using a dropdown on a static webpage as a DataSource in C#.net

    - by Matt
    I know this is a terrible way of doing things, but it's for an internal app where security is no issue. Basically, an old group created a php page with a drop down and this drop down is populated with entries from a DB. The DB owner is currently absent and for the sake of time, I would just need something that turns the entries in that drop down, always at the same url with the same ID every load into a List. Is there a quick, painless way to do this in .NET?

    Read the article

  • Creating an object in javascript pointing to a table row with an "id"

    - by Matt
    I'm having trouble finding information online for creating a object in javascript and pointing it to a id in the html. Here's what I have so far for the JavaScript: function countRecords() { headRow=new Object(); //point to specific id here? var rowCount = 0; The HTML: <table id="prodTable"> <tr><th colspan="8">Digital Cameras</th></tr> <tr id="titleRow"> <th>Model</th> <th>Manufacturer</th> <th>Resolution</th> <th>Zoom</th> <th>Media</th> <th>Video</th> <th>Microphone</th> </tr>

    Read the article

  • Automatic VisualState Manager in Silverlight

    - by Matt
    If you create a simple button and then choose Edit Template - Edit a Copy, Blend will automatically generate a style area, along with all the button states (MouseEnter, MouseLeave, Pressed, etc). No where in the code behind or auto generated style area does it say that on a "MouseOver" event, change the state to "MouseOver", but it still manages to work! Is the only way to change a button's state have to be done the code behind using the VisualStateManager.GoToState method, or can you change it much like CSS does (a:hover) using the VisualStateManager? From my experience, setting just doesn't seem to do the trick.

    Read the article

  • Convert enumerated records to php object

    - by Matt H
    I have a table containing a bunch of records like this: +-----------+--------+----------+ | extension | fwd_to | type | +-----------+--------+----------+ | 800 | 11111 | noanswer | | 800 | 12345 | uncond | | 800 | 22222 | unavail | | 800 | 54321 | busy | | 801 | 123 | uncond | +-----------+--------+----------+ etc The query looks like this: select fwd_to, type from forwards where extension='800'; Now I get back an array containing objects which look like the following when printed with Kohana::debug: (object) stdClass Object ( [fwd_to] => 11111 [type] => noanswer ) (object) stdClass Object ( [fwd_to] => 12345 [type] => uncond ) (object) stdClass Object ( [fwd_to] => 22222 [type] => unavail ) (object) stdClass Object ( [fwd_to] => 54321 [type] => busy ) What I'd like to do is convert this to an object of this form: (object) stdClass Object ( [busy] => 54321 [uncond] => 12345 [unavail] => 22222 [noanswer] => 11111 ) The reason being I want to then call json_encode on it. This will allow me to use jquery populate to populate a form. Is there a suggested way I can do this nicely? I'm fairly new to PHP and I'm sure this is easy but it's eluding me at the moment.

    Read the article

  • Flushing JDBC connection pools

    - by Matt
    Does anyone know the best (or any) way to flush a JDBC connection pool? I can't find anything obvious in the documentation. It appears connection pools aren't meant to ever be deleted. My current thought is to delete all DataSources from the hash we store them in, which will trigger our code to make new ones. However, my first attempt throws a ConcurrentModificationException.

    Read the article

  • Fluent mapping help

    - by Matt Thrower
    Hi, This is probably a very simple question but I'm new to nHibernate and I'm having trouble working this out. I have a Page object, which can have many Region objects. I also have a Workflow object. Page and Region objects both have a relationship to Workflow and it's this double association that I'm having trouble with. The PageMap has HasMany(Function(x) x.Regions).Cascade.All() And the RegionMap has: References(Function(x) x.Page) And this all seems to work. But how do I define the relationship between Workflow and these two objects?

    Read the article

  • SUM of column with Left Outer Join

    - by Matt
    I am trying to get the Count of all records that have at least on person who is authorized on the record. Basically, a Record can have more than one person associated with it. I want to return the count of Total Records, a count of total Authorized Records where at least 1 person is authorized, and a count of total NotAuthorized records where no person associated with record is authorized. It doesn't matter if one person is authorized per Record or if 3 people are authorized for that record, that should add 1 to the Authorized counter. The current query is incrementing Auth and Non auth for each person added per record rather, than one per record. If no people are assigned to the record that should also count towards Not Auth. SELECT Count(DISTINCT Record.RecordID) AS TotalRecords, SUM(CASE WHEN People.PersonLevel = 1 THEN 1 ELSE 0 END) AS Authorized, SUM(CASE WHEN People.PersonLevel <> 1 THEN 1 ELSE 0 END) AS NotAuthorized FROM Record LEFT OUTER JOIN RecordPeople ON Record.RecordID = RecordPeople.RecordID LEFT OUTER JOIN People ON RecordPeople.PersonID = People.PersonID

    Read the article

  • PHP's form bracket trick is to Django's ___?

    - by Matt
    In PHP you can create form elements with names like: category[1] category[2] or even category[junk] category[test] When the form is posted, category is automatically turned into a nice dictionary like: category[1] => "the input value", category[2] => "the other input value" Is there a way to do that in Django? request.POST.getlist isn't quite right, because it simply returns a list, not a dictionary. I need the keys too.

    Read the article

  • How do I password protect IIS in a method analogous to Apache's AuthType / AuthUserFile mechanism?

    - by Matt
    I'm used to doing basic password protection for Apache w/ the following method in Apache config files: AuthType Basic AuthName "By Invitation Only" AuthUserFile /path/to/.htpasswd Require valid-user However, I've been asked to put some protection on a subdirectory of a site running ColdFusion on top of IIS6, and I'm unfamiliar with how to do this. How is this done? What should I look out for? I just need to password protect an administrative subdirectory, so I don't need a full user login system - just something that limits who can access the section of the site.

    Read the article

< Previous Page | 57 58 59 60 61 62 63 64 65 66 67 68  | Next Page >