« first day (484 days earlier)      last day (3525 days later) » 

12:05 AM
@badp unenhance... unbreak... similar, no?
 
@SimonAndréForsberg
HAI
BTW This is a BrainFuck interpreter written in LOLCode
BTW It accepts as input a BF program, followed by a "!", followed  by any input to the BF program.
BTW Since BrainFuck is turing-complete, this proves that LOLCode is too

I HAS A INSTRUCTIONS	BTW Array for BF instructions
I HAS A IPTR			BTW Pointer to first empty element in INSTRUCTIONS
LOL IPTR R 0
I HAS A LOOPZ			BTW Array of loop start/end addresses
I HAS A LOOPSTACKZ		BTW Loop stack for building the above two
I HAS A LSPTR			BTW Pointer to first empty element of LOOPSTACKZ
^^ lolcode-dot-net
 
0
Q: Determining a digit on a given position in the A002260 sequence

maaartinusThis is my solution to this SO question, which can formulated as take the sequence A002260, i.e., 1, 1, 2, 1, 2, 3, ... concatenate all its digits find the digit at a given position (1-based)] What bothers me is that my solution is rather complicated and fails near Long.MAX_VALUE due to overf...

 
@Mat'sMug Is that a challenge for me to write a lolcode interpreter in Brainfuck?
 
Yes.
 
haha
(I didn't write this)
 
Actually, it's a challenge to write a lolcode interpreter in brainfuck that also outputs a brainfuck interpreter in lolcode.
4
@Ducky needs to spend less time on PPG...
 
ya know, speaking of useful code..
 
@RubberDuck yes!
 
I downloaded the source code for ... might need a peer review.
 
12:13 AM
looks like they implemented arrays and other stuff.. (browsing)
 
I bet it's actually of interest @Mat. Lexington and Parsing and all that.
Lexington? ^ wtf?
 
namespace stdlol
{
    public abstract class core
 
namespace wtf
 
^^ class names should be PascalCase right?
 
not in C++ I think
std::vector etc.
 
12:15 AM
it's C#
private static object FromString(string a)
{
    if (a.IndexOf('.') == -1)
    {
        return int.Parse(a);
    }
    else
    {
        return float.Parse(a);
    }
}
 
^^ way to box up a value type
 
Interesting way of determining type...
I hope no one from France wants to use it...
 
or technically, Sweden
officially Sweden uses 4,2
 
To mean four and two tenths?
 
12:18 AM
yup
and for bigger numbers: 4 136 893 250, or perhaps 4'136'893'250
 
Now I need to go figure out how to fix that, because I don't know.
 
usually we just use spaces I believe
 
Ugh...
 
why do you need to fix it?
normally there are NumberFormat classes to deal with that stuff
 
yeah, just use the overload that takes CultureInfo.InvariantCulture
 
12:20 AM
Simply because I don't know. Thank you. I'll google that.
 
wow this one could definitely be improved:
[LOLCodeFunction]
public static object SMALLR(object a, object b)
{
    if (a is int && b is int)
    {
        return (int)a > (int)b ? b : a;
    }
    else if (a is float && b is float)
    {
        return (float)a > (float)b ? b : a;
    }
    else if (a is int && b is float)
    {
        return (int)a > (float)b ? b : a;
    }
    else if (a is float && b is int)
    {
        return (float)a > (int)b ? b : a;
    }
    else if (a is string && b is string)
    {
        return (a as string).CompareTo(b as string) > 0 ? b : a;
 
I personally prefer to use 4.2 though
Oh dear God...
 
I would criticize it
but I have no words
 
Well... I guess it works in the end...
 
all the casted types implement IComparable...
 
12:23 AM
so instead you could convert them to IComparable?
 
I guess if (a is IComparable && b is IComparable) { return ((IComparable)a).CompareTo(b); }
 
Don't think you can compare cross-type
it'll throw runtime exceptions
 
{ return ((IComparable)a).CompareTo((IComparable) b); }
try it, you C#ers
 
no need to cast b
Show("Boolean:  ", a1, a2, a1.CompareTo(a2), a1.CompareTo((Object)a2));
Show("Byte:     ", b1, b2, b1.CompareTo(b2), b1.CompareTo((Object)b2));
Show("Int16:    ", c1, c2, c1.CompareTo(c2), c1.CompareTo((Object)c2));
Show("Int32:    ", d1, d2, d1.CompareTo(d2), d1.CompareTo((Object)d2));
Show("Int64:    ", e1, e2, e1.CompareTo(e2), e1.CompareTo((Object)e2));
Show("Decimal:  ", f1, f2, f1.CompareTo(f2), f1.CompareTo((Object)f2));
Show("Single:   ", g1, g2, g1.CompareTo(g2), g1.CompareTo((Object)g2));
 
Ah, it's int CompareTo(Object)
 
12:26 AM
yeah. IComparable<T> could also be used - that one compares int to int IIRC
 
Would something like if (a.getClass() == b.getClass()) work?
 
Runtime exception if it's not an integer
 
interesting
 
he'll have to replace it with 2 if statements to parse it into the correct variable
but then he'd end up with 4 variables total
Best approach would be to read a book on generics
2
 
12:29 AM
hey that one looks right
[LOLCodeFunction]
public static bool NOT(bool a)
{
    return !a;
}
 
yeah, I don't think that can be improved any further ^^
 
0
Q: GameOfLife generation procession algorithm

gues532I've tried to make GameOfLife in console and this is the alogirthm I used to generate new generation : void processGeneration() { population = 0; int neighbors; int tempGrid[ROWS][COLS]; for(int i = 0; i < ROWS; i++) { for(int j = 0; j < COLS; j++) { if (grid[...

 
and that one could be rewritten with LINQ
        [LOLCodeFunction]
        public static bool ANY(params bool[] args)
        {
            bool ret = false;
            for (int i = 0; i < args.Length; i++)
                ret |= args[i];

            return ret;
        }
...and not iterate the whole array
public abstract class Utils
 
abstract? Please let it have a private constructor at least
and only static methods
 
and all members being static, the class should just be static, drop the abstract altogether.
 
12:33 AM
How does a static class work in C# ? Non-initializable?
wait a minute... extension methods uses that, don't they?
 
it's ...a type that can never be an object
extension methods extend a type
wait
yeah extension methods are static methods that live in a static class, that extend an instance of a type. i.e. Enumerable.Any(this IEnumerable<T>...) -> Enumerable cannot be instantiated, it's static
so it's a type, but you can't have an object of that type. same as Java isn't it?
 
if you want that in Java, you would do a public final class with a private constructor
where the private constructor is the key to the non-instantiation
 
and if you had public final class Enumerable { }, could you do Enumerable.member()?
 
or you could do public enum without any enum instances and only static methods in it
Enumerable.member() ??
 
or just Foo.bar();, where Foo is public final class Foo
 
12:43 AM
if you have defined a method named member() in the class then you could do it
Java doesn't support extension methods as I think you know though
 
MonkeyPatch FTW
 
MonkeyPatch?
 
yeah bad example.. just remove the this, it becomes a "normal" static method
File.WriteAllText(string) would be a better example
 
It's another name for Extension @Simon.
 
File being the static class, WriteAllText(string) the static method
 
12:45 AM
Popular in Ruby.
 
wait, it's real?
 
Hated in Ruby. What's real?
 
haha the monkey thing
 
Lol. Yeah. Monkey patching is a real thing.
 
Ah, I think I've heard of it
 
12:46 AM
7.prime?
 
What? I love being able to call methods on constants.
 
@SimonAndréForsberg the post slowed down quite a lot today, 2,832 views now, +38/-1.
what I can't believe is the 16 stars!
 
What I can't believe is it's eventually going to earn me a Good Answer badge...
Or is it Nice?
 
you already got [badge:nice-answer] for it ;)
ducky and monkey are 2 votes short of a silver badge on it
 
12:51 AM
Yeah. My claim to fame will be a review of LOLCODE... I'm not sure how I feel about that.
Oh, and it's yet another lol
 
at least it's not just another :)
 
@Mat'sMug I expected that. But at least you got the 2500 views badge for it
 
yeah! 10K views can wait... ...
I remember thinking "wtf" when the tag was created. I was like, "wut, a calculator language? ..."
then some more questions appeared
and now .. deep down I know nhgrif can't be wrong though.
 
yup, calculator languages exist
Never used one though
But I've heard that you can make games on them
 
58 views on the 2nd post. I really don't think we'll see an invasion anytime soon.
yeah if you like tetris and... tetris.
 
12:59 AM
Good ^^
Ah, but there's been other games implemented as well
 
snake?
 
Can't remember which though
Probably yes
Perhaps even Minesweeper or Battleship
Speaking of Minesweeper, today it is seven years since I started working on my Minesweeper Flags Extreme game...
 
huh?!
happy... birthday?
 
I SAID IT IS SEVEN YEARS SINCE I....
Yup, Happy Birthday to that game :)
I really should re-write the client with GWT
 
was thinking.. the site could use some @kleinfreundisation ;)
(no offense, seen worse)
 
1:03 AM
yes, I know... :)
I stink at web-design
kleinfreund actually did something for me, but I've lost that :/
 
aw
 
It's been a while since he was in chat now btw...
 
yeah he's been on-and-off for a while
last answer May 11
sidebar-note, has this metric ever been that high?
24,495 visitors/day
 
^^ First ever screenshot of my game
we're at almost 25k visitors/day?
Imagine if that was 25k votes per day
How many votes do we have per day?
 
(fires up SEDE)
Q+A?
roughly, between 300 and 600
 
1:16 AM
Nice title of that query
 
:p
hmm.. how would I go about smoothing the results?
 
You could select the average of a period of time, for example each week's average
or per month
 
ray cornelius1 day ago

If you look closely, he is not a real frog.
 
and/or insert a trendline
He is a real frog!
 
@SimonAndréForsberg yeah, a trendline.. i.e. export to Excel and chart away!
 
1:21 AM
So... we have about one vote per 50 visits.
 
Hey Matt and Simon
 
Hi and Bye :)
TTGTB
 
lol Byee..
 
HAIBAI
:)
 
you know what BAI means in my language?
 
1:23 AM
nope
sorry if offensive, not intended!
(what is it?)
 
Aha! Nothing like that...It's like BAI=Nanny
so it it was more like Hi Nanny : D
 
ah
 
Where you from Mat?
 
Quebec (Canada)
 
Cool...I hear good things about that place..
Not too hot....nice peace loving people...
 
1:26 AM
yeah
 
but I guess more French dominated.
 
@Mat'sMug +1 for your RPS in
 
Hey I'm a French Canadian too!
 
^^ linear trendline
@Phrancis merci!
 
1:27 AM
Ahh that's nice.
 
@Mat'sMug bienvenue
@Anirudh welcome to The 2nd Monitor :D
The more the merrier
 
Thanks Phrancis...I think I like it here..
 
soon you'll know you like it here :)
 
I've been addicted since day one... :)
2
 
Lol..Mat I smell sarcasm?
: D
 
1:28 AM
@Mat'sMug this shows voting has been increasing over the last few months, eh? That's good
 
I see Phrancis...
 
I filtered for 90 days
and this week's missing (SEDE updates tomorrow I think)
 
I wish I could speak with you guys in French...but I only know some broken French
 
That's ok. I only know broken quack.
2
 
LOL
4
 
1:30 AM
French, on the whole, is not a very useful language
 
15
A: What's a Zombie? And what are the many other memes of Code Review?

rolflMeme: LOL - AutoStar Originator: Mat's Mug / Jamal Cultural Height: The 2nd Monitor Background: "lol" somehow got targeted at this point here (the first starred lol): retailcoder: lol (darn, again) Followed shortly by: Jamal: lol (don't star that) And then the tradition was cement...

 
Ohhhh @Phrancis... Neither is
 
It's also a very difficult language, grammatically. Stick to English, I say
@RubberDuck true :)
 
@Phrancis ha, out of the last 10 years only my last job was everyday-French-speaking. little more than 1.5 years
 
That reminds me, I need to add Mr. Maintainer to that. I've seen a bunch of people using it in their answers.
 
1:33 AM
^^ you started that one I think
 
Yes, you do
 
I was challenged to write the shortest c program (in source code byte count) that prints the sum of a sequence of ints starting at 1 with multiples of 2 and 3 omitted (i.e, 1,5,7,11,13,17,19,23,...) of a length given on stdin, and i came up with this:
main(){scanf("%d",&);printf("%d",_*_*3/2);}
 
Yeah. I did, but it's your fault @Mat.
 
Any shorter possible? :)
 
Jun 3 at 1:00, by ckuhn203
Yeah. That's a good call @Mat'sMug. Always think of Mr. Maintainer.
^^ @RubberDuck did
 
1:34 AM
I'm not very much into golfing, looks pretty darn short to me..
 
Hmmm Code Golf guys would be better to ask.
 
i see, thanks. btw, is it pssible to use code tags in the chat?
 
Yep
[tag : sometag] <-- remove spaces
 
[tag:lolcode]
 
[tag:main(){scanf("%d",&);printf("%d",_*_*3/2);}]
i am not samrt... am i?
 
1:35 AM
o.O
 
@Phrancis first appearance of Mr.Maintainer:
6
A: File reader/writer (text)

RubberDuckError Handling Your error handlers look much cleaner (and ultimately safer) than before. I also like your GetErrorSoure() routine and the "CleanExit:" name of the labels. Very concise. (<-Read as, "I'll be 'borrowing' more of your code'). I see a small issue in your OpenFile() routine. You shoul...

 
How about @Will : main(){scanf("%d",&);printf("%d",_*_*3/2);}
 
the syntax doesn't allow for punctuation other than -
and _
 
lol
2
 
@Phrancis maybe...that's why I am trying to learn german
 
1:37 AM
thanks. there's supposed to be an underscore between main( and ), but somehow i don't see it...
 
but it seems the Germans aren't really a big fan of abbreviations and short/normal sized words :-s
 
Chinese would be a good language to learn
That is true
 
German is nice, had a class some 15 years ago. I remember how to count, that's all :(
(and scored some 85%)
 
I can read German and pronounce it right, but have no idea what it means
idem for Spanish
 
My fiancé speaks some German. Drives me crazy.
 
1:39 AM
I know how to introduce myself.
Similar situation here @RubberDuck
 
Even nice things in German sound scary.
 
Ich heisse (how's that B-like character made?) Mug. Mat's Mug.
 
and Germans sound so angry when they speak English..
 
Russian is the same way. They're just harsh languages.
 
^^ but not people ;)
 
1:40 AM
@Mat'sMug that: ß
ich heiße
 
that
 
also Z is more like Tzee.
 
> The HTML entity for ß is &szlig;
 
No. Not harsh people at all. One side of my fam is Russian. Wonderful people.
 
And vonderful vodka
2
 
1:43 AM
да
 
Mostly while you speak German your tongue is flat and you end up putting stress on the Upper Palleate of the mouth
More vodka yea...look here -->https://www.youtube.com/watch?v=ZHw90NYdwyI
 
@Mat'sMug so you getting friendly with LOLCODE I see... any practical use, other than for fun?
It's nice it has a compiler, unlike
 
Well I don't like the onlone version I've been using. Its strength is its weakness: it follows the language specs.. so no arrays (they're underspecified)
seems more thoroughly featured, but tweaks the syntax a bit.. which I feel like "fixing" (got teh source codez)
If I end up refactoring it in a major way, I might put up some for review..
Does the Apache license allow me to do that?
nein eh?
@RubberDuck that File class would be so much better off as a static class!
 
Funny you mention it, I just updated my answer. That's been bugging the shit out of me for months.
 
Hahaha
 
1:56 AM
And you're right, it should be a static class.
 
Hmm the intent was to avoid having to declare a variable, and let the With block scope the instance - it cleanly dies at End With.
It's indeed not very vba-like
 
I'm not saying you should write it that way, it just resolves my issue with the way it reads.
Which is completely my issue. Not an actual issue.
 
well if you were , you'd be scratching your head at it, and that would be my bad. If you were a dangerous psychopath that knew where I lived...
3
 
He would hunt you down and make you refactor it, or else...
 
True. It's a good thing I'm neither.
Of course, a psychopath would deny that they're a psychopath...
 
2:05 AM
Speaking of VBA, yesterday I fired up Access and tried to find some stuff about making forms and such to interact with the DB... instant headache
 
@Phrancis, it's too hard to star from the phone, but that totally deserved one.
ADODB. Don't even mess around with the built in stuff.
 
I spent about 18 months cursing at how much of a shitty mess of stinkin' spaghetti crap code they left me with... I wonder what my successor thinks of the parts I've written.
 
Good code is a myth.
 
is it?
 
Yeah. I think so. I think this site proves it.
 
2:07 AM
I would be more prone to label it a rarity, rather than a myth...
 
Maybe, but I think there will always be a dev who thinks .
3
 
I have seen on occasion some script where my only thought is, "Wow, I have nothing to say about this!"
Of course, objectivity is a very subjective thing, when it comes to code...
So anyways, I gotta make this acoustic pop song sound like a hit... :(
I'll be around
 
later!
 
Dad & daughter folk-ish stuff.
Share and enjoy...
 
On the whole good code thing.
 
2:18 AM
> "Bro, you don't work hard. I just worked a 4700-hour week digging a tunnel under Mordor with a screwdriver."
 
It gets better
> Every programmer occasionally, when nobody's home, turns off the lights, pours a glass of scotch, puts on some light German electronica, and opens up a file on their computer. It's a different file for every programmer. Sometimes they wrote it, sometimes they found it and knew they had to save it. They read over the lines, and weep at their beauty, then the tears turn bitter as they remember the rest of the files and the inevitable collapse of all that is good and true in the world.
This file is Good Code. It has sensible and consistent names for functions and variables. It's concise. It
 
lol I'm at "all code is bad"
well right there
wow..
one single sentence:
> Then they're told on Friday they need to have six hundred snowflakes written by Tuesday, so they cheat a bit here and there and maybe copy a few snowflakes and try to stick them together or they have to ask a coworker to work on one who melts it and then all the programmers' snowflakes get dumped together in some inscrutable shape and somebody leans a Picasso on it because nobody wants to see the cat urine soaking into all your broken snowflakes melting in the light of day.
 
That's it. That's how it happens.
 
haha
> Here are the secret rules of the internet: five minutes after you open a web browser for the first time, a kid in Russia has your social security number. Did you sign up for something? A computer at the NSA now automatically tracks your physical location for the rest of your life. Sent an email? Your email address just went up on a billboard in Nigeria.
> ERROR: Attempted to parse HTML with regular expression; system returned Cthulhu.
4
 
@Phrancis! The <center> can not hold!
2
 
2:31 AM
Omg
Is that really how it works? Maybe I should look into a different occupation... banking sound good?
 
in Tavern on the Meta on Meta Stack Exchange Chat, 21 mins ago, by iStimple
@Jamal is the top voter this quarter http://stackoverflow.com/users?tab=Voters&filter=quarter !
2
 
@RubberDuck awesome article
 
0
Q: Minimal entity component system

DaggI was trying to figure out what a minimal ECS might look like in Lua; here's what I came up with. This is based very loosely on darkf/microecs. local function createSystem(components, process) local function handle(entity) for i, component in ipairs(components) do if entity[component...

 
	void CheckLiteral() {
		switch (t.val) {
			case "HAI": t.kind = 6; break;
			case "TO": t.kind = 7; break;
			case "1.0": t.kind = 8; break;
			case "IRCSPECZ": t.kind = 9; break;
			case "1.1": t.kind = 10; break;
			case "1.2": t.kind = 11; break;
			case "KTHXBYE": t.kind = 12; break;
			case "HOW": t.kind = 13; break;
			case "DUZ": t.kind = 14; break;
			case "I": t.kind = 15; break;
			case "YR": t.kind = 16; break;
			case "AN": t.kind = 17; break;
			case "IF": t.kind = 18; break;
			case "U": t.kind = 19; break;
One word: Enum.
#refactoring step 1: create TokenKind enum. See what breaks.
Find references for Token.kind.. 166 matches found.
well that's going to be easy: Token members (all... public fields) are all lowercase, I can just add a public TokenKind Kind { get; set; } and not break anything while I replace the 166 references.
hi @200_success
I "stumbled" on 's source code ;)
 
3:23 AM
0
Q: Collision hash tables

Luis I just need a feedback for my code on my work assignment. let me know if I did it correctly and feel free for any suggestions or comments. Please be advise if it's too much to ask for help then don't even bother making a comment or delete my question. Pass the variable keyword to the method has...

 
3:48 AM
hey Mat!
@h.j.k. this might better meet your expectations ;)
?
 
cheez-burger
3
Q: Cheese-Burger-Waffles (aka Rock-Paper-Scissors)

Mat's MugFizzBuzz was fun, and I got great feedback and learned a few things (which I hope I put in practice here), but only scratched the surface. I wanted to explore the LOLCODE language a bit more, so I implemented a little rock-paper-scissors, to play with functions, parameters, return values.. and us...

;)
 
oh i think your comment was wrongly put in your original qn ;)
 
nope, it's a link to that one - I couldn't have pinged you from there
anyway I'm done with
back to - I've got this compiler to refactor.. :)
 
+1 for ZPOCK
 
> I HAS A SEEKRITMOOV ITZ "ZPOCK" BTW SHH, SEEKRIT
 
3:52 AM
let me guess, BURGR contains CHEEZ, WAFLZ wraps BURGR and CHEEZ is smelted on top of WAFLZ hahahaha
 
Now all we need is
 
the compiler actually stores tokens in a linkedlist...
 
We need LOLCodeDeveloper
 
or so it says
actually has a interpreter in its tests/samples.
first time I ever play with compiler code. has to be a toy language.
 
Lol. ;-)
3
 
4:10 AM
Is this ready for reopening?
 
=TO_PERCENT(DIVIDE(SUMIF('To Do'!A3:A, "<2000", 'To Do'!E3:E) - SUMIF('To Do'!A3:A, "<=1000", 'To Do'!E3:E), MAX(COUNTIF('To Do'!A3:A, "<2000") - COUNTIF('To Do'!A3:A, "<=1000"), 1)))
The only thing I can come up with, seeing this... is...
 
@Jamal because a spreadsheet on googledocs was linked to?
> I have a function that averages a set of percentages (in column E) between certain importance levels (column A, in this case between 1000 and 2000, not inclusive because the #000s designate breaks, not values) in a separate spreadsheet ('To Do') and displays that as a percentage.
If you're averaging percentages, displaying it as a percentage seems like a good idea. I think it can be reworded.
 
Averaging percentages sounds... odd... to me, anyways.
 
I tend to agree with this:
14
A: Can we review spreadsheet formulas?

Simon André Forsberg Actually, it's not even asking for a review in my opinion. It seems to be directly asking for an alternative, which makes me think that it's SO territory. It is actually asking for "Is there any better way to do this?" which to my eyes is nowhere near "gimme-the-codez". Let's take a look at...

> Just because we're not sure on how to answer it doesn't mean it's off-topic.
I'll try an edit.
 
I cast to reopen, for all it's worth.
 
4:30 AM
0
Q: K-Mean with Numpy

OxinaboxI have implemented the K-Mean clustering Algorithm in Numpy; from __future__ import division import numpy as np def kmean_step(centroids, datapoints): ds = centroids[:,np.newaxis]-datapoints e_dists = np.sqrt(np.sum(np.square(ds),axis=-1)) cluster_allocs = np.argmin(e_dists, axis=...

 
4:41 AM
> pimped-up
5
Q: Averaging a set of percentages between certain important levels

SupuhstarI have a spreadsheet, called To Do, with set of percentages in column E and importance levels in column A: On another spreadsheet, I'm entering a formula to calculate the average of these percentages, but only those between certain importance levels: see it on googledocs This is the form...

and cast a reopen vote, too.
 
@Mat'sMug I have an idea of an answer, to be used upon re-open
 
me too!
 
I've dicked messed around with enough spreadsheets I'm starting to get a feel for what works and what doesn't
 
lol
2
@200_success does "unclear what you're asking" still stand? ^^
 
Reopened.
 
5:01 AM
I'm still skeptical of the motivation behind averaging percentages. However, the question is no longer unclear.
 
0
A: Averaging a set of percentages between certain important levels

PhrancisUse a pivot Your approach works, and I'll give you that. I feel you are overcomplicating something that is, on the whole, quite simple. Instead of using numbers 1-10,000 to define priority, why not use a simple method like numbers {1,2,3,4,5,6,7,8,9} and just pivot them? Or maybe to make it more...

 
5:13 AM
0
A: Averaging a set of percentages between certain important levels

Mat's MugAs @200_Success pointed out in his comment, averaging percentages is a suspicious mathematical technique. Each task in the TODO list could have its own weight, or relative value - a number that represents a chunk of progress towards "done"; then you can calculate a percentage by adding up the re...

thanks for reopening :)
TTGTB
 
Bonne nuit @Mat'sMug
I don't often write code in Excel; but when I do, I think it's actual programming.
2
 
5:34 AM
0
Q: How to reduce a conditional nested loop in R

de1pherI'm scraping some comments from Reddit using Reddit JSON API and R. Since the data does not have a flat structure, extracting it is a little tricky, but I've found a way. To give you a flavour of what I'm having to do, here is a brief example: x = "http://www.reddit.com/r/funny/comments/2eerfs/f...

 
5:56 AM
repl  = tryCatch(repl[[a]][[2]][[5]][[2]][[2]],error=function(e) NULL)
Eww^^
[too[many[square[brackets]]]]
 
that question looks broken !
 
7:00 AM
0
Q: I have implemented a simple Linked List, with my own super classes and interfaces.

Krishna KumarI have provided a simple implementation of Linked List using my own super classes and interface. The implementation is for adding, deleting obtaining the size of thew list. I have not yet provided the iterator in the current code as its not in the scope for now. SimpleList.java package com.learn...

 
7:45 AM
0
Q: PDO Login/Register system I've been working on

user2997488I'm relatively new to PHP and programming as whole. I'm sure my code could be better in a lot of ways, most of which I can't fully grasp at the moment. As it stands I'm trying to avoid the general noobie mistakes(whatever they may be). And also trying to code better and cleaner so that other peop...

 
8:29 AM
0
Q: Devide large code to classes, JAVA

JollyfreakHi guys I'm new to Java and I really don't understand how to make more classes work like one. So if anybody could explain me that and help me devide my large code to smaller classes (like Player.java, Main.java,Move.java, etc.) Because I have a problem; I want to check if player hits wall and eas...

0
Q: Mini eCommerce Application and Message/Warning/Error Handling

ChickenFarmerI decided to build a basic eCommerce application in C++ as a learning experience. In the past, I've gone with a fat controller, skinny model approach, and while it has worked, my results always end up messy and the code is/was kind of individual to the applications. To try something new, I'm want...

 
8:43 AM
0
Q: How to make following C# code for splitting a path string efficient?

ShrShrI have the following C# method to split a path string. Only thing I know is a fixed string in the path and I have to split the full path into two parts, first part should be one level below the fixed string and the rest should be the second part. For example, if I have the following path, str...

 

« first day (484 days earlier)      last day (3525 days later) »