Search Results

Search found 645 results on 26 pages for 'phil yates'.

Page 15/26 | < Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >

  • Have to click twice to submit the form in IE8

    - by phil
    A very peculiar bug in a simple html form. After changing an option, button has to be clicked twice to submit the form. Button is focused after clicking once, but form is not submitted. It's only this way in IE8 and works fine in Chrome and FF. PAY ATTENTION TO 'g^' right before <select>. It has to be a letter or number followed by a symbol to generate this bug. For example, 'a#','f$','3(' all create the same bug. Otherwise it works fine. BTW, if you don't change option and click button right away,there won't be any bug. Very strange, huh? <form method="post" action="match.php"> g^ <select> <option>Select</option> <option>English</option> <option>French</option> </select> <input type="submit" value="Go" /> </form>

    Read the article

  • how to pass an id number string to this class (asp.net, c#)

    - by Phil
    I'm very much a vb person, but have had to use this id number class in c#. I got it from http://www.codingsanity.com/idnumber.htm : using System; using System.Text.RegularExpressions; namespace Utilities.SouthAfrica { /// <summary> /// Represents a South African Identity Number. /// valid number = 7707215230080 /// invalid test number = 1234567891234 /// /// </summary> [Serializable()] public class IdentityNumber { #region Enumerations /// <summary> /// Indicates a gender. /// </summary> public enum PersonGender { Female = 0, Male = 5 } public enum PersonCitizenship { SouthAfrican = 0, Foreign = 1 } #endregion #region Declarations static Regex _expression; Match _match; const string _IDExpression = @"(?<Year>[0-9][0-9])(?<Month>([0][1-9])|([1][0-2]))(?<Day>([0-2][0-9])|([3][0-1]))(?<Gender>[0-9])(?<Series>[0-9]{3})(?<Citizenship>[0-9])(?<Uniform>[0-9])(?<Control>[0-9])"; #endregion #region Constuctors /// <summary> /// Sets up the shared objects for ID validation. /// </summary> static IdentityNumber() { _expression = new Regex(_IDExpression, RegexOptions.Compiled | RegexOptions.Singleline); } /// <summary> /// Creates the ID number from a string. /// </summary> /// <param name="IDNumber">The string ID number.</param> public IdentityNumber(string IDNumber) { _match = _expression.Match(IDNumber.Trim()); } #endregion #region Properties /// <summary> /// Indicates the date of birth encoded in the ID Number. /// </summary> /// <exception cref="System.ArgumentException">Thrown if the ID Number is not usable.</exception> public DateTime DateOfBirth { get { if(IsUsable == false) { throw new ArgumentException("ID Number is unusable!", "IDNumber"); } int year = int.Parse(_match.Groups["Year"].Value); // NOTE: Do not optimize by moving these to static, otherwise the calculation may be incorrect // over year changes, especially century changes. int currentCentury = int.Parse(DateTime.Now.Year.ToString().Substring(0, 2) + "00"); int lastCentury = currentCentury - 100; int currentYear = int.Parse(DateTime.Now.Year.ToString().Substring(2, 2)); // If the year is after or at the current YY, then add last century to it, otherwise add // this century. // TODO: YY -> YYYY logic needs thinking about if(year > currentYear) { year += lastCentury; } else { year += currentCentury; } return new DateTime(year, int.Parse(_match.Groups["Month"].Value), int.Parse(_match.Groups["Day"].Value)); } } /// <summary> /// Indicates the gender for the ID number. /// </summary> /// <exception cref="System.ArgumentException">Thrown if the ID Number is not usable.</exception> public PersonGender Gender { get { if(IsUsable == false) { throw new ArgumentException("ID Number is unusable!", "IDNumber"); } int gender = int.Parse(_match.Groups["Gender"].Value); if(gender < (int) PersonGender.Male) { return PersonGender.Female; } else { return PersonGender.Male; } } } /// <summary> /// Indicates the citizenship for the ID number. /// </summary> /// <exception cref="System.ArgumentException">Thrown if the ID Number is not usable.</exception> public PersonCitizenship Citizenship { get { if(IsUsable == false) { throw new ArgumentException("ID Number is unusable!", "IDNumber"); } return (PersonCitizenship) Enum.Parse(typeof(PersonCitizenship), _match.Groups["Citizenship"].Value); } } /// <summary> /// Indicates if the IDNumber is usable or not. /// </summary> public bool IsUsable { get { return _match.Success; } } /// <summary> /// Indicates if the IDNumber is valid or not. /// </summary> public bool IsValid { get { if(IsUsable == true) { // Calculate total A by adding the figures in the odd positions i.e. the first, third, fifth, // seventh, ninth and eleventh digits. int a = int.Parse(_match.Value.Substring(0, 1)) + int.Parse(_match.Value.Substring(2, 1)) + int.Parse(_match.Value.Substring(4, 1)) + int.Parse(_match.Value.Substring(6, 1)) + int.Parse(_match.Value.Substring(8, 1)) + int.Parse(_match.Value.Substring(10, 1)); // Calculate total B by taking the even figures of the number as a whole number, and then // multiplying that number by 2, and then add the individual figures together. int b = int.Parse(_match.Value.Substring(1, 1) + _match.Value.Substring(3, 1) + _match.Value.Substring(5, 1) + _match.Value.Substring(7, 1) + _match.Value.Substring(9, 1) + _match.Value.Substring(11, 1)); b *= 2; string bString = b.ToString(); b = 0; for(int index = 0; index < bString.Length; index++) { b += int.Parse(bString.Substring(index, 1)); } // Calculate total C by adding total A to total B. int c = a + b; // The control-figure can now be determined by subtracting the ones in figure C from 10. string cString = c.ToString() ; cString = cString.Substring(cString.Length - 1, 1) ; int control = 0; // Where the total C is a multiple of 10, the control figure will be 0. if(cString != "0") { control = 10 - int.Parse(cString.Substring(cString.Length - 1, 1)); } if(_match.Groups["Control"].Value == control.ToString()) { return true; } } return false; } } #endregion } } Can someone please tell the syntax for how I pass an id number to the class? Thanks

    Read the article

  • Syntax error converting the nvarchar value to a column of data type int.

    - by Phil
    I have 1,2,3,4,5,6,7,8,9 stored as nvarchar inside Level in my db. I then have a dropdownlist with values 1,2,3,4,5,6,7,8,9. When a user makes a selection (i.e 1) (Level.SelectedValue.ToString). This builds an sql query via a param like this: "Select things From MBA_EOI Where level = 1" When I run the select I get the following error: Syntax error converting the nvarchar value '1,2,3,4,5,6,7,8,9' to a column of data type int. I was under the impression that I was dealing with an Nvarchar field and the selected value as string, where does the int conversion come in? p.s I have also tried Level.SelectedItem.ToString

    Read the article

  • Swapping data binding in code

    - by Phil J Pearson
    I have two data-bound text boxes. One is bound to a string and the other to a number. The 'default' binding is set in XAML. Under some circumstances I need to reverse the bindings at runtime (the string is usually a prefix but sometimes it's a suffix). I have the following code in my view model, called when the window is loaded: Binding stringBinding = BindingOperations.GetBinding(view.seqLeft, TextBox.TextProperty); Binding numberBinding = BindingOperations.GetBinding(view.seqRight, TextBox.TextProperty); view.seqLeft.SetBinding(TextBlock.TextProperty, numberBinding); view.seqRight.SetBinding(TextBlock.TextProperty, stringBinding); After that the code loads the properties to which the binding refers. The problem is that the 'new' binding doesn't seem to work. What have I missed? Is there a better way?

    Read the article

  • Try catch finally blocks.. do i still need them?

    - by Phil
    I am handling errors via my global.asax in this method: Dim CurrentException As Exception CurrentException = Server.GetLastError() Dim LogFilePath As String = Server.MapPath("~/Error/" & DateTime.Now.ToString("dd-MM-yy.HH.mm") & ".txt") Dim sw As System.IO.StreamWriter = New System.IO.StreamWriter(LogFilePath) sw.WriteLine(DateTime.Now.ToString) sw.WriteLine(CurrentException.ToString()) sw.Close() In my code I currently have no other error handling. Should I still insert try, catch, finally blocks? Thanks.

    Read the article

  • Should Marketing departments have basic HTML skills?

    - by Phil.Wheeler
    Working within an organisation as part of the in-house site development team, a lot of my team's throughput is driven by the colouring-in (marketing) department. It is their responsibility to provide approved content and imagery for the features or enhancements that we include on each iteration of the company site. One thing I've noticed in this job and several previous ones is that the Marketing department is extremely particular about wording and presentation, but has little to no understanding of the actual medium with which they're working - the web. I find that my team is constantly making best guesses for various HTML attributes like image alt text, titles, rel tags, blockquote cite attributes and the like. How reasonable is it to expect that marketing departments have a strong understanding of the purpose of HTML metadata? Should it be the developer's job to remind and inform each time or are marketing departments falling behind the technology they're working with? What could I reasonably expect our marketing department to understand and provide every time with each new work request?

    Read the article

  • ExpressionEngine 2 module "tag cannot be processed"

    - by Phil Sturgeon
    So I have turned my hand to ExpressionEngine and while the backend crud was easy enough getting the frontend working with template syntax is proving difficult, even at the "hello world" level. expressionengine/third_party/rest/mod.rest.php class Rest { var $return_data = ''; function Rest() { $this->EE =& get_instance(); return $this->return_data = 'HAI'; } } // END REST Class /* End of file REST.php */ /* Location: ./application/libraries/REST.php */ Then im calling it directly in a new empty template: {exp:rest} So I'm expecting to see "HAI" but I get: Error The following tag cannot be processed: {exp:rest} Please check that the ‘rest’ module is installed and that ‘rest’ is an available method of the module Any ideas? The module is installed and the backend is running fine.

    Read the article

  • Changing scaling of MATLAB Figure

    - by Phil
    I have a figure that displays 20,000 points on the x-axis. So it labels the x-axis from 0 ... 20,000. However, now I would like to scale it from 0 to 50. But when I try to do this in the plot window it just shows me the first 50 points, instead of changing the scale. Is there any straightforward way to do that in MATLAB?

    Read the article

  • Deep Zoom in Ajax - Possible? Any examples out there?

    - by Phil
    I have an idea to implement a deep zoom type interface hosted in a browser for sports training data (speed, distance, heart rate etc.) However, rather than images I actually want to zoom into a hierarchy of information. For example, the initial display would contain a grid of years - hover over 2008, for example, and spin the mouse wheel (or click) will zoom into that year but during the zoom I want 2008 to fade out and be replaced with a calendar of months. Again zoom into a month and the months are replaced with the months calendar, zoom into a day and you finally see a chart with the training data plotted on it. All the time only dates with actual data would be highlighted in some fashion. My question is whether this would even be possible and whether anyone has seen examples of this already. I'm imagining that most of the time the next level of information could be cached in the browser (in fact, because this is calendar-based, I can calculate most of that and cache the dates to be highlighted.) I could also zoom into an empty chart whilst an Ajax thread is fetching the data to display. I've never tried anything like this before and I'm especially interested in whether DHTML would be capable of this sort of zoom (I suspect not and I would have to resort to Silverlight) and whether the Ajax execution would be uninterrupted whilst the browser rendering thread is kept busy zooming.

    Read the article

  • Strongly Typed DataSet column requires custom type to implement IXmlSerializable?

    - by Phil
    I have a strongly typed Dataset with a single table with three columns. These columns all contain custom types. DataColumn1 is of type Parent DataColumn2 is of type Child1 DataColumn3 is of type Child2 Here is what these classes look like: [Serializable] [XmlInclude(typeof(Child1)), XmlInclude(typeof(Child2))] public abstract class Parent { public int p1; } [Serializable] public class Child1 :Parent { public int c1; } [Serializable] public class Child2 : Parent { public int c1; } now, if I add a row with DataColumn1 being null, and DataColumns 2 and 3 populated and try to serialize it, it works: DataSet1 ds = new DataSet1(); ds.DataTable1.AddDataTable1Row(null, new Child1(), new Child2()); StringBuilder sb = new StringBuilder(); using (StringWriter writer = new StringWriter(sb)) { ds.WriteXml(writer);//Works! } However, if I try to add a value to DataColumn1, it fails: DataSet1 ds = new DataSet1(); ds.DataTable1.AddDataTable1Row(new Child1(), new Child1(), new Child2()); StringBuilder sb = new StringBuilder(); using (StringWriter writer = new StringWriter(sb)) { ds.WriteXml(writer);//Fails! } Here is the Exception: "Type 'WindowsFormsApplication4.Child1, WindowsFormsApplication4, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' does not implement IXmlSerializable interface therefore can not proceed with serialization." I have also tried using the XmlSerializer to serialize the dataset, but I get the same exception. Does anyone know of a way to get around this where I don't have to implement IXmlSerializable on all the Child classes? Alternatively, is there a way to implement IXmlSerializable keeping all default behavior the same (ie not having any class specific code in the ReadXml and WriteXml methods)

    Read the article

  • Updating a single file in a compressed tar

    - by Phil
    Given a compressed archive file such as application.tar.gz which has a folder application/x/y/z.jar among others, I'd like to be able to take my most recent version of z.jar and update/refresh the archive with it. Is there a way to do this other than something like the following? tar -xzf application.tar.gz cp ~/myupdatedfolder/z.jar application/x/y tar -czf application application.tar.gz I understand the -u switch in tar may be of use to avoid having to untar the whole thing, but I'm unsure how to use it exactly.

    Read the article

  • google app engine (python): ImportError no module named django.

    - by Phil
    So I'm trying to use the django 1.1 template engine with the google app engine web app framework, from here. This is on Ubuntu Jaunty, I've made sure that the PYTHONPATH contains the location of Django-1.1.1 yet I'm getting this 'ImportError: No module named django' error when it tries to execute the use_library() line below. Again, could somebody help me? I'm stumped. import os os.environ['DJANGO_SETTINGS_MODULE'] = 'settings' from google.appengine.dist import use_library use_library('django', '1.1')

    Read the article

  • What would be the wisest choice for a new .Net RESTful web service?

    - by Phil.Wheeler
    I want to write my first REST web service using the .Net framework. I've seen fairly passionate comments from various people about which is best and have even found some differing comments from Microsoft. My web service should be fairly simple: I want to expose bus timetable information. I figure the resources I will be concerned about are Fares Timetables (routes, stops) What would be the most appropriate (i.e. not necessarily the easiest, most fun or your personal preference) technology to use out of WCF, ADO.NET Data Services or ASP.Net MVC?

    Read the article

  • What is wrong with this null check for data reader

    - by Phil
    c.Open() r = x.ExecuteReader If Not r("filename").IsDbnull Then imagepath = "<img src='images/'" & getimage(r("filename")) & " border='0' align='absmiddle'" End If c.Close() r.Close() I have also tried; If r("filename") Is DBNull.Value Then imagepath = String.Empty Else imagepath = "<img src='images/'" & getimage(r("filename")) & " border='0' align='absmiddle'" End If c.Close() r.Close() The error is: Invalid attempt to read when no data is present. The idea of my code is to build an img src string only when data is available. Help greatly appreciated. Thanks

    Read the article

  • How to sort multiple arrays in PHP

    - by Phil Jackson
    hi, i have wrote a script to produce an array of data but now want to display in order of score. The array outputs as follows; [display_name] => Array ( [0] => ACT_Web_Designs [1] => user1_design [2] => user2_design ) [proffesion] => Array ( [0] => Web Developer [1] => web developer [2] => Web Developer ) [score] => Array ( [0] => 15 [1] => 6 [2] => 15 ) [img] => Array ( [0] => ./?0000=gif&0001=3fadb8c362ff39f3322909899ff14760&0002=prof_pic [1] => [2] => ) so in a nutshell I am wanting it to be converted as follows; [display_name] => Array ( [0] => ACT_Web_Designs [1] => user2_design [2] => user1_design ) [proffesion] => Array ( [0] => Web Developer [1] => web developer [2] => Web Developer ) [score] => Array ( [0] => 15 [1] => 15 [2] => 6 ) [img] => Array ( [0] => ./?0000=gif&0001=3fadb8c362ff39f3322909899ff14760&0002=prof_pic [1] => [2] => ) I have been looking at asort() but cant get anything to work. any help would be much appreciated.

    Read the article

  • hosting acounts for large uploads

    - by Phil Jackson
    Hi, im wondering if anyone knows of any host providers ( uk preferably ) that deals mostly with accepting large file uploads. Most hosts only let you push something like 1.5mb ( thats taking into account the connection and the max execution time ). What i am looking for is a host specificaly for storing files on. I was going to create an upload script onto my application which posted the file to the external host and then return back ( using headers so the user doen't even know they have left ). Does anyone know of a host for this?

    Read the article

  • Starting to construct a data access layer. Things to consider?

    - by Phil
    Our organisation uses inline sql. We have been tasked with providing a suitable data access layer and are weighing up the pro's and cons of which way to go... Datasets ADO.net Linq Entity framework Subsonic Other? Some tutorials and articles I have been using for reference: http://www.asp.net/(S(pdfrohu0ajmwt445fanvj2r3))/learn/data-access/tutorial-01-vb.aspx http://www.simple-talk.com/dotnet/.net-framework/designing-a-data-access-layer-in-linq-to-sql/ http://msdn.microsoft.com/en-us/magazine/cc188750.aspx http://msdn.microsoft.com/en-us/library/aa697427(VS.80).aspx http://www.subsonicproject.com/ I'm extremely torn, and finding it very difficult to make a decision on which way to go. Our site is a series of 2 internal portals and a public web site. We are using vs2008 sp1 and framework version 3.5. Please can you give me advise on what factors to consider and any pro's and cons you have faced with your data access layer. Thanks.

    Read the article

  • Will this class cause memory leaks, and does it need a dispose method? (asp.net vb)

    - by Phil
    Here is the class to export a gridview to an excel sheet: Imports System Imports System.Data Imports System.Configuration Imports System.IO Imports System.Web Imports System.Web.Security Imports System.Web.UI Imports System.Web.UI.WebControls Imports System.Web.UI.WebControls.WebParts Imports System.Web.UI.HtmlControls Namespace ExcelExport Public NotInheritable Class GVExportUtil Private Sub New() End Sub Public Shared Sub Export(ByVal fileName As String, ByVal gv As GridView) HttpContext.Current.Response.Clear() HttpContext.Current.Response.AddHeader("content-disposition", String.Format("attachment; filename={0}", fileName)) HttpContext.Current.Response.ContentType = "application/ms-excel" Dim sw As StringWriter = New StringWriter Dim htw As HtmlTextWriter = New HtmlTextWriter(sw) Dim table As Table = New Table table.GridLines = GridLines.Vertical If (Not (gv.HeaderRow) Is Nothing) Then GVExportUtil.PrepareControlForExport(gv.HeaderRow) table.Rows.Add(gv.HeaderRow) End If For Each row As GridViewRow In gv.Rows GVExportUtil.PrepareControlForExport(row) table.Rows.Add(row) Next If (Not (gv.FooterRow) Is Nothing) Then GVExportUtil.PrepareControlForExport(gv.FooterRow) table.Rows.Add(gv.FooterRow) End If table.RenderControl(htw) HttpContext.Current.Response.Write(sw.ToString) HttpContext.Current.Response.End() End Sub Private Shared Sub PrepareControlForExport(ByVal control As Control) Dim i As Integer = 0 Do While (i < control.Controls.Count) Dim current As Control = control.Controls(i) If (TypeOf current Is LinkButton) Then control.Controls.Remove(current) control.Controls.AddAt(i, New LiteralControl(CType(current, LinkButton).Text)) ElseIf (TypeOf current Is ImageButton) Then control.Controls.Remove(current) control.Controls.AddAt(i, New LiteralControl(CType(current, ImageButton).AlternateText)) ElseIf (TypeOf current Is HyperLink) Then control.Controls.Remove(current) control.Controls.AddAt(i, New LiteralControl(CType(current, HyperLink).Text)) ElseIf (TypeOf current Is DropDownList) Then control.Controls.Remove(current) control.Controls.AddAt(i, New LiteralControl(CType(current, DropDownList).SelectedItem.Text)) ElseIf (TypeOf current Is CheckBox) Then control.Controls.Remove(current) control.Controls.AddAt(i, New LiteralControl(CType(current, CheckBox).Checked)) End If If current.HasControls Then GVExportUtil.PrepareControlForExport(current) End If i = (i + 1) Loop End Sub End Class End Namespace Will this class cause memory leaks? And does anything here need to be disposed of? The code is working but I am getting frequent crashes of the app pool when it is in use. Thanks.

    Read the article

  • Is it possible to convert this asp to asp.net?

    - by Phil
    I have been tasked with sifting through the worst classic asp spaghetti i've ever come across. The script runs a series of recordsets in sequence, getting 1 record at a time. As the record is built it takes the id and passes it to the next loop, which gets data, and passes on the id to the next loop. It then continues in this manner and builds an unordered list, kicking out the required html as it goes. Here are my efforts so far: have a class delivering data via sqldatareaders and output these to nested repeaters (this failed due to not being able to loop and get the id) Have a datatable populated with all the required data, then datatable.select to filter it out. have 4 datareaders looping and building the ul arraylists (I couldnt get the id's to match up) Please can you suggest the best method (with a bit of sample code if possible) to go about doing this conversion? Here is the code (sorry its long / horrible / spaghetti!!!) <% set RSMenuLevel0 = conn.execute("select id, DepartmentID, GroupingID, Heading, OrderID, Publish, moduleid, url, urltarget " &_ "from Grouping where (DepartmentID = 0 and GroupingID = 0 and Publish <> 0) order by OrderID") %> <% if session("JavaScriptEnabled") = "False" Then %> <% while not RSMenuLevel0.EOF if RSMenuLevel0("Publish") <> 0 then Menu0heading = RSMenuLevel0("Heading") Menu0id = RSMenuLevel0("id") %> <%if RSMenuLevel0("url") > "" and RSMenuLevel0("moduleid") = 0 then%> &nbsp;<a href="http://<%=RSMenuLevel0("url")%>" target="<%=RSMenuLevel0("urltarget")%>"><%=Menu0heading%></a> <%else%> &nbsp;<a href="/default.asp?id=<%=Menu0id%>"><%=Menu0heading%></a> <%end if%> <% end if RSMenuLevel0.MoveNext wend %> <% else %> <ul id="Menu1" class="MM"> <%if home <> 1 then%> <!-- <li><a href="/default.asp"><span class="item">Home</span></a> --> <%end if%> <% numone=0 while not RSMenuLevel0.EOF ' numone = numone + 1 Menu0heading = RSMenuLevel0("Heading") 'itemID = lcase(replace(Menu0heading," ","")) Menu0id = RSMenuLevel0("id") if RSMenuLevel0("url") > "" and RSMenuLevel0("moduleid") = 0 then url = RSMenuLevel0("url") if instr(url,"file:///") > 0 then %> <li><a href="<%=RSMenuLevel0("url")%>" target="<%=RSMenuLevel0("urltarget")%>" <%if numone=1 then%>class="CURRENT"<%end if%>><span class="item"><%=Menu0heading%></span></a> <%else%> <li><a href="http://<%=RSMenuLevel0("url")%>" target="<%=RSMenuLevel0("urltarget")%>" <%if numone=1 then%>class="CURRENT"<%end if%>><span class="item"><%=Menu0heading%></span></a> <%end if%> <%else%> <li><a href="/default.asp?id=<%=RSMenuLevel0("id")%>" <%if numone=1 then%>class="CURRENT"<%end if%>><span class="item"><%=Menu0heading%></span></a> <%end if%> <% set RSMenuLevel1 = conn.execute("select id, DepartmentID, GroupingID, Heading, OrderID, Publish, moduleid, url, urltarget " &_ "from Grouping where (DepartmentID = 0 and GroupingID = " & Menu0id & " and Publish <> 0) order by OrderID") if not RSMenuLevel1.EOF then %> <ul> <% while not RSMenuLevel1.EOF Menu1heading = RSMenuLevel1("Heading") Menu1id = RSMenuLevel1("id") if RSMenuLevel1("url") > "" and RSMenuLevel1("moduleid") = 0 then url = RSMenuLevel1("url") if instr(url,"file:///") > 0 then %> <li><a href="<%=RSMenuLevel1("url")%>" target="<%=RSMenuLevel1("urltarget")%>"><%=Menu1heading%></a> <%else%> <li><a href="http://<%=RSMenuLevel1("url")%>" target="<%=RSMenuLevel1("urltarget")%>"><%=Menu1heading%></a> <%end if%> <%else%> <li><a href="/default.asp?id=<%=RSMenuLevel1("id")%>"><%=Menu1heading%></a> <%end if%> <% set RSMenuLevel2 = conn.execute("select id, DepartmentID, GroupingID, Heading, OrderID, Publish, moduleid, url, urltarget " &_ "from Grouping where (DepartmentID = 0 and GroupingID = " & Menu1id & " and Publish <> 0) order by OrderID") if not RSMenuLevel2.EOF then %> <ul> <% while not RSMenuLevel2.EOF Menu2heading = RSMenuLevel2("Heading") Menu2id = RSMenuLevel2("id") if RSMenuLevel2("url") > "" and RSMenuLevel2("moduleid") = 0 then %> <li><a href="http://<%=RSMenuLevel2("url")%>" target="<%=RSMenuLevel2("urltarget")%>"><%=Menu2heading%></a> <%else%> <li><a href="/default.asp?id=<%=RSMenuLevel2("id")%>"><%=Menu2heading%></a> <%end if%> <% set RSMenuLevel3 = conn.execute("select id, DepartmentID, GroupingID, Heading, OrderID, Publish, moduleid, url, urltarget " &_ "from Grouping where (DepartmentID = 0 and GroupingID = " & Menu2id & " and Publish <> 0) order by OrderID") if not RSMenuLevel3.EOF then %> <ul> <% while not RSMenuLevel3.EOF Menu3heading = RSMenuLevel3("Heading") Menu3id = RSMenuLevel3("id") if RSMenuLevel3("url") > "" and RSMenuLevel3("moduleid") = 0 then %> <li><a href="http://<%=RSMenuLevel3("url")%>" target="<%=RSMenuLevel3("urltarget")%>"><%=Menu3heading%></a></li> <%else%> <li><a href="/default.asp?id=<%=RSMenuLevel3("id")%>"><%=Menu3heading%></a></li> <%end if%> <% RSMenuLevel3.MoveNext wend %> </ul> <% end if RSMenuLevel2.MoveNext %> </li> <% wend %> </ul> <% end if RSMenuLevel1.MoveNext %> </li> <% wend %> </ul> <% end if RSMenuLevel0.MoveNext %> </li> <% wend %> </ul> <% end if %>

    Read the article

  • looping through JSON array

    - by Phil Jackson
    Hi all. I have recently posted another question which straight away users pointed me in the right direction. $.ajax({ type: 'POST', url: './', data: 'token=' + token + '&re=8', cache: false, timeout: 5000, success: function(html){ auth(html); var JSON_array = eval(html); alert(JSON_array[0].username); } }); this returns the data correctly but I want to perform a kind of 'foreach'. the array contains data about multiple incoming and outgoing Instant Messages. So if a user is talking to more than one person at a time i need to loop through. the array's structure is as follows. Array ( [0] => Array ( [username] => Emmalene [contents] => <ul><li class="name">ACTwebDesigns</li><li class="speech">helllllllo</li></ul> <ul><li class="name">ACTwebDesigns</li><li class="speech">sds</li></ul> <ul><li class="name">ACTwebDesigns</li><li class="speech">Sponge</li><li class="speech">dick</li></ul> <ul><li class="name">ACTwebDesigns</li><li class="speech">arghh</li></ul> ) ) any help very much appreciated.

    Read the article

  • preg_match Vs preg_match_all browser error not php?

    - by Phil Jackson
    Hi all i have the following: $str = base64_encode(preg_replace("#\s|\r|\t|\n#", " ", file_get_contents("../www.cms.actwebdesigns.co.uk2/logged.php"))); if(preg_replace("#(PD9waHAg)((?!(Pz4g)).)*#is", $str, )) { #print_r($matches); echo "<xmp>".base64_decode($matches[0]."Pz4g")."</xmp>"; } now this works but i want to be able to use it for all occurrences on page. (finds php segments in page) So i used preg_match_all but returns a browser error (page has been moved or no longer exists) Anyone know why?

    Read the article

  • Cancel a UIView animation?

    - by Phil Nash
    Is it possible to cancel a UIView animation while it is in progress? Or would I have to drop to the CA level? i.e. I've done something like this (maybe setting an end animation action too): [UIView beginAnimations:nil context:NULL]; [UIView setAnimationDuration:duration]; [UIView setAnimationCurve: UIViewAnimationCurveLinear]; // other animation properties // set view properties [UIView commitAnimations]; But before the animation completes and I get the animation ended event, I want to cancel it (cut it short). Is this possible? Googling around finds a few people asking the same question with no answers - and one or two people speculating that it can't be done.

    Read the article

  • php - arrange array to display in score order

    - by Phil Jackson
    hi, i have wrote a script to produce an array of data but now want to display in order of score. The array outputs as follows; [display_name] => Array ( [0] => ACT_Web_Designs [1] => user1_design [2] => user2_design ) [proffesion] => Array ( [0] => Web Developer [1] => web developer [2] => Web Developer ) [score] => Array ( [0] => 15 [1] => 6 [2] => 15 ) [img] => Array ( [0] => ./?0000=gif&0001=3fadb8c362ff39f3322909899ff14760&0002=prof_pic [1] => [2] => ) so in a nutshell I am wanting it to be converted as follows; [display_name] => Array ( [0] => ACT_Web_Designs [1] => user2_design [2] => user1_design ) [proffesion] => Array ( [0] => Web Developer [1] => web developer [2] => Web Developer ) [score] => Array ( [0] => 15 [1] => 15 [2] => 6 ) [img] => Array ( [0] => ./?0000=gif&0001=3fadb8c362ff39f3322909899ff14760&0002=prof_pic [1] => [2] => ) I have been looking at asort() but cant get anything to work. any help would be much appreciated.

    Read the article

< Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >