To celebrate our first graduated Christmas (and because we feel like it), some regulars in The 2nd Monitor thought it would be a good idea to make a Secret Santa between members of Code Review!
The rules are quite simple :
You will send an email to [email protected] to register...
I have a socket which will be receiving more than 100 TPS, so I need the reading to be as fast as possible, in this socket I read the info and I need to build and String and check if it matches a regex. I need to read char by char, so I can now where a new message is sent
But I'm having perfoman...
CreateUser function assumes the data being delivered via parameters are clean and gets called or initiated from the Business Manager (another class). This function is responsible to do the following things:
Fetch the Connection String
Open the database connection
Start the transaction
Inserts a...
although, ...I never needed to use any #If directives. I just use Debug.Print to output to the output window - these calls aren't compiled into a release build.
Android app is the little, neglected, brother of the iOS app who gets all the attention and resources. No idea why, but agree it's highly frustrating. — Shadow Wizard6 mins ago
This question could be suitable for Code Review, as long as (a) your code works as intended, (b) your code is real code, rather than example code, and (c) your code is included in the body of the question. If you wish for a peer review to improve all aspects of your code, please post it on Code Review. — Phrancis30 secs ago
for (var i = playlistIndex.length - 1; i >= 0; i--)
Instead of having it negatively looping, which in this instance is unnecessary, do it positively:
for (var i = 0, length = playlistIndex.length; i < length; i++){
Instead of the negatively recurring for loop, consider using a length sub...
Consider starting the child process in a sandbox. /usr/bin/perl is likely safe from a malicious user since /usr/bin is typically looked down by the root user(es). But /home/demetri/bin/awklikeperl.pl could be replaced if the owner is not careful with permissions. Putting the process in a sandb...
there aren't very many children that actually play in Sandboxes anymore. especially because for some reason all the playgrounds you go to now have wood chips instead of sand, that's just wrong. — Malachi16 secs ago
Regarding the other 2 comments. I guess this is meant to be a question about getting the best performance from excel, but yes, I did use real working code as an example. I did not know there is a code review section on this site :) — Michaela Ervin19 secs ago
First step:
Write down your assumptions
These would be mine;
This data table has a header row in row 1 and a header column in column A.
The values in the headers could be any legal text.
What's the fastest way to find an exact match in a list?
My answer: A dictionary (or any other Linked...
CreateUser function assumes the data being delivered via parameters are clean and gets called or initiated from the Business Manager (another class). This function is responsible to do the following things:
Fetch the Connection String
Open the database connection
Start the transaction
Inserts a...
I am not sure what your question is. It seems you more or less know how to proceed? I suggest you write a first version of your code, if you encounter any specific problem, ask a new question, if not, you can go to codereview.stackexchange.com to have architecture and style advices — njzk234 secs ago
I've made an image filtering client for JavaScript that runs on jQuery, Vex and Fabric.JS.
You simply include the required files in your html page, along with something like:
<script type="text/javascript">
ImageFilter.defaultOptions.imageCallback = server.upload();
</script>
and then hav...
@EthanBierlein Winter Bash 2014 there was a secret "Abby Hairboat" hat for commenting on any of Abby's posts, presumably Jon's idea. This year Abby gets revenge, and Jon's inbox gets flooded
Here is the completed code for my first Python project, for which I received some help and feedback here: Collate votes on MP3 files to list them by popularity
Seeing as there have been considerable changes since that post, I figured it would be best to start a new post.
My goals when starting ...
I've made an image filtering client for JavaScript that runs on jQuery, Vex and Fabric.JS.
You simply include the required files in your html page, along with something like:
<script type="text/javascript">
ImageFilter.defaultOptions.imageCallback = server.upload();
</script>
and then hav...
@EthanBierlein I reopened it... after removing the "broken code" - that part was only provided for context, I don't agree with closing. Sure it can use a better problem statement, but it's old, and it has good answers.
I wrote a Cordova plugin for an app that I'm working on, and now I'm trying to write an Angular definition to wrap my plugin. So far, I've followed the model in ng-cordova.js:
note: the code below is my code, it simply follows the pattern in the above file.
angular.module('ngCordova.plugins.my...
If you encounter any open deleted questions that you'd like to answer, you can vote to undelete, and a mod can finish it if it doesn't get enough votes. Or if you prefer to vote to reopen a question, then that's fine.
Your code seems really good, I would change the ITestingRepository methods to return IEnumerable<> instead of List<>.
Also, I suggest you would add a method signature to your generic repository interface that would let you query your DbContext.
public interface IGenericRepository<T> where T : ...
I was plying a game with my family and we lost the dice that went with the game, so I created this small program and I am now trying to create a website with it.
mouseClicked = function()
{
// change to change max and minimum numbers
var number= random(0.5, 6.4);
// makes number into intiger...
I want to make sure if it's good. Maybe there is another better solution.
List<String[]> list = new ArrayList<String[]>();
for (int i = 0; i < 3; i++) {
String[] arr = { String.valueOf(i) };
list.add(arr);
}
String json = new Gson().toJson(list);
System.out.print...
Please suggest me how can I improve this code:
var maxDateValue = list.Where(x => x.ID == 1).Max(c => c.LastUpdDt);
list.RemoveAll(x => x.ID == 1 & x.LastUpdDt!= maxDateValue);
If they want physical resources, Gamma rays. If they want biological resources, probably some kind of engineered virus followed by autonomous sniper drones.
One of the few alien invasion films I really liked was "Edge of tomorrow". If you look past the premise that time-travelling aliens haven't conquered the entire planet after a whole year of trying, the rest of it was surprisingly internally consistent.
I wrote a Connect Four game including a AI in Clojure and since I'm rather new to Clojure, some review would be highly appreciated. It can include everything, coding style, simplifications, etc.
But keep in mind the AI is not finished yet, other heuristics will be added in the near future. Curren...
This is a statement that I use a lot in my code base :
(LocalDateTime.now()).format(DateTimeFormatter.ofPattern("ssmmHHddMMMuu"))
Should I create a static method for this or is it an overkill?
public static String getTodaysDateInFormat(String format){
return (LocalDateTime.now()).format(Da...