Search Results

Search found 1649 results on 66 pages for 'tim evans'.

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

  • ASP.NET MVC2 JQuery datepicker errors

    - by Andy Evans
    I'm having the "Microsoft JScript runtime error: Object doesn't support this property or method" error when calling the datepicker function on a textbox generated from my data model. in the head section I have: <link href="../../Content/Site.css" rel="stylesheet" type="text/css" /> <script src="../../Scripts/jquery-1.4.1.min.js" type="text/javascript"></script> <script src="../../Scripts/MicrosoftAjax.js" type="text/javascript"></script> <script src="../../Scripts/MicrosoftMvcValidation.js" type="text/javascript"></script> <script type="text/javascript"> $(document).ready(function () { $('#dob').datepicker(); }); and in the body section I have: <% Html.EnableClientValidation(); %> <% using (Html.BeginForm()) { %> ... <tr> <td class="label">Date of Birth:</td> <td><%: Html.TextBoxFor(model => model.dob, new { @class = "inputtext" })%></td> <td><%: Html.ValidationMessageFor(model => model.dob) %></td> </tr> ... <% } %> Do I have something in the wrong place? Again, you folks are a great help and assistance would be greatly appreciated.

    Read the article

  • jQuery DataTables: Problems with POST Server Side JSON output

    - by Tim
    Hello Everyone, I am trying to get my datatable to take a POST JSON output from my server. This is my client side code <script> $(document).ready(function() { $('#example').dataTable( { "bProcessing": true, "bServerSide": true, "sAjaxSource": "http://localhost/staff/jobs/my_jobs", "fnServerData": function ( sSource, aoData, fnCallback ) { $.ajax( { "dataType": 'json', "type": "POST", "url": sSource, "data": aoData, "success": fnCallback } ); } } ); } ); </script> Now I have copied and pasted the server side code found in the DataTables examples found here. When I change my sAjaxSource to view this page the table doesn't move beyond 'processing'. When I view the JSON directly I see this output. {"sEcho": 1, "iTotalRecords": 1, "iTotalDisplayRecords": 1, "aaData": [ ["Trident","First Ever Job"]] } Just for fun I went to the POST server-side example and copied some of the JSON they are using for their example and just PHP echoed it straight out of another page. This is the output of that page. {"sEcho": 1, "iTotalRecords": 1, "iTotalDisplayRecords": 1, "aaData": [ ["Trident","Internet Explorer 4.0"]] } Here is where it gets interesting. The JSON that has been processed by the server fails to work yet the JSON simply echo'd by the same server on a different page does work... yet both are almost identical in outputs. I hope someone can shed some light on this because as the tree said to the lumberjack... I'm stumped. Thanks, Tim

    Read the article

  • Check for valid IMEI

    - by Tim
    Hi, does somebody knows how to check for a valid IMEI? I have found a function to check on this page: http://www.dotnetfunda.com/articles/article597-imeivalidator-in-vbnet-.aspx But it returns false for valid IMEI's (f.e. 352972024585360). I can validate them online on this page: http://www.numberingplans.com/?page=analysis&sub=imeinr What is the correct way(in VB.Net) to check if a given IMEI is valid? Regards, Tim PS: This function from above page must be incorrect in some way: Public Shared Function isImeiValid(ByVal IMEI As String) As Boolean Dim cnt As Integer = 0 Dim nw As String = String.Empty Try For Each c As Char In IMEI cnt += 1 If cnt Mod 2 <> 0 Then nw += c Else Dim d As Integer = Integer.Parse(c) * 2 ' Every Second Digit has to be Doubled nw += d.ToString() ' Genegrated a new number with doubled digits End If Next Dim tot As Integer = 0 For Each ch As Char In nw.Remove(nw.Length - 1, 1) tot += Integer.Parse(ch) ' Adding all digits together Next Dim chDigit As Integer = 10 - (tot Mod 10) ' Finding the Check Digit my Finding the Remainder of the sum and subtracting it from 10 If chDigit = Integer.Parse(IMEI(IMEI.Length - 1)) Then ' Checking the Check Digit with the last digit of the Given IMEI code Return True Else Return False End If Catch ex As Exception Return False End Try End Function

    Read the article

  • ASP.NET Javascript Error :: sys.webforms.pagerequestmanagerservererrorexception

    - by Andy Evans
    I have an ASP.NET site that uses JQuery and ASP.NET UpdatePanel and ScriptManager. On one page in particular, I get a javascript error: sys.webforms.pagerequestmanagerservererrorexception: Index and length must refer to a location within the string. Parameter name:length ScriptResourse.axd Code: 0 Here's what's in the master page: <asp:ScriptManager runat="server" ID="ScriptMgr"></asp:ScriptManager> <asp:UpdatePanel runat="server" ID="UpdatePanelMaster"> <ContentTemplate> </ContentTemplate> </asp:UpdatePanel> In the page in question: <asp:Content ID="ContentHeadEdit" ContentPlaceHolderID="ContentHeadMaster" Runat="Server"> <script type="text/javascript"> $(document).ready(function() { $('#<%= ButtonSave.ClientID %>').button(); Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler); function EndRequestHandler(sender, args) { $('#<%= ButtonSave.ClientID %>').button(); } }); </script> </asp:Content>

    Read the article

  • Is the design notion of layers contrived?

    - by Bruce
    Hi all I'm reading through Eric Evans' awesome work, Domain-Driven Design. However, I can't help feeling that the 'layers' model is contrived. To expand on that statement, it seems as if it tries to shoe-horn various concepts into a specific, neat model, that of layers talking to each other. It seems to me that the layers model is too simplified to actually capture the way that (good) software works. To expand further: Evans says: "Partition a complex program into layers. Develop a design within each layer that is cohesive and that depends only on the layers below. Follow standard architectural patterns to provide loose coupling to the layers above." Maybe I'm misunderstanding what 'depends' means, but as far as I can see, it can either mean a) Class X (in the UI for example) has a reference to a concrete class Y (in the main application) or b) Class X has a reference to a class Y-ish object providing class Y-ish services (ie a reference held as an interface). If it means (a), then this is clearly a bad thing, since it defeats re-using the UI as a front-end to some other application that provides Y-ish functionality. But if it means (b), then how is the UI any more dependent on the application, than the application is dependent on the UI? Both are decoupled from each other as much as they can be while still talking to each other. Evans' layer model of dependencies going one way seems too neat. First, isn't it more accurate to say that each area of the design provides a module that is pretty much an island to itself, and that ideally all communication is through interfaces, in a contract-driven/responsibility-driven paradigm? (ie, the 'dependency only on lower layers' is contrived). Likewise with the domain layer talking to the database - the domain layer is as decoupled (through DAO etc) from the database as the database is from the domain layer. Neither is dependent on the other, both can be swapped out. Second, the idea of a conceptual straight line (as in from one layer to the next) is artificial - isn't there more a network of intercommunicating but separate modules, including external services, utility services and so on, branching off at different angles? Thanks all - hoping that your responses can clarify my understanding on this..

    Read the article

  • SQL DISTINCT Value Question

    - by CPOW
    How can I filter my results in a Query? example I have 5 Records John,Smith,apple Jane,Doe,apple Fred,James,apple Bill,evans,orange Willma,Jones,grape Now I want a query that would bring me back 3 records with the DISTINCT FRUIT, BUT... and here is the tricky part, I still want the columns for First Name , Last Name. PS I do not care which of the 3 it returns mind you, but I need it to only return 3 (or what ever how many DISTINCT fruit there are. ex return would be John,Smith,apple Bill,evans,orange Willma,Jones,grape Thanks in advance I've been banging my head on this all day.

    Read the article

  • CSS absolute DIV causing other absolute DIV problems

    - by Tim
    Hello, I have implemented a chat script which requires an absolutely positioned DIV to be wrapped around the pages content. This is to ensure the chat windows stay at the bottom. The problem is that because of the absolute positioning of this main wrapper, all other absolutely positioned elements (eg. Jquery Auto-completes, datepicker's etc) now scroll up and down with the page. Here is an example of the HTML: <body> <div id="main_container"> <div id="content">Elements like Jquery Autocompletes, Datepickers with absolute positioned elements in here</div> </div> The DIV "main_container" style looks like this: #main_container { width:100%; background-color:#ffffff; /* DO NOT REMOVE THIS; or you'll have issue w/ the scrollbar, when the mouse pointer is on a white space */ overflow-x: hidden; overflow-y: scroll; height:100%; /* this will make sure that the height will extend at the bottom */ position:absolute; /* container div must be absolute, for our fixed bar to work */ } I hope there is a simple fix as the chat script is too good to get rid of. Thanks, Tim

    Read the article

  • Mark row as deleted in dataTable on

    - by dav.evans
    I have a datatable bound to a winforms dataGridView via a BindingSourceControl. I want to be able handle the UserDeletingRow event from the dataGridView and mark the row in my dataTable as deleted. I need to then be able to retrieve the rows marked as deleted from the datatable so that I can delete them from my database when a Save button is clicked. Please not I dont want to delete from the database on each firing of UserDeletingRow, only mark that row as deleted in my dataset. Can anyone point out how to do this?

    Read the article

  • URL routing documentation question.

    - by James Evans
    I'm reading about URL routing at How to: Define Routes for Web Forms Applications and there's something in the example I don't understand. If you look at the example provided below, routes.MapPageRoute("", "SalesReport/{locale}/{year}/{*queryvalues}", "~/sales.aspx"); specifically at "SalesReport/{locale}/{year}/{*queryvalues}" Why does queryvalues have an asterisk in front of it and locale and year don't?

    Read the article

  • Dijit.Dialog 1.4, setting size is limited to 600x400 no matter what size I set it.

    - by John Evans
    I'm trying to set the size of a dijit.Dialog, but it seems limited to 600x400, no matter what size I set it. I've copied the code from dojocampus and the dialog appear, but when i set the size larger, it only shows 600x400. Using firebug and selecting items inside the dialog, I see that they are larger than the dialog, but don't show correctly. I set it up to scroll, but the bottom of the scrollbar is out of view. In firebug, I've check the maxSize from _Widget and it is set to infinity. Here is my code to set the dialog. <div id="sized" dojoType="dijit.Dialog" title="My scrolling dialog"> <div style="width: 580px; height: 600px; overflow: scroll;"> Any suggestions for sizing the dialog box larger?

    Read the article

  • Jquery Date Picker: Append Start Date to End Date and display dates in the future only.

    - by Tim
    Hello, I am using Jquery Date pickers to get Start and End Dates for an application I am building. I have two datepickers, one for a start date and one for an end date. When someone clicks a date in the start date picker I need that date to be appended automatically to the end date picker. I also need the end date picker to select future dates only from the date that has been appended to it. There are two demos on the jquery datepicker site that do what I want, but I am unsure how to combine them to both do what I want. Example One: This example shows how you can tie two date pickers together so that the date selected in one influences the dates that can be selected in the other $(function() { $('.date-pick').datePicker() $('#start-date').bind( 'dpClosed', function(e, selectedDates) { var d = selectedDates[0]; if (d) { d = new Date(d); $('#end-date').dpSetStartDate(d.addDays(1).asString()); } } ); $('#end-date').bind( 'dpClosed', function(e, selectedDates) { var d = selectedDates[0]; if (d) { d = new Date(d); $('#start-date').dpSetEndDate(d.addDays(-1).asString()); } } ); }); Example Two: An example showing inline date pickers which are linked together and trigger behaviour in each other... $(function() { $('#date-view1') .datePicker({inline:true}) .bind( 'dateSelected', function(e, selectedDate, $td) { $('#date1').val(selectedDate.asString()); $('#date-view2, #date-view3').dpSetSelected(selectedDate.addDays(3).asString()); } ); $('#date-view2') .datePicker({inline:true}) .bind( 'dateSelected', function(e, selectedDate, $td) { $('#date2').val(selectedDate.asString()); } ); $('#date-view3').datePicker(); $('#form-check') .bind( 'click', function() { alert('date1=' + $('#date1').val() + '\n' + 'date2=' + $('#date2').val()); } ); }); I have tried many combinations of the codes listed above, but I have not been able to get the desired results. Thanks for all your help, Tim

    Read the article

  • Simulate Network Presence in dbus

    - by Evans
    Is there a way using Python to simulate the presence of an active network connection using dbus? If I call getstate() on the dbus, I'm able to get the current network state. I want to set the current state to 4 (Connection Present). This is because Network Manager is not able to connect using my modem and I use other tools to connect. Pidgin, Empathy and other software are not able to detect the network.

    Read the article

  • In VB.NET how do you specify Inherits/implements on a generic class with multi-constraints

    - by Romel Evans
    When I write the following statement in VB.Net (C# is my normal language), I get an "end of statement expected" referring to the "Implements" statement. <Serializable()> _ <XmlSchemaProvider("EtgSchema")> _ Public Class SerializeableEntity(Of T As {Class, ISerializable, New}) _ Implements IXmlSerializable, ISerializable ... End Class The C# version that I'm trying to emulate is: [Serializable] [XmlSchemaProvider("MySchema")] public class SerializableEntity<T> : IXmlSerializable, ISerializable where T : class, new() { .... } Sometimes I feel like I have 5 thumbs with VB.NET :)

    Read the article

  • Mark row as deleted in dataTable on UserDeletingRow

    - by dav.evans
    I have a datatable bound to a winforms dataGridView via a BindingSourceControl. I want to be able handle the UserDeletingRow event from the dataGridView and mark the row in my dataTable as deleted. I need to then be able to retrieve the rows marked as deleted from the datatable so that I can delete them from my database when a Save button is clicked. Please not I dont want to delete from the database on each firing of UserDeletingRow, only mark that row as deleted in my dataset. Can anyone point out how to do this?

    Read the article

  • Error upgrading WSSF solution to VS 2010

    - by Mark Evans
    Hi I've recently installed VS2010 and I'm trying to upgrade a project that I created using VS2008 and WSSF (Web Service Software Factory). I've installed the 2010 version of WSSF and it's prerequisites. After upgrading, when I try to load the solution I get "blah.ssfproduct cannot be opened because its project type (.ssfproduct) is not supported by this version of the application". Absolutely no idea what to do :( Cheers Mark

    Read the article

  • Flash: Adjust this code to keep the duplicated movie clip

    - by Luke Evans
    OK, so here is my code ham_mc.onPress=function(){ startDrag(this); } ham_mc.onRelease=ham_mc.onReleaseOutside=function(){ stopDrag(); _root.ham_mc.duplicateMovieClip("ham_mc" + "x",2); x++; } The user can at first drag the movie clip. When released, the duplicateMovieClip command runs, leaving a new ham movie clip in the position the first is dragged to. PROBLEM: When I click and drag the first ham movie click again, the duplicateMovieClip runs again but REPLACES the previous generated movie clip. I added x and x++ in an attempt to give the movie clip duplication a different name every time, but this doesn't solve it. How do I change this code so that a NEW ham_mc is created every time, rather than overwriting the old one. I'm tired, sorry for the poor explaination!

    Read the article

  • Macbook memory upgrade question

    - by James Evans
    I've read some conflicting articles on Macbooks and memory upgrades. Some say you have to buy the "special" Mac memory (bulls$%t), others say manufacturers like Partriot and Ocz will work fine. My Macbook (non-pro) is about 6 mos old with it's 2 GB of memory (SO-DIMM 1066MHz DDR3). Does anyone have any definitive information of what will work? Thanks!

    Read the article

  • Make A HTML/PHP Link

    - by Will Evans
    I have the code below: $result = mysql_query("SELECT link, notes FROM links WHERE username='will';"); $html .= "<ul>"; while ($row = mysql_fetch_array($result)) { //loop extract($row); $html .= "<li>{$link} - {$notes}</li>"; } I need the bit where it says {$link} to become a clickable link which opens a new window. How would I do this? When I put tags around it you get this error: The error is: Parse error: syntax error, unexpected '{' in /data/www/vhosts/themacsplash.com/httpdocs/ClipBoy/will.php on line 18 Line 18 is $html .= "{$link} - {$notes}";

    Read the article

  • Using variables inside macros in SQL

    - by Tim
    Hello I'm wanting to use variables inside my macro SQL on Teradata. I thought I could do something like the following: REPLACE MACRO DbName.MyMacro ( MacroNm VARCHAR(50) ) AS ( /* Variable to store last time the macro was run */ DECLARE V_LAST_RUN_DATE TIMESTAMP; /* Get last run date and store in V_LAST_RUN_DATE */ SELECT LastDate INTO V_LAST_RUN_DATE FROM DbName.RunLog WHERE MacroNm = :MacroNm; /* Update the last run date to now and save the old date in history */ EXECUTE MACRO DbName.RunLogUpdater( :MacroNm ,V_LAST_RUN_DATE ,CURRENT_TIMESTAMP ); ); However, that didn't work, so I thought of this instead: REPLACE MACRO DbName.MyMacro ( MacroNm VARCHAR(50) ) AS ( /* Variable to store last time the macro was run */ CREATE VOLATILE TABLE MacroVars AS ( SELECT LastDate AS V_LAST_RUN_DATE FROM DbName.RunLog WHERE MacroNm = :MacroNm; ) WITH DATA ON COMMIT PRESERVE ROWS; /* Update the last run date to now and save the old date in history */ EXECUTE MACRO DbName.RunLogUpdater( :MacroNm ,SELECT V_LAST_RUN_DATE FROM MacroVars ,CURRENT_TIMESTAMP ); ); I can do what I'm looking for with a Stored Procedure, however I want to avoid for performance. Do you have any ideas about this? Is there anything else I can try? Cheers Tim

    Read the article

  • ASP.NET connection pool question

    - by James Evans
    Does the same connection string used on two different physical servers hosting different web applications that talk to the same database draw connections from the same connection pool? Or are pooled connections confined to at the application level? I ask because I inherited a 7 year old .NET 1.1 web application which is riddled with in-line SQL, unclosed and undisposed sql connection and datareader objects. Recently, I was tasked to write a small web app that is hosted on another server and talks to the same database and therefore used the same database connection string. I created a LINQ object to read and write the one table required by the app. Now the original .NET 1.1 app is throwing exceptions like "Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached." Maybe these are unreleated, but wanted to get your opinions to make sure I cover all my bases. Thanks!

    Read the article

  • Creating foreach loops using Code Igniter controller and view

    - by Tim
    Hello, This is a situation I have found myself in a few times and I just want clear it up once and for all. Best just to show you what I need to do in some example code. My Controller function my_controller() { $id = $this->uri->segment(3); $this->db->from('cue_sheets'); $this->db->where('id', $id); $data['get_cue_sheets'] = $this->db->get(); $this->db->from('clips'); $this->db->where('sheet_id', ' CUE SHEET ID GOES IN HERE ??? '); $data['get_clips'] = $this->db->get(); $this->load->view('show_sheets_and_clips', $data); } My View <?php if($get_cue_sheets->result_array()) { ?> <?php foreach($get_cue_sheets->result_array() as $sheetRow): ?> <h1><?php echo $sheetRow['sheet_name']; ?></h1> <br/> <?php if($get_clips->result_array()) { ?> <ul> <?php foreach($get_clips->result_array() as $clipRow): ?> <li><?php echo $clipRow['clip_name']; ?></li> <?php endforeach; ?> </ul> <?php } else { echo 'No Clips Found'; } ?> <?php endforeach; ?> <?php } ?> The problem I am having is the concept of passing data back to the controller from the view as I am sending the Database Queries off to the view as an array, when I really need to get some more information as to which sheet ID I am looking for to show the relevant clips. I hope this makes sense to someone out there. Thanks, Tim

    Read the article

  • In MVC2, how do I validate fields that aren't in my data model?

    - by Andy Evans
    I am playing with MVC2 in VS 2010 and am really getting to like it. In a sandbox application that I've started from scratch, my database is represented in an ADO.NET entity data model and have done much of the validation for fields in my data model using Scott Guthrie's "buddy class" approach which has worked very well. However, in a user registration form that I have designed and am experimenting with, I'd like to add a 'confirm email address' or a 'confirm password' field. Since these fields obviously wouldn't exist in my data model, how would I validate these fields client side and server side? I would like to implement something like 'Html.ValidationMessageFor', but these fields don't exist in the data model. Any help would be greatly appreciated.

    Read the article

  • Jquery Show Fields depending on Select Menu value but on page load

    - by Tim
    Hello, This question refers to the question http://stackoverflow.com/questions/835259/jquery-show-hide-fields-depening-on-select-value <select id="viewSelector"> <option value="0">-- Select a View --</option> <option value="view1">view1</option> <option value="view2">view2</option> <option value="view3">view3</option> </select> <div id="view1"> <!-- content --> </div> <div id="view2a"> <!-- content --> </div> <div id="view2b"> <!-- content --> </div> <div id="view3"> <!-- content --> </div> $(document).ready(function() { $.viewMap = { '0' : $([]), 'view1' : $('#view1'), 'view2' : $('#view2a, #view2b'), 'view3' : $('#view3') }; $('#viewSelector').change(function() { // hide all $.each($.viewMap, function() { this.hide(); }); // show current $.viewMap[$(this).val()].show(); }); }); When I select the 2nd item in the menu it shows the corresponding field. The exception to this is when the on page load the select menu already has the 2nd menu item selected, the field does not show. As you may be able to tell, I am new to jquery and could definetly use some help with adjusting this code so that the selected item's field is shown on page load. Thanks, Tim

    Read the article

  • How do I shift items in an array in C#?

    - by Andy Evans
    Let's say that I have an array of strings like this: 1, 2, 3, 4, 5, 6, 7, 8 and I want to shift the elements of the array such that The first element always remains fixed Only the remaining elements get shifted like so ... The last element in the array becomes the 2nd element and is shifted through the array with each pass. Pass #1: 1, 2, 3, 4, 5, 6, 7, 8 Pass #2: 1, 8, 2, 3, 4, 5, 6, 7 Pass #3: 1, 7, 8, 2, 3, 4, 5, 6 Pass #4: 1, 6, 7, 8, 2, 3, 4, 5 Any assistance would be greatly appreciated.

    Read the article

  • Designing a silverlight dashboard with mef - is it possible? (with dynamic loading of xaps)

    - by Tim Robbin
    Hello! I am just trying to wrap my head around MEF. And as I am really going to love it ( I guess ) I started my first sample project and immediatly stumbled into a big problem and now I am asking myself if I can use MEF for my scenario at all and that is the following: Imagine that one got some kind of dashboard with, let's say, five regions and above each region there are two comboboxes. The values in the first combobox represent different possible views (for example, chartControl, tableControl, pictureControl, ...) and the values of the second combobox represents the different data sources for the currently selected control. As the controls are very big in size one wants to download them as needed. If the user selects one comboboxitem the corresponding control xap should be loaded and displayed in this specific region. If the user selectes another control in the same combobox the control should be removed from the visualtree and the next control should be downloaded and displayed. If the user changes the selection in a different combobox the corresponding control should be loaded again only in this specific region, with perhaps different data. And to make it a little more interesting - as this is some kind of dashboard one can change the layout from five regions to - for example - ten regions. I've seen the video "MVVM with MEF in Silverlight Video Tutorial Part 2: Plugins and Metadata" ( http://csharperimage.jeremylikness.com/2010/03/mvvm-with-mef-in-silverlight-video_09.html ) but he is using an ItemsControl and is working with Visibility and he only got ONE region. So I think that this technique is not working for me... Puh, I hope I could make myself clear! Thanks a lot for any piece of information!!! Greetings, Tim.

    Read the article

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