« first day (624 days earlier)      last day (3387 days later) » 
00:00 - 23:0023:00 - 00:00

12:00 AM
[skiwi2/HearthMonitor-LogReader] 1 commits. 0 issues opened and 0 closed
[skiwi2/GithubHookSEChatService] 0 commits. 0 issues opened and 1 closed
 
a bit over halfway
TTGTB!
 
See you
 
see you all tomorrow
 
Thanks, somebody.
Hit 1.9k.
 
"somebody" probably says you're welcome ;-) ok now I'm really gone
 
12:07 AM
 
@Duga definitely not one of the most productive days I've seen...
 
12:19 AM
@JeroenVannevel This is what I cooked up:
0
Q: Handle Settings in Windows App

Hosch250So, I fixed my problem with a public ViewModel for my MainPage like this: MainPage.xaml.cs: private static MainPageVM Data = new MainPageVM(); public MainPage() { this.InitializeComponent(); SettingsPane.GetForCurrentView().CommandsRequested += OnCommandsRequested; this.DataConte...

Now I don't need to have a public MainPageVM.
 
0
Q: Handle Settings in Windows App

Hosch250So, I fixed my problem with a public ViewModel for my MainPage like this: MainPage.xaml.cs: private static MainPageVM Data = new MainPageVM(); public MainPage() { this.InitializeComponent(); SettingsPane.GetForCurrentView().CommandsRequested += OnCommandsRequested; this.DataConte...

 
1:09 AM
0
Q: BDD: Mocha + should.js, testing for node

MisiurI'm new to the world of BDD, but I'd like to get a grip of it as soon as possible. It's one of my first tests: Fluent.js 'use strict'; var Fluent = module.exports = function Fluent(context, chain) { if (this.constructor === Fluent) { throw new Error("Can't initialize an abstract cl...

 
1:37 AM
0
Q: Communicating messages to objects

Johnathon SullingerIn my MUD game engine, I built a messaging api that allows objects to subscribe to concrete implementations of an IMessage interface. Is there anything glaringly bad about the approach I have taken? The intended use-case is for objects, such as an IPlayer implementation, to subscribe to WhisperM...

 
2:07 AM
0
Q: simple self made encrypter

riyokenThe following code: import random def keygen(): l = list('abcdefghijklmnopqrstuvwxyz123456789!@#$%^&*()_-+={}[]|\:;?/~`"" ') random.shuffle(l) return l def encrypt(x): key = keygen() #or a static key for consistency y = list('abcdefghijklmnopqrstuvwxyz123456789!@#$%^&*()_-+...

 
2:28 AM
0
Q: Making prime (sieve) code faster and able to run on big numbers

CPlusProgrammerFor an input triple (a, b, c), the task is to count the number of integers in the inclusive range [a, b] which have c distinct prime factors. This entails factoring each of the numbers in the range [a, b] and establishing how many distinct prime factors each has. I need faster code so my program...

 
 
2 hours later…
4:52 AM
 
5:28 AM
0
Q: Little confused about Adapter Design Pattern

quartaelaI am trying to learn Adapter Design Pattern via tutorials. Moreover, I see a lot Adapter classes at work but it seems that they are not applying Adapter Design Pattern in correct manner. As far as I understand we are trying to initialize a third party API's (Adwords API) object from our object fo...

 
 
1 hour later…
6:48 AM
0
Q: Replace CASE WHEN ISNULL(MIN(COALESCE(MP.NewPrice, MP.Price, 2147483647)),0) with something make more sense?

user960567During checking my SPs today I found that I have, SELECT COUNT(*) ,CASE WHEN ISNULL(MIN(COALESCE(MP.NewPrice, MP.Price, 2147483647)),0) = 2147483647 THEN 0 ELSE ISNULL(MIN(COALESCE(MP.NewPrice, MP.Price, 2147483647)), 0) END FROM MerchantsProducts MP I need to replace this something which ...

 
7:25 AM
0
Q: Text-based Snake game in window platform

MORTALhow to improve this game #include <iostream> #include <deque> #include <vector> #include <chrono> #include <random> #include <conio.h> #include <Windows.h> #include <tchar.h> using Matrix = std::vector<std::vector<int>>; namespace { HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); CON...

 
7:46 AM
0
Q: Find Missing Numbers in an int list

kmr159I have an alternative algorithm to the same problem: Finding missing items in an int list My implementation includes optional min and max bounds to selectively fill in the list. The linked implementation is much simpler My Questions are: How do our two algorithms compare, efficiency wise. B...

 
8:42 AM
0
Q: StringBuilder vs String, what would be better if we consider readability and perf

op_amp public static string GetUserAgentInfo() { if (_uaInfo == null) { string carrier = DeviceNetworkInformation.CellularMobileOperator ?? "(No Network)"; var sb = new StringBuilder(); sb.Append("device-type=mobile"); sb.Append(";os=W...

 
9:34 AM
Monking @all
Is SE down ?
 
We are investigating a routing issue with our network provider
We have enabled Cloudflare for http://stackoverflow.com while solving the routing issue. There are known SSL issues but it should help.
 
@DJanssens Thanks, now it is working ;-)
 
yes Ifixed it
:D
 
10:36 AM
The routing issues should be resolved now. Sorry for any inconvenience.
We are investigating why egress traffic was being dropped and will have a postmortem up once we get more information on the upstream issues.
 
0
Q: fatal error: unexpectedly found nil while unwrapping an Optional value

user63255I am trying to learn swift by making a piano app. When I try to run the app, I get an error: fatal error: unexpectedly found nil while unwrapping an Optional value The ViewController.swift file is below: import UIKit import AVFoundation class ViewController: UIViewController { let pianoKe...

 
11:43 AM
@CaptainObvious Off-topic.
 
12:15 PM
-1
Q: c program to find

user63261Create a structure “Point” as followed : struct Point { int X; int Y; struct Point *next; }; Create two structure pointers, allocate them dynamically and find distence between them using a function. Create another structure struct Triangle { struct Point P1; struct Point P2; struct Point P3; };...

 
12:27 PM
Monking
 
Monking
 
12:42 PM
Monking
 
Anyone willing to run an experiment for me?
 
What kind of?
 
Add a comment to one of your own questions that I have never participated in.
In the comment, 'ping' me with @rolfl
Rumour has it that you can 'ping' a moderator (even if the tab-completion does not work....).
 
Huh, can I not always ping everyone in comments?
 
You can normally only ping people who have participated in the post somehow.
So, for example, on this question: codereview.stackexchange.com/questions/77392/…
What if you add the comment Test request for @rolfl as asked in chat.
(I really need to create myself a puppet account...).
 
12:51 PM
Let's see
Test request for @rolfl as asked in chat. — skiwi 6 secs ago
Was troubleshooting my dad's pc (my old pc) issues...
 
no ping :(
 
It had lots of trouble booting up, and seemingly due to it not recognizing the CD/DVD drive
Unplugged everything for now and it works fast again
 
OK< it appears to only work if the mod closed the question, which I won't make you do ;-)
Thanks, I'll delete the comment now....
@skiwi That's a good find. Nice troubleshooting.
Many people nowdays, even computer people, can't figure out their computer internals.
 
Hardware is too low-level.
 
Apart from the laptops I use, I have "built" all my computers.
Hey Morwenn, I did not respond to your monking earlier.
 
12:58 PM
Don't worry about that :)
 
@rolfl It still has the old fashioned BIOS, and it showed 6 ports with 3 devices... and figured it was taking 20 seconds to recognize that there was a CD/DVD station
Later when verifying HDI pool data it would hang or something
Only if it couldn't recognize the CD/DVD station, then it would actually boot up
and last time it booted it recognized the CD/DVD as a harddisk and I decided to just unplug the thing
@rolfl No problem
 
If I were you, I would find a spare CD/DVD drive, and swap it in.
 
I'm also not very PC-savvy... I know how most of the internals work, but I barely touch them
The CD/DVD was still working though, as in it had the power to open/close
 
That way you can ID whether it's the drive that's faulty, or the board.
If it is the board, then consider replacing it soon. A failing board can do ugly things to your life
 
Or find another port to test it on... but it's a mess of cables down there (850W PSU with always connected power cables)
I don't know if the board is failing, seems to be just the SATA hub? Somehow the boot SSD is not even connected to that hub
 
1:06 PM
Regardless, I would feel better id I knew which end of the connection to blame.
 
1:27 PM
True
But I'm a true Software Engineer, so I'm lazy
 
-1
Q: Strategy to reduce duplicate code in many similar modules

The Worker AntThe Situation So I have created some code in the form of modules that each represent a medical questionnaire (I'm calling them Catalogs). Each different questionnaire has it's own module as they may differ slightly in their content and associated calculations, but are essentially made up of simp...

 
Morning
 
1:43 PM
hey @JeroenVannevel
I'm confused...
try {
    //code
} catch (ClosedByInterruptException ex) {
    closedByInterruptExceptions.incrementAndGet();
} catch (Exception ex) {
    exceptionReference.set(ex);
}
If it is a ClosedByInterruptException, then the last catch shouldn't get executed, right?
 
I have to go.
See you later, dear dragon brothers of the rising sun in the morning over a cloudy hill.
 
0
Q: C++11 technique to destroy classes and mutexes used by several concurrent thread

Balázs KreithI would like to get some advices and reviews regarding to the following codes: Code 1: class A{ public: A() {} ~A() { std::lock_guard<std::mutex> lock(mutex_); } void Process(){ std::lock_guard<std::mutex> lock(mutex_); //do something called several process simultaneously }...

 
2:14 PM
afternoon everyone :)
 
0
Q: what is the best way of returning a value from function?

Bayant_singhWhat is considered to be a good programming practice for returning value from the function, for example if we have a function in C named list* after( list *node) which returns the node which is after the node pointer. Here we have the first option:- node *after(node *first_ptr, node *nod_ptr) { ...

 
Thank you Santa (is that the correct sentence? :D)
 
1
Q: Classify values depending on predicates C#

SanciI've to do a generic method Classify that, given a sequence of elements of type T and an arbitrary number of predicates, returns a list of n+1 arrays (where n is the number of the predicates). More precisely, if the element satisfies the first predicate then it is added to the first array. If not...

 
2:40 PM
@skiwi correct
 
@JeroenVannevel Thanks, figured it out as well eventually... Turned out that the exception was an UncheckedIOException, but it was printing out that it was a ClosedByInterruptException because I accidentally printed the cause
 
Monking @fellas.
 
0
Q: Is the [Linq] tag appropriate if the code doesn't use Linq?

RubberDuckThis question raises my question. Classify values depending on predicates C# The code in the question doesn't actually use any linq. OP simply believes there may be a solution using Linq that is better than theirs. Is this an appropriate use of the tag? On one hand, I would think not, beca...

 
0
Q: Circular Queue using Linked List

MikeI want to create a circular queue using linked list,also i want to create instance of that data structure(queue) not just one queue, many queues without repeating the code. this is what i came up with... #include <stdio.h> #include <stdlib.h> struct queue { int info; struct queue *next; ...

 
0
Q: Circular Queue using Linked List

MikeI want to create a circular queue using linked list,also i want to create instance of that data structure(queue) not just one queue, many queues without repeating the code. this is what i came up with... #include <stdio.h> #include <stdlib.h> struct queue { int info; struct queue *next; ...

tricky question that one... works in one compiler but not the other. Is it on-topic?
(FYI: I clicked "No action needed" because I am bringing it here and will take action later)
 
2:55 PM
Yes, the user has a reasonable understanding it works.
it does, for him.
 
if he uses the correct compiler
Monking btw
 
Just like using the Java compiler will cause problems ;-)
and, yes, monking!
He has code, it compiles and it runs, and produces the right results, for him, and anyone else who uses the right toolchain. I have no problem with that being 'working code'.
 
good good
I also had a good feeling about that question, it felt on-topic.
 
0
A: Is the [Linq] tag appropriate if the code doesn't use Linq?

rolflNo, the tags should describe the features of the code, and not the desires of the asker. If the code uses Linq, then go ahead and tag it. If the asker thinks the code could be done better with Linq, then they are turning the linq tag in to a meta-tag, it's a feature of the request, not a feature ...

 
Any more thoughts about the project you talked about yesterday, @rolfl?
 
3:04 PM
Yeah, I have a few thoughts.... and I have been reading, and playing.
 
0
Q: Add Image to particular location in existing PDF using PdfBox

user3428736While using PDFBox to add image to PDF but it is creating a new Page and it is adding the image. I am using the below code to stamp the image to existing PDF, PDPageContentStream pDPageCS = new PDPageContentStream(doc,pdPage,true,true); List<PDField> fieldList = acroForm.getFields(); ...

0
Q: Design patterns: choose the right handler depending on data type

Neir0Suppose we have an application which process packets from somewhere. We should choose right handler for the packet depending on packet type and also we know that it might be necessary to change algorithm of handlers and add new handlers in the future. So the question how to write maintainable cod...

 
Thanks @rolfl. Done.
 
I realized that I have a convergence of personal goals that can be satisfied by that task, @Simon. I have looked at some of my work demands, and then some of the new emerging techs at IBM, and figured this would be a good opportunity for merging a lot of different streams of thought I have stewing in my head.
This thought process is somewhat incompatible with the idea of throwing it out there, and doing a community project with the common tools at hand.....
To put it in perspective, I have mentioned Bluemix to you before.... but, for work, I am investigating a number of the backend optimizations that can happen there, and I need a project on the front end to use it.
My Java skills are good enough, but a lot of users on bluemix, and the way it is set up, is that it is a web service, and more, but this project would be a good system to put up there, if you can accept that it is a hosted system on IBM technology.
Using Javascript is something i need to do for other reasons,a dn node.js is something IBM is investing in heavily too (optimizing it for IBM Power architecture).
The way you can plug in pretty much any service in the back-end is also useful.
So, a node.js application, with a NoSQL store in the backend, with an express/jade presentation layer and a stateless RESTful implementation will run very happily for $0 and teach me a whole lot.
There have been a few other things I have been wanting to do in terms of hooking up to Stack exchange for various purposes, and the app would be good for that too...
Since node.js uses about 1/4 the resources of the same Java application, it goes a lot further.
 
I don't think I have heard Bluemix. Or was that the IBM variant of App Engine? The one you thought was free at first but wasn't?
 
That's the one. It is free depending on how you look at it. It has a permanent introdictory 'tier' that is no-charge.
 
3:16 PM
will it be a project open for collaboration or are you more intending now on doing it yourself?
 
In other words, althoguh I will have to give a CC number, the CC will not be charged.
Open for collaboration.... and I have reserved the space for it already....
I had to register with bluemix on my personal account, and created an app. I had to give it a name, I went with "StackMonkey".
 
I've never used Node.JS, never used NoSQL, never used Express/Jade. That being said, I've always been open to learning new things.
 
(currently 404, app not turned on).
I was thinking down the road that the stackmonkey would have hooks in to chat, perhaps revivive the CR_Answers room, etc.
 
The best way I got introduced to node was using its package manager/distribution system in conjunction with tools like Grunt/Gulp/Bower and getting a handle on how it works under the hood
 
I once tried Node.JS, but I always wondered how Scalable it is
Doesn't it use a single thread on the server?
 
3:19 PM
It can, but so do many things.
 
instead of having to write an app hosted in node you can use node in conjunction with your c#/java/whatever app
 
There's lots of different ways to use any tech, but node.js is very scalable because it is a single thread.
 
doesn't apache use the full blown multi-core architecture, to be honest I have never looked into it, so I can say BS
 
@rolfl well, the first step you can take for chat hook is @Duga of course ;) Webhook with application/json: http://stats.zomis.net/GithubHookSEChatService/hooks/github/payload?roomId=xxxx‌​
 
22
A: What specifially makes node.js more scalable than apache?

Kevin LeeIt depends on how you use it. Node.js is single threaded by default, but using the (relatively) new cluster module you can scale horizontally across multiple threads. Furthermore, your database needs will also dictate how effective scaling is with node. For example, using MySQL with node.js won...

@DJanssens Node uses single thread to handle the socket it listens on, and it internally uses massive amounts of async-like logic. Whenever you are doing something async, the thread is off doing other things.
 
3:22 PM
hmm
 
The bottom line is that it is very multi-threaded because all real activity happens elsewhere..... (at least, not on the network thread).
 
but If yu have 1k visitors simultaneous, wouldn't that be a bottleneck
 
No, you still only have a single network wire, just so long as you are good on that, you're fine.
 
cool, I never looked in depth into it. But it looked promising
 
If it works for linkedin, it likely will work for us.
 
3:25 PM
It's written in JS, but doesn't it transform the JS into C code?
or am I again wrong in that?
 
Node is compiled down... the V8 engine, I believe. yes
10
A: Why isn't Node.js compiled before runtime?

Steve CampbellSome of Node.js is C++ and is pre-compiled. My understanding though is that there was an effort to keep as much of it in Javascript as possible, but where performance was poor then C++ was used. Node.js would not be possible without the V8 JavaScript Engine, which is what compiles the javascrip...

 
I was looking for a reference too ;)
That list of use-cases is impressive
 
Look, I have messed with node before, a tiny bit.
 
krakenjs.com also looks impressive, never heard of it before, it seems to use node.js
 
ebay - huh
 
3:30 PM
uhu
 
LinkedIn -> On the server side, our entire mobile software stack is completely built in Node. One reason was scale. The second is Node showed us huge performance gains
 
a lot of times node is used to assist in a workflow e.g. compiling js templates, etc...not just for hosting
 
I should look more into it :)
 
Paypal -> Node.js powers our web applications and has allowed our teams to move much faster in bringing their designs to life. We've happily embraced the power of JavaScript
Trello, for those who know it, is all node.js
Anyway, it's something I need to learn.
 
:)
 
3:34 PM
JavaScript and performance.... this whole idea feels very strange to me
 
Rather, it is one part of a system I need to learn, and it's the most likely to succeed and stay free.
And it's an excuse to get something connected up to stackexchange in various ways.
 
@SimonAndréForsberg I always thought that the javascript was transformed in C/C++ code, which would make it doable. But I can't find the reference
 
@SimonAndréForsberg The V8 engine is essentially a Just-in-time compiler for JavaScript.
It is essentially as good as any other compiled system, and is improving all the time
In IBM, the people who write all the compilers are incorporating the V8 systems as well.
 
ok
Hmm... isn't Google using Node.JS as well?
 
If anyone wants to work in the same building as me, come and work on the V8 compiler here: jobs3.netmedia1.com/cp/find.ibm.jobs/CA/…
Yes, they are.
They wrote the V8 compiler.
 
3:41 PM
ah, thought so
 
@rolfl You are canadian? :)
 
And more, yes.
 
cool
 
0
Q: DRY code for sending email with SendGrid

MrBearAndBeerI have this code inside a post route: The first one is to alert me when a user registers on my site: sendgrid.send({ to: "my@email.com", from: "myother@email.com", subject: "[ALERT] " + req.body.eventDate, html: "SOME HTML", }, func...

 
@Simon - "send me everything", or just "push"?
 
3:45 PM
@rolfl everything is more fun :)
 
I think stackmonkey should get its own room.... like other apps, right?
 
Probably.
@rolfl How much C++ experience is required?
 
-1
Q: plz any one tell me the logic behide random function to generate

user63273 i want other function. Without using any library function.Can any tell me how to create random function for string.

 
For the internship? A decent rule of thumb for IBM internships at the "Lab sites", is you should expect to be one of the best in your class. Less than that and its probably not good enough.
 
@rolfl probably yes. it's quite calm here now, but it will probably be crowded here later.
 
3:52 PM
You are not expected to be better than a student would otherwise be.
 
OK, no way then.
 

 StackMonkey

All about the StackMonkey application: stackmonkey.mybluemix.net
 
IBM internship?
 
I only got a little over halfway through Bjarne Stroustrup's book for beginners+.
 
14 mins ago, by rolfl
If anyone wants to work in the same building as me, come and work on the V8 compiler here: https://jobs3.netmedia1.com/cp/find.ibm.jobs/CA/Compiler_Optimization_Developer_‌​-_Internship_%28Markham_ON%29/SWG-0697843/job/
I am not sure that position relates directly to the V8 compiler, but the people in that zone of the building do...
 
3:54 PM
I think it is.
> Study / prior experience in compiler construction and optimization
I have to leave in a minute to go to church.
 
> These positions are only open to students registered in a Canadian University or College program, who have completed a minimum of 2 years of their degree or diploma program, and who must be returning to full-time study upon the completion of the temporary IBM work term.
 
OK, I'm US.
 
I'm not even close to the US :)
 
I seriously don't even know what I'll be able to do when I graduate, and I'm almost halfway done - finishing my sophomore year now.
 
@Hosch250 I hope your church service will be better than the one I went to today.
 
3:56 PM
It is good.
 
It is god.
 
@rolfl I was wondering, as processors/OSes get to be higher bits, do disks have to increase in size too?
Otherwise, wouldn't the processor spend too much time swapping data in/out?
Or is this not related to your work?
OK, TTG. Just ping me if you answer.
 
5 messages moved to StackMonkey
@Hosch250 They don't have to, but it has benefits.
There are a number of technologies coming down the line. Note that the largest requirement for 'word size' on the CPU is addressable memory space. The 2GB (4GB) barrier with 32-bit machines was the real motivator for 64-bit computing. Hard-disks also had 512-byte sectors, and having more than 2^32 of those is a problem... the 2TB limit
The 2TB limit has been fixed by having a 4KB sector size on disks now, which ups the limit to 16TB disks,
Advanced Format is a generic term pertaining to any disk sector format used to store data on magnetic disks in hard disk drives (HDDs) that exceeds 512 to 528 bytes per sector, such as the 4096-byte (4 KB) sectors of the first-generation Advanced Format hard disk drives. Larger sectors use the storage surface area more efficiently for large files but less efficiently for smaller files, and enable the integration of stronger error correction algorithms to maintain data integrity at higher storage densities. Advanced Format is also considered a milestone technology in the history of HDD storage,...
 
0
Q: Code Quality Catch-22 -- Duplication vs Complexity

The Worker AntI've started using Code Climate to assess some of my code quality and ran into a situation that I can't seem to find a good solution for. In short, in trying to solve some code duplication that resulted in a low "grade" by using metaprogramming, I simply get a low grade for code complexity instea...

0
Q: Simple file execution with pyopencl

icoI am trying to use my R9 280 GPU with pyopencl but i cant get it to work as my python and pyopencl knowledge is a bit on the dry side. I wonder anyone help me out or at least direct me to the right direction. Below simple python script reads upload.txt to memory and and tries to match randomly cr...

 
4:09 PM
Note that on 64-bit machines, they have a 64-bit virtually addressable memory space. This equates to.... 16 exbibytes (tebibyte, petibyte, then exbibyte ...).
That's a lot of memory.
On most machines, that memory space is split between physical memory, and swap space, and there's a translation layer between them that allows the phyisical location to be different to the virtual location.
Note that Intel has a flaw in their designs at the moment, that even though there's a 64-bit addressable space, the actual CPU memory controller has only 48-bit address channels to the RAM modules (DDR3, etc.).
29
A: Why do 64 bit systems have only a 48 bit address space?

jalfBecause that's all that's needed. 48 bits give you an address space of 256 terabyte. That's a lot. You're not going to see a system which needs more than that any time soon. So CPU manufacturers took a shortcut. They use an instruction set which allows a full 64-bit address space, but current CP...

What this means is that the physical memory cannot exceed 256TB on intel computers.
You may think that's a lot, but, for example, IBM announced computers yesterday with 10TB of memory....
And, what's worse, is there's this new technology on it's way:
 
I wouldn't be surprised if even consumer PCs soon will use lots of memory
DDR4 was going to be 3D-packed if I remember correctly
 
Im looking for some references for what's public knowlege... give me a moment...
Meh, Phase change memory is old, but it is not used in current architectures.
It is memory that keeps it's value after the power is turned off, like flash memory.
Consider a many-times faster SSD, but plugged in to the memory bus...
Here's a public article that talks about it...:
> IBM X6 systems have been qualified with as many as 32 eXFlash DIMMs (out of 96 maximum DIMM slots per system).
each eXFlash DIMM could be up to 400GB....
that's 12TB of flash on the memory bus, on an intel-based system, in addition to the other 64 available slots for regular RAM
In 2 years or so, at previous growth rates, the memory bus will not be able to address it's available content
Bill gates once said (apparently): 640K ought to be enough for anybody.
 
4:43 PM
@rolfl he did not say that.
 
> jalf recently said (2011) Because that's all that's needed. 48 bits give you an address space of 256 terabyte. That's a lot. You're not going to see a system which needs more than that any time soon
Sound familiar>?
 
@rolfl I thinkt hat the 640K quote was meant to be to last for decades, the 48-bit is a thing that everyone knows it won't be enough in the future, but by the time more is needed, we'll be at the next generation of CPUs with proper 64-bit support
 
Well, truth be known, the reality is that people who will need the >256TB of storage can get there already with server-grade components
 
And apparently the 640K quote isn't even true
 
4:47 PM
^^ told you
 
8 mins ago, by rolfl
Bill gates once said (apparently): 640K ought to be enough for anybody.
^^^ see the apparently, that shows some doubt ... ;-)
anyway, that's not the point. The point is that even crazy limits like 256TB on the memory bus, are not out of the question.
I can't find a specific reference for the IBM Power memory controller physical address space... but I believe it is the full 64-bit.
59 mins ago, by Hosch250
Otherwise, wouldn't the processor spend too much time swapping data in/out?
The difference in latency/throughput between the CPU, it's L1 cache, L2 cache, Memory controller, IO Subsystem, etc. has always been a problem.
This is why, when you have a CPU that runs twice as fast as another one, all that happens is that your CPU spends twice as long waiting for data to arrive.
Many, many optimizations made in high-performance computing relate to reducing load/store operations, and to pre-caching the data needed, or to organize the data in sucha way that it streams through the system and does not need to be accessed multiple times.
Faster CPU's don't make that problem happen, they just make it have bigger consequences.
 
0
Q: Harmonic partial sum calculator with multithreading

Chris TaraziI wrote a program which computes the harmonic partial sum to N terms with multithreading capability. I've been working on this to sharpen my C++ skills for the upcoming semester. Just wondering if there's anything that doesn't follow the C++ standard and/or glaringly wrong. Also wondering if I ca...

 
This is also why memory bandwidth and latency is often considered to be the primary factor in system performance. It directly relates to how much your system sits idle.
It is also one of the reasons that SMT / Hyperthreading often helps, because while your system is waiting to read memory (or worse, IO), it can be doing something else at the same time.
 
5:08 PM
0
Q: Check if array a contains all elements of array b and vice verse irrespective of order

Syed Farjad Zia ZaidiI am trying to check if an Array A contains all the elements of Array B and similarly Array B contains elements of Array A, the order does not matter. Some Examples: A B Result {1} {0} false {0, 0, 0} {0, 0, 0} true {17, 4, 11} ...

 
5:23 PM
0
Q: How do I reattach an eventlistener to new DOM-Elements?

Slim MartenMy problem is that my click callback function only works once and it has propably something to do with the fact that after the first callback, parts of my page will be refreshed with ajax actions. But how can i reattach the event to the new loaded DOM-Elements? this is my function: // DELETE EN...

 
 
1 hour later…
6:31 PM
@rolfl Cool, thanks.
 
6:50 PM
It appears you have fallen through the cracks of what's on topic on various sites. There is not a site for everything, and adjusting your question a bit here would make it on topic. Requiring a 1-line solution is the problem for Code Review. — rolfl ♦ 43 secs ago
making people happy today, not.
 
@SyedFarjadZiaZaidi It still seems contradictory: do you want a "better way" or "the shortest way"? If it's the latter, than you're absolutely right here, but you seem to be asking for good and short code. Which is it? — Martin Büttner 3 mins ago
Also, it appears that he is using some sort of online-automatic-ranking-system.
He's getting one star and doesn't know why.
 
0
Q: Iterate over co-ordinates and correct constraint violations in Python 2

jgreenerSo I am creating an algorithm to take a series of labelled points placed randomly and move them until they fulfil a set of constraints. The constraints have been pre-computed and are each a lower and upper bound of the distance between two points. There is definitely a solution that satisfies al...

 
This question has been edited on Code Review to remove the 'golfing' requirement of a 1-line only solution. That makes it on-topic on Code Review, and it is now reopened there. — rolfl 59 secs ago
 
@rolfl I was considering asking him why exactly he wanted a one-liner.
 
He stated it twice in his post (title and text). I assumed it was some form of hard requirement. Asking him though would have been a good idea.... instead of telling him to go to PCG.
 
7:02 PM
yeah this isn't really a PCG-kind of question.
 
That is one ugly oneliner
The quasimodo of oneliners
 
1
Q: My code has a BFS algorithm in it and I need it to run 10% faster

greenroI am a beginner in programming languages, so I apologise if my code is badly formatted or doesn't make any sense. My code has the ouput I want, but I need it to be about 10% faster. Do you have any ideas of improvements I could make? Here is my piece of code: #include <stdio.h> #include <stdlib.h>...

 
7:36 PM
oops...
I killed explorer.exe and now win+R doesn't work anymore
so I can't start explorer again
 
Ctrl - Alt - Delete? use task manager?
 
Ah yes, that works now
When I said the former my mouse was also frozen
 
1
A: Check if array a contains all elements of array b and vice versa irrespective of order

Syed Farjad Zia ZaidiOK thanks everyone for your help. I have achieved full marks using the following code: public static bool CheckEquality(int[] a, int[] b) { Array.Sort(a); Array.Sort(b); return Enumerable.SequenceEqual(a, b); } As noted by @rolfl earlier less code does not necessarily mean better ...

 
Right now explorer.exe is in a constant loop of crashing and restarting, great :)
 
reboooooot
kill -9
 
7:41 PM
I went away for a bit and it works again
Fun fact is that it would only take me 15 seconds to reboot my pc and also have it fixed
 
0
Q: delete a single record. when i use this program the entire record gets deleted

Miman Shrestha #include <stdio.h> #include <string.h> #include <conio.h> #include <stdlib.h> #include <windows.h> struct student { char ID[15]; char name[20]; char add[20]; char parname[20]; int Class; long unsigned int phone_no; }; struct student stu; int add_student(); void listrecord(); void mod_st...

 
8:05 PM
0
Q: Smartly encrypting strings

Syed Farjad Zia ZaidiI am trying to encrypt the input string using the following rule: 1st Character of string will be increment by 4 ( a will become e ) 2nd Character of string will be increment by 1 ( a will become b ) 3rd Character of string will be increment by 7 ( a will become h ) Rest of the characters will ...

 
I guess we have a CR Convert ^^^
 
8:18 PM
> listen on all interfaces, not just 127.0.0.1
> Add favicon, and some other images
 
duplicate webhooks, @rolfl?
 
The main CR room is limited to pushes only....
 
the other one is 'everything', but I think I will consider removign this one entirely.
 
commit only is fine by me
 
8:20 PM
Fine by me too
2
 
8:36 PM
> Fixes #1 Update welcome page
 
0
Q: Genetic algorithm for “Hello World”

CaridorcThis programme uses a genetic algoritmh to get the string "Hello, World!". It can be summarized as follows: Create a random initial population. Let the best reproduce and kill the worst until we get a 'good_enough' result. I used doctest to verify correctness. import doctest import random d...

 
9:22 PM
@CaptainObvious next up: Genetic ?
 
Genetic fizzbuzz?
Hurrah, the Packers are beating the Seahawks! bing.com/search?q=packers+game&form=MOZSBR
Most of my family wants the Seahawks to win because they are Vikings fans, so I hope the Packers win because I am sick of their anti-Packer nonsense.
 
@Hosch250 well, if you can make genetic Hello World, why not?
 
Can you?
 
2
Q: Genetic algorithm for “Hello World”

CaridorcThis programme uses a genetic algoritmh to get the string "Hello, World!". It can be summarized as follows: Create a random initial population. Let the best reproduce and kill the worst until we get a 'good_enough' result. I used doctest to verify correctness. import doctest import random d...

hmmm.... algoritmh? Must be a monkey.
 
 
1 hour later…
10:33 PM
0
Q: How do I convert a image to its canvas data?

sdin3dspaceI wrote a utility to convert text to colors and back on a canvas. The next step is getting the file to convert back into the canvas so I can read the information again. Here is my code. ColorizeData.prototype.loadImage = function() { var img = new Image(); img.src = 'https://mdn.mozilla...

0
Q: List comprehension, where one if does not update the list

Salvador DaliI have the following code, res = [] for operation, i, j in queries: if operation == 'update': update(arr, i, j) else: res.append(query(arr, i, j)) which either updates the part of the array (update returns nothing) or makes some query and returns the value. I would rath...

 
10:53 PM
0
Q: Compile Time Constant Map

David WatsonI have implemented this compile time map as a way to learn templates and constexpr classes: template<class K, class V> class Element { public: const K key; const V value; constexpr Element(const K& key, const V& value) : key(key), value(value) {}; }; template<class K, class V> conste...

 
Morning all
 
00:00 - 23:0023:00 - 00:00

« first day (624 days earlier)      last day (3387 days later) »