So... I just read back a message where someone highlighted me, I type something... And then chat SE thinks: "Let's send a notifcation that you have an unread highlight!"
@SimonAndréForsberg right, it's probably fine on a tablet. My biggest gripe with Win 8 is they tried to make the PC "experience" just like the tablet "experience", but unless all you are interested in doing with your PC is surfing the net, you probably don't use a PC the same way you use a tablet. So it doesn't make any sense to target tablet users with the OS and then force it on PC users.
Well I just have it running constantly, and then I'm ordering a Big Mac and phone vibrates and I see that @Marc-Andre has posted an answer to my question
I'm glad to hear that it at least has some useful functionality in the form of notifications. Would have been rather awkward if it were just a website port considering Jeff Atwood's recent blog post (very correctly) bashing phone apps.
It's nowhere near perfect, I use it in conjunction with the full-site (on mobile - the "mobile" version is useless). Like now I have the 2nd monitor opened, I don't see the notification bar in my browser - but the app will tell me if I do get one.
As I mentioned in this answer, your Ocean class is breaking SRP, which makes your code harder to maintain than it needs to be.
Memory Usage
Let's pretend the ocean is an array of X-Y coordinates with 3 possible values at each intersection: EMPTY, FISH or SHARK (what your code does). If the ocea...
Just a quick comment: Your Ocean class knows/does too many things.
I'd be expecting a Fish class and a Shark class. Creating an ocean requires a starveTime constructor parameter? That's a sign you've broken the single responsibility principle (SRP).
Methods like void addFish(int x, int y) would...
@rolfl If the questions are untagged a while longer, I can go through some of them and add a tag and possibly improve the question in other areas, to come closer to Copy Editor :)
I should just start an E-mail to my personal Email and have the Q&A posts that I need to upvote listed there then when I get home it is a new day and I can vote on them
I recently posted a question about modeling a system that contains elements that can perform actions (here). The model runs in cycles and parts perform their action every cycle. The model should have some kind of visual representation displaying changes in model state. In my test code the model u...
you have a lot of if statements in your SQL, this screams at me that you are doing something in your SQL that should be done in the application, and that this SQL should be separated into two distinct stored procedures.
the benefits
faster stored procedures
use an actual coding language to d...
Im trying in to implement autocomplete feature.
So far this is the code I have.
Autosuggest.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1
-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<...
Ok so this is what I ended up doing.
I created an interface, called it ITestClass.cls:
Option Explicit
Public Sub RunAllTests()
End Sub
Then I created a new module, called Tests.bas:
Private AllTests As Collection
Option Explicit
Private Sub SetupTestClasses()
Set AllTests = New Colle...
Here is my attempt at the UTTT code-challenge (in response to the the Weekend-Challenge Reboot). Here is what I would like critiqued:
I tested the code a few times for bugs, but I may have missed some.
I feel like I have duplicated code in some places (with only minor changes being the differe...
most of my answers are "on-the-side" answers that don't even address what the OP is primarily concerned about - naming conventions, readability, testability, ... I tend to leave the crux of the OP's problem to other answerers (i.e. encourage multiple answers)
I am looking forward to checking out this next week's data... as far as I know, @JerryCoffin will be the first person on CR to have repmax and a bounty on the same day
I'm creating a game that implements a finite automaton and I don't know if I'm doing it right. Any advice??
Game class
import java.awt.Canvas;
import java.awt.event.KeyListener;
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.event.KeyEvent;
import java.awt.image.BufferStra...
@JerryCoffin it is pretty standard 'now days' to pull the data in to a client-side application and crunch it there.... but, SEDE is like the good old days, where getting the data off the server (out of the database) is a slow (and in this case, impossible) process.... and CURSORS come to the rescue.
@Donald.McLean I've seen almost all episodes twice (most of them thrice actually), so for me it's not a big problem. I think POI is a series where, once it is finished, you can watch all of it again with a whole different perspective and understand things on another level. I think it's brilliant.
We have 1 men's toilet + 1 urinal at work for about 15-20 people and 1 women's toilet for 3-4 females. The problem we have is that some of the employees don't check if everything has been flushed properly and that the bowl is clean.
According to the employees working here for a few years, this ...
I am populating a drop down list from my SQL database. List should be able to be displayed with active only, inactive only or both at the same time.
OfficeRepository.cs:
public static List<OfficeRollups> ListOfficeRollups(bool active, bool inactive)
{
List<DataRow> listDataRow =...
@rolfl In one of the "old" buildings at Google, they have toilets that (unlike the rest of the campus) don't flush automatically. Had to put up signs reminding people to flush the toilets--below which some clown added something about "how can you expect us to live in such primitive conditions?"
@skiwi Yeah, well... I would like to know what exactly your 3D engine is? What does it to that the 3D library you're using doesn't? And also, is it open source? :)
OK so for anyone that's travelled beyond North America and Western Europe you know what I'm talking about.
Left: Romania, last year. Right: Turkey, last night.
They start popping up in the Balkans and of course they're everywhere by the time you get to Turkey and become totally unavoidable no ...
@SimonAndréForsberg For now it's no-source... in reality I'm working on it, I would think of making it open source perhaps, and it encapsulates OpenGL in OOP pretty much
I'm adding additional functionality to an existing MVC .net application, and to help prevent or at least reduce repeated reads to the dB I'm dumping a few custom entities in session. I'm limiting what can be stored in session to say a max of 5 objects for now. Given below is the code and it seems...
@JerryCoffin yeah, the problem is I am there in the summer, and, well, the mosquitos get in, so I never 'hang around' long enough to finish the articles.... and they are pretty much falling apart... and I don't want to be the last one to read it before the binding breaks... 'up at the cottage' there is this 'vegas' like attitude of 'what happens there....', but the teasing can be relentless.
@skiwi I downloaded JMonkeyEngine (yes, it's actually called that @rolfl) a year or so ago and played around a bit.
I just wanted to see if I could get something going. I did manage to understand the basics of it quickly I think, but I didn't do much with it (I have enough 2D game ideas already, who knows how many 3D ones I will have?)
The problem with me is that I love creating the model and logic parts of a game, and the AI stuff and things like that. I find the whole UI thing very difficult. Never seen myself as a designer really.
@Mat'sMug I love contrasts like this quote in the answer: I grew up using that thing. When I went studying abroad, I had problems with the toilet you guys called as the normal one (the sitting one). I literally wet my pants several times. Probably I should start a post about "How to sit on the normal toilet".
@SimonAndréForsberg Sorry can't talk much atm. But I would not go for jMonkeyEngine, or any engine unless you can actually develop games... It is really worth to develop an engine yourself and see it working
The problem I had with jMonkeyEngine is that I did not understand the 3D concepts properly, and you only really will if you either spend 1000 hours trying, or 500 hours making an engine, (random numbers)
I just was imagining my worst nightmare - someone putting out the light on a sitting toilet - and then that happening on a squatting one! That would really be a hell /Fixed it
So, I thought I would look at the top user stats for the eek on SO... and, OMG, While I have maxed each day this month, and have 1130 rep (that's 5 days), in the same time on SO the top rep earner has 1940... (far outpacing Skeet who is 4th, and 'only' has 1295). These users are getting 21 accepts a day.
@rolfl Pretty crazy. Undoubtedly helps when there are lots more questions, and a lot the answers are short and simple (especially for the Java and C# tags, quite a few answers consist of little more than telling somebody the right part of the library to look at).
I think what helps in getting lots of accepts is: Editing answer to make it better than all the others, being observant on the OP's specific problem, commenting on the question, understanding the problem, having good knowledge, and also: Having pure luck.
Meme: TS | RSA
Originator: rolfl
Cultural Height: star-power
Background: The 2nd Monitor is quite a star-happy chatroom. How many of you know that there's only a number of times you can "star" a chat post - a star cap (like the rep cap and the vote cap, a star cap). And just when you run out o...
@JerryCoffin none of those answers are the one I would give ... ;-)
Linked lists are the first step in learning more advanced concepts like recursion, trees, graphs, and other structures. As a result, it is the first thing to teach, and learn, and thus is the concept most asked by novices, because now suddenly things 'get hard'. Their use in real-world situations is limited, but the more advanced structures are common
I implemented a fixed-size matrix class which supports basic matrix operations (cannot use c++11). What do you think, and how could it be improved?
#ifndef FIXED_SIZE_MATRIX_H__
#define FIXED_SIZE_MATRIX_H__
#include <iostream>
#include <cstdlib>
template <typename Ty, int N, int M = N>
struct...
@rolfl That's probably fairly accurate. Problem with it is that (IMO) about the only thing that really translates well to other structures is the really basic concept of manipulating links. Beyond that, most linked list tricks are nearly unique to linked lists.
@rolfl You can, but in the process you lose most of the interesting things you can do with graphs. It's degenerate to the point that there's no longer even a meaningful difference between DFS and BFS.
In mathematics and computer science, a directed acyclic graph (DAG ), is a directed graph with no directed cycles. That is, it is formed by a collection of vertices and directed edges, each edge connecting one vertex to another, such that there is no way to start at some vertex v and follow a sequence of edges that eventually loops back to v again.
DAGs may be used to model many different kinds of information. A collection of tasks that must be ordered into a sequence, subject to constraints that certain tasks must be performed earlier than others, may be represented as a DAG with a verte...
I like amon's answer a lot here, but I wanted to contribute with some extra suggestions
What actions [are we taking|can be taken] to avoid, in the long run, titles like "Simple Calculator Implementation #429"?
If it is a common implementation (Linked List Implementation, Fizz-Buss, some kin...
I have to bring up this question again, because I really don't think it is that helpful.
Why is it not helpful?
Because it isn't being used that much!
A search for questions with the words "linked list" and without this tag gave a whooping 356 results. Compared to only 3 results that are actua...
Sorry @rolfl but I really disagree with you on that tag ^^
@SimonAndréForsberg I think the management would tend to agree with you. It's a meta-tag, which are officially frowned upon on SO, and (once it's large enough to draw attention) the same arguments probably apply here.
@rolfl Honestly, perhaps we should yes. I think that there are plenty of cases where the OP is a beginner but doesn't add that tag. And I recall a discussion from somewhere that others should not add that tag to the question unless it's clear that the OP sees him/herself as a beginner, as it could be seen as there is an insult to add that tag to someone else's question. (This topic could possibly use a new meta question though)
Welcome to the chat! Unfortunately, you have JavaScript disabled, and thus this chat will not work.
If you would like to participate, please enable JavaScript in your browser and reload this page.
I am very curious to see what different kinds of effective codes there are... Show another effective way to write this coding below... Just experimenting and learning the different ways of how python runs.
list=[]
original=mkPoint3D(x,y)
z1=mkPoint3D(x-d,y)
z2=mkPoint3D(x+d,y)
z3=mkPoint3D(x,y-d...
How could I make this code more effective? I'm just experimenting and learning the different ways of how Python runs.
list=[]
original=mkPoint3D(x,y)
z1=mkPoint3D(x-d,y)
z2=mkPoint3D(x+d,y)
z3=mkPoint3D(x,y-d)
z4=mkPoint3D(x,y+d)
list.append(original)
list.append(z1)
list.append(z2)
list.append...
The code below searches worksheet A column F for a defined string or the string "All" and returns the corresponding column entry. The entry that is returned is in column F.
What I need help with is the following:
1. How can i simplify this code
2. From my "FoundCell" variable return the value i...
This code currently works, but I'm new to Objective-C from a Python/PHP background. How can I improve it/make it more Objective-Cesque?
Header File/Interface
#import <Foundation/Foundation.h>
@interface Monster : NSObject
@property NSString* name;
@property NSNumber* health;
@property NSNumb...
@syb0rg I'm afraid I'd only have one comment for all Objective C questions, and nobody really wants to hear it (especially since targeting anything recent from Apple requires them to use at least a little Objective C).
@syb0rg: I want to try to get back to answering after midterms are over. Since I won't have anything else to do over spring break, I might as well write another program.