« first day (1082 days earlier)      last day (2929 days later) » 
00:00 - 16:0016:00 - 00:00

12:00 AM
RELOAD! There are 2156 unanswered questions (93.5499% answered)
 
lol, "image not found", i.stack.imgur doesn't resolve
ah, finally
I thought I'd never see @JeroenVannevel's pretty face again
cough
 
first you ban me
then you remove my messages
and now the sweettalking comes
 
I what?
 
This is borderline abuse
oh right, you didn't ban
 
so, did you sign?
 
12:05 AM
I'm going to ask some clarifying questions at the office before I sign
I'm going to London in 10 hours for a week to do househunting and stuff
 
possible answer invalidation by Gup3rSuR4c on question by Gup3rSuR4c: codereview.stackexchange.com/posts/126067/revisions
 
@Duga ermph... I ain't sure this is a huge problem
it's theoretically an answer invalidation, but the only answer is about basic linting :/
 
I don't have images anymore...
except @JeroenVannevel...
my work station just died....
time to reinstall everything all over again
 
12:34 AM
...
windoze
 
Windows 10 are trying to impersonate OSX's Dashboard with this Task View
Windows business model: let's just copy all of our competitors best features and implement them half a decade later
 
@Quill it worked reasonably well until now
 
I'm surprised Chromebooks are still on the market
 
Why?
 
It's a conspiracy Have you tried rebooting?
 
12:42 AM
 
@nhgrif Because they're literally just chrome + chrome apps and the same price as a decent windows computer
I suppose they perform well when most of the processing power is done by google hosting the webapps
 
Have computer prices come down? Last I looked Chromebooks were cheaper than most Windoze options.
 
0
Q: Loading multiple remote resources

Francis DucharmeI've created a class that allows me to load resources, execute a callback after each individual request has been made and finally, a final callback that can assume all said resources are available. This is something I came up with when developing something in ExtJS, so there were no formal promi...

 
Chromebooks are about as cheap as a notebook can get (that is not utter crap)
 
@nhgrif meh. You can throw windoze at basically anything you buy that's a pc
 
12:44 AM
I went laptop shopping for a sibling a few days ago; they were the same price as like i5, 4GB RAM specs
I suppose i3 + 2gb RAM is enough for a webapp powered OS to run decently
 
@Quill That's not a very good computer
 
You can install windows on anything, sure... but are the machines available in the stores with Windows on them the same price as the Chromebook machines? Because certainly, the Chromebook machines used to be cheaper than Windows options.
 
You deleted your question on CodeReview. CodeReview has thousands of answered questions. They are not deleted because the reviews can be helpful for future readers. I don't know why you deleted your question, but if you are using the information given in my review, you should let others benefit from it also. Certainly, others will probably not have come up with the same code you did, but the concept at least. On the side, if you undelete your question, you can upvote and maybe accept my answer and let me benefit from the work that I put into my review. — zondo 52 secs ago
 
1:07 AM
When did adding a publication date to an article become obsolete?
 
@Phrancis When checking facts before publishing did
 
groan
I found this decent sounding comparison of Chromebook vs. Windows (though, the introduction paragraph gives the impression of being biased, which may or may not actually be the case)
But the only time reference I could find was of Call Of Duty: Ghosts, since nothing on there is dated
2013 release date of the game
> Information presented was accurate as of September 2015.
Tiny print in footer
 
It's a nice looking website, but it's seriously just chrome
 
... right
 
1:51 AM
@Duga nice, thanks!
 
2:28 AM
Someone had left a comment regarding why I posted this here, rather than in code review. The reason is because this is a genuine StackOverflow question... I did provide code that I have tried, but know it wasn't a clean Java solution. I wanted someone to help me get a better answer using my example code as a starting point to build on and show me. — rosenthal just now
 
0
Q: Tic Tac Toe game AI in C++

Eric LiI wrote a Tic Tac Toe game from scratch a couple days ago. My AI doesn't always make the best moves, so I'd like some advice on how to improve it. I also hardcoded a move in a very specific situation to prevent it from losing, so I'd like some advice on that. I read about minimax, but I haven't...

 
3:22 AM
0
Q: Need to put one more inner loop for a babysort function?

Gswi have a sorting function that does not use swaps, and has more than 1 of the same values, ive figured most of it, but I don't how to transfer the values into counts[j]? void babySort(int nums[], int length){ int counts[100]={0}; for(int i=0;i<length;i++) counts[nums[i]]++; int j=0; fo...

 
3:32 AM
0
Q: Haskell - Pig Latin Translator

BalinKingOfMoriaWhat improvements can I make to the following Pig Latin translator? So far, I've been wondering about the FlexibleInstances declaration, but I can't think of how to remove it (since it's required for PigLatin String in instances, which is required for me to use " " in the Monoid instance; I need ...

 
3:47 AM
VS likes to think it's Internet Explorer
 
LOL
Thought the same thing
 
4:41 AM
You should submit this to code review section. — Ccr 52 secs ago
 
Monking
 
hey there
 
5:30 AM
0
Q: Am I having a leaky abstraction? Unit of Work

Jose ATL/DR: I have a Get() method which I expose a IDbSet<> object to overcome a limitation for LINQ's Select(). Is it considered leaky? Long Post: Hi everyone. Before posting this I have spent the past 4 days tirelessly investigating over the Internet and the different StackExchange websites how to...

0
Q: Can this anagram count solution be improved?

Rodrigo Del C. AndradeHomework, the prompt was: "You are given two strings, a ‘parent’ string and a ‘query’ string respectively. Your task is to determine how many times the query string – or an anagram of the query string appears in the parent string. NOTE: There are a range of solutions to this problem. Wi...

0
Q: Wu-Palmer Relatedness Calculator in WS4J

HSAIMI am using WS4j to find the similarity between two words. Also I am using Wu-Palmer relatedness calculator. It is working fine for many words, but when I tried to find the similarity between 'play' and 'playing', it gave the score 1.3333, which is not possible as it has to return between 0 and 1 ...

 
6:05 AM
I'm voting to close this question as off-topic because this should be published on codereview.stackexchange.comMatías Fidemraizer 15 secs ago
@MatíasFidemraizer this code is incomplete, it's not okay on Code Review, it's more on-topic here. — Quill just now
 
6:16 AM
@Quill Then it's not ok nowhere, because the question is "does it need any rework?". I was going to vote to close it as "why isn't working?". The OP thinks that the code is ok but wants a review from us to check if it requires a a possible rework... For me, this is code review :\ — Matías Fidemraizer 44 secs ago
 
0
Q: Making the Levenshtein distance code cleaner

AmirHosseinI was writing an Levenshtein distance in python and I found my code really ugly Have you any idea to make it more elegant import unittest import enum def seq_dist(first, second): Direction = enum.Enum('Direction', 'gap_first gap_second match finish') def find_dist(): dist_table...

 
@MatíasFidemraizer To avoid future misunderstandings, please note that "Because it belongs on X" is never a sufficient off-topic reason. Furthermore, it would be a good idea to note what is appropriate for Code Review before recommending it. — 200_success 43 secs ago
 
0
Q: Creating components with SVG Icons

ThomasReggiRight now I have code like this, where an svg is used via xlinkhref and the Icons tag needs to be also on the document. This creates a mapping functionality that is very unfamiliar to react. import React from 'react' export let Banner = ({children, handleDismiss}) => { return ( <div> <...

 
6:45 AM
@Phrancis Those windows are still in use? How old is that by now?
 
7:05 AM
This question may be a better candidate for Code Review. — Richard 43 secs ago
 
7:16 AM
@Duga Yup. Flagged for migration.
 
7:27 AM
@200_success If I'm not mistaken, your link provides reasons to think that some Q&A should be published on CodeReview. For example: Answers can suggest any improvement. Isn't this Q&A looking for improving OP's code? — Matías Fidemraizer 1 min ago
@200_success Ok I see that this Q&A isn't good for CodeReview because it has code placeholders... I'll retract my close vote. — Matías Fidemraizer 19 secs ago
 
@chillworld Monking
 
Monking
 
7:45 AM
monking @Mast
 
WE'RE GOING TO MIGRATE TO GIT!!
5
:D
happy dan
 
and @DanPantry, @Heslacher
 
hey @chillworld
 
Also, it' gets better - I've been asked to be the representative for our transfer to git
Which is good and bad.. Good because exposure, bad because it could fall on my head if it goes poorly
 
0
Q: Azure cloud page blob stream

AnatolyA custom stream that is used to perform read and write operations directly into the page cloud blob public sealed class WindowsAzureCloudPageBlobStream : Stream { // 4 MB is the top most limit for page blob write operations public const int MaxPageWriteCapacity = 4 * 1024 * 1024; //...

 
8:00 AM
Ripe zombie; open question with answers, at least one answer having score 0, no answer having score > 0: JavaScript function to create HTML select option elements
 
@Phrancis that made me literally shudder
and the worst thing is I think I have seen/used that font before.
 
Zak
Monking @all
 
> Creditsafe, the world’s most used supplier of online business credit reports...
TIL I work for the world's most used supplier of online business credit reports
I mean I knew we did credit reports but I didn't realise we were "bigger" than other competitors
 
8:28 AM
0
Q: Script to Periodically Identify and Act on Public IP Address

BassieI wrote the below script, which checks what the current public IP address is. The plan is for this to run every 5 minutes or so, and then change some host file configuration depending on whether we the IP is identified as that of officeone or officetwo. Each attempt at retrieving the IP address...

 
This JavaScript blog post I'm writing is turning out very nicely
 
oh?
 
0
Q: JavaScript function to convert underscore-case to camel-case (and vice-versa)

st88Actually I needed a function which converts underscore to camel-case. But then I've had the idea: Why not extend the function so, that is works the other way around? Finally I recalled that there is a third case which programmers use: Pascal-Case. So I included that too. The function doesn't w...

0
Q: Write into the same File multiple times. Perfomance issue?

PatrickI implemented an OutputWriterService.class to write content in the same file multiple times. The writeToCsvFile method is called round about 50.000 times and includes a list of descrptions which also needs to iterate and write to the file. Is it a good way to instantiate a new Filewriter, Buf...

 
50000 times? your perfomance is gonna be fine
 
mfw our designer gives us a sprite and says "here's a spritesheet you can use" and half of the sprites are from bootstrap glyphicons
 
8:45 AM
there's amazing open source sprite sheets
the one bundled with ionic is cool
 
Yeah, but they aren't branded sadly
Our spritesheet is more or less branded stuff - except for a few icons that are part of bootstrap glyphicons
 
9:08 AM
If only I could overload this operator
what a shame
 
Got much experience with SASS, @Quill?
 
Some experience. What's up?
 
any ideas?
Maybe I am misunderstanding how partials should work
TLDR though is this
// _partial.scss
.myClass { color: red; }

// index.scss
@import 'partial'
h1 {
  @extend .myClass
}
I would expect to see this output:
h1 { color: red; }
instead I am getting:
h1 { color: red; }
.myClass { color: red; }
If that is intentional that really sucks cus it means I will have to include all of the bootstrap mixin files by hand
 
So partials don't extend?
 
No, partials are extending
It's just that the partial class is also being included in the output
So I would expect that the partial would not be included in the CSS output
 
9:14 AM
If they were extending properly, you'd see
h1, .myClass { color: red; }
 
The output I gave above was just an example
For all intents and purposes though h1, .myClass is equivalent to h1 {} .myClass {}
 
uhhh try using mixins instead I guess, part partials always render, then?
 
I am using mixins :P
But in my example I'm using bootstrap-sass, which has classes.
however, now that you mention that class behaviour, it makes sense why they would be included in the output.
I'm not sure it is correct, though
Yeah, I think I am just fundamentally misunderstanding how it works.
I guess that's why bootstrap-sass is being superseded
 
Yeah, if you are doing something wrong, they'd be best at explaining it anyway
 
Okay. I guess i had better include the files manually, then
Because this is happening with bootstrap, and there's no deduplication in SASS, so we're having bootstrap loaded multiple times which is the very very bad thing.
 
9:20 AM
possible answer invalidation by ferada, baalal on question by udb: codereview.stackexchange.com/posts/79625/revisions
 
@Duga edit plus edit approval. looks fine
 
Well
Stats time
 
oo yay stats
 
Even though it's now 5:26AM.
Dear god.
I'm far too nice of a person.
Yesterday, we got 26 more accepted answers, 26 more questions were answered, 54 more answers were posted, 142 badges were earned, 184 comments were left, 32 more questions were asked, 6 more questions were unanswered, 93 users were created, and 387 votes were created.
Our question answer accept rate went up by 0.0211%.
Our question answer rate went down by 0.0118%, and our answer accept rate went up by 0.0126%.
TTGTB
I need to get this automated, ASAP.
 
9:28 AM
and that was @EBrown's stats of the day, ladies and gentleman, give them a hand
*sitcom clapping*
 
I don't need the carp today guys. :P
 
Good thing I am a herring instead
a red herring, in fact.
Get some sleep buddy
 
Just gave a woman a ride home from work because her car is in the shop (literally took 1hr 20 mins) and had to listen to a lot of stuff.
Dear god, she needs jesus.
2
 
I think that's the first time I have heard that phrase on the internet without it being satire
 
LOL
I'm so tired.
 
9:30 AM
She may need jesus but you need rest
 
Selective hearing is a gift some of the more fortunate people have
 
I don't have selective hearing.
I heard everything.
 
See, I have blocked ears because I had a lot of ear wax when I was younger.
 
Super awesome woman.
Really bad situation.
 
So I'm basically mostly deaf at the moment. It comes in handy.
@EBrown Ah. One of those situations
 
9:31 AM
Yeah. Bad things man, bad things.
Good thing is my Fitbit worked all day.
Let's see the data it came up with.
 
what are those?
I saw something about it on reddit earlier
 
I bought the Surge.
 
So.. it is a watch that tracks your heart rate?
 
Yet another IoT watch device
 
Yeah, and step counter and GPS.
 
9:33 AM
So it's my phone
With a heart rate monitor
 
Not really.
 
but on your watch and doesn't have tinder make calls
 
Yeah, no Tinder.
 
Speaking of Fitbits, I have an Apple Watch
 
My max heart rate was 139 last night at work.
 
9:35 AM
@EBrown LOL holy crap
bad day?
 
No, I just had to run around all day.
 
codereview.stackexchange.com may the right place for this question. — Praveen 33 secs ago
 
According to the watch, I walked 23k steps at work between 4PM and 12PM, then 10k from 12PM to 5AM.
 
> how to
that doesn't really fit as a start
 
Hm
I have a problem
there's a fairly major bug in our app where timezones aren't being respected properly
 
9:37 AM
And it thinks I was on an "Outdoor Bike" for 28 minutes.
 
and a bug that has shown up as a result of the patch over it means i now have to fix that today
 
Swap to Moment.js, problem fixed
 
Not that simple
We have momentjs
The problem is that some of the 3rd party ui components are not respecting TZ properly
example
                var offset = -scheduler.view().startDate().getTimezoneOffset() * 60000

                var start = new Date(scheduler.view().startDate().getTime() + offset).toISOString()
                var end = new Date(scheduler.view().endDate().getTime() + offset).toISOString()
This removes the offset of the timezone of a start/date time to display it at the correct time in the calendar
 
1 min ago, by Dan Pantry
We have momentjs
 
Ugh
So tired
 
9:38 AM
that doesn't look like moment to me ;-;
It's 5:40am @EBrown go to bed
 
@Quill This bit wasn't written by me :-)
 
@Quill I'm getting ready to.
 
-1
Q: How specific does the Single Responsibility pattern should be for classes?

kuhakuHow specific does the Single Responsibility pattern should be? For example, suppose you have a console game program, which has all kinds of input/output methods to and from the console, would it be smart to keep them all in a single inputOutput class or break them down to more specific classes l...

0
Q: What is modern way of doing this in python?

user1685095My code right now look like this @contextmanager def smtp_connection(host, user=None, passwd=None, timeout=5): conn = None # smell here try: conn = SMTP(host=host, timeout=timeout) conn.ehlo_or_helo_if_needed() if user and passwd: conn.login(user=u...

 
Any mod arround ?
@CaptainObvious this should be migrated to programmers.se
^^^because
 
200_success was lurking a little bit earlier, maybe he's still around
 
9:40 AM
LOL if I open an event in the app then save it the time moves back an hour. oh dear
 
@200_success are you around ?
-1
Q: How specific does the Single Responsibility pattern should be for classes?

kuhakuHow specific does the Single Responsibility pattern should be? For example, suppose you have a console game program, which has all kinds of input/output methods to and from the console, would it be smart to keep them all in a single inputOutput class or break them down to more specific classes l...

should be migrated
 
SO TIRED
LOL
According to some BS quiz, I should be living in Alaska. Even though I answered that I like "Hot and Humid" weather.
 
OP deleted it
 
I pretty much wrote this blog post to explain this photo that keeps ending up on the starwall
 
@DanPantry Are you sure it's not Windows-based?
 
9:45 AM
@EBrown 100%
The time being sent from the client is correct
when it hits the server the server just ignores the TZ and thinks its in GMT
 
Huh, well my diagnosis is that Windows is at fault.
 
actually, you may be onto something
"Start": "2016-04-19T05:00:00Z",
"End": "2016-04-19T06:00:00Z",
for some reason, the above dates are sent... I'm in GMT+1 (because of DST)
 
Clearly my drunk-self is a superior debugger to you.
4
So, solution: you should drink more.
 
you're alright fam
 
Porblem solved.
 
9:47 AM
"I don't have a drinking problem: I get drunk, I fall down. No problem!"
 
I don't have a drinking problem.
I have a sober problem.
I solve it by drinking.
Anyway, TTGTB.
Later all.
 
So, Javascript dates suck.
JavaScript was serialising dates to end with 'Z', which means local time, and omitting the timezone
Moment, because it doesn't suck, doesn't do this.
 
0
Q: A Bouncing Ball Canvas Program

Cool GuyI've just completed reading the game tutorial of w3schools and wrote a piece of code from scratch. This program basically creates a canvas element with a ball bouncing off the walls of the canvas. The user can also control the ball using arrow keys. I'm planning to make this into a small game by...

0
Q: Listing customers with specific order total SQL?

JonSo I am trying to figure out how to do this one and its really making my head explode. Here is the question: List all customers who have placed orders totalling over £1000, returning their names and the total value of their orders. Here are the tables: Books ISBN, Title, Author, Publisher, S...

 
@CaptainObvious broken/code not written
 
@DanPantry Z means Zulu, not local time, right?
 
10:04 AM
You might want to try this at codereview.stackexchange.com. — deceze 38 secs ago
 
Zak
For anyone who's interested in a 150-point bounty, there's still not a single answer on this, and it ends in 3 days: codereview.stackexchange.com/questions/123458/…
 
hmm Function.prototype.call returns a wrapper type instance for primitives... strange
 
0
Q: Simple bcrypt Register User and User Login using PHP - is this approach acceptable?

Stac PollaidhI am learning PHP and have been looking into a suitable way to safely store password data in MySQL. Following advice from here (http://stackoverflow.com/questions/4795385/how-do-you-use-bcrypt-for-hashing-passwords-in-php), is this an acceptable way to deal with passwords? The code is a very ba...

 
10:56 AM
@Zak Your and Mug's VBA is over 10x mine. What are you looking for?
I could write you an answer for the sake of having an answer, but I doubt it would be very helpful.
 
11:23 AM
@Mast Yep.
 
I fail to see a problem.
It acts like a timezone stamp, replacing the need for a loose stamp on the side.
 
@Mast because the time its using is not converted to Zulu time.
It's just throwing the Z indicator on the end of it
 
11:39 AM
apparently apple upgraded their macbook line: theverge.com/2016/4/19/11455044/…
 
Questions asking for code reviews belong on Code Review. — Ansgar Wiechers 39 secs ago
 
11:55 AM
would this question be more appropriate for the CodeReview community? codereview.stackexchange.comMichele Ricciardi 59 secs ago
 
0
Q: Failed to Parse Error - What's wrong?

PlymouthFury1958This is the line with the "Failed to Parse Error" -> var label = package.getComment() && package.getComment() : 'N/A' The rest of the code... var script = '/home/paulomacedo/jd2/JD_HOME/jdownloader-postprocess.sh' var path = package.getDownloadFolder() var name = package.getName() *****var la...

0
Q: Code Suggestions for Improvement [Beginner]

A CoderI was working on programming an 8x8 matrix LED display. In particular, I am trying to make a basic version of Pong, controlled by two switches, one switch for each paddle. A ball is generated and moves to one paddle and is reflected upon collision with a paddle. If the ball fails to collide with ...

 
Okay so it looks like the DateTime instance was correct however the server was not normalising it to UTC.
It was normalising it to Local time.
..I don't even know anymore
Time zones are hard
2
Right, yes, so what was happening with DateTimes was this..
It would display 10am as 11am because it was just adding in the timezone info on its own
but then we just took the time section off of that without accounting for the time zone
and so the db would always store the time of the timestamp in the local time.
which would mean if I entered in 10am on the GUI and I'm in GMT +1 the server would store 11am
And that, kids, is why you always normalise to UTC time
2
 
12:13 PM
0
Q: Gathering a teamviewer from domain computer

sasuI am new in a Powershell scripting world. I am trying to remotely search TeamviewerID from a domain computers. <# This script is going to query ad computer for TeamviewerID #> I am checking if needed module are installed on the system. If ( Get-Module -ListAvailable | Where-Object ($_.n...

 
12:23 PM
0
Q: Is this a proper way to stop a thread in Java?

Milen KovachevI have a thread that runs background jobs. This thread needs to have a halt method, which should stop it. I am looking at the following code (not written by me): ** * <p> * Signals the main processing loop to stop at the next possible point. * </p> */ @Override p...

 
Zak
@Mast Not after anything specific, like with most questions, it was a case of "This is the best that I could come up with, can you see/think of anything I could do that would make it even better?"
 
@MacroMan Sure, but then I'd be getting into Code Review territory, in a comment, so I thought I'd keep it (relatively) brief. — Zak 24 secs ago
 
12:44 PM
Monking
 
I think I've had enough date time manipulation for this year
 
lol
I've had to deal with a clunky system for TZs also, where datetime values are stored in local time, and there's a time zone offset table that needs to be factored in, pretty annoying; much rather deal with UTC if it were my choice
 
Well, all of our times are stored in UTC
It's just that when we were formatting the dates for client consumption - from the web server - they were not being formatted to preserve the timezone
and so the client was (reasonably) interpreting the dates as Local time, rather than UTC
surprising no one caught it sooner
all the times in a certain part of the app have been wrong since DST went live, lol
 
lmao
 
actually let me just double check that
lol
yeah the ones on the calendar are out
the times in the grid weren't noticed because that info isn't displayed on live (new feature)
amazing how no users have complained about it ;-)
 
12:57 PM
Imagine that
 
1:18 PM
0
Q: Code for interfacing water sensor to LPC2148 ARM 7 kit

Bharat Banavalikar I am making a prototype of automatic car wiper system using lpc2148 kit as a part of my course project, but I am unable to get the code for configuring the water sensor. There are some code available to configure water level indicator but none to configure water sensor. More over I don't know w...

0
Q: How to tide properly a code in which a device is configurated

Oscar GuillamonDuring the test process of a device, there is a procedure which sets the device in a state in which it is ready to be tested (tipically save default measure parameters, configure a 3G connection parameters and any other stuff that is requested to be configurable). The code below works but I want...

 
1:37 PM
Greetings, Programs.
 
0
Q: setTimeout in for loop

YaGuang XuI want to display the animation that can see the process of bubble sort, by using setTimeout. I just know setTimeout function is asynchronous, but i didn't actually understand it. Since the code doesn't work. function animate(ele, util, start, to) { if (!ele) return false; if (start < to) { ...

 
Hey @Donald.McLean! How're you?
 
Not bad. Ready for another day of Writing The Code.
 
@CaptainObvious One more VTC.
@DanPantry Cleaning-up legacy code?
 
1:46 PM
Nah, just ran an audit. Some of that will be unreliable as I haven't loaded all of the app state, but, still quite funny @Mast
 
@Zak Sounds familiar, I usually post with the same idea.
 
There are a LOT of rules that aren't required though, I could probably remove entire CSS files and it would still look the same.
 
@Mast Looks like Windows XP, so probably circa 2000
 
lol, in fact
I have removed entire css files and not realised it.
One of the larger CSS files hanging around in source control isn't used any more
 
As long as it's still somewhere in source control you can safely throw it away.
 
1:51 PM
Well, now that we're using git we can always get it back if we really want it ;-)
 
Migration is already complete?
 
I've been using git locally since the start of the year
Remotely, it's still using TFS
The difference with the git thing i mentioned this morning is now everyone will be using git, no need for the (really slow) git tfs
 
I'm voting to close this question as off-topic because it's asking about critiques and opinions about your code. It may be on-topic for CodeReview if you can post full source code there (please check their policies). — Adriano Repetti 47 secs ago
 
0
Q: Reading file into an array in c

TenTenI'm trying to read a file to double pointer array and I need to do it in less tahn 25 lines of code, My current function contains, 38 lines of code. I tried breaking the function into two parts but I got segmentation fault. How can I shorten this function. I'm only allowed to use read() and while...

 
This really sounds almost like an advertisement for a library, disguised as a request for code review. In any event, the question as presented would also be off-topic on Code Review site as the code to be reviewed must be included in the body of the question. — Phrancis 35 secs ago
 
2:01 PM
@Duga Closed because off-site resource
 
Re-writing the math in code can make a huge difference if it isn't optimized away.
             user     system      total        real
first:   0.640000   0.000000   0.640000 (  0.630699)
second:  0.344000   0.000000   0.344000 (  0.340662)
third:   0.531000   0.000000   0.531000 (  0.536238)
Second variation is about twice as fast as the first, just by re-writing the formula.
 
Formulas are really important. Source: KFC vs regular fried chicken.
 
-1
Q: C HyperText Library, A Library for writing Web Applications in C

it4ehttp://hackersden.ml/chl https://github.com/it4e/CHL CHL, short for C Hypertext Library, is a library written in C to be used to write web applications. If you have ever used a language designed for creating server-side webscripts, PHP or ASP for instance, you will feel quite familiar with CHL,...

 
@CaptainObvious @Phrancis Look who showed up.
 
2:14 PM
@AdrianoRepetti Don't mention Code Review if you're not sure. Now OP posted his code there as well where it will be closed. — Mast 10 secs ago
 
@Mast Good grief
Now they have 2 problems off-topic questions.
 
Nuke it from high orbit.
 
Can we please refrain from posting animated GIFs in this room, unless they bring value that is hard to convey with words only?
10
e.g., animated sorting algorithm is useful to illustrate how it works. animated funny GIF could simply just be "lol"
 
2:34 PM
@Phrancis ~slowclap
 
2:46 PM
monking!
another
way
is
to
talk
enough
to
make
it
scroll
up
and
away
like
this
but yeah I agree with @Phrancis
 
Or, we could just move it to another room ;p
 
Zak
@Mat'sMug Implicitly starring the entire thing, rather than actually starring the entire thing and removing the starwall.
 
@Mat'sMug Not enough code.
Not enough text.
Not enough freehand circles.
 
too much rate-limit annoyance, yeah
@Zak Option Implicit
oh dear god
 
@Zak You're simply not willing to admit you already ran out. It's ok, we get it.
 
2:57 PM
0
Q: Levenshtein distance with edit sequence and alignment in Java

coderoddeI have this program that computes a Levenshtein distance of the two input strings, their edit sequence, and the alignment: LevenshteinEditDistance.java: package net.coderodde.string.levenshtein; import java.awt.Point; import java.util.HashMap; import java.util.Map; /** * This class implement...

0
Q: Time Limit Exceeded for build_max_heap

matha_kharapThis is the problem- The Monk learned about priority queues recently and asked his teacher for an interesting problem. So his teacher came up with a simple problem. He now has an integer array A. For each index i, he wants to find the product of the largest, second largest and the third largest ...

 
BTW.Excel
="insert into VENDOR_SUPPLY_ROWS_LIST values (1, " & A27 & ");"
That's how the pros do it, kids (not)
 
pffft. damn right. dude, it works!
copy+paste into SSMS, done
 
yup
 
no need for funky macros and ADODB stuff. who needs parameterized queries when you can copy+paste a whole script?
#GetItDone
3
 
3:16 PM
0
Q: How to refactor/reduce redundancy in methods

NerminI have 2 almost equal methods in Java: public class A{ private WebElement selectOptions; public void selectOptionByIndex(int index){ openOptions(); if( index < 0){ resetSelect(); }else{ selectOptions = getOptions(); clickOnOption(index); } ...

 
Is your class really called A or is this example code? — Phrancis 11 secs ago
 
3:37 PM
0
Q: Binary search in Java

Dhrubojyoti BhattacharjeeI have started learning Java recently and was looking into some easy algorithms. I found the Binary Search Algorithm here I am trying to get better at writing good code for my solutions. I have used MergeSort for sorting the unsorted array first.Please give me your suggestions. import java....

 
00:00 - 16:0016:00 - 00:00

« first day (1082 days earlier)      last day (2929 days later) »