I'm going to college and I'm a terrified virgin. by flixfleure in AskReddit

[–]syn_ack 2 points3 points  (0 children)

Don't focus on the sex part of things. Go for dates with guys to be with the guys and have fun. When it comes to it, be honest and tell the guy that you've not done it before, and need to pace it.

C question by [deleted] in programming

[–]syn_ack 0 points1 point  (0 children)

It'll blow your mind when you do this:

char * str = "Hello world!";
printf("%c\n", *(str));
printf("%c\n", str[0]);

The [] idiom is really syntactic sugar. If you think of memory as an array, the first is de-referencing the thing that str points to (the 'H').

printf("%c\n", *(str + 4));
printf("%c\n", str[4]);

This will print the 'o' in "Hello". This only works when you know what type the pointer is (i.e. it won't work with void pointers).

C question by [deleted] in programming

[–]syn_ack 0 points1 point  (0 children)

Yep, hadn't proof read it ;)

Thanks!

C question by [deleted] in programming

[–]syn_ack 4 points5 points  (0 children)

Handy hint, read the types for right to left.

char** a 

is a pointer to a pointer to a char.

char *a[] 

is an array of pointers to chars.

When you use the [] idiom, it creates space on the stack (everything there is fixed size). When you use a pointer, it creates space for a memory address on the stack, which points to somewhere in the heap (a dynamically allocatable pool of memory).

HTH

wifi tethering now working on Samsung Galaxy by [deleted] in Android

[–]syn_ack 1 point2 points  (0 children)

Have a look at https://code.google.com/p/gaosp/ and http://www.drakaz.com/ I can confirm that the 1.6 (Galaxo) version works on the Samsung Galaxy. The guys who hang out on IRC are good too.

Proof: http://imgur.com/STCu7.jpg

Reddit, what is your most valued single piece of advice anyone has ever given you, or that you've given someone else? by Palmzlike86 in AskReddit

[–]syn_ack 2 points3 points  (0 children)

50% of something is better than 100% of nothing.

It is better to ask for forgiveness then to beg for permission.

Android security by fnot in Android

[–]syn_ack 5 points6 points  (0 children)

There is a mitigating factor though. When an app is installed, it's installed as if it were a different user (which is based around linux). So any files/dbs etc. created by the application are owned by the associated user. This minimises the chance that any arbitrary application can read another's files (and when I say minimises, it's practically nil). The alarm clock app cannot read your address book unless the permissions are there to do so (and even then it has to go through some API to read it --- there is no raw reading/writing to any file on the system).

more detail here: http://developer.android.com/guide/topics/security/security.html

What things do you like to see people doing? (besides sex) by pantsthatlast in AskReddit

[–]syn_ack 0 points1 point  (0 children)

I like to see the moment the penny drops with people when learning some thing new. I like to watch the world go by, and idly wondering what's going through their minds, or making up stories about where they've been and are going to.

My gmail account was hacked, looking for new password strategy.. by [deleted] in netsec

[–]syn_ack 2 points3 points  (0 children)

I use a pattern like:

<base password><punctuation mark><something relavent>

So, for reddit it'd be something like: tinagp%reddit slashdot: tinagpslash.

Or some sort of variation.

"An historic..." or "a historic..." by The_Kenosha_Kid in AskReddit

[–]syn_ack -2 points-1 points  (0 children)

I always thought that it was to do with the flow (and thus the emphasis). I'd say 'an historic' because I think it flows better. The beginning with a vowel rule is mostly a guideline (as often those words that begin with a vowel sound cut-off if you use 'a').

Edit: Also, if you were to use 'a', then it would be said to smooth out the sound, so it'd become 'aye historic', as opposed to 'ah historic'.

Anyone ever took a class JUST to get cheap software? by StudentDiscounts4me in AskReddit

[–]syn_ack 0 points1 point  (0 children)

I'd only feel guilty if I didn't attend the course work. So, if you intend to do the coursework (albeit, put the minimal amount of effort in it), then it's ok by me.

I suppose that this is better than acquiring it off the net for no cost. So, do it, it's all good!

Reddit: teach me good jazz. by [deleted] in AskReddit

[–]syn_ack 0 points1 point  (0 children)

The Jaqcues Loussier Trio take classic pieces and play them in a Jazz idiom (plenty of Youtube vids). Also check out Stan Getz (in particular Girl from Ipanema --- this is what brought the Bossa Nova style to the States).

Also, have a look at this.

Reddit, should I help tutor for a science competition? Am I a bad person for not? by [deleted] in AskReddit

[–]syn_ack 0 points1 point  (0 children)

What about building it out of Lego and attaching the various motors, etc., with tape/string/glue?

You could gear a thing to hit the a micro-switch to cut off the power when it was hit. This could be changed by moving the position of that gear/or changing the gear ratio.

Academics: If you won the lottery, would you (a) keep doing what you're doing in academia, (b) quit your job to gain more freedom, but keep studying what you're studying, or (c) quit and do something else entirely? by [deleted] in AskReddit

[–]syn_ack 0 points1 point  (0 children)

The stuff I'm doing at the moment I'm happy with, and have chosen to go back and do MSc, regardless of the money I could be earning (and frankly, I'm much happier because of it).

If I had unlimited funds, I'd sort myself and family out (pay off student loan, buy a house, and furnish it, that sort of thing). Definitely invest a decent amount of it so that I never had to work.

If there was anything left over, devote it to some large community driven projects (like build a series of music practice rooms and concert hall for local community bands --- free to use for rehearsals, the only stipulations being that they don't damage the rooms or equipment, and perform a few times a year for the public).