« first day (1909 days earlier)      last day (3046 days later) » 

12:00 AM
^ yeah you access it by holding the handle
 
@Ahmad Why don't you use the DAO to create a list of model objects on an as-needed basis and pass that list to the adapter
 
can you elaborate?
not sure I understand
I'm using github.com/yahoo/squidb so the difficult part on top of it is that it's an annotation processor who will create my database model from a base class with code generation
 
ah libraries make it trickier
Normally I have a class that models the data
and my adapters use ArrayLists<MyObjects>
My first inclination would be to write some Class responsible for using the DAO to return an ArrayList<MyObjects> based on some criteria
Then the adapter doesn't need to worry about the DAO, just its list
 
maybe a service layer?
some service that handles that translation
not in the android service sense
i guess more of a manager
or Controller
 
12:08 AM
@DaveS so I would need to create another "MyObject" for that?
 
Yeah maybe a DB singleton looks like this. DatabaseManager.getInstance().getPostsForUser(String user);
then the singleton would access your DB and return ArrayList<Posts>
 
yeah but what model would it return?
 
yeah it would translate the DB columns into Post objects
 
@NathanielD.Waggoner but I would need another data object for that then no?
 
usually by passing some input into a constructor
or something
I mean I have a Database that stores profiles for my grill app but I wouldn't want to implement my profile lists directly from the database
 
12:11 AM
i mean im describing esentialy what dave is really
 
that seems slow
instead there's a Profile Object thats created from the DB results
 
i just don't nescesarily agree the DAO should have direct knowledge of data structures related to presentation
but thats w/e
if you're confident the presentation strucutre is "List of objects" then thats probably sufficient
if the strucutre is variable or can grow more complicated you may want to hide DA behind an organizational layer
oh
I see what you're getting at
uhm, i would have a truely dummy model object, and the DAO really just translates from database to model
and doesn't store state
 
right
That allows the user to make shallow changes for instance
 
then you commit to the DB use the DAO
 
12:14 AM
yup yup
+2
it also grants you more flexibility with refactors and such down the road
 
but the DAO could be simplified as [DB Specific Stuff][Dumb Model instance]
and updating it is as simple as DAO.update(newModel);
that way there isn't redundant fields
 
indeed, my understanding of DAO's are typically this exact thing
they're literally just translating from one model to another
OO to DB
and provide the mechanism for the add/update/delete etc..
 
yeah that's how I'd do it
 
I would definitely not pass instances of the DAO around as model objects, if that is what you were getting at before?
now i think you were asking how to maintain the DAO against the Model?
i thought it was a maintenance question originally =)
 
 
2 hours later…
2:39 AM
Netflix is here
=)
 
o/
 
How's it going Mauk mauk and Law law?
 
Not much, surprisingly chill day. Client looking for our build, client needs to chill.
Any good shows on Netflix? I can watch this lunch?
 
I love Psych
Obviously Futurama if you haven't seen it for some reason
 
2:45 AM
Im familiar with Futurama. Psych what is it?
 
It's kinda a crime show, but it's more of a comedy.
Basically Shawn Spencer starts a "Psychic Detective Agency" with his black best friend Gus and he pretends to be psychic and he solves crimes.
He's just really perceptive, you should give it a try. Watch a few episodes and become hooked.
Absolutely hilarious.
 
So Shawn is the "real" detective?
 
o/
 
He has a special "gift" where he picks up on small details most people don't
He pretends to be psychic.
 
2:48 AM
Ayt will give it a try
 
Just watch a few episodes right now. They reference over 200 movies and shows haha.
There's also a pineapple hidden in almost every episode
 
Pineapple you mean there's that fruit cameo?
 
haha really
 
8 seasons, 121 episodes, a musical.
I cried when it ended
For weeks
no joke
I've convinced 5 friends to watch it
 
2:50 AM
Damn that is a lot
 
and my grandma haha
 
I need to start cleaning up my calendar
Make room for Psych
 
YES
Law, you better keep me updated haha
I'm a Psycho
 
What about Psych?
 
Just watch it lol
 
2:51 AM
Yeh I could give you a live update, like a live tweet or something haha
 
thumbsup
 
Does MC adams into it too?
 
Not yet
 
yet
 
Hey Mauker you know this Psych thing?
 
2:54 AM
:P
 
I don't
 
Watch it
 
Netflix?
 
Join me in the dark side
 
Yes Netflix
PSA: EVERYONE SHOULD WATCH PSYCH
Muhaha
 
2:56 AM
I already have dark theme Law
 
Not sure what that means but it's scary
 
Chat dark theme
By rlemon
 
What
How
 
Chrome extension
 
You mean this SO chat room?
 
2:57 AM
Yes
 
Link?
 
You didn't know? :o
 
One of us, one of us
 
@McAdam331 PIN THE DARK THEME WOULD YA?
 
2:59 AM
ADAM AIN'T YO BITCH
HE MINE
 
There I got that dark theme
 
Everyone's my bitch
 
Thanks! Damn looks good
 
silly Tristan
 
PSA: ADAM @MCADAM331 IS ALL MINE, BACK OFF
 
2:59 AM
Yeah!
 
Pin that shit ^^
 
Yo chill
 
public class Law {
  private boolean usesDarkTheme = true;
  // TODO - Rest of class.

}
2
Check this law ;)
code previewww
 
Mauker wanna work on a project with me?
 
Is it included in the dark theme?
 
3:01 AM
Which one Tristan?
Yeah :D
Along with many things
 
Message me on Hangouts
 
Cool, I'll dig deep
 
Why so many pings?
 
Because I love you Adam
 
I bought a raspberry pi kit
 
3:11 AM
NIce
You never told me how the interview went! :'(
 
It went well I think. I'll find out soon I hope.
 
3:35 AM
@user2422196 this room requires a minimum of 100 rep for access, along with a higher Answer/Question ratio and no default username. See the room rules for information.
 
haha love those
 
Some of those got really pornographic
 
Mauker you son of a bitch
@Md.MahmudulHaqueKhan Welcome! Please read our room rules before participating.
 
<3
Hahahahahaahahah
 
3:50 AM
thank you all
good morning
 
Morning and night
Plz read the rules :)
 
Yes
 
sure @Mauker :)
It's great. I will do follow rules always.... :)
 
Are you sure?
So far you haven't.
 
4:01 AM
yes bro
 
hey bros
 
bro I am so much week for GCM can you help me plz
 
I'll give you one more chance to prove to me you've read our rules. We're not harsh people, we just ask one little thing.
This room isn't tech support.
@MuhammadUmarTariq this room requires 100 reputation for access. See our room rules for other requirements.
 
@CptEric Btw, I tested it on my pop's S4 and the image storage URI is working fine
Want me to send you the image?
 
o/law
@EvilTak Welcome! Please read our room rules before participating.
 
4:14 AM
Hi Guys
 
Sup MC Adams, you also know about this Psych thing?
 
Hey, Tak. Can you read through the rules really quick?
 
Hey I setup a GCM on my last project, I can help a little.
 
What psych thing?
 
Tristan
Tristan wants me to watch that Psych show
I feel it is a trap
 
4:15 AM
Oh. I've heard good things about it but I don't watch it personally.
 
I have read and understood the rules.
 
Welcome =)
 
:) Thanks. How are you?
 
o/
 
Good, thanks
I just want your suggestions for an app I'm making
 
4:17 AM
Sure. What's it do?
 
Go ahead, shoot
 
I watched some of them a long time ago. They were pretty amusing
 
Should I keep the custom notification background white or is it ok if I keep it the primary_dark color of my app's Style?
It's a metronome app in case anyone's wondering
 
make it match your app's style
 
Yeh we prefer the app's style
 
4:18 AM
or don't do anything to it at all (i.e. it will stay whatever it is already on any given device)
 
^ Yeah, as long as it's readable and clean I don't think you have to conform to a certain color, if it matches your app's individual style.
 
oh wait, I thought you were talking about the notification bar
 
Hmmm. The thing is, I'm conforming to a dark theme in my app, but the notification is black text on white background
 
Do you have a screenshot? That'd be really helpful.
 
a metronome like a thing that keeps track of time for music?
 
4:19 AM
Yes
 
Why would it send a notification?
does it keep count in there?
 
It's just so that the user can change the beats per minute when not in the app or at the lockscreen, and because it's a foreground service
I'll send a screenshot wait
 
So can the metronome be running even when the app isn't open?
 
Either way though I would still say your apps theme over white especially if it stays in the drawer and isn't cleared away while the app is in use
 
Yeah, I agree with Foamy.
 
4:23 AM
Looks like there's no upload button on the mobile site
I'll have to use Drive then
 
Oh. Any chance of uploading to imgur or some file sharer and giving us a link?
It sounds like what you're doing is fine, honestly. But if you want us to look over a screenshot we can.
 
I'm working on it
And this app is not even in Alpha, so don't judge the icons
 
Haha we won't
 
We dont judge here, we homies
2
 
Well, sometimes we judge. But it's always meant to be constructive haha
;P
 
4:25 AM
We judge the loss of keystores.
 
Lol
 
and inability to charge ones electronics.
 
lol
woah what
 
icons are safe though.
 
how did I
 
4:26 AM
Wtf adam?
 
weird
aww
 
idk
 
This is the barebones of my app (will add a lot more soon)
And this is the notification compact view
 
I vote change it to red with light text, like your action bar.
 
(The plus and minus here should be double plus and double minus like the "done all" icon, my friend's working on them)
That's what I was thinking too
 
4:29 AM
looks cool so far.
 
I support Foamy
 
And this is the expanded view
 
hmm
Okay yeah I like it
 
(The first plus and last minus are the double plus/minus)
 
keeping along the idea that the icons may change in the future
 
4:30 AM
does it audibly beep?
 
Yes, another problem I'm working on is using mp3 sounds
Like cowbell beats, etc.
Because right now my app just generates a sine wave and writes it to the AudioTrack
 
to play that quickly you'll probably want to use SoundPool.
 
so do you like the notification like this, or were you going to make it black with white text?
 
I was thinking either background=@color/primary|@color/primary_dark and foreground="#fff"
 
Interesting feature idea: make an option to flash the flashlight LED on the beat.
 
4:32 AM
I've noticed that the flashlight doesn't light immediately, which is why I'm using an animation
 
touche ;-)
 
Do you have any ideas for the animation? I tried a moving bar (the green thing above the start button) but it doesn't reach the ends on time
 
Can you speed up the animation duration to make it?
 
change the background color to red (or whatever) for ~300ms
 
The problem is, the speed is fine, but there is a bit of latency because my Metronome runs on a separate Task and raising the event and running the animation on the UI thread (by using Activity.runOnUiThread()) induces a bit of latency
 
4:36 AM
hmm
 
hmm
 
hmm
 
I would probably let the Activity keep it's own time when it's open rather than having it use the other service.
 
You know what worked well for me, flashing ripple animations on each "tick", but I thought that a continuous running animation would be better
But it still will be in the other thread, so doesn't make a difference
If I run the metronome on the main thread, the UI becomes unresponsive (obviously) and it even loses time sometimes
 
use postDelayed(Runnable)
 
4:37 AM
If I use that "animation on tick", the 10ms latency is hardly noticeable
Let me look that up
Ah, but you see, timing is really bad on mobile devices
If I can,I'll take a screenrec of the animation and upload the video
 
something like this:
Im not sure the delay math is correct
but that's the idea at least
should be 60/bpm maybe?
I don't know, I'm too tired for this
 
That works, but it doesn't keep time well
Especially on old devices
It still runs on another thread, so not much different than my implementation, which just synthesizes the sound instead
 
hmm
it runs on the main thread
but does not block
you would have to change new Runnable() to new Thread() for it not to run on main thread.
 
Okay, but I've experimented with such methods, and they don't keep time well.
 
what are you using in your thread? infinite loop and checking System time?
 
4:47 AM
Nope, I'm dynamically generating a sound in an infinite loop (actually while(playing == true))
And this
3
A: Play a sound every N milliseconds

AlesquiThe alternative of looping through a synthesized sound seems to be the best choice for now. There was a great session about audio on Google I/O 2013 called High Performance Audio that I would certainly advice watching for having a deeper understanding on how the system works and what problems the...

 
hmm
learn something new every day
I think the visual on the screen is never going to be perfect then
 
Probably
I'll just keep the animation on tick thing then
 
maybe with some lower level graphics framework?
I've been playing around with Libgdx the game framework. It is built on top of OpenGL. I would guess you could more precise using something like that.
anyway I'm off to bed. G'night
 
Good night
 
@Md.MahmudulHaqueKhan After refusing to read our rules and then going silent when I mentioned it I'm removing your access.
 
5:03 AM
Savage
 
I try not to be the bad guy but it's late and I'm not gonna risk going to bed with someone like that around.
 
:P
 
@mohammedalisunasara This room requires a higher answer/question ratio. Give a few more answers and request access in the future. See rules.
I'm nice, honest.
 
5:19 AM
I know you guys hate low quality cat gifs, so here's a high resolution one.
I'm going to bed because I'm falling asleep at my desk. Goodnight all
 
Goodnight!
 
user457812
6:32 AM
@TristanWiley Yes. I made Go the primary language for new projects at work.
 
6:48 AM
Goodmorning!!
I'm super early today!
 
good morning!
same hereç
i entered the office like 20 min early
@LawGimenez , yeah, could you send me a screenshot of the photo being shown on the image location, and of your device info ( device brand, name, OS version..) ? it's to show my coworkers & the client.
 
7:39 AM
\o
 
heya warren
i like xubuntu so far
 
I entered 2 hours and 20m earlier than yesterday :D
surprised there were so many people already
 
7:55 AM
lol
 
8:10 AM
If you like gif cat, take a look at play.google.com/store/apps/details?id=fr.xjet.tweetyhunting LOL
 
\o
 
lol at that app.
 
8:35 AM
Hey, can anybody help me?
 
watcha need?
 
I just need some help with sound
 
shoot.
 
I'm reading a sound file from a stream
And am converting the bytes read (PCM) to a double array with samples
But I can't figure why my sound is so noisy
 
pcm = wav?
if it's noisy it might be related to the sound quality
look at this answer
16
Q: Using AudioTrack in Android to play a WAV file

RichI'm working with Android, trying to make my AudioTrack application play a Windows .wav file (Tada.wav). Frankly, it shouldn't be this hard, but I'm hearing a lot of strange stuff. The file is saved on my phone's mini SD card and reading the contents doesn't seem to be a problem, but when I play...

the accepted one
 
9:06 AM
Hey, do you know how to not have all flavors in Maven artifacts/publication?
or maybe how to remove some file from uplaodArchives
 
@CptEric nice, I have some small issues with 15.10 so far, but nothing serious
 
i've had some too , but they are just missing packages
and that's enough common in linux distros to not even trouble me.
 
randomly at startup my mouse pointer is not visible or my keyboard layout is set to US instead of German...
 
ouch
hasn't happened yet
would be funny to start typing in russian characters.
 
setting the right layout is a one liner, so not a hard thing
but that reminds me to make an alias to make it even easier :D
if you do a lot of stuff in the terminal, I recommend to make often repeated commands as aliases
 
9:25 AM
hmm
i'm ashamed i don't remember how to do that
 
it is just a file in your home dir named ".bash_aliases"
some people shared what they have in that file, if you need inspiration: ubuntuforums.org/showthread.php?t=1374947
 
[alias][blankspace][command] ?
ooh cool
 
o/
speaking of .bash_aliases
Dec 3 '15 at 16:29, by OcuS
I just put echo "sleep 1" >> ~/.bashrc on the first line of .bashrc on a collegue's computer when he went to the toilet, lets see how long before he notices #soFunnyMe
He didn't say anything yet ^^
 
that is my newly created one: pastebin.com/c86dQhR7
I like the fact that you can even create functions there
 
cool
so running that function name anywhere runs the code inside?
 
9:30 AM
yes
 
great.
 
just type restartAdb and it is executed after you typed your password
 
will try to alias 'i' to sudo. i mkdir potato, i apt-get upgrade,...
 
I have set a password for su, so that I can login as root and do administration without typing "sudo" dozens of times
it also separates the normal bash history from the administrative history, so you can check what you have done earlier
 
@OcuS so it just takes 1 second more to do things?
i don't think he'll notice.
 
9:39 AM
it appends sleep 1 at the end of his ~/.bashrc every time he opens a term ; which, itself, loads the ~/.bashrc. So it takes more and more time to start
(except if I made a mistake... ^^
 
nope, you are right
 
hmm ok
i'm not a bash expert anymore, need to relearn many things.
 
o/
made cookies, taste good :)
 
nice
 
morning homies
 
9:53 AM
o/
 

« first day (1909 days earlier)      last day (3046 days later) »