« first day (693 days earlier)      last day (3329 days later) » 

2:00 PM
x >>= __builtin_ctz(x) or something close.
Too bad there isn't a bit manipulation module in the standard library.
 
and a carry flag
 
int nextUnit(int u) {
    // implement u * 10 using addition.
    int d = u << 1;
    return d + (d << 2);
}
Like that?
d -> double
panabox:~/xxx/crev> gcc -std=c99 -o div9 -Wall -O3 div9.c
panabox:~/xxx/crev> time ./div9
0.117u 0.000s 0:00.11 100.0%    0+0k 0+0io 0pf+0w
panabox:~/xxx/crev>
 
Yeah, it should work.
 
0.001 time saved
 
xD
 
2:04 PM
The thing is, the compiler probably optimized my code as u * 10 anyway
 
Probably.
 
Is there a flag to say "don't use multiply or divide?" :D
3
 
Use std::div instead of %. Meets the requirements.
 
@Edward Which is exactly why we need more information about these requirements. A restriction on something like % almost certainly means that there's some compiler option being set somewhere.
 
whistles
 
2:07 PM
And if the best answer to the problem is something that the compiler actually optimizes into num % 9 anyway, then we haven't actually met the requirement, and we've written code that's considerably worse than writing num % 9 because it's harder to read/understand for the developer despite the compiler treating it identically.
 
So what's the best language?
<ducks>
 
@Edward Java# obviously
 
B-Flat
 
@Edward Brain++
wouldn't surprise me if one of the above actually was a language.
 
I've been using Brain-- -- everything was better with rev 0.0
 
2:13 PM
SNUSP all the way.
 
0
A: Seemingly arbitrary requirements

nhgrifCode Review questions generally follow the form: I have implemented code, which, given X input, will return Y output. How can it be improved? To which simply the following is an acceptable answer: You have written a lot of code, but did you know function F in the standard library alrea...

Downvote away.
And someone edit in the unpopular opinion bear.
1
A: Checking if a number is divisible by 9

MalachiI wrote this in C#, but seeing as how we aren't using anything to fancy I think it should function the exact same way in C I really didn't like the way that @Edenia wrote the code, mine is like her's, only I think it is much cleaner and straightforward public static bool isDivisibleBy(int n...

@Malachi Sorry, but I have to downvote that one because C# on a C question with plenty of C answers...
 
@nhgrif I want to give an update thru chat but not in answer
@200_success Can I avoid this code in insertItem()?
if(this.rest() == null){
				return new Sequence<T>(this.first(), new Sequence<T>(item, null));
			}
 
Again, this would be best done on the answer itself. Either you are wrong and the answer will now benefit from an explanation of why that's not the case, or you are right and the answer will now benefit from an edit to fix its problem.
If there's a long explanation, then he'll probably ping you here for it.
 
@nhgrif - a real example of a crap requirement is this: codereview.stackexchange.com/questions/84774/…
See the last line of the Q
 
2:28 PM
I agree.
I don't even strongly feel that this divisible by 9 should be closed necessarily... but if I had to guess...
"don't use regular expressions" is probably code for "I don't understand regex"
In which case, it'd be better stated as "I'm not very familiar with regex, so if you use regex can you please explain in detail how this is working?"
Does C++ have a built-in Linked-List?
 
@nhgrif The Standard Template Library has a number of collections that may or may not rely on linked-lists as their underlying implementation
The interface is given as a series of performance metrics and usage functions rather than details about underlying data structure
 
But you can safely assume that std::list and std::forward_list are linked lists.
 
Yes, but strictly speaking it's not required
 
2:49 PM
2
Q: Equalizing heights

jasonbradberryI'm running a jQuery function to equalize heights. I want to equalize the heights of several pairs of elements, and can't think of a way to do so without repeating the whole function. How can I combine the separate functions below into one function that equalizes the heights of each pair of <div>...

I can't believe no one mentioned a css selector here
monking btw
 
Does my while loop not work for a beginner?
 
Damn I have no electricity
 
But you have internet.... ;-0
 
yup
 
@Malachi I think answering a C Q with a C# answer is considered -1-able
 
2:54 PM
USB Dongle and laptop
 
@rolfl That's pretty sharp.
 
@JaDogg Well, let me tell you about what happens in my house when the electricity goes out ....
 
I have to admit. Overused jokes are not fun anymore :/
 
Monking?
 
No matter what one should have more than one way to connect to internet, and I have 3 connections.
 
2:56 PM
0
Q: Gamebord checking stones in all directions - need help to refactor

VahxI am creating a game called Othello, the objective of the game is to close in your opponents stones either horizontal, vertically or diagonally. All the stones that get closed in are then turned to your color. Win the game by having the most stones of your color. Small example: b = black w = whi...

 
@rolfl Yes
Ah Electricity is back
 
@rolfl Nope, the one about sharp, C# and stuff...
 
13
Q: Checking if a number is divisible by 9

kapil.thakarI tried to develop a new way to check if a number is divisible by 9. I have written my code and it is working fine. I'm not allowed to use *,/ and %. int isDivby9(int x) { int status = 0; int divby8 = 0; int orgx = x; if(x>=9) { divby8 = x >> 3; ...

^ is maths tag appropriate
 
@JaDogg It may use number theory lemmas, so why not.
 
Does the while loop at the end not compile in C?
 
3:05 PM
3
A: Convert a 24bit bitmap to grayscale

JaDoggI also thought how I could improve my code further. Readability First Convert, this #define xIndex (blockIdx.x * blockDim.x + threadIdx.x) #define yIndex (blockIdx.y * blockDim.y + threadIdx.y) unsigned long dataIndex = (xIndex + (yIndex * width)) * PIXEL_SIZE; #define BLUE bitmapData[dat...

@Morwenn you know C right ?
6
Q: Convert a 24bit bitmap to grayscale

JaDoggI wrote this so I can learn CUDA. This is coded to work on my laptop's Nvidia GeForce GT 540M. Main points I need reviewed: CUDA programming conventions Performance, especially kernel speed C programming conventions Preprocessor and macro conventions Making it DRY kernel.cu /*************...

 
 
If you have some time could you please review it
 
@JaDogg Well, I know C, but ever used Cuda.
 
Right, that's my file-server.
 
How many TBs ?
 
3:08 PM
7 HDD's 2@4TB (top 'inside'), then 3 3TB's, and 2 2TB's.
21TB
8-core AMD CPU, and 16GB RAM
"Silent" graphics card, low-spec, heat-sink only.
 
Why do you need 16GB RAM for a file server ?
 
additional SATA card
caching.
 
ah, I see
 
How much power does it draw?
 
panabox:~# free
             total       used       free     shared    buffers     cached
Mem:      16415476   14952576    1462900      11536    6960132    1815324
-/+ buffers/cache:    6177120   10238356
Swap:     16756732     385488   16371244
I run it off a 650W powersupply
Also, @JaDogg - there's a 80GB SSD in there
hard-disks are relatively low power consumers... in the order of 20W, the CPU is 100W or so. I think my budget, at high use, is about 500W.
 
3:12 PM
Great I have no electricity again
 
So, I have configured all the storage as RAID arrays for the HDD's.
 
I'm more interested in average use
 
I expect it sits around 100W or so.
 
what is the OS?
 
Ubuntu 14.04
I have "operating system" data, "valuable" data (things that are mine, can never be downloaded, etc. - photos, videos, code, emails, documents, etc.), "media" - ripped CD's, torrents, PVR (MythTV recordings, etc.), and finally "Backups".
Each of these things has dedicated space.
OS is on the SSD
Valuable is on a RAID5 array of three 3TB drives
"Media" is on a RAID0 array of 2 2TB drives
Backups is on a RAID1 array of 2 4TB drives.
in each case, the data is actually managed by what's called the LVM, the logical volume manager.
 
3:17 PM
oh
 
what that means is that the drives are really only 'virtual' space. I can add more drives, and use 1 command to 'move' the data on to the new drives, and have no downtime.
The filesystem is on the logical drive, not the physical drive
 
Some days I think your server stores nuclear launch codes or something ^^
 
What is the HDD Brand ? Seagate WD ?
 
Whichever has the longest warrantee.
At the moment I have WD Black editions, 5yr warrantee.
I don't get it because of the warrantee, I get it because, in theory, they last longer
Those are just the new disks. I also have Seagates, and others.
disk reliability is a crapshoot anyway
2
With the LVM in place, if a disk dies, I buy some replacementrs, create a NEW RAID array for them (about 2 minutes of downtime to install the new disks....).
then, I build the RAID array, this takes 10 minutes to get going...
then I tell the LVM that the new RAID array is "space" it can use, and tell it to relocate the data from the old disks to the new disks.
that can take most of a day.
when it is complete, I tell it not to use the old disks any more.
then power-down, and remove the old drives.
Two things to note here.... 1. yes, one of the old disks is broken, 2. the data is still there... on the other disk....
So, in the event of a drive failure, I get an e-mail immediately (often before the disk breaks - thanks SMART).
I go out and buy more disks, do the process, done....
about 5 minutes of system downtime, and no additional interruptions.
 
@Edward Hey, you eventually found a kick-ass algorithm :p
 
3:25 PM
How many times did that happen so far ?
 
Well, let me show you another picture......
 
0
Q: My LiveDateTime Object v2

Kid DiamondThe following JS code object displays the date and time and updates whenever it changes. I'd like to have a full review on any aspects of my code. Any suggestions for improvement are always welcome! LiveDateTime.js 'use strict'; function LiveDateTime(startTime, dateElement, timeElement, opti...

 
@Morwenn I didn't invent it, but yes, it was satisfying to find it!
 
You see that shelf on the right, with all the disks?
 
@rolfl So you're like sitting next to the server after you received the e-mail with a disk in your hand, waiting until it breaks?
 
3:26 PM
@Edward How many of us have actually invented new algorithms for basic tasks out there anyway? ^^"
 
All the disks to the right of the DVD drive are broken....
@skiwi No, if I get SMART errors, I replace asap.
replace before it breaks.
 
my backups are old school -- temporarily install a drive, copy stuff, remove drive
 
I have 2TB of photographs (200,000 of them) that I can't even imagine losing.
 
@Edward Same for me, only I connect my drive via USB 3.0.
 
Well, have I described my backups yet? //// ;-)
See, having RAID and so on, is not having backups...
 
3:29 PM
@rolfl How much does/did your system cost?
 
And how much room does it take up?
 
While RAID can help delay catastrophe, it's not going to help you if you accidentally do: rm MyFavouritePicture.jpg
or, worse, file->save-as->existingfile.jpg.
 
@skiwi I've heard Germans are like that too.
 
@rolfl Not having a backup is one way to learn to stop doing that... But not really a good way
 
3:30 PM
They were discussing it over on Travel.
 
panabox:/valuable# du -sm *
0       gallery23_cache
45899   gallery-cache
480090  home
1       lost+found
21      mysqlbackups
82701   netshare
1947097 pictures
84989   picxfer
184     versioncontrol
1012    webdav
1       webdav.digest_pw
1       webdav.temp
259     workpictures
3538    www
The contents of what I consider to be valuable.....
0.5TB of user data, 1.95TB of photos.
 
@rolfl Windows will warn you if you do this, not sure about others - probably.
@rolfl Don't use the rm command on pictures ;)
 
Well, the drives are exported as "Shares" on other computers, etc.
 
Samba ?
 
Do you use "git" or "cvs"?
Yes, Samba
 
3:32 PM
git
 
Why?
Surely only the most recent stuff is important?
no need for history, and you don't ever need to make a mistake, right?
In practice, accidents happen, etc.
 
I once wiped my drive (for fun) without realizing my backup wasn't working.
 
GitHub is where all my valuable stuff is at, all work stuff is at work servers
 
And the people at work don't need to back up the github repo, right?
 
I was using the built-in backup service in Windows, but my file tree was too big, so all the backup had was a bunch of empty folders.
 
3:34 PM
^^^ Why windows sucks.
there are so many problems in that one sentence.
 
They fixed it somewhat, but last time I tried, it had a different problem.
That was over a year ago...
 
Anyway, I take a backup of all the 'critical' systems every hour, on the hour.....
 
Almost 2 years ago.
 
@rolfl Their git server, no Idea even if it is backed up, glad the local clone is a full copy.
 
So, for example, occasionally I change files in /etc/ and I need to go back to an old setting, well, I can.
Backups schedulked are:
panabox:/snapshotng# ls
cp.sh  etc  fawcet  gallery22  gallery_cache  home  local  lost+found  mysql  netshare  opt  pana  pictures  root  slapd  versioncontrol  webdav  www
so, for example, in /snapshotng/etc, I have:
panabox:/snapshotng/etc# ls
etc.2009.03.31.19.30  etc.2014.01.01.01.17  etc.2014.10.01.00.17  etc.2015.03.16.00.17  etc.2015.03.24.00.17  etc.2015.03.26.18.17  etc.2015.03.27.03.17  etc.2015.03.27.12.17  etc.2015.03.27.21.17  etc.2015.03.28.06.17        trash.etc.2015.03.26.10.17
etc.2010.01.01.00.01  etc.2014.02.01.00.17  etc.2014.11.01.00.17  etc.2015.03.17.00.17  etc.2015.03.25.00.17  etc.2015.03.26.19.17  etc.2015.03.27.04.17  etc.2015.03.27.13.17  etc.2015.03.27.22.17  etc.2015.03.28.07.17        trash.etc.2015.03.26.11.17
 
So, I can go back to the state of my /etc folder at various points in time... with a stronger focus on the recent snapshots.
Yeah.
Hmmm... upgrade stopped /etc?
Nope, there it is....
drwxr-xr-x 185 root root  12288 Mar 22 13:52 etc.2015.03.28.09.17
drwxr-xr-x 185 root root  12288 Mar 22 13:52 etc.2015.03.28.10.17
drwxr-xr-x 185 root root  12288 Mar 28 10:48 etc.2015.03.28.11.17
the dates are interesting because they only record changes.....
so there were no changes in /etc from Mar 22 to today (I recently did a few component updates - sercurity fixes).
Anyway, you get the idea.,
 
Yup
 
Then I have my network......
Not pretty
 
Have you used snapper ?
 
Nope, don't know snapper
That looks like a system config backup only... right?
 
3:46 PM
yes
I'm glad I used it before installing bumblebee on my laptop
 
lol, this is awkwardly true when talking about food
Dutch people like to either:
a) mash the hell out of something,
b) boil the shit out of something, or
c) deep-fry the life out of something!
 
Is that a cisco router or a switch ?
 
18 mins ago, by Hosch250
@rolfl How much does/did your system cost?
Switch.
@Hosch250 - not as much as you would think.
 
Do you also have compiler server (s) ? you know to compile stuff faster ?
 
Hello.
 
3:50 PM
The case was about $200, power about $100, SSD about $100 (but cheaper now). MOBO $100, CPU $200, memory $150, then about $250 per disk
make it $2500 .... about the price of a Mac (hehehe)
@JaDogg I don't compile much on it (at least, not much of significance).
Note, the primary function of that machine is file and network management.
It does web-serving, file-serving, it allows me to SSH in from the net, and do e-mail, etc.
the tuis.net domain is hosted on it.
 
ah thought so
what does tuis stands for ?
 
It translates as "home".
@home.net ... essentially
 
@rolfl Oh damn, I never noticed that
It should've been obvious for me
 
^^^ yup
 
I never spoke it out loud though, then it would be obvious
 
3:54 PM
also, who doesn't want a 4-letter domain name ;-)
 
Did that cost more than the machine itself ?
 
0
Q: Making conditional logic consistent with functional programming approach

Jacob MortensenIn order to learn both scala and functional programming, I've been rewriting the projects from my introductory CS class in scala. One of the projects was a plinko game, where the user picks a slot to drop a token into and then the path that the token took and the money won from the end slot is pr...

 
nope... regular $30 per year or so.
 
@rolfl Unfortunately cannot afford a TLD?
 
I can have a house, or I can have a TLD... let me think .....
3
 
3:56 PM
I have this only $3 for first year simpll.info
 
Regardless, that tuis.net happens to be something I am locked in to... the thought of having to relinquish that is... troubling.
I have many accounts, not just for me, but the whole family, etc.... and then certificates, and groupid's in maven, etc.
@JaDogg - I should also note that it only works because I have a static IP as well.
 
Does other family members have maven group ids too ?
 
Nope. just me.
But, they have 'netflix' ... ;-)
That 'snapper' looks interesting, but solves a different problem than what I have.
I like the automatic every-hour behind-the-scenes backups.
 
and it only cost you ? 300$ ?
 
$30, not $300.
the static IP is from my ISP, and costs an additional $8 per month
 
4:01 PM
I thought your internet + netflix cost 300$ ?
 
no, the domain name tuis.net costs $30 per year.
 
I'm also having a static IP, but I never paid for it... so I guess there's no full gaurantee on it?
 
ah right
mixed it up
 
My internet also drives my VoIP "land line", and (in Canadian dollars), I am paying $81 (taxes included) a month, for: 25/10MBit ADSL, static IP, phone service (including world-wide no-cost)
substantial cap on that (400GB per month).
(and bandwidth used between 01h00 and 08h00 is not counted)
 
ah
 
4:05 PM
Add $8 per month for netflix, $25 per year for a "listings service" I use for MythTV (get program details and schedules), and $30 for the domain name.....
 
I have like 35GB for a month 1800Rs (15$), 5GB for about $3, and unknown amount for free(office dongle)
 
$1000 per year for all my telecommunication and entertainment needs..... for the family.
 
Maybe I could take out my Gray code stuff from POLDER and propose it as Boost.Gray. It could be interesting to see where it can go.
 
I'm going to watch some TV, thanks for the chat rolfl. Catch you later.
 
Oh, no problem.,
@200_success - happy anniversary ;-)
Hopefully they both will "upgrade" from "pro tem" to "elected" before they earn [badge:constable]! — Mat's Mug Mar 28 '14 at 19:37
@Mat'sMug ^^^ .... hmmm
@Morwenn - That would be: (oh, and congrats).
 
4:29 PM
@rolfl Guess I'll let it be a bit more mature beforehand. It doesn't do anything really useful besides the conversions for now x)
 
My understanding of the need for Grey Codes in typical computational situations is... limited.
So much so, I call it Grey, and not Gray
But, approaching the Boost community is probably a good way to get feedback on the use cases as much as the implementation too.
 
It is indeed limited. I guess that it's mainly used in communication for error checking.
 
> Today, Gray codes are widely used to facilitate error correction in digital communications such as digital terrestrial television and some cable TV systems.
^^^& Not as limited as I thought
 
> Technology has allowed Dutch people to get even further ahead in war-on-weather. Its no surprise that one of the most popular iPhone apps is actually Buienradar –a weather tracking system, showing you nice little rain clouds above the outline of the Netherlands, predicting the exact time it will rain and for how long. Now yes, I will admit, that the Buienradar app may have somehow made it onto my iPhone, and may have somehow been frequently checked….but I digress.
People in other countries also check when it is (possibly) going to rain, right?
 
4:44 PM
I don't have to. Where I live it always rain.
 
@rolfl eh, we had the announcement at least!
@rolfl depends how many shades
 
> In those silent shades of grey
I will find a place
to escape the endless night
to find a new sun
 
0
Q: (FORTRAN)*** glibc detected ***

alemonkI have some glibc error like ;* glibc detected * double free or corruption (out): 0x00000000005099d0 *** In my code, when I compiled it with n = 10, it works well, but not with other numbers like 9,11 29.. Since I am in a beginner level for coding, I have not been able to make progress more. C...

 
5:09 PM
And it works, but I have this error. <-- that is an indication that it does not work to the level required to be on-scope on Code Review. You need your code to be working correctly before it is on topic here. — rolfl ♦ 29 secs ago
Sometimes.....
 
0
Q: Lightweight localization

MatthijsI had been trying to find a suitable solution to implement localization in my Phonegap/Cordova application. My search proved that any localization through seperate .xml or .json files was a nightmare (mostly due to cross-access-origin). Because of this, I decided to create a (very) simple, light...

0
Q: why doesnt my code work

Patrick Fijalkowskiwhy doesnt my code work :( i am using python 3.0 and my intention is if someone types in the word it will print something and if they type the wrong "word" it will deny access to them but if they type the right thing they will gain access hacker = ("we have reported you now , good bye") tim = ...

 
5:28 PM
Well, this is bad. When a control gets to this code then odds are indeed not good that it won't bomb, especially so when exiting. It is not getting cleaned-up the normal way, getting disposed when the host form closes. In other words, you have a "leak". Could be that you are removing it with Controls.Remove/At() or Clear() and forgetting to dispose it. Could be another bug in your program causing it to bomb, then triggering this one. You need a code review and a talk with the user. — Hans Passant 56 secs ago
 
@rolfl For UScale, is using Apache commons math an option or should I aim at reimplementing some wheels?
 
@SimonAndréForsberg The additional dependency is not ideal, but, if the math is needed, then it's probably worth pulling it in, and then ddeciding later.
The code has the same license, so, with attribution, if it's just a bit, we can just copy/paste it.
if it's a lot, we can 'assemble' with it
 
The Gauss–Newton algorithm is a method used to solve non-linear least squares problems. It is a modification of Newton's method for finding a minimum of a function. Unlike Newton's method, the Gauss–Newton algorithm can only be used to minimize a sum of squared function values, but it has the advantage that second derivatives, which can be challenging to compute, are not required. Non-linear least squares problems arise for instance in non-linear regression, where parameters in a model are sought such that the model is in good agreement with available observations. The method is named after the...
^^ that is the algorithm I plan on using
I implemented something like this in Matlab about 4 years ago. But that was in Matlab. And four years ago.
 
Well, this is bad. When a control gets to this code then odds are indeed not good that it won't bomb, especially so when exiting. It is not getting cleaned-up the normal way, getting disposed when the host form closes. In other words, you have a "leak". Could be that you are removing it with Controls.Remove/At() or Clear() and forgetting to dispose it. Could be another bug in your program causing it to bomb, then triggering this one. You need a code review, a memory profiler and a talk with the user. — Hans Passant 27 secs ago
 
Matlab supports a A \ B operator, which 'magically' solves a linear equation system.
I think I will start to use Apache Commons and see if I can get something to work at first at least.
 
5:35 PM
that...
I pushed a commit a little earlier... split the example usage from the implementation
 
What's UScale?
 
yesterday, by Simon André Forsberg
2 hours ago, by Simon André Forsberg
@rolfl many people seem to have problems knowing what the complexity of their code is. I figured that by providing a void doSomethingToFindComplexity(int n) method, and in that method create an input and sort it using some algorithm or whatever, it would be possible to estimate the actual complexity of the code.
 
@SimonAndréForsberg That's... interesting
What is your approach going to be?
Count the number of for-loops, recursions, etc.? Or something different
 
12 mins ago, by Simon André Forsberg
The Gauss–Newton algorithm is a method used to solve non-linear least squares problems. It is a modification of Newton's method for finding a minimum of a function. Unlike Newton's method, the Gauss–Newton algorithm can only be used to minimize a sum of squared function values, but it has the advantage that second derivatives, which can be challenging to compute, are not required. Non-linear least squares problems arise for instance in non-linear regression, where parameters in a model are sought such that the model is in good agreement with available observations. The method is named after the...
run-time inspection, not compile time.
not planning on analyzing the source.
only analyzing actual benchmarked data
 
5:47 PM
Hmm, that's going to be difficult to measure, I'd say
Are we both talking about O-complexity though?
 
Because the measure in itself is potentially not relevant, take 100nlogn vs n^2 as example
 
@skiwi I believe it is still relevant though. Depending on the value of n, it is relevant.
 
6:07 PM
0
Q: Meteor Form Submission

fire_waterHello fellow Meteor developers. I am hoping a Meteor guru can please review my code below and verify if I am making proper use of return false and event.preventDefault(), especially in the context of form submission. The reason being, the Meteor docs use this approach: // Prevent default form s...

 
@skiwi - the assumptions are:
1. the user wants to get "some idea" of the scalability (not the complexity), by varying a single input.
2. it does not need to be accurate, just "useful".
and 3.. it's OK to be wrong, or to say "I don't know".
Frankly, a graphical plot of: "this is how your function scales relative to variable X, and this is how other common functions scale...." would be really useful
....
so, given, for example, the function that produces random data in an array:
    private static final int[] randomData(int size) {
        Random rand = new Random(size);
        return IntStream.generate(rand::nextInt).limit(size).toArray();
    }
We can sort the data with:
Arrays.sort(data);
what is the plot/complexity of the arrays.sort data relative to different input array sizes...?
 
        UScale.scale((data) -> {
            Arrays.sort(data);
            return 0;
        }, scale -> randomData(scale), true).report();
two functions, one does the work, the other supplies data for given "scales".
run the work function for different scales, and plot/match the output
 
0
Q: In C, print input one word per line

runners3431I'm doing K & R C Exercises. I could use a code review to see how I can improve my logic. "Write a program that prints its input one word per line with getchar." My basic idea is we need to know whether or not we're in a word. We use the IN status. Every time we hit a blank space, tab, or...

 
6:31 PM
Monking
 
Hey Phrancis.
 
@Edward Still there?
 
Anyone know a way to convert an e-book to PDF? Or is this even allowed? (Copyrights and such)
Would like to be able to just tab between Java book and Eclipse instead of having the iPad out
 
If you already have working code and would like to others to offer their opinions and/or suggestions, you will be better of moving it to the Code Review site. — PM 77-1 22 secs ago
thanks .. for some reason didn't Code Review — ANM 1 min ago
I'm voting to close this question as off-topic because OP is asking for a code review/suggestions to improve — Yatrix 1 min ago
 
6:53 PM
1
Q: Calendar in HTML + CSS + JS - Improvement suggestions

ANMAs I'm new to HTML + CSS + JS I've been building a calendar (which I think anyone can use as a basis) but would like to get your suggestions on how I could improve my code specifically from the perspectives of: Adherence to best practices in HTML + CSS + JS. Usability. Browser compatibility. ...

 
@rolfl A graphical plot would be a cool feature indeed
@rolfl Is something of it already implemented?
hey @Phrancis
 
Runing that code outputs:
Scale    1 ->       34 (count 100000)

Scale    2 ->       31 (count 100000)

Scale    4 ->       40 (count 100000)

Scale    8 ->      266 (count 100000)

Scale   16 ->      103 (count 100000)

Scale   32 ->      366 (count 100000)

Scale   64 ->      460 (count 100000)

Scale  128 ->     1104 (count 100000)

Scale  256 ->     2165 (count 100000)

Scale  512 ->     5418 (count 100000)

Scale 1024 ->    11035 (count 90618)

Scale 2048 ->    70639 (count 14157)

Scale 4096 ->   164892 (count 6065)
34 nanoseconds to sort size-1 array...
5418 nanos to sort 512-size.
33806584 nanoseconds to sort half-million
(and it was able to use that time as the average of 30 runs completed in 1 second).
 
Yeah, but I want to specifically seed the values so that all tests produce the same sequence for the same size input.
 

« first day (693 days earlier)      last day (3329 days later) »