« first day (689 days earlier)      last day (3330 days later) » 

9:00 PM
@JeroenVannevel that is exactly what I was thinking.
I am just going to jump in and see what happens
 
@SimonAndréForsberg kidding right?
 
@JeroenVannevel Did you get tests working in your WS app?
 
Yup, 50 of them
What wouldn't work about them?
 
I tried, and I had them all written, but it was throwing errors about having multiple projects in and not being able to access things, and I don't remember it all.
 
That's just a tiny bit vague
 
9:01 PM
@Mat'sMug I think it's more accurate to say that you saved a user!
 
I tried doing them the standard C# application way, and the WS app way, and neither worked.
 
It's just like any other test though..
 
I'll try adding them if I get another full page written in one paper and another done today (not likely).
 
@SimonAndréForsberg not without Duga's help!
 
That is what I thought, but it was blowing things up.
 
9:02 PM
Add a reference to your WS app/WinRT component and.. you're done
 
I did.
That was the first problem I solved.
I've changed some things since then, so maybe it will work better next time.
 
0
Q: Torrent File Remover in python3

Chrisscript to locate torrent files, and if they have been seeding for 2 weeks, delete the files. I realize the comments are overboard, the reason for that is its being shared with people who don't program. What should I have done differently? import os # for listdir(), path(), remove(), and get...

 
@Mat'sMug Always happy to help! But I would be nothing without you guys!
 
@Duga Are you building up for the integer wrap-around in your pings?
3
 
I wonder how many notifications @Duga has
about half of 'em probably come from the VBA chatroom...
 
9:13 PM
Only half?
Well, I suppose Programmers and PPCG probably ping her too.
 
in VBA, Feb 22 at 5:21, by RubberDuck
Goodnight @Duga.
2
lonely duck?
 
@Mat'sMug Somedays
 
in VBA, 28 secs ago, by Mat's Mug
woot!! 30th star!!
 
Does anyone know what version of C# shipped with VS 2008?
 
3.5 I believe
2003 was 1.1, 2005 was 2.0, ..yup, 3.5
 
9:22 PM
@Hosch250 I don't think I will actually check them until the next Winter Bash, when I will equip a hat.
Unless I can get a moderator to put a hat on @Duga
 
ouch!
@SimonAndréForsberg ah-ha! so you're running then!
 
Why does it take this to save a workbook with C#??
wb.SaveAs(Path.Combine(filePath, fileName), Excel.XlFileFormat.xlOpenXMLWorkbook,
                        Missing.Value, Missing.Value, false, false, Microsoft.Office.Interop.Excel.XlSaveAsAccessMode.xlNoChange,
                        Missing.Value, false, Missing.Value, Missing.Value, Missing.Value);
 
because COM interop in C# 3.5 sucks?
 
VB version
wb.SaveAs(filePath & fileName, FileFormat:=51)
 
named parameters. VB had them in VB6...
 
9:24 PM
@RubberDuck I thought that changed recently
recently being C# 4
 
it did
 
It did. Yes. This is SQL Server 2008, so I think Mug is right. 3.5
 
@Hosch250 Programmers don't often ping it. And PPCG doesn't have it.
@Mat'sMug I can't say anything about whether I will run for that or not. It will depend on how my situation is on election time.
 
yeah yeah
you'll run
 
I'm not Forrest Gump
 
9:30 PM
I'll quote you on that when you run
 
-1
Q: How to make this set of if statements in php code better

Ricardo ParroHow can I simplify this php code if(isset($email) && !empty($email) && isset($phone) && !empty($phone)){ $partQuery = 'account_id = '.$account->id.' AND (phone = "'.(int)$phone.'" OR email = "'.$email.'")'; } if(isset($phone) && !empty($phone)){ $partQuery = 'account_id...

 
@CaptainObvious How to make this question and title better
I didn't say it was off-topic ;)
 
cough
 
You probably want to ask this question on the code review codereview.stackexchange.comMax Brodin 38 secs ago
 
Welcome to Code Review! I'm not the downvoter, but I think it would make a much better post if you included more context, included a bit of a description of what your code is achieving, and changed the title to something a bit less general - everybody on this site wants to make their code better ;) — Mat's Mug 5 secs ago
 
how do I run tests on a console application?
I am totally lost here. trying to follow along with msdn.microsoft.com/en-us/library/ms182532.aspx but use my code instead of their examples
 
@Malachi same as on any other application
 
this code must be really bad if I can't figure out how this is supposed to work....it doesn't look all that hard.
 
what are you having trouble with exactly?
 
@JakenHerman Without more context, this would be closed on Code Review and is just as bad there as here. — Simon André Forsberg 54 secs ago
 
9:44 PM
I am trying to write the test for the outcome of the method I just created, but it's not showing up in the intellisense, so I think I am doing it wrong...
this code is not extendable at all. if I wrote it I would slap myself right now....
 
You don't call methods
Methods are called for you
Have you added a reference to your console app in your test project?
 
yep
I have the using statement up there
 
reference + using statement, right?
 
is there a Test menu on the VS menu bar?
 
@JeroenVannevel yep
 
9:46 PM
Test > Run All Tests
 
@Malachi what method are you talking about? What is the exact problem?
 
depending on the version and the plugins, you might also be able to just right-click the test class and select "run tests"
oh wait, nevermind
 
I haven't written the test yet
 
what's the code you're trying to test exactly?
(just the signature)
 
I never EVER want to see the words "Ben and Jerry's" again.
 
9:49 PM
namespace AttorneyEventEmailer
{
class Program
public bool CheckSendNewEvent()
{
 
dirty dirty ssis c# code.
I'm gonna go take a shower now.
 
@Malachi the class is implicitly private
 
One thing you could do to reduce the length of your code is get rid of the unnecessary newlines which take up so much space. Another is to post this on Code Review, which is designed for exactly this. — QPaysTaxes 1 min ago
 
that is the code under test
 
make the class public
 
9:50 PM
that would probably help....duh....
 
and that's why I don't like implicit stuff
 
now it's working the way I anticipated
thank you @Mat
 
no problem, anytime ;)
 
@Mat'sMug internal
 
really?
 
9:52 PM
Actually, the same question has already appeared on Code Review. The solutions proposed there are quite varied. — Cary Swoveland 53 secs ago
 
sí compadre
 
and I thought the default implicit visibility was private all this time...
 
135
Q: Internal vs. Private Access Modifiers

Jim FellWhat is the difference between the internal and private access modifiers in C#?

So that is what internal does.
 
I know the difference between the two
 
If I learn anything else today, my brain will pop.
I already have a headache :(
 
9:52 PM
I often mistake as well. I don't like implicit access modifiers either
stuff's ugly
 
124
A: Default visibility for C# classes and members (fields, methods, etc)?

OdedAll of the information you are looking for can be found here and here (thanks Reed Copsey): From the first link: Classes and structs that are declared directly within a namespace (in other words, that are not nested within other classes or structs) can be either public or internal. Internal ...

 
Me neither.
 
sorry for your popping brain, @Hosch250 ;)
 
I have a feeling I should make a private variable internal in my program.
 
internal is over-rated
but sometimes useful
especially when you're making a framework or exposing an API
 
9:54 PM
This is just a boolean flag value that needs to store a value that is only used in a couple methods stored in the same file.
It doesn't need to be accessed by anything else, and I don't even like any of that file.
I need to rework that sometime.
 
then private is fine
think of internal as being public within the assembly
 
internal variables indicate encapsulation problems
that should be a property at the least
 
OK, I'll leave it.
If I can do one of two things, I can get rid of it entirely.
 
ooh good catch @JeroenVannevel
 
Off to learn another new thing in the WPF room, please call the police to pick my brains up off the floor.
 
9:56 PM
I think internal is probably better in most cases. There's a way to get your unit tests to see internal members, but I can't recall off the top of my head.
 
[InternalsVisibileTo]
 
@RubberDuck internal over public, not private
 
Definitely don't expose things as public when they don't need to be
just use the above assembly attribute
 
Oh. Yes. Yes.
Sorry. Catching up.
 
@JeroenVannevel that's something I tend to do.. make everything public - and then clean up the exposed stuff later.
*later == never
 
10:01 PM
Yeah to be honest, I put everything public as well
But just because I sin, doesn't mean I can't criticize others who do
2
 
7 mins ago, by Mat's Mug
internal is over-rated
 
That's a law, I think
 
hi @mjolka!
 
morning @Mat'sMug!
 
6PM here ;)
monking!
 
10:08 PM
i like this RobH guy who answered your question @Mat'sMug
 
i don't know about this Jeroen character though
 
lol
 
sounds like a trouble maker
 
Hatin' cause I'm the cutey of the chatroom
 
10:10 PM
@JeroenVannevel Nope, my puppy is.
 
nope, my mug is.
 
My puppy is the cutest.
 
that part might earn the checkmark though
return parentContext is VBAParser.VariableSubStmtContext
    || parentContext is VBAParser.ConstSubStmtContext
    || parentContext is VBAParser.ArgContext
    || parentContext is VBAParser.SubStmtContext
    || parentContext is VBAParser.FunctionStmtContext
    || parentContext is VBAParser.PropertyGetStmtContext
    || parentContext is VBAParser.PropertyLetStmtContext
    || parentContext is VBAParser.PropertySetStmtContext
    || parentContext is VBAParser.TypeStmtContext
    || parentContext is VBAParser.TypeStmt_ElementContext
gosh that was dumb
but then a Scope type sounds like a shiny little thing too...
I'll just wait a few days.
besides @mjolka will certainly add his grain of salt, too
 
0
Q: C# AES + RSA Encryption Implementation

cryptography_questionI've put together an AES encryption implementation to solve a set of requirements. I believe that I've met the requirements, but I'd like to see if anyone is willing to review the implementation to ensure that my crypto approach is sound. Thank you in advance for your time! Requirements Stat...

 
@Mat'sMug for some definition of "certainly" :)
 
10:13 PM
hehe... TTQW here
later folks! (and puppies)
 
adios mug
 
well, I shall return!
 
BTW, is the hashcode of a class essentially a unique identifier to keep different instances of a class separate?
 
no
 
OK, I'll look it up sometime.
See you later, I've got to clean up my brains.
 
10:16 PM
@Hosch250 Language?
 
1
Q: Clear function for Stanford iOS 8 Calculator application

steveclarkI am following the Stanford iOS 8 lectures and I believe I have successfully added the "Clear" functionality to the application, but I don't know if I am doing it properly. Controller class ViewController: UIViewController . . . // Linked to the "C" button in the Storyboard @IBAction func clear...

 
0
Q: Rust Guessing Game

sargasAm I making good use of the Rust language and APIs? What can be improved? extern crate rand; use std::old_io; fn main() { println!("Guessing Game"); // declaring the type in the left side of let helps random() return the right datatype // An alternative is: let answer = (rand::rand...

 
That's off-topic...
 
Welcome to Stack Overflow. Please take the time to familiarize yourself with the Stack Overflow help file, which will help you understand what kinds of questions are appropriate for this site. This site is intended to help you obtain answers to specific programming questions, as opposed to providing tutorial, design or code review assistance. — MarsAtomic 21 secs ago
 
Play Asteroids live!
0
A: Asteroids game clone

200_successWhen using HTML local storage, you should always check for the possibility of failure. Some possible failure modes are: Local storage is not supported by the browser Local storage is prohibited for that domain by policy The storage quota has been exceeded Therefore, instead of checking if(ty...

 
10:24 PM
I've voted to close this question as off-topic, as it contains "stub code". This question seems fine if you could simply replace the . lines with the actual existing code. You're concerning about MVC principles, and the best way to review that is for you to include the entire view controller and the entire CalculatorBrain class so we can see what it doing what. — nhgrif 15 secs ago
 
@Hosch250 Generally, for C# and Java, there is a "hashcode and equals contract" saying that if two objects have the same hashcode, they may or may not be equal. But if they are equal, they must have the same hashcode.
Hashcode, when used correctly, is a nice way of creating a unique-ish key for an object, it is used to place objects in the correct 'bucket' in sets and maps.
 
And if it's not off-topic for stub code, it's also unclear, as he doesn't bother defining exactly what clear() is supposed to do, nor does he give anywhere near enough context to get much of a perception of what it's actually doing (besides printing to console... which for an iOS app is akin to absolutely nothing).
@Mat'sMug Ready for my upcoming blog post about bitmasking?
 
@nhgrif Bring it on!
 
Actually, my post won't be necessarily applicable to his question--I thought it would.
But my next post will be about bit-masking.
 
Morning guys
 
10:36 PM
Good suggestions I will check out code review. Never checked it out before! — HolyMoly just now
 
Hey Mehrad.
 
10:52 PM
@nhgrif Thinking of your concordance challenge, just wanted to see if my logic made sense to you for grouping words into arrays
Got a min?
 
Yea, type it in and I'll check in a second.
 
Basically my thought is, and no code has been written yet for that logic, but while the file is being parsed using separators to split into words, each time a word is encountered, check the main array to see if a sub-array exists for that word, if it doesn't then make a new sub-array for that word and add to it this instance along with the line number. If a sub-array does exist, then add this instance along with the line number to that array
So in the end I would be left with a big array, with one sub-array for each distinct word, and every instance of it contained therein. Does that make sense?
 
I would read the WHOLE thing in, then close the file reader before I did anything else.;
But... I also say that with most of my file IO experience being Objective-C... it may be different for Java.
 
Yeah I've got that working. Put the whole thing in memory I'm guessing (at least I'll try that first; don't give me hints ;)
 
But consider that part of this is to denote for which lines each word occurs on
 
10:59 PM
Just make sure you don't explain me how to do it, I just wanted to see if the arrays logic made sense
 
@Phrancis This organization makes sense. Don't be afraid to write multiple classes for this whole project though.
 
I'm planning on it
 
Also, consider a dictionary--or what I think Java calls a Map?
 
A dictionary to store words, imagine that concept!
4
 
Hey guys.
 
11:02 PM
Hey @Legato
 
Hey Legato
 
@nhgrif Oh Dictionaries are Java maps? I've seen the term around here, and thought it was some data structure that people made that I would encounter later on.
 
@nhgrif I certainly want to write a few classes for example to search for a word in whatever type of collection I end up using; a class to "GROUP BY" the count of words, in both directions, and one to just print the full concordance with all references
 
@Legato - just wanted to point you to this: meta.codereview.stackexchange.com/a/1947/31503
 
Wow, I just managed to cut myself with a butterknife... #MeAndCooking #OneOfThoseDays
2
 
11:16 PM
0
Q: Speeding up calculation processing for a data frame. What can I do to make it faster?

AmerI am looking for a way to speed up applying my function to every individual in the data frame. Currently I am using the ddply but it is very slow for big data sets. To give a simple example, I am providing the codes below: The first part of the code generates an example data frame for only 2 sub...

0
Q: MVVM Model modifying data

VincentCI’m trying to rewrite one of my projects using the MVVM pattern. I have a feeling though I’ve not done it correctly because I think my Model is too “smart”, it has methods to modify its own datamembers. I’ve seen in examples that people put validation in there but that’s about it. My Model class ...

 
got my tests working, I am excited, I am going to start putting them in everything that I do! first person in the building I bet!
Take that!
TTGH finally after 1.5 hours after quitting time!
updating to a new version of my wonderful changes to someone else's code.
later
 
Thanks @rolfl, that was enlightening.
 
11:36 PM
@Mat'sMug That's worst than cutting yourself with a sharp knife... The same way box cardboard cuts are worse than paper cuts
 
@Phrancis No it isn't.
 
0
Q: Using Roslyn to find interfaces within a solution

Kent BoogaartThe intent of the below code is to find all interfaces within a solution whose fully-qualified names match the given predicate. It seems to work, but as I am new to Roslyn I'm guessing there are things that could be improved. I'd appreciate any pointers. public async Task<IImmutableList<INamedTy...

 
A cut with a sharp knife can have the raw edges press together and bound with a band-aid, and it will heal quickly and cleanly.
A cut with a dull knife will have ragged edges of skin that will die and get in the way of the new tissue, and they will have to be cut away, and everything takes longer.
 
@Hosch250 You haven't worked in a meat cutting shop :)
 
@Phrancis I've worked in a woodworking shop.
Hobby, not professionally.
A cut from a saw can take weeks, and a cut from a knife will usually take days.
 
11:40 PM
I've actually worn chain gloves when opening boxes, on occasion (if I have a lot of them to process)
 
It depends on how deep the cut is, of course, and how dirty it gets.
Must be sharp boxes.
 
@Hosch250 A butter knife is still a knife, just very, very dull
 
I meant sharp knives.
 
Actually more like a very small saw
 
I've been cut nearly to the bone with a chisel, and that took about three weeks to heal.
I learned my lesson, too - don't cut towards yourself with a chisel.
 
11:42 PM
Ouch
 
It wasn't that bad, it was only my finger.
 
Chisels sound brutal to get cut up from... Just a big hit of pressure in one hit
 
The base of my first finger, so it actually wasn't that deep.
It bled so bad I had to get someone to put the band-aid on while I held it shut.
Did you do the meat chopping?
I've heard they nearly amputate their fingers sometimes.
That must hurt.
 
Also, this kind of question is more suitable on the Code Review site, I believe, since there is not actually a problem you are trying to fix. — GregL 1 min ago
 
11:59 PM
RELOAD!
 

« first day (689 days earlier)      last day (3330 days later) »