Daily Archives

Articles indexed Monday April 19 2010

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

  • Code snippets for ASP.NET MVC2 in VS 2010

    - by rajbk
    VS 2010 comes with ready made snippets which helps you save time while coding. You insert a snippet by typing the name of the code snippet and hitting the Tab key twice. You can also use the following method if you wish to see a listing of snippets available. Press Ctrl + K, Ctrl + X Select ASP.NET MVC2 with the arrow keys and hit enter to see a list of snippets available.   The MVC related snippets you get out of the box (for C#) are listed below: HTML actionlink Markup snippet for an ASP.NET MVC action link helper <%= Html.ActionLink("linktext", "actionname") %>   beginformajaxcs Markup snippet for an ASP.NET MVC AJAX-enabled form helper in C# <% using (Ajax.BeginForm("actionname", new AjaxOptions {UpdateTargetId= "elementid" })) { %> <% } %>   beginformcs Markup snippet for an ASP.NET MVC form helper in C# <% using (Html.BeginForm()) { %> <% } %>   displayforcs Markup snippet for an ASP.NET MVC templated helper. <%= Html.DisplayFor(x => x.Property) %>   editorforcs Markup snippet for an ASP.NET MVC templated helper. <%= Html.EditorFor(x => x.Property) %>   foreachcs Markup snippet for an ASP.NET MVC foreach statement in C# <% foreach (var item in collection) { %> <% } %>   ifcs Markup snippet for a code-nugget if else statement in C# <% if (true) { %> <% } %>   ifelsecs Markup snippet for a code-nugget if else statement in C# <% if (true) { %> <% } else { %> <% } %>   renderpartialcs Markup snippet for an ASP.NET MVC partial view rendering in C# <% Html.RenderPartial("viewname"); %>   textboxmvc Markup snippet for an ASP.NET MVC textbox helper <%= Html.TextBox("name") %>   validationsummarymvc Markup snippet for an ASP.NET MVC validation summary helper <%= Html.ValidationSummary() %> CS mvcaction Code snippet for an action. public ActionResult Action() {     return View(); }   mvcpostaction Code snippet for an action via http post. [HttpPost] public ActionResult Action() {     return View(); }   Enjoy!

    Read the article

  • What does this error mean in my IIS7 Failed Request Tracing report?

    - by Pure.Krome
    Hi folks, when I attempt to goto any page in my web application (i'm migrating the code from an asp.net web site to web application, and now testing it) .. i keep getting some not authenticated error(s) . So, i've turned on FREB and this is what it says... I'm not sure what that means? Secondly, i've also made sure that my site (or at least the default document which has been setup to be default.aspx) has anonymous on and the rest off. Proof: - C:\Windows\System32\inetsrv>appcmd list config "My Web App/default.aspx" -section:anonymousAuthentication <system.webServer> <security> <authentication> <anonymousAuthentication enabled="true" userName="IUSR" /> </authentication> </security> </system.webServer> C:\Windows\System32\inetsrv>appcmd list config "My Web App" -section:anonymousAuthentication <system.webServer> <security> <authentication> <anonymousAuthentication enabled="true" userName="IUSR" /> </authentication> </security> </system.webServer> Can someone please help?

    Read the article

  • Image rotate with JQuery and PHP

    - by robertdd
    i have a list of thumbnails! i am able to rotate a image with jquery, but after i refresh the page, the image is the same! i want to make a SAVE button to save all the edited images? how i can save the edited image on the server side? thanks

    Read the article

  • Why when I render a scene with a revolving camera objects that you'd expect to appear behind others

    - by seaworthy
    Hello, I am rendering a scene in which I have two spheres. I am revolving a camera around one of them. What happens is counter-intuitive. When the camera goes around the sphere the other gets in front of it when you'd expect it to be behind. So it appears as though the spheres aren't revolving around each other and the one the should go around is always upfront. Please help. Here is the code that renders the scene: glLoadIdentity(); [self positionCamera]; glutSolidSphere(2, 12,12); glPushMatrix(); glTranslatef(5, 0, 0); glutSolidSphere(0.5, 12,12); glPopMatrix(); glFlush(); This block is part of a class that gets called on using. [NSTimer scheduledTimerWithTimeInterval:DEFAULT_ANIMATION_INTERVAL target:self selector:@selector(drawRect) userInfo:nil repeats:YES]; And -(void)positionCamera{} Contains math do camera revolution and gluLookAt()

    Read the article

  • Edit Comment Template in Netbeans PHP 6.8

    - by Shiro
    I would like to ask is there any way change the comment code template in Netbeans PHP 6.8 In eclipse, when I type /** ENTER , it would come out the comment template that I set in the setting, like this: /** * Apr 19, 2010 - Shiro * Description * * @return unknown_type */ function test() { } by Default Netbeans only will show the parameter in the function. /** * * @param <type> $order_No * @param <type> $array */ in Netbeans is there any possible I could found any customization about this, anyone know where is the setting for this?

    Read the article

  • Consuming an iCal/.ics file in YQL

    - by Josh
    How would one consume an iCal/.ics file in YQL? Given an .ics such as: http://www.hebcal.com/export/ba/8a35a5efbb27548bc0272b94b8de96.ics?subscribe=1&v=1&year=2010&month=x&nh=on&tag=fp.ql&c=off How would I go about using YQL to select certain events based on fields, etc. I've tried the standard formats, and the only format that seems to even parse the file is HTML - which puts it all in a <p>, and removes the line returns that give the file meaning. I've had some success with using Yahoo Pipes' Fetch Feed Source, but was wondering if it's possible to do this entirely in YQL. Any ideas?

    Read the article

  • Microsoft Team Foundation Equivalent stack.

    - by Nix
    I am looking for a free alternative to TFS. What would be the best alternative stack(source control, bug tracking, project management/planning, wiki, automated builds (ci))? Keeping in mind that it would be nice if they all integrated well. For example, it would be nice to be able to link bugs to source control, and then be able to link to a project plan and then be able to automate building. I do not have issues with using Microsoft project to manage project planing. I know i would like to use these....: SVN TeamCity NUnit But i am struggling to find a good Wiki/Project Planning/Bug tracking, that would integrate well. Any questions let me know.

    Read the article

  • Print expression as is without evaluating it

    - by Raj
    i want to print the expression Xmin and Ymin as is without calculating the final value . i,e with the values of I and J as 1,2,3,4,5 example when I=1 Xmin= Xmin ((1 - 1)*10 + (1 - 1)*1) is there a way to do it .. I tried the following code, but no luck: int a, g; a = 10; g = 1; for (int J=1; J<=5; J++) { for (int I = 1; I <= 5; I++) { string Xmin = Convert.ToString((I - 1)*a + (I - 1)*g); string Ymin = Convert.ToString((J - 1) * a); Debug.WriteLine("X=" + Xmin + "Y=" + Ymin); } }

    Read the article

  • Alternatives to Google Earth for sat image

    - by Martin Beckett
    I've been asked to add Google Earth images to a desktop app (civil engineering modelling app) I was under the impression that Google's license didn't allow you to do this. Are there any other easily accessible, and similarly high resolution, image sources anyone can recommend (Blue Marble, terraserver) ? As a bonus, any library that lets me use coordinates in a range of local map datums and convert them to Lat/Long without me having to incorporate the whole of CGAL?

    Read the article

  • Can I make a "TCP packet modifier" using tun/tap and raw sockets?

    - by benhoyt
    I have a Linux application that talks TCP, and to help with analysis and statistics, I'd like to modify the data in some of the TCP packets that it sends out. I'd prefer to do this without hacking the Linux TCP stack. The idea I have so far is to make a bridge which acts as a "TCP packet modifier". My idea is to connect to the application via a tun/tap device on one side of the bridge, and to the network card via raw sockets on the other side of the bridge. My concern is that when you open a raw socket it still sends packets up to Linux's TCP stack, and so I couldn't modify them and send them on even if I wanted to. Is this correct? A pseudo-C-code sketch of the bridge looks like: tap_fd = open_tap_device("/dev/net/tun"); raw_fd = open_raw_socket(); for (;;) { select(fds = [tap_fd, raw_fd]); if (FD_ISSET(tap_fd, &fds)) { read_packet(tap_fd); modify_packet_if_needed(); write_packet(raw_fd); } if (FD_ISSET(raw_fd, &fds)) { read_packet(raw_fd); modify_packet_if_needed(); write_packet(tap_fd); } } Does this look possible, or are there other better ways of achieving the same thing? (TCP packet bridging and modification.)

    Read the article

  • Ruby on Rails, Array to HTML table, controller or view?

    - by SooDesuNe
    In my rails app the model is fetching some XML and returning an array. I want each array item (they are all text typed) to ultimately be a cell in an HTML table. Does the logic of turning the array elements into the HTML table belong in the controller or the view? Of course either will work, I'd like your thoughts on best practice.

    Read the article

  • UITextField resignFirstResponder not working?

    - by Tejaswi Yerukalapudi
    I've double checked all the connections in the nib file. My code - // Implement viewDidLoad to do additional setup after loading the view, typically from a nib. - (void)viewDidLoad { self.view.backgroundColor = [[UIColor alloc] initWithPatternImage:[UIImage imageNamed:@"iphone_bg_login.png"]]; self.title = @"Login screen"; loginTxt = [[UITextField alloc] init]; pwdText = [[UITextField alloc] init]; loginFailedTxt = [[UILabel alloc] init]; loginBtn = [[UIButton alloc] init]; navAppDelegate = (NavAppDelegate *)[[UIApplication sharedApplication] delegate]; navAppDelegate.navController.navigationBarHidden = YES; //NSArray *subVs = (NSArray *) [self.view subviews]; [super viewDidLoad]; } I've used a subclass of UIView (UIControl) and added all the UI elements to it in the Interface builder.The UIControl's touchDown method is connected to backgroundTap method. -(IBAction) backgroundTap:(id) sender { [loginTxt resignFirstResponder]; [pwdText resignFirstResponder]; //[[UIApplication sharedApplication] becomeFirstResponder]; //[sender resignFirstResponder]; } So the keyboard isn't removed like it's supposed to. Not sure why. Thanks for the help! Teja.

    Read the article

  • how to embed pure as3 bitmap assets with flex4 (worked with flex3)

    - by jedierikb
    In Flex3, I could compile pure as3 code and use "embed" tags to load in images. This was done by Flex making a BitmapAsset class. I can still do this in Flex4. However, there was a trick to fakeout flex3 and use my own mx.core.BitmapAsset class to remove some of the extraneous stuff Flex's BitmapAsset brings in with it. This is described here: http://www.ultrashock.com/forums/flex/embed-flex-assets-without-using-flex-123405.html Unfortunately, I cannot get these tricks to work with Flex4 and get smaller file sizes. I end up with the error "VerifyError: Error #1014: Class mx.core::BitmapAsset could not be found." This error leads me to this forum, and a solution as described there: http://tech.groups.yahoo.com/group/flexcoders/message/148762 Following this advice, I add -static-link-runtime-shared-libraries=true, and my swf loads without an error... but this means I am loading in the pieces of the flex framework I wanted to omit (and the file size says so too). Is there a better way to fake out flex4 when it comes to using Embed?

    Read the article

  • PHP Grid recommendations needed

    - by Jack
    Hi, I'm looking for a grid control for a project I'm doing in PHP. Are there any good recommendations? Ideally, it'd have a data entry mode similar to a spreadsheet where the user could enter row after row after row, without needing to click new/edit buttons or links.

    Read the article

  • Python proxy an application

    - by sharvey
    Does anyone know of a library that enables you to run an application inside some kind of sandbox, with virtual mouse and keyboard support. The use case would be to create some kind of visual test runner, that would replay all actions taken during recording and play them back. So far I found autopy, but the fact that it controls the real mouse position is problematic, because it prevents user interaction with other tools (debugger or anything) while running. Cross platform would be nice, but either windows or os x is fine. Python would be ideal but anything that you could create python bindings for would be ok too.

    Read the article

  • How to read Excel file using vb.net

    - by Mark
    How to read excel file using vb.net.. I have a code to read the excel file but suddenly it crashes the output when I deleted some rows in excel file.. The deleted rows was also outputted in my coded program. Can anyone help me on how to read excel file and ignore those deleted rows to avoid unexpected null output..

    Read the article

  • Problems with South/Django: not recognizing the Django App

    - by christmasgorilla
    I've got a Django project on my machine and when I try to use South to migrate the data schema, I get several odd errors. Example: $ python manage.py convert_to_south thisLocator /Library/Python/2.6/site-packages/registration/models.py:4: DeprecationWarning: the sha module is deprecated; use the hashlib module instead import sha /Users/cm/code/thisLocator/../thisLocator/batches/models.py:6: DeprecationWarning: the md5 module is deprecated; use hashlib instead import md5 There is no enabled application matching 'thisLocator'. I've followed the South documentation. Settings.py has it in the installed apps, I can run import south from the manage.py shell. Everyone else on my team is calling the app thisLocator. Am I doing something really stupid?

    Read the article

  • MySQL - Skip Duplicate WordPress Entries

    - by 55skidoo
    I'm writing a script to display the 10 most recently "active" WordPress blog posts (i.e. those with the most recent comments). Problem is, the list has a lot of duplicates. I'd like to weed out the duplicates. Is there an easy way to do this by changing the MySQL query (like IGNORE, WHERE) or some other means? Here's what I have so far: <?php function cd_recently_active() { global $wpdb, $comments, $comment; $number = 10; //how many recently active posts to display? enter here if ( !$comments = wp_cache_get( 'recent_comments', 'widget' ) ) { $comments = $wpdb->get_results("SELECT comment_date, comment_author, comment_author_url, comment_ID, comment_post_ID, comment_content FROM $wpdb->comments WHERE comment_approved = '1' ORDER BY comment_date_gmt DESC LIMIT $number"); wp_cache_add( 'recent_comments', $comments, 'widget' ); } ?>

    Read the article

  • Having trouble with font on this blog?

    - by TechTwaddle
    Sometimes when I open this site on other PC’s the font of the posts turns out be very small and it can be a pain to read the text. Not sure if you’ve noticed the ‘Customize’ bar on top of the page, so I thought I’ll let know. This bar helps you customize the way you want the page to look and saves the settings for you so you don’t have to change it every time. You can change the font size and the main page positioning. The white arrow marks in the image above shows the settings I find convenient.

    Read the article

  • VS2010 Launch Presentations

    Last week I was in Vegas to present at the DevConnections / VS2010 Launch event.  The show was well-attended and everybody I spoke to agreed it was educational and enjoyable.  My three talks were all on Wednesday, 14 April 2010, including one at 8am for which I was impressed to see a large turnout in attendance.   Pragmatic ASP.NET Tips, Tricks, and Tools My first session was on tips, tricks, and tools for ASP.NET developers.  This is a talk Ive given in past years, but which I refine every time.  I usually like to have a full session to devote to tools, and a separate talk just for Tips and Tricks, but for this show I was only given the one 75-minute slot, so I had to cut some materials to make things fit.  The talk went well, all the demos work, and the attendees seemed to enjoy it, and I like giving it, so hopefully I can continue to present on this topic in future DevConnections shows. Download the ASP.NET Tips, Tricks, and Tools slides and demos.   Whats New in ASP.NET MVC 2 My second talk of the day followed immediately after the Tips and Tricks talk, and was a brand new talk for me.  I have to throw out a thank-you to Phil for letting me see his MIX slide deck before he gave his talk, as that was a big help.  The official whats new document online is also worth checking out if youre interested in this subject.  Download the Whats New in ASP.NET MVC 2 slides and demos.   SOLIDify Your ASP.NET MVC 2 Application Just because youre using a ASP.NET MVC doesnt mean your code cant still end up being a big ball of mud.  This session describes a number of principles of software design that can help ensure applications remain loosely-coupled and malleable even as they age and increase in features and complexity.  This was my last talk of the day and did have one minor demo failure involving a database constraint.  Ive given this talk many times before, and in this case I had to fit it into a 60-minute timeslot, so Im not sure I had quite enough time to drive home all of the concepts to everyone in the audience.  That said, I did hear a number of positive comments on how the talk went, so thats encouraging. Download the SOLIDify Your ASP.NET MVC 2 Application slides and demos.   In my sessions, I promised to have these posted by the end of the weekend theyre going up at 10pm Sunday night (my time) 2 hours to spare!  Enjoy! Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • SQL SERVER Find Most Active Database in SQL Server DMV dm_io_virtual_file_stats

    Few days ago, I wrote about SQL SERVER Find Current Location of Data and Log File of All the Database. There was very interesting conversation in comments by blog readers. Blog reader and SQL Expert Sreedhar has very interesting DMV presented which lists the most active database in SQL Server. For quick reference he [...]...Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

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