Daily Archives

Articles indexed Wednesday March 31 2010

Page 13/124 | < Previous Page | 9 10 11 12 13 14 15 16 17 18 19 20  | Next Page >

  • ASP.NET MVC 2: How do I make the Ajax.Form to fire the Client Side Validation with Data Annotation?

    - by Methee
    Here is the code I have so far: <% Html.EnableClientValidation(); %> <% using (Ajax.BeginForm("Address", "Accounts", FormMethod.Post, new AjaxOptions(){}, new { id="dialog-form"} )){ %> <div> <label for="address">Address Name:</label> </div> <div> <%= Html.TextBoxFor(m => m.Name)%> <div> <%= Html.ValidationMessageFor(m => m.Name)%> </div> </div> <input type="submit" value="OK" /> <% } %> When I click submit, It does the validation on the server side, I kinda like it to validate on the Client instead of taking a trip to the server right away.

    Read the article

  • What is a good programming language for beginners? [closed]

    - by user122401
    Possible Duplicates: Best ways to teach a beginner to program? What is the easiest language to start with? What is a good programming language for beginners? I am 15 and had learned C++ before never got into it though? But is this like learning a new language? like having to do it over and over and every day having new stuff to learn ?

    Read the article

  • Logging ASMX Requests and Responses from Client

    - by John
    Hi, I've got a C# web application which I can't easily update the code of. However, I can make configuration changes to the application. The application calls out to a third-party ASMX web service, and I really need (if at all possible) to log the full XML requests and responses. I have no control over the web service so I have to do it from the client. I'm not using WCF - this is standard ASMX web service calls. Is there any way I can log the XML requests and responses from the client web app without having to redeploy the code? Thanks in advance John

    Read the article

  • Error: Class 'Haml' not found... trying to use Haml (Kohaml) with Kohana

    - by Serhiy
    Can't for the life of me figure out what I'm doing wrong... Downloaded Kohaml from http://github.com/transphorm/kohaml Dropped it into modules/kohaml # My Bootstrap reference 'kohaml' => MODPATH.'kohaml', // kohaml Keep getting this error... (snapshot of the error and my modules folder) http://wellcommentedcode.com/stack_kohaml_question/ Any suggestions on what I might be doing wrong would be highly appreciated... thanks.

    Read the article

  • Invert a stack, without using extra data structures?

    - by vks
    How would you invert a stack, without using extra data structures, like a second, or temporary, stack. Thus no stack1-stack2 or stack-queue-stack implementation in the answer. You just have access to push/pop feature of a standard stack. I think there is way to do it by keeping a global counter and using pointer manipulation. If I solve it myself, I will post it. If someone else figures it out, please post your solution.

    Read the article

  • Language for non-programmers to start learning programming

    - by zarawesome
    A non-programmer friend will be starting the Computer Science college course in a few months. I'd like her to try her hand at some programming before she starts her studies (the course itself expects one to know C, but it's an horrible language to learn to program at). What language would be the best to do so? Related question: Best ways to teach a beginner to program?

    Read the article

  • What is the easiest language to start with?

    - by Teifion
    What is the language with the lowest barriers to entry, simplest syntax, easiest setup. I'm aware that there's not a best language but I am sure that there will be one that's got a good score in all three areas. It's for teaching friends how to program, I like PHP and Python but I don't want to be narrow minded and limit myself when there is a better option out there. Common suggestions Ruby Python Basic C Java C# Useful links Best Ways To Teach A Beginner to Program Why's (Poignant) Guide to Ruby Think Python

    Read the article

  • SQLAuthority News SQL Server Cheat Sheet from MidnightDBA

    When I read the article from MidnightDBA (I should say MidnightDBAs because it is about Jen and Sean) regarding T-SQL for the Absentminded DBA, my natural reaction was that it is a perfect extension.A year ago around the same month, I had created SQL Server Cheatsheet. I have distributed a lot of copies of it [...]...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

  • How would the conversion of a custom CMS using a text-file-based database to Drupal be tackled?

    - by James Morris
    Just today I've started using Drupal for a site I'm designing/developing. For my own site http://jwm-art.net I wrote a user-unfriendly CMS in PHP. My brief experience with Drupal is making me want to convert from the CMS I wrote. A CMS whose sole method (other than comments) of automatically publishing content is by logging in via SSH and using NANO to create a plain text file in a format like so*: head<<END_HEAD title = Audio keywords= open,source,audio,sequencing,sampling,synthesis descr = Music, noise, and audio, created by James W. Morris. parent = home END_HEAD main<<END_MAIN text<<END_TEXT Digital music, noise, and audio made exclusively with @=xlink=http://www.linux-sound.org@:Linux Audio Software@_=@. END_TEXT image=gfb@--@;Accompanying image for penonpaper-c@right ilink=audio_2008 br= ilink=audio_2007 br= ilink=audio_2006 END_MAIN info=text<<END_TEXT I've been making PC based music since the early nineties - fortunately most of it only exists as tape recordings. END_TEXT ( http://jwm-art.net/dark.php?p=audio - There's just over 400 pages on there. ) *The jounal-entry form which takes some of the work out of it, has mysteriously broken. And it still required SSH access to copy the file to the main dat dir and to check I had actually remembered the format correctly and the code hadn't mis-formatted anything (which it always does). I don't want to drop all the old content (just some), but how much work would be involved in converting it, factoring into account I've been using Drupal for a day, have not written any PHP for a couple of years, and have zero knowledge of SQL? How might a team of developers tackle this? How do-able is it for one guy in his spare time?

    Read the article

  • What's the fastest way to check if a word from one string is in another string?

    - by Mike Trpcic
    I have a string of words; let's call them bad: bad = "foo bar baz" I can keep this string as a whitespace separated string, or as a list: bad = bad.split(" "); If I have another string, like so: str = "This is my first foo string" What's the fasted way to check if any word from the bad string is within my comparison string, and what's the fastest way to remove said word if it's found? #Find if a word is there bad.split(" ").each do |word| found = str.include?(word) end #Remove the word bad.split(" ").each do |word| str.gsub!(/#{word}/, "") end

    Read the article

  • Python sudoku programming

    - by trevor
    I need your help on this. I have this program and I must finish it. It's missing 3 parts. Here is the program I'm working with: import copy def display(A): if A: for i in range(9): for j in range(9): if type(A[i][j]) == type([]): print A[i][j][0], else: print A[i][j], print print else: print A def has_conflict(A): for i in range(9): for j in range(9): for (x,y) in get_neighbors(i,j): if len(A[i][j])==1 and A[i][j]==A[x][y]: return True return False # HERE ARE THE PARTS THAT REQUIRE HELP!!!! def get_neighbors(x,y): return [] def update(A, i, j, value): return [] def solve(A): return [] # ENDS PARTS THAT REQUIRE HELP!!!! A = [] infile = open('puzzle1.txt', 'r') for i in range(9): A += [[]] for j in range(9): num = int(infile.read(2)) if num: A[i] += [[num]] else: A[i] += [[1,2,3,4,5,6,7,8,9]] for i in range(9): for j in range(9): if len(A[i][j])==1: A = update(A, i,j, A[i][j][0]) if A==[]: break if A==[]: break if A<>[]: A = solve(A) display(A) I need to solve the stuff formerly in bold letters, now explicitly marked in the code, specifically - get_neighbors(): - update(): - solve(): Thank you for your time and help.

    Read the article

  • UITableView Cell IndexPath

    - by Reonarudo
    Hello, Can anyone tell me how can I get a cell IndexPath? I was saving the IndexPath in the tableView: cellForRowAtIndexPath: method but this only loads when the cell is viewed and I need to know its index path on the viewDidLoad method. this resulted in a null value because as I said it only loads its value after the cell was viewed once. Thank you. EDIT The intention is being able to jump to a specific cell that has its specific number but its not linear with the sections and rows count.

    Read the article

  • How does Nike's website do this Flash effect when the user selects a choice.

    - by Luis Armando
    I was wondering how does Nike website make the change you can see when selecting a color or a sole. At first I thought they were only using images and when the user picked a color you just replaced that part, but when I selected a different sole I noticed it didn't changed like an image it looked a bit more as if it was being rendered. Does anybody happens to know how this is made? Or where can I get further info about making this effect :)?

    Read the article

  • Roadblocks in creating a custom operating system

    - by Dinah
    It seems to me that the most common overly ambitious project that programmers (esp. Comp. Sci. grads) try to tackle is building your own operating system. (Trying to create your own programming language + compiler is probably even more common but not nearly as ambitious.) For those (like myself) foolish enough to try: aside from the sheer size, what are the biggest *gotcha*s or unexpected roadblocks you've encountered in trying to create your own OS from the ground up? Edit: A great OS question: http://stackoverflow.com/questions/43180/how-to-get-started-in-operating-system-development/

    Read the article

  • How to keep a process running on a remote windows server

    - by DutrowLLC
    I need to implement a background process that runs on a remote windows server 24/7. My development environment is C#/ASP.NET 3.5. The purpose of the process is to: Send reminder e-mails to employees and customers at appropriate times (say 5:00PM on the day before a job is scheduled) Query and save GPS coordinates of employees when they are supposed to be out on jobs so that I can later verify that their positions were where they were supposed to be. If the process fails (which it probably will, especially when updates are added), I need for it to be restarted immediately (or within just a few minutes) as I would have very serious problems if this process failed to send a notification, log a GPS coordinate, or any of the other tasks its meant to perform.

    Read the article

  • Interacting with RESTful API's via Javascript?

    - by Alex
    Hi there, to start off, I know C++, C#, Python, some Ruby, and basic Javascript. Anyway, my question revolves around how to interact with RESTful API's via Javascript. I haven't been able to find any good examples on various websites, and so I've come here. So my basic question is: How do I interact with RESTful API's via JS? And where can I find out how to implement OAuth in JS? I know how to get my keys and such, just not how to actually code them in. Below is an example of a twitter API status update run from my MAC terminal with curl: curl -u username:password -d "my tweet" http://api.twitter.com/1/statuses/update.json How can I implement this in Javascript (preferably with OAuth authentication)? This would at least start me going in the right direction. Thanks so much!!

    Read the article

  • Can a .csv file be used as a data source in Visual Studio 2008?

    - by Kevin
    I'm pretty new to C# and Visual Studio. I'm writing a small program that will read a .csv file and then write the records read to a SQL Server database table. I can manually parse the .csv file, but I was wondering if it is possible to somehow "describe" the .csv file to Visual Studio so that I can use it as a data source? I should mention that the first two lines in the .csv file contain header information and the following lines are the actual comma-delimited data. Also, I should mention that this program is a stand-alone console program with no user interface.

    Read the article

  • How to stop looking in a database after X rows are found?

    - by morningface
    I have a query to a database that returns a number X of results. I am looking to return a maximum of 10 results. Is there a way to do this without using LIMIT 0,9? I'll use LIMIT if I have to, but I'd rather use something else that will literally stop the searching, rather than look at all rows and then only return the top 10.

    Read the article

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