Search Results

Search found 2396 results on 96 pages for 'alex nauda'.

Page 56/96 | < Previous Page | 52 53 54 55 56 57 58 59 60 61 62 63  | Next Page >

  • ASP.NET MVC 2 - ViewData empty after POST

    - by Alex
    I don't really know where to look for an error... the situation: I have an ASPX view which contains a form and a few input's, and when I click the submit button everything is POST'ed to one of my ASP.NET MVC actions. When I set a breakpoint there, it is hit correctly. When I use FireBug to see what is sent to the action, I correctly see data1=abc&data2=something&data3=1234. However, nothing is arriving in my action method. ViewData is empty, there is no ViewData["data1"] or anything else that would show that data arrived. How can this be? Where can I start looking for the error?

    Read the article

  • Getting latest Subsonic builds

    - by Alex Yakunin
    I need the latest Subsonic build or build it by my own. Subsonic project web site shows the latest available version is Subsonic v3.0.0.3 released at July 15, 2009. Questions: Are there any later builds - e.g. maintained by community members? If so, how can I get the latest one? In worst case I'm ready to get the latest source code and try to build it by my own. Are there any instructions for this? Please note, that I'm not interested in almost 1 year old builds - I need a build based on the latest code for tests (LINQ, performance), ideally - compiled for .NET 4.0.

    Read the article

  • Is there anything wrong with my Factory class?

    - by Alex
    class PieceFactory { @SuppressWarnings("rawtypes") public Piece createPiece(String pieceType) throws Throwable{ Class pieceClass = Class.forName(pieceType); Piece piece = (Piece) pieceClass.newInstance(); return piece; } } I'm not all used to handling exceptions yet therefore I'm just throwing them, but everywhere I use a method that uses this factory it tells me I have to throw exceptions like throwable. For example, in one of my classes I have a method that instantiates a lot of objects using the method that uses the factory. I can use the method in that class by just throwing the exception, however it won't work if I try to pass a reference to that class to another class and then use the method from there. Then it forces me to try catch the exception. I probably don't need a factory but it seemed interesting and I'd like to try to use patterns. The reason I created the factory was that I have 6 subclasses of Piece and I wan't to use a method to instantiate them by passing the type of subclass I want as an argument to the method.

    Read the article

  • Catch Multiple Custom Exceptions? - C++

    - by Alex
    Hi all, I'm a student in my first C++ programming class, and I'm working on a project where we have to create multiple custom exception classes, and then in one of our event handlers, use a try/catch block to handle them appropriately. My question is: How do I catch my multiple custom exceptions in my try/catch block? GetMessage() is a custom method in my exception classes that returns the exception explanation as a std::string. Below I've included all the relevant code from my project. Thanks for your help! try/catch block // This is in one of my event handlers, newEnd is a wxTextCtrl try { first.ValidateData(); newEndT = first.ComputeEndTime(); *newEnd << newEndT; } catch (// don't know what do to here) { wxMessageBox(_(e.GetMessage()), _("Something Went Wrong!"), wxOK | wxICON_INFORMATION, this);; } ValidateData() Method void Time::ValidateData() { int startHours, startMins, endHours, endMins; startHours = startTime / MINUTES_TO_HOURS; startMins = startTime % MINUTES_TO_HOURS; endHours = endTime / MINUTES_TO_HOURS; endMins = endTime % MINUTES_TO_HOURS; if (!(startHours <= HOURS_MAX && startHours >= HOURS_MIN)) throw new HourOutOfRangeException("Beginning Time Hour Out of Range!"); if (!(endHours <= HOURS_MAX && endHours >= HOURS_MIN)) throw new HourOutOfRangeException("Ending Time Hour Out of Range!"); if (!(startMins <= MINUTE_MAX && startMins >= MINUTE_MIN)) throw new MinuteOutOfRangeException("Starting Time Minute Out of Range!"); if (!(endMins <= MINUTE_MAX && endMins >= MINUTE_MIN)) throw new MinuteOutOfRangeException("Ending Time Minute Out of Range!"); if(!(timeDifference <= P_MAX && timeDifference >= P_MIN)) throw new PercentageOutOfRangeException("Percentage Change Out of Range!"); if (!(startTime < endTime)) throw new StartEndException("Start Time Cannot Be Less Than End Time!"); } Just one of my custom exception classes, the others have the same structure as this one class HourOutOfRangeException { public: // param constructor // initializes message to passed paramater // preconditions - param will be a string // postconditions - message will be initialized // params a string // no return type HourOutOfRangeException(string pMessage) : message(pMessage) {} // GetMessage is getter for var message // params none // preconditions - none // postconditions - none // returns string string GetMessage() { return message; } // destructor ~HourOutOfRangeException() {} private: string message; };

    Read the article

  • I am currently serving my static files in Django. How do I use Apache2 to do this?

    - by alex
    (r'^media/(?P<path>.*)$', 'django.views.static.serve',{'document_root': settings.MEDIA_ROOT}), As you can see, I have a directory called "media" under my Django project. I would like to delete this line in my urls.py and instead us Apache to serve my static files. What do I do to my Apache configs (which files do I change) in order to do this? By the way, I installed Apache2 like normal: sudo aptitude install apache2

    Read the article

  • Emails sometimes get scrambled

    - by Alex
    Folks, I have a PHP-based based site (using the QCubed framework); as a part of the site, I have a daemon that's sending out several thousand emails a day (no i'm not a spammer, everything is opt-in :)). Emails are sent through a custom framework component; that component serves as an SMTP client. I'm using a paid SMTP gateway from DNSExit.com to get the emails actually delivered. Those emails are simple HTML-based emails; they really have just simple links inside. My issue is that these links sometimes (not consistently!) get scrambled during transition. Tags somehow get mixed up, and some links are non-functional in the email. The issue happens on a small percentage of all sent emails; it is not consistent (i.e. the same exact source message HTML may or may not cause the scrambling in transition). Have any of you seen this? Any thoughts on how to troubleshoot?

    Read the article

  • MySQL LEFT JOIN error

    - by Alex
    Hello, I've got some SQL that used to work with an older MySQL version, but after upgrading to a newer MySQL 5 version, I'm getting an error. Here's the SQL: SELECT portfolio.*, projects.*, types.* FROM projects, types LEFT JOIN portfolio ON portfolio.pfProjectID = projects.projectID WHERE projects.projectType = types.typeID AND types.typeID = #URL.a# ORDER BY types.typeSort, projects.projectPriority ASC and the new error I'm receiving: Unknown column 'projects.projectID' in 'on clause' How can I convert this to compatible SQL for the newer MySQL version? Thanks very much!

    Read the article

  • Simple Constructor With Initializer List? - C++

    - by Alex
    Hi all, below I've included my h file, and my problem is that the compiler is not liking my simple exception class's constructor's with initializer lists. It also is saying that string is undeclared identifier, even though I have #include <string> at the top of the h file. Do you see something I am doing wrong? For further explanation, this is one of my domain classes that I'm integrating into a wxWidgets GUI application on Windows. Thanks! Time.h #pragma once #include <string> #include <iostream> // global constants for use in calculation const int HOURS_TO_MINUTES = 60; const int MINUTES_TO_HOURS = 100; class Time { public: // default Time class constructor // initializes all vars to default values Time(void); // ComputeEndTime computes the new delivery end time // params - none // preconditions - vars will be error-free // postconditions - the correct end time will be returned as an int // returns an int int ComputeEndTime(); // GetStartTime is the getter for var startTime // params - none // returns an int int GetStartTime() { return startTime; } // GetEndTime is the getter for var endTime // params - none // returns an int int GetEndTime() { return endTime; } // GetTimeDiff is the getter for var timeDifference // params - none // returns a double double GetTimeDiff() { return timeDifference; } // SetStartTime is the setter for var startTime // params - an int // returns void void SetStartTime(int s) { startTime = s; } // SetEndTime is the setter for var endTime // params - an int // returns void void SetEndTime(int e) { endTime = e; } // SetTimeDiff is the setter for var timeDifference // params - a double // returns void void SetTimeDiff(double t) { timeDifference = t; } // destructor for Time class ~Time(void); private: int startTime; int endTime; double timeDifference; }; class HourOutOfRangeException { public: // param constructor // initializes message to passed paramater // preconditions - param will be a string // postconditions - message will be initialized // params a string // no return type HourOutOfRangeException(string pMessage) : message(pMessage) {} // GetMessage is getter for var message // params none // preconditions - none // postconditions - none // returns string string GetMessage() { return message; } // destructor ~HourOutOfRangeException() {} private: string message; }; class MinuteOutOfRangeException { public: // param constructor // initializes message to passed paramater // preconditions - param will be a string // postconditions - message will be initialized // params a string // no return type MinuteOutOfRangeException(string pMessage) : message(pMessage) {} // GetMessage is getter for var message // params none // preconditions - none // postconditions - none // returns string string GetMessage() { return message; } // destructor ~MinuteOutOfRangeException() {} private: string message; }; class PercentageOutOfRangeException { public: // param constructor // initializes message to passed paramater // preconditions - param will be a string // postconditions - message will be initialized // params a string // no return type PercentageOutOfRangeException(string pMessage) : message(pMessage) {} // GetMessage is getter for var message // params none // preconditions - none // postconditions - none // returns string string GetMessage() { return message; } // destructor ~PercentageOutOfRangeException() {} private: string message; }; class StartEndException { public: // param constructor // initializes message to passed paramater // preconditions - param will be a string // postconditions - message will be initialized // params a string // no return type StartEndException(string pMessage) : message(pMessage) {} // GetMessage is getter for var message // params none // preconditions - none // postconditions - none // returns string string GetMessage() { return message; } // destructor ~StartEndException() {} private: string message; };

    Read the article

  • Limit URL Parameter Length in Web.Config

    - by Alex
    Is it possible to add some kind of restriction to the web.config to limit URL parameter length? I want to prevent people at the earliest possible point from submitting too large URL parameters so the server doesn't get taxed more than necessary in the event that somebody tries to "attack" it with large invalid URL parameters.

    Read the article

  • jQuery draggable leaving cloned html behind

    - by Alex Crooks
    I am using jQuery UI; Draggable http://jqueryui.com/demos/draggable invoked like this: $(document).ready(function(){ $("#side_bar").sortable({ revert: true }); $(".draggable").draggable({ containment: 'parent', hascroll: true, handle: 'div.box_header', scrollSensitivity: 100, scrollSpeed: 100, axis: 'y', connectToSortable: '#side_bar', helper: 'clone', opacity: 0.35 }); }); You can see the html structure on http://www.sarsclan.co.uk (right side bar area). It seems to create a transparant clone as your dragging, but when you drop it puts the draggable div in the right place, but leaves the original div in it's place and just appends the dom with a clone of that original div in its new place.

    Read the article

  • Paging in ActiveRecord

    - by Alex
    Does CastleProject ActiveRecord support paging? I need to load only data which is now seen on the screen. If I use [HasMany], it will be loaded as a whole either immediately or at the first call (if lazy attribute is true). However I only need something like first 100 records (then maybe 100 next records). Another question is how to load only 100 items. If the collection is too big, memory can reach its limit if we constantly load more and more items.

    Read the article

  • Linq ChangeConflictException (ASP.NET MVC) - occurs when submitting DataContext changes

    - by Alex
    System.Data.Linq.ChangeConflictException: 2 of X updates failed. at System.Data.Linq.ChangeProcessor.SubmitChanges(ConflictMode failureMode) at System.Data.Linq.DataContext.SubmitChanges(ConflictMode failureMode) at PROJECT.Controllers.HomeController.ClickProc(Int32 id, String code, String n) This is what I get very often. This action is done thousands of times a day, and I get this exception about once every 5 seconds. From what I understand it happens when something changes in the database in the period between creating DataContext and updating it. Am I right? What's the problem here and how can I fix it?

    Read the article

  • Automated Java to Scala source code conversion?

    - by Alex R
    (Yes I know I can call Java code from Scala; but that is pointless; I want to DELETE the Java code, not keep it around and have to look at it and maintain it forever!) Are there any utilities out there to convert Java source to Scala source? I believe theoretically it should be possible to accomplish with minimal lossage. I have found this but it seems inactive, probably buggy/incomplete... http://sourceforge.net/projects/java2scala/ Any alternatives?

    Read the article

  • How can I use JSONP to download client-side javascript objects?

    - by Alex Mcp
    I'm trying to get client-side javascript objects saved as a file locally. I'm not sure if this is possible. The basic architecture is this: Ping an external API to get back a JSON object Work client-side with that object, and eventually have a "download me" link This link sends the data to my server, which processes it and sends it back with a mime type application/json, which (should) prompt the user to download the file locally. Right now here are my pieces: Server Side Code <?php $data = array('zero', 'one', 'two', 'testing the encoding'); $json = json_encode($data); //$json = json_encode($_GET['']); //eventually I'll encode their data, but I'm testing header("Content-type: application/json"); header('Content-Disposition: attachment; filename="backup.json"'); echo $_GET['callback'] . ' (' . $json . ');'; ?> Relevant Client Side Code $("#download").click(function(){ var json = JSON.stringify(collection); //serializes their object $.ajax({ type: "GET", url: "http://www.myURL.com/api.php?callback=?", //this is the above script dataType: "jsonp", contentType: 'jsonp', data: json, success: function(data){ console.log( "Data Received: " + data[3] ); } }); return false; }); Right now when I visit the api.php site with Firefox, it prompts a download of download.json and that results in this text file, as expected: (["zero","one","two","testing the encoding"]); And when I click #download to run the AJAX call, it logs in Firebug Data Received: testing the encoding which is almost what I'd expect. I'm receiving the JSON string and serializing it, which is great. I'm missing two things: The Actual Questions What do I need to do to get the same prompt-to-download behavior that I get when I visit the page in a browser (much simpler) How do I access, server-side, the json object being sent to the server to serialize it? I don't know what index it is in the GET array (silly, I know, but I've tried almost everything)

    Read the article

  • Why does a sub-class class of a class have to be static in order to initialize the sub-class in the

    - by Alex
    So, the question is more or less as I wrote. I understand that it's probably not clear at all so I'll give an example. I have class Tree and in it there is the class Node, and the empty constructor of Tree is written: public class RBTree { private RBNode head; public RBTree(RBNode head,RBTree leftT,RBTree rightT){ this.head=head; this.head.leftT.head.father = head; this.head.rightT.head.father = head; } public RBTree(RBNode head){ this(head,new RBTree(),new RBTree()); } public RBTree(){ this(new RBNode(),null,null); } public class RBNode{ private int value; private boolean isBlack; private RBNode father; private RBTree leftT; private RBTree rightT; } } Eclipse gives me the error: "No enclosing instance of type RBTree is available due to some intermediate constructor invocation" for the "new RBTree()" in the empty constructor. However, if I change the RBNode to be a static class, there is no problem. So why is it working when the class is static. BTW, I found an easy solution for the cunstructor: public RBTree(){ this.head = new RBNode(); } So, I have no idea what is the problem in the first piece of code.

    Read the article

  • IE7 not Caching CSS Image over SSL

    - by Alex
    Hello, I'm using the WebDevHelper toolbar for Internet Explorer to troubleshoot HTTP requests/roundtrips on my SSL site and noticed that IE re-downloads my CSS :hover images every time they are triggered. This causes a huge amount of roundtrips. How can I prevent this from happening? Edit: All static content is served with cache-control: public, so images, javascript etc. are cached in Firefox and Chrome. This problem is IE specific.

    Read the article

  • A textbox class only accept integers in Java

    - by alex
    I just want to do a textbox class onl accepts integers.. I have done something, but i think it's not enough. Can anyone help me, please? Thanks... import java.awt.TextField public class textbox extends TextField{ private int value; public textbox(){ super(); } public textbox(int value){ setDeger(value); } public int getValue() { return value; } public void setValue(int value) { this.value = value; } }

    Read the article

  • How to concat a string in Python

    - by alex
    query = "SELECT * FROM mytable WHERE time=%s", (mytime) Then, I want to add a limit %s to it. How can I do that without messing up the %s in mytime? Edit: I want to concat query2, which has "LIMIT %s, %s"

    Read the article

  • Android SDK: hello world does not run

    - by Alex
    I have installed Java x64, Eclipse Classic Judo x64 + ADT Pluggin. OS win 7 x64. I did installation everything according to the manual. Then created first application and launched it. Emulator was launched but hello world was not. I have not idea what doing wrong. Do anyone knows of such error and my problem as a whole? thx Console log: [2012-10-06 13:35:42 - test] ------------------------------ [2012-10-06 13:35:42 - test] Android Launch! [2012-10-06 13:35:42 - test] adb is running normally. [2012-10-06 13:35:42 - test] Performing com.example.test.MainActivity activity launch [2012-10-06 13:35:42 - test] Automatic Target Mode: launching new emulator with compatible AVD 'AVD_41' [2012-10-06 13:35:42 - test] Launching a new emulator with Virtual Device 'AVD_41' [2012-10-06 13:35:42 - Emulator] Failed to create Context 0x3005 [2012-10-06 13:35:42 - Emulator] emulator: WARNING: Could not initialize OpenglES emulation, using software renderer. [2012-10-06 13:35:42 - Emulator] WARNING: Data partition already in use. Changes will not persist! [2012-10-06 13:35:42 - Emulator] WARNING: SD Card image already in use: C:\Users\Zewisa\.android\avd\AVD_41.avd/sdcard.img [2012-10-06 13:35:42 - Emulator] WARNING: Cache partition already in use. Changes will not persist! [2012-10-06 13:35:42 - Emulator] could not get wglGetExtensionsStringARB [2012-10-06 13:35:42 - Emulator] could not get wglGetExtensionsStringARB [2012-10-06 13:35:42 - Emulator] could not get wglGetExtensionsStringARB [2012-10-06 13:35:42 - Emulator] could not get wglGetExtensionsStringARB [2012-10-06 13:35:42 - Emulator] could not get wglGetExtensionsStringARB [2012-10-06 13:35:42 - Emulator] could not get wglGetExtensionsStringARB [2012-10-06 13:35:42 - Emulator] could not get wglGetExtensionsStringARB [2012-10-06 13:35:42 - Emulator] could not get wglGetExtensionsStringARB [2012-10-06 13:35:42 - Emulator] emulator: warning: opening audio input failed [2012-10-06 13:35:42 - Emulator]

    Read the article

  • Add LINQ Auto-Generated Value Marker [Column(IsDbGenerated=true)] in Buddy Class

    - by Alex
    Hello, is it possible to decorate a field of a LINQ generated class with [Column(IsDbGenerated=true)] using a buddy class (which is linked to the LINQ class via [MetadataType(typeof(BuddyMetadata))]) ? My goal is to be able to clear and repopulate the LINQ ORM designer without having to set the "Auto Generate Value" property manually every time to re-establish the fact that certain columns are autogenerated. Thanks!

    Read the article

< Previous Page | 52 53 54 55 56 57 58 59 60 61 62 63  | Next Page >