Daily Archives

Articles indexed Thursday April 29 2010

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

  • vs2010 asp.net : Procedure or function expects parameter which was not supplied.

    - by dotnet-practitioner
    I have googled for this issue but listed solutions are not working for me... I get the following error message: Procedure or function 'ContactHide' expects parameter '@ContactID', which was not supplied. Here is my setup..What am I missing? Please help? Debugger shows that I am supplying ContactID correctly in my C# code behind code. <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:MYDBConnectionString1 %>" UpdateCommand="ContactHide" UpdateCommandType="StoredProcedure" > int contactid= Convert.ToInt32(e.CommandArgument); SqlDataSource2.UpdateParameters.Add("@ContactID", System.Data.DbType.Int32, "1"); SqlDataSource2.UpdateParameters["@ContactID"].DefaultValue = contactid.ToString(); SqlDataSource2.Update(); ALTER PROCEDURE dbo.ContactHide @ContactID int /* ( @parameter1 int = 5, @parameter2 datatype OUTPUT ) */ AS Update Contacts set Visible = 0 where ContactID = isnull(@ContactID,-1) /* SET NOCOUNT ON */ RETURN

    Read the article

  • What is jasper report's algorithm for using a data source?

    - by spderosso
    Hi, I have created my custom data source by implementing the interface JRDataSource. This interface looks like this: public interface JRDataSource { /** * Tries to position the cursor on the next element in the data source. * @return true if there is a next record, false otherwise * @throws JRException if any error occurs while trying to move to the next element */ public boolean next() throws JRException; /** * Gets the field value for the current position. * @return an object containing the field value. The object type must be the field object type. */ public Object getFieldValue(JRField jrField) throws JRException; } My question is the following: In what way does jasper report call this functions for obtaining the fields in the .jrxml. E.g: if( next() )){ call getFieldValue for every field present in the page header while( next() ){ call getFieldValue for every field present in detail part } call getFieldValue for every field present the footer } The previous is just an example, experimentally in fact I found out that it is actually not like that. So my question arised. Thanks!

    Read the article

  • Entity Frameworks 4 - Changing the model does not update the T4 self tracking template files

    - by Darren
    I am using self tracking entities and have moved the entity classes to another assembly by using 'Add as link' to point to the TT file as mentioned here. Now though, when I update the model (for instance change a property name) the template is not automatically run and so the entity class does not get updated. I can of course manually run the template to get the updates, but it would be easier if it ran automatically in the way it did before I moved the classes. Is there any way to achieve this? Darren.

    Read the article

  • optimal memory layout for read-only/write memory segments.

    - by aaa
    hello. Suppose I have two memory segments (equal size each, approximately 1kb in size) , one is read-only (after initialization), and other is read/write. what is the best layout in memory for such segments in terms of memory performance? one allocation, contiguous segments or two allocations (in general not contiguous). my primary architecture is linux Intel 64-bit. my feeling is former (cache friendlier) case is better. is there circumstances, where second layout is preferred? Thanks

    Read the article

  • Implement looped movement animation with tap to cancel

    - by Nader
    Hi All; My app is based around a grid and an image that moves within a grid that is contained within a scrollview. I have an imageview that I am animating from one cell to another in time with a slow finger movement and recentering the scrollview. That is rather straight forward. I have also implement the ability to detect a swipe and therefore move the image all the way to the end of the grid and the uiscrollview recentering. I have even implemented the ability to detect a subsequent tap and freeze the swiped movement. The issue with the swipe movement is that the UIScrollView will scroll all the way to the end before the Image reaches the end and so I have to wait for the image to arrive. Also, when I freeze the movement of the image, I have to re-align the image to a cell (which I can do). I have come to the realization that I have to animate the image one cell at a time for swipes and recentering the uiscrollview before moving the image to the next cell. I have attempted to implement this but I cannot come up with a solution that works or works properly. Can anyone suggest how I go about implementing this? Even if you are able to put up code from a different example or sudo code, it would help a lot as I cannot workout how this should be done, should I be using selectors, a listener in delegates, I just simply lack the experience to solve this design pattern. Here is some code: Note that the sprite is an UIImageView - (void)animateViewToPosition:(SpriteView *)sprite Position:(CGPoint)pos Duration:(CFTimeInterval)duration{ CGMutablePathRef traversePath = CGPathCreateMutable(); CGPathMoveToPoint(traversePath, NULL, sprite.center.x, sprite.center.y); CGPathAddLineToPoint(traversePath, NULL, pos.x, pos.y); CAKeyframeAnimation *traverseAnimation = [CAKeyframeAnimation animationWithKeyPath:kAnimatePosition]; traverseAnimation.duration = duration; traverseAnimation.removedOnCompletion = YES; traverseAnimation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionLinear]; traverseAnimation.delegate = sprite; traverseAnimation.path = traversePath; CGPathRelease(traversePath); [sprite.layer addAnimation:traverseAnimation forKey:kAnimatePosition]; sprite.center = pos;

    Read the article

  • Using STARTUPINFOEX in CreateProcess

    - by Vineel Kumar Reddy
    Many places I saw that we can use startupinfoex structure in CreateProcess function. But when I checked the signature is only allowing startupinfo structure. Can anybody please give a snippet how startupinfoex can be used with createprocess function. Thanks in advance....

    Read the article

  • Removing active class and adding it to a sibling

    - by Kyle
    Currently, I have a jQuery Cycle plugin that allows the image to scroll. With it's callback I am calling this function function onAfterVideoScroll() { $('.myRemote.active').removeClass("active").next().addClass("active"); } This SHOULD be removing the current class from another set of links, and adding the class to the it's next sibling. This is to keep whichever image is showing it's button predecessor will be active so the user can tell which button is currently showing on the slideshow. If this makes sense, please let me know why it will remove the active class but it never gives the sibling the active class. Thanks!

    Read the article

  • Ruby XMLParsing Exception

    - by Rajesh
    I get a ParseException every time I try to parse a http get_response data in Ruby. The Exception is because of the presence of '&' in the data. How do I solve this? Illegal character '&' in raw string (REXML::ParseException)

    Read the article

  • WPF command/click argument

    - by Joel Barsotti
    So I have a background in ASP.NET where a button could have a click handler or a command handler and then a command argument. That pattern was great for when you had a bunch of buttons that basically needed to execute the same block of code with only a slightly different argument. Is there a collary in WPF? From what I've seen of the Command in WPF is that it revolves around an action that is independent of the control that invokes it (and still doesn't provide a way to provide an argument). Which is not really what I need.

    Read the article

  • Programmatically printing git revision and checking for uncommitted changes

    - by Andrew Grimm
    To ensure that my scientific analysis is reproducible, I'd like to programmatically check if there are any modifications to the code base that aren't checked in, and if not, print out what commit is being used. For example, if there are uncommitted changes, it should output Warning: uncommitted changes made. This output may not be reproducible. Else, produce Current commit: d27ec73cf2f1df89cbccd41494f579e066bad6fe Ideally, it should use "plumbing", not "porcelain".

    Read the article

  • Interview question: Develop an application that can display trail period expires after 30 days witho

    - by Algorist
    Hi, I saw this question in a forum about how an application can be developed that can keep track of the installation date and show trail period expired after 30 days of usage. The only constraint is not to use the external storage of any kind. Question: How to achieve this? Thanks Bala --Edit I think its easy to figure out the place to insert a question work. Anyway, I will write the question clearly. "external storage" means don't use any kind of storage like file, registry, network or anything. You only have your program.

    Read the article

  • Hosting 2 Sites Under 1 DiscountASP.Net Hosting Account

    - by Gav
    I've currently got an ASP.Net site hosted with DiscountASP.Net what I would like to do now is put a second site in a subdirectory of this original site and register a new domain to point at the subfolder, so to the end user its 2 completely seperate sites. I've asked DiscountASP support if they could do this and they just say they dont support it and wont help. If I registered the second domain with someone like 123-reg is it possible to make that domain point to a subdirectory in my main site? If not I may have to put some sort of redirect on my route index page that sends you to the right page based on the URL you requested but I would really rather not have to go there. I don't want to buy an additional account as the second site is just a bit of a side project that may well go no where.

    Read the article

  • AppArmor Profile for PowerDNS

    - by Cory J
    I am currently working on a new authoritative nameserver using powerdns on Ubuntu 8.04 LTS. I'd like to have AppArmor protecting this service like it did with bind, but when I look in /etc/apparmor.d/, there was no AppArmor profile for this service installed by default. Any experienced pdns admins know what all files pdns accesses, so I can define a profile? Or better yet, does anyone HAVE a profile for pdns? Many thanks for any suggestions.

    Read the article

  • What's the correct way to stop a background process on Mac OS X?

    - by mcsheffrey
    I have an application with 2 components: a desktop application that users interact with, and a background process that can be enabled from the desktop application. Once the background process is enabled, it will run as a user launch agent independently of the desktop app. However, what I'm wondering is what to do when the user disables the background process. At this point I want to stop the background process but I'm not sure what the best approach is. The 3 options that I see are: Use the 'kill' command. Direct, but not reliable and just seems somewhat "wrong". Use an NSMachPort to send an exit request from the desktop app to the background process. This is the best approach I've thought of but I've run into an implementation problem (I'll be posting this in a separate query) and I'd like to be sure that the approach is right before going much further. Something else??? Thank you in advance for any help/insight that you can offer.

    Read the article

  • Implement password recovery best practice

    - by Enrique
    Hello I want to to implement password recovery in my web application. I'd like to avoid using secret questions. I could just send the password by e-mail but I think it would be risky. Maybe I could generate a new temporary random password and send it by e-mail but I think it is as risky as the above point. Can I send a url by e-mail for example http://mysite.com/token=xxxx where xxxx is a random token associated with the user. So when the user navigates to that url he/she can reset the password. Any ideas?

    Read the article

  • Finding parents where child collection does not contain an item with a specific property value

    - by Colin Bowern
    I am trying to get a list of parents where the child collection does not contain an item of a specific type. The LINQ equivalent would be something like: dataset.Where(x => x.Items.FirstOrDefault(y => y.Type.Code == "ABC") == null) The object model is Parent Child (Items) Type Code If Parent is my aggregate root, how would I model this in NHibernate criteria/query? Here's my first attempt: var results = session.CreateCriteria<Parent>() .CreateCriteria("Items") .CreateCriteria("Type") .Add(Restrictions.Not(Restrictions.Eq("Code", "ABC"))) .SetResultTransformer(Transformers.DistinctRootEntity) .List<Parent>(); This doesn't seem to return the right entities - it just returns them all.

    Read the article

  • Why is my simple recusive method's final return value always off by 1?

    - by FrankTheTank
    I'm attempting to create a text-based version of this game: http://www.cse.nd.edu/java/SameGame.html Here is the code I have so far: #include <iostream> #include <vector> #include <ctime> class Clickomania { public: Clickomania(); std::vector<std::vector<int> > board; int move(int, int); bool isSolved(); void print(); void pushDown(); bool isValid(); }; Clickomania::Clickomania() : board(12, std::vector<int>(8,0)) { srand((unsigned)time(0)); for(int i = 0; i < 12; i++) { for(int j = 0; j < 8; j++) { int color = (rand() % 3) + 1; board[i][j] = color; } } } void Clickomania::pushDown() { for(int i = 0; i < 8; i++) { for(int j = 0; j < 12; j++) { if (board[j][i] == 0) { for(int k = j; k > 0; k--) { board[k][i] = board[k-1][i]; } board[0][i] = 0; } } } } int Clickomania::move(int row, int col) { bool match = false; int totalMatches = 0; if (row > 12 || row < 0 || col > 8 || col < 0) { return 0; } int currentColor = board[row][col]; board[row][col] = 0; if ((row + 1) < 12) { if (board[row+1][col] == currentColor) { match = true; totalMatches++; totalMatches += move(row+1, col); } } if ((row - 1) >= 0) { if (board[row-1][col] == currentColor) { match = true; totalMatches++; totalMatches += move(row-1, col); } } if ((col + 1) < 8) { if (board[row][col+1] == currentColor) { match = true; totalMatches++; totalMatches += move(row, col+1); } } if ((col - 1) >= 0) { if (board[row][col-1] == currentColor) { match = true; totalMatches++; totalMatches += move(row, col-1); } } return totalMatches; } void Clickomania::print() { for(int i = 0; i < 12; i++) { for(int j = 0; j < 8; j++) { std::cout << board[i][j]; } std::cout << "\n"; } } int main() { Clickomania game; game.print(); int row; int col; std::cout << "Enter row: "; std::cin >> row; std::cout << "Enter col: "; std::cin >> col; int numDestroyed = game.move(row,col); game.print(); std::cout << "Destroyed: " << numDestroyed << "\n"; } The method that is giving me trouble is my "move" method. This method, given a pair of coordinates, should delete all the squares at that coordinate with the same number and likewise with all the squares with the same number connected to it. If you play the link I gave above you'll see how the deletion works on a click. int Clickomania::move(int row, int col) { bool match = false; int totalMatches = 0; if (row > 12 || row < 0 || col > 8 || col < 0) { return 0; } int currentColor = board[row][col]; board[row][col] = 0; if ((row + 1) < 12) { if (board[row+1][col] == currentColor) { match = true; totalMatches++; totalMatches += move(row+1, col); } } if ((row - 1) >= 0) { if (board[row-1][col] == currentColor) { match = true; totalMatches++; totalMatches += move(row-1, col); } } if ((col + 1) < 8) { if (board[row][col+1] == currentColor) { match = true; totalMatches++; totalMatches += move(row, col+1); } } if ((col - 1) >= 0) { if (board[row][col-1] == currentColor) { match = true; totalMatches++; totalMatches += move(row, col-1); } } return totalMatches; } My move() method above works fine, as in, it will delete the appropriate "blocks" and replace them with zeros. However, the number of destroyed (value returned) is always one off (too small). I believe this is because the first call of move() isn't being counted but I don't know how to differentiate between the first call or subsequent calls in that recursive method. How can I modify my move() method so it returns the correct number of destroyed blocks?

    Read the article

  • Problems setting up an ASP.NET MVC site on IIS7 w/ Nhibernate

    - by Brandon
    When deploying my published website to the host (Its a shared hosting plan) I get this error: [NullReferenceException: Object reference not set to an instance of an object.] System.Web.PipelineStepManager.ResumeSteps(Exception error) +929 System.Web.HttpApplication.BeginProcessRequestNotification(HttpContext context, AsyncCallback cb) +91 System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +508 I found this question which describes my problem, but I'm not initializing NHibernate in Application_Start, it is already being done in Init. The only other cause of this error I can find is that the Global.asax file is inheriting from a class other than HttpApplication, but I'm not doing that either. This is pretty much the Global.asax file protected void Application_Start() { AreaRegistration.RegisterAllAreas(); RegisterRoutes(RouteTable.Routes); } public override void Init() { base.Init(); if (_wasNHibernateInitialized) return; // Initialize NHibernate // Other setup like the StructureMap initialization } Is there any other reason why an ASP.NET MVC application would give this error when being deployed to IIS7?

    Read the article

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