I have only started working with XML files and PowerShell. I feel that while there are many ways to accomplish the same thing that I might be doing the following inefficiently.
This is all based on the following SO post which I have an answer to:
$numberOfCores = Get-WmiObject -class win32_pro...
@Mat'sMug Every time I come here, the message seems to be "things could always be better," so I would have to submit "There's always room for improvement."
Just Curious about the Coffee Mug situation.... I am about to post an Answer and want to make sure that I am not stepping on something already in place
Well, we haven't produced any CR mugs. I don't know what it would take to get those added as an option down the line. It wouldn't happen in the near future, at least.
Actually, is there a way for me to withdraw my registration? I don't really know what I would do with stickers and rubberducks, and I'm not into shirts with words.
@Mat'sMug You know, we llive in times where we have so much useless stuff that we sometimes want to avoid having to store more, because we know that we won't be able to throw things away once we have them.
I'm writing a C++ game engine and I have a scene class that I'd like to present as a code example to a team who are interesting in my skills.
The scene class holds games entities, updating and rendering them using a camera.
I'm interesting in the stylistic or functional improvements that could ...
I got a database with members, each member has a list of sports they do.
now I want to loop through a listbox and add every selected item to my database.
This is my database :
And this is my code :
foreach (var item in sportCheckedListBox.CheckedIndices)
{
int s...
is this a crappy post that should have been downvoted to oblivion? I'm asking because last thing I want is to hurt the site, and I got this one migrated over - what's the difference between them? #meta
another underlying question is, is a beginner console game app a crappy post by definition? what about a fizzbuzz? would we migrate a fizzbuzz review request?
@Mat'sMug I don't deal with a lot of migrations, that is a good thing to know. I see code that works and does what it intends to do and it looking for improvement
@Mast if the question is not a fit for the site and a migration is suggested, then usually the answer doesn't fit the site and may or may not fit the target site either
@Mast the question in question is a CR question, it shouldn't be closed, it was right to migrate to CR because it works and OP is looking for a way to improve working code.
if (code.isUgly()) { code.review(); }
As a wink to all those who write code for fun and/or for a living. And I think it reads good enough as English for non-coders to "get it".
Maybe isUgly should be a property not a method. Also the villagers are coming with torches and pitchforks to protest your placement of curly braces. — ChrisW4 mins ago
So this is what I'm doing:
I have hundreds of arrays, each of them filled with a date in milliseconds in the first position, and the rest of the array is filled with user game scores.
Let's just call this array above var scoresDates
The ultimate goal is to have each of those arrays contain o...
I'm writing a C++ game engine and I have a Renderer class that I'd like to present as a code example to a team that are interested in my skills.
The renderer is used to setup the OpenGL environment and then provides a RenderMesh function that will render a mesh with a texture and shader using th...
First, it will wander randomly leaving food scent. When it finds food, it will backtrack following the food scent and other generated ants will follow the food scent until the food is over. Then this process is repeated.
The size of the ant determines how much food can it carry at once, and once the food's size is too small, another piece of food will spawn.
Of course, since I didn't work it out with any graphics API, this will have to be console made. I have two options: 1. Ascii Art 2. Just printing ant location, food location and tile stats via cout
Calm down, option 2 is just the very last resort :)
But saying is easier than doing it...
The thing that keeps me from using SDL is "undefined reference to WinMain" even though the project is actually an console application!
I'm very new at F#, and am using Project Euler to help me learn. Question #2 kept me going for a while, as my initial attempt at an answer was very slow and inelegant. Then I learnt about Seq.unfold, and a whole new vista unfolded in front of me!
Please can you comment on this code. Bear in mind...
I have a this code that Helps me to paste data from a Excel file to a Datagridview:
If e.Control AndAlso e.KeyCode = Keys.V Then
DGVLookUP.Rows.Clear()
DGVLookUP.Columns.Clear()
Try
Dim Generar As Boolean = False
Dim N As Inte...
I have created a package for Tree in java. I have already added Binary Tree. Now I want to extend the package to contain Binary Search Tree and Threaded Tree but I need guidance regarding a proper structure and inheritance to be implemented.
Tree (Interface)
AbstractTree (Abstract Class impleme...
Why do we need private variables in classes?
Every book on programming I've read says this is a private variable, this is how you define it but stops there.
The wording of these explanations always seemed to me like we really have a crisis of trust in our profession. The explanations always so...
What is Stack Overflow's long-term solution for the Help Vampire problem?
Quote from article follows:
Identifying Help Vampires can be tricky, because they look like any ordinary person (or Internet user, whichever is lesser). But by closely observing an individual's behavior using this hand...
I wrote a simple tic-tac-toe program in Haskell. It runs on the command line, has a one and two player mode, and implements a minimax algorithm when you play against it.
I'm used to writing proper code in OO languages, but Haskell is new to me. This code works reasonably well, but seems hard to ...