SQL Server is touchy about the names. Depending on how it's configured you may or may not be able to just use an IP address like you're using in the connection string. When I'm faced with this, I first try to make sure I can connect to the server using SQL Management Studio. First try it with the IP address like in your connection string. If it doesn't connect, you'll need to check the actual name of the server and try that. Then if Management Studio can connect, you know you're good, and you can paste the name back into your connection string.

Also, just a thought as I look again at your connection string. It looks like you have both integrated security (which refers to logging in with your existing Windows account), as well as a username/password. I'll need to check, but I think you shouldn't have both. (I might be wrong there, though.)

Since you're incrementing by two, you're basically skipping the final \0. Look at when you get to the 'Y'. You print that out, and then you go two more, which puts you one past the \0. So your test (letters[i] != '\0') never sees the \0. It sees the one before it, and whatever is in memory after it, and it eventually stops when it happens to see another \0 in memory.

Here are two references for learning regular expressions, one site and one book. I recommend you get the book and study it, and also study the site. The site is www.regular-expressions.info. The book is called Mastering Regular Expressions.

I'll probably just insert the markdown myself. I do my professional writing in the word processor and copy it over. (I have a version control system and entire workflow set up for it. :-) )

I agree! Creating things is what it's all about!

Do you know if there's any macro or something that will take a Word doc and convert it to Markdown? When I uploaded my tutorial a couple days ago, it took a really long time to copy and paste from the word processor, especially in places where there was a lot of code and text interspersed. I guess though I could put the markdown marks right in my doc and then just paste the whole thing in...

Also, here's another thought about why I like this library. I'm building a pretty big app right now that runs in the browser, with about ten thousand lines of JavaScript. Throughout the program, I have many dialog boxes. By using this library, I can bind every dialog box to a JavaScript object. When the user fills in a dialog box and clicks OK, I don't need to go through and gather up the values for all the text boxes and drop downs. The data is automatically in my objects, ready for me to process. And similarly, if the user needs to edit existing data, I don't need to write code that prepopulates the form fields. I just push the data into an observable with one line of code, and the fields get filled in automatically with no work from my end. Then when the user is finished editing the data, again I don't need to do anything. My data structure is automatically filled in for me. This has saved me a huge amount of coding.

Well I'm not necessarily saying it's better. But I've found it has greatly sped up my development time. I'm creating data-bound user interfaces much more quickly than I used to for the web, more like in my days as a desktop software developer. And for me personally, the non-obtrusive JavaScript thing really isn't an issue. When desktop development started offering data-bound controls, life got much easier for many of us. And that's what I see here. I really don't have a problem if there's an intrusive or tightly-coupled aspect between the UI and the data structures. I'm not building my UIs to be reusable anyway. But that's just my own opinion. Others might differ. (And thanks for replying! I wasn't sure anyone was going to. :-) )

This is actually a really good discussion, something I suspect a lot of beginning and even intermediate programmers might be wondering about. I think I'll write my next Tutorial about this topic. (I work for Daniweb as a volunteer.)

So you don't actually have to copy it into the heap. It gets created there.

Oh! Sorry, I guess I didn't explain that. When you call malloc in C or new in C++, it gets created on the heap and you get a pointer to its location in the heap.

No, when it's on the heap it stays right there and the main and other functions just access it through the pointer. The pointer gets passed around and anyone can use it.

Correct, except for the part about the pointer. When you allocate something on the heap, the heap stays around and is there for all the functions to share. (In C, I think you use "malloc" to allocate it on the heap. I haven't done straight C in years though.) So what you do is this: In your function, you allocate the structure on the heap, and get back a pointer to that structure. At the end of your function, you return the pointer. The code that called the function gets the pointer to that same spot on the heap, and continues working on the structure. So that's actually a good bit more efficient. Also, if you're doing C++, by calling new, your object automatically gets allocated on the heap and you get back a pointer to it.

Do you want to actually copy the data from one table to another or just display it on the screen that way? If you just want to display it, you might consider creating a view in the database.

When you have a function in C (or C++), the function gets an area of memory on the stack to use for its local variables. If you create a variable like this:

MyStruct X;

inside your function, then the X structure will get created on the stack. If you return the variable like this:

return X;

then when the function ends, the code can't return the actual structure that's on the stack, since that stack space goes away (out of scope). So the code will actually create a copy of it and return that copy by copying over the members. However, the way around that is to allocate the structure on the heap, and instead pass around pointers to that structure. Then you're always working with the same copy. (In C++ you can accomplish this same thing using the new keyword.)

Does that help?

Jeff

This might help, at least with some of it. This is an article I wrote about page transitions. The main topic is local storage, but I also get into the animations. Perhaps if there's enough interest, I'll write more on this here on Daniweb.

http://html5center.sourceforge.net/blogs/Local-Storage-with-HTML5-Heres-How

As I spend time in the Daniweb forums, I see some questions that ultimately come down to the issue of manipulating JavaScript data and a user interface on a website. When you build a GUI that lets your user view, add, edit, and delete data, a common approach is to spend a lot of time copying data back and forth between the JavaScript variables and the user interface. Further, this often involves managing the user interface, such as adding new elements as new data is added.

However, often people perform extra work that isn't necessary. In addition to the extra time, such work usually means writing extra JavaScript code, which opens up room for more bugs. It turns out that there are several JavaScript libraries that are well written, heavily tested, and do a fine job of simplifying what I'm describing here.

One such library that I personally like is called Knockout, which you can find at knockoutjs.com. Other libraries work well, too; I just find this one to be more suited to my tastes. In this tutorial I'll show you how to get up and running with it.

A basic model

First let's build the basic data structure. I prefer to start there, with the data modeling. For this example we'll create a simple array that holds information about US presidents. Each item in the array will have a first name, a last name, and a number representing the order of the president, with George Washington being 1:

{ ...

Are you using jQuery? If so, they have an example that uses the jQueryUI autocomplete and does basically what you're describing: http://jqueryui.com/autocomplete/#multiple-remote

That's the error I'm seeing. But it looks like when you call FB.init, you're not passing in your app id:

FB.init({channelURL: 'http://www.daniweb.com/js/fb_channel.html',
    status: true, cookie: true, xfbml: true});

There's supposed to be an appId member in the object you're passing to the init function.

Your code almost worked for me, except I had to change line 9 to remove the moveFromTop animation. After that fix, it completely worked:

$(".navigation li a").click(function() {
    var currentId = $(this).attr("href");
    $('.current').removeClass('pt-page-moveFromTop').addClass('pt-page-moveToLeftFade').removeClass('current');
    $(currentId).addClass('pt-page-moveFromTop').addClass('current');
});

Dani, did you get this worked out? I'm not seeing this error. I'm using chrome, but I am seeing a couple other FB errors.

Hi! The problem is your overflow:hidden is hiding it. Get rid of both of those (lines 38 and 53 of the CSS file). But then your layout will be thrown off, so add a min-height:83px to your body > header. Then it will work. :-)

Yeah, as Pritaes said, use $.ajax and add the option cache:false. What jQuery does in this case is adds a random, unused number on the end of the query string. That effectively changes the URL, and as such the browser performs the request without caching. Something like this: $.ajax({url: 'url', cache: false, success:function(data) { console.log(data); } })

A minor update to the 1.6 version of jQuery was just released today. After a big outcry of version 1.6's changes to the way properties work, the jQuery team quickly released version 1.6.1 to make the new techniques more compatible with the older functionality, hopefully preventing sites from breaking. The release also fixed some bugs, as did version 1.6.2.

And now 1.6.3 also fixes several bugs, along with one change that some people will find disappointing: They dropped support for the requestAnimationFrame API. When 1.6 came out, support for requestAnimationFrame was added to allow for smoother animation. However, requestAnimationFrame itself has some issues, and as a result it didn't carry forward very well into jQuery. People were reporting problems with the way some animation would wait to occur, and then would run through the whole sequence at an extremely fast speed. (They called it a wormhole.) So the jQuery team decided the jQuery world would have to wait, and they completely dropped requestAnimationFrame from jQuery. They're hoping they can re-introduce it after they get the kinks worked out. (Of course, requestAnimationFrame is still there, just not a part of jQuery, so you can still use it yourself.)

In addition, there are a few minor fixes. There's a security fix to help prevent script injection. When you precede a selector with a # (which is used for specifying IDs), the jQuery library won't allow HTML tags to be in the selector. The whole list of bug fixes is pretty long for ...

People who know me know that Python has always been one of my favorite languages. And over the years, I've been pleased with the array of development tools that have been created for it, including the different IDEs.

I also do a lot of work in .NET, primarily with C#. And although I once wrote a raving review of the .NET implementation of python called IronPython, truth be told, I never use IronPython anymore. Not at all. In the past, oh maybe four years, I've created a grand total of two IronPython programs, each consisting of maybe three lines of code, just to try it out. As such, I've had little use for the IronPython tools for Visual Studio, which is a tool that lets you develop and debug IronPython code from within Visual Studio. Instead, when I use python, it's the original python, called CPython (because it's written in C), that I use. And when I want to target .NET, I use C#.

And so while the IronPython tools for Visual Studio have sat idle on my computer, I'm certainly open to a new tool put out by a team at Microsoft called Python Tools for Visual Studio. Why? Because it supports CPython, not just IronPython. The tool is free and open source, and it works in any of the non-free versions of Visual Studio, or with the free, standalone Visual Studio Shell. Let's take it for a test drive.

[B]Trying Out Python Tools For Visual Studio[/B]

First, in ...

Gribouillis commented: very nice review +13

Every year or so for the past couple of decades I've seen new products appear that claim to let you create software without having to know how to code. And every time the next one comes out, I roll my eyes, because they always fail to deliver as promised.

Usually the concept is the same: You use a tool to design your data, and some other tool to draw out the screens. Then you get a program. The program automatically gets the basic database functionality: A data browser, a data entry form, a search form. But the problem is the moment you want to take the app to the next level and add more sophisticated features, you hit a roadblock. I've seen this all too many times, from tools that claim to be for non-programmers, to more sophisticated tools that claim to be RAD (Rapid Application Design).

Last week, Microsoft released yet another product into this space. It's called Lightswitch, and it actually runs inside Visual Studio. When I heard about it, I downloaded it, installed it, tried a couple quick tests, and was tempted to write a three-word review: This product sucks.

But then I started using it more, trying out more things. And I became a bit more intrigued. Now I have to be honest: My ego really wants to hate this thing. I really want to say that this thing is a joke and will bomb. But to be totally honest, it's actually proving to be pretty ...

A couple weeks ago, Microsoft Research made available a project that had been under development for a while called Debugger Canvas. This is a visual tool for debugging applications where your functions appear as bubbles, similar to a database diagram or UML diagram. It only works on Visual Studio 2010 Ultimate due to the fact that it uses some internal features that are only included in the Ultimate edition.

Because Debugger Canvas is a project of Microsoft Research, it's not "official" in that it's not actually a part of Visual Studio, nor is it an official, supported Microsoft product. And it contains bugs. It's the culmination of research and development, and is a prototype of sorts. It's buggy, and it doesn't quite do everything you might want. But nevertheless, it's pretty cool and you'll want to try it out. (And there's a good possibility it'll be part of a future version of Visual Studio. Several projects in Microsoft Research have become actual, official Microsoft products. Perhaps the biggest one right now is the Kinect.)

Normally when I do a product review, I try to give about 3-5 screen shots, because more than that gets a little cumbersome. But this time I'm going to break that rule, and instead go with the old saying that a picture is worth a thousand words.

To get going, I created a short console program with a class, a derived class, and a main that creates an instance of the derived class. I set a ...

Thanks, Abe, for the correction. So the price I found included support. I'll have the editors at DaniWeb put in a correction to the article. (To others reading this, if you check the box on the page that Abe provided that says "Purchase Licenses & Support Separately" then you can see the 329 price.)

Thanks!
Jeff

Back around 2004 and 2005, I had embarked on a web project that included the ability for my users to draw on a web page—or at least, that was one of the requirements. At the time, most of my web development had been server-side, with very little JavaScript. Long story short, I ended up shelving the project—not because the project wasn’t a good idea (it was a project planning and collaboration tool), but because the browsers simply weren’t up to it. I explored numerous libraries for drawing on the browsers, but talk about a major headache. The reason for the trouble was simple: Some browsers didn’t include any drawing support and instead required a plugin, and other browsers had built-in support but there was no common standard. Firefox used SVG, but to use SVG in IE, you needed a plugin. But the only decent plugin was created by Macromedia, but they got bought by Adobe, and they shut down the project. Instead, with IE, you had to use Microsoft’s own technology, VML.

To this day, it astounds me that Microsoft refused to include support for SVG in their earlier browsers and instead tried to embrace their own proprietary technology (which is actually nothing unusual for them.) And I suppose Adobe might have seen SVG as a threat to Flash, which they also acquired when they bought Macromedia, and perhaps that’s why they shelved the SVG plugin. But SVG was—and still is—an excellent technology dating back to 2001. Either way, SVG ...

Yes, good one! For the other people reading this thread who might be new to jQuery, what Airshow is saying is absolutely correct. When you call $() (which is shorthand for jQuery()) you get back a single object. That single object contains a list of references to elements that matched your selector. So, for example, if you call:

var x = $('div')

you'll get back what appears to be a list of all the divs in your document. In fact, what you're actually getting back is a single jQuery object that contains a list. That list holds references to your div elements, and that list might have zero items, one item, or many items depending on your document. Or if you call

var x = $('.MyClass')

then you'll get back what appears to be a list of all the elements in your document that have the class MyClass. (The dot in '.MyClass' means class.) But regardless of how many elements you have, you're actually always getting back a single jQuery object. The reason is that you can do further operations like this:

$('.MyClass').click(function() {
});

[I]Conceptually[/I], this calls the click function on each element that you get back, assigning the passed-in function as a click handler for each element. But in reality, you're calling the click function on the single jQuery object you get back: The $('.MyClass') call returns a single object, and that object has a member function called click. You're calling click on that single object, and that ...