Well, technically, you need spherical trigonometry, not linear algebra.
For nearby points, linear algebra will be a good approximation, so perhaps
that's a good enough answer for him. But if you want an app to face you
toward Mecca, for example, that won't be enough.
A good navigation text
Re: But a more relevant issue is that not all email addresses in the real
world (tm) are RFC compliant (just like email processing, in general).
I'd recommend going with a more forgiving validation than one strictly
based on RFC BNFs.
As someone long involved in this, going back to RFC733
I'm sorry, but this does not even come close to matching more than a tiny
subset.
On Thursday, October 6, 2011 7:12:06 AM UTC-7, Chris wrote:
This regex pattern should match email addresses:
Your analysis is correct, but I can't agree with your advice.
Exceptions should generally be handled as far out as possible, for several
reasons.
First, handling them too far deep into your application limits your ability
to do anything useful about them.
Exception handling too deeply limits
I bet your code doesn't actually look like that -- because why would you be
checking for it to be null, if it were? And you would have to declare the
'status' variable 'final', for thread class to be able to reference it.In
which case, you could not be assigning it like this. This is clearly
Also, if you ARE modifying the 'status' field later, expecting your other
thread to have picked up its value, and maybe to have modified it or
something, you're going to need to do some explicit synchronization, either
using notify/wait, or some higher-level construction, for example a blocking
One other little flaw there -- possibly serious -- is not specifying the
encoding in the new InputStreamReader(stream, encoding) call.
Generally, you should use UTF-8 if you have a choice -- and you should use
what was supplied by the server, in any event. If you're writing the server,
make it
(I don't mean this to dump on you -- really! But you need to understand why
your question is hopeless, and is not going to get you any useful answers.)
I sympathize, I want to use chewing gum as a 3G-enabled digital camera, and
that's not working out so well, either. And nobody else seems to
the NFC would not be good for a Bump-type comm
between two devices? It just seems so much easier than pairing two
Bluetooth devices and since Android doesn't even support peer-to-peert
WIFI networking, that's completely out of the question.
On May 29, 9:13 am, Bob Kerns r@acm.org wrote
Don't worry about the terminology -- ad hoc wifi network is what you're
looking for. I just wanted to figure out what you intended to say.
Hmm, peer-to-peer and sensitive financial data has me a bit concerned.
I don't advocate sending sensitive data, via servers or not, unencrypted. I
hope
flat out ask you and would expect an honest answer :)
On May 30, 12:14 pm, Nikolay Elenkov nikolay...@gmail.com
wrote:
On Mon, May 30, 2011 at 12:51 PM, Bob Kerns r@acm.org wrote:
Don't worry about the terminology -- ad hoc wifi network is what
you're
looking for. I just wanted
Note that using HTTPS does not give you end-to-end security in this
scenario. The server is a man-in-the-middle. It's not a surreptitious one,
but it is a man-in-the-middle nonetheless. The cert only serves to ensure
it's the *right* man in the middle.
So you'll still want to encrypt the
Yes, I understand it varies by culture. Here (US), it's exacerbated by a lot
of factors with how we handle credit, jobs, etc., but we also have a
moderate expectation of privacy. (The Europeans are stronger on it, at least
in terms of what laws are on the books. I think our attitudes and our
Send? Just what do you think NFC is, exactly? It sounds like you think it's
an alternative to WiFi or Bluetooth. That's not exactly true, or only
approximately true, depending on how you want to look at it.
While in theory you could use it to communicate between two devices, the
short range
time to find.
On Saturday, May 28, 2011 6:13:51 PM UTC-7, Bob Kerns wrote:
Send? Just what do you think NFC is, exactly? It sounds like you think it's
an alternative to WiFi or Bluetooth. That's not exactly true, or only
approximately true, depending on how you want to look at it.
While
I read Dan's message a bit differently than it seems everyone else has. I
too have 40+ years of experience, and I think I see where you're coming
from, and I'm not distracted by the legs remark.
Yes, there's a lot of competition. What this argues, really, is that you
should either be willing
I meant something far more narrow.
If you work create a phone app as a work-for-hire, whether as a contractor,
vendor, or even as an employee, you will be expected to produce what they're
asking for. Often, in this scenario, it will be on a tight budget, and quite
narrowly defined.
This is in
:14 PM UTC-7, SURYA TEJ wrote:
Dear All ,
is there a alternative way instead of rewriting the entire file ?kindly
help me
On Tue, May 17, 2011 at 10:53 AM, Bob Kerns r...@acm.org wrote:
I would use a database for this. Even if it's trivial.
I can't quite figure out the meaning of your XML
I'll give him a break for not caring, given the context.
But the original poster was really WAY to vague to answer anyway. I know
what a heat map is, but I'd still have no idea what code to write for the
OP.
There are many types of heat maps for different types of data -- continuous,
Google is your friend. It took me more time to write this message than to
find you a model and information about the format. I spent less than 2
minutes looking for the information, including on the format.
And then I deleted that information, because my finding a specific model
isn't going to
I would use a database for this. Even if it's trivial.
I can't quite figure out the meaning of your XML, or I'd describe the schema
for you, but it will be pretty simple. (In particular, the position of the
Answer element seems strange to me, and the value doesn't seem related to
the
Please send me $5000, and a specification for the type of heat map you want.
Please send it right away, it is urgent.
Really, you want people to do your work for you, without paying -- AND it's
urgent? AND you don't care what kind of heat map?
On Sunday, May 15, 2011 11:54:17 PM UTC-7, niladri
Simple, yes, but it performs as O(n^2). As your file gets longer and longer,
your application will perform slower and slower. If you don't take care to
do it off the UI thread, you will eventually start getting force-closes
because it stalls out the UI thread.
Not generally recommended.
All
Java strings are *always* Unicode strings. If you have mojibake, then the
problem occurred before you got a Java string, and you have to fix it there.
You cannot in general fix the problem, once the string has been
misinterpreted. Although sometimes you can get away with your getBytes/new
By the way, you have it backwards, I think.
newStr = new String(AlbumCursor.getString(1).getBytes(utf-8), sjis);
That is, get the bytes of the string as they are internally, as UTF-8, and
then re-interpret them as SJIS.
On Friday, May 13, 2011 10:56:49 AM UTC-7, wang wrote:
Hi,
I have
Well, there IS one way, sort of.
You can have one XML file that has the outer tags, with a DTD that defines
and entity that references a second file that contains a sequence of XML
forms, and a reference to that entity between the outer tags.
The need for two files is often reason enough to
seen iteration add considerable overhead. In one SqlCipher
implementation iteration was the vast majority of the CPU costs of
doing a rekey.
On May 10, 11:13 pm, Bob Kerns r@acm.org wrote:
I think you missed part of what I was saying. It's important, so let me
try
to be more clear
I understand what you're asking, but I don't think you're going to get what
you're looking for.
First, it's a lot of work. It's work that would be justified if you are
teaching a course, but you'd probably do that with your own selection of
examples.
But more importantly -- there is no single
I'm not! It would be a major security hole.
But I could see a broadcast for various UI events while locked. They
couldn't expose any UI (and perhaps should not be allowed to trigger any
change of current activity), but they could do things like mute the audio,
or log some event.
On Thursday,
I think we need to clearly distinguish between Support provided by Google,
and Support provided by Dianne Hackborn. (And a few other notables, but
especially you.)
There's no question that if you stopped posting, you'd have time to do other
stuff to improve the platform.
But I really don't
Dianne, there's another way to look at this.
I don't think it is as much a matter of entitlement, as investment. People
are emotionally and financially invested in the success of the Android
platform -- as are you!
A lot of what you see isn't so much I am entitled to X, as Android really
No, he thinks he just wants a hash to construct a key from a password.
Probably, he just wants to encrypt / decrypt, in which case, your code is
mostly adequate, except for a serious flaw, of a constant salt. A constant
salt defeats the purpose; you can construct a perfectly fine dictionary of
The fundamental problem with starting with a human-managed password is that
there is not a lot of entropy -- the possible values are not distributed
over a huge range, compared to what an attacker could try with
trial-and-error.
So just doing SHA1 or SHA256 for that matter, is not sufficient
https://www.kb.cert.org/vuls/id/836068
https://www.kb.cert.org/vuls/id/836068Nothing new should have been using
MD5 for a looong time, and people need to know to stay away from it.
Fake SSL certs that exploit this have been produced. It's not just a
theoretical concern.
On Tuesday, May 10,
:34 pm, Bob Kerns r@acm.org wrote:
The fundamental problem with starting with a human-managed password is
that
there is not a lot of entropy -- the possible values are not distributed
over a huge range, compared to what an attacker could try with
trial-and-error.
So just doing
. Otherwise, it's a waste of time and potential
source of bugs, even though it's not all that complicated.
On Tuesday, May 10, 2011 9:00:58 PM UTC-7, Nikolay Elenkov wrote:
On Wed, May 11, 2011 at 7:34 AM, Bob Kerns r...@acm.org wrote:
More precisely, you iterate this:
hash = f(hash)
where f
By default, notifications use the ring volume, and setting them has no
effect.
This is controlled by a system setting -- no hint of this in the
AudioManager documentation that I ever recall seeing.
You can change it, if it's appropriate -- but unless you're acting as a
volume control manager
' before AsyncTask (or its unoficcial predecessor UserTask)
became so popular.
On May 7, 11:31 am, Bob Kerns r@acm.org wrote:
Use an AsyncTask -- unless both of the following are true:
- AsyncTask doesn't meet your needs somehow
- You know very clearly and well how
Images found in Google Images are *not*, repeat, absolutely *not* freely
available. Just because they are searchable does not make them available for
you to use -- for any purpose.
They are copyrighted. Every. Single. One. Some of them may have expired
copyrights. You can use those, but you
True enough, but the difficulty generally comes between step #1 and step #2,
in this sort of scenario of a rare, hard-to-reproduce crash.
Often you have to figure out everything you need to know to do step #3 (fix
the bug) before you can do step #2.
Even so, do it in this order. Write the test
Perhaps this example (showing a variety of techniques) will be of
assistance:
https://groups.google.com/forum/#!search/authormsg:fametest,RtVO9WT4U50J$20after:2011$2F4$2F1$20before:2011$2F5$2F1%7Csort:date/android-developers/llVSftDzGFM/KoHt5eFYRqEJ
Among other things, it uses AvoidXfermode to
Use an AsyncTask -- unless both of the following are true:
- AsyncTask doesn't meet your needs somehow
- You know very clearly and well how to properly synchronize between
threads, and how to transfer work to the UI thread where needed, etc.
If AsyncTask doesn't meet your needs, and
Hi, Keith!
At the start of the description for the ArrayAdapter class is the following
sentence:
To use something other than TextViews for the array display, for instance,
ImageViews, or to have some of data besides toString() results fill the
views, override getView(int, View,
Interesting ideas and questions, but this isn't a suitable place to ask
them, as they're lower level than the SDK interfaces, which is what this
group deals with.
I suspect the android-porting group would be your best bet, although maybe
there's a group somewhere for people making custom
Relativity to the rescue -- leave the phone home and go on a trip. The
further and faster the better.
But seriously, the source of your problem will be some ill-behaved app. You
need to figure out which one, and get rid of it.
You can do this via trial and error -- uninstall things until it
No, this is a bad idea. This consumes memory -- and for large files, it can
consume more memory than you have.
It is also completely unnecessary. The loop to do repeat over the buffer is
just 3 lines of code, including the final '}'. That's actually easier than
figuring out how big to make the
This is not true, but appears to be a common confusion.
You only need to call flush() if you need output to get to the disk at some
defined point, prior to closing the output stream. You very, very rarely
need to do this. In all my years programming in Java, I bet I could count on
the fingers
If you follow that link you posted, you'll see a table that lists constant
names, their values, and an explanation of each, associated with the
attribute 'visible'.
Whenever you see something like this -- NEVER, EVER, put the values in your
code. Put the constants there. The only reason for
If you succeed, the villagers will surround your castle with torches and
pitchforks.
They really don't like it when people write apps to spy on them, or send
shape-shifters out to pretend to be someone they trust.
That's why they never tell you what they're doing or where they're going:
they
While these are good and interesting questions, this isn't a good group to
ask them in, as this is at a lower level than the SDK.
This is so close to the hardware I think the porting group would be more
likely to be able to assist.
BTW, noise suppression isn't the same thing as a high-pass
There is no bad idea which cannot be embellished.
Hey, I know perl real well. Can we get that on Android, too?
--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To
This doesn't help the present issue, but may be of interest to some:
I posted about this on the IPTC Yahoo group, and got this helpful response:
http://tech.groups.yahoo.com/group/iptc-photometadata/message/145
Basically, it has been addressed in XMP by extending the DateTime
attribute's
THUD
On Sunday, May 1, 2011 12:10:07 PM UTC-7, Kostya Vasilyev wrote:
01.05.2011 22:55, Bob Kerns пишет:
There is no bad idea which cannot be embellished.
Hey, I know perl real well. Can we get that on Android, too?
Someone already did:
http://code.google.com/p/perldroid/
http
Better solution: All services should be defined via interface, with nary an
implementation class to be seen. Specifying an implementation class, as the
current spec does, does not add value -- it removes it.
Workaround: Define your own interface class, and your own method that calls
Perhaps you yourself are getting in the way when you offer offense in this
way? I for one am glad that Dianne does not work at the sort of company you
describe, and there's really no way to take your remarks addressing her job
security but as a personal attack. I'm not sure why you're doing
Perhaps you yourself are getting in the way when you offer offense in this
way? I for one am glad that Dianne does not work at the sort of company you
describe, and there's really no way to take your remarks addressing her job
security but as a personal attack. I'm not sure why you're doing
Perhaps you yourself are getting in the way when you offer offense in this
way? I for one am glad that Dianne does not work at the sort of company you
describe, and there's really no way to take your remarks addressing her job
security but as a personal attack. I'm not sure why you're doing
I'm not sure we're not talking past each other. Let me make my case against
using device identity a bit more clear, and see if you don't agree.
Let's say we have a device, the iDroidMax, which has the nasty habit of the
screen cracking, if you perchance display a certain icon, an apple.
You're
Thanks; I was seriously considering starting something, but won't have time
for a few days, so I'm glad you dove in. I'd be pleased if you added me to
the project.
I do have one little quibble -- 'defect'. While detecting defects is perhaps
the most important use case, I don't think we want to
(See below)
On Tue, Apr 26, 2011 at 11:40 PM, Vikram Bodicherla
vikram.bodiche...@mchron.com wrote:
So coming back to my question, any advice on design for now?
The android developers blog suggests abstracting APIs like the
Contacts API. But it is not practical to go around abstracting all
I think we need to think of it as having several phases:
- Feature detection. That is, directly determining specific capabilities,
anti-capabilities, bugs, and other data that you may need to consider in a
program.
- Model detection -- determining one or more matching devices (i.e.
.
Thanks for all the help!
...Jake
BK == Bob Kerns r...@acm.org writes:
BK While one hopes he does, it's not always a good assumption. But
BK that aspect wasn't the intended focus of my remarks.
BK The point is -- the timezone SHOULD have absolutely ZERO impact
BK on the actual
This makes me want to scream. EXIF has got to be one of the worst standards
out there in common use; this is just one of the many major problems.
You'll find that virtually nothing handles EXIF well, so you'll be in good
company.
I checked the original Japanese standard, in hopes that there
OK, color me confused. Why are you expecting to do this with PorterDuff?
PorterDuff works on images (or colors) with alpha to combine them. The alpha
controls how they combine.
I don't see any way to get information from the color channels to the alpha
channel via PorterDuff. The output alpha
Um, the platform documentation?
http://developer.android.com/intl/de/guide/appendix/media-formats.html
Your specific device documentation, from the manufacturer, if you're
interested in what additional formats are supported?
Really, you kind of lost me when you start talking about people
It's a database design question, not an Android question. That's not evading
answering you -- it's probably the most helpful thing I'll tell you!
Understanding that your question really has nothing in it related to Android
will help you find the information you need, beyond anything I can tell
Generally speaking, if you need to query the schema at runtime, you're
probably not making good use of SQL -- unless you're making some sort of
schema-agnostic general tool.
Creating a table per project is not generally a good approach. It really
doesn't let the database be a database, and may
While one hopes he does, it's not always a good assumption. But that aspect
wasn't the intended focus of my remarks.
The point is -- the timezone SHOULD have absolutely ZERO impact on the
actual calculated times.
There are really only three ways to get an error here that I can see. (Chime
in if
I quite agree, and I did try to acknowledge that need in my reply.
The point of my message is to balance the real world, make it work, with
the consequences and drawbacks of that approach, so people can make better
decisions about when to compromise, what they risk by doing so, and perhaps
Ah, I love time questions. Everyone thinks time is a simple concept...
Let's look at this more closely. There are two distinct things here, being
referred to as the time.
There's the time. And there's how the time is displayed. The timezone
determines the conversion between them.
I don't know
If removing and reimporting the project works, and refreshing and rebuilding
did not -- you're working around an Eclipse bug, not your lack of knowledge.
Deleting and re-importing the project is your third-biggest Eclipse hammer.
The higher ones are:
* Creating a new Eclipse workspace and
To extend what Jens said -- and sorry for this sounding like a rant, but I
think this is a very important point that is often misunderstood, and often
causes a LOT of harm. Don't worry, I'm not ranting at you or any person in
particular.
The UTF-8 encoding of the character in question is 0xE2
Oh, one other model that may help put all this in context -- and make it
plain that there really is no other way for it to be.
The confusion here stems from confusing bytes and characters. XML works with
characters.
The encoding (UTF-8, ISO-8859-1) of an XML document refers to how a stream
of
Somebody has to wield the big hammer?
No, we could all descend into madness and chaos. Always an option.
But here's the thing: TreKing's answer is actually the most useful answer to
this sort of situation. It's not arrogance.
The single most helpful, useful advice he or I or anyone can give a
Ah, nice presentation. Indeed, the entire security model is generally
completely misunderstood.
And, as he points out, the CAs don't really do a very good job. I still
think, given our present situation, it's an important deterrent, but CAs
have issued Microsoft certs to non-Microsoft people,
If you protect your signing key, then it *does* prove that it was signed by
you, and not modified by someone else.
The difference between a cert signed by a trusted CA and one signed by you
is simply this: With a trusted CA, they can ask the trusted CA whether
that's you or not. With a
A lot depends on how you would access it.
For example, you could store it as text files, compressed into a .zip file,
along with a SQLite database with the metadata (including section boundaries
within the files). For large amounts of text, this would be much more
compact than storing the text
That works if you start the native program from the Java program. It doesn't
work if it needs to run independently.
I like Frank's approach. Generally, minimizing the amount of C++ code in an
application will make things better. In fact, I would argue you never want
to make a native C++
Mark, the point where database changes are made is in commit(). If you did a
commit(), your changes are persisted, if not, they are not. This is a
critical part of the behavior of a database.
Closing the database (or database connection) has no bearing on this. There
is nothing it is *allowed*
By setting up your LAN properly.
You will need:
1. Your LAN's DHCP server to know the proper location of your DNS server.
This is the DNS server your phone will use.
2. Your DNS server to know the names addresses of your MS machines. DNS
is how your phone (and anything else even
I mean to say Note: no -keypass parameter. It is not legal Not
-storepass. Sorry if I added to anyone's confusion!
--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To
Actually, just to pedantically clear up one potential source of confusion --
you're not getting a list of keys, you're getting a list of aliases for
entries, which can be one of three things:
1) A trusted certificate entry (what trusted means here depends on how the
keystore is being used) --
This isn't a good answer. It's not just a matter of security, but also
performance and robustness and flexibility and overly-tight coupling of
client and database schema. Such an architecture will lead to a host of
problems. For example -- if you make a change, you have to simultaneously
Sigh. Everybody here is confused, including Mark and the documentation.
The -list argument to keytool *does not take the -keypass argument.*
*
*
It makes absolutely no sense whatsoever for it to take it. It does not
provide you with any information about the private key, and thus has no need
As a side comment: I am not the slightest bit surprised that everyone is
confused.
I don't know why cryptography tools and APIs and documentation have to be so
incredibly cryptic.
Clearly the fact that *everyone *is confused should suggest that the problem
does not lie with the confused
Actually, while I don't disagree with the advice Mark gave, he's not correct
about what Java serialization is designed for, nor is there any issue of
byte-code compatibility here, because Java serialization does not have
anything whatsoever to do with byte codes.
The Java serialization
I believe the documentation is confused -- and possibly the spec on which it
is based.
Having a namespace value (null) which causes the the XML to take on some
value which cannot be determined except by examining the past program
execution trace possibly back all the way to when the document
While you are not crazy to think *null* might mean something useful, let me
point out the line of reasoning you need to follow:
Exactly what namespace did you expect *null* to give you? Why do you hold
the opinion that *null* should give you this namespace?
And exactly what namespace are you
Just to be very clear about it -- given the current reality, I suggest
viewing all firmware-defined resources as, well, infirm.
I'm just saying this is something which OUGHT to have been done
better, and could still be, by the platform team -- including the
tricky task of getting the OEMs on
, Bob Kerns r...@acm.org wrote:
While I (strongly) agree with this advice -- there is a major
downside. If you copy it into your application, and the platform
changes (an update, a manufacturer customization, etc.), then your
application's look-and-feel (including terminology) will vary
Actually, you can't have it both ways *AT THE SAME TIME*.
Having platform-defined strings only make sense for platform-defined
things. Like platform-defined widgets, where you can have platform-
defined constants for the platform-defined default values. The roles
have to be tightly defined to
I'm not happy with the other answers, though they are not really
incorrect. (The object with a hashmap of properties thing that Hari
mentions is not really a JavaBean, though some packages can use maps
as if they were implicitly a JavaBean).
I'd rather explain it from a minimalist point of view.
While I (strongly) agree with this advice -- there is a major
downside. If you copy it into your application, and the platform
changes (an update, a manufacturer customization, etc.), then your
application's look-and-feel (including terminology) will vary from the
platform standard. And, in the
MVC separation of View and Controller -- Obsolete? That is
something I have never heard of. Could you elucidate? What replaces
it? The separation in MVC exists for very specific benefits. If you
view it as obsolete, you must have a New Idea -- MVC started as a New
Idea, and I like New
surprised that the View doesn't know who loaded it,
or that the tag is not available (null tag a consider a bug).
- Brill Pappin
On Jan 13, 7:19 pm, Bob Kerns r...@acm.org wrote:
It seems to me the problem is that you're trying to do initialization
in a constructor. That is extremely
Generally, databases can make use of what indexes exist. It'll have to
do more work to traverse this index, than it would to traverse ones on
x, y, and z alone, or with x,y,z alone. And if you want it in sorted
order, it'll have to do a sort operation of some type, as the
traversal will be only
I'm going to presume you don't care about where the origin of the
world coordinate system is, but rather, you want to rotate the
coordinates to make it independent of phone orientation.
Even if you do care, it's the first step, anyway!
The key thing to realize is that you have two references
I think you have this backwards. Completely backwards.
First, neither the Eclipse IDE, nor the Android plugin for Eclipse,
are really developed by the community. While they may accept
community contributions, the main developers in are paid
professionals.
Second, if the Android paid
You don't show your SELECT statement. I wonder if you might
accidentally have localized the table name?
On Jan 8, 1:42 am, ghi80 andres...@gmail.com wrote:
Hi,
I'm an italian android application publisher.
In my free and paid applications, i use database files.
I have database file with
While it's slow enough to start that one can be forgiven for killing
it thinking it's hung, it's no where near an hour to start!
While I would certainly highly recommend more memory, I myself run
Windows 7 with 4 GB of RAM on an Intel T7600 processor, not much
faster than yours, but I just timed
1 - 100 of 886 matches
Mail list logo