« first day (893 days earlier)      last day (2075 days later) » 
00:00 - 13:0013:00 - 00:00

12:00 AM
ImportError: No module named RPi.GPIO
There are 1577 unanswered questions (94.3208% answered)
Ideone probably doesn't have RPi.GPIO in its known modules.
No, not that, I have that module in.
I just posted it on ideone so you could see it
It has to do with 'sent'
The complaint is a syntax warning name
Line 23 and 24 are probably all that are relevant.
Why are you worrying about touching global? No other subroutines are using sent.
12:07 AM
If I just do sent = False, without that, it creates a local instance and complains that I used the local instance before declaring it.
I use global to make sure it knows I'm referring to the global one...
Though, this is all based on a few things I've read on SO.
I could be completely mistaken about implementation, which is why I beseech your knightly prowess, hehe.
Exact error, just for reference.
if not sent:
				funk_socket.send(bytearray("play\r\n", "utf-8"))
				global sent
You are using sent in the if statement before you actually use global sent.
Try moving global sent to the very beginning of your function.
A: Should it matter if I use bootstrap.js or all the 14 separate .js -files? Trying to build affix behaviour

TruthYou idiots honestly have no idea what the bootstrap javascript file actually does. I mean this is terrible programming. Everything sucks nowadays because nobody knows honestly what things do and nobody is documenting anything.

Dat username
Does that fix anything?
Yes, that's exactly what I needed. :D
Lol, thank you so much. I've been trying so many other things for over an hour.
No problem.
12:14 AM
Not sure if ninja, but definitely a knight. Python scope is definitely interesting-- will take some getting used to: e.g. non-local, global keywords seem like they should mean the same thing but don't.
Thanks again!
<ninjaknight vanish>
<kingcodefish appear>
@EthanBierlein LOL, I noticed the TI calculator first. It looks almost exactly like my TI 36X II.
Is it the TI 36X II solar version?
@SirPython Isn't that an "InterruptError"?
12:30 AM
I just pasted what Ideone said.
You interrupted her anyway.
I've got 10 minutes to kill. I think I'll read about another communication theory.
I have to write another paper for that class; I chose the Uncertainty Reduction theory this time.
12:44 AM
So I just finished the Nerd test and got Uber-Dorky Nerd King :P I may try to improve my score soon, but I posted everything true. :P
Welcome to StackOverflow. Please read and follow stackoverflow.com/help/mcve. We need you to describe your problem clearly: you've posted your code, but you haven't shown the output you have so far, nor what you expect to see at the problem point. "Any help" is far too general for this site; we're not a tutoring service nor a coding service, and code reviews belong on the code-review page. You may need to add some useful print statements to illustrate your current sticking point; that's fine with us. :-) — Prune 18 secs ago
Did Duga say that because I said "try" or "posted"?
She said that because the comment says "code review"
@Duga except we're a little more than a "page"
Plus it says Prune at the end, did Duga copy the message from someone?
Hey @DavidG
12:56 AM
Prune is the user who posted the comment.
(don't let me down, @Duga)
Hello Code Review! — Mat's Mug 39 secs ago
I see
Free flags?!
12:57 AM
question deleted anyway haha
But why did Duga post it in our chat thread as a reply to me if Prune was on SO and the comment talks about SO?
It wasn't a reply to you. You weren't pinged.
wasn't a reply
just a coincidence
Duga posts these comments that mention "code review" from SO so no one incorrectly refers someone to post their question on Code Review.
timing. timing is everything
12:59 AM
Ah, I see
Q: You are being watched! - Comments of Interest

Simon Forsberg You are being watched Code Review has an open system A machine that spies on you on every hour of every day I know because I built it. I designed the machine to detect suggestions to post on Code Review but it sees everything Horrible comments involving ordinary users Users like yo...

Sep 26 at 0:00, by Duga
code review INTERRUPTSirPython 25 secs ago
lol, that was epic
TTG. See you all.
1:00 AM
Got an exam to take. Later.
Done. 40 sec for a 4 question exam.
Wait what?
I had a 4 question exam, had 12 minutes to take it, and finished in 40 seconds.
What exam has 4 questions?
A communications exam on the Semiotics theory.
Lol, that must've been easy. :P
1:05 AM
Yup. Open book too (I used the PowerPoint).
Oh lol
Now that I'm a junior, everything is open book.
The freshman and sophomores have it the hardest. Even the 1xxx classes are often harder than the 3xxx classes.
That must suck
shrugs I've only gotten a B in one class - by less than a percent. That class was a mess - we had to retake exams like 4+ times because they were quizzing us on the wrong material.
Wow, lol
1:07 AM
I might get an A- in one of my classes this year (limit for an A is 95%), but I'm on track to get A's in everything else.
I've been a straight A student for as long as I can remember. :/
Nice. I got B's in Calc, Advanced Physics, and Advanced Chemistry my last HS year.
Otherwise, I've always gotten A's.
Must be something to do with programmers ;)
So what are you majoring in?
IT Management. They don't offer SE online.
My parents say I should get a Masters, but I'm not sure if I want to - school deadlines are stressful.
Are you pursuing to be an IT guy or a programmer?
1:10 AM
I'm minoring in COMM.
And, I hope to be a programmer. They have all the fun.
Huh, 50 minutes until dishes time - should I study or play?
Not sure. What's more boring for you?
Also, COMM?
Studying, generally because I do it so hard. COMM == Communications.
Want to play a game with me? bejofo.net/ttt/15167127
I guessed it was that, wasn't sure. Yeah, I'd say play if you're ahead of your class, otherwise, keep going! :)
Well... My brothers were exposed to Chicken Pox earlier this week, and I haven't had it yet...
I'm ahead, but...
Is this multi-dimensional tic-tac-toe?
1:14 AM
Oh cool
Just finished reading the rules, got it now
Dangit, I messed up that move.
"This should be in CodeReview" I don't think it existed in 2008 :) — Zammbi 10 secs ago
Man, this game is as hard as Chess lol.
@Duga We have two questions from 2008...
Yep :P
1:28 AM
Must've been migrated. Our first meta is 2011.
Yeah, because I don't remember this site being that old at all. SO came out when? 2006 or 2007?
Nope 2008, yeah this site wasn't even close to that date.
Pretty tough game.
Yeah :P
1:44 AM
I think I just sealed your doom lol.
Nice game.
Thanks, I had a lot of fun
I have to go eat btw
See you.
Q: Array search algorithms: performance comparison

Stefan StankovićI'm making a program that compares Multi-key sequential search and Interpolation search in a sorted array by the number of array accesses for my assignment. The current code is as follows: /* * A program that compares Multi-key sequential search and Interpolation search in a sorted array by the...

Q: How to count the number of times a word appears in a txt file but not including the possessive form of the word?

HaleyI am just starting to learn how to program in Python for my intro to programming class. The assignment is to prompt the user for a search word and then search the file, Text_File.txt for the search word and compute the percentage of times the word occurs in the document, e.g. if there are 300 wo...

Q: Determine the number of factors of a large numbers efficiently

Somnath RakshitI am trying to determine the number of factors of a large number efficiently. I have written this function but how can it be improved upon? long numOfFactors(long long n) { long i=0,num=0; for(i=1;i<=n/2;i++) { if(n%i==0) num++; } return num; }

1 hour later…
3:05 AM
Q: So What is Maintainable Code?

Motoko KusanagiI've spent my fair share of time criticizing other people's code on this site; but I'm finding out I'm kind of a hypocrite. Almost everything I've written so far has been some program whipped together to do some task for me. I have little experience actually starting out writing maintainable code...

This question seems more appropriate for Code Review site, you may try posting it there. — Marcos Dimitrio 31 secs ago
no one is live?
3:29 AM
I am
3:41 AM
I know this is not a code review question but rather than putting a comment next to the line.V code, why not just call the property line.Visible? — craftworkgames 31 secs ago
@MotokoKusanagi eh, just slow
Me too.
Q: SPSC Wait Free Ring Buffer for incoming messages

sunThis is for a single producer and single consumer wait free ring buffer. The writes need to be wait free for sure. It pre-allocates messages slots and uses a claim strategy to capture a buffer for write or read. For writes, it uses a ping pong strategy if the buffer is full which means if it find...

If your program works, I would ask this question on codereview.stackexchange.com instead. That site is targeted towards improving and refactoring code whereas SO is more for folks whose code doesn't work. — John Kugelman 12 secs ago
I wonder what neat things I could do with anonymous functions
3:57 AM
@EthanBierlein Summation!
Sounds liek something I could easily do in F#
Oh boy! I missed a -19 scored rant question on Meta, what a shame
Ooh! Where?
I bet that was fun to watch not really
Oh, is it that one about the OP ranting on how his regex question was closed?
3:58 AM
Yeah, that one
lol, that question was a hot steaming mess to begin with
The syntax for anonymous functions in F# is fun
Lots and lots of "fun"
God, F#'s list comprehensions feel so backwards to me
ffs sake f# why
4:15 AM
i actually have the 2nd monitor on my second monitor for once
Q: Julia flattening lists of Vectors and Matrixes into arrays

OxinaboxFor many Optimisation methods the parameters must be given as a single vector (Eg Optim.jl). But for many interesting functions the parameters/coeffients to be optimised are matrixes, or a mixture of matrixes and vectors. Often this mix can be put into a composite type. I got sick of rewriting m...

Time to test this
how are you people doing this evening, or whatever part of day it is there?
whatchu testing?
anonymous functions in F#, it looks like
first I have to calculate it in a scientific calculator, and get the correct result
4:19 AM
is that a thing unique to f#, or is it known differently in other languages?
Anonymous functions are all over the place
not unique, but some languages dont have them
They're best though when used in functional languages
they're also called lambda functions
4:20 AM
(googles and finds lambda) oh ok. thanks, google
It works!
Now let's move on to a product to make this a more complete piece of code to review
i got it to work
I might post this
4:31 AM
Unfortunately, broken code, or asking about writing unwritten code is strictly off-topic on Code Review. We would, however, like to review your working code. Assuming the current code is working, you should edit out the 'off-topic'ness of the question, so that it is not closed. — Quill 6 secs ago
maybe I should read these questions before I get invested in writing answers for them (off-topic questions)
Q: Summations and products in F#

Ethan BierleinI was bored, and looking to do something that involved anonymous functions, and it was suggested by @Quill, that I create a summation function. I decided to also include a product function as well to top the whole thing off. For those who don't know, a summation is usually defined like this: ...

I sure hope my flight tomorrow has in-flight WiFi
do you just declare the variable name to return it
Q: Summations and products in F#

Ethan BierleinI was bored, and looking to do something that involved anonymous functions, and it was suggested by @Quill, that I create a summation function. I decided to also include a product function as well to top the whole thing off. For those who don't know, a summation is usually defined like this: ...

Q: Prepend data to stream in C#

Javid PackFirst time poster. I'm working on an XNA project that loads several resources that are packed into a single file. XNA can take a WAV file stream and turn that into a SoundEffect (seen below in "case ".wav""). Since WAV files are large, I want to enable MP3 audio as one of the resources, so I ...

Q: Find total number of phone numbers formed by the movement of Knight and Bishop on keypad

Rakesh Ranjan SuklaI recently gave a test on HackerRank, and submitted my answer for the following question. I passed all the test cases but company told me that the answer is not efficient, and they are not moving forward with my candidacy. I don't have a screenshot of the question, so will explain as much as po...

5:07 AM
Q: remove a Nod from a special linked list

S.FHow can I locate and remove a Node from a LinkedList that has only “head”? It does not have any tail, current, header, trailer and counter. I also want to throws a “NullPointerException” if this list is empty. And return true if supplied value found and removed; else returns false

6:01 AM
Q: removing a node from special linked list

S.FThis question was my exam question: Locate and remove a Node from a LinkedList that has only head. It does not have any tail, current, header, trailer and counter. I also want to throws a NullPointerException if this list is empty. And return true if supplied value found and removed; else returns...

Q: Efficient program to find the sum of the 3 largest numbers in an unsorted array

Somnath RakshitHow can I find the sum of the 3 largest numbers in an unsorted array without using any kind of sorting function. Here's the code that I wrote using the qsort() function in C. Choice of language is no barrier, although I'd prefer C, C++, C#, Java or Python. #include <stdio.h> int array[100]; int ...

Q: Is this the Best method to get prime numbers between a range

Sujith KarivelilI have the following code To get the prime numbers between a range of numbers, is this the best and fast method? int[] numberCollection = Enumerable.Range(startNum,Count).ToArray<int>(); string primeNumbers = string.Join(",", from number in numberCollection ...

6:19 AM
Q: Design-only answers?

h.j.k.We generally don't allow design-only questions. A question has been asked that provided review-able code, and depending on your POV an additional question is asked about 'maintainable modular code' in general. Now, that is definitely more design-related than code-related, and in my answer I have...

6:40 AM
Q: Speeding up Python depth-first search in large graph

muskratI'm building a Markov text poetry generator. The main method, which is attached below, performs a depth-first search through the Markov chain, which is implemented as a NetworkX digraph of Word objects, which have methods for determining whether e.g. a Word rhymes with another Word instance. At...

6:54 AM
Also, this code has a number of problems in it. I'd recommend posting it at codereview.stackexchange.com to get it critiqued fully. — Andy Turner 34 secs ago
Q: Nested Grids layout with ScrollViewer and TextBoxes with wrappable text

Vojtěch DohnalI have the following XAML WPF layout (the smallest example I have managed to produce): <Window x:Class="ESiftClient.TestWindow1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="TestWindow1" He...

7:11 AM
Is anybody here who can't view deleted answers ?
@Prune I am not asking for a code review, although welcome, I would prefer an algo explanation on how to go about solving the problem. I used help/on-topic as a guide. However is there any other suitable place to ask this sort of question? — IamOgbz 40 secs ago
7:34 AM
Never mind, I figured it out self
codereview.stackexchange.com is where you'd get your code reviewed. SO is for specific programming questions. — B.K. 44 secs ago
Sorry for being off topic as said by @B.K. I 'll refering to codereview.stackexchnage.com — harry 50 secs ago
8:05 AM
Q: Please idenity the problem in the code below

harryI am stuck with the code shown below. I want to extract SQL server db All Tables Schema in a treeview box but unable to sync table name node with its child column names nodes. Please see the code and identify the problem. [Thanks]. dbConnection.Open(); DataTable schemaTable = dbConnectio...

@CaptainObvious off topic. borken
8:30 AM
Hi @MubeenHussain hope this link will help for you:codereview.stackexchange.com/questions/44021/…Soorapadman 56 secs ago
6 posts in the review queue, I'm not sure I've ever seen it so high (apart from when all those old questions were resurrected anyway).
Q: How can I write this code better?

Patiphan MahamatI think my code is sloppy can anyone give me advice to do it better? <div class="row"> <div class="twelve columns tac"> <?php if (isset($_GET["page_num"]) && $_GET["page_num"] >= 2): ?> <a href="?page=blog&page_num=<?php echo($_GET["page_num"] - 1); ?>">Back<

@Voo - I've worked on big and small projects. I've definitely come across bugs introduced by forgetting to update the equals method (even with code reviews). While in general I agree reflection add unneeded magic, when wrapped up nicely in an API I personally have no issue with it. — mlk 41 secs ago
8:45 AM
@Mast @skiwi
user image
@CaptainObvious @MotokoKusanagi You were quick with accepting an answer there.
@JeroenVannevel Is that the thing this week in Belgium?
We're number one on the FIFA ranking and The Netherlands couldn't get through the qualifiers
That's going to be the thing for the next year
Fair enough
You deserve your year of fame.
This question should actually go to Code Review. — t3chb0t 13 secs ago
Linking this manually because @Duga may not pick it up (due to markdown magic):
8:51 AM
In november belgium plays friendly games against Italy and Spain
@t3chb0t Nope, this is asking for explanations. We do reviews, not explanations at Code Review. — Mast 44 secs ago
I need to get a flag and watch the BE-ES game in a bar here
@JeroenVannevel That would be awesome.
9:08 AM
One of the Programming Puzzles & Code Golf users decided to make Brainfuck even more complicated:
Monking @SuperBiasedMan
Also, today is BYOD day:
Very interesting to find this question and this opposite question both in the Hot Network Questions at the same time! — AndyT 20 hours ago
Weird. Why would a company want to do that? The only time I've had to do that was because the studio ran out of computers at a high turnover point but they didn't intend to do it.
@SuperBiasedMan IMO BYOD is never a net positive for a company. If somebody wants to do it, it should be treated as a perk (and a pretty substantial one too).
Q: Gathering data from huge text files

YeshuaI have a text file composed of several subsequent tables. I need to get certain values from certain tables and save them in an output file. Every table has a header which contains a string that can be used to find specific tables. The size of these text files can vary from tenths of MB to some GB...

9:25 AM
This question might be better suited for codereview.stackexchange.com3dd just now
@Zak It's a net positive till something goes wrong, which is just a matter of time.
And with enough employees, it's simply not worth the risk.
Bring Your Own Doom
What they forget here is the in-between situation: unmanaged laptops
That's what most of us at my previous job had.
Except the secretary, since she accidentally unleashed a virus on the network earlier...
With a company laptop.
Q: Resolve entity behaviour based on enumeration type

user1820426The core of this question is removing a Static Class smell from my Web-Api/MVC solution. It presently works but feels kind of dirty. Present Solution Standard solution with 6 projects: MVC Api Api.Client - wrapped client to make in-code calls Api.Model - Dto's, Request models, etc. Domain - ...

9:54 AM
Trying to write C++ in Python doesn't work...
Is that... with a Python script or what?

user86837class DBfunc{ public function __construct(){ try{ $this->conn = new PDO('mysql:host=localhost;dbname=scheduler','root',''); $this->conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); }catch(PDOException $e){ echo $e->...

No, it's just a side effect of working on several projects in different languages at the same time.
@CaptainObvious UWYA'd for lack of context.
Like, knowing how to solve about a particular problem in language No1. by hard, thinking you can do the same trick in language No. 2 and writing unreadable code in the process.
Different languages have different constructs.
Switching between those goes wrong every once in a while, as it just did with C++/Python.
Ahhh, yes. I'm sure I'm doing that in my Android tinkering.
Java is very much not Python.
@CaptainObvious Also has a non answer
As far as I know professionals don't write in all caps. — vaultah 6 mins ago
2 more VTC
And that answer needs to be hammered.
10:09 AM
Yeah, I finally had a reason to case a delete vote.
@SuperBiasedMan ALL CAPS IS SO PRO
@SuperBiasedMan Yea, in cases like this I miss my delete vote. I can only delete vote old questions.
Monking @Pimgd
Monking @Pimgd, thanks for the review!
10:13 AM
oh that's why I get upvotes so fast
I was looking for the link in chat
I was about to comment but, I have no idea about caching. It's something I need to look up but since it's an android thing I'm hoping to keep things from being wasteful, so I want to know what I'm doing before I start caching stuff.
It's basically I don't know about how android works with drawables
maybe it's a in-memory graphical object, like in flash with as2 with movieclips
in that case, caching is bad
you'd get major slowdowns as stuff piled up
if it's just a set of pointers to asset files
then you could keep it around
Hey @Pimgd - good to see you again ;)
10:19 AM
Q: How can I make this function better?

Daria MI have a function that formats a number (even a float) to a German decimal format. I got this function from here http://stackoverflow.com/questions/149055/how-can-i-format-numbers-as-money-in-javascript and it works. But every time I want to format a number that I stored in a variable I have to ...

@Pimgd I believe it's in memory, which is indeed the issue. I think I need to manually create the files to cache them, but that's something I might try anyway.
eh caching is just optional suggestion
I'm more worried about that bug
Yes... that was a bad typo. Only went unnoticed cause I only have one texture for testing at the moment. They indeed should be is.
configure your syntax highlighting to use different colors for local variables and numbers.
That's a good tip actually, I'll do it when I go home. Thanks!
10:36 AM
Q: Data Structures in C (Single Linked List)

AntonioCSI am trying to get back to basics with C, si I am doing some data structures in it. The following is my implementation of a Single Linked List (The code is on github with tests). LinkedList.h /* * File: LinkedList.h * Author: antoniocs * * Created on 26 de Setembro de 2015, 19:54 *...

Q: React Native: passing props individually vs. passing whole object as a prop

zvonaThis is a question about best practices and secondarily about perfomance. Which is preferred: let someObject = { foo: 1, bar: 2, foz: 3, baz: 4, ... n+1 key-values ... }; Either: <SomeElement {...someObject} /> or: <SomeElement someObject={someObject} /> Now SomeElement has this.props.f...

@CaptainObvious example code
@JeroenVannevel Haha
Now if I could only pick who would hug me
@skiwi I'll hug you. :-)
@skiwi you still can do this : facebook.com/events/1487375681580102
@Heslacher Haha
We won't be German supporters for sure
10:48 AM
I know ;-)
I liked it how the irish team and fans have shown their happyness after they had won against us
I hope the Dutch will start wearing the tricolor now for the next championship
2 more VTC on here
@JeroenVannevel Nothing wrong with our own tricolor
It used to be yours as well
For some reason the Belgians didn't want to stay in the United Kingdom of the Netherlands
But I'll get myself a crate of Jupiler to be supportive
There's only one decent Dutch beer around anyway (Hertog Jan)
You don't know how much I suffer, being offered Heineken everywhere outside of Belgium
Sometimes they catch me offguard and hand me it before I can throw something at the bartender
Those are the bad days
@Heslacher We have an irish version of the Onion which ran with the headline "Ireland fans keep a level head as they celebrate victory by the greatest team in the world."
I have seen a picture where I wish, if I will ever be reborn that I will be reborn as a handy. : thebiglead.com/2010/06/17/…
11:04 AM
The Belgian girl isn't on there?
Belgium was in a craze about her during the cup
This one?
The one which later posted that stupid picture on facebook ?
Yeah her
@JeroenVannevel euthenesia?
11:14 AM
this is not a proper question, consider posting in "code review" on stack exchange — Ori Price 38 secs ago
The clinically depressed woman that was granted the right for euthanasia
24-year old
@OriPrice This is not a proper question on Code Review either. — Mast 27 secs ago
Argh, Duga took it before my edit. Code Review actually links to our on-topic helpcenter now
@JeroenVannevel Why?
@Duga I sincerely considered flagging it as offensive...
Q: Estimate code quality of my js library

Taras MazurkevychI wrote small javascript library for material design toasts(notifications). github repo - https://github.com/madtaras/madtaras-toast Please write what are my mistakes and how can i correct them. Code works correctly and was linted with jshint. I just want you to estimate code quality. (functio...

You should ask this question on StackExchange Code Reviewagabrys 51 secs ago
11:22 AM
@Mast because pretty girl
Belgians are easily impressed it seems.
This week I've spent much more of my time thinking about my code before coding it, and suddenly I'm making progress much faster than I was before.
@Zak Just don't overdo it, then you end up thinking more than procrastinating
@skiwi Or think more than you write which makes it look like procrastinating without the beneficial effects of actual procrastination.
11:28 AM
@Heslacher See, there's an odd thing in life....
That picture:
That's my cousin in there... ;-)
@rolfl really ?
Time for a CR meeting with @rolfl's family
that ^^
The story behind that picture is complicated, but, during th 2010 world cup, a brewery hired a bunch of locals in South Africa, and gave them tickets to the one game, on the condition that they all wore colors, and dressedup in uniform.
11:30 AM
@rolfl really?
Oh, they got quite a problem with that.
Too bad I don't happen to know any of them
So, the truth is, those "dutch women", are actually africans ;-)
yeah, my cousin spent a few hours in jail, was released without charge.
11:31 AM
That's not so nice
Budweiser (thanks to Youp van 't Hek no longer available in the Netherlands) had a beef with Bavaria, alerted the FIFA and hell broke loose.
Those girls just got caught in the middle without doing anything wrong.
So @rolfl which one is your cousin ?
2nd from the far left (blonde).
She has a significant online presence.... let me find a different, publicly available picture.
You should introduce me ;-) but I guess my wife will complain :-(
@Heslacher Well, you could always ask her stance on it...
11:34 AM
It's probably as bad as actually doing it though :P
@rolfl If you want me to explain my comment about file reading let me know, I was pretty scant in my explanation on the post
@Heslacher I assume your wife isn't reading The 2nd Monitor like @rolfl 's is?
@rolfl You're sure she isn't Dutch? Could've fooled me.
@Mast Like me, she's really mostly Norwegian.
Explains a lot
11:37 AM
How do you think I got my name ;-)
I thought that was a French joke
You mean Lear isn't an Afrikaanish name?
Or I'm just confused :P
Guys I know this is not a proper question for code review but if you people understand my question or problem you will try to help me out of this problem like @Sourabh rather than you start passing out comments against my question that this is proper or not, I am sorry guys. — Dami 49 secs ago
My mom is 100% norwegian, and my dad 100% british
Anyway, the real point, is that the backstory on that particular photo is much more interesting than you may realize.
@SuperBiasedMan It appears to make sense now. I have deleted my answer. So, in python, the stream is not reopened for the line in file structure.... and the file is only read once?
The assumption is that the file has to be in the same order as the outer-loops of the indexing.
The Pythonic way to read a file is to use open with(path, mode) as file_var
11:50 AM
And there's the deviation
Hook a reader to the file_var and go for index in reader on it.
Yeah, for line in file just starts reading from the stream wherever the pointer is. It's not reopening the file from the start. I'm not sure if OP misunderstood that? Because their code still works and relies on that happening.
Well with open(file) as file_var doesn't actually affect how the file is read, just makes sure it gets closed.
for part 2 codereview will be a better place — sam2090 58 secs ago
OK, so the file structure must have a very precise layout, which, I guess is OK, just so long as it is clear, and documented, etc. It is not clear from the post that the structure is as well defined as it needs to be. Probably works because the structure is right, but still, it's concerning.
Which is why you usually hook a reader to it, like a CSV reader
11:53 AM
Yeah it's very poor practice and not clear in the slightest.
@Mast You have little idea of what's going on here, or are you just being a peanut gallery?
I'm trying to be helpful, as someone who often writes Python. Probably not working out too good.
takes a walk
# of blocks: 2         # of tables:  3         # of elements:   2

 block    1 :    0.00000000 0.00000000 0.00000000     weight = 0.00059488

table   1 # En   -6.05848979 # occ.  1.00000000

elm   col1   col2   col3   col4   col5   col6   col7   col8   col9    tot
  1  0.040  0.008  0.005  0.003  0.000  0.000  0.001  0.000  0.001  0.059
  2  0.618  0.001  0.001  0.001  0.000  0.000  0.000  0.000  0.000  0.622
tot  0.659  0.009  0.007  0.004  0.000  0.000  0.001  0.000  0.001  0.681
  1 -0.017 -0.003 -0.002 -0.001 -0.000 -0.000 -0.000 -0.000 -0.001 -0.025
@Mast ^^^^ Hook up a CSV reader to that ^^^
The CSV was just an example of-course.
Yeah a CSV reader would probably help a lot. I haven't used the module much so I didn't want to try recommending it
...and I had a lot else to say.
12:01 PM
I realy wonder why it is damn winter here already, it's way too early
Where... want to go there
The Netherlands... why would anyone want winter?
because hot sucks
^ that.
then again it's cold-ish at my place too, so no reason to go to the netherlands
Everyone wants the weather they don't have.
Anyway, time to go review some lunch. Later folks.
12:33 PM
Q: Generate all elements of a power set

CodeYogi/* * Power set is just set of all subsets for given set. * It includes all subsets (with empty set). * It's well-known that there are 2N elements in this set, where N is count of elements in original set. * To build power set, following thing can be used: * Create a loop, which iterates al...

Q: Project Euler 62: cubic permutations, logic

N3buchadnezzarProblem 62 of Project Euler goes The cube, 41063625 (3453), can be permuted to produce two other cubes: 56623104 (3843) and 66430125 (4053). In fact, 41063625 is the smallest cube which has exactly three permutations of its digits which are also cube. Find the smallest cube for which...

Q: Why are my two javascript objects behaving like they have different scopes?

KjetilNordinI have two separate jsp pages. in both of them, I define a page variable, in the uppermost level of the javascript. Then I set the variable, by parsing an incoming json string. Both of them appear perfectly as excpected, when performing an immediate console.log, but one of them is once again und...

@SuperBiasedMan How was your lunch review?
@rolfl I actually recall that story! What a small place is the world
12:50 PM
Ok, planned on stopping 4 hours ago... finally fixed the last error.. bed time
@SergeyA: So use an infix iterator. — Jerry Coffin 1 min ago
This is not a code review or advice site. You can try asking your question at Code Review, but please make sure to explain exactly what you need help with. — Ed Cottrell 29 secs ago
00:00 - 13:0013:00 - 00:00

« first day (893 days earlier)      last day (2075 days later) »