« first day (460 days earlier)      last day (3561 days later) » 

7:00 PM
I'm implementing a uh
Peer-to-peer interface that sets up connections without port-forwarding
between cameras and mobile/pc
 
Yup. Greek.
=)
 
hmm
I'm improving the internet connections between cameras and mobile phones as well as PCs by removing all the configuration...
by automating it
Someone else has made that part, I only gotta implement it on cameras, mobiles and pc
That make more sense?
 
@ckuhn203 actually it can't start at zero because the next number is defined by the sum of the two preceding numbers, so if you start at zero you'll have [0] the second number will be the first number plus zero because you still don't have 2 numbers, and it'll become [0, 0], then the third will be 0, the forth, the fifth all of them will be equal to zero... that's why you can't start the fibonacci series at zero. — matheussilvapb 6 mins ago
Uhhhhhhh what?^
Ahhhh ok @Pimgd. That makes more sense.
 
He's saying that
0
^ = 0
^ + ^ =
0 + 0
= 0
which goes on forever
You do 1 instead...
1
^ = 1
^ + ^ =
1 + 1 = 2
    ^ + ^ =
    1 + 2 = 3
@ckuhn203 that make sense?
Are you recycling stars?
 
Is that some new kind of smiley? ^ + ^
0 + 0
 
7:10 PM
No I mean value from above
 
@Pimgd Yeah. That makes sense, but that's not how it works.
 
I can't whiteboard doodle on here so I have to make do with ASCII
 
The Fibonacci sequence has to be primed either way.
*Primed as in carburetor not primed as in number.
 
@Heslacher 1k rep!
4
 
Congrats @Heslacher!
 
7:17 PM
0
Q: Validating UTF-8 byte array

Óscar LópezI'm writing a validator function that receives a byte[] and checks whether it represents a valid UTF-8 byte sequence, according to this table. Is my approach correct? so far it has worked fine with my tests, but I'm worried that I might be missing some edge case, or that the way I'm handling byt...

 
My SQL SERVER Foo is fried, I have 2 tables with the same columns but the selections should differ by a single row,....this sounds bad even as I am trying to type it out......
 
Foo
CLOSE
knee-jerk reaction =/
 
0
Q: Factoring Integers the fun way

Simon KuangCode dump: function factor(n) { function count(a) { if (a.length == 0) { return []; } else { var x = a.pop(); var l = count(a); if (l[x] == undefined) { l[x] = 0; } l[x]++; ret...

1
Q: Trading Card Game Prototype in OOP

bazolaSo I am sure there are better ways to set this up, but I wanted to see how something like this would work in Objective-C, so I went ahead and built a prototype of a Tradeable Card Game. I've never loaded information from a plist before, so this was the perfect opportunity for me to try that. Th...

 
Factoring integers is never fun
/grumpy
 
7:57 PM
1
Q: Ruby - Numbers to words

archieWrite a program that will take a number from 0 to 999,999,999,999 and spell out that number in English. The code works but I am not happy with it since it is hard to read. Thoughts/Suggestions to improve appreciated. class Say UNITS ={ 1=> "one", 2=> "two", 3=> "three", 4=> "fo...

 
@CaptainObvious I edited the title, it was originally "How do I make my code more elegant and readable in Ruby?" which didn't really say anything
 
good job @Pimgd
 
@Mat'sMug why is your name in italics
 
because I'm a mug room owner :)
 
...did I just get beat by three edits?
2
 
8:00 PM
haha
 
yeah
 
applauds
(non-sarcastically)
 
reopened
5
Q: Running 2 sets of tasks at the same time

suexicanoCurrently, my team and I have 2 types of databases that are updated periodically, SQL Server and Access. Also, we run specialized reports based on those databases. Basically, we have 4 tasks that need to be completed: Update SQL Server Publish SQL Server Reports Update Access Databases Publish...

 
@Jamal @Pimgd beat me to it too actually.
 
good answer here too
1
A: Cake view with interleaved PHP and HTML

jsanc623Why not go with a template like Twig or Blade which would make the syntax a lot cleaner, while retaining most of all the controls. Also, remember that the view is for showing data, try to maintain as much logic OUT of the view as possible. Here's an untested version of your code with Blade: <u...

 
8:04 PM
caaaake
oh wait, non-edible cake.
sadness
 
The CakePHP is a lie.
 
yeah it is
 
Am I the only one that freaks out over people that like to wrap Entity Framework in a UoW+Repository pattern?
 
@Mat'sMug I've never understood the constant hype either
I can accept repositories in front of the EF, but UoW seems like such a hassle
EF makes it not really needed
 
I feel like I'm repeating myself everytime I see a question about it
actually... I am :/
this guy needs help
3
Q: Is this Repository/UOW design workable?

Abu HamzahI'm using VS 2013/EF 6/WEB API 2. This application of mine which is working on will eventually grow to be big project and I'm in the very beginning stage and need your expertise to make it simple as possible without over-complication. My goal is to make it KISS solution and I'm trying my best. ...

 
8:14 PM
coding help or mental institution help?
 
IDK, depends how you interpret KISS+UoW+EF in the same post ;)
 
Is this a follow-up question? I'm confused by your updated code, considering that it wasn't added here in a later revision. — Jamal ♦ 40 secs ago
 
And I just accidentally deleted 6k records.... hoping I can fix this before anyone notices.
 
@ckuhn203 ouch.
 
DOOM DOOM DOOM
 
8:19 PM
Ya know what, if they do notice.. it's just an argument for spending the damn money on a test environment.
screw it.
 
lol.. #toldya
 
lol
Thanks @Mat'sMug. That made me feel better.
 
and recovered.
Glad I had the data in a worksheet.
I do think I'll just be better off looking for a post to edit though... enough work for a day.
 
8:38 PM
how do I start the VBA in EXCEL again?
can I make it query SQL?
 
Alt+F11
and yes :)
 
Tell me more!
 
you can even go way overboard with it:
10
Q: YARPI: Yet Another Repository Pattern Implementation

Mat's MugFollowing-up on this post, I wanted to be able to put a copy of that Excel workbook on a USB key and take it home to keep working on the code a bit (there's more than just one or two tables to maintain, so I'll have about a dozen forms when I'm done)... but to be able to test every functionality ...

you need to add a reference to ADODB
uh, Microsoft ActiveX Data Objects 6.0 library, it's called.
 
I just want to be able to ask for a parameter and then feed that to SPROC and have the results list out.
@Mat'sMug using imports?
 
Tools > References
 
8:41 PM
Yup. That^
 
that thing predates Imports :)
 
That thing predates ALL THE THINGS
 
how about 6.1?
 
whatever works!
 
That's what I'm using.
 
8:42 PM
it goes from 2.8 to 6.1 ???
 
Legends say there once was a version 1.0, in an age before time.
 
now I am going to have to learn how to write some VBA
 
Yeah. Just be careful that you don't read ado.net documentation if you do a search. They're different.
Not a lot, but different.
 
ADODB.Connection, ADODB.Command and ADODB.Recordset are your friends here
 
This will be your friend @Malachi.
xlWs.Cells(2, 1).CopyFromRecordset rst
 
8:45 PM
adodb
 
actually if all you need is a parameterized query, you don't need VBA to do it :/
 
@Mat'sMug well I want all the rows formatted a certain way, and I want the headers as well
 
yeah, a table does that ;)
and you can even right-click/refresh
look at the "Data" ribbon menu
"Get external data"
"From other sources" / "SQL Server"
 
duh me
 
there's a way to make it grab a cell value as a parameter
not sure how though
 
8:49 PM
I am trying to figure out how to make it take a query rather than a Table or View right now.
 
select "SQL" for a command type
and then you can type your exec sproc_name ? command there
 
I think I am just setting up the connection right now.
 
no wait, I think you have to put the actual SQL in there
not sure exec sproc_name will work
worth a try though
 
it keeps asking me to select a table/cube
 
just cancel out and edit the query text
or no, pick any and then edit the query text
 
8:56 PM
I will see what happens with that
Found it!
I love it
but I don't think that I can make it where a single parameter will work.
some people can't put the same name in the same way....so I have to do special work to get all the right names for a certain parameter....
But I like this!
 
next on my list is learning what I would need VBA for ..... :)
@Mat'sMug you don't understand.
> '/LAWRENCE COUNT AUDITORS OFFICE', '/LAWRENCE COUNTY AUDITOR',
'/LAWRENCE COUNTY AUDITOR''S OFFI', '/LAWRENCE COUNTY AUDITORS OFFI', '/LAWRENCE COUNTY AUDITORS OFFIC',
'/LAWRENCE COUNTY AUDITORS OFFICE', '/LAWRENCE COUNTY TREASURER', '/Lawrence County Treasurer',
'/LAWRENCE COUNTY/ AUDITOR', '/LAWRENCE COUNTY/AUDITORS OFFIC', '/LAWRENCE COUNTY C/O AUDITORS'
that's what I mean? it's not just 2 different offices.....
merging Legacy app and Data with new stuff...... SIGH
 
oh
I hope your SQL has a LIKE
 
it won't work with this because of the two names I need, I am using an 'IN'
probably ugly.
I should code review it on monday
Dang it @Jamal I lost 10 rep on that.....
it even says I can vote to undelete my answer....LOL
 
When was the last time we haven't had a Hot Network Question?
 
9:10 PM
before @Mat'sMug @Jamal and I started chatting in here???
 
@Malachi It does still say that for deleted questions, though I doubt it'll actually let you do that.
 
@Jamal you owe me, I was like 2 points from passing @ChrisWue
now I am 12 behind him...... sigh LOL
 
@200_success We're about to hit SE with tons of shuffling questions!
 
every day I'm shuffling
3
 
@200_success And Code Golf gets at least one daily, it seems. T_T
 
9:12 PM
right now in the sidebar I see 2 for CR, 0 for PCG :)
 
:O
 
OMG I'm like #17 on the voters page!!
#20 for the month!
already on page 2 for the month, and it's only the 8th!
 
I've been seeing lots of users around. It's nice.
 
4
Q: How can I drill a big diesel tank without emptying it first?

jacktradesNeed to make a hole in a big steel diesel tank. I would say it has 5000 liters capacity, and it should have at least 2/3 filled or more. Metal Sheet: At least 3 mm thick. Drill hole is 1" or 2", not sure. It's for an ultrasonic meter. Problem is if I go drilling, all the swarf can get into the...

DIY suicide
2
 
yeah saw that one earlier.. scary
 
9:27 PM
It makes me happy to know that I'm reviewing code, not giving advice on this sort of stuff, when I ask them to "try something and test whether it has any effects"
 
That's fucking metal.
 
> Obviously Diesel is not an explosive so the effect is different but just for the giggles I did some math: The energy in that tank is equivalent to about 340000 kg of TNT, yep 340 metric tons.
2
 
> Okay I'm going to start this with a giant disclaimer in capital letters: DO NOT DRILL HOLES IN TANKS CONTAINING 3300 LITERS OF DIESEL FOR THE LOVE OF GOD.
3
 
Ya know, for as many hits as we supposedly get, we should still have more than 35 voters in a week...
 
@ckuhn203 we probably do, it's just that most voters haven't spent more than 10 votes yet :(
 
9:28 PM
I voted 20 times today and that's a lot for me
 
I always forget that.
 
@Pimgd 10 more today and you get a badge! or you have them voting badges already?
yeah nevermind you got 'em ;)
 
So, you guys know that fumes are also dangerous, right?
 
it's the fumes that ignite, not the liquid
 
Right. So I'm a programmer and not a driller... so I wouldn't know any better and I'd let someone else do it.... but... drilling into the liquid probably makes more sense then drilling into fumes.
 
9:32 PM
did you see the video going around where the guy got blown off the top of a tanker when he turned his phone on?
 
@Pimgd I have trouble envisionning a non-DIY suicide.
5
 
That needs like 30 stars.
 
Best caption
 
> About diesel flammability, this is not the first time I hear something like: it's diesel, you can light a cigar with a propane torch while drilling it
 
@nhgrif the problem with drilling into the liquid is that, once the hole is drilled, the liquid kinda pisses out of the tank through the hole...
 
9:34 PM
that is what the user says
 
> DO NOT DRILL HOLES IN TANKS CONTAINING 3300 LITERS OF DIESEL FOR THE LOVE OF GOD.
 
@Mat'sMug Like I said, I'm a programmer, not a driller. Nothing I do has any chance of literally exploding.
So I'd leave it to someone who knows.
 
"Welcome to Drill Review. Drilling holes in tanks without emptying them first is not considered good practice. Drilling holes in empty tanks is considered more idiomatic."
5
 
I'm not going to waste brain on figuring out this problem, nor do I imagine ever having this problem in my lifetime... but I just wanted to remind everyone here that drilling into the liquid probably isn't quite as dumb as you might first think, given that drilling into the fumes is definitely more dangerous.
 
9:36 PM
funniest part is the top accepted answer is by a user named "Tyler Durden"
 
joke
my head
 
Welcome to Drill Review where the answers are made up and the questions don't matter anyway!
 
Hello @all
 
hey @syb0rg
 
I also like how his first problem is not getting the fuel dirty
 
9:40 PM
@syb0rg Hey you!
 
The chance of blowing himself up is a bit less important.
 
So... I have just been hired for my first programming job.
10
 
Uhm
Dirty fuel doesn't not increase your chances of blowing up,.
 
> Problem is if I go drilling, all the swarf can get into the diesel. Second problem is to avoid blowing myself up.
 
@syb0rg Congratulations
 
9:42 PM
@Malachi Thanks!
 
almost TTQW here!
 
bedtime here
 
good luck on the new job, want to hear all about it on Monday
 
Oddly enough, I've been hired as an iOS developer. I have almost no experience with this field...
 
'night @Pimgd!
 
9:42 PM
but I don't wanna
 
@syb0rg Hello syb0rg and welcome to my kingdom.
 
@syb0rg Don't worry, my internship in research was about tablets ergonomy and I never used a tablet.
 
@nhgrif Yeah, it's more of freelancing work. I still have to hash out some stuff with them, but I've already signed an NDA and gotten the gist of the business idea.
 
on the link the guy shared about smoking a cigar with a propane torch while drilling,
> Gotta say it buddy,--I'm a little surprised at so casual a responce.
Flash point 150*F--Auto-ignition temp 450*F
We always injected CO2 into the tank from a fire extinguisher before drilling.
Jus sayin'
this person quoted the the guy who said the comment about the cigar and torch
 
9:46 PM
@Phrancis null pointer exception
but that'd be too hard to explain for MS
 
frm_DealerMain
Camel case and underscore?
Is this common practice somewhere?
 
Nothing is common practice here, it's like a parallel universe
 
That's what is waiting for us when concepts finally get standardized in C++.
 
@nhgrif It's common practice with libraries and API functions within the library.
 
Is @bazola here?
 
9:48 PM
Totally_ordered, Less_comparable, etc...
 
Those aren't camel case.
I know underscore is not uncommon.
I've never seen it combined with camel-casing.
 
Reverse camel case with underscores?
 
tritium_someFunction() is how my API functions would be named.
*are named
 
I'm about to rename this library from SQLConnect to DatabaseKit and prefix stuff DBK: codereview.stackexchange.com/questions/59308/…
 
@nhgrif yeah I'm around
 
9:51 PM
I'm just gonna paste this Bazola...
-(int) convertStringToInt:(NSString *)string {
    return [string intValue];
}
Is there something missing from this method...?
 
Why an int and not an NSInt?
 
That's not my concern.
 
Oh
 
melbourne_shuffle(my_array);
 
0
Q: javascript Redis LREM

guillaumepotierI implemented a redis-like plugin for basil.js and had some difficulties implementing particularly the LREM method. The complexity was to loop only once (and not the whole array avery time if we have 0 !== count) ascending or descending. My code below works and pass tests, but I were wondering if...

0
Q: Web component design, attribute or content html?

ThomasReggiWhich one of these web components is designed better? Option 1 contains an a tag within the custom element. <bootstrap-social service="github" size="lg"> <a href="http://github.com/reggi">Sign in with Github</a> </bootstrap-social> Option 2 the custom element has an href tag and the ...

 
9:53 PM
are you saying i should just not have the method and do something like type:[[cardDict objectForKey:kCardType]] intValue]
 
Yeah...
Unless you're converting in some special way.
 
my thought was readability to highlight it was a string that was being converted but i can accept that it is redundant, should have stripped that out
one question I had for you was whether I can use a plist to store objects in some way, other than using strings. I did some searching online but I didn't find a concrete answer
 
I've got no experience with plists.
But I think they can store strings, dictionaries, arrays
In the OS X, iOS, NeXTSTEP, and GNUstep programming frameworks, property list files are files that store serialized objects. Property list files use the filename extension .plist, and thus are often referred to as p-list files. Property list files are often used to store a user's settings. They are also used to store information about bundles and applications, a task served by the resource fork in the old Mac OS. == Representations == Since the data represented by property lists is somewhat abstract, the underlying file format can be implemented many ways. Namely, NeXTSTEP used one format...
and numbers and dates and data
 
The documentation examples all use strings but I will check my objective-c books and see. The issue is what to tag it with in the XML
 
there's a table in that wiki article
 
9:57 PM
@CaptainObvious Seems off-topic
 
Using <data> you can store anything, you just need methods for converting your object to and from data.
 
interesting, awesome thank you
 
I think I would like to know how to dance like that:
It has become silent in no time here. Has everybody tried to drill a hole in a tank without emptying first, or something?
 
0
A: Trading Card Game Prototype in OOP

nhgrifCardList.h/CardList.m This is a really big question, so I'm going to address one thing at a time... One concern is that once the game was "released", the order inside the plist could not be changed easily. So, instead of embedding the plist in the app, we instead ask the app to connect t...

 
10:15 PM
So I know I'm a bit late to the party (RL happened), but I have a great story. My Dad used to race stock cars on a dirt track. One night the fuel cell came loose after the practice laps. The tank is about half empty at this point. The owner of the car borrows my Dad's sun glasses and starts welding the HALF EMPTY tank back into its brackets.
Pit row cleared within seconds of everyone figuring out what he was doing.
 
Boost 1.56.0 has been released today.
 
@bazola Are you familiar with writing protocol/delegate patterns?
 
10:30 PM
@nhgrif no I haven't done any work with those yet
 
Welp, your Game class would be a good place to start.
 
i will have to look into it, I've used delegates for some functionality but have not created my own yet
 
So, you've used delegates I'm sure
UITableViewDelegate, UITableViewDataSource, UICollectionViewDelegate, UITextFieldDelegate, etc.
You just haven't seen the background side of it.
 
I've read a couple of examples but it is not until I try to implement something that I retain any idea of how to set it up
 
You've used tableviews, right?
 
10:40 PM
Actually no not really outside of maybe a very early tutorial that I don't remember. I do use <UIGestureRecognizerDelegate> a lot
 
You should go work through a tutorial for a table view so it's fresh on your mind. Basically, I think your startGame method should work similar to tableview's reloadData method sort of.
 
TTGTB
 
0
Q: Numbers to English Strings in Python3

mleyfmanInspired by the recent surge of questions dealing with changing numbers to their English equivalents (See here, here, and here), I decided to write my own version in Python. zero_to_nineteen = ( "zero", "one", "two", "three", "four", "five", "six", "seven", "e...

 
@nhgrif I will definitely look into that, I appreciate the advice
 
11:05 PM
Updated:
14
A: I bet you didn't know about this comment by Jeff Atwood on Code Review's viability

PopsWithout any further ado: Code Review is a successful asset to Stack Exchange in its own way. (I hope that I qualify as one of the "people in charge" for the purposes of this discussion.) To be fair, comments three and a half years old probably shouldn't generally be considered authoritative. P...

 
So...
What if we posted a question to both Code Review and to some other random sites across the Internet.
So it's literally the same question both on CodeReview and some programming website
And the answers can be compared.
 
11:23 PM
CR is a special snowflake and I'm proud to be a part of it.
3
 
@ckuhn203 Absolutely not
 
0
Q: C# DataTable to given type T simple mapper, code readability/small optimizations

Archangel33I threw this together and would love any suggestions on how to improve on this simple DataTable to given Type T mapper. Anything from coding conventions to speed optimizations or "you're doing something stupid". public class test { static ISXLog log = new XLog(); public void runTest() { ...

 
@BlueCheeseMonster lol
 
Lol. Priceless.
 
> it's easier to compare "how do I cook broccoli so it's soft but not mushy" across sites than "what should be improved in the following eighty lines of code?" - that's the point: as testimonials pile up (on meta and in chat, too), it's becoming more and more apparent that CR is a fairly unique gem on the Internet. Average answer quality is certainly among the highest on SE, and advice given is often priceless.
should I post that as a comment?
 
11:37 PM
Python uses "arbitrary precision integers"... I'm not sure I like that.
 
wth is an "arbitrary precision integer"?
 
Basically... there's no set memory size... so the maximum value is limited only by available memory
 
does that mean unpredictable overflow exceptions then?
 
"arbitrary precision" is what an SO answer referred to it as
I don't know. My guess if that if you overflow, it's really an "out of memory" exception.
 
wow
109
Q: Online Peer Code Review?

cmccullohFor people who work on very small teams, or by themselves, or on teams where they are by far the best developer and have a need to learn from someone better than them, are there any online resources/methods for doing some sort of peer code review? I used to be pretty active in the online art com...

I have to say after reading all the answers and doing a little bit of research myself, there is NO good code reviewing option for small teams. Everything here is either too big, too expensive or too small. — markus Mar 7 '11 at 9:00
no wonder CR is a "special snowflake"
 
11:44 PM
Off topic, belongs on Code Review? (^_^) — Brock Adams Dec 20 '11 at 1:47
 
I imagine that if you've been given 8 bytes for your integer, and you add to it another integer so now you need more space, it does the same thing as when you add to any mutable collection and copies the value into a larger memory space
Which is probably exactly why I don't like it...
 
needs another 60 upvotes:
9
A: Online Peer Code Review?

NarayanaCheck this SE proposal : http://area51.stackexchange.com/proposals/11464/code-review It is now in public beta, you can visit it here.

 
Downvote the competitors!!!
 
@rolfl!! I had a laugh when I passed Rolphton the other day!
 
0
Q: Using this javascript design pattern, am I on the right track?

user2626009I have been using a pattern similar to this basic structure below. Can anyone please let me know if this is a correct way to code an object oriented widget for reuse. I am looking to make code than can also be extended easily and modular. $(function(){ // wrap in jquery .fn wrapper so that may b...

 
11:52 PM
(googles "rolphton" - first result: "ontario abandoned places" ..hmm...)
northern ontario is a pretty darn nice place though
 
how many answers would we need to add to the site, right now, to get the answer ratio to 2.5?
 
8417
 
@nhgrif ty :)
 
That's a random made up number...
 
aw :(
 
11:55 PM
Although, I'm fairly certain the Objective-C answer ratio is > 2.5
 
currently 28,718 A / 16,532 Q
 
That's a little hard to calculate, but maybe the next mission should be killing crawlers. (Qs with 1 A)
 
So, 12,612 answers.
 
No math. Math kills the enthusiasm.
 
lol @ckuhn203 that's not a bad idea :)
 
11:57 PM
 
well if everyone in chat now just answered 700 questions...
 
uh-huh
 
Again, killjoy...
 
There are 201 Objective-C questions. I've posted 95 Objective-C answers.
 
wow.. that's like @Jamal's edit ratio!
 
11:59 PM
There's only 1 unanswered ObjC question, and it's an insta-zombie.
5
Q: SQLConnect - A library for connecting Objective-C/Swift applications to Microsoft SQL Server

nhgrifThe complete SQLConnect library can be found here. The file from which the following method belongs can be found here. At some point I may or may not open questions for reviewing other aspects of this library, but I intend to keep the questions relatively small. This is the largest method in t...

 

« first day (460 days earlier)      last day (3561 days later) »