« first day (1137 days earlier)      last day (2871 days later) » 

6:00 PM
@EBrown You'll soon be starred
2
 
@syb0rg Noty.
2
 
Maybe they ran out
2
 
Man, Spotify really torques me off.
2
Many of the songs I like they keep removing and saying "This track is not available in your country."
2
 

what the star

2 hours ago, 1 hour 33 minutes total – 18 messages, 6 users, 18 stars

Bookmarked just now by ardaozkal

 
0
Q: Data analysis pipeline

user2117258I'm reading in files in the following format: SN971:Xap108:1:1101:10.00:1067.90:0:1 MOUSE_chr1 95333658 95333666 + MOUSE_chr1 95302516 95375494 GENE:Hdlbp ACC:NM_133808 - CCCTCCCACCACGCCCGGCG BC:CCCTCCCACCAC UMI:GCCCGGCG FEAT:CODI...

 
6:04 PM
@ardaozkal >.>
 
@ardaozkal I'm out now.
 
At least they didn't remove my Jethro Tull.
WHAT
THEY GOT RID OF ELECTRIC AVENUE?
I'm done with Spotify.
 
I guess it's
Avenue unplugged
 
-1/10
That was bad.
 
it was amazing
 
6:11 PM
Just horrible.
So bad.
 
jealous you didn't come up with it
 
No, I'm actually feeling sorry for you right now.
I'm disappointed you actually thought that was any good.
 
@EBrown I'd get rid of it too
but I can't :/ paid early
 
@ardaozkal I haven't. :)
I have to check out Groove Music and see how it compares.
All my Taylor Swift music got removed
2
I guess I can keep Spotify.
 
well I increased my mobile pack and am paying 10tl more every month, I got extra 3gb and 1000 worldwide minutes and free 1 year spotify premium.
 
6:13 PM
Ah.
I have payed for it for years.
 
the ads suck
 
Yeah.
That's why I bought it.
 
0
Q: PyCharm won't work

Ara Yaghsizianprint "Hello Ara" That's all I want to do. When I open the edit configuration window there is an error message, Please select a valid Python interpreter. I don't really know what this means. In the python interpreter pulldown menu the only option is Project Default (none). (I downloaded ...

 
LOL
 
til: EBrown is Daniel Ek
 
6:15 PM
Who?
 
@CaptainObvious That sounds on topic....
 
All my Hootie and the Blowfish songs are gone.
Spotify get out of my life.
@ardaozkal LOL
Nah, he's 12 years older than me.
CCR is still here, I suppose it's alright.
That screenshot is hilarious.
 
...but do they have Garbage, or has it been removed?
 
I'm only happy when it rains
great, now I have garbage playing in my head
 
6:32 PM
LOL
I have "Never Been Any Reason" stuck in mine.
I've had it for days.
 
0
Q: Javascript / JQuery Memory Guessing Game

Alon BukaiHey I would love some code review for my Javascript / JQuery Memory Guessing Game. Link: http://codepen.io/AlonBukai/pen/NrNEyG

 
> Hyperlinks in a worksheet: 66,530 hyperlinks
Seems like a weird limit.
 
off-by-five is a thing y'know
 
That's not off-by-five.
 
lol
 
6:41 PM
Look at the number: 66,530.
 
off-by-995 is a thing y'know
 
You're thinking 65,536/65,535, but this is 995 more than that. Lol
 
0
Q: Hardest Guessing Game Ever Python 2.7.11

Jenny Wen`from random import randint from sys import exit ans = randint(0, 1000) guess = int(raw_input("Guess a number between 0 t0 1000:")) if guess == ans and guess.isalnum: print "Great Job! You won the Hardest Guessing Game ever!" elif guess != ans: print "Good try. Try and guess again." exit(...

 
@CaptainObvious I can make harder
randint(0, 2147683545)
 
randint(-sys.maxsize, sys.maxsize)
 
6:57 PM
@syb0rg better
why int tho?
Lets use float to make it harder
 
> Guess the number
> 2
>
> Wrong. The number was 1.999999999997
5
 
@EBrown my favourite part is that they don't tell you it has been removed. Its just silently removed until the next time you want to lisetn to it.
Any EF users here? Need opinion on pattern usage
 
hides
@DanPantry is that the apple thing?
 
@Mat'sMug Spotify
@Mat'sMug Let me whip up a comparative review gist
 
@ardaozkal random.uniform(-sys.maxsize, sys.maxsize)
Good bloody luck guessing that
 
7:00 PM
IDK, I'm old school. I buy CD's and no apple steals my music off my computer and then makes me pay to listen to it.
 
while true
      raw_input("I picked a number between -33746852638527234658234658234658435628 and 33746852638527234658234658234658435628")
      echo "Wrong, try another number."
oh wait its python
 
Latter is what we have now, former is what I think is probably the better option
Previously DbContext was thread-scoped, which I believe leads to bad practices (for one, it assumes that all connections have their own thread, which for IIS is true but Project Katana is completely false)
...What's happening to me... I'm caring about a strongly typed language.....
Also, first "Cons" in repositoryishpattern should be "Pros".
 
@CaptainObvious You almost snuck past me
 
Shouldn't DbContext live in request scope?
 
@Mat'sMug I was under the impression DbContext should be created for one unit of work
So, for example, creating an appointment would be a unit of work because it is one transaction
 
7:11 PM
< unless my guesses of who will win the elections are correct, I'll be a pony for a month.
 
Didn't look at the gist yet... but I assume you have the DbContext wrapped with a simple IUnitOfWork interface and constructor-injected such that the IoC container controls the context's lifestyle
 
@Mat'sMug uhh.. that's the latter, yes.
and what we have now.
The issue is that falls down when you have something that requires transactional behaviour (like modifying two things at once)
Maybe that's a problem with our current architecture, though.
 
It does assume one transaction per request..
 
@Mat'sMug Yes, but if both service A and service B require a dbcontext, even if they are the same db context, they will both execute SaveChanges at different times, thus B can fail while A succeeds even though it should be in a transaction
 
wait a sec, so you have service A doing thing A and service B doing thing B, and both thing A and thing B need to be in the same transaction?
 
7:21 PM
(Y)
Now you see the problem, which is why I am thinking that our services are doing too much
And that the real solution lies in between the two approaches
sticking with DbContext being injected but moving more stuff to a factory or something
If you look at the gist it will become clear: Our schema is absolute rubbish. Creating an appointment requires creating an entry in the Appointment table but also the Calendar or History table depending on a set of criteria
Modifying the schema would be a good idea but it's not possible now for backwards compatibility reasons
 
why would service A call into service B?
 
Because the way the app is currently architected is such that service B is doing some work and service A is doing some work instead of service A/B not doing any work (and just saving stuff to a DB)
 
        dbContext.Appointments.Add(model);
        dbContext.CalendarEvents.Add(CreateCalendarEventForAppointment(model));
        dbContext.SaveChanges();
this looks right to me
 
Yes, we don't have that.
We have the secnod model
So the real answer is a mix of both sections
 
let the calendar service do its thing, and have the appointment service do its thing - the two are separate things that shouldn't know about each other IMO
 
7:26 PM
I guess this is why they say software is hard. it's easy to write code, it's hard to write good code.
 
@Mat'sMug Well, creating an appointment necessarily means creating a calendar item... with properties of the appointment. So at the very least, I'd need another "layer" above those services.
They should not have anything to do with each other, but if either fails, the other needs to be rolled back due to the nature of the schema.
 
or, make an overload in the appointment service, like
void Add(DbContext,CalendarEvent)
so the appointment service can call the calendar service and pass the transaction along with its request
 
Feels like a hack, but I don't think I'm getting any clean solutions with this
 
it feels like a hack because it's not constructor injection... but it's dependency injection nonetheless. via a method parameter.
 
7:31 PM
Well, it feels like a hack because what that achieves is code re-use (which is what I'm trying to do) without breaking transactional purity
Maybe a better idea would be to refactor the logic of the Add method (in all but actually interacting with the dbcontext) into a separate class
 
constructor injection is the preferred way of injecting dependencies. it's not the only way to do it
yes
 
@Mat'sMug I agree, it seems my choices are method injection (which feels dirty) or refactoring logic out
 
void Add(CalendarEvent calendarEvent)
 
I feel really uneasy about the current solution simply because it depends on DbContext being thread-local in order to save changes atomically, so anything is better than that
 
^ this one should call Add(_context, calendarEvent)
software is like a work of art: it's never really "done".
...and most of the time it's "beautiful" only when you look at it in a crooked way
or if you're @rolfl
hey @rolfl :)
 
7:36 PM
Hello @rolfl
Finally some on-topic questions are being asked
 
1
Q: An interesting use of the reduce function to convert tab-delimited data into JSON

nakaminThe data: Marry Poppins red bicycle 80 2 Marry Poppins glass vase 20 8 Abe Lincoln gold ring 1 100 Marry Poppins umbrella 5 50 Steve Rogers video camera 1 100 Abe Lincoln president chair 1 1000 Marry Poppins blue dress 2 200 The function: var fs = require('fs'...

0
Q: Can I simplify with Higher Order Functions?

Alex GI am working my way through FreeCodeCamp's Javascript challenges and this one took me a minute. In this one the goal was to create an array with the highest values from each array as its elements. I am currently using for loops to iterate through the various arrays and arrays of arrays. I wante...

 
8:00 PM
Ripe zombie; open question with answers, at least one answer having score 0, no answer having score > 0: Image downloader class
 
0
Q: AsyncCommand using MVVM and WPF

Bruno KleinGoals I want to be able to call async code using the MVVM pattern I want to be able to add loading animations/screens without having to add properties for each command on my viewmodels I may want to be able to cancel these operations This is what I came up with public abstract class Command...

 
8:20 PM
0
Q: Countable and uncountable sets in .NET (clean version)

Dmitry NoginSorry, it used to be some retired garbage in Countable and uncountable sets. Now and here it is clean. P.S. I would not like to say that this stuff is about to replace functional programming :) No, it is just about predicates becoming a full featured objects, so you can do math on them in the f...

 
You really should use PHP's built-in functions to handle password security. Make sure that you don't escape passwords or use any other cleansing mechanism on them before hashing. Doing so changes the password and causes unnecessary additional coding. — Jay Blanchard 53 secs ago
 
@Mat'sMug I worked out the problem with my architecture
appointment + calendar item shouldn't really be linked, right?
ilke an appointment can exist on it's own
surely, then, either the DB or the client should orchestrate that interaction
I realised that when I realised there was another interaction like that in our app: creating a query could allow you to create your own contact at the time
currently, the service creates the contact for you based on a string (0 | number | string)
really, the client should create that contact and then submit the query
 
You might want to check out Code Review. Stack Overflow is better for fixing broken code, not improving working code. — Mike C 38 secs ago
 
i mean, if the server is just an apis erver it should not care about the abstractions of the client, and that's where I've been going wrong
 
Just delete all, (leave the place) and rebuild
 
8:38 PM
This kills the project @skiwi
 
monking
 
@Quill morning
 
Monking
My clipboard is on the fritz...
 
Yay, interesting Rust stuff again
#[inline]
fn get_unchecked(&self, index: usize) -> bool {
    let (data_index, remainder) = self.compute_data_index_and_remainder(index);
    let element = unsafe { *self.pointer.offset(data_index as isize) };
    (element & (S::one() << remainder)) != S::zero()
}
 
8:54 PM
I asked 2 question here because I thought they might be related, one is putting x in missing and one is copying from row in missing.Also the next problem is more of "how to improve" like rather than "what is solution". So can can I ask it here in SO or I have to ask it code review? — Eular 56 secs ago
@SergeyA I think it depends on how mired in the dark ages your code reviewer is. It is a known and designed-in feature of shared_ptr, because the deleter is carried with the shared control block. Anyone who does not realise this has no business reviewing code. Furthermore, any modern (i.e. less than 10 years old) compiler will warn when virtual destructors are required but not declared. — Richard Hodges 57 secs ago
 
One more vote needed to reopen (if you deem it so): codereview.stackexchange.com/q/131949/27623
 
Yuck, C# boilerplate.
 
9:16 PM
From your description, it sounds like this question might be a better fit for Code Review. — John1024 38 secs ago
 
@RubberDuck TIL nulling a Collection reference that contains thousands upon thousands of object references apparently does not cause a memory leak.
Just tested both with adding 1024 x New Class1 references in a tight loop, monitoring the EXCEL.EXE process in task manager; it seems the memory leak is a story to scare kids when it's late - nulling the reference does the job. — Mat's Mug 32 mins ago
3
Just deleted an upvoted SO answer based on that finding
 
9:26 PM
Monking
 
Hail!
♪ Haaaaail to the kiiiiiiiiiing ♪
 
gurumble....
 
been a while @rolfl, what have you been up to?
 
So busy at work and home I have no time for fun.
Still building a whole new datacenter and control point.
You know, I was about to have a nap..... and I think I still will.
 
aw.. we're missing a snakes & ladders entry :)
 
9:36 PM
it's still stuck in the AbstractBoardGameFactory ;-)
 
If your code works as intended and you've tested it and you want to know if it could be implemented better, or improved in any way, you should head over to Code Review. If there's no specific problem with your code, the question is off-topic for Stack Overflow. — Mat's Mug 1 min ago
possible answer invalidation by Jamal on question by nakamin: codereview.stackexchange.com/posts/132001/revisions
 
9:52 PM
0
Q: Render SVG background with Gradient

MikeiLLI'm new to and still fairly confounded by SVGs. So feeling pretty happy with the following hobbled together SCSS code demonstrated here. //Functions to create svg backgrounds: @function _buildSVG($bg, $width:'100%', $height:'100%', $viewboxx:'0', $viewboxy:'0', $viewboxw:'274', $viewboxh:'510'...

 
@Mat'sMug feel free to write one
 
I'll make one in Excel-VBA before I go through the pain of making a JAVA one. Because yes, it would be JAVA and not Java. I know me.
3
 
Whoops just figured out after mentally debugging my bit vector that I could not set a bit to false anymore once it had been set to true
 
-2
Q: How do I add multiple enemies trying to attack my character? (also how do i make him shoot projectiles to defend himself)

Dhairyaimport pygame import time import random pygame.init() white = (255,255,255) black = (0,0,0) red = (255,0,0) green = (0,155,0) display_width = 900 display_height = 700 gameDisplay = pygame.display.set_mode((display_width,display_height)) pygame.display.set_caption("I'll think of a name later"...

 
@Quill you're a mod now? congrats
I suppose protemp as only Arqade had elections lately
 
10:07 PM
hey look who's blue! congrats @Quill!
 
Enjoy those chat flags. ;-)
 
I guess we'll see you in TL :)
 
I already play with chat flags ;)
thanks guys :)
 
0
Q: Project Euler #49 Prime permutations

denisToday I tried solving problem #49 from project euler .net which reads : The arithmetic sequence, 1487, 4817, 8147, in which each of the terms increases by 3330, is unusual in two ways: (i) each of the three terms are prime, and, (ii) each of the 4-digit numbers are permutations of one anothe...

 
10:26 PM
@Mat'sMug who ever said it did? It's an urban legend caused by someone who once didn't implement a COM library correctly. The real memory leak problem is with circular references. Avoid circular references and you're fine.
 
I said it. ...then I deleted my answer.
3
 
Btw grats @Quill! And good to see you stop by @rolfl
Lol
 
TTQW
 
Oh. Btw^2: Pointers in C# are a PITA
I've no idea if I'm properly freeing memory or not...
 
Congrats @Quill!
 
10:36 PM
Grats @Quill I did see your blue name but didn't realise you were a mod til now ;)
 
nah, I'm not actually a mod, I just modified all of my userscripts to set my name to blue. chances are you probably have at least one installed
 
one is by you but I forgot which
 
I'm gonna pimp this one-away question, which is also my firs "JAVA" question.
 
@ardaozkal the first and last
 
thinking of it, why do I even have popcornse enabled? It doesn't work for >10k or on Firefox. or both.
 
10:46 PM
yeah, somehow firefox installs are borked... I really need to take a look at those
 
You should use firefox anyways. Chrome is too cpu-hungry and I don't really like having everything synced with google (chromium is better).
 
I might start using Safari... they have ES6 full compliance too
 
isn't safari on windows discontinued?
or are you on mac?
 
Mac, mostly
 
Ah.
I used to use Edge but hopped to Chrome for adblock and lastpass and switched to firefox for reasons above and the fact that I can sync data between pc and phone (like in chrome), and the phone version support extensions.
 
10:58 PM
Okay. iPhone has handoff which supports Firefox and Chrome, so I didn't really need to use Chrome on mobile, which is cool
 
11:10 PM
1
Q: finding the prime factors of positive number in c

PhutiI have an assignment to write on the standard output, the prime factors of a positive number displayed in ascending order and separated by '*'. my code works, I need help reviewing it, before I submit my work. Allowed functions: write. #include <unistd.h> void my_putchar(char c) { write(1,

0
Q: Codewars "Find the Parity Outlier" code

zthomas.ncI completed this Codewars exercise. Here are the instructions: You are given an array (which will have a length of at least 3, but could be very large) containing integers. The integers in the array are either entirely odd or entirely even except for a single integer N. Write a method ...

 
11:31 PM
0
Q: Swift: Encoded Image pass to server

johnyald let theImg = imageview.image! let imgrep = UIImageJPEGRepresentation(theImg, 0.5) let b64 = imgrep!.base64EncodedStringWithOptions(NSDataBase64EncodingOptions.Encoding64CharacterLineLength) let replaced = b64.stringByReplacingOccurrencesOfString("+", withString: "%2b") I want t...

 
11:51 PM
0
Q: Pig Latin converter in Python

Hannan RhodesHow is it and can it be optimised? sentence = input("Enter a sentence you want to convert to pig latin: ") sentence = sentence.split() for i in range(len(sentence)): if sentence[i][0] in "aeiou": sentence[i] += 'yay' else: sentence[i]=sentence[i][1:]+sentence[i][0] ...

 

« first day (1137 days earlier)      last day (2871 days later) »