Search Results

Search found 988 results on 40 pages for 'andy simpson'.

Page 28/40 | < Previous Page | 24 25 26 27 28 29 30 31 32 33 34 35  | Next Page >

  • How can I optimize MVC and IIS pipeline to obtain higher speed?

    - by Andy
    Hi, I am doing performance tweaking of a simple app that uses MVC on IIS 7.5. I have a StopWatch starting up in Application_BeginRequest and I take a snapshot at Controller.OnActionExecuting. So I measure the time spend in the entire IIS pipeline: from request receipt to the moment execution finally gets to my controller. I obtain 700 microseconds on my 3GHz quad-core (project compiled Release x64), and I wonder where the bottleneck is, especially hearing some people say that one can get up to 8000 page loads per second with MVC. How can I optimize MVC and IIS pipeline to obtain higher speed?

    Read the article

  • Simple Mod-Rewrite rule - single rule - file exists

    - by Andy Gee
    I have a very simple mod rewrite rule Options FollowSymLinks RewriteEngine On RewriteRule ^hosted/essws/([^/]*)/$ /hosted/essws/?key=$1 [L] I would like this rewrite to activate even if the file or directory exists. For example: The URL: http://localhost/hosted/essws/candy-sweets-buffet/ Will load: http://localhost/hosted/essws/index.php?key=candy-sweets-buffet Even though the directory /hosted/essws/candy-sweets-buffet/ exists. Any help would be much appreciated.

    Read the article

  • mysql join default value

    - by andy
    I've been trying to use the IsNull() function to ensure that there is a value for a field. $result = mysql_query(" SELECT crawled.id,IsNull(sranking.score,0) as Score,crawled.url,crawled.title,crawled.blurb FROM crawled LEFT JOIN sranking ON crawled.id = sranking.sid WHERE crawled.body LIKE '%".$term."%' ORDER BY Score DESC LIMIT " . $start . "," . $c . " ") or die(mysql_error()); But I get the error message:Incorrect parameter count in the call to native function 'IsNull' Anybody have any ideas? I'm pretty new to mySQL.

    Read the article

  • jQuery .closest returns undefined

    - by Andy Holmes
    I've got the code below which works fine, however the jquery to add the items doesnt find the data-parent-room value and just returns undefined. This is the only thing not working :( HTML: <div id="inventoryRooms"> <!--BOX SHART--> <div class="widget box formHolder" data-parent-room="1"> <!--ROOM NAME--> <form class="widget-header rooms"> <input type="text" placeholder="Type Room name" name="roomName[]" class="form-input add-room-input input-width-xxlarge"> <input type="hidden" class="roomId" name="roomId[]"> <input type="hidden" class="inventoryId" name="inventoryId[]" value="<?=$_GET['inventory_id']?>"> <div class="toolbar no-padding"> <div class="btn-group"> <span class="btn saveRoom"><i class="icon-ok"></i> Save Room</span> </div> </div> </form> <!--/END--> <!--GENERIC ROW TITLES--> <div class="widget-header header-margin hide"> <div class="row row-title"> <div class="col-md-3"><h5>ITEM</h5></div> <div class="col-md-3"><h5>DESCRIPTION</h5></div> <div class="col-md-3"><h5>CONDITION</h5></div> <div class="col-md-2"><h5>PHOTOGRAPH</h5></div> <div class="col-md-1 align-center"><h5><i class="icon-cog"> </i></h5></div> </div> </div> <!--/END--> <!--ADD ITEM--> <div class="items"> </div> <!--/END--> <div class="toolbar-small"> <div class="btn-group"> <span class="btn addItem"><i class="icon-plus"></i> Add Item</span> <span data-toggle="dropdown" class="btn dropdown-toggle"><i class="icon-gear"></i> Options<span class="button-space"></span><i class="icon-angle-down"></i></span> <ul class="dropdown-menu pull-right"> <li><a href="#"><i class="icon-trash"></i> Delete Room</a></li> </ul> </div> </div> </div> </div> jQuery: $(document).on('click','.addItem', function(){ $('<!--ROW START-->\ <form class="widget-content item">\ <div class="row">\ <div class="col-md-3"><input type="text" class="form-control" name="itemName[]"></div>\ <div class="col-md-3"><textarea class="auto form-control" name="itemDescription[]" cols="20" rows="1" style="word-wrap: break-word; resize: vertical;"></textarea></div>\ <div class="col-md-3"><textarea class="auto form-control" name="itemCondition[]" cols="20" rows="1" style="word-wrap: break-word; resize: vertical;"></textarea></div>\ <input type="hidden" class="itemId" name="itemId[]" value="">\ <input type="hidden" name="itemInventoryId[]" value="<?=$_GET["inventory_id"]?>">\ <input type="hidden" name="itemParent[]" value="'+$(this).closest().attr('data-parent-room')+'">\ <div class="col-md-2">\ <div class="fileinput-holder input-group">\ <input id="fileupload" type="file" name="files[]" data-url="uploads/">\ </div>\ </div>\ <div class="col-md-1 align-center"><i class="save icon-ok large"> </i>&nbsp;&nbsp;&nbsp;<i class="delete icon-trash large"> </i></div>\ </div>\ </form>\ <!--/ROW END-->').fadeIn(500).appendTo($(this).parents().siblings('.items')); $(this).parent().parent().siblings('.widget-header, .header-margin, .hide').removeClass('hide').fadeIn(); }); Like i say, it all works fine apart from that damn data-parent-room value. Any help is appreciated! using jQuery 1.10.1

    Read the article

  • Some input regarding Dojo (smooth css change on mouseover)

    - by Andy Walpole
    I've been playing around with Dojo over the last couple of days. The script below changes the background position of the list item when the mouse is over the link. dojo.query('a[class=main-menu-link]').forEach(function(linkTwo) { dojo.connect(linkTwo, "onmouseover", function(evt) { dojo.query('#main-menu ul li').forEach(function(linkThree) { dojo.style(linkThree, { "backgroundPosition": "right center", }); }); You can see it in action in the right hand side menu: http://www.mechanic-one.suburban-glory.com/ I'm trying to work out the best of way of giving it a smooth transition between the two states... I've been looking on the Dojo documentation page but I'm not sure what is the best way of approaching it.

    Read the article

  • SWF (using XML) only working locally, not on home server or web hosting server

    - by Andy
    Hi, I use a main SWF file, which has some animations. It uses xml from a .php file which specifies several items, e.g. images and other SWFs to be used in the main SWF. Locally everything works perfectly, but when invoking it via my home server, or hosting provider it doesn't work anymore and I don't get why. All links are relative and correct. Somehow the main SWF doesn't load fully, or has problems with the XML from the .php file. I'm not sure, now I only get a black box that doesn't show any of the other content it's supposed to. check it out: http://deoshermes.ath.cx/cc-common/templates/dynamiclead/dynamic_leadee.swf the XML: <?xml version="1.0" ?><dynamic_content> <item blurb="Text 1" content_url="" content_source="" content_timer="8000" content_target="_self" tab_color="0x000000" tab_border_color="0x000000" tab_arrow_color="0xFFFFFF" tab_text_color="0xFFFFFF" tab_image="/template/images/dle_TOPmay06.jpg" cycle="true" content_border_color="0x" content_bg_image="" tab_hl_color="0x000000" tab_highlight_color="0x" tab_highlight_text_color="0x" tab_highlight_image="" > </item> <item blurb="Text 2" content_timer="5000" cycle="true" content_border_color="0x" content_bg_image="" tab_hl_color="0xFFFFFF" tab_border_color="0xFFFFFF" tab_color="0xFFFFFF" tab_arrow_color="0xFFFFFF" tab_text_color="0xFFFFFF" tab_image="/template/images/dle_MIDandBOTmay06.jpg" tab_highlight_color="0x" tab_highlight_text_color="0x" tab_highlight_image="" content_url="" content_source="" content_target="_self" > </item> <item blurb="Text 3" content_timer="5000" cycle="true" content_border_color="0x" content_bg_image="" tab_hl_color="0xFFFFFF" tab_border_color="0xFFFFFF" tab_color="0xFFFFFF" tab_arrow_color="0xFFFFFF" tab_text_color="0xFFFFFF" tab_image="/template/images/dle_MIDandBOTmay06.jpg" tab_highlight_color="0x" tab_highlight_text_color="0x" tab_highlight_image="" content_url="" content_source="" content_target="_self" > </item> </dynamic_content> this works like a charm when invoking the main SWF locally. The ActionScript from the main sWF can be found at samedomain as above/Actionscript_mainmovie.txt This also seems to work great. the function formattabs (line 68) uses some javascript. Locally the main SWF functions even without this hbx file which is located /cc-common/wss/hbx.js and use in the webpage actually. I haven't got a clue what's keeping the main SWF from working properly, because all other single SWFs work properly when invoked using a direct link. And this one just isn't working... Do I maybe need to add something in the php.ini file?? Any help would be appreciated!

    Read the article

  • Embeddable unit testing framework for mixed Windows app

    - by Andy Dent
    I want to test portions of a very complex app which includes both a major native Windows component and a substantial WPF GUI. Due to complexities I can't detail, it is impossible to run the native portion independently nor can I isolate the areas I want to test (spare me the lectures, we're talking a huge legacy code base and we do have refactoring plans). I'm looking for a unit test kit I can invoke on the native side but must be able to run with the app launched with the managed portion initialised. That seems to rule out the run executable feature of the cfix Windows unit test kit. I really like their philosophy, like WinUnit, of using DLL compilation as a way to add the reflective capabilities missing in C++ and gain a more NUnit-like experience. Ideally, I want something like WinUnit running within the application code and generating an HTML report. I'm trying to introduce more TDD and having things as lean as possible is important.

    Read the article

  • ActiveRecordStore InvalidAuthenticityToken

    - by Andy
    I have recently been using cookie store and I want to transition to active record store. However I keep getting an invalid authenticity token. After deleting my cookies, I was able to access the page just fine, but I don't want all my users to come to my page, get a huge error and then figure out that I want them to delete their cookies. So I made a function called delete cookies: after_filter :delete_cookie def delete_cookie puts "deleting cookies" cookies.to_hash.each_pair do |k, v| puts k cookies.delete(k) end end In application controller, but it doesn't seem to be working correctly. I still see my cookie after visiting any page. I feel like there really should be a better solution but I can't seem to find any so far. Any hints?

    Read the article

  • WPF - Dynamically access a specific item of a collection in XAML

    - by Andy T
    Hi, I have a data source ('SampleAppearanceDefinitions'), which holds a single collection ('Definitions'). Each item in the collection has several properties, including Color, which is what I'm interested in here. I want, in XAML, to display the Color of a particular item in the collection as text. I can do this just fine using this code below... Text="{Binding Source={StaticResource SampleAppearanceDefinitions}, Path=Definitions[0].Color}" The only problem is, this requires me to hard-code the index of the item in the Definitions collection (I've used 0 in the example above). What I want to do in fact is to get that value from a property in my current DataContext ('AppearanceID'). One might imagine the correct code to look like this.... Text="{Binding Source={StaticResource SampleAppearanceDefinitions}, Path=Definitions[{Binding AppearanceID}].Color}" ...but of course, this is wrong. Can anyone tell me what the correct way to do this is? Is it possible in XAML only? It feels like it ought to be, but I can't work out or find how to do it. Any help would be greatly appreciated! Thanks! AT

    Read the article

  • Logical value of an assignment in C

    - by Andy Shulman
    while (curr_data[1] != (unsigned int)NULL && ((curr_ptr = (void*)curr_data[1]) || 1)) Two part question. What will (curr_ptr = (void*)curr_data[1]) evaluate to, logically. TRUE? Also, I know its rather hack-ish, but is the while statement legal C? I would have to go through great contortions to put the assignment elsewhere in the code, so I'd be really nice if I could leave it there, but if it's so egregious that it makes everyone's eyeballs burst into flames, I'll change it.

    Read the article

  • C++ Pointers to functions.

    - by Andy Leman
    using namespace std; int addition (int a, int b) { return (a+b); } int subtraction (int a, int b) { return (a-b); } int operation (int x, int y, int (*functocall)(int,int)) { int g; g = (*functocall)(x,y); return(g); } int main() { int m,n; int (*minus)(int,int) = subtraction; m = operation (7,5,addition); n = operation (20,m,minus); cout << n; return 0; } Can anybody explain this line for me int (*minus)(int,int) = subtraction; Thanks a lot!

    Read the article

  • C++ copy-construct construct-and-assign question

    - by Andy
    Blockquote Here is an extract from item 56 of the book "C++ Gotchas": It's not uncommon to see a simple initialization of a Y object written any of three different ways, as if they were equivalent. Y a( 1066 ); Y b = Y(1066); Y c = 1066; In point of fact, all three of these initializations will probably result in the same object code being generated, but they're not equivalent. The initialization of a is known as a direct initialization, and it does precisely what one might expect. The initialization is accomplished through a direct invocation of Y::Y(int). The initializations of b and c are more complex. In fact, they're too complex. These are both copy initializations. In the case of the initialization of b, we're requesting the creation of an anonymous temporary of type Y, initialized with the value 1066. We then use this anonymous temporary as a parameter to the copy constructor for class Y to initialize b. Finally, we call the destructor for the anonymous temporary. To test this, I did a simple class with a data member (program attached at the end) and the results were surprising. It seems that for the case of b, the object was constructed by the copy constructor rather than as suggested in the book. Does anybody know if the language standard has changed or is this simply an optimisation feature of the compiler? I was using Visual Studio 2008. Code sample: #include <iostream> class Widget { std::string name; public: // Constructor Widget(std::string n) { name=n; std::cout << "Constructing Widget " << this->name << std::endl; } // Copy constructor Widget (const Widget& rhs) { std::cout << "Copy constructing Widget from " << rhs.name << std::endl; } // Assignment operator Widget& operator=(const Widget& rhs) { std::cout << "Assigning Widget from " << rhs.name << " to " << this->name << std::endl; return *this; } }; int main(void) { // construct Widget a("a"); // copy construct Widget b(a); // construct and assign Widget c("c"); c = a; // copy construct! Widget d = a; // construct! Widget e = "e"; // construct and assign Widget f = Widget("f"); return 0; } Output: Constructing Widget a Copy constructing Widget from a Constructing Widget c Assigning Widget from a to c Copy constructing Widget from a Constructing Widget e Constructing Widget f Copy constructing Widget from f I was most surprised by the results of constructing d and e.

    Read the article

  • What are the effects of using VS2005 to migrate from .NET 1.1

    - by andy
    Hey guys, I'm working on some legacy code for a client, involving Microsoft Content Management System (MCMS). Currently, everything is local, the code, MCMS, SQLServer, and IIS (5.x). I copied the project folder, and then opened the new copied solution in VS2005, and let it do it's conversion thing. But now nothing works. I've nnotice there have been some changes to IIS profile. What are the extent of these changes...?? Also, my VS2003 fails to recognize the Web Project?? Anyone have any idea what's going on? cheers!

    Read the article

  • Batch script is not executed if chcp was called

    - by Andy
    Hello! I'm trying to delete some files with unicode characters in them with batch script (it's a requirement). So I run cmd and execute: > chcp 65001 Effectively setting codepage to UTF-8. And it works: D:\temp\1>dir Volume in drive D has no label. Volume Serial Number is 8C33-61BF Directory of D:\temp\1 02.02.2010 09:31 <DIR> . 02.02.2010 09:31 <DIR> .. 02.02.2010 09:32 508 1.txt 02.02.2010 09:28 12 delete.bat 02.02.2010 09:20 95 delete.cmd 02.02.2010 09:13 <DIR> Rún 02.02.2010 09:13 <DIR> ????? ??????? 3 File(s) 615 bytes 4 Dir(s) 11 576 438 784 bytes free D:\temp\1>rmdir Rún D:\temp\1>dir Volume in drive D has no label. Volume Serial Number is 8C33-61BF Directory of D:\temp\1 02.02.2010 09:56 <DIR> . 02.02.2010 09:56 <DIR> .. 02.02.2010 09:32 508 1.txt 02.02.2010 09:28 12 delete.bat 02.02.2010 09:20 95 delete.cmd 02.02.2010 09:13 <DIR> ????? ??????? 3 File(s) 615 bytes 3 Dir(s) 11 576 438 784 bytes free Then I put the same rmdir commands in batch script and save it in UTF-8 encoding. But when I run nothing happens, literally nothing: not even echo works from batch script in this case. Even saving script in OEM encoding does not help. So it seems that when I change codepage to UTF-8 in console, scripts just stop working. Does somebody know how to fix that?

    Read the article

  • SQL 2008 GUID column is all 0's

    - by Andy Evans
    I'm hoping this is a simple goof I did on my end ... I have a table in my database set up like so: column name: widget_guid data type: uniqueidentifier allow nulls: false default value: newid() identity: false row guid: true When records are created (via LINQ to SQL) that the values in this field are formatted as a GUID but contain all 0's My assumption was that when a new record was created, that a guid would be autogenerated for that column, much like an auto-incrementing row id. Is this not true? Any help would be greatly appreciated. Thanks.

    Read the article

  • Join unrelated tables through a second level connected table

    - by Andy M
    Hello! I have two tables of activities on a page: Views & Comments. Views id timestamp project_id user_id page_id Comments id timestamp project_id user_id page_id comment Pages id project_id title Now pages are related to projects: Projects id account_id title I am trying to create a summary page that combines views and comments ordered by time (so that the most recent views/comments are at the beginning, grouped by projects. Also, only projects for a specific account. So the result could potentially be: Project 1 View 5 (June 20th) View 4 (June 18th) Comment 5 (June 15th) Comment 4 (June 14th) Comment 3 (June 12th) Project 3 View 3 (June 10th) View 2 (June 8th) Comment 2 (June 7th) Project 2 View 1 (June 5th) Comment 1 (June 4th) If you could help with how to do this using SQL (or even doctrine) that would be awesome. Thank you.

    Read the article

  • Java - Thread safety of ArrayList constructors

    - by andy boot
    I am looking at this piece of code. This constructor delegates to the native method "System.arraycopy" Is it Thread safe? And by that I mean can it ever throw a ConcurrentModificationException? public Collection<Object> getConnections(Collection<Object> someCollection) { return new ArrayList<Object>(someCollection); } Does it make any difference if the collection being copied is ThreadSafe eg a CopyOnWriteArrayList? public Collection<Object> getConnections(CopyOnWriteArrayList<Object> someCollection) { return new ArrayList<Object>(someCollection); }

    Read the article

  • Call Dispose() on a WindowsIdentity object? C#

    - by Andy
    I am retrieving a WindowsIdentity object by calling: win_id = System.Security.Principal.WindowsIdentity.GetCurrent(); with the intention of getting the currently logged on user name, which works fine. WindowsIdentity implements IDisposable, but since I din't create the object myself, do I still need to call .Dispose() on it when I am finished with it or not? Thanks.

    Read the article

  • Can't send flash message from Model method

    - by Andy
    Hello, I'm trying to prevent a record that has a relationship to another record from being deleted. I can stop the deletion but not send a flash message as I had hoped! class Purchaseitem < ActiveRecord::Base before_destroy :check_if_ingredient ... def check_if_ingredient i = Ingredient.find(:all, :conditions => "purchaseitem_id = #{self.id}") if i.length > 0 self.errors.add(:name) flash.now[:notice] = "#{self.name} is in use as an ingredient and cannot be deleted" return false end end This will prevent a the delete wihthout the flash line, and when I add it I get: undefined local variable or method `flash' for # Any help would be much appreciated!

    Read the article

  • Any way to ask a method for its name?

    - by Andy
    I'm trying to debug an iPhone app I'm working on, and the idea of adding fifty NSLog statements to the various source files gives me the willies. What I'd like to do is write a pair of statements, say NSString *methodName = [self methodName]; NSLog(@"%@", methodName); that I can just paste into each method I need to. Is there a way to do this? Is there some Objective-C construct for asking a method for its name? Or am I gonna have to do this the hard way?

    Read the article

  • Windows Mobile application icon

    - by Andy White
    Is it possible to specify the application icon for a windows mobile app from a resource file or other configuration besides the .csproj? The reason I would like to do this is because I have an application that can be configured to run in several different ways. We would like to build out three unique .cabs based on these configurations, and we would like to use a different icon for each version. One option we've considered is just running multiple builds and swapping out the icon file each time, but we were hoping there would be a way to do this using a "resource" DLL or something along those lines, that could be compiled or linked in to the main .exe.

    Read the article

  • Why am I getting "Unable to find manifest signing certificate in the certificate store" in my Excel Addin?

    - by Andy Parsons
    I've got an Excel add-in project that was created a couple years back in Visual Studio 2008. It's got some changes to be made so I've upgraded to Visual Studio 2010 (the only IDE I am able to use). Not sure if this is causing the problem but it's background information. When I check out the code and compile it I get the error, "Error 1 Unable to find manifest signing certificate in the certificate store." Can anyone tell me what this means and how to fix it?

    Read the article

  • What is a good naming convention to differentiate a class name from a property in C#?

    - by Andy Stampor
    I run into this frequently enough that I thought I'd see what others had to say about it. Using the StyleCop conventions, I find that I often have a property name that is hard to make different than the class name it is accessing. For example: public class ProjectManager { // Stuff here } public class OtherClass { private ProjectManager ProjectManager { get; set; } } It compiles and runs, but seems like it would be an easy way to confuse things, even with the use of "this".

    Read the article

< Previous Page | 24 25 26 27 28 29 30 31 32 33 34 35  | Next Page >