Search Results

Search found 558 results on 23 pages for 'jeremy smyth'.

Page 13/23 | < Previous Page | 9 10 11 12 13 14 15 16 17 18 19 20  | Next Page >

  • Why use ASP.NET MVC 2 for REST services? Why not WCF?

    - by Jeremy McGee
    So I see that MVC 2 now supports [HttpPut] and [HttpDelete] as well as [HttpGet] and [HttpPost], making it possible to do a full RESTful Web service using it. I've been using the REST toolkit for WCF for a while and find it fairly powerful, but I'd be interested to find out what (if any) advantages there are using the MVC 2 approach. Links, war stories, or even pure hear-say are welcome.

    Read the article

  • How to -> Visual Studio 2010 Add In Manager

    - by Jeremy Thompson
    Hi, Sorry for such a simple question, but how do I use the Add-In Manager in VS2010? I want to add this "SmartPaster" addin: http://inedo.com/Downloads/SmartPaster.aspx or http://www.mediafire.com/?mzyjamytnlq What do I do with these 3 files to get them listed in the Add-In Manager dialog? SmartPaster2010.AddIn, SmartPaster2010.dll, SmartPaster2010.xml Edit: http://msdn.microsoft.com/en-us/library/19dax6cz.aspx says: "To install the add-in on another computer, the .addin file must be placed in a location where Visual Studio checks for add-ins. These locations are listed in the Options dialog box, in the Environment node, on the Add-in/Macros Security page." I went to Tools Options Environment Add-In/Macro Security, checked some paths put the AddIn files in a couple of these directoryies, restart VS2010 but still no luck!

    Read the article

  • Reference Error for property of Javascript Object

    - by Jeremy Petzold
    I have built an object in Javascript on the Google Apps Script engine and every time I run my script I get a reference error saying uName is not defined. Here is the relivant code: function DataSet() { this.uName = ""; this.dFeild = ""; this.qUrl = "http://api.bfbcs.com/api/pc?players="+uName+"&fields="+dFeilds; this.data = ""; this.dQuery = dQuery; this.execQuery = execQuery; According to all sources I have found, I should not need to use the keyword var, and when I do include that, it throws other errors. What could be going on? Thanks

    Read the article

  • Is there a way to convert a swf to an .abc file?

    - by Jeremy Ruppel
    I'm looking for a way, preferably a command-line utility, to pump out an .abc file for a compiled swf. I've looked into asc.jar, but so far it seems like it can only accept classes, not compiled swfs. Anybody know of a good way to do this? The end-goal of this process is to use Zwetan's RedTamarin project to run describeType on some specific classes inside a loaded swf, but there are complications with SecurityDomain preventing me from using Loader.loadBytes. If there's another good way to describe classes in the loaded swf via command-line, I'd be interested in that solution as well. Cheers, J

    Read the article

  • SQL for selecting only the last item from a versioned table

    - by Jeremy
    I have a table with the following structure: CREATE TABLE items ( id serial not null, title character varying(255), version_id integer DEFAULT 1, parent_id integer, CONSTRAINT items_pkey PRIMARY KEY (id) ) So the table contains rows that looks as so: id: 1, title: "Version 1", version_id: 1, parent_id: 1 id: 2, title: "Version 2", version_id: 2, parent_id: 1 id: 3, title: "Completely different record", version_id: 1, parent_id: 3 This is the SQL code I've got for selecting out all of the records with the most recent version ids: select * from items inner join ( select parent_id, max(version_id) as version_id from items group by parent_id) as vi on items.version_id = vi.version_id and items.parent_id = vi.parent_id Is there a way to write that SQL statement so that it doesn't use a subselect?

    Read the article

  • How to generate Function caller graphs for JavaScript and ActionScript?

    - by Jeremy Rudd
    I like the way Doxygen combines with Graphviz dot to generate function caller graphs. I'd like this functionality for other languages as well, apart from the basics that Doxygen supports (C++, C, Java, Objective-C, Python, VHDL, PHP, C#). I'm currently looking for tools that support JavaScript, ActionScript 2 and ActionScript 3/Flex. I'm also interested in tools that have a wider language support than Doxygen. Is there any way to get function caller graphs for any other languages?

    Read the article

  • Thread safety of Matlab engine API

    - by Jeremy
    I have discovered through trial and error that the MATLAB engine function is not completely thread safe. Does anyone know the rules? Discovered through trial and error: On Windows, the connection to MATLAB is via COM, so the COM Apartment threading rules apply. All calls must occur in the same thread, but multiple connections can occur in multiple threads as long as each connection is isolated. From the answers below, it seems that this is not the case on UNIX, where calls can be made from multiple threads as long as the calls are made serially.

    Read the article

  • Get all window handles for a process

    - by Jeremy
    Using Microsoft Spy++, I can see that the following windows that belong to a process: Process XYZ window handles, displayed in tree form just like Spy++ gives me: A B C D E F G H I J K I can get the process, and the MainWindowHandle property points to the handle for window F. If I enumerate the child windows using I can get a list of window handles for G through K, but I can't figure out how to find the window handles for A through D. How can I enumerate windows that are not children of the handle specified by MainWindowHandle of the Process object? To enumerate I'm using the win32 call: [System.Runtime.InteropServices.DllImport(strUSER32DLL)] public static extern int EnumChildWindows(IntPtr hWnd, WindowCallBack pEnumWindowCallback, int iLParam);

    Read the article

  • Can't Reorder a UITableViewCell into _some_ empty sections of a UITableView

    - by Jeremy Lightsmith
    If I have a UITableView in edit mode, w/ reordering turned on, it seems I can't move some (but not all) cells into some (but not all) empty sections. For example, if I have this layout : Section 1 apple banana Section 2 doberman Section 3 Section 4 Then I can move 'doberman' into any slot in section 1 (except after 'banana'), but I can't move it into section 3 or 4 at all. On the other hand, I can move 'apple' & 'banana' into section section 2 (except after 'doberman'), and I CAN move it into section 3, but NOT into section 4. What gives? this seems like buggy behavior. How do people work around it? Is apple aware of this bug?

    Read the article

  • PHP - Redirect and send data via POST

    - by Jeremy Rudd
    I have an online gateway which requires an HTML form to be submitted with hidden fields. I need to do this via a PHP script without any HTML forms (I have the data for the hidden fields in a DB) To do this sending data via GET: header('Location: http://www.provider.com/process.jsp?id=12345&name=John'); And to do this sending data via POST?

    Read the article

  • Does code in the constructor add to code in subclass constructors?

    - by Jeremy Rudd
    Does code in the constructor add to code in subclass constructors? Or does the subclass's constructor override the superclass? Given this example superclass constructor: class Car{ function Car(){ trace("CAR") } } ...and this subclass constructor: class FordCar extends Car{ function FordCar(){ trace("FORD") } } When an instance of FordCar is created, will this trace "Car" and "Ford" ??

    Read the article

  • mEncrypt/Decrypt binary mp3 with mcrypt, missing mimetype

    - by Jeremy Dicaire
    I have a script that read a mp3 file and encrypt it, I want to be able to decrypt this file and convert it to base64 so it can play in html5. Key 1 will be stored on the page and static, key2 will be unique for each file, for testing I used: $key1 = md5(time()); $key2 = md5($key1.time()); Here is my encode php code : //Get file content $file = file_get_contents('test.mp3'); //Encrypt file $Encrypt = mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $key1, $file, MCRYPT_MODE_CBC, $key2); $Encrypt = trim(base64_encode($Encrypt)); //Create new file $fileE = "test.mp3e"; $fileE = fopen($file64, 'w') or die("can't open file"); //Put crypted content fwrite($fileE, $Encrypt); //Close file fclose($fileE); Here is the code that doesnt work (decoded file is same size, but no mimetype): //Get file content $fileE = file_get_contents('test.mp3e'); //Decode $fileDecoded = base64_decode($fileE); //Decrypt file $Decrypt = mcrypt_decrypt(MCRYPT_RIJNDAEL_256, $key1, $fileDecoded, MCRYPT_MODE_CBC, $key2); $Decrypt = trim($Decrypt); //Create new file $file = "test.mp3"; $file = fopen($file, 'w') or die("can't open file"); //Put crypted content fwrite($file, $Decrypt); //Close file fclose($file);

    Read the article

  • I don't understand Application Domains

    - by Jeremy Edwards
    .NET has this concept of Application Domains which from what I understand can be used to load an assembly into memory. I've done some research on Application Domains as well as go to my local book store for some additional knowledge on this subject matter but it seems very scarce. All I know that I can do with Application Domains is to load assemblies in memory and I can unload them when I want. What are the capabilities other that I have mentioned of Application Domains? Do Threads respect Application Domains boundaries? Are there any drawbacks from loading Assemblies in different Application Domains other than the main Application Domains beyond performance of communication? Links to resources that discuss Application Domains would be nice as well. I've already checked out MSDN which doesn't have that much information about them.

    Read the article

  • Zend_Validate_Abstract custom validator not displaying correct error messages.

    - by Jeremy Dowell
    I have two text fields in a form that I need to make sure neither have empty values nor contain the same string. The custom validator that I wrote extends Zend_Validate_Abstract and works correctly in that it passes back the correct error messages. In this case either: isEmpty or isMatch. However, the documentation says to use addErrorMessages to define the correct error messages to be displayed. in this case, i have attached ->addErrorMessages(array("isEmpty"=>"foo", "isMatch"=>"bar")); to the form field. According to everything I've read, if I return "isEmpty" from isValid(), my error message should read "foo" and if i return "isMatch" then it should read "bar". This is not the case I'm running into though. If I return false from is valid, no matter what i set $this-_error() to be, my error message displays "foo", or whatever I have at index[0] of the error messages array. If I don't define errorMessages, then I just get the error code I passed back for the display and I get the proper one, depending on what I passed back. How do I catch the error code and display the correct error message in my form? The fix I have implemented, until I figure it out properly, is to pass back the full message as the errorcode from the custom validator. This will work in this instance, but the error message is specific to this page and doesn't really allow for re-use of code. Things I have already tried: I have already tried validator chaining so that my custom validator only checks for matches: ->setRequired("true") ->addValidator("NotEmpty") ->addErrorMessage("URL May Not Be Empty") ->addValidator([*customValidator]*) ->addErrorMessage("X and Y urls may not be the same") But again, if either throws an error, the last error message to be set displays, regardless of what the error truly is. I'm not entirely sure where to go from here. Any suggestions?

    Read the article

  • Sharing view logic in Django

    - by Jeremy B.
    I've begun diving into Django again and I'm having trouble finding the parallel to some common concepts from my life in C#. While using .NET MVC I very often find myself creating a base controller which will provide a base action implementation to take care of the type of stuff I want to do on every request, like retrieving user information, getting localization values. Where I'm finding myself confused is how to do this in Django. I am getting more familiar with the MVT concept but I can't seem to find how to solve this scenario. I've looked at class based views and the generic views yet they didn't seem to work how I expected. What am I missing? How can i create default logic that each view will be instructed to run but not have to write it in each view method?

    Read the article

  • building mono from svn - android target

    - by Jeremy Bell
    There were patches made to mono on trunk svn to support android. My understanding is that essentially instead of Koush's system which builds mono using the android NDK build system directly, these patches add support for the android NDK using the regular mono configure.sh process. I'd like to play around with this patch, but not being an expert in the mono build system, I have no idea how to tell it to target the android NDK, or even where to look. I've been able to build mono from SVN using the default target (linux) on Ubuntu, but no documentation on how to target android was given with the patches. Since anyone not submitting or reviewing a patch is generally ignored on the mono mailing list, I figured I'd post the question here.

    Read the article

  • Issue with translating a delegate function from c# to vb.net for use with Google OAuth 2

    - by Jeremy
    I've been trying to translate a Google OAuth 2 example from C# to Vb.net for a co-worker's project. I'm having on end of issues translating the following methods: private OAuth2Authenticator<WebServerClient> CreateAuthenticator() { // Register the authenticator. var provider = new WebServerClient(GoogleAuthenticationServer.Description); provider.ClientIdentifier = ClientCredentials.ClientID; provider.ClientSecret = ClientCredentials.ClientSecret; var authenticator = new OAuth2Authenticator<WebServerClient>(provider, GetAuthorization) { NoCaching = true }; return authenticator; } private IAuthorizationState GetAuthorization(WebServerClient client) { // If this user is already authenticated, then just return the auth state. IAuthorizationState state = AuthState; if (state != null) { return state; } // Check if an authorization request already is in progress. state = client.ProcessUserAuthorization(new HttpRequestInfo(HttpContext.Current.Request)); if (state != null && (!string.IsNullOrEmpty(state.AccessToken) || !string.IsNullOrEmpty(state.RefreshToken))) { // Store and return the credentials. HttpContext.Current.Session["AUTH_STATE"] = _state = state; return state; } // Otherwise do a new authorization request. string scope = TasksService.Scopes.TasksReadonly.GetStringValue(); OutgoingWebResponse response = client.PrepareRequestUserAuthorization(new[] { scope }); response.Send(); // Will throw a ThreadAbortException to prevent sending another response. return null; } The main issue being this line: var authenticator = new OAuth2Authenticator<WebServerClient>(provider, GetAuthorization) { NoCaching = true }; The Method signature reads as for this particular line reads as follows: Public Sub New(tokenProvider As TClient, authProvider As System.Func(Of TClient, DotNetOpenAuth.OAuth2.IAuthorizationState)) My understanding of Delegate functions in VB.net isn't the greatest. However I have read over all of the MSDN documentation and other relevant resources on the web, but I'm still stuck as to how to translate this particular line. So far all of my attempts have resulted in either the a cast error (see below) or no call to GetAuthorization. The Code (vb.net on .net 3.5) Private Function CreateAuthenticator() As OAuth2Authenticator(Of WebServerClient) ' Register the authenticator. Dim client As New WebServerClient(GoogleAuthenticationServer.Description, oauth.ClientID, oauth.ClientSecret) Dim authDelegate As Func(Of WebServerClient, IAuthorizationState) = AddressOf GetAuthorization Dim authenticator = New OAuth2Authenticator(Of WebServerClient)(client, authDelegate) With {.NoCaching = True} 'Dim authenticator = New OAuth2Authenticator(Of WebServerClient)(client, GetAuthorization(client)) With {.NoCaching = True} 'Dim authenticator = New OAuth2Authenticator(Of WebServerClient)(client, New Func(Of WebServerClient, IAuthorizationState)(Function(c) GetAuthorization(c))) With {.NoCaching = True} 'Dim authenticator = New OAuth2Authenticator(Of WebServerClient)(client, New Func(Of WebServerClient, IAuthorizationState)(AddressOf GetAuthorization)) With {.NoCaching = True} Return authenticator End Function Private Function GetAuthorization(arg As WebServerClient) As IAuthorizationState ' If this user is already authenticated, then just return the auth state. Dim state As IAuthorizationState = AuthState If (Not state Is Nothing) Then Return state End If ' Check if an authorization request already is in progress. state = arg.ProcessUserAuthorization(New HttpRequestInfo(HttpContext.Current.Request)) If (state IsNot Nothing) Then If ((String.IsNullOrEmpty(state.AccessToken) = False Or String.IsNullOrEmpty(state.RefreshToken) = False)) Then ' Store Credentials HttpContext.Current.Session("AUTH_STATE") = state _state = state Return state End If End If ' Otherwise do a new authorization request. Dim scope As String = AnalyticsService.Scopes.AnalyticsReadonly.GetStringValue() Dim _response As OutgoingWebResponse = arg.PrepareRequestUserAuthorization(New String() {scope}) ' Add Offline Access and forced Approval _response.Headers("location") += "&access_type=offline&approval_prompt=force" _response.Send() ' Will throw a ThreadAbortException to prevent sending another response. Return Nothing End Function The Cast Error Server Error in '/' Application. Unable to cast object of type 'DotNetOpenAuth.OAuth2.AuthorizationState' to type 'System.Func`2[DotNetOpenAuth.OAuth2.WebServerClient,DotNetOpenAuth.OAuth2.IAuthorizationState]'. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.InvalidCastException: Unable to cast object of type 'DotNetOpenAuth.OAuth2.AuthorizationState' to type 'System.Func`2[DotNetOpenAuth.OAuth2.WebServerClient,DotNetOpenAuth.OAuth2.IAuthorizationState]'. I've spent the better part of a day on this, and it's starting to drive me nuts. Help is much appreciated.

    Read the article

  • How can I create a new email account in Java?

    - by Jeremy Goodell
    I am able to send and receive emails from my JSPs and associated Java code using the Java Mail API (javax.mail.*). Now I would like to create a new POP3 email account programmatically when a user registers for my site. I've found surprisingly little information about this with web searches. I would think it would be a somewhat common problem. It appears that the Java Mail API does not provide any assistance in this area. I have many email accounts available under my godaddy account, and to manually create an account, I just go to the godaddy email control panel, click Add, and specify the email address and password. This is exactly what I would like to do via a Java program. Any ideas?

    Read the article

  • Linking indivuidal queries in a unbound listbox in ACCESS 2007

    - by Jeremy
    I have created a unbound listbox. I have the box showing a list of queries i want the use to be able to select. My problem is I don't understand how to get the submit button to select the currently selected query and run it. So how do I link the submit button to the listbox and have each item in the box submit it's own query.

    Read the article

  • Dropping PendingIntents

    - by Jeremy Edwards
    Is it ok to drop PendingIntents in android if they are never used. Such as in an AppWidgetProvider where a PendingIntent that was never used be overwritten by a new PendingIntent. Or should we call cancel on all unused PendingIntents to clean up memory appropriately?

    Read the article

  • How to enforce this constraint in sql server

    - by Jeremy
    I have a table called city, and a table called city_city. city_city correlates two city records, so it has a fromcity_id and a tocity_id. I can enforce uniqueness on fromcity_id and and tocity_id through a unique key, but how do I enforce uniqueness so that I cant insert a record if fromcity_id and tocity_id are reversed. For example, the following records are conceptually the same: id fromcity_id tocity_id 1 100 200 2 200 100

    Read the article

< Previous Page | 9 10 11 12 13 14 15 16 17 18 19 20  | Next Page >