Search Results

Search found 1870 results on 75 pages for 'matt mcclellan'.

Page 52/75 | < Previous Page | 48 49 50 51 52 53 54 55 56 57 58 59  | Next Page >

  • .NET equivalent of httpunit

    - by Matt
    I will openly admit that I fall on the side of Test Driven Development. I have run into a situation that I would like to test, but I haven't found a good way to do so. I have been working in ASP.NET MVC and I would like to test that the parts of code that I am putting into the view layer (and I know that I need to keep that as minimal as possible). I am looking for an equivalent in .NET to httpunit in Java or something similar.

    Read the article

  • jQuery autocomplete: how to split the string result?

    - by Matt
    I have the following situation with an autocomplete plugin on an .aspx page. It is working fine. The result from the autocomplete search yields a product id and a product description is concatenated with it (i.e. 2099 -- A Product). I know that I need to use split() with this but where do I put it? I'm still rather new to jQuery and javascript. $(document).ready(function() { $('.divAutoComplete').autocomplete("LookupCodes.aspx?type=FC", { mustMatch: true }); });

    Read the article

  • Passing an Ajax variable to a Codeigniter function

    - by Matt
    Hello, I think this is a simple one. I have a Codeigniter function which takes the inputs from a form and inserts them into a database. I want to Ajaxify the process. At the moment the first line of the function gets the id field from the form - I need to change this to get the id field from the Ajax post (which references a hidden field in the form containing the necessary value) instead. How do I do this please? My Codeigniter Controller function function add() { $product = $this->products_model->get($this->input->post('id')); $insert = array( 'id' => $this->input->post('id'), 'qty' => 1, 'price' => $product->price, 'size' => $product->size, 'name' => $product->name ); $this->cart->insert($insert); redirect('home'); } And the jQuery Ajax function $("#form").submit(function(){ var dataString = $("input#id") //alert (dataString);return false; $.ajax({ type: "POST", url: "/home/add", data: dataString, success: function() { } }); return false; }); As always, many thanks in advance.

    Read the article

  • Converting from Mercurial to Subversion

    - by Matt Joiner
    Due to lack of Mercurial support in several tools, and managerial oppression it has become necessary to convert several trial Mercurial repositories to Subversion in order to conform with the company standard. Are there any tools or suggestions for how to achieve this without a loss of revision history and the like?

    Read the article

  • Configuration Element Collection Section

    - by Matt
    I would like to set up a custom app configuration element collection section like this <logSectionGroup> <logSection name="Testttt"> <properties name ="Pride"> <pathName="TestingLog.txt"/> <deleteRetention="100"/> <deleteZeroRetention="5"/> <wildcard="*.txt"/> </properties> <properties name ="Adhoc"> <pathName="blah.txt"/> <deleteRetention="70"/> <deleteZeroRetention="3"/> <wildcard="*.*"/> </properties> </logSection> </logSectionGroup> Is this possible? Properties would be the configuration element, and log section would be the configuration element collection. The problem is, I've only seen where you can have multiple instances of a single element instead of multiple elements. <Section name="Section1"> <Section name="Section1"> <SubSection name="SubSection1"> <Item name="Item1" /> <Item name="Item2" /> </SubSection> <SubSection name="SubSection2"> <Item name="Item1" /> <Item name="Item2" /> </SubSection> </Section> When you use GetElementKey() you have it return element "name" in the above example but how would you return 4 different elements like "pathName" "deleteRetention" etc. Here is my Definition for PropElement Public Class PropElement Inherits ConfigurationElement <ConfigurationProperty("pathName", IsRequired:=True)> _ Public Property PathName() As String Get Return CStr(Me("pathName")) End Get Set(ByVal value As String) Me("pathName") = value End Set End Property <ConfigurationProperty("deleteRetention", DefaultValue:="0", IsRequired:=False)> _ Public Property DeleteRetention() As Integer Get Return CStr(Me("deleteRetention")) End Get Set(ByVal value As Integer) Me("deleteRetention") = value End Set End Property <ConfigurationProperty("deleteZeroRetention", DefaultValue:="0", IsRequired:=False)> _ Public Property DeleteZeroRetention() As Integer Get Return CStr(Me("deleteZeroRetention")) End Get Set(ByVal value As Integer) Me("deleteZeroRetention") = value End Set End Property <ConfigurationProperty("wildcard", DefaultValue:="*.*", IsRequired:=False)> _ Public Property Wildcard() As String Get Return CStr(Me("wildcard")) End Get Set(ByVal value As String) Me("wildcard") = value End Set End Property End Class

    Read the article

  • Pointing to vectors

    - by Matt Munson
    #include <iostream> #include <vector> using namespace std; int main () { vector <int> qwerty; qwerty.push_back(5); vector <int>* p = &qwerty; cout << p[0]; //error: no match for 'operator<<' in 'std::cout << * p' } I'm generally unclear on how to use pointers with vectors, so I'm pretty mystified as to why this is not working. To my mind, this should print 5 to screen.

    Read the article

  • Performance of VIEW vs. SQL statement

    - by Matt W.
    I have a query that goes something like the following: select <field list> from <table list> where <join conditions> and <condition list> and PrimaryKey in (select PrimaryKey from <table list> where <join list> and <condition list>) and PrimaryKey not in (select PrimaryKey from <table list> where <join list> and <condition list>) The sub-select queries both have multiple sub-select queries of their own that I'm not showing so as not to clutter the statement. One of the developers on my team thinks a view would be better. I disagree in that the SQL statement uses variables passed in by the program (based on the user's login Id). Are there any hard and fast rules on when a view should be used vs. using a SQL statement? What kind of performance gain issues are there in running SQL statements on their own against regular tables vs. against views. (Note that all the joins / where conditions are against indexed columns, so that shouldn't be an issue.) EDIT for clarification... Here's the query I'm working with: select obj_id from object where obj_id in( (select distinct(sec_id) from security where sec_type_id = 494 and ( (sec_usergroup_id = 3278 and sec_usergroup_type_id = 230) or (sec_usergroup_id in (select ug_gi_id from user_group where ug_ui_id = 3278) and sec_usergroup_type_id = 231) ) and sec_obj_id in ( select obj_id from object where obj_ot_id in (select of_ot_id from obj_form left outer join obj_type on ot_id = of_ot_id where ot_app_id = 87 and of_id in (select sec_obj_id from security where sec_type_id = 493 and ( (sec_usergroup_id = 3278 and sec_usergroup_type_id = 230) or (sec_usergroup_id in (select ug_gi_id from user_group where ug_ui_id = 3278) and sec_usergroup_type_id = 231) ) ) and of_usage_type_id = 131 ) ) ) ) or (obj_ot_id in (select of_ot_id from obj_form left outer join obj_type on ot_id = of_ot_id where ot_app_id = 87 and of_id in (select sec_obj_id from security where sec_type_id = 493 and ( (sec_usergroup_id = 3278 and sec_usergroup_type_id = 230) or (sec_usergroup_id in (select ug_gi_id from user_group where ug_ui_id = 3278) and sec_usergroup_type_id = 231) ) ) and of_usage_type_id = 131 ) and obj_id not in (select sec_obj_id from security where sec_type_id = 494) )

    Read the article

  • Is there an easy way to change iPhone Application Settings from within an application?

    - by Matt
    I've got application settings working just fine. However, I'd like to be able to change my app settings from within my app. It seems as though there should be some kind of generic way to add this functionality to my app without having to recreate all the controls myself. I mean, the code is already written in apple's settings app. Maybe someone wrote this code and open sourced it? (if it is not already available)

    Read the article

  • Git + Capistrano = Automatic Release Notes Generator ?

    - by Matt Rogish
    We use git (github) and capistrano (like 99% of the Rails shops out there) to deploy our app to production. What I'd like to do is, after every cap * deploy generate a text file containing all the git commit comments since the last deploy. I can then take that list of commit comments, clean it up, and put it somewhere for consumption. "git log" http://book.git-scm.com/3_reviewing_history_-_git_log.html has plenty of options for fetching log messages, but I don't see an easy way in capistrano to return the current and previous commits, or even the last date/time a deployment occurred, so I can pass that to git log Thoughts? I can't be the first one doing this... Thanks!

    Read the article

  • Using web.config directory security and extensionless urls

    - by Matt Brailsford
    Hi Guys, I'd like to use the built in directory security features built into the web.config to restrict access to child pages of a parent page. My structure is as follows: Members Members/News Members/Press Members/Movies Users should be able to have access to the members parent page, but not child pages. My problem is, because I am using extensionless URLs, the web.config thinks this is a directory and so access is blocked. Is there a way to say only restrict access for sub pages?

    Read the article

  • Codeigniter - accessing variables from an array passed into a page.

    - by Matt
    Hello, I have a controller with an index function as follows: function index() { $this->load->model('products_model'); $data['product'] = $this->products_model->get(3); // 3 = product id $data['product_no'] = 3; $data['main_content'] = 'product_view'; //print_r($data['products']); $this->load->view('includes/template', $data); } This is the get function in the products_model file function get($id) { $results = $this->db->get_where('products', array('id' => $id))->result(); //get the first item $result = $results[0]; return $result; } The products table contains fields such as name, price etc. Please can you tell me how to output variables from $data['product'] after it is passed into the view? I have tried so many things but nothing is working, even though the print_r (commented out) shows the data - it is not being passed into the view. I thought it may have been because the view calls a template file which references the main_content variable: Template file contents: <?php $this->load->view('includes/header'); ?> <?php $this->load->view($main_content); ?> <?php $this->load->view('includes/footer'); ?> but i tried creating a flat view file and still couldn't access the variables. Many thanks,

    Read the article

  • Printing a string and variable in MIPS

    - by Matt
    Here's the C representation of what I'm trying to do in MIPS assembly: printf ("x=%d\n", x); I know that I can do a syscall to easily print x= and I can also do a syscall to print the int x (which is stored in a register). However, that prints them like this (let's say x is 5): x= 5 How can I make them print on the same line?

    Read the article

  • PHP Connect to 4D Database

    - by Matt Reid
    Trying to connect to 4D Database. PHPINFO says PDO is installed etc etc... Testing on localhost MAMP system. However when I run my code I get: Fatal error: Uncaught exception 'PDOException' with message 'could not find driver' in /Applications/MAMP/htdocs/4d/index.php:12 Stack trace: #0 /Applications/MAMP/htdocs/4d/index.php(12): PDO->__construct('4D:host=127.0.0...', 'test', 'test') #1 {main} thrown in /Applications/MAMP/htdocs/4d/index.php on line 12 My code is: $dsn = '4D:host=127.0.0.1;charset=UTF-8'; $user = 'test'; $pass = 'test'; // Connection to the 4D SQL server $db = new PDO($dsn, $user, $pass); try { echo "OK"; } catch (PDOException $e) { die("Error 4D : " . $e->getMessage()); } Can't put my finger on the error, i'm using the settings under the PHP tab... Thank you.

    Read the article

  • Node.js Creating and Deleting a File Recursively

    - by Matt
    I thought it would be a cool experiment to have a for loop and create a file hello.txt and then delete it with unlink. I figured that if fs.unlink is the delete file procedure in Node, then fs.link must be the create file. However, my code will only delete, and it will not create, not even once. Even if I separate the fs.link code into a separate file, it still will not create my file hello.txt. Below is my code: var fs = require('fs'), for(var i=1;i<=10;i++){ fs.unlink('./hello.txt', function (err) { if (err){ throw err; } else { console.log('successfully deleted file'); } fs.link('./hello.txt', function (err) { if (err){ throw err; } else { console.log('successfully created file'); } }); }); } http://nodejs.org/api/fs.html#fs_fs_link_srcpath_dstpath_callback Thank you!

    Read the article

  • How to play multiple online videos on IOS continuously

    - by Matt.Z
    The scenario is like this: I have some long video, and slice it into small files(mp4, for example: 5 min per file), put them under some website. I wanna play (on IOS) these mp4 videos continuously, one by one, try to do not let user feel there has a pause between video pieces. So I need to buffer next video when I play current one. But I don't know where to start. What should I do? Can anyone give me some information of related documentation or source code I can study with?

    Read the article

  • Automaticly Change VisualState 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 generated code does it say that on a "MouseOver" event, change the state to "MouseOver", but it still manages to work! How does a standard button do it? Is there some sort of AutoEventWireUp going on?

    Read the article

  • SQL Server 2005 Create Table with Column Default value range

    - by Matt
    Trying to finish up some homework and ran into a issue for creating tables. How do you declare a column default for a range of numbers. Its reads: "Column Building (default to 1 but can be 1-10)" I can't seem to find ...or know where to look for this information. CREATE TABLE tblDepartment ( Department_ID int NOT NULL IDENTITY, Department_Name varchar(255) NOT NULL, Division_Name varchar(255) NOT NULL, City varchar(255) default 'spokane' NOT NULL, Building int default 1 NOT NULL, Phone varchar(255) ) I tried Building int default 1 Between 1 AND 10 NOT NULL, that didn't work out I tried Building int default 1-10, the table was created but I don't think its correct.

    Read the article

  • Can't remove Default.png?

    - by Matt Winters
    Weird one... I had been fooling around with an initial splash screen but decided not to use it. But now, although I deleted Default.png from Resources, the splash screen still appears in the Simulator when I start the app. Default.png isn't in the project folder, I close and reopen Xcode, splash screen still there. Close ands reopen Simulator, splash screen still there. I remove the app from the Simulator, build, and the splash screen is still there Default.png. Any ideas?

    Read the article

  • Equivalent to GetTickCount() on Linux

    - by Matt Joiner
    I'm looking for an equivalent to GetTickCount() on Linux. Presently I am using Python's time.time() which presumably calls through to gettimeofday(). My concern is that the time returned (the unix epoch), may change erratically if the clock is messed with, such as by NTP. A simple process or system wall time, that only increases positively at a constant rate would suffice. Does any such time function in C or Python exist?

    Read the article

  • Dump Microsoft SQL Server database to an SQL script

    - by Matt Sheppard
    Is there any way to export a Microsoft SQL Server database to an sql script? I'm looking for something which behaves similarly to mysqldump, taking a database name, and producing a single script which will recreate all the tables, stored procedures, reinsert all the data etc. I've seen http://vyaskn.tripod.com/code.htm#inserts, but I ideally want something to recreate everything (not just the data) which works in a single step to produce the final script.

    Read the article

< Previous Page | 48 49 50 51 52 53 54 55 56 57 58 59  | Next Page >