yashsingh1/xdaforums huggingface dataset:
[Off-topic] stephj:
As Java used to be owned by Sun, before they themselves were bought by Oracle, there is a whole load of documentation beginning here:

http://docs.oracle.com/javase/

As well as here:

http://www.oracle.com/technetwork/java/javase/overview/index.html

The API documentation is useful when you need to find which method of which object you need to do the job.
[Off-topic] kordek2121:
Simple java code

one of first for math (ax^2+bx+c)

int a=2; //example
int b=3;
int c=4;

for (int i = 0; i<=100;i++){
if((a*(i*i)+b*i+c)==4)
system.out.println(i);

}
[Off-topic] Wolf Pup:
That is beyond me! If I had more time, I would be learning Java quicker.

Sent from a Time Lord, using his TARDIS.
[Off-topic] stephj:
Here's a classic:- The first 1000 or so primes numbers.

The trick here, is to use the fact that a number is prime if it is not divisible by the primes up to its square root.

Testing it against any numbers other than those in the above series, is a waist of effort and CPU time.

The 'primes' array is initially populated with 2 and 3 and the 'squares' array with their squared values.

It then continues to populate itself as it runs, allowing larger and larger numbers to be tested for primality.

public class primes
{
public static void main(String[] args)
{

long[] primes = new long[1000];
long[] squares = new long[1000];

long t=3;

int i=2,j;

primes[0] = 2;
squares[0] = 4;
primes[1] = 3;
squares[1] = 9;

System.out.print(2+"\n");
System.out.print(3+"\n");

while(i<1000)
{
t+=2;
for (j=1;t>squares[j] && t%primes[j]!=0; j++);
{
if (t<squares[j])
{
primes[i] = t;
squares[i] = t*t;
i++;
System.out.print(t + "\n");
}
}
}
}
}
[Off-topic] :
Anything else?
[Off-topic] stephj:
Making a small change to your code will allow neater processing of the result.

In secondarray[], represent an 'X' by 1 and a 'O' by 2, not 4 and 5 as in your code.

0=unplayed square, 1=X, 2=O........ So far so good.

The binary AND operator '&' can be used to combine these values in groups of three.

So, (secondarray[0][0] & secondarray[0][1] & secondarray[0][2]) will return, 0 if nobody has a line, 1 if they contain three 'X',s or 2 if they contain three 'O's. In any line, the presence of an unplayed square or both an X and a O will cancel the result of that line to zero.

These values can be combined using the binary OR operator '|'.

In a single loop we can process both rows and columns at the same time, the diagonals must be done separately later.

int result;
int i;

result=0;
for(i=0;i<3;i++)
{
// Row (i) and column (i)
result |= (secondarray[i][0] & secondarray[i][1] & secondarray[i][2]) | (secondarray[0][i] & secondarray[1][i] & secondarray[2][i]);
}
// Diagonal top left -> bottom right
result |= (secondarray[0][0] & secondarray[1][1] & secondarray[2][2]);
// Diagonal top right -> bottom left
result |= (secondarray[0][2] & secondarray[1][1] & secondarray[2][0]);

If result =

0 No win yet, or draw

1 X wins

2 O wins
[Off-topic] stephj:
Secondly, ditch all the switch/case statements, and make the code a little smarter. The result is the same as above:- Do the job in a fraction of the code.

Subtract 1 from choice, now (0-8), and use that as the index to address the arrays. MOD it by 3 to get get the column - x and DIV it by 3 to get the row - y

playerturn^=3; toggles the value from 1 to 2 and vice versa. It means playerturn=playerturn XOR 3

int moves=0;

int x,y;

int choice = input.nextInt();

if(choice>0 and choice<10)
{
choice-=1;
x=choice%3;
y=choice/3;

if(secondarray[y][x]!=0)
System.out.println("Cell occupied, pick another");
else
{
secondarray[y][x] = playerturn;
firstarray[y][x] = (playerturn==1) ? "X" : "O";
playerturn^=3;
moves++;
}
}
else
System.out.println("Number out of range.");

With the addition of the moves variable, if 'result' from the previous post is zero, then there is no winner yet, if the number of moves is less than 9. If the number of moves is equal to 9, and result is equal to 0, then it's the cat's game.
[Off-topic] :
Nice to see people are learning.

Sent from a Time Lord, using his TARDIS.
[Off-topic] :
For the people still learning out there, take a look at the code in the OP, try it out, and tell me if it works. You will have to use a IDE though, and change the file names and all that. Examine the code, make a new post saying what each part does and I'll see which is the most accurate. You can forget the stringargs bit though.
[Samsung Epic 4G Touch] hrffd:
People who live in the same area, and even my parents, have fine data. But for some reason my data is only getting Upload. I'll open Facebook, see download come on for 2 seconds, then all I get is upload. So if i'm away from my house, I can't use data. Does anybody know why this is happening?

I called Sprint, they said that they don't see any problems on their end of why I'm not getting data.
[Samsung Epic 4G Touch] hrffd:
Bump, still having the problem
[Samsung Epic 4G Touch] I_FLY_Z3R0:
Which modem are you running? Try flashing a new one. I run fb21 and get decent speeds. I had that problem on one of the older modems.

Sent from my iPhone killer.
[Samsung Epic 4G Touch] hrffd:
FB07 now, was on FB05. But same problems :( I've tried wiping everything and starting over.
[Samsung Epic 4G Touch] hrffd:
Called Sprint and they had me take out my battery while they refreshed my services because some phones were defected by a solar flare, they had alot of problems. Thanks anyways guys :D
[AT&T Samsung Galaxy S II Skyrocket SGH-I727] NightHawkUndead:
Faux's kernel 10 released today. I flashed it on Sky-ICS stock 7.4, and can't use camera and the media scanner never completes. Any suggestions?
[AT&T Samsung Galaxy S II Skyrocket SGH-I727] ThinkinBig:
I'm using the same ROM and same kernal without either of these issues, diff you wipe cache and dalvik cache before you flashed it?
[AT&T Samsung Galaxy S II Skyrocket SGH-I727] NightHawkUndead:
I did. Hmmmnnn. I guess I shall try again.
[AT&T Samsung Galaxy S II Skyrocket SGH-I727] (att)whyme:
retarded i might be but can you tell me where you downloaded the file? i saw the thread on rootzwiki but i didnt see the link to download the actual 010 only the links for 009 and the beta versions of 10 ultimate. i think i read that beta 3 is the same release but i wanted to confirm.

thanks

nvm... i am retarded. for anyone else as oblivious as i, its after "Installation instructions"... not at the bottom of the post by the release info...
[AT&T Samsung Galaxy S II Skyrocket SGH-I727] NightHawkUndead:
Still can't get this combination to work. I've done multiple wipes. Even used wipe tools. Any more suggestions?
[AT&T Samsung Galaxy S II Skyrocket SGH-I727] icenight89:
Yup. Boot into CWM and format cache, data and system partitions. Wioe dalvik cache and then flash darkside. Odin back stock. Flash CWM. Flash darkside again. The flash sky ics. Reboot. TWICE. Then flash faux 010m.

I know it seems long but it'll take 10 min, tops. I can guarantee it'll completely fix your problem
[AT&T Samsung Galaxy S II Skyrocket SGH-I727] mr_clean5953:
Fix permissions. Done

Sent from my SGS2 LTE
[AT&T Samsung Galaxy S II Skyrocket SGH-I727] NightHawkUndead:
Has something to do with external SD... I remove it and everything works. Works fine with faux 9.
[AT&T Samsung Galaxy S II Skyrocket SGH-I727] mr_clean5953:
Next time. Because they'll be a next time. Just fix your permissions. This happens to me anytime I flash anything

Sent from my SGS2 LTE
[AT&T Samsung Galaxy S II Skyrocket SGH-I727] NightHawkUndead:
Thanks! But tried that. It didn't help at all.
[AT&T Samsung Galaxy S II Skyrocket SGH-I727] icenight89:
lol I could have told u that. A non working camera indicates an improper flash, or remnants left over from previous roms, NOT a permission problem
[AT&T Samsung Galaxy S II Skyrocket SGH-I727] specter07:
I have the same issue, non working stock camera. I have to use a 3rd party app to take pictures. I did a full wipe using the wipe codes reflashed rom with kernel while wiping cache and dalvik and sti have the same issue. Has anyone found a fix to this?
[Asus  Eee Pad Transformer Prime] -lukin-:
Hello:

I live in Canada and don't get to enjoy the Hulu and HBO Go goodness. Total bummer. I would like to use my TF201 to watch this content - not desktop. It appears there are apps for PCs that do something with VPN or IP spoofing. But what options are available to Prime owners? I have DD-WRT flashed on my router so that might open some doors I'm not aware of.

Thanks.
[Asus  Eee Pad Transformer Prime] Gage_Hero:
I'm also in the same boat, if you get a good answer, would you pm me? Also if there is a solution I would suggest making the thread a sticky since there are probably lots of other Canadians looking for the same solution....
[Asus  Eee Pad Transformer Prime] rolodev:
I use unblock-us here in europe with out any problem

Enviado desde mi GT-I9000 usando Tapatalk
[Asus  Eee Pad Transformer Prime] joedeveloper:
You could utilize the combination of http://www.cryptocloud.com and VPN on your transformer prime. Same as with a PC.

Other than that, probably some other apps out there that have the content. Hulu is pretty strict though, so VPN is probably the best option when you are out of the US.
[Asus  Eee Pad Transformer Prime] -lukin-:
Does HBO Go work without subscription?
[Asus  Eee Pad Transformer Prime] -lukin-:
DroidVPN works for US sites. https://play.google.com/store/apps/details?id=com.aed.droidvpn

It might onlybe a free trial though. Best setup would be VPN from router, no?
[Asus  Eee Pad Transformer Prime] -lukin-:
Catch-22.

If I use VPN for US websites, does that also prevent me from downloading torrents at the same time? That would suck.
[Asus  Eee Pad Transformer Prime] superkev:
I use unblock-us. It works great. I used to use VPN but it definitely slows you down. Because unblock-us just does DNS redirection, it runs at the full speed of your Internet connection. I'm not sure about HBO-Go, but unblock-us has a free trial so you can find out for yourself.
[Asus  Eee Pad Transformer Prime] lucky6877:
I have been using Unotelly for months and its an excellent service, I paid $19.99 for Gold Package 90 days and I can access netflix usa from uk, hulu from my PS3, PC, PRIME and Apple TV.

I would have posted the link but I can't as I have made less than 8 posts (stupid forum rule).

Just search for Unotelly in google.
[Asus  Eee Pad Transformer Prime] -lukin-:
Thanks. If I setup VPN in my router settings, do I have to make same changes to PC and Prime? Or will the router changes work for all?
[Asus  Eee Pad Transformer Prime] ryun33:
Have you tried:

Orbot : tor proxy for andoid

Orbot offers three interfaces into the Tor network:

SOCKS 4A/5 proxy 127.0.0.1:9050

HTTP proxy 127.0.0.1:8118

Transparent proxying (on select devices)

More info:

https://www.torproject.org/docs/android.html.en

Its free..
[Asus  Eee Pad Transformer Prime] wpghtc:
What are you using to watch Hulu?

I get an unsupported device error from the app on my tf201.
[Asus  Eee Pad Transformer Prime] houtx2:
I use Witopia. Its a very good and inexpensive vpn service.
[Asus  Eee Pad Transformer Prime] -lukin-:
Thanks. Do you have VPN setup on all devices or just the tablet?
[Asus  Eee Pad Transformer Prime] houtx2:
Yes, phone (HTC Incredible) and tablet.
[Asus  Eee Pad Transformer Prime] -lukin-:
I guess I should have mentioned router too. I flashed DD-WRT recently and thought I could do one master VPN setup from there. However, the Prime doesn't allow for dynamic DNS, if I'm using static local IPs. So VPN must be setup on Prime as well, but router VPN should work with windows desktop if set to assign dynamic IP from router. Does that make sense?

Thanks
[Asus  Eee Pad Transformer Prime] houtx2:
No special router setup for me. I should have mentioned, I use Witopia on my laptop too.
[Asus  Eee Pad Transformer Prime] superkev:
unblock-us uses some DNS tricks to get you access to US and UK content. I just set up my router to use the unblock-us DNS server and that propagates to all the devices in my home.

Away from home, I use DNS Changer to switch the DNS to unblock-us.

https://play.google.com/store/apps/...GwsMSwxLDEsImNvbS5lZGR5cGN6LmRuc2NoYW5nZXIiXQ..
[Asus  Eee Pad Transformer Prime] darrenprice:
When looking at VPN services you are bets off finding one that works at high speed so buffering is never an issue

Ive been using VPN Supplier (vpnsupplier com) past few months, seems to be fast enough.
[Asus  Eee Pad Transformer Prime] sidon100uk:
Try going to www.1channel.ch or let me watch this.com
[Asus  Eee Pad Transformer Prime] PeterWalkerxx:
and gailea

I am watching HULU and Netflix from outside US with watchingtvabroad.com for a while now. I use my PC and iPad with the same account. It is fast enough and reliable as well.
[Android Q&A, Help & Troubleshooting] terminator1983:
I checked my phone battery from the sys folder and its showing only 500 charge full design and i think i am i having a battery indicator problem bcoz of this as my phone drops the charge from 100 to 1 % in only 1 to 2 hours of use and stays on 1% for many hours.So is there any way to change it with actual atrix battery capacity.

I am facing this problem from the first day with original atrix battery that came with the phone i also tried various calibration methods,roms and kernels but nothing worked.

/sys/devices/platform/cpap_battery/power_supply/battery

My phone uevent is showing this

Powersupply-capacity=5

Powersupply-voltage-now=3836000

Powersupply-temp=260

Powersupply-charge-full-design=500

Powersupply-charge-counter=1

My Phone Motorola Atrix

Battery 1880
[Android Q&A, Help & Troubleshooting] Android311:
go to u.o.t kitchen and flash new battery icons, it should then over write what you have now with working battery icons. If you need help on u.o.t kitchen i will be glad to help you
[Android Q&A, Help & Troubleshooting] Soldier-2Point0:
Have you had any luck editing this file? Also, I believe that our battery should be set to 1930?

Sent from my MB860 CM7.2 RC3 37p Radio
[Android Q&A, Help & Troubleshooting] terminator1983:
No nothing worked i even tried to set it by entering the value from init.rc of boot.img.
[Android Q&A, Help & Troubleshooting] Soldier-2Point0:
I wonder if it has to be done through ADB commands?

Sent from my MB860 CM7.2 RC3 37p Radio
[Android Q&A, Help & Troubleshooting] terminator1983:
I don't think it can be done using a ADB command give it a try if it worked for u do let me know.
[General Questions and Answers] terminator1983:
I checked my phone battery from the sys folder and its showing only 500 charge full design and i think i am i having a battery indicator problem bcoz of this as my phone drops the charge from 100 to 1 % in only 1 to 2 hours of use and stays on 1% for many hours.So is there any way to change it with actual atrix battery capacity.

I am facing this problem from the first day with original atrix battery that came with the phone i also tried various calibration methods,roms and kernels but nothing worked.

/sys/devices/platform/cpap_battery/power_supply/battery

My phone uevent is showing this

Powersupply-capacity=5

Powersupply-voltage-now=3836000

Powersupply-temp=260

Powersupply-charge-full-design=500

Powersupply-charge-counter=1

My Phone Motorola Atrix

Battery 1880
[Samsung Galaxy Nexus] boe:
Hello,

I'd like to go over the running apps on my phone to see what your recommendations would be killing or uninstalling if possible certain apps.

My new phone went through the battery insanely fast compared to my ET4G so I'd like to tweak it with your help.

BIP - is to allow LTE? I currently am not using LTE but I see BIP running.

Bluetooth share - I want BT always on (had it that way on the last 5 phones I've had so I know about battery use on it) But I see it is running as BT share, my BT settings on the phone are -set to only visible to shared devices - is the BT share normal or is there another place I should turn off a BT service as the only thing I use BT is for my headset - no tethering, external keyboards or anything else.

Google services - not sure what that is

Media - I almost never ever play any music or videos - is that necessary?

I have GPS/location services off I believe but I see google maps runing

VZ Backup assistant - I don't think I have any use at all for this

Android live wallpaper - does that drain much?
[Samsung Galaxy Nexus] ATnTdude:
Don't worry about those. Unless you want to hide them in the app menu, I strongly suggest you leave them all alone. A Nexus with only those preinstalled apps on it will drain less than half of a percent per hour on standby. That's ~8 days of standby time.

The screen on this phone is, by far, the biggest battery drain. Inc comparison to the above number, the screen will kill your battery in 3 hours. Everything else pales in comparison.
[Samsung Galaxy Nexus] martonikaj:
Welcome to LTE, really.

don't know.

The process has to be running to be ready to transfer files.

Think you can figure that one out....

Media scanner is running (for things like Gallery esp) for when you take pictures or need to access pictures for other apps.

Just how it is. You can try signing out of Latitude or fully disabling Maps. In my tests, disabling it doesn't help or hurt battery, but causes issues because you have to re-enable it and update it just to use it again. What a burden, just let it be IMHO.

Then disable it.

It actually drains a lot. One of the first things to do to save battery is turn down screen brightness and turn off live wallpapers.
[Samsung Galaxy Nexus] ATnTdude:
Unless you've got some crazy 3D wallpaper (which would probably run like #### on this phone using the default launcher anyway), they might be 2% of your total drain. Unless you're being super anal, I'd leave it alone unless you prefer a static wallpaper aesthetically.
[Samsung Galaxy Nexus] boe:
Thanks for the info!

If I don't use BT for file transfers - is there a way to make sure that doesn't ever run?

I use the camera about once every 3 months however I do browse IMDB at least once a week - so can I leave it off and turn it one when I need it or does IMDB need it for pictures?

Is there a proper way to disable VZ backup?

Thanks - good to know. I didn't really find any wallpapers I liked - is it easy to just set it for a plain black or dark blue background?
[Samsung Galaxy Nexus] martonikaj:
I said if you're trying to save battery turn off live wallpapers. Doesn't mean theyre a huge drain but they absolutely do drain more than a static wallpaper. OP is obviously paranoid about power so he shouldn't be using a LWP.

No. Just let it run.

Again, just let it be.

From the app drawer, press and hold the app, drag it to the top of the screen for "app info" then hit "disable".

Just find a wallpaper and put it on the phone, then select it from the gallery after long-pressing on the homescreen.

The basic theme here is to

just let things run

. You're not giving Android enough credit for managing tasks. It does this for you. When a process is just sitting in RAM it's not actually using any power. Its just waiting to be used. You will absolutely kill more battery (and cripple your user experience) trying to manage these things manually then just letting them run. This is why the idea of auto task-killers is completely backwards. Just let Android manage things and stop worrying about it. As above poster said, the screen will easily be 50%+ of your drain over a day of usage. The best thing you can do if you want to lengthen battery is lower screen brightness.... really.
[Android General] bagofbits:
Hiya,

I'm bagofbits and new to these forum's and was not sure how to contact anyone at XDA so after some after advice from LUFC (forum moderator) here is my situation.

I have a wildfire s and been viewing those forums, during the last couple of days since the change over from android market to google playground or whatever it's called these days, I've been getting a popup app in my status bar saying please download 'battery supercharger' . I've been just clearing my status bar but it just kept coming back.

Today by mistake i downloaded it and got loads of texts within minutes and ended up with a charge of £4.99, I text 'STOP' to the number given. My network provider(3) can't help and I've mailed google help about it and they have logged it and are getting back to me.

Also a number of post's on the web about it...

Anyway enough rambling, I've searched the wildfire s forum and can't see any mention of it, just thought that it would be useful to post something about it so nobody else falls victim to this.

Give me a thanks if u could please.

Cheers :)

Oh might be an idea to check recent downloads you have made that contain ad's that may harbor this scam.
[Android General] jonas2295:
The ad you saw in your status bar used ad over the air function.

There are some apps which will detect apps using the add. Method. And will give you the ability to uninstall it.
[Android General] bagofbits:
Thanks

Thanks for the advice, I have installed firewall and virus protection now, can u advise on an app for trapping these OTA updates ?

:)
[Android General] Canis-X:
WOW, thanks for posting this up. I'll keep an eye out for this one!
[Android General] jonas2295:
The best one and most trusted one is from lookout.

https://play.google.com/store/apps/details?id=com.lookout.addetector

Press the thanks button :)
[Android General] 85gallon:
Try airpush detector from the market to find out what the offending app is.
[Android General] jamieunit:
Never txt stop to a random number that's how they get ya, school boy error

THISIS50 if its hot its here
[Android General] bagofbits:
School boy error

Just to set the record straight this 'thing' auto en-roles u 'before' u text stop and it applies the charge!

If I'm guilty of anything it's downloading by mistake ! :mad:

Google it and see what others are saying bout it, I was just trying to help and your criticism ain't justified.
[Android General] TheManicGibbon:
Unfortunately this is true, you have not stopped the messages - just confirmed to the spammers that the number is live and real. 3 may be able to help you by blacklisting the numbers you are getting messages from - also have a look here if the messages persist.

This is a problem that is by no means limited to the Wildfire S - recently I recognised an app on my friend's Samsung Galaxy Ace as being malware - it was also generating notifications about some kind of battery optimizer. I managed to remove it before she accidentally signed up to anything.

Regarding the app, try some apps like Lookout Mobile Security and BitDefender . If you run a scan with these, they may find the offending app and help you to remove it. Good luck!
[Android General] funny keyboard:
solution to battery supercharger text costs

saw the two text messages yesterday, spoke to Vodafone told them to block any charges today, up to which time charges hadn't gone through. So hopefully this will cost me nothing.

even if they had placed the charge, I would have asked Vodafone not to pay it, and kicked up a fuss until the agreed not to do so, or carry the cost themselves. Anybody with a mobile phone contract is in a very strong position at the moment I have noticed, getting lots of freebies off them.
[Android General] yshobokshy:
thanx for ur advice

but i think it is not harmful