Hi folks,
I am wondering if I could use simply use HTTP POST Requests in order to implement a SOAP API.
If so how should I format and treat the requests?
How to trasfer a file greater than 100mb using spring mvc.
I have been through the post http://stackoverflow.com/questions/214888/how-to-handle-100mb-uploads-for-users, that tells to use ftp api. But want to know an alternative with springs.
I just watched a video of Douglas Crockford's presentation about his 2009 book JavaScript: The Good Parts.
In the video, he explains that the following block is dangerous because it produces silent errors:
return
{
ok: false
};
And that it should actually be written like this (emphasising that although seemingly identical the behavioural difference is crucial):
return {
ok: false
};
You can see his comments around 32 minutes into the video here: http://www.youtube.com/watch?v=hQVTIJBZook&feature=player_embedded#!&start=1920
I have not heard this before, and was wondering if this rule still applies or if this requirement in syntax has been overcome by JavaScript developments since this statement was made.
I found this very interesting as I have NOT been writing my code this way, and wanted to check that this information was not out of date.
I'm moving some code from YUI to javascript and some of it is using YUI's YAHOO.util.Dom.getElementsBy(function). I've been reading through the prototype API docs and haven't been able to find something equivalent. It needs to be able to take an arbitrary function not just select off a CSS selector or the like. Can anyone suggest to me the best way to accomplish this in Prototype?
Okay, so yesterday I managed to get the latest trunk builds of NHibernate and FluentNHibernate to work with my latest little project. (I'm working on a bug tracking application.) I created a nice data access layer using the Repository pattern.
I decided that my entities are nothing special, and also that with the current maturity of ORMs, I don't want to hand-craft the database.
So, I chose to use FluentNHibernate's auto mapping feature with NHibernate's "hbm2ddl.auto" property set to "create".
It really works like a charm. I put the NHibernate configuration in my app domain's config file, set it up, and started playing with it. (For the time being, I created some unit tests only.) It created all tables in the database, and everything I need for it. It even mapped my many-to-many relationships correctly.
However, there are a few small glitches:
All of the columns created in the DB allow null. I understand that it can't predict which properties should allow null and which shouldn't, but at least I'd like to tell it that it should allow null only for those types for which null makes sense in .NET (eg. non-nullable value types shouldn't allow null).
All of the nvarchar and varbinary columns it created, have a default length of 255. I would prefer to have them on max instead of that.
Is there a way to tell the auto mapper about the two simple rules above?
If the answer is no, will it work correctly if I modify the tables it created?
(So, if I set some columns not to allow null, and change the allowed length for some other, will it correctly work with them?)
EDIT:
I managed to achieve the above by using Fluent NHibernate's convention API. Thanks to everyone who helped!
However, there is one more thing: after checking out the convention API, I really would like my IDs to be calld "ID", not "Id", but it seems to me that the PrimaryKey.Name.Is(x => "ID") is not working at all. If I add it to the conventions collection and rewrite my entities' properties to "ID" instead of "Id", it throws an exception that there is no primary key mapped.
Any thoughts on this?
Hello,
I need to be able to play a .wmv video in a Windows Media Player component on a web page starting at a particular specified point in the video right away.
I can embed the component and play the video. The problem is that even if I specify the location with
The PARAM “currentPosition”, the video starts to play from the beginning. This appears to be because the requested position in the video has not been loaded yet. If I wait until the video has been loaded to the requested position and refresh the page, it will then play from the requested position.
It seems that the video must start loading from the requested position in order to start right away. If this is the correct way, how would I go about doing it? If it is not, what is the proper way to do it? It can obviously be done, because YouTube’s players work like this.
Thank you,
I am trying to export contacts using Yahoo/AOL/Live username credentials.
I have been able to export gmail contacts with their API, but cant find any example for Yahoo/AOL/Live in ASP.Net
Any help appreciated
Hi,
I was wondering what people are using for externally configuring logging in a Flex app. Are there any ready baked solutions out there, similar to Log4J's configuration via properties files for instance?
If there are, do these work directly with the Flex logging API or are they part of a separate logging library?
In every Turing-Complete language, is it possible to create a working
Compiler for itself which first runs on an interpreter written in some other language and then compiles it's own source code? (Bootstrapping)
Standards-Compilant C++ compiler which outputs binaries for, e.g.: Windows?
Regex Parser and Evaluater?
World of Warcraft clone? (Assuming the language gets the necessary API bindings as, for example, OpenGL and the WoW source code is available)
(Everything here theoretical)
Let's take Brainf*ck as an example language.
I need charts for my application where the user use gesture to redraw the charts in android. Could you suggest any charting API,tool or software which supports.
I want to show some account information in ring chart ,i am able to show in pie chart via Google chart api's in iphone application ,but the requirement is to show the information in ring chart or we say donut chart,
if any one now how to overcome no stuff like this?
please help me...............
please
please
I'm currently registering my domains through GoDaddy. Does the registrar matter? Any recommendations for registrars you're especially happy with?
(See this very similar question, that requires API support. I need no such support, hence this question is more generic).
On our own website, it's easy to protect against direct links to our video content by grabbing a token through AJAX and verifying the token through PHP before the file download is started.
However I'm also researching how I could provide an embed feature, like YouTube or vimeo etc., without compromising this security feature.
The problem is that the embed code I want to provide should look something like <object>...<embed>...</embed></object> -- but I don't know how to grab and append the token to the filename. I mean, I guess I could attach a script that did some gnarly JNOP business, but that's too dirty.
I'm using JW Player for the actual video container.
Huge thanks to anyone who can help...
Since I cannot pre-render all the images in PNGs and real-time image transformation functions are required, namely:
skew
perspective
(like the transform action found in Photoshop)
Which API (CoreAnimation? OpenGL ES?) should I look into? Even better, is there any sample code around? Thanks!
I am looking to build a web app that implements background audio and fast app switching. These features work out of the box, when run as regular Safari web pages, but as soon as you add the web-app-capable tag, and try to run in full screen mode, this functionality breaks.
I did some testing and even the most basic web app will reload every time when you switch back to it. And seeing as it's a web app, we can't exactly implement the multitasking API. Has anyone found a work around?
This isn't a deal-breaker, as you can just avoid full screen mode, but then you also lose the ability to use your own icon in the app switch tray. Perhaps this explains a lack of full screen mode in YouTube's new web app....
I have come across ABRecordCopyCompositeName() in these pages but, having Spotlighted it, have a hunch it's only available for the IOS platform. The AddressBook app itself, and ABPeoplePicker obviously do something similar internally, so is there an equivalent API for OSX? It's a tedious thing to retrieve title, first name, middle name, last name, suffix and work out if it's a company before building it yourself.
Is there any good tutorial or example to build a Twitter client using popup and oauth for login (Ex: http://twitgoo.com/)
Also once the user logs in, the new tweets showed without any page refresh and also the ability to post a tweet without page refresh.
If there is no good example, please suggest the API or libraries i need or any general suggestion.
JID jid = new JID("[email protected]"); //success with code
SUCCESS
JID jid = new JID("mycomponent.host.domain.com"); //send fail with
code INVALID_ID ,but when i try send from gmail OR jabber to
mycomponent.host.domain.com . it was a success.
Is this a but in google xmpp api?
Hi ,
After I do a JNDI look up , what I get is a reference to the Home of EJB Object.
But when I do an API call on Home/Remote , how does it find the URL/port of the server ?
Thanks
J
What is the best practise solution for programmaticaly changing the XML file where the number of instances are definied ? I know that this is somehow possible with this csmanage.exe for the Windows Azure API.
How can i measure which Worker Role VMs are actually working? I asked this question on MSDN Community forums as well: http://social.msdn.microsoft.com/Forums/en-US/windowsazure/thread/02ae7321-11df-45a7-95d1-bfea402c5db1
Hi
I'm .NET Developer, but I'm new in Android. I'd like to test to add a feature. It is appeared clicking Menu under Contacts in Android. It includes New Contact, Search, Display Group and Import Contacts. I just only wanna get "New Contact". How could I test it? Which API do I need to use?
Best Regards
I have created a custom JiBX marshaller and verified it works. It works by doing something like the following:
<binding xmlns:tns="http://foobar.com/foo" direction="output">
<namespace uri="http://foobar.com/foo" default="elements"/>
<mapping class="java.util.HashMap" marshaller="com.foobar.Marshaller1"/>
<mapping name="context" class="com.foobar.Context">
<structure field="configuration"/>
</mapping>
</binding>
However I need to create multiple marshallers for different HashMaps. So I tried to reference it with abstract mapping like this:
<binding xmlns:tns="http://foobar.com/foo" direction="output">
<namespace uri="http://foobar.com/foo" default="elements"/>
<mapping abstract="true" type-name="configuration" class="java.util.HashMap" marshaller="com.foobar.Marshaller1"/>
<mapping abstract="true" type-name="overrides" class="java.util.HashMap" marshaller="com.foobar.Marshaller2"/>
<mapping name="context" class="com.foobar.Context">
<structure map-as="configuration" field="configuration"/>
<structure map-as="overrides" field="overrides"/>
</mapping>
</binding>
However when doing so, when I attempt to build the binding, I receive the following:
Error during code generation for file "E:\project\src\main\jibx\foo.jibx" - this may be due to an error in your binding or classpath, or to an error in the JiBX code
My guess is that either I'm missing something I need to implement to enable my custom marshaller for abstract mapping, or custom marshallers do not support abstract mapping.
I have found the IAbstractMarshaller interface in the JiBX API (http://jibx.sourceforge.net/api/org/jibx/runtime/IAbstractMarshaller.html), however the documentation seems unclear to me on if this is what I need to implement, as well as how it works if so. I have not been able to find an implementation of this interface to work off of as an example.
My question is, how do you do abstract mapping with custom marshallers (if it's possible)? If it is done via the IAbstractMarshaller interface, how does it work and/or how should I implement it?
I have a books app with a UISearchBar, where the user types any book name and gets search results (from ext API call) below as he types.
I am using a singleton variable in my app called retrievedArray which stores all the books.
@interface Shared : NSObject {
NSMutableArray *books;
}
@property (nonatomic, retain) NSMutableArray *books;
+ (id)sharedManager;
@end
This is accessed in multiple .m files using NSMutableArray *retrievedArray; ...in the header file
retrievedArray = [[Shared sharedManager] books];
My question is how do I ensure that the values inside retrievedArray remain synchronized across all the classes.
Actually the values inside retrievedArray gets added through an NSXMLParser (i.e. through external web service API). There is a separate XMLParser.m file, where I do all the parsing and fill the array. The parsing is done on a separate thread.
- (void) run: (id) param {
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
NSXMLParser *parser = [[NSXMLParser alloc] initWithContentsOfURL: [self URL]];
[parser setDelegate: self];
[parser parse];
[parser release];
NSString *tmpURLStr = [[self URL]absoluteString];
NSRange range_srch_book = [tmpURLStr rangeOfString:@"v1/books"];
if (range_srch_book.location != NSNotFound)
[delegate performSelectorOnMainThread:@selector(parseDidComplete_srch_book) withObject:nil waitUntilDone:YES];
[pool release];
}
- (void) parseXMLFile: (NSURL *) url
{
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
[self setURL: url];
NSThread* myThread = [[NSThread alloc] initWithTarget:self
selector:@selector(run:)
object: nil];
[retrievedArray removeAllObjects];
[myThread start];
[pool release];
}
There seems to be some synchronization issues if the user types very quickly (It seems to be working fine if the user types slowly)....So there are 2 views in which the content of an object in this shared array item is displayed; List and Detail.
If user types fast and clicks on A in List view, he is shown B in detail view...That is the main issue.
I have tried literally all the solutions I could think of, but am still unable to fix the issue.
Please suggest some suitable fixes.
Say I am using an Identity Matrix for my modelViewTransformation Matrix on an Open GL ES2.0 program. The Co-ordinate system in this case is the canonical opengl co-ordinate system which extends from (-1,-1,-1) to (1,,1,1).
My question is, is this coordinate system right-handed or left-handed?
A broader question: Is there a document with OpenGL which can list all the mathematical conventions followed by the API?