w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
alternative to calc() for css background positioning in android browser and chrome for android
Modern browsers understand background positioning from right edge. I'm not sure if it works on Android but give it a try: background-position: right 0.3em top 0.3em; This sets the position 0.3em from the top and 0.3em from the right edge. Please note it does not work in older browsers so you need to provide a fallback.

Categories : CSS

What is alternative for Appdelegate of iOS in Android
As stated in this guide, you should keep note of the project id (referred to as SENDER_ID in code) /** * Substitute you own sender ID here. */ String SENDER_ID = "Your-Sender-ID"; You'll be using it later for registering the device: regid = gcm.register(SENDER_ID);

Categories : Android

Best alternative for SearchView for Android api level 7 and up?
See this from Android developers site. PS: Not as per your question, but ABS is deprecated since last Android API. Google rolled out their own implementation of comaptible action bar.

Categories : Android

Android MediaPlayer setNextMediaPlayer() alternative
Create Compat player that will work with onCompletionListener to start the next player like: public void onCompletion(MediaPlayer mp) { if (mCompatMode && mNextPlayer != null) { mNextPlayer.prepare(); mNextPlayer.start(); } } Somewhere in your constructor check if there is method (or check SDK version) named "setNextMediaPlayer" mCompatMode = Build.VERSION.SDK_INT < 16; Define method like this one: public void setNextMediaPlayer(MediaPlayer next) { if (mCompatMode) { mNextPlayer = next; } else { super.setNextMediaPlayer(next); } }

Categories : Java

Is there any alternative way of defining controller in Android?(something like in IOS)
Try this lib github.com/excilys/androidannotations. P.S. But seriously listen to the @Simon and and try Android way;)

Categories : Android

Alternative to Google Search API for Shopping for Android app
You could check out Semantics3 Product API. They allow UPC/EAN searches as well as free-text searches on their API. The API then returns pretty detailed information about the products including the ones you mentioned. They do have a Java library too so you could easily integrate it with your Android app.

Categories : Android

Android drawLine alternative for performance improvement
You could try to use Path instead of Lines. http://developer.android.com/reference/android/graphics/Path.html

Categories : Android

how to handle multipart/alternative in android app using javamail?
The below code given in the JavaMail API FAQ might help: private boolean textIsHtml = false; /** * Return the primary text content of the message. */ private String getText(Part p) throws MessagingException, IOException { if (p.isMimeType("text/*")) { String s = (String)p.getContent(); textIsHtml = p.isMimeType("text/html"); return s; } if (p.isMimeType("multipart/alternative")) { // prefer html text over plain text Multipart mp = (Multipart)p.getContent(); String text = null; for (int i = 0; i < mp.getCount(); i++) { Part bp = mp.getBodyPart(i); if (bp.isMimeType("text/plain")) { if (text ==

Categories : Android

alternative method to getVisibleTitleHeight() to make it run on Android sdk 4.3
It is still there, it is annotated with @hide, so you cannot use it in your code. May be you can compile you code using : http://devmaze.wordpress.com/2011/01/18/using-com-android-internal-part-1-introduction/ However, this method will always return 0 according to the comment in WebViewChromium.getVisibleTitleHeight() method: This is deprecated in WebView and should always return 0.

Categories : Android

Android WebView PictureListener Deprecated - Still no alternative?
It actually depends on the targetSdkLevel of your app. For compatibility, onNewPicture still sends the picture if the target level is < 18 (JB MR2). The preferred approach for capturing WebView image is to cause it do draw on a Canvas provided by you, see for example Which can replace capturePicture function

Categories : Android

What is Image Gallery's best alternative in Android Jelly Bean?
I agree with @ MarsAtomic. Well I am inlove with Universal-Image-Loader as it deals a lot with images and caching. Here's the great library UIL

Categories : Java

Issues with Android Alternative Layouts in Xamarin Studio
i have informed xamarin about this issue. [link] (https://bugzilla.xamarin.com/show_bug.cgi?id=13705). The way i create layouts for several devices: Create the layouts for in standard layout folder (i take a normal mdpi device) when all layouts were created i copy them to another folder outside xamarin and rename .axml to .xml i use eclipse to create alternative layouts in their specific folders rename all files inside alternative layout folder from .xml to .axml in xamarin studio create alternative layout folders and import specific files run and test them on real hardware devices this works for me.

Categories : Android

Android not respecting alternative dimens file from sw600dp folder
most of the time, sw600dp is used to describe tablets. See The android guidelines for more information

Categories : Android

Issues with Google Play Game Services occupying Android Res folder & Web API alternative?
1) There isn't any problem in two services using the resources folder. All the resources will be on the final APK, just pay attention on the resources names so they don't conflict. The best practice is to use a suffix (example: fb_logo.png and google_logo.png, instead of two logo.png images) 2) Not needed! If you posted the error log it would have been easier to help and point the exact issue!

Categories : Android

Alternative to if, else if
What you want is a Dictionary: Dictionary<string, string> mapping = new Dictionary<string, string>(); mapping["SWGAS.COM"] = "Southwest Gas"; mapping["foo"] = "bar"; ... as many as you need, maybe read from a file ... Then just: return mapping[inputString]; Done.

Categories : C#

What are Alternative's "some" and "many" useful for?
I tend to see them in Applicative parser combinator libraries. a :: Parser [String] a = some (string "hello") and I see many used for purpose in the default definitions of Parsing in parsers. I think Parsec being the primary example of a parser combinator library hides the use of some/many since it redefines things like (<|>).

Categories : Haskell

Alternative for sed ... <(cmd) and cmd | sed
If you're careful with quoting, you can do it like this: option = bash -c 'cmd "$1" "$2" | sed "s/x/y/"' sub The word "sub" at the end is arbitrary but necessary; it's there because $1 in the subshell created with bash -c is actually the second positional argument, not the first one.

Categories : Bash

ORG alternative for C++
No it's not possible to do in any C compiler that I know of. You can however create your own linker script that places the code/data/bss segments at specific addresses.

Categories : C++

Alternative to enum in PHP
I use php bitfields usually Improve this PHP Bitfield Class for settings/permissions? While that question relates to permissions it can easily be changed to use account state

Categories : PHP

Alternative to captcha
Other way you can do like: When form is getting open, then generate some long token key Store this long token key on one table as well. After submitting the form, check for the token key, if exists, then insert and remove that token key from table as well. If token key not found on table, then ignore insertion of data.

Categories : PHP

Alternative for
No, there isn't in HTML. There is a good reason why the developers chose to go out of their way to remove support for an element whose implementation was otherwise untouched for upwards of a decade. That said... you could emulate it using a CSS animation, but if I were you, I wouldn't risk CSS animations being axed due to being abused in this manner :)

Categories : HTML

sql if else alternative actions
you could put action do in the "CATCH" part of your exception. BEGIN SELECT fooID into dummy FROM Foo WHERE FooID = :new.FooID; --action1 EXCEPTION WHEN NO_DATA_FOUND THEN --action2 END

Categories : SQL

Alternative to Publishing on WAS in RAD
you can try was development profile or liberty profile. if you don't have enough money :) you can use tomcat and embedded ejb container as alternative.. it would be faster ..but you will need to take care while packaging to tomacat and to websphere

Categories : Eclipse

alternative to foreignObject for IE9
I don't think it's possible to make foreignObject work in IE9. But for your particular task why not just render the user icon and name with <image> and <text> elements?

Categories : Javascript

querySelectorAll alternative for IE
querySelectorAll works fine in IE9. It even works in IE8. But it sounds like your problem is getting it to work specifically in quirks mode or compatibility mode. If that's the problem then... well, the problem is the mode, not the feature. You need to get the site into standards mode, and then querySelectorAll will work. The whole point of compatiblity mode is to make the browser emulate an older version of IE. The main way it does this is by disabling all the features that have been added since that version. So basically what you're saying is "I've switched off half the features in my browser, how can I get one of those features working again?" And the obvious answer is: switch the features back on again. The way to do that is to make sure the browser is in standards mode. You nee

Categories : Javascript

PDO rowCount() alternative
This is a perfect case of "XY problem". But luckily you managed to explain your real problem along with main question. You don't actually need no rowcount() here. What you really need is a mysql specific INSERT .. ON DUPLICATE KEY UPDATE query Which will either insert or update the record based on whether it exists or not.

Categories : Mysql

Alternative to the T-SQL AS keyword
You can look up the column by index, rather than by name. Either of the following would work: id = objDR(0) id = objDR.GetInt32(0) Otherwise, your best bet is the "As" keyword or double-quotes (which are the ansi standard) to create an alias.

Categories : SQL

What is the alternative of the activex?
I have two things in mind for such type of communication: ActiveX and Java applet. But in both cases the end used has to install something. You can do nothing with desktop app with JavaScript only due to security reasons.

Categories : Jquery

jsf 2.0 filter alternative
You're making a fundamental mistake. You should not be using command (POST) buttons/links for page-to-page navigation in first place, but you should be using direct (GET) buttons/links for that. Long story short: What is the difference between redirect and navigation/forward and when to use what? How to make URL reflect the current page (and not the previous one) When should I use h:outputLink instead of h:commandLink? Considering this information and best practices, a servlet filter is still the best solution. All existing security frameworks are also based on the filter principle. See also: How to handle authentication/authorization with users in a database?

Categories : Security

.End(xlDown) Alternative in vba
The problem is not the .End(), is the default sheet. Your code should be: Set A = Sheets("3rd sheet").Range(Sheets("3rd sheet").Cells(2, 2), Sheets("3rd sheet").Cells(2, 2).End(xlDown)) Or (as suggested by Cor_Blimey's comment): With Sheets("3rd sheet") Set A = .Range(.Cells(2, 2), .Cells(2, 2).End(xlDown)) End With Or (I like this best): Set Sh = Sheets("3rd sheet") Set A = Sh.Range(Sh.Cells(2, 2), Sh.Cells(2, 2).End(xlDown))

Categories : Vba

C++ tmpnam alternative
You could create your own method for this by a combination of rand(), getenv() and an index. With getenv() you can get the temporary path (In Windows this is TEMP or TMP). You then convert rand() into a string and form the file name. This is the C way to do: char buffer[260]; unsigned int i = 0; // LOOP AND INCREMENT i sprintf(buffer, "%s\%x%x%u.tmp", getenv("TEMP"), rand(), rand(), i++); // TEST IF FILE ALREADY EXISTS

Categories : C++

Alternative for "for of"-loop
Try to use Object.keys that will allow you to get only that part. You can read more about here: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/keys (Remember all associative arrays in javascript are objects) Keep in mind is only supported on IE >= 9

Categories : Javascript

php 5.4 magic_quotes_gpc alternative?
Its better to use prepared statements as suggested here for security reasons. Mysql_real_escape_string might not be suffiecient to prevent sql injection e.g. because multibyte character sets can be abused despite the escape function ().mysql_real_escape_string() versus Prepared Statements. Prepared statements in PHP can be used like this: $stmt = $dbh->prepare("INSERT INTO REGISTRY (name, value) VALUES (?, ?)"); $stmt->bindParam(1, $name); $stmt->bindParam(2, $value); More information on prepared statements in PHP. So in conclusion, if you have the possibility to change your application to prepared statements, that would be the best way to handle. UPDATE (totally not recommended) If you really want to keep the state, use addslashes() for every $GET and $POST variable.

Categories : PHP

Catch-all better alternative
Update My advice would be to try to prevent the exception from occurring. Failing that, a catch-all is likely the only option you have remaining. Logging all exceptions is going to be critical here. 1st question: Your case isn't really a catch-all, you are catching all exceptions to query the type. My only advice is to log details for the exceptions you choose to consume. 2nd question: I would completely remove the generation of email from the scope if it is liable to fail. Once the transaction rolls back, all items will be rolled back too. Create and send all the emails on successful commit. public void ProcessItems() { var items = itemService.GetAll(); var mailMessages = new List<MailMessage>(); bool committed = false; using(var scope = new TransactionScope()) {

Categories : C#

INSTALL_NON_MARKET_APPS alternative?
As the documentation for Settings.Secure.INSTALL_NON_MARKET_APPS points out, the replacement is Settings.Global.INSTALL_NON_MARKET_APPS.

Categories : Android

Alternative of TabAcitivity
use Fragments as an alternative of TabActivity . To get a feel like Tabs you can do this. Use a FragmentActivity. Add different Fragments in it. And use ViewPager to switch between different fragments.

Categories : Android

Better alternative to mailto
There is no way of finding out, in client-side code running in the browser, what the end user's default mail client is and if there was, you'd still have to find a way to get the client-side code to communicate with that client. That is possible if you use ActiveX but that raises security issues and it only works on Windows PC's. Mailto is the default way to work, and if 2000 characters is not enough, I'm afraid the only alternative is to have the server send the message. Of course the server may put any email address in the From: field, so for the person receiving the message, there would be no difference. If needed, the server may put the "author" in Cc: or Bcc:.

Categories : C#

Is angularJS an alternative to JSF?
No, angular is clearly not an alternative to JSF. JSF is a server side java application framework (with some ajax features). Angular is a client side javascript framework. It's a bit like comparing JQuery and JSPs.

Categories : JSF

Is there an alternative for UDDI?
UDDI is out of the scene these days. People are moving towards semantic web services. WSMO and OWL-s are major initiatives for semantic web services. These solutions can provide more precise results.

Categories : Web Services

Non-GPL alternative to db4o
Try OrmLIte . It has Android support, works fine and the API is relatively friendly. It uses the ISC license, similar to BSD. Also, note that db40 has a commercial license as well, if that's an option.

Categories : Android



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.