« first day (481 days earlier)      last day (3528 days later) » 

4:00 PM
Not that I was really talking anyway, but I have to leave.
See you alter! :)
 
Well, despite it being new, very cool, @Vogel612!
 
Thanks @Pops..
 
Hey @Pops! How are you today?
 
Alright. Hasn't been a great week. You?
 
going good, Raining though so no Motorcycle riding today.
 
4:13 PM
0
Q: String encryption function in admin section

CodeXI have been using this function locally to encrypt strings for example a username. If the user successfully logged in, place the encrypted username into a session, decrypt the username in the admin section and use for various things. Is it a strong method and are there any security concerns wi...

 
@Pops I take that the operation went well, either way?
 
@Pops what is going on that it is not a great week?
 
@Vogel612 It took me a minute to realize what you were referring to. I wouldn't quite call it an operation. But yeah, everything seems to be going well there.
@Malachi Just crazy busy.
2
 
btw. I haven't checked yet, but how's the flak on the mso mentoring post?
 
@Simon & @Jeroen - I answered the C# random number question too.
@Vogel612 Chicks dig it !!! ;-) (jesting!)
 
4:22 PM
@rolfl well there's a small text on that question: "show 103 more comments"
Anna had it locked down or a while earlier today
 
@Vogel612 Crapper reading material?
 
@Malachi it's mostly meaningless arguing over opinions set in stone.
 
Meh, for what it's worth, that mentoring proposition has crated a lot of controversy, and this is not the right place to perpetuate it.
So, I am declaring it to be off-topic in here.
3
 
lol ;)
2
 
And I will leave the crated typo, seems somehow appropriate.
 
4:25 PM
0
Q: How to deal with homework questions without question?

Emily L.The question in question (no pun intended): Cutting stock recursion OP basically dumped the problem definition and a solution on us. There is no indication to if the code actually works, it is homework and there is no indication to what the poster want's help with. This is something I've strugg...

 
@rolfl If I would use random.Next() instead of Guid.NewGuid() as a comment to my answer indicates, I'd think our solutions are very similar
You're using two datastructures which will give you 64 million values
 
No, I disagree that they are similar, you create a datastructure required to contain the range, mine only needs to contain the count.
 
0
Q: Optimization of Hibernate DAO in desktop application

Branislav LazicI'm working on medium sized desktop application (with around 100 tables in database). For persistence layer I decided to use Hibernate for the first time to avoid massive redundancy of code for persistence layer. This is final implementation of DAO interfaces: public class BaseDAOImpl<E extends...

 
The hashSet can easily be emptied as the List is filled, leaving just 32Mil.
The duplication is temporary.
If you benchmark, you will find my solution is far faster than yours.
 
reviewee I think we need to use that word more often @StackExchange
 
4:32 PM
@JeroenVannevel - I think the use case that your answer woul dbe worst at, is generating a list of 1 value from a range of Integer.MAXVALUE.
which will require.... well, it won;t work.
 
@skiwi I have a solution for you, but I don't know if you will like it:
0
A: Grouping a List using an unequal key extractor and classifier function

Simon André ForsbergOne way to solve this is to use a three-step solution. Collect a Map<String, List<LegacyCommit>> commitsByUsername Create an empty Map<LegacyUser, List<LegacyCommit>> results Loop through the Lists in commitsByUsername and for each item, get the first commit from the list, use that as a key and...

 
@Malachi I'll check on it later and accept the most best one, I don't think I can use any/most of the terms for a config file though :(
 
@rolfl does this benchmark look about correct? gist.github.com/Vannevelj/90caa1933c78cd465e61
 
@Pops How did the translation functionality on Feeds turn out? ;-)
 
@skiwi I think that this is what you are looking for maybe? english.stackexchange.com/questions/193749/…
 
4:37 PM
@SimonAndréForsberg Here, have an upvote, I'll first try to finish my own third solution though
 
@skiwi Eh? That's someone else's thing. Can you be more specific?
 
@JeroenVannevel Looks about right.
 
@Malachi Well, it more refers to the text that is gone, but I am referring to the "..." or "|||" or whatever you could use to hide those words... It's a hard question :(
 
@JeroenVannevel But I would also like you to benchmark it with count 100.
 
@Pops Well... At one point Feeds would repeat every message, you must remember that fire in your office :)
 
4:38 PM
@skiwi Good luck. It was a nightmare working on it.
 
I tested it with 1 iteration so far and I always ended up with xxms on my part and over 8s on yours
I'm testing with more iterations now though
 
@skiwi Having seen some other things happening, that was not a fire.
 
The memory impact is notable though
3GB memory on linqpad
Rolfl: 00:01:31.4147085
Jeroen: 00:00:00.0067727
That's 10 iterations
That can't be right..
Jeroen: 00:00:00.0002363
Restarted it with my code first
 
@rolfl A burning pile of stuff then?
 
82
Q: What happens when you plug a UPS into itself?

Tim PostUPSey daisy; so we had a little ... incident ... Pretty sure that has power. We're past that now, and things are returning to normal. It's only appropriate that we take a moment to think about the folks that got pulled out of bed and worked their knuckles to the bone to get things back up and...

^^^ that was a problem.
a bot-gone-wild is not a problem.
 
4:42 PM
Yeah, something must be wrong. 1000 iterations takes me Jeroen: 00:00:00.0000590
 
@rolfl Yeah... That aws indeed a problem
 
@JeroenVannevel Have you dumped the results of your code?
 
lol ofcourse. I don't call .ToList() so it's never actually evaluated
 
@Jeroen ... I have to be careful when I challenge the C# folk on performance things .... I am likely wrong.
 
@rolfl Mhhm wouldn't be so quick about that
I'm getting a OutOfMemoryException: Array dimensions exceeded supported range.
 
4:45 PM
So, feel free to tell me I am an idiot, but, I would like to know why I am wrong, too, so...
Oh, OK.
 
Typically not a good sign
Not quite sure why it does that though. Enumerable.Range should go up to int.maxvalue
 
If it is anything like Java, it needs a few bytes of space to set up data structures when building an array, and those few bytes mean the array can never be quite MAX values long, typically 5 short of max.
 
100.000 short of max still gives the same fault
 
@JeroenVannevel If you're doing order by then it causes a problem
 
Why's that? Does it create another datastructure underneath?
 
4:49 PM
Of course, it has to Generate the entire range of data, associate each value with another Int (random) value, then sort them by the random value.
Once it has done that, it can then take the first count.
Even though you are selecting 'only' 32 million values, you still have to build a sorted(by random value) data structure containing the 'range' number of values.
(Integer.MAX).
 
0
Q: Correct control of execution of Java thread

Christophe De TroyerI'm writing an application that will use the JLayer library to play an mp3 file. Since the player does not have any methods to pause the playback - play() does not return until the song is finished - I decided to put it in a thread and simply control that thread. This is possible because one can ...

 
-1 because this code is not compatible with the OP's requirements as is, and would likely not complete successfully with a large range (MIN to MAX value for Int). — rolfl ♦ 2 hours ago
 
riiiight
We looked at the performance impact of my solution wrongly earlier
We calculated it with 32 million values
but it's actually 2.1 billion
which is why your memory impact can go up to 3GB on my pc, but mine crashes before task manager even gets to that point
I've got 3.6 billion more values
 
That's a lot of values :o
 
no wait, 4.2 billion
yeah, I'd say that my solution isn't optimal per sé for big amounts
 
4:56 PM
@JeroenVannevel It's not wrong, it's just suboptimal.
 
@JeroenVannevel - in fairness, the alternate solution I propose will start to slow down a lot when the returned value set is very large too (as the number of duplicate strikes increases).
but my performance scales relative to the number of values returned not the range of output results.
and it is O(n) throughout, in space as well as time complexity.
Well, not time complexity for very large result sets.
 
Yeah, even though the execution time will be large for your method with many values in a large dataset, it will still be doable with some delay
whereas my method will require a few TB of memory
 
Yup, your performance depends on the range, mine depends on the count. It depends on what the user wants as to which solution is better.
 
Can anyone explain what is invalid in specifying type witnesses for a method call like this?
Collectors.<Pair<LegacyCommit, String>, LegacyUser, ?, List<LegacyCommit>>mapping(
 
What error do you get?
 
5:04 PM
illegal start of type

illegal start of expression
----
(Alt-Enter shows hints)
Specifying type witnesses is ok right in that way?
 
@skiwi You shouldn't write ? outside method/variable declarations
 
@SimonAndréForsberg Ah, you are right!
 
You only need to specify the R, U, T, E, etc. for the method, not the ?'s
 
The problem is that I do not know what it is
Collectors.<Pair<LegacyCommit, String>, LegacyUser, Object, List<LegacyCommit>>mapping(
	pair -> pair.getKey().getCommitter(),
	Collectors.<LegacyCommit>toList()
)
The toList() returns a Collector<LegacyCommit, ?, List<LegacyCommit>>, and I need to use a type witness for that ? in the Collectors.mapping
 
<T> the type of the input elements
<U> type of elements accepted by downstream collector
<A> intermediate accumulation type of the downstream collector
<R> result type of collector
Hmm...
 
5:11 PM
It's an intermediated type, which Collectors.toList does not expose
 
0
Q: Using fewer foreach loops to bind values to parameters in PDO

user35295I want to make a query to order by the IN clause items. I read from another thread that I can use ORDER BY FIELD(a.id, val1,val2......) When binding values to parameters for two occurrences of $in, I ended up using two foreach loops: foreach ($tid as $t) { $users->...

 
@skiwi And writing wrong type causes compiler error?
 
@SimonAndréForsberg Yes, because there's no correct type
 
You're screwed!
 
At least writing this down showed me an issue, I have a type parameter that wants to be two different types at the same time
 
5:17 PM
Alright, I added one last edit to summarize everything about that random stuff
now I can start studying for my strategic management exam for tomorrow
 
Can you somehow prototype the typing as something like <X extends Collector<<Pair<LegacyCommit, String>, LegacyUser, ?, List<LegacyCommit>>> and then use Collectors.<X>mapping( ... ?
(you're the expert here...).
 
@rolfl Nope :( Because it will never match an unspecified ? extends Object type... Though you can use Object and use unchecked casts
But that only led me to the real issue, which I'm still trying to fix
 
OK. All yours.
 
The issue is simple
The solution not so much
Oh great, that question on english.SE actually is not what I wanted to ask right now... But I cannot be bothered more with it
 
0
Q: Switch statement using a string variable and random number generator

Shades9323Here is the problem: "Add Click event code for the Switch button: Create string variable spelled. Use rand to calculate a random integer from 1 to 4, inclusive. Use a C# switch statement to set spelled to "one" if the value is 1, "two" if 2, "three" if 3, and "out of range" if 4 appears. Display ...

 
5:25 PM
It shouldn't be that hard to grasp that instead of ... someone may want to use some other symbols, like ||| or to be continued
 
@skiwi I think one of the suggestions wasn't so bad for your variable name
1
A: Where an ellipsis exists, is there a term for the missing text?

PimgdThe characters themselves are called ellipses (singular form ellipsis). As for the term for the type of the characters... "truncation symbols"?

 
That one might actually be understandable enough
Unfortunately I cannot accept the answer itself, as I feel like my question has been taken over, because right now it asks for the term for the text that has been replaced, rather than the truncation symbol itself
 
It has evolved, correct.
 
@CaptainObvious School is back in session I guess.
 
September already>?
It's always September
 
5:31 PM
Must be college kids.
@rolfl That.
 
Maybe the grade one lower than university
 
I think they start earlier
 
All of the elementary and secondary schools in this area started back on Monday, as have many colleges.
 
user image
4
I know Jamal is now part of this madness ;-)
Must be his JAVA class right now, he's editing the front page like mad ;-)
3
 
5:34 PM
@SimonAndréForsberg I think I'll just implement equals on all JSON objects and go with the very subtle bugs it can introduce... I don't feel it is entirely correct, but I can live with it.
It would possibly create two entries instead of one if the user changes his email during committing.
 
@skiwi I had a feeling that was going to be your best option...
 
I sometimes get carried away by all theoretical possibilities...
 
I know the feeling
 
Tomcat is also being very funny... With Netbeans (and other IDEs as well I guess), I have build on save, and then Tomcat deploys on build
 
No matter how funny it is being, never laugh at The Tomcat.
 
5:46 PM
0
Q: The list will only bring one item to the output

Chukk ChukkThis code is supposed to take the list from one function to the other. The list will only come with one element. I am a beginner in Python and need some help. def main(): #get the integers high = int(input('Enter the high integer for the range ')) low = int(input('Ente...

 
@rolfl So... at work, we have a handful of battery backups. It's supposed to be able to power two monitors and two computers for about 15 minutes (depending on the monitors/computers, etc). I want to plug them all together in a big chain with none of them plugged into the wall to see how long they last... no one will let me...
 
Just do it.
 
^^^ what the duck said.
I caution you though......
.... they may break.
Let me think about it.
The decent UPS's will create a sine-wave output of the voltage respective to time.
the output is used to synchronize the frequency from 'the wall' to the output in case the wall power cuts out.
 
Most of ours, the newer ones, display a number on them that's supposed to be the voltage or something. They usually read about 120.
 
So, the 'phase' of the UPS output on battery is supposed to be close to the phase of the mains power, and just keep going at that approximate rate when there is no mains.
So, one of the UPS systems in the chain will be generating an alternating voltage, that the next one will use as a sync..... it will then get used by the next one in the chain, and so on.
by the time it comes back to the first system, it will think, hey, I am 1millisecon out of phase, let me slow down the output.
I suspect that, in short order, the systems will fail to maintian phase sync within tolerances, and things will start beeping, and cutting out in 'waves'.
Worst case, something may get fried.
I think you should take a video.
Which probably means someone already has.
 
5:55 PM
Wow... talk about an agenda...
a 3.5 year old meta answer just got edited (and therefor, bumping the question) just to change pronouns to gender-neutral.
 
@rolfl I read that as someone may get fired
 
I don't think I'd get fired this week.
 
-2
Q: C# Read Data From Database and Change Statue

Maziar Malekiani am newbee with Asp.net and C# plz help me , i want 4 color warning status ( Green,Yellow,Orange,Red) that working with Register DateTime in the database , i want to compare that DateTime vs DateTime.now to make a algorithm : before 7 days = Green , between 7 and 14 = Yellow , between 14 and 21 ...

 
So I guess this week is probably as good a week as any to try it...
 
A decent system would probably identify the problem and shut down.
Speak of the eternal September!
 
6:02 PM
@rolfl Nah, that class doesn't meet on Thursday.
 
I worked on that piece of code for at least two hours, and I cannot even remember the variable name I've written down at least a dozen times... Great.
 
@CaptainObvious obviously he is a newbee with proper grammar, too.
 
@Jamal Huh... how?
 
He must've been writing it before it got closed. I suppose the system won't stop you if you post it anyway.
 
6:12 PM
Would indentation cause a bug in Python??
 
Yes
 
It is my pet peeve against Python is that whitespace is significant.
I have, in the past, spent a long time debugging a Jython program, only to find out that one set of 4 spaces was actually a tab.
Introduced by someone copy/pasting code from a place that used tab indentation.
 
Whose genius idea was it to make white space a functional part of the code?
2
 
Out of stars :(
 
6:15 PM
Probably the sibling of the person who thought maven was a good idea
I google searched that, and found this link:
Python: Myths about Indentation
"Whitespace is significant in Python source code."
> No, not in general. Only the indentation level of your statements is significant (i.e. the whitespace at the very left of your statements). Everywhere else, whitespace is not significant
OK, I guess that myth is refuted then?
Or, rather, whitespace is only significant where it is significant, which is true, I guess, for all languages, so Python is no worse than C, which requires space between things lke variable names and keywords.
 
Maven isn't that bad.. As long as you do not much with it
 
like install it?
 
You're really a hater, huh :)
 
@nhgrif She is correct though. EmilyL is one of the few females we got around here!
 
Jul 22 at 13:27, by rolfl
Jun 3 at 17:19, by rolfl
@skiwi - there have been very few things I have tried in life, and truly grown to hate. Maven is one of those though.
Seems I have to remind you every month or so.
 
6:21 PM
@rolfl True, so we can build a longer quote tree
 
My python experience is at least 100 times better than maven
(as in, when I worked with python it did what I expected, when I expected, and worked well, within the constraints of its design, it got the job done. I will even use it again, though not necessarily as my first choice, if I get to make that choice - I cannot say the same about Maven)
 
I cannot say the same about Maven either, it hasn't failed me yet on simple tasks
A question about chat length... Do links count for length as well?
 
0
Q: Thread-safe, in-memory LRU cache with a max item count of 10 (*Revised*)

Frederick C. LeeThe following code is the revised/feedback version of my previous post. The big change was converting RicCache CLASS object to an INSTANTIATED object. I'm attempting to master LRU Caching. It must be thread safe, and it should preferably perform as well as web image-cache, (avg ~1MB). Please t...

 
like [**mytext**](http://superlonglink.com)
 
@skiwi In comments? No.
Not on answers either.
 
6:27 PM
@MadaraUchiha In the chat itself?
 
@skiwi Not sure.
Never had a very long link to try before.
 
Also markup like **...** probably doesn't count either? (for bold)
 
But you can overcome any length limit by adding an extra line
 
True, but this happend here:
in Room for skiwi and TCG ChatBot, 4 mins ago, by TCG ChatBot
[skiwi2/TestRepo] skiwi2 pushed commits bba5a9c3, 124a73c2, 299265c1 and [8bcd84a9](https://github.com/skiwi2/TestRepo/commit/8bcd84a90a776d8fd6aa...
Because every commit url is so long
 
Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Lo
@skiwi That kind of makes sense
Because the algo for cutting the text is really stupid.
 
6:29 PM
@MadaraUchiha That's a very long long.
 
But I don't see why the chat should disallow that
Currently it's my naive implementation of a 500 character length limit that cuts it off
 
get home, see +120 on rep
aww yeah
 
Canada, you so funny:
(removed)
 
@rolfl lol
 
Erm... maybe they think "Russia" is "Russia" and the "Not" is ukraine?
 
6:35 PM
Maybe.
I wonder whether that is really an official statement.... doubt it.
 
Someone should tell Putin to just GTFO
Unfortunately, I'm afraid they've tried that already.
Dangerous times in Europe these days...
 
(See what I did there....?)
 
@rolfl Why the editing?
 
Hmm, is there an easy way to split a List<T> into a List<List<T>> to get sublists of max size k?
 
@SimonAndréForsberg I figure I should keep the politicing out of the 2nd. ... ;-)
 
6:40 PM
Well still funny, +1
 
@skiwi Sure .....
 
I don't think streams offer that functionality though
 
12
Q: Common util to break a list into batch

HarishI wrote myself a util to break a list into batches of given size. I just wanted to know if there is already any apache commons util for this. public static <T> List<List<T>> getBatches(List<T> collection,int batchSize){ int i = 0; List<List<T>> batches = new ArrayList<List<T>>();...

 
@rolfl I'm hopefully going to Riga, Latvia, next month. That will be interesting
 
@200_success Thanks, but I could write those myself, seems like Java does not support it out of the box then
 
6:44 PM
public static final <T> List<List<T>> split(int maxsize, List<T> data) {
    List<List<T>> toReturn = new ArrayList<>(data.size() / maxsize + 1);
    List<T> current = new ArrayList<>(maxsize);
    toReturn.add(current);
    for (T d : data) {
        if (current.size() == maxsize) {
            current = new ArrayList<>(maxsize);
            toReturn.add(current);
        }
        current.add(d);
    }
    return toReturn;
}
 
2
Q: How to make two UPS redundant?

RavinderHow to setup UPS for redundant power supply if 1st UPS goes down then system should work on 2nd UPS if 2nd goes down then system should work with 1st UPS like server power supply.

 
@rolfl You had that one somewhere...? Or did you make it that fast
 
Made it that fast
Not tested
 
split(-1, ...)
kabooooom
 
then you're quick!
 
6:48 PM
Not really kaboom.
 
what's int/0?
 
public static void main(String[] args) {
    List<String> data = Arrays.asList("A", "B", "C");
    System.out.println(split(-1, data));
}
Exception in thread "main" java.lang.IllegalArgumentException: Illegal Capacity: -2
	at java.util.ArrayList.<init>(ArrayList.java:146)
	at ListSplitter.split(ListSplitter.java:9)
	at ListSplitter.main(ListSplitter.java:24)
 
Just a small boom ;)
 
Well, it's an IllegalArgumentException.... and accurate.
 
@rolfl Umm... I don't think that's correct.
 
@skiwi I want pull requests!!
 
public static void main(String[] args) {
    List<String> data = Arrays.asList("A", "B", "C", "D");
    System.out.println(split(1, data));
}
[[A], [B], [C], [D]]
^^^ there, now it is tested.
@SimonAndréForsberg Care to elaborate?
 
@rolfl Nevermind...
Was confused by this:
List<T> current = new ArrayList<>(maxsize);
toReturn.add(current);
Looked like you're inserting an empty list, which you are, but you're filling it later
I seem to have forgot how object references work
 
No problem, If I was right all the time ..... and did not have to apologize for misreading things ....
@Pimgd split(0,....) causes:
Exception in thread "main" java.lang.ArithmeticException: / by zero
	at ListSplitter.split(ListSplitter.java:9)
	at ListSplitter.main(ListSplitter.java:24)
@skiwi - you may want to check for 0 value for split size.
 
@rolfl How is it that programmers, no matter how smart they are, always seem to make mistakes every now and then?
 
6:59 PM
There are so many scriptures and books I want to throw at you right now
#1 Edsger Dijkstra - The Humble Programmer
A programmer is not smart
If you think you are smart then you will make mistakes and screw up
Instead, be humble and try to keep it as simple as you can
 
@SimonAndréForsberg They are human?
 
#2 I forgot by whom it was, but it could have been from The Mythical Man-Month
 
I long ago gave up believing I could write perfect code.
 
A programmer is in the business of specifying ideas and that requires us to grasp every single detail. Yet our brains are wired to abstract these details. So you think "oh, but that's easy, all you need to do is x, y and z and you're done"and then things go wrong
2
 
@Pimgd if you put a whole quote grouped into a single chat post, you would make it more likely we could star them ;)
> If you think you are smart then you will make mistakes and screw up.
Instead, be humble and try to keep it as simple as you can.
See? Stargreed :D
 
7:03 PM
"You have 10 seconds left for editing" OH CRAP OH CRAP OH CRAP
4
 
First Java assignment posted, but it requires a partner from class. I'll just get familiar with the requirements for now.
 
@rolfl Now you really sound like an old wise man monkey
 
I find Ctrl+Enter handy for multi-line single posts @Pimgd. Also, you can make it look nice by adding '> ' before the statement
 
@Jamal Feel free to invite the partner here.
 
The Humble Programmer - Edsger Dijkstra cs.utexas.edu/~EWD/transcriptions/EWD03xx/EWD340.html
 
7:05 PM
Shift-Enter works for me.
 
^^ yeah you're right Shift+Enter
 
@rolfl If he/she doesn't already use SE, that may be tough to do. I'm tempted to start anyway, at least to demonstrate what I have so far.
 
If he/she doesn't already use SE... they're doing it wrong...
 
I don't know anyone in the class, so I may just let him assign a random partner. It doesn't matter to me.
And I have two whole weeks to complete this.
 
@Jamal No JAVA, right? Just Java?
 
7:14 PM
I guess I'll find out eventually. ;-)
 
If your partner starts using JAVA, just smack him and send him our way.
 
He does say that this is good practice in methods, even when it's already implied.
lol
3
 
It could be worse.
Ya know though, I'm not sure how I would feel about taking an actual programming class at this point. I feel like I'd be bored to tears.
Not that I don't have plenty to learn, just that I imagine a class being a lot of
> This is a loop. This is an if..else. etc
 
Finding a class that teaches how to program is different from finding a class that teaches a language. The former is harder to find.
5
 
someone upvote some of my CR answers, I don't want to get more rep on English than there today!!!
 
7:19 PM
ELU +171 CR +130
=D I might repcap on English today
 
@ptwales Hello!
 
3
Q: Custom MultiIterator with type filter

Emily L.I'll start with giving a bit of background as there are many classes involved and I can't attach all of them because that would make this question wildly too long. For the curios they can be found at my github repo. I have an immutable structure called a Chassis which consists of 8 immutable Com...

 
Lots of Qs today @CaptainObvious.
 
@rolfl Are you sure it isn't an 0(2n) complexity? :P
 
@TopinFrassi O(2n) is the same as O(n) They are both linear.
 
7:34 PM
They're not the same, are they?
Yes, they're both linear, but one takes twice as long as the other.
 
An algorithm that takes 2n steps to complete is different from one that takes n steps but they are both O(n).
 
@konijn, SQL SERVER is all I play with for SQL, but yes SQL SERVER has CTE's — Malachi yesterday
@Malachi is SQL SERVER kind of like JAVA?
 
@Phrancis ??????? not sure I am following you?
 
@rolfl Well, I may want to
 
@Phrancis NO. WE JUST TYPED EVERYTHING IN ALL CAPS FOR SQL SERVER.
 
7:41 PM
OIC THX 4 CLARIFYING DUCKY
 
@Phrancis oh I get it now
SQL Keywords are supposed to be capitalized, it's the standard
 
Everyone stop the caps! Please my eyes! I just imagine a bunch of guys all screaming in a small room, it hurts!
 
@Malachi IT IS THE STANDARD, you mean
 
I wish someone would post a CR question in LOLCODE
 
@skiwi lol
@Pimgd Don't tempt me.
Can I haiz SO?
I'm in ur loop
I'm out of ur loop
K thnx bye
3
 
7:46 PM
I was not aware there was such a thing as a formatting standard in SQL, TBH I've seen to many different formatting methods at this point. I started writing KEYWORDS IN ALL CAPS but then quickly got tired of switch CAPS LOCK on and off all the time so I write it in small letters now
 
My first mortarboard on CR!
7
Was about time
 
Ya know, it's a good question @Phrancis. I know of no formal document for a standard.
 
@RubberDuck shouldn't LOLCODE be all caps (except for variable names?)
 
@JeroenVannevel Grats!
 
There is no formal indentation standard either for SQL
 
7:48 PM
OMG SOMEONE FINISHED THE INTERPRETER?!
 
or even informal
 
@Pimgd Yes, at least that's how the docs are written. The interpreter
 
@RubberDuck Syntax error: K thanx bye should be kthxbai
 
I'm downloading a C compiler just to write LOLCODE. That's all there is to it. I'm so terribly ridiculously excited.
 
(kthxbai is a keyword!)
 
7:54 PM
@Jamal Oops. Thanks!
 
gimmetehlibrariez <array>
 
I HAS A VAR            BTW VAR is null and untyped
VAR R "THREE"          BTW VAR is now a YARN and equals "THREE"
VAR R 3                BTW VAR is now a NUMBR and equals 3
Yarn, I see what you did there......
 
0
Q: Sanitzing input on form submit with PHP

BrianI was hacking around this morning and wanting to use automatically generate safe-to-use variables from $_POST. Probably not the best use of extract() and compact(), but extract() allowed me to prefix variable names and compact(explode()) seemed like a neat way to stick everything back into an arr...

0
Q: Comments for a NULL Eating version of fgets() in C

LarryFchar *my_fgets(char *Buf, int iMaxCount, FILE *fp) { // Handle basic failures. if(!Buf) return NULL; if(iMaxCount < 1) return NULL; if(!fp) return NULL; // Create a buffer on the heap for our data to be read in char *lbuf = (char*)malloc(iMaxCount); char *p = lbuf; ...

 
Are we going to see our first FizzBuzz in LOLCODE Ducky?
 
DO EEET
 
7:58 PM
OBTW
  This program doesn’t do too much and you may be
  wondering why it needs such a long comment, well,
  it’s to help you understand how multiple line
  comments work!
TLDR
HAI 1.2
  VISIBLE "O RLY?"
KTHXBYE
^^ I love their multi-line comment syntax
 
@Phrancis Maybe, but I need to get set up so I can make sure it works before posting.
 

« first day (481 days earlier)      last day (3528 days later) »