« first day (860 days earlier)      last day (3148 days later) » 

12:00 AM
RELOAD!
There are 1496 unanswered questions (94.4277% answered)
 
Supper time, see you.
 
Stop looking so smug @Duga, you know I was just about to INTERRUPT you...
 
Since you don't have any problems, question is probably better suited for codereview.stackexchange.com . What you are doing seems like very standard practice — charlietfl 2 mins ago
 
No love...
0
A: Optimise Code for KukuKube Game

nhgrifSo, I left a comment expressing confusion upon the source of your variables. Then I looked in the edit history and found this code in its original context on Github. That helped me to understand where your variables are coming from. It also helped me to understand your code overall, and let me...

 
12:04 AM
@nhgrif ♪ Save all your love
 
Hi. Unfortunately this question is off-topic for CodeReview. Whilst we can (and often do) review variable naming in code. We can only provide advice in the context of actual working code. Right now, the answer to your question is "it depends" (on the language, the codebase, any conventions currently in force or required and other factors). Please feel free to provide some code and an overview of what you're trying to build and we can advise you on variable naming in that context. — Zak 14 hours ago
@Zak The answer is not "it depends"
 
@Duga It keeps hovering around there, maybe we all ought to do some organised zombie hunting soon
 
@nhgrif That comment was posted before the language was added into the question.
Although that question still isn't reopen-worthy.
-1
Q: ActiveXObject, JavaScript works with the local files via Cscript

volkincI wrote a small test application to test js files using command Line, The part of loading file in is important. I'd like to know if the code is good or there is a better approach for this. test.js function File(fileName){ this.mode = {READ:1, WRITE:2, APPENDING:8} this.fileName = fileNa...

Is that really VTC worthy?
 
@EthanBierlein, is this you:
 
Nah, other Ethan.
 
12:16 AM
The beta tag got removed. Did the privilege thresholds change?
 
@nhgrif No.
We are supposed to be getting migration paths soon, though.
@nhgrif See Meta.
 
What if it's '\r'? This is a remarkably fragile solution that I would reject in code review. — Lightness Races in Orbit 22 secs ago
 
I've been fighting with our client to try to make them understand why it's 100% necessary for symbolicated crash logs to be attached to any ticket before that ticket is put in a sprint.
 
@nhgrif Care to share?
 
For several programming languages, when you compile your code, the "symbols" and be stripped from the executable. It's optional, but it can be done.
For iOS, it's pretty much not optional. Your symbols are stripped for what goes on the app store.
 
12:25 AM
@nhgrif I'm not sure I understand the second half of that first sentence.
 
Stripping the symbols can reduce the size of the executable by 20-30%.
But what this means is that when you look at a crash log, the stack frame has a list of what library the code came from... and then, instead of the method name, it's just a relative memory address
It points to where that method exists in the binary relative to the library's starting memory location
 
@nhgrif That means you can still find it though, no?
 
You can
When you compile your app, two things are produced
 
Ah, it just requires (a little more) work?
 
The app binary and a dSYM file
 
12:27 AM
The dSYM being debugging SYMbols?
 
desymbolication
 
Aha, that makes sense.
 
It's a reference guide between your methods and their relative memory locations
 
That would explain the .NET pdb files as well.
 
A crash log will have some information at the top which describes what OS version and what architecture the device was running
But until it has been symbolicated, it's just meaningless memory references.
In order to fully desymbolicate a crash log, you need the following things...
 
12:29 AM
Is the dSYM file provided by Apple when it's sent to the App Store?
 
1. The crash log itself.
2. The exact dSYM file that was generated when you built that executable.
3. The exact executable (you can't rely on regenerating it through rebuilding from that commit)
4. The OS symbols for that specific OS and architecture
@EBrown No. But Xcode will store it automatically, which works well if you're the only developer and the app-store builds are made from your machine.
 
Ah, alright. I assume the OS symbols are easily retrievable from Apple?
And as long as you keep the dSYM file, can you redownload the executable from the App Store upload?
 
@EBrown Yes and no.
@EBrown No.
 
@nhgrif That ones a particular bummer. So you have to keep an archive of both the dSYM and executable files, basically permanently?
 
brb
 
12:44 AM
-1
Q: How would you pass updated bound objects in MVP?

mxcolinI have an MVP dilemma that I can't make up my mind about and I'm looking for some advice. I have a simple C# WinForms application using MVP and I'm using the PropertyGrid to show and edit objects of a specific class. Let's call it Template. When the UI ask for the Template by name my Presenter ge...

0
Q: 2D Gravity Simulator-like game

Tiago MarinhoThis project is pretty much like a 2D gravity simulator. You click and it creates a circle that attracts other circles. The result of a collision is a bigger circle that is a sum the masses. The game was made using CreateJS, but you don't need to know CreateJS to understand the code. My biggest...

 
@EBrown More or less, yes-ish.
@EBrown You get the symbols onto your machine basically whenever you plug that iOS device into your machine. If I don't have an iPhone 4s with iOS 6.1, but my app supports that, and someone had a crash on it, I can't completely symbolicate the crash log.
Well, I personally cannot.
 
1:21 AM
yo
 
Hi
 
HAI
 
Smashed several bugs in RoslynTester.
But I'm getting an Invalid Syntax error, and I'm stumped.
 
Error?
 
Can someone take a look at my code to see if it is really a syntax error?
Imports System
Module Test0
    <Flags>
    Enum Foo
        Bar
        Baz
    End Enum
End Module
AFAIK, that shouldn't be a syntax error...
 
1:23 AM
-1
Q: coverting a prompt to a number using +

user2763557In the following code (it is from recursion high vs low on codeacademy) why does the code explanation say "convert their guess to a number using +". Am i confused by that explanation because all its doing is when the function is called the new number replaces the old number for guess..correct? ...

-1
Q: Please see my code of my Android app called BouncingBall

somenath mukhopadhyayBouncingBallActivity class public class BouncingBallActivity extends Activity implements OnClickListener{ private static BouncingBallActivity bouncingBallActivity; boolean isReplayClicked = false; static final int MAX_LEVEL = 4; static final int MAX_NUMBER_OF_HIT = 5; static ...

0
Q: jQuery - AJAX calls to PHP - Is this proper?

DemonCodeFirst, I'll define my goal here. I want to have a method that makes an AJAX call to a PHP script to load images. However, the images that are loaded are based on a context that is passed through. For example: I want to load a portfolio of images, so I pass the context as "portfolio-images". If I...

 
Woah captain
 
It says the error is on column 1 of line 2.
 
Try commenting out Imports System
 
> You can use the Import method to add a component, form, module, class, and so on, to your project.
Your code says Imports maybe it's Import?
 
1:25 AM
@Phrancis Nope, imports.
 
Ew.
 
It compiles too.
7
Q: VB.Net Database Access Class

JohnLBevanI've recently been asked to make some emergency changes to a legacy application written in VB.Net. I come from a C# background so am not overly familiar with this language, though there are enough similarities for me to get by. The current code has no separation of concerns (e.g. DAL code is wr...

 
So if it's right and it compiles, I guess whatever is telling you it's a syntax error must be wrong
 
Yeah.
I'm checking the actual code in the file right now.
(The Imports System and <Flags> lines are generated.)
OK, the generated code matches the source I'm testing against literally.
What's very peculiar is that this passes:
Imports System
Module Module1

    <Obsolete(""I'm obsolete"")>
    <Flags>
    Enum Foo
        Bar
        Baz
    End Enum

End Module
Ah ha.
Something is wrong with the way I add Imports System.
 
Evidently there are still some new ways to break VBA that you guys have completely found yet :)
 
1:42 AM
This isn't VBA.
I'm trying to get RoslynTester to work on VB.NET tests.
That is the unit testing framework we use in VSDiagnostics.
This is weird.
There seems to be absolutely nothing wrong anywhere.
RD just got a 98th star.
 
two moar
 
question is better suited for codereview.stackexchange.comcharlietfl 20 secs ago
 
@Duga O RLY?
It wants Jamalizing.
3
I'm over halfway to Deputy on Programmers, and I'm almost out of flags again.
 
1:57 AM
OK, something is seriously wrong:
This does not compile:
Imports System Module Module1
    <Flags>
    Enum Foo
        Bar
        Baz
    End Enum
End Module
But it doesn't throw a syntax error.
 
Darn you, VB.NET!
 
Have you tried putting a blank line between the import and the module declaration?
 
Yeah.
 
wierd
 
1:58 AM
That just gives be two syntax errors.
 
is Imports System on the same line as Module Module1?
 
@Mat'sMug It doesn't throw a syntax error that way.
 
wtf
 
But, it also doesn't compile that way (in real life, and it does throw a syntax error in real life).
 
what's the compile error?
try <Flags()>
 
2:00 AM
@Mat'sMug That isn't the issue.
And those parenthesis aren't needed - we actually have an inspection to remove them.
You know what I bet?
I bet somehow I'm analyzing it with a C# analyzer, and it is complaining because I don't have the semi-colon!
 
Well, actually no.
 
2:24 AM
the C# analyzer would be complaining for lack of parens, too ;-)
@Hosch250 try that:
<Flags()> _
Enum CombinationEnums As Integer
  HasButton = 1
  TitleBar = 2
  ReadOnly = 4
  ETC = 8
End Enum
 
Night
 
night!
 
0
Q: Permutation and sorting of Strings (parentheses problem similarity)

Tukajoimport java.util.ArrayList; import java.util.Scanner; public class Main { private static ArrayList<String> pathPermutations = new ArrayList<String>(); private static ArrayList<String> acceptedPathPermutations = new ArrayList<String>(); private static int numToEnter, mRankingDesired;...

1
Q: Genome sequencing analysis pipeline

The NightmanI am analyzing some illumina DNA sequencing runs, and have been getting expected outputs when I use small artificial sequencing files for testing purposes. But then when I run my code on actual 15GB sequencing files i get strange results in that sometimes my output files are unexpectedly small, a...

 
@CaptainObvious Schroedinger's bug?
 
@CaptainObvious so... does this code help create dinosaurs in laboratories on an island 80km from the shores of Costa Rica?
wait a minute..
> It appears that there is some discrepancy in steps 3 or 4 that only occurs when I am analyzing very large files. And if anyone can see why perhaps my code is not functioning as I intend I would greatly appreciate it.
 
2:36 AM
0
Q: Multiple reader threads and multiple writer threads synchronization

heyheyyLet's say there are multiple reader thread and multiple writer thread for maximize throughput. The writer will be accessing from device and put it to buffer. The reader will be reading buffer then process it. Which synchronization way get the best throughput? Which data structure is good? void ...

 
Look at what happens with position...
    position = 1
    is_unique = True

    for line in target:
        if position == 1:
            header = line.rstrip('\n')
            position += 1
        elif position == 2:
            umi_seq = line[0:6]+line[-6:]
            umi_seq = umi_seq.rstrip('\n')
            read_seq = line[6:-6]
            position += 1
        elif position == 3:
            position += 1
        elif position == 4:
            quality = line.rstrip('\n')
            position = 1
 
dafuq
 
^^
That's in goodCollapseDictionary.py
 
the indentation just below that block, seems broken
sequences[umi_seq][0].append(read_seq)
 
Looks like umi_list is unreachable, to me
 
2:41 AM
what does bool(arrayvar) return for arrayvar = []?
 
Hm. if not bool(umi_list) I wonder if that only goes when empty array
Hold on
arrayvar = []
print bool(arrayvar) # False
 
hammered.
 
umi_seq = line[0:6]+line[-6:]
WTF does that^ do?
 
he's textually asking for a bug-hunt
> It appears that there is some discrepancy in steps 3 or 4 that only occurs when I am analyzing very large files. And if anyone can see why perhaps my code is not functioning as I intend I would greatly appreciate it.
 
I tried to be helpful in comments, but the behavior of the code is not obvious by the way it's written
I have a feeling that they may have not done frequent sanity checks while writing the code
 
2:50 AM
> Okay sounds good, thanks guys. – The Nightman 20 secs ago
 
Well there it is
It does look really interesting, and they obviously spent some time writing that question
I hope it gets fixed and then posted again
 
yup
 
Processing DNA as string data reminds me a bit of what you had to deal with on MySQL and that legacy data back ... a year ago, ish?
' 0123 '
 
haha yeah
 
@Mat'sMug The issue is adding the Imports System statement.
The error is on the newline.
 
3:02 AM
huh?
 
Why, I have no idea, because the same code doesn't throw an exception if I have the Imports System pre-typed.
Imports System
Module Module1
    <Flags>
    Enum Foo
        Bar
        Baz
    End Enum
End Module
If I start with this, I get an error:
Module Module1
    Enum Foo
        Bar
        Baz
    End Enum
End Module
If I start with this, I don't:
Imports System
Module Module1
    Enum Foo
        Bar
        Baz
    End Enum
End Module
Same code produced either way.
It has to be something with syntax tree and the way I generate my Imports statement.
 
no idea
but hey @Hosch250 what do you think of this?
        private void ExecuteQuickFixCommand(object parameter)
        {
            var quickFix = parameter as CodeInspectionQuickFix;
            if (quickFix == null)
            {
                return;
            }

            quickFix.Fix();
        }
 
Looks good.
Only one thing. Why object parameter?
Why not CodeInspectionQuickFix parameter?
 
        public DelegateCommand(Action<object> execute, Predicate<object> canExecute = null)
        {
            _canExecute = canExecute;
            _execute = execute;
        }
 
Oh, I see.
Yeah, looks great.
Have you imported my regex branch yet?
 
3:10 AM
oh THAT's what I needed to do!!
 
3:37 AM
Man this is a bit clunky
for user in collection.find({'roles': {'$regex': 'Game|game'}}):
    print user
Apparently, the only way to do something similar to SQL LIKE '%game%' in MongoDb is using regex, and of course case-sensitive
 
in VSDiagnostics, 1 min ago, by Hosch250
OK, I finally figured the problem out!
 
@Hosch250 Oh good, what was it?
 
in VSDiagnostics, 3 mins ago, by Hosch250
I'm adding the Imports statement wrong with the trailing newline wrong.
I stuck this in right after the fix:
 
Ah. Looks tricky
 
if (newRoot.GetDiagnostics().Any())
{
    throw new Exception("Oh crap!");
}
It would be less tricky if I stopped opening applications by accident.
 
3:42 AM
LOL
 
Just opened Word.
I HAVE DONE IT!
I got it to work without throwing an exception!
Solving bugs like these has got to be better than winning the Super Bowl.
I HAVE DONE IT! My tests pass!
 
@jfriend00 This should make it clear: Too broad. For what it's worth, both Programmers and Code Review have programs that automatically watch comments for recommendations, that's probably why 90% of the time people swoop down. I would say that about 1 in 10 recommendations for programmers are actually good questions, because most people don't realize that too broad is inappropriate for Programmers. — durron597 39 secs ago
 
@Hosch250 yay!
 
> Fix bugs. Tests pass (although I'm not sure if they should since I'm using the buggy RoslynTester...).
Commit to VSDiagnostics ^
Creating LinkedIn account now.
 
4:05 AM
 
4:41 AM
@nhgrif Are you on LinkedIn? I was going to follow you, but I can't find you.
@JeroenVannevel I was going to connect with you, but I wasn't sure you want me to put my experience with VSDiagnostics/RoslynTester. Just a colleague/contributor?
Anyone else want to connect?
I wonder if I should add all the classes I took?
 
5:11 AM
I just almost had a heart attack.
I submitted an assignment earlier today, but forgot a minor detail. I went to update it, but my teacher had already graded it.
She gave me 100%, but left a note to think about on that point.
Can someone do CPR on me?
 
wow nice!
TTGTB
 
Night.
I'll go to bed ASAP too.
 
 
1 hour later…
6:27 AM
@itsbruce I get tree nodes (id, parentId) from persistent storage, so a solution has to take it as input, but any inner representation is acceptable. The tree itself doesnt' have any specific properties/nature. Consider it as representation of arbitrary group/categories structure. — Tyth 51 mins ago
Urgh, such an effort to get the OP to give any useful context and constraints. Possibly futile; the OP may not have any real concept of a tree.
 
0
Q: Fluent API for creating random integer arrays in Java

coderoddeNow I have this fluent API for creating random integer arrays. I can say that I want an array of particular length, having a particular minimum/maximum values and using a particular (or default) java.util.Random. See what I have: FluentArrays.java: package net.coderodde.util; import java.util...

 
6:53 AM
I have not tried the pseudocode of Carlos yet, but my guess would be to use recursion . I use this method to solve the Traveling Salesman Problem (I guess this one is quite similar?) — Wim 14 secs ago
 
Zak
monking @all
 
Some love for a nice java answer by newish user:
2
A: Use PreparedStatement to insert into H2 database

AntotThere are some things to improve in this code. Especially when it's underlined that "if it can be maintained later on". SQL query The columns where the data will be inserted should always be defined, for example: INSERT INTO TASK(id_task, title, creation_time... etc) VALUES(... . It's the same ...

Also: monking
Aaand I'm out with the dog for a while:]
 
7:11 AM
0
Q: Getting count value for matched document

cyclicI have list of keywords, I want to count numbers of record in db which contains anyone of these keyword. From each record, I want to consider title and description only to be checked. Is this correctly written? self.keyword_list = ['Buzz', 'Heard on the street', 'familiar with the devel...

 
7:40 AM
-1
Q: Finding N satisfying a criterion

user84246Given N arrays of N length each(N is a even no). Every element of the array is either -1 or 1.Let A_i denote ith array. for(k=0;k<N;k++) { temp=A_i[k]*A_j[k]; } What condition must be put on N such that temp =0 for for A_i and A_j (i!=j)

 
8:21 AM
Monking all
 
ello
 
Oh nice, hit the rep cap for the first time yesterday.
 
8:39 AM
Hmm. Is it bad form to make a suggestion with the caveat that it might not be an improvement? ie. This is a cleverer way to do this, but might be less readable.
 
@SuperBiasedMan Improvement in that case may be subjective. The OP may care more about a faster or more generalised solution than readability. And readability is also subjective (says the Haskell fan)
Is the suggestion faster or more flexible/generalised/extensible? Or just clever for the sake of it?
 
@itsbruce True. I'll stick it in with a massive caveat.
It's faster and teaches about some useful Python tricks. So it does have value.
 
Definitely worth doing, then
You can rely on others to do naive, readable versions.
And on yet others to complain about your version.
As a Functional Programming wonk, I am very used to people telling me my code is unreadable, even when their code is an imperative rat's nest, which they can't read or they wouldn't have posted a question to ask where the bug is.
 
I think this is a paritcularly questionable case because I'm literally turning a 5 line nested for loop into a single line function call (though I technically split it over 4 lines for readability and to keep shorter lines).
 
Link?
 
8:59 AM
0
A: Getting count value for matched document

SuperBiasedManThe Python style guide recommends that you keep to a maximum of 79 characters per line, for readability's sake. You keyword list blows right past this. You should split it over multiple lines. Whitespace matters in Python but splitting the line is easy when you have a list items between brackets ...

The collapsed for loop is halfway down.
 
Zak
Not a great start to the day
 
@Zak Ouch, Excel did that to you?
5
 
Zak
@SuperBiasedMan Came off my bike on the way to work this morning.
 
@SuperBiasedMan Using the sum function is an improvement. I will pass over the evilness of any language which auto-converts truth to numbers and back again because Python.
@SuperBiasedMan Truth magically converted to numbers is considerably less evil than the reverse.
 
@itsbruce Admittedly, Python does both. Literally any object can be converted to Truth.
Which is a bit evil, but since I'm well aware of it I welcome the evil.
 
9:06 AM
@SuperBiasedMan The source of countless unexpected bugs in every single language which does it.
Although, in the case of PHP, who would notice? Whole language is one random number generator.
 
@itsbruce Made worsened by the fact that if you create a class it will always be True in Python unless you actually use a function that can return False under certain conditions.
 
@SuperBiasedMan Not an hour ago, in a mailing list far away, I typed "The only thing of which Python can be said to be definitively representative is GvR's personal preferences and eccentricities." With that kind of thing in mind.
Sometimes, coding in Python feels like getting a brilliant but absent minded uncle to do your laundry, take out the rubbish and feed the cat. Unpredictable consequences for the cat.
With PHP, it's like asking Ozzy Osbourne to do it.
 
Except that it is super predictable when you're used to it by basically doing it full time.
It may be weird but it can be followed.
 
9:22 AM
@SuperBiasedMan I feel that, over time, Python has actually become a bit less Pythonic through the accumulated cruft of eccentricities. Like this magic method gotcha: stackoverflow.com/questions/32101987/…
Languages which support both reference and value equality in objects really need to be consistent about how that is applied.
 
@itsbruce I think we're wired differently cause I think that's great. I didn't know about it before but now I can easily distinguish whether I want to modify or reassign a list.
 
It breaks a whole bunch of higher order functions
It means that you can't generalise over things without knowing how all those things are implemented.
 
I'm now trying to check about this, but I suspect this is actually consistent behaviour for the += operator.
In fact, the duplicate that's linked there indicates that: stackoverflow.com/a/4773111/4374739
+= is meant to signal modify in place, which will change a mutable type, whereas if you want to make a totally new one you use _ = _ + _. Since that is consistent behaviour then it's useful to me as a way to distinguish them.
 
Fair enough
 
9:52 AM
0
Q: Too much if conditions

LeksIn my application i have more if conditions, for example if(puttext.matches("buffer")) { JFrame f= new buffer(); f.setvisible(true); } Like this i have more than 1000 if condition.Please help me to reduce this much codings.

0
Q: 2d array with nested loop looking for efficiency i wrote letter 'F'

Syed Furqan Alithis is my code to print letter 'F' with nested loop 2d array any one can make changes in it to make it look better for (int i=0;i<=4;i++){ for(int j=0;j<=4;j++){ array[i][j]='*'; if ( array[1][1]=='*' || array[1][2]=='*' || array[1][3]=='*' || array[1][4]== ...

 
Zak
@CaptainObvious needs to include the rest of the code
 
10:33 AM
Greetings
 
Hey
0
Q: What's the best name for a service object in Rails?

idrysdaleOne challenge I regularly face is how to name my service objects in Rails. I like the advice in this blog post on Gourmet Service Objects, a service object performs one action. It holds the business logic to perform that action. For example: # app/services/accept_invite.rb class AcceptInvite ...

 
I saw that one
I don't know how to handle that
 
^ They're asking a very specific question, but I think that's real code they're asking about. Does anyone know ruby?
 
I don't :/
 
1
Q: Synchronize access to instance method using static serial queue

merocodeIn my current project I have a number of data services classes, each one dedicated to a specific source of data so that it's responsible of downloading data from its api, checking for local database and doing inserts or updates as necessary. I needed to synchronize access to the entry point meth...

0
Q: What's the best name for a service object in Rails?

idrysdaleOne challenge I regularly face is how to name my service objects in Rails. I like the advice in this blog post on Gourmet Service Objects, a service object performs one action. It holds the business logic to perform that action. For example: # app/services/accept_invite.rb class AcceptInvite ...

 
10:44 AM
@Hosch250 Sure, feel free to connect and add them. I don't know LinkedIn lingo but contributor seems accurate
 
11:18 AM
Better suited for codereviewKayaman 22 secs ago
 
0
Q: i didn't get in jQuery post method web scrape data

prakashi need to scrape some data i done in from method but i didn't get in jQuery post method now i get result in json data this following code by using jquery post method this my code public string GetRoomRates(string sessioncookie, CookieContainer cookie) { string postdata = "{\"fromD...

 
@CaptainObvious ... Jesus!
 
I don't think that it is a review what you are doing. It's called discouraging. — coderodde 10 mins ago
Oh dear
 
That's a discussion I would rather avoid. I don't like any API's (fluent, or not) that make things harder, not easier. Your API makes a trivial thing hard. — rolfl 30 mins ago
Apparently the OP can't read ^^
 
On the other hand.... I reduced > 100 lines of code to 1 line
 
11:29 AM
That probably the best review you can get.
 
some people don't want to hear that they have wasted their time on pointless code
 
0
Q: Possible optimizations for this Tuple<int, int> replacement?

tigrouI use the following structure in a web service where performance is critical. It is used for making joins between domain data object, the key is made of two integers. The idea is to fit the two 32 bits integer in a long (64 bits). Before using that structure, I used Tuple<int, int> which was rea...

0
Q: implementing alarm with ringing functionality in java

NitinI have a question regarding a program that is to run an alarm and with ringing functionality.

 
i learned a nice trick from your review though @rolfl, thanks :)
 
@CaptainObvious Someone just destroy that.
 
@bazola Yeah, the stream methods added to Random in Java 8 make random number lists so much better.....
 
Zak
11:34 AM
I've put together some software development ideas for work. I would love to get people's feedback on them. Over in the TDD room.
 
i like the syntax. of course I'm stuck with java 6 most of the time
 
11:47 AM
0
Q: mIRC scripting like string token manipulation in Lua

user3204810I'm trying to reproduce in Lua the mIRC scripting manipulating tokens function. Let me give an example: this is the code local function tokenize(C, text) local char = string.format("%c", C) local t = {} for w in string.gmatch(tostring(text), "[^"..char.."]+") do w = tonumber(w) ...

 
I'm voting to close this question as off-topic because This probably belongs on the Code Review Site — Matt Wilko just now
 
@Hosch250 No. I have no need to be on LinkedIn.
pseudo/hypothetical/stub code:
0
Q: Synchronize access to instance method using static serial queue

merocodeIn my current project I have a number of data services classes, each one dedicated to a specific source of data so that it's responsible of downloading data from its api, checking for local database and doing inserts or updates as necessary. I needed to synchronize access to the entry point meth...

 
I am repeatedly contacted by recruiters for putting a single programming job on my linkedin, even without having any qualifications at all. Let alone qualifications in the language they ask me to work in.
 
I am regularly contacted with recruiters without a LinkedIn profile.
 
They seem like a relentless force.
 
12:01 PM
There are a lot more programming jobs than there are talented programmers.
And, there are a lot of companies that don't realize this and abuse the programmers they do have (talented or not).
 
So I've heard. I'd imagine the abuse in part comes from the company just not knowing what they're doing and not acknowledging that they don't know.
 
Zak
@SuperBiasedMan I get contacted probably at least once a month for a 5 month internship I had as a "Junior paraplanner"
 
@Zak I don't know what "paraplanner" is so I hope it's just an enemy from Mario games.
2
But anyway. I gotta get lunch, later folks.
 
This is purely hypothetical/example/stub code, which is off-topic for Code Review. Importantly, with code like this, it's impossible to answer yes to the list of scope questions on this page (especially since one of them asks "Is it actual code from a project rather than pseudo-code or example code?") — nhgrif 11 secs ago
 
12:16 PM
0
Q: Growing prime sieve

Syd KerckhoveI tried writing a prime sieve that grows as needed. I've only just started learning C++ so any feedback on idioms is extra welcome! The header: $ cat prime_sieve.h #ifndef prime_sieve_h__ #define prime_sieve_h__ #include <vector> class prime_sieve { private: std::vector<bool> prime; ...

 
Zak
@SuperBiasedMan It just means "you have some basic knowledge of financial planning, but are not qualified to actually give financial advice to people"
 
Wouldn't be better in Code Review? — Soner Gönül just now
 
@coderodde Many times when writing code, what you end up writing might not be as good as something that already exists. Learn from the things that already exists. Also see Reviewing usefulness of code and Is "You're doing it wrong" a review?. You asked the question "So, what do you think?", and you got an answer to that here. If you want, you can open a discussion on meta or chat with both rolfl and I in The 2nd MonitorSimon Forsberg ♦ 7 secs ago
@rolfl FYI ^^ (although you will see it anyway because it was your post I commented on...)
 
Yes, this question seems too broad for Stack Overflow, but write a description about what this code is supposed to do and post it at Code Review. — Simon Forsberg 28 secs ago
 
12:32 PM
Thanks @simon. In car at red light
 
0
Q: Sorting algorithm

EmaborsaThis is my ugly code which needs to sort my data. I'm not really familiar with C# since actually I'm a Java programmer. How could this code be rewritten without loosing performance? I Know i could use reflection, but It is bad for performance. sortings is a list of the fields that have to be so...

 
0
Q: Badge points 6/5?

simplicis veritatisThere is this strange indication in my profile: What does it mean? Is it possible bug?

 
Greetings, Programs.
 
Greetings, user
 
It's FRIDAY!!!!!!!! Please feel free to watch the Friday video of your choice. We've posted them so many times, it would be redundant at this point.
12
 
12:36 PM
I hate fridays
 
How bizarre.
2
 
Not exactly
Thursdays and fridays I have to work more 2+ hours
Last week, I worked till 11:30pm on thursday
And till 1:40am on friday
 
Ewwww. That's just awful.
 
Still think it is bizarre?
 
No, if I had to work a schedule like that, I wouldn't be fond of Fridays either. Right up until I quit and found a better job.
 
12:47 PM
Sadly, there's no better job around here
 
0
Q: returns an array of integers with 1000 elements

yasWrite a function that returns an array of integers with 1000 elements containing the values 1 to 1000 in random order. No number can be repeated or omitted.Your answer should show good programming style, technique and attention to accuracy and performance. Hint: use Random rnd=new Random() to cr...

0
Q: Find duplicate files using Python

pepoluanMost Python "duplicate file finder" scripts I found do a brute-force of calculating the hashes of all files under a directory. So, I wrote my own -- hopefully faster -- script to kind of do things more intelligently. Basically, it first searches for files of exact same size, then it compares onl...

 
I live in a major metropolitan area that is rich in high tech industry.
 
Someone who speaks, German?
1
Q: Sorting algorithm

EmaborsaThis is my ugly code which needs to sort my data. I'm not really familiar with C# since actually I'm a Java programmer. How could this code be rewritten without loosing performance? I Know i could use reflection, but It is bad for performance. sortings is a list of the fields that have to be so...

 

« first day (860 days earlier)      last day (3148 days later) »