jeffcogswell 175 Light Poster Featured Poster

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.)

jeffcogswell 175 Light Poster Featured Poster

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.

jeffcogswell 175 Light Poster Featured Poster

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

jeffcogswell 175 Light Poster Featured Poster

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.

jeffcogswell 175 Light Poster Featured Poster

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.

jeffcogswell 175 Light Poster Featured Poster

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.

jeffcogswell 175 Light Poster Featured Poster

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.

jeffcogswell 175 Light Poster Featured Poster

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

jeffcogswell 175 Light Poster Featured Poster

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

jeffcogswell 175 Light Poster Featured Poster

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');
});
jeffcogswell 175 Light Poster Featured Poster

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. :-)

jeffcogswell 175 Light Poster Featured Poster

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); } })