void foo() {
struct Foo { .. };
std::vector<foo> vec; // why is this illegal?
}
I'm not returning foo to the outside world. It's just a temporary type that I use within the function.
I have a site that is mainly showing a paged list of content (articles, data element's, etc.), and I'm wondering about returning HTTP 404 when user navigates outside of the available list range.
Some sites just display "No results/Page number out of range" and some return additionally return HTTP 404 status.
What's your take on that, and why?
UPDATE
It's not and api response. This question is in regard to user viewed pages that among other things show a list/table in the main area.
I want to return StudentId to use elsewhere outside of the scope of the $.getJSON()
j.getJSON(url, data, function(result)
{
var studentId = result.Something;
});
//use studentId here
I would imagine this has to do with scoping, but it doesn't seem to work the same way c# does
I have a button (outside of a form) that redirects to another page using the onclick attribute that calls window.location to redirect the user to another page. This time I can't change the HTML. I am using Safari 4 for testing. How can I click a button that uses the onclick attribute and window.location to redirect using Safari 4 and Selenium RC PHPUnit Extension?
Here's my HTML:
<input type="button" onclick="window.location='/registrations/new'" value="Start a new registration" id="create">
In XCode I made a new run script build phase and want to write a script to create symbolic links.
Original file is present outside the project directory. I want to create symbolic link inside project directory "/PROJECT_DIR/Resources/Alias".
I don't know how to write a script in "Run Script build phase" window.
When I drag and drop between datagrids preventing default behaviour, the cursor's does not come out of the grid. The grid's scroll bars keep moving as i move the mouse.. Even if i click outside the grid the cursor still has control over the grid and keeps scrolling as i move the mouse over the screen up and down.. Please help
Hi,
I have a CustomGridViewControl that is on a UserControl, the UserControl is loaded outside of the Page_Init when a treeview in the page is clicked that changes the view, than on subsequent postbacks the UserControl is loaded in Page_Init.
The custom gridview is bound to a dataview that is dynamically retrieved.
Problem is that the OnDataBinding of the CustomGridView is firing before the OnLoad of the CustomGridView, which is causing me to not be able to get embedded resource urls.
Any suggestions?
Thanks!
I'm new to Python, so this is probably a simple scoping question. The following code in a Python file (module) is confusing me slightly:
if __name__ == '__main__':
x = 1
print x
In other languages I've worked in, this code would throw an exception, as the x variable is local to the if statement and should not exist outside of it. But this code executes, and prints 1. Can anyone explain this behavior? Are all variables declared in a module global/available to the entire module?
I am struggling with methods in JavaScript.
obj = function(){
this.getMail = function getMail (){
}
//Here I would like to run the get mail once but this.getMail() or getMail() wont work
}
var mail = new obj();
mail.getMail();
How do I make the method in a way that I can run it both inside the object and from the outside
Thanks
Hi All,
When designing a web application/web site, is there an accepted practice on when to open a link on a new window?
Currently, if the site being linked to is outside the domain (say Google.com), I am always launching it on a new window. If the page being linked is within the same domain, I open it on the current active window.
I've read somewhere the opening links on a new window explicitly is being frowned upon.
Thanks!
[http://jsfiddle.net/mhmBs/][1]
I tried using the method that he uses in a jquery validator plugin.. My error container is separated from the form, it is outside the form. When I use that method to validated that the user input at least one from 3 input text boxes. It validates the field, but the other items to be validated is ignored specially the items before 3 input text boxes.
Hi
I am unable to send emails to recipients who are outside our domain from outlook 2007. I am able to send email to the same domain. The error i am getting is
Your message did not reach some or all of the intended recipients.
Subject: test subject
Sent: 2/19/2010 7:44 PM
The following recipient(s) cannot be reached:
test, user on 2/19/2010 7:44 PM
553 sorry, that domain isn't in my list of allowed rcpthosts (#5.7.1)
PN: I am able to send the emails to any domain from webmail.
Is there a difference between declaring a static variable outside of a function and declaring a static variable inside a function?
Also, what's the difference between declaring a variable as static and just declaring an extern variable?
Maybe my question might seem a bit weird, but I have an activity in which, in one case , I have to move to another activity before it finishes loading the screen. My condition is in the onCreate method, which means when I encounter it, i get a "startActivity called from outside an activity context" error and the app just crashes...
But then, is there an easy way like a flag for the intent to make it work without having the activity context resolved?
thanks for any answer
to run a single file you can run in mysql
.\ filename
or you outside of mysql you can run
mysql < filename
I have a directory of sql files so I'm trying to run them all at once by using a wildcard
*.sql
but it doesn't work.
Any ideas?
What is the easiest method to generate an XSD schema from a 2005 SQL Server Database?
Would it be possible to generate one XSD schema for the entire Database (~100 tables)?
I searched online and found a SQL example that generates one XSD for the one table:
DECLARE @schema xml
SET @schema = (SELECT * FROM MyTableName FOR XML AUTO, ELEMENTS, XMLSCHEMA('MyTableNameSchema'))
SELECT @schema
Outside of SQL Server, is there a third party tool that could generate the XSD file from the 2005 Database?
Hello, i am trying to solve this problem:
i have a tab interface build with jquery.tools, more exactly i used the ajax tab to load external html files into div. you can see the example here: http://flowplayer.org/tools/demos/tabs/ajax.html
i am trying to use jquery to animated the elements loaded by ajax, do you know if and how is it possible?
i am trying both loading scripts outside, in the main page, or in the loaded page.
thanks a lot
Hi!
I am writing a custom component (derived from a relative layout) which has to show a dialog,
Is there a way to do this using callbacks like oncreatedialog or onpreparedialog?
if not: if i have to create the dialog outside oncreatedialog, i have to "attach it to an Activity with setOwnerActivity(Activity)". How can the custom component access the activity it is used in, when it is used in the activity's xml-layout and not created from code?
I often program outside away from power, how can I extend the battery life in my laptop to let me program longer without having to "return to base"
Specifically for a MacBook Pro.
Hello,
I have a password hash that is stored in a table and is put there by the following coldfusion script-
#Hash(EnCrypt(UCase(GetPass.username),EnCode))#
I am trying to add some outside functionality within a c# application. I would like to be able to take advantage of the data that already exists so that I can authenticate users. Does anyone know how I can replicate the above coldfusion code in c#?
Thanks for any thoughts.
It is possible to use Java class files which includes annotations that are not present at runtime?
Example: I want to write a class with the JPA @Embeddable annotation, which would be present at compile time (maven scope: "provided"). But the annoatation definition could be absent at runtime, if the class is used outside a JPA application.
I have an ASP.NET website hosted at home on IIS. Outside my home network i can see the website, but inside the network it gives me a 404 error. I can browse the site as localhost. It seems like a DNS problem, just not sure how to fix it.
Hi all,
I'm new to Objective C and Cocoa - and I'm having a really hard time changing the title on one of my windows. Usually I would press the outside of the window, and then in Window Attributes Inspector there's the title area - however for this particular project it has a name in that box and when I run the application, the title bar still says untitled. Am I missing something? I haven't binded the title to a data source or anything.
This works fine:
NSString *myVariable;
- (IBAction) doFirstAction {
myVariable = @"123456789";
}
- (IBAction) doSecondAction {
NSLog(@"%@",myVariable);
}
However, if I do this (substituting the @"123456789" for some code which returns the same value ie "123456789") I cannot access the value in doSecondAction.
NSString *myVariable;
- (IBAction) doFirstAction {
myVariable = [imageNode getAttributeName:@"value"];
}
- (IBAction) doSecondAction {
NSLog(@"%@",myVariable);
}
Any clue as to why I cant access myVariable outside of doFirstAction?
Hi ,
A Context Menu automatically closes when the user clicks outside of it.
Is there a way to stop it from closing ? I tried setting the StaysOpen property to true but failed to get the desired result.
Thanks for any help!