Hi, I want to render some text on a canvas using WebGL, which API of WebGL should be used?
Note: "text" can be either plain text or HTML snippet with CSS style
I am looking for PHP script that will detect face in a uploaded photo and automatically crop it accordingly.
The code should be in pure PHP without depending on any third party API's or Libs.
This code will be a part of our existing code for processing images.
In fact this is the only part that is missing!
I would prefer to have code in PHP version 5.x not PHP 6.x.
I just downloaded Firefox 3.6 today and I noticed in the list of new features they have an Orientation API that can detect the direction that your laptop/computer is tilted. This is clearly a hardware feature of some sort; So if you don't have the hardware to do so is there any way of simulating it so that you can test it out on your projects?
I am looking for an online photo editor like http://services.snipshot.com (Javascript) or picnik.com/info/api (Flash) but I need one that I can host on my own server.. been searching for a while but no results.. any ideas?
I also love the idea behind pixenate.com/productinfo/Overview.html but its so expensive.
Is anybody knows any API that can help to distinguish Mac OS X "Server edition" from "Desktop edition"?
My application should know on which edition of Mac OS X it currently running. (Server or Desktop)
I am in a need of programatically convert an Word-XML file into a RTF file. It has become a requirement, because of some third party libraries. Any API/Library that can do that?
Actually the language is not a problem because I just need to work done. But Java, .NET languages or Python are preferred.
I'm familiar with printing time difference in milliseconds:
long time = System.currentTimeMillis();
//do something that takes some time...
long completedIn = System.currentTimeMillis() - time();
But, is there a nice way print a complete time in a specified format (eg: HH:MM:SS) either using Apache Commons or even the dreaded platform API's Date/Time objects? In other words, what is the shortest, simplest, no nonsense way to write this in Java?
I am trying to experiment with the new facebook authentication system, and I can't getthe login to work.
I'm getting the following error message:
API Error Code: 100
API Error Description: Invalid parameter
Error Message: next is not owned by the application.
The url that is being sent to facebook is:
http://www.facebook.com/connect/uiserver.php?app_id=444444444444444&next=http%3A%2F%2Fstatic.ak.fbcdn.net%2Fconnect%2Fxd_proxy.php%23%3F%3D%26cb%3Df357eceb0361a8a%26origin%3Dhttp%253A%252F%252Fwww.mysite.com%252Ff38fea4f9ea573%26relation%3Dopener%26transport%3Dpostmessage%26frame%3Df23b800f8a78%26result%3DxxRESULTTOKENxx&display=popup&channel=http%3A%2F%2Fwww.mysite.com%2Ffbtester.php&cancel=http%3A%2F%2Fstatic.ak.fbcdn.net%2Fconnect%2Fxd_proxy.php%23%3F%3D%26cb%3Df6095a98598be8%26origin%3Dhttp%253A%252F%252Fwww.mysite.com%252Ff38fea4f9ea573%26relation%3Dopener%26transport%3Dpostmessage%26frame%3Df23b800f8a78%26result%3DxxRESULTTOKENxx&locale=en_US&return_session=1&session_version=3&fbconnect=1&canvas=0&legacy_return=1&method=permissions.request
Note that the 'Next' variable in the url is:
next=http%3A%2F%2Fstatic.ak.fbcdn.net%2Fconnect%2Fxd_proxy.php%23%3F%3D%26cb%3Df357eceb0361a8a%26origin%3Dhttp%253A%252F%252Fwww.mysite.com%252Ff38fea4f9ea573%26relation%3Dopener%26transport%3Dpostmessage%26frame%3Df23b800f8a78%26result%3DxxRESULTTOKENxx
Any ideas what could be going wrong? All I've done is copy and paste the facebook login demo code from facebook's website:
define('FACEBOOK_APP_ID', 'your application id');
define('FACEBOOK_SECRET', 'your application secret');
function get_facebook_cookie($app_id, $application_secret) {
$args = array();
parse_str(trim($COOKIE['fbs' . $app_id], '\"'), $args);
ksort($args);
$payload = '';
foreach ($args as $key = $value) {
if ($key != 'sig') {
$payload .= $key . '=' . $value;
}
}
if (md5($payload . $application_secret) != $args['sig']) {
return null;
}
return $args;
}
$cookie = get_facebook_cookie(FACEBOOK_APP_ID, FACEBOOK_SECRET);
?
Your user ID is
<div id="fb-root"></div>
<script src="http://connect.facebook.net/en_US/all.js"></script>
<script>
FB.init({appId: '<?= FACEBOOK_APP_ID ?>', status: true,
cookie: true, xfbml: true});
FB.Event.subscribe('auth.login', function(response) {
window.location.reload();
});
</script>
Thanks for the help!
I am using PBE encryption to encrypt and decrypt some text on an Android application but I get the BadPaddingException: with the "pad block corrupted" message when I use the wrong private key to decrypt the text.
My question, since I am not well versed with encryption in Java, is if this is the normal behavior of the encryption API, because I need to do some logic in the case when the wrong key is entered, but I do not know the private key, nor do I store it anywhere (storing just the encrypted and decrypted check text).
Thanks,
Mihai
I am writing a serial communication program in userspace. I want to check how much of the buffer is full. Is there a way to do it using linux terminal i/o api?
Thanks
Basically I have a public feed: http://www.google.com/latitude/apps/badge/api?user=-1671995934285587708&type=atom
If you go to my Google Profile you can see it says: "Gareth is in 6 Seaside Gardens, Mullaloo WA 6027, Australia (1 minute ago)" google.com/profiles/Gareth.B.Hall
How can I, using PHP, display my location on a website the same way it's displayed on my Google Profile?
Thanks
Hello,
I'm having the following problem. I'm installing SharePoint 2010 Beta so I need to activate the windows feature "Windows Communication Foundation Non-HTTP Activation". The problem is I cannot activate it, i get the message: "An error has occurred. Not all features were successfully changed"
When i look at the log (C:\Windows\Logs\CBS\CBS.log) I found this error:
Process output: [l:186 [186]"SMConfigInstaller[Error]: Failed in calling 'StartService' for service 'NetTcpActivator'. Error code: 0x8007042c
Anyone can give me a clue of what is happening here?
In the iPhone OS4 SDK, does anyone have a suggestion for how I would implement a repeating local notification that ends on a particular date?
Looking at the API documentation, there doesn't appear to be a built-in property of UILocalNotification to allow you to set an end date on a repeat.
Any suggestions would be much appreciated.
Thank you!
I'm making an iPad app and I need to force the orientation to portrait to several parts of the app. I used the undocumented "setOrientation" API and the app was rejected. Is there a documented way to do this?
Im using the Twitter API to read the Favorites RSS, it generates the following output:
http://vl3.co.uk/favs/getfavs.php
I'm not sure why this file seems to be incorrect, doesnt come up in my RSS reader or render correctly in the browser. Can anyone shed any light on this?
If the output is not valid RSS how can I make it so?
Secondly I'd like to cache the RSS feed to then use something like Magpie RSS Parser.
I found a few examples suggesting Google AJAX APIs.
This link typifies the advice I have found so far: http://briancray.com/2009/05/29/find-web-visitors-location-javascript-google-api/
However, the location is often wrong with the Google APIs.
Other sites seem to know exactly which city I'm in, though, without me entering any information.
Suggestions? Is there something cross-browser (ignoring IE6) and reliable?
Googled for this to no avail. Didn't find anything in the API either. I was expecting some kind of class method or configuration option to set it...
So, rather than calling
from "[email protected]"
for every method, it could be called automatically.
Hello,
I'd like to learn how to effectively use Swing Application Framework. Most of the the examples I've found are blog entries that just explain how to great it is to extend SingleFrameApplication and override its startup method, but that's about it. Sun's article is almost two years old, as is the project's own introduction, and there has apparently been some evolution since then.
Are there any recent and thorough tutorials/HOWTOs available anywhere? There is JavaDoc of course, but it's hard to get the big picture from there. Any pointers are appreciated.
Update: I realized that there's a mailing list archive at the project's site. While somewhat clumsy (compared to StackOverflow ;) it seems to be quite active. Still it's a pity that there are no real tutorials anywhere. The information is scattered here and there.
Update 2: Let me clarify - I'm not having trouble using Swing (the widget toolkit) itself, I'm talking about its Application Framework, which is supposed to ease things like application lifecycle (startup, exit and whatever happens between them), action management etc. - that is, things that most Swing applications will need. It's cool to get such framework to be standard part of Java. The only problem is to learn how it's intended to be used.
Update 3: For the interested, there was just some discussion at the project's forum regarding the current state and future of JSR 296. Shortly: the current version 1.03 is considered to be quite usable, but the API is not stable and it will change to the final version in Java 7. The package name will also change so Java 7 will not break current applications made on SAF.
Update 4: Karsten Lentzsch stated at the above mentioned forum: "I doubt that it can be included in Java 7; and I'll vote against it.". I would rather not question the sincerity of this great guru, and it's certainly wise not to let anything flawed to slip into the core JDK, but frankly it's a strange situation - he is the author of JGoodies Swing Suite which is partly a commercial competitor of JSR 296, and he is sitting in the committee that will decide whether this JSR will be included to standard Java. It was the same thing with JSR 295 Beans Binding which I wrote about earlier.
Given the current state of SAF, I think the best solution is to wrap the current implementation into a "homebrew" framework, which can then accommodate possible changes to the existing API.
I'm working with very large JSF/Facelets applications which use Spring for DI/bean management.
My applications have modular structure and I'm currently looking for approaches to standardize the modularization.
My goal is to compose a web application from a number of modules (possibly depending on each other). Each module may contain the following:
Classes;
Static resources (images, CSS, scripts);
Facelet templates;
Managed beans - Spring application contexts, with request, session and application-scoped beans (alternative is JSF managed beans);
Servlet API stuff - servlets, filters, listeners (this is optional).
What I'd like to avoid (almost at all costs) is the need to copy or extract module resources (like Facelets templates) to the WAR or to extend the web.xml for module's servlets, filters, etc. It must be enough to add the module (JAR, bundle, artifact, ...) to the web application (WEB-INF/lib, bundles, plugins, ...) to extend the web application with this module.
Currently I solve this task with a custom modularization solution which is heavily based on using classpath resources:
Special resources servlet serves static resources from classpath resources (JARs).
Special Facelets resource resolver allows loading Facelet templates from classpath resources.
Spring loads application contexts via the pattern classpath*:com/acme/foo/module/applicationContext.xml - this loads application contexts defined in module JARs.
Finally, a pair of delegating servlets and filters delegate request processing to the servlets and filters configured in Spring application contexts from modules.
Last days I read a lot about OSGi and I was considering, how (and if) I could use OSGi as a standardized modularization approach. I was thinking about how individual tasks could be solved with OSGi:
Static resources - OSGi bundles which want to export static resources register a ResourceLoader instances with the bundle context. A central ResourceServlet uses these resource loaders to load resources from bundles.
Facelet templates - similar to above, a central ResourceResolver uses services registered by bundles.
Managed beans - I have no idea how to use an expression like #{myBean.property} if myBean is defined in one of the bundles.
Servlet API stuff - use something like WebExtender/Pax Web to register servlets, filters and so on.
My questions are:
Am I inventing a bicycle here? Are there standard solutions for that? I've found a mentioning of Spring Slices but could not find much documentation about it.
Do you think OSGi is the right technology for the described task?
Is my sketch of OSGI application more or less correct?
How should managed beans (especially request/session scope) be handled?
I'd be generally graefult for your comments.
This question really relates to allowing to logon to a SharePoint installation from home but I guess it's a general IIS security question.
When the login box pops up to collect the windows credentials the user can just type in their user name on Safari/Chrome/FF and they can login correctly. On IE authentication fails as it seems to pass their local machine name by default and the user needs to replace this with domain\user. Not a big problem in some cases but we'd prefer it if the users didn't have to enter the domain name portion.
Is this simply a feature of IE that we can't control or is their something we can do with IIS/AD etc that will allow us to provide a default domain if one isn't specified?
I want to kill the background process of SETTINGS by using killBackgroundProcesses. But it does not work without any errors? I use API(8) level 2.2 and having KILL_BACKGROUND_PROCESSES permission in manifest.
ActivityManager activityManager = (ActivityManager)getApplicationContext().getSystemService(Context.ACTIVITY_SERVICE);
activityManager.killBackgroundProcesses("com.android.settings");
"com.android.settings" is checked by getPackageName of getRunningTasks in ActivityManager.
Hi, I'm keep getting oauth_problem=consumer_key_unknown error when trying oauth https://api.login.yahoo.com/oauth/v2/get_request_token
I'm pretty sure my consumer key is correct because it works locally (Runs via 127.0.0.1). Just keep giving me oauth_problem=consumer_key_unknown when I try it on my server. Any ideas?
Dear All,
I've download Windows 7 SDK which was downloaded at the time of the beta release. Now I upgraded to RC and trying with some Direct2D samples. But I can't create the factory pointer using D2D1CreateFactory API. It's always returns NULL. Even the samples downloaded from MSDN is also not working well.
There are some changes from Beta - RC
Is this because of the version mismatch of SDK?
Is there a way to collect the memcached stats using this API (spymemcached)?
I know there are tools like cacti to collect information on Memcached Server. But I would like to collect, say, memory usage by each item I have put into the server--the total no. of items in the same category, etc... more importantly, the bytes used by individual pieces.