« first day (809 days earlier)      last day (3210 days later) » 

8:18 AM
Monking
 
Monking
 
@Mast Monking dude
 
Monking
so close
 
@Quill Monking
Dang, you broke it
 
@IsmaelMiguel meh
 
8:20 AM
How was it here yesterday?
 
@IsmaelMiguel actually.. you did
 
Yesterday-ish
 
@Vogel612 How?
 
2 mins ago, by Ismael Miguel
@Mast Monking dude
 
@Mast Sounds like a reasonably answer
@Vogel612 What's wrong about it?
Or I shouldn't have said "dude"?
 
8:21 AM
it's breaking the Monking chain T.T
 
Unless you write the same, it's a c-c-combo breaker.
2
 
^ that
 
Dang!
 
in German Language, Jul 15 at 7:08, by Vogel612
C-C-C-C-C-C-COMBOBREAKER
2
 
Sorry :/
 
8:22 AM
Monking all!
 
Don't worry, there'll be more chances for it ;-)
 
Monking
 
It's just that I'm so used to say "dude" in almost every message
 
@IsmaelMiguel hippy :p
 
8:24 AM
(There's a ton of dudes with female chars on Tera)
 
@IsmaelMiguel which may not be the best choice of honorific on the interwebs
2
 
@Vogel612 It's always better than say "Sup beach!"
 
@IsmaelMiguel Or just ... 'Hello'
 
@IsmaelMiguel We solved that with Monking
 
what's up with the stars this morning?
2
 
8:26 AM
@Vogel612 Somebody must have done a lousy job fixing them last night. They're falling down easily.
5
 
@Quill @Mast Well, it solves the problem here, but sometimes the guys pretend to be girls...... :/
 
@IsmaelMiguel you are aware that Monking is gender-agnostic?
 
@Vogel612 That ^^
 
Yes, but is also site-specific
 
@IsmaelMiguel 'Hello' is also gender-agnostic
 
8:27 AM
just like Morning
 
@IsmaelMiguel We just have to solve that by spreading it's usage.
 
@Quill I'm not going to say "Hello, you ruined the run!"
 
@Mast Do I smell an evil plan to take over the internet?
3
 
Yes, you do
 
@Vogel612 We can get @rolfl to lead us, with his knowledge of SE sites, we'll be invincible
 
8:28 AM
Monkey business is all over the internet. MWUAHAHA!
 
(\_/)
(O.o)
(> <)
 
First CR, then SE, then THE WORLD!
 
okay when you got the details, ping me. BTW.Work
 
@Mast Is that a dog?
 
@IsmaelMiguel Rabbit?
 
8:29 AM
@IsmaelMiguel That's evil bunny...
 
Oh.... Right....
 
It dominated the internet long before anyone came up with the word 'meme'
 
It's missing the fluffy tail
Too much Monty Python?
 
@IsmaelMiguel ASCII does that
 
@Mast Use an *
Nah, looks weird
 
8:31 AM
     (\_/)
     (O.o)
   * (> <)
 
I can almost hear the off-topicness radiating from my monitor
 
Meh
 
(\_/)
(O.o)
(> <)*
That was a very random pile of ASCII
 
Now let's translate those bunnies to Brainfuck
6
Q: How to speak Brainfuck: for beginners

MastThe following code transforms multi-line input into the the Brainfuck equivalent. One line turns into one program. The resulting programs are split by newlines for readability. Brainf.cpp #include "Brainf.hpp" int main() { std::vector<std::string> userInput; std::string currentLine = "...

 
I don't speak
 
8:38 AM
That's kinda strange to speak it, writing it on the other hand ...
 
@IsmaelMiguel What do you speak?
 
@Mast I speak PHP, Javascript, CSS, HTML, MySQL, a tad of Brainfuck, VERY little of C and C#, Portuguese and English
I wouldn't mind learning Assembly, Lua, python and C (to a much deeper level)
 
@IsmaelMiguel You could make gmod scripts with lua ;-)
 
@Quill You can make scripts almost anywhere with Lua
Even for the PSP
 
8:56 AM
0
Q: How to increase the effeciency of this function

user3375027I was just hoping someone would be able to help me to understand how to increase efficiency of a function I believe can be done better. Before I continue, the program this function is in downloads videos from the internet one after the other. This particular function is run in a separate thread ...

 
@CaptainObvious, upgrade your bandwidth.
 
9:19 AM
-1
Q: Running and executing code in linux

Tasha CampbellI have an open cl file called pathfinder, and I was wondering how I run and execute this file in a linux terminal?

 
^ not sure what an "open cl" file is, but... run it?
 
Maybe he wants to execute the file?
 
Maybe a source file for OpenCL?
Open Computing Language (OpenCL) is a framework for writing programs that execute across heterogeneous platforms consisting of central processing units (CPUs), graphics processing units (GPUs), digital signal processors (DSPs), field-programmable gate arrays (FPGAs) and other processors. OpenCL specifies a language (based on C99) for programming these devices and application programming interfaces (APIs) to control the platform and execute programs on the compute devices. OpenCL provides parallel computing using task-based and data-based parallelism. OpenCL is an open standard maintained by the...
 
@CaptainObvious RBA
 
9:44 AM
@Mast RBA?
 
... just search, will ya?
 
Ritchie Bros. Auctioneers?
RBA | Rádio Bragançana?
RBA Coleccionaveis?
 
@IsmaelMiguel it's in memer
 
I can't use it at work.
 
-1
Q: PHP contact form parse error

Michael_GI have a php contact form and it isn't working. I cannot figure out the reason why. I am sure its something obvious but cannot spot the error. Here is the code on the html contact page <form method="post" action="/mail.php"> <label for="firstname">First Name:*</label> <input type="text" name="fi...

 
9:48 AM
@IsmaelMiguel Fair enough. Removed by Author
@CaptainObvious Not even trying
Oh god, the ternary horror
 
@Quill Thanks. I was battling with Removed by answerer(?)
 
0
Q: Slot Machine in Python

Mrfunny744Ok, so I have alot of free time now since im on summer holidays, and I have made this little program which allows you to play a slot machine. This took a bit of time to develop, I hope you like it. Code: import random import time import os print() print('''Welcome to the Slot Machine You'll st...

 
@CaptainObvious why isn't this question already closed ?
 
@Heslacher I upvoted it. Is there something wrong with it?
 
The one with contact form parse error ?
 
10:03 AM
Oh, sorry
 
@IsmaelMiguel You're confused. He's talking about the off-topic PHP contact form parse error question, not angry birds does gambling
 
It isn't closed because it has 4 closevotes
Needs 1 more
 
That I know ;-)
 
> while(stake != 0 and playQuestion == True):
ewwww
 
Did you voted to close?
 
10:04 AM
Me ? I have been the first.
 
There's only 4 active now
At least in the chat
 
0
Q: Converted some raw SQL Queries to ActiveRecord Queries

CallmeSurgeI have 3 SQL Queries and converted them to ActiveRecord Queries (1) I have some raw sql queries with a couple of inner joins, where and select. query = <<-eos select u.first_name, u.last_name, r.name region, s.name district, s.id district_id from users u inner join fixed_loca...

 
> My application seems to work fine and all spec test attached to these methods passed, but my mentor insist I bring it for a code review.
Did their mentor tell them to post here? lol
 
Sounds like it
 
10:29 AM
0
Q: Neater way to write condition x <= y AND y > 0

barnacle.mMy current condition is written as follows: .Where(m => Math.Round((m.DateAndTime - DateTime.Now).TotalMinutes, 0) <= 30 && Math.Round((m.DateAndTime - DateTime.Now).TotalMinutes, 0) > 0) which basically says where the rounded value is less than or equal to 30 and the rounded value is greate t...

 
I believe this question belongs to codereviewPanther 8 secs ago
 
0
Q: SPOJ - POWFIB (Fibo and non fibo) Time Limit Exceeds

Atul ShanbhagProblem Find (a^b)%M, where a = Nth non-fibonacci number b = Nth fibonacci number modulo M M = 1000000007 Consider fibonacci series 1,1,2,3,..... INPUT First line contains T , the number of test cases. Each next T lines contains a number N. OUTPUT Print T lines of output where each lin...

 
That's true, I didn't know about codereview.stackexchange.com, please feel free to vote to move it there. — M28 22 secs ago
 
11:00 AM
0
Q: (Beginner) Luhn Algorithm in Python

EmphirusI've implemented the well known Luhn Algorithm in Python. It's a simple one, so it's good for beginners. Here's the code: import random from math import ceil def Luhn(digits): if digits >= 2: num = random.randrange(10**(digits-2),10**(digits-1)) num_digits = list(str(num)...

0
Q: file parser to get extract data from text file

suhasthejuI am trying to extract the data from input file and store it for plotting. I have tested this code for a few files of same format. I am not sure if the code works correctly with the little change in input file (like more blank spaces in between). I might have also done some terrible mistakes whi...

 
11:49 AM
@jacwah Yes, I am a Scala developer. I'll look at the question when I get to the office.
 
T-SQL is a specific implementation of a SQL(anguage). I don't like this suggestion, but I'm failing at finding a good analogy. The Python tags come to mind. We decided not to synomize the specific versions into the master tag because their syntax was significantly different. I think the same theory applies here. PL/SQL is different enough from T-SQL that it doesn't make sense to point them both at the same master tag. — RubberDuck 31 mins ago
 
@daniel I’ve edited the code in. It is still not clear, what your actual problem or question is. Also, we don’t have enough context. What is checkout and what is $checkin? Are they Date objects? Why is there a $ before checkin? Why would you wrap your timecheck function as a parameter in the jQuery function? Do you even have a specific problem or are you asking us to review your code? Code Reviews have their own site. — Xufox 18 secs ago
@Xufox This question is way too unclear and too much lacking context for Code Review as well. And based on this comment, I suspect that the current code does not work. — Simon André Forsberg 12 secs ago
 
12:12 PM
-2
Q: Razor, foreach trouble

user78472I have done a simple *.cshtml, that I call data from DB. *.cshtml has different table headers; Problem is that it show`s each time my is part od OID == 1 or OID == 2; It prints on screen after every single question. @foreach (var o in @Model.ListTest.Cast<O_D_O>()) { ...

 
@Goobley: Yeah at some point you have to train rather than protect. :) Your code review practices should account for this. I understand the desire but I (a) really do think you're creating an environment wherein inexperienced folk develop a false sense of security [very dangerous!!], and (b) indeed cannot think of anything else you can do. — Lightness Races in Orbit 1 min ago
 
Anyone fancy to stand close to my window...? Because something will be going down!
 
huh
 
what?
 
A Windows PC
 
12:20 PM
Poor sodd getting it in his/her head
 
huh
 
@skiwi wait for me, I will catch it ;-)
 
Actually only bytes should be going down...
I'm so going to dual-boot this thing soon (tm)
C++ development on Windows is like almost impossible
 
meh. depends a little on what you're doing..
 
If it involves third-party libraries then it's lots of fun
This is fun... I have no clue how to resolve an ambiguous overload call in C++
 
12:26 PM
By making it not ambiguous. What's the overload?
@skiwi ?? ^
 
@nhgrif It's appareantly defined in terms of typedefs
 
What is?
What are the functions it can't decide between?
 
I fixed it by copying the typedef into the source file and then static casting it to that type, it's no longer ambiguous, but I don't think that's the way to go
void socket::on(std::string const& event_name,event_listener const& func)
{
    m_impl->on(event_name, func);
}

void socket::on(std::string const& event_name,event_listener_aux const& func)
{
    m_impl->on(event_name, func);
}
where...
typedef std::function<void(const std::string& name,message::ptr const& message,bool need_ack, message::ptr& ack_message)> event_listener_aux;

typedef std::function<void(event& event)> event_listener;
 
So, the difference between the two is the arguments of the function passed in?
 
Seemingly, yes
Note that GCC doesn't think it's ambiguous, but MSVC 12 does
 
12:32 PM
Or... are the arguments for event_listener_aux essentially the same as event_listener? (Is event for example, a typedef'd tuple with all those arguments?)
 
event is a class
 
hmm so
Is it the socket::on that are giving the ambiguity problem, or the m_impl->on?
Is m_impl->on overloaded to take either event_listener or event_listern_aux?
 
I resolved it with this code on our side:
client.socket()->on("club", static_cast<event_listener>(std::bind(&SocketIO::onIntensityUpdate, this, std::placeholders::_1)));
Note that I added the static_cast there
 
Does the event class have a constructor that takes this: std::function<void(const std::string& name,message::ptr const& message,bool need_ack, message::ptr& ack_message)>?
(or an event_listener?)
 
Ugh... perhaps
protected:
    event(std::string const& nsp,std::string const& name,message::list const& messages,bool need_ack);
    event(std::string const& nsp,std::string const& name,message::list&& messages,bool need_ack);
Looks like it would fit the event_listener_aux?
 
12:38 PM
Those signatures look slightly different.
But I'm no C++ master.
 
Unfortunately I'm neither, not even a beginner :
 
But you can see how that would cause ambiguity, right? Compiler isn't sure whether it should call the one that takes the raw function, or if it should construct an event and use the function that expects the event.
 
Now I just realized that my Qt 5.5 version is built using MinGW, so downloading a MSVC 12 installation now
@nhgrif Yeah, I do get the idea
 
If there is ambiguity and both overloads do the same thing, why not comment out one or the other and see if it still compiles and does what you expect it to?
That's not the fix, but it could lead to enhanced understanding on what the problem is.
 
Coming from Java I'm used to specifying the type parameters to ensure there's no ambiguity
Oh no, the MinGQ vs MSVC 12 for Qt 5.5 libs is not related to this issue
It's because I'm converting from MinGW to MSVC (unfortunately), because else Boost will not even compile
 
12:41 PM
In Swift, it's possible to create ambiguity, but it's kind of difficult. The only way is if you have two functions that take the same arguments, and the functions have the same name (even the argument names), and they're only different by their return type, and you're trying to implicitly infer the return type.
 
Seems doable ^^
 
Basically, something like this creates ambiguity in Swift...
    func foo(arg1: Int, arg2: Int) -> Int { return 42 }
    func foo(arg1: Int, arg2: Int) -> Double { return 42 }

    let x = foo(1, arg2: 2)
We can fix it in plenty of ways though.
let x: Double = foo(1, arg2: 2)
let x = foo(1, arg2: 2) as Double
func foo(arg1: Int, arg3: Int) -> Double { return 42 } // this is no longer considered an overload
 
Ok
 
But even... func foo(arg1: Double, arg2: Double) -> Double { return 42 } wouldn't create ambiguity with the Int version, because it's impossible for the input types to be ambiguous in Swift. Which is nice.
 
Fun fun fun... I need to rebuild Boost from MSVC 11 to MSVC 12
 
12:46 PM
Personally, I hate having to specify the types all the time
It gets in the way more than it helps.
 
0
Q: Retrying memoizer

DannnnoI have some tasks that I'd like to memoize because they connect to a rather slow network and have to wait for the data. Unfortunately this network can be a little finnicky and we get occasional connection issues. Thus I'd like if my memoizer could know to retry a certain number of times. This ...

 
The errors I have in JavaScript, the actual, serious errors that I have to really crack down on, are almost exclusively not type errors.
 
Generally, in Swift, you only really specify types when you're writing the functions themselves.
 
Even in legacy code I have not written.
 
Occasionally you have to specify types when you're dealing with a typealias of a literal.
Like...
let thisIsADouble = 42.0
let iWantATimeInteral: NSTimeInterval = 42.0
But even though NSTimeInterval is just a typealias for Double, you can't pass a Double into a function that expects an NSTimeInterval.
 
12:52 PM
This is lovely:
> Boost supports msvc 12.0 from 1.55 onwards
Qt for Windows comes with 12.0 x64 and 11.0 x32
SocketIO source needs C++11, supported since msvc 12.0
(We are on Boost 1.53 right now, I don't know the reasons, so time to ask that)
 
@skiwi It took me a while to get linkers/compilers succesfully set-up on Linux, keep an aye on that.
 
@Mast But it seems like Windows seem to introduce double issues on top of that
 
Umm... @Jamal, when you edited this question on meta, are you sure you meant to write "off-topic" and not "on-topic"?
2
 
Candidate to be moved to codereview — James Sharp 24 secs ago
 
1:15 PM
@CaptainObvious this got hot
 
@SimonAndréForsberg Nice title :P
 
@jonrsharpe and MYSTIC DAV if you do decide to post this question on Code Review, please read A Guide to Code Review for Stack Overflow users first — durron597 29 secs ago
 
@Duga @durron597 I believe jonrsharpe is very well aware of the CR guidelines :)
4
 
1:40 PM
0
A: Shall we stop [naming] things?

MastI believe naming should stay. Some of us have a chronic problem with naming things (myself included). Since tags exist to either show what is done (language tags) or what the problem is (time-limit-exceeded, namespaces, etc.). If we don't want naming around, there are more tags we should be disc...

 
Nooooooo! ... ...maybe
 
@SimonAndréForsberg I know he is too, but I always try to encourage people to post links to the help center and guidance posts
If you say "blah blah codereview.stackexchange.com oh and by the way read the help center", guess what they don't do?
4
 
@durron597 good point
 
But if you instead say "You could try this post on Code Review and please read A Guide for Stack overflow" then they HAVE to at least open the link to the page.
 
@durron597 wouldn't it be nice if the auto links pointed to help centers
 
1:45 PM
@Mast Note that the question is an old one. I just added the pun in the title
@durron597 well, I hope jonrsharpe starts using that post in his comments.
 
289
Q: AutoReviewComments - Pro-forma comments for SE

Benjol No more re-typing the same comments over and over! This script adds a little 'auto' link next to all comments boxes. When you click the link, you see a popup with 6 configurable auto-comments (canned responses), which you can easily click to insert. This script was inspired by answers to thi...

 
@Donald.McLean Great!
 
@SimonAndréForsberg Just about everyone in The Whiteboard uses our version of that guide when we respond to a @Duga message
 
@durron597 yes, so both @Duga and I have noticed :)
 
@SimonAndréForsberg First of July isn't old.
 
1:52 PM
> asked Jun 3 at 20:00
 
Hmmm.
To hell with it, fixed.
 
Just out of curiosity, @Mast, what other tags did you have in mind?
 
We should either nuke them all, or keep them alive. Not this.
 
in The Whiteboard, May 29 at 16:07, by Simon André Forsberg
I just changed it a bit so that things that should be ignore get a hard-coded score of 0.42, which only goes to playground and not to whiteboard
And the circle is complete.
 
@SimonAndréForsberg As stated, is also not about what the code is but what the problem is.
And all optimization tags.
 
1:57 PM
Greetings, Programs.
 
Greetings, Donald.
 
Greetings!
 
@Mast I believe there are meta questions related to those meta-tags that we have kept so far. is also a meta-tag that was brought up on meta recently. I don't think it's possible to lump all meta-tags together like that and say either "keep them all" or "burn them all". Just because we burn some of them doesn't mean we need to burn all of them.
 
We need to decide if we want meta-tags at all.
 
@Mast did a banana-wielding monkey bite you? ;-)
 
2:01 PM
No, does one of the monkeys share my opinion?
 
I think @nhgrif agrees with you.
 
That doesn't happen often, us agreeing.
Perhaps I should open a meta about meta tags.
Meta tags in general, that is.
At risk of becoming too meta of-course.
 
Metallatags
[meta][all *the*][tags]
Or
Metallitag : Kill 'em All
 
Tag all the meta.
Tag all the meta tags.
Meh.
 
lol
 
2:10 PM
0
Q: begginer: sorting arrayList

rigbyIm new to Java so any suggestions and remarks are welcome! Here is the task: create several classes of flowers that extend abstract flower. all fields -- random. 1) make a bunch of 20 different flowers 2) calculate the price of the bunch 3) sort bunch by freshness of flowers 4) find flowers w...

0
Q: Parsing t=1h2m3s(h - hour, m-minutes, s-seconds ) into seconds if order of hours, minutes and seconds are valid

Naveenkumar ChinnakalappaI need to parse only valid timestamp formats as below hours followed by minutes followed by seconds ex:t=1h2m3s minutes followed by seconds ex:t=2m3s only hours ex: t =3h only minutes ex: t =4m only seconds ex: t =5s and escape other timestamp formats like t=2m1h or t=3s2m or t=3s1h2m. To get...

 
2:21 PM
@Mast Closed as duplicate.........
20
Q: Should we do something about our meta tags?

JamalWe have a decent selection of language and technology tags, but we also have many meta tags, such as refactoring. A meta tag, at least on here, specifies the OP's request(s) in a review, and not much else. It could especially become problematic if the OP has many requests and tries to apply as ...

 
@rolfl and all other mentioned aren't listed their.
 
Why is the code in my answer coming out mangled? @Mat'sMug
 
@Mast Why should naming be mentioned, there's no questions with that tag.
 
Not anymore, there used to be.
 
@Donald.McLean Fixed
 
2:26 PM
What was the problem?
 
when you have a list in markdown, a 4-space indented block following it is considered to be a second paragraph of the last item in the list.
So, to make the code work as part of the list, you have to indent it another 4 spaces, and it will be a code paragraph in the list.
but
You wanted the code to be a fee-standing block, not part of the list... so I made the list "end" by adding the invisible comment.
See the revision history (the markdown, not displayed output).
 
Great, thank you!
1
A: Return the element of collection if the collection contains only one element

Donald.McLeanI think that, considering the constraints of your situation (Iterable), the implementation is about as good as it's going to get. However, that does not mean there aren't things that couldn't be improved. Camel case is standard for method names. I find getOnlyOne to be easier to read than the ...

 
There are some issues with this question; Asking us what an entire block of code does is off topic because it's not written in a way that's useful to other people. No one will ever search google for "What is going on in this javascript and can it be simplified". Also, you have two questions here; 1) How do I refactor [whatever this does] and 2) what is it doing? The first can be asked on codereview.stackexchange.com, providing you meet their criteria; the second is too broad as written (and not useful because the title and body lack terms people would search for). — George Stocker ♦ 6 secs ago
 
@Marged - I am really pleased to see the response you got to your question. Michael Kay FTW:
4
A: How do I use Saxon to do multiple search/replace on values, in a way that's efficient

Michael KayAll the strings you are replacing are single characters, and you can probably exploit this fact. I imagine that the majority of strings probably contain none of these special characters. Therefore the best approach might be to do an initial examination of the string to see if it does contain any ...

 
Thank you, Santa! At this rate, I might hit 4,000 before the rep requirements change.
 
2:38 PM
How is this an an answer?
0
A: Outputting prime numbers between two numbers

Sidharth DashI have tried the code it took 8-9 sec for each run for input 1-1000000000 Note in the code just commented the printing of prime number. `import java.io.BufferedReader; import java.io.InputStreamReader; import java.util.ArrayList; public class primeBetweenTwoNumbers { public static void main ...

 
@Mast could use some editorial love...
basically this answer says "printing is slow...."
 
@Vogel612 Thanks for the translation, I couldn't get that out of it.
 
"I commented out System.out.println and suddenly this only runs 8-9 secs with input 1-10000[..]"
too lazy to copy-paste the damn input
 
It's a terrible answer IMHO.
It doesn't teach.
 
@RubberDuck - about sql / t-sql, etc. when you have a seocnd, ping me please.
 
2:43 PM
@Mast then say that. I agree btw.
 
0
Q: String Building Issue in Powershell

DeadlyChambersI am trying to parameterize a powershell script. The only issue is that for some reason when I am calling the invoke-restmethod with a -uri of $url it seems to be choking. In fact everywhere I am trying to use this it is choking. I believe I might be trying to do this incorrectly. Is there a bett...

 
@Vogel612 I have a tendency to bring such thing a bit harsh.
 
me too... so.
 
Can we trick anyone into bringing it less harsh?
 
@Mast I dropped an auto-comment
 
2:51 PM
yes, in fact most of the comments say it was fine code, in the future if you just want a code review try codereview.stackexchange.com, SO is for questions about why something isn't working as expected — depperm 55 secs ago
 
Hello @Marged , welcome to the 2nd monitor
 
@jacwah Probably better than how I'd have brought it.
 
@CaptainObvious VTCs and an auto-comment please
 
@rolfl so am I ;-) But I still suffer from my lacking Xsl expertise. i thought that strings I have in the code are representations of Single characters
 
@Vogel612 Done.
 
2:53 PM
BTW.Work
 
@Marged translate is not the function you think it is.
let me explain, if you want to convert, say, a windows path name to unix format, you want to replace all \ with / ... right?
So, unix = translate(dos, "\\", "/")
But, if you were to want to translate the string value "dos" to "unix" in all strings, like the string "dos is so cool"
and you were to use translate like this:
cool = translate("dos is so cool", "dos", "unix")
then the result will replace all d-characters with u's, all o's with n's, and all s's with i's.
so you will get the string: uni ii in cnnl
If the 'replacement' string is shorted than the 'look for' string, then characters in the look for string that do not have a matching character in the replacement, are just deleted....
so, translate(value, "abc", "") will just delete all a's, b's, and c's in the value.
a string like "This is a bad name" will become "This is d nme"
 
0
Q: Move code from controller to model

Antarr ByrdI'm working a rails application that has a lot of logic in the controller that should be in the model. In the app/controllers/customers_controller.rb#create there is logic to create stripe cc info for the customer. I think this should be in the model. How can I move this logic into the model and ...

0
Q: Angular function that splits full name into first/last

cuserjuicerIn angular, I have an input field for a user's full name. And a function called splitName which extracts the first / last name from the field. Is there a way to improve this logic? <input type="text" name="fullName" ng-model="data.full_name" /> On the backend, on form submit I do a POST which ...

-1
Q: Please help me with this pr0blem

user78490Im relatively new to python and I am making a punnett square. I have found the first punnett square, but I need some help with the second. I basically want #F2 to do the same exact thing as #F1. Here is my code. Thanks!!!! import itertools from collections import Counter parent1 = 'aaGG' parent...

 
The heritage is from this:
tr is a command in Unix-like operating systems. It is an abbreviation of translate or transliterate, indicating its operation of replacing or removing specific characters in its input data set. The utility reads a byte stream from its standard input and writes the result to the standard output. As arguments, it takes two sets of characters (generally of the same length), and replaces occurrences of the characters in the first set with the corresponding elements from the second set. For example, tr 'abcd' 'jkmn' maps all characters a to j, b to k, c to m, and d to n. The character set may ...
 
You also have a number of case where you are hard-coding things where there is not need to do so. I would suggest putting this code on codereview.stackexhcange.net to get some constructive feedback on ways you can improve your code. — Mike Brant 39 secs ago
 
Hey @rolfl. What's up?
 
3:06 PM
t-sql ;-)
I think this is the point where we complain that tags should be hierarchical, and the system is broken.
 
lol
Monking
 
t-sql is clearly, to me at least, a language "dialect", and "sql-server" is a place where that dialect is spoken.
t-sql is also clearly sql.
making t-sql a synonym of sql-server is, to me, like saying t-sql is not a language, it's a place.
like linking french to france.
instead of french to "language".
 
so why synonymize at all?
 
or, like linking portugese to brazil ;-)
@Vogel612 because @RubberDuck is right, it is fragmented badly too.
it's a mess the way it is.
I just don't think that there is a good solution, and the current mess is probably better than the alternatives.
it's hard to recommend any course of action which is ugly.... like deciding to write a program in either COBOL, LOLCODE, or Brainfuck - hey, there are choices, which one is best?
 
@rolfl so much right about that.
 
3:17 PM
ok guys thanks. i made all the changes and im going to take this down and put it on codereview — Evan12 24 secs ago
 
It honestly might be better to just leave well enough alone.
10 mins ago, by rolfl
I think this is the point where we complain that tags should be hierarchical, and the system is broken.
 
I think the option people have is better for them to be able to throw trhee tags on to the post than just one...
 
???
 
It certainly makes it easier for people who follow the tags to be more selective, is what I mean.
If a person is wanting to create a bulk load file from CSV, like some questions are, they tag it with python and sqlserver.
lots of questions tagged sql-server, but no sql.
or this:
3
Q: Optimize mass import of XML to SQLServer in Ruby

Simon FredstedI have the following Ruby code that's designed to update item, price and stock data for items in a MSSQL database. It's running on a Ruby 1.8.6/Rails 1.2.3 installation, in its own controller (for now) What I'm looking for is ways to optimize performance. Right now each item takes about 0,2 se...

questions like that are anti-motivators for a link between t-sql and sql-server.
(nice answer, by the way ;-)
 
Just might be something for CodeReview, sufficient many things might be improved upon. Time it, use a profiler maybe, find bottlenecks and put some thought in optimizing the data structures. — Joop Eggen 33 secs ago
 
3:23 PM
@rolfl The problem is that I am not even close to a solution ;-) I think I will do some googling tonight
 
@Marged I believe the real problem is that XSLT may not be the right tool for the job.
 
@rolfl thanks and you're right.
SQL Server shouldn't be merged with TSQL. That much we agree on.
The truth is, I've just no idea what the solution to the mess is here.
I hate to shoot down ideas without an alternative, but I don't reall yhave one.
 
My meta answer suggests the t-sql -> sql synonym, which would be like a python3.0 -> python synonym
That makes a "relative" amount of sense, but I suspect the t-sql specialization is large enough to stand on its own.
people who follow sql, and not t-sql are the losers, though
it also has established a precedent, that each database has its own flavour of sql.... so we need db2-sql, and mysql-sql, access-sql, etc... those are tags which are on the wrong side of the threshold, right?
it's just a mess,a nd there's no good solution, and doing nothing is as bad as doing something, but a lot less work ;-0
3
 
@SimonAndréForsberg Oh boy
 
3:41 PM
@Malachi the answer is suggesting that a condition is redundant. It could be improved, but I don't think it's NAA
-1
A: Function to split full name into first & last

Florian GlYour code should do exactly the same without your condition, doesn't it? scope.splitName = function(data, fullName) { var formData = angular.copy(data), nameArr; if (fullName) { nameArr = fullName.split(' '); var lastName = nameArr.pop(); formData.first_name = nameArr....

 
@rolfl that's kind of my stance on it atm until I can spend some time thinking on it.
bbiab
 
@Mat'sMug cool
 
@Jamal Planning on Jamalizing it again yourself?
 
let me look at that code again. but at first glance it looks like the Answerer changed what the code does.
 
:22940963 DV is appropriate, perhaps with a comment requesting further clarification then
 
3:45 PM
I sure hit the jackpot last night.
 
@SimonAndréForsberg Done
 
For code review, you should be posting to codereview.stackexchange.com; not here. — WhozCraig 56 secs ago
 
I was a bit occupied because I had just received a job offer available in two different U.S. cities.
 
I'm voting to close this question as off-topic because it is a code-review question. Check out codereview.stackexchange.comEugene Sh. 56 secs ago
 
3:57 PM
Nice.
 
@Jamal Honolulu and anchorage?
Congrats, by the way ;0
 
@rolfl I'll take the Anchorage one.
 
better than detroit and fargo, right?
 
@rolfl Kansas City, MO and Malvern, PA.
 
0
Q: Assessment of client-server program source code

trexCan you assess source code of my client-server program? I would like to get an advice about design, code security etc. Thank you very much. The program does the following: Show files in directories; Download and upload files (for now, only one file at a time). Syntax: ./client <Server IP> <

 
3:58 PM
I may only take one if I don't get anything in Austin or San Marcos.
 
@Jamal Congratulations
 
I'm planning on moving out of state when I get a job. I've seen enough of MN.
 
@CaptainObvious Why ?
 

« first day (809 days earlier)      last day (3210 days later) »