« first day (917 days earlier)      last day (3398 days later) » 

00:05
Hello.
Someone's after me.
0
Q: PMX Crossover Implementation in Clojure

ionutt93I'm starting to learn Clojure and as an exercise I've implemented the following functions (written in Java) in Clojure: private int[] SwapValues(int val1, int val2, int[] array) { int[] result = new int[array.length]; for (int i = 0; i < array.length; i++) { if (array[i] == val1)...

01:06
0
Q: Simple TCP client in Rust

slugchewerHere's a little command-line utility written in Rust that connects to a Denon AV receiver and sends a command, then receives the response. It's a simple TCP client that takes its command from the first argument. The code: extern crate encoding; use std::env; use std::io::prelude::*; use std::n...

Grr... many of the recent java questions are closed...
01:27
Hello? It's really quiet...
Hello!
Did you see this:
1 hour ago, by Manny Meng
user image
Zak
Zak
Ohhhhhhhhhhhhhhhhhhhh
@Zak Huh?
Zak
Zak
Just realised, I can put productivity modules in my rocket silo and reduce the resources I need by almost half :)
01:39
@Zak Huh.
Zak
Zak
I'm speedrunning Factorio
I know.
Sounds fun.
Zak
Zak
That chart
01:41
@Zak Now I'm confused.
Zak
Zak
Assumes I need 100% of everything
But
The rocket parts are built in the rocket silo
I can equip the silo with special module boosters
I have no idea what you are talking about: sorry, I am no Factorio master...
Zak
Zak
which will reduce the res. required by 40%
So, whereas I thought I needed e.g. 100k iron
I actually only need, like, 70k
Well, at least that makes sense.
Zak
Zak
It means my calculations are all off, but in a good way :)
Since the Rocket Parts make up a large majority of the total resource inputs, I reckon I can safely reduce all my current figures by a third, which is awesome :)
Anyway, it's 2am, TTGH
02:17
New user, good selfie-answer, under-loved: codereview.stackexchange.com/a/109955/42632
02:27
@Phrancis Upvoted.
02:55
Hi Bye
0
Q: Saving user information on exit in C#

user88990Ok so I made a console application that stores data into arrays so I can log test scores but I need it to save on exiting the program. I want to be able to see the scores I entered when I reopen the program. Please note that I may as well have just started coding in C# yesterday and I'm a very be...

Zak
Zak
03:16
@TopinFrassi World Record
I must admit. Having a shower at 3 in the morning feels really refreshing
0
Q: A program ran in a program

Manny MengI was feeling bored with nothing to do (well, sort of) and decided to write a program that runs a program in Java. What it pretty much does: Creates a new file with the name classname + ".java" Write the code into that file if it is not already compiled, run javac filename.java on the command l...

04:05
0
Q: How can I optimize this code in Sass?

Ricardo CastañedaHow can I improve this block of css? .parent-div a { border-bottom: 10px solid; .blue & { border-color: $blue; } .red & { border-color: $red; } .green & { border-color: $green; } .pink & { border-color: $pink; } .yellow & { border-color: $yellow; } .pu...

04:23
0
Q: simple c program "travelling simulator", function type error

chun11197I'm a foundation student and required to design a "travelling simulator" which can calculate the time needed for travel according to the departure location, destination and travel mode with simple c program. after i done the program it run normally, after that i decided to add a "login system" s...

05:10
0
Q: python - Find all distinct palindromic sub-strings for a given string

aamir23I was solving a question where I had to find all possible unique palindromes of a string. I was able to come up with the solution shown below. If I am not mistaken it is an O(n^2) solution. Would be great to get feedback on how to improve the code and if my understanding of its Time complexity i...

0
Q: How could i summerize the success and fail callback funcs of this controller?

Jonathan S.I've got an Angular Controller where i have two functions that are repeated inside two functions, here's the code: (function () { 'use strict'; angular .module( 'app.purchases.products' ) .controller( 'ReadProductController', ReadProductController ); ReadProductCon...

06:09
0
Q: PHP Output different from Ruby

RepeaterCreeperPHP VERSION $IDCHARS = str_split('0289PYLQGRJCUV'); function get_player_tag($player_id) { global $IDCHARS; $tag = ''; $player_id = (($player_id & 0x7fffffff) << 8) + ($player_id >> 32); while ($player_id >= count($IDCHARS)) { $tag = $IDCHARS[$player_id % count($IDCHARS)...

06:50
0
Q: Accessing Wi-Fi network interface details from Java using netsh

Rajind RuparathnaI am developing a java program on windows platform. I want to access Wi-Fi interface details such as SSID, ip, subnet, enabled or not, connected or not and so on. Currently i am trying with using netsh, ipconfig commands. For example here is how i get the connected SSID. Is this way good ? Is the...

07:45
0
Q: Random integer range with exceptions

Omar ChehabI have to generate a random number from a range with exceptions held in a bool array, is there a way to do it without a loop depending on probability? There is also a potential infinite loop here if all values are false. Any suggestions? bool[] paths = InnateChannels(channelID, channelOrient...

 
2 hours later…
09:31
0
Q: Runtime Error RE (SIGSEGV)

user89003Here is my code for finding the Σn/gcd(i,n) where i=1 to i=n and n have the range of 10^7. I have used totient-function for calculating the required sum. #include<bits/stdc++.h> using namespace std; typedef long long int ll; int main() { ll t,num,sum; cin>>t; while(t--) { ll ar...

10:26
0
Q: The page doesn't work properly in IE Edge and some Chromes

Alexandra SerebrennikovaPlease, could anyone help me to solve the problem with this page http://gecko.sashaz.com/index.html. It is supposed to be a color selector, but the background image doesn't load in some browsers. Seems it has something to do with input color type method. How do I get around it in IE Edge, etc.? ...

0
Q: Convert numbers in a string array (#3, #1, #2, #4) to range (#1:#4)

ElmoThis function takes, {"foo", "#123", "#124", "bar", "#125", "#126"} converts the numbers to a range: {"foo", "#123:126", "bar"} and returns: "foo,#123:126,bar" static void Main(string[] args) { var ids = new string[] { "foo", "#12", "#14", "#17", "#13", "#18", "#bar", "#19", "#20",...

10:47
0
Q: Magic square creator

hrrmsnI'm a newbie in javascript. Could you please say what is wrong in my code? How can i improve it? Maybe something is wrong with variables or methods naming. Maybe something is wrong with common structure. My program generates magic square by order. I decided that it is good to create one main func...

0
Q: Custom expression that filters elements based on jQuery internal data

DelightedD0DPurpose: With jQuery, I'd like to be able to easily select the following types of elements: Elements that have a specific value set for a specific data attribute in the raw html Elements that have had a specific value set, or changed, for a specific data attribute via jQuery If, the value w...

11:23
0
Q: Number spelling library - need confirmation on output

jurchiksI've written a PHP library that spells numbers and currencies in 5 different languages - English, Spanish, Russian, Latvian and Lithuanian. I myself am Latvian and I'm also good with Russian and English so I don't need help with those languages. The library's source code is hosted on GitHub: htt...

11:44
0
Q: TopCoder Haar1D problem - positioning in array C++

nitheismHello I am doing this problem in TopCoder to practice my recursion. I have done it so far except that I can't do the positioning in the array. For the first example where data is {1, 2, 3, 5} instead of {3, 8, -1, -2 } it returns {3, -1, 8, -2}. How I am supposed to change it using array? Here is...

0
Q: Collection of exact string matching algorithms in Java

coderoddeI have this small collection of exact string matching algorithms: Knuth-Morris-Pratt algorithm, Finite automaton matcher, Rabin-Karp algorithm, Z algorithm. The main research question was comparing performance of all the algorithms in two different settings: Input which degrades performanc...

12:33
Monking
12:50
0
Q: C++ safe way to use using inside headers

Simon BourneI'm wondering if there's any safe to use using in C++ header files. I'm looking at adopting a scheme something like this (using the nested namespace proposal in the example). namespace MyProject::MyModule::Detail::MyFilename { using std::cout; class Private {}; class ModulePrivate {...

Zak
Zak
Monknig
13:34
0
Q: putting symbols center of m x n board

askqueI have written a code that puts symbols on a board that is n x n. How can I improve my for m x n ? Original algorithm: ( It works for fine nxn ) table[center][center - 1] = p_symbol; table[center - 1][center] = p_symbol; table[center][center] = c_symbol; table[center - 1][center - 1] = c_symbol...

Monking
Awfully quiet here.
Everybody in hangover, I guess.
13:49
While I admire your efforts to solve the using problem, your question is not on-topic for Code Review. Our on-topic help centre states we need actual code. Yours is example code. I'm sure Programmers would appreciate the question, although you better read their help centre as well so you're sure about it yourself as well. — Mast 13 secs ago
0
Q: Compress numbers in a string array (#3, #1, #2, #4) to range (#1:#4)

ElmoThis function takes a string array, {"foo", "#123", "#124", "bar", "#125", "#126"} makes a new array with the numbers converted to a range: {"foo", "#123:126", "bar"} and returns: "foo,#123:126,bar" Note it doesn't and shouldn't change {"#1", "#2"} to {"#1:#2"} static void Main(string...

 
2 hours later…
15:31
0
Q: Is eval acceptable here to read types from a config file?

PatrickSI understand that and why using eval is generally considered bad practice in most cases (see e.g. here). Related questions on config files and argparse don't use types. (1, 2) I needed to parse a number of command line arguments and decided to store the arguments, defaults and help strings in a ...

0
Q: Code duplication in buzzfizz program including negative numbers

user89022#include <stdio.h> int myseries(int n) { int i, cpt = 0; if (n < 0) { for (i = 0; i >= n; i--) { // if the number is multiple of both three and five if (i % 15 == 0) { printf("lancelot\n"); } // if the number is multiple of 3 else if(i % 3 == 0) { ...

15:42
@Mat'sMug How many questions does a tag need to be able to give tag badges?
Monking!
hey @Phrancis and @SimonForsberg
Cleaning up PC, I found this sakila_rental_date_rollup.xls.xml.csv.json.txt.csv.json
4
@Phrancis .xls.xml.csv.json.txt.csv.json
16:03
@Phrancis You missed .html and .doc
@SimonForsberg Did you work with GSP?
0
Q: wp_create_nonce with ajax implementation secure?

Robin PedersenIs my nonce implementation secure? Im trying to learn security on wordpress->ajax(and later woocommerce) and with wp_create_nonce. After much struggeling i managed to get it working, but is my implementation actually secure? Its a simple plugin used from this turtorial with my security customizat...

@SimonForsberg 50 gets the tag creator a taxonomer badge
100 questions in a tag makes the tag eligible for tag badges
16:19
0
Q: JavaScript Factory

Prisoner ZEROI like the idea of using a factory to instantiate objects in my data service. The idea here is to register models in the factory and apply any settings that are passed-in. I've seen various factory samples, but don't really like them, for instance: SEEN BUT DONT WANT - STRING COMPARISON METHOD...

0
Q: PHP Security Quality

MichaelI'm learning PHP now, and I'm trying to find out whether or not the following code structure has any faults: $loggedIn = false; if (isset($_GET["userpass"])){ if (strcmp($_GET["userpass"], $correctPassword) == 0) { $loggedIn = true; } } To me, it seems pretty bullet-proof. If t...

@skiwi very little
@Mat'sMug FizzBuzz is soon there.
Brainfuck is only at 35 :/
Wow. Imagine getting a Gold FizzBuzz badge.
3
@SimonForsberg Yup, was just checking. Too bad I'm doing way too much things at once again or I'd raise the number.
Python and Groovy take priority at the moment.
@Mast Groovy is nice :)
It's hard getting used to though.
16:30
I plan on making more things in BF, but... well... you know how it is.
Sounds familiar indeed.
@Mast the nice thing about it is that it can be used like a form of Java+ :)
Thanks for the help with the normalization database, guys. I got another 100 (full marks) on it.
> You successfully complete the normalization assignment. Your explanation was exceptional. You demonstrated your skills by applying the normal forms to the volunteer project data. Your database was well designed. You supplied the screenshots as specified. You created a quality database, nice work.
@SimonForsberg That would be great if you're fluent in Java.
So far I only have experience in JAVA.
@Hosch250 Good job!
I've got a bit of experience in Java.
16:34
@Mast pfft
I'm trying to get used to how Grails does it's stuff with services, domains and controllers and it's quite high-level. I'll get there.
Do I dare say getting used to Grails is harder than getting used to Brainfuck?
@Mast Well, that's quite a statement :P
This looks ready for re-opening:
0
Q: C++ safe way to use using inside headers

Simon BourneI have this C++ 14 code in a project of mine. File: Enhedron/Util/Enum.h: #ifndef ENHEDRON_UTIL_ENUM_H_ #define ENHEDRON_UTIL_ENUM_H_ #include <stdexcept> #include <type_traits> namespace Enhedron { namespace Util { namespace Impl { namespace Enum { using std::runtime_error; using std...

And now we're talking about FizzBuzz, this guy is doing it way too complicated:
0
Q: Positive and negative FizzBuzz

user89022I want to eliminate code duplication in my Fizz-Buzz like program, any ideas? #include <stdio.h> int myseries(int n) { int i, cpt = 0; if (n < 0) { for (i = 0; i >= n; i--) { // if the number is multiple of both three and five if (i % 15 == 0) { printf("lancelot\n"); ...

@skiwi Brainfuck is quite straight-forward. I like my languages straight and forward.
Grails is like "Put a layer on a layer on a layer"
@Mast And then there's still a layer under it?
My first languages were BASIC, C and PASCAL, some of the habits I got there are still haunting.
@skiwi Usually, but by then you lost count.
17:00
@Mast Java isn't that difficult :)
@Mast ugh, Grails is difficult... I'm not a fan of Grails really.
@Mast I guess that's why this site is for code reviews...
All those layers remind me of the two methods of building an operating system.
One method, which Windows is based on, is to create components in a black box that can interact with any other component.
The other method, which Linux is based on, but does not use exclusively, is to use layers, where different components can only interact with other components in their layer.
@SimonForsberg Well, good to hear it's not just me.
I like the idea of boxes with a limited layer structure for certain components.
17:16
@Mast Groovy is so much more than just Grails.
I know, but at the moment I'm trying to get the hang of the Grails/Groovy.
Maybe if I would have done some other "on rails" stuff it would have been easier.
I have the hang on Groovy quite well, but Grails is another story...
Probably.
17:53
lol
I am testing out VSDiagnostics on random github projects
I picked one from page 1 and 3, ServiceStack.Redis and Enyim.Caching
One diagnostic in particular failed in both projects so I look at the offending source code
ServiceStack.Redis:
// raw data is a special case when some1 passes in a buffer (byte[] or ArraySegment<byte>)
if (value is ArraySegment<byte>)
{
	// ArraySegment<byte> is only passed in when a part of buffer is being
	// serialized, usually from a MemoryStream (To avoid duplicating arrays
	// the byte[] returned by MemoryStream.GetBuffer is placed into an ArraySegment.)
	//
	return new SerializedObjectWrapper(RawDataFlag, (ArraySegment<byte>)value);
}
Enyim.Caching:
// raw data is a special case when some1 passes in a buffer (byte[] or ArraySegment<byte>)
if (value is ArraySegment<byte>)
{
	// ArraySegment<byte> is only passed in when a part of buffer is being
	// serialized, usually from a MemoryStream (To avoid duplicating arrays
	// the byte[] returned by MemoryStream.GetBuffer is placed into an ArraySegment.)
	return new CacheItem(RawDataFlag, (ArraySegment<byte>)value);
}
No copyright notice in either of the sources so I don't know who copied who
lol
@JeroenVannevel there's nothing like random found-it-online code to break a code analysis tool. I've used code from several SO & CR posts to stress-test the Rubberduck parser... and I still get surprises every now and then.
Yeah, talking about surprises.. This is what I've found so far from just two projects: github.com/Vannevelj/VSDiagnostics/milestones/v1.9.2
Wow
Meta-programming is about as hard as it's fun eh
4
18:08
What part exactly is failing?
But you learn something new every time through it
Apparently you can't specify an access modifier on an explicitly-implemented interface method, nor can you pass a property to a ref or out parameter
This SU post hit HNQ. Security is hard ^^
@skiwi it should change the is + cast to as + != null check
@JeroenVannevel I more meant what part/model of your tool causes all those bugs?
Is it not unit testable?
@skiwi sure is. But there are so many edge cases that it's impossible to test everything.
18:12
It is, but there are so many possible scenarios..
These are the test on the above mentioned feature so far: github.com/Vannevelj/VSDiagnostics/blob/develop/…
I'm trying to understand hwo complex it is ^^
We've got.. 650? 700? tests for a grand total of 38 features
Gosh.. I rewrote the IRubberduckParser interface and only broke 255 tests
@Mat'sMug So you have at least 255 tests
458 IIRC
...for the whole app.
18:16
@Mat'sMug What does that mean, you need new tests or the rewrite is flawed?
Need moar tests
But I hate writing tests when I could be writing features and fixing bugs
Not every test is calling into the IRubberduckParser interface
What VSD calls a feature, RD calls a code inspection - we have 20-some inspections, and many other features.
Quite interesting that a unit testing feature is thoroughly under-tested
I like my code testable, but not necessarily tested. I'm weird like that.
7
@Mat'sMug Sounds weird
Sounds like asking for trouble ^^
Well, testable code is decoupled, cohesive, adheres to SRP and SOLID in general, and reads nicely. What's wrong with that?
So you need more tests because your tests failed?
does not compute
No, I need more tests to increase the abysmal coverage metric
18:24
I don't even measure code coverage :o
But IMO that only makes more code that breaks when the requirements/architecture changes
I think I hate unit tests
I'm pretty sure unit tests hate you too ^^
They didn't ask for all their trouble :P
1000 tests document the specs, which is awesome. But then they also cast the specs into concrete. Less awesome.
Or there's something I'm missing.
18:27
What I hate about Grails unit tests is that I need to manually mock every related class, and also classes that class uses, etc., etc.
Tests should break when code changes to no longer meet the tested requirements, right?
@skiwi ugh. Good thing we're using Moq
yes
if the code changes and the tests don't break, the tests are pointless
@Mat'sMug Usually, yes, if your tests don't break, then they might be testing the wrong thing
@JeroenVannevel Tests are meant to break?
@Mat'sMug Tests should fail you mean?
18:30
@Mast If the public contract of the code changes: yes
Yeah that. So the more tests you have, the more painful it is to redesign things
Well, yes and no
On the other hand: you're adding/adapting features a lot more often than you redesign everything
Most unit tests you can just throw away, and integration tests should still be working
18:32
So the usefulness of tests trump it, imo
Well I do need tests for every code inspection.
0
Q: Binary Converting Code

Dylan BlackI made a program that converts a decimal number given from the user, and converts it to a binary number. For example, if I entered 2, it would return 10. It then, counts the amount of ones and zeros in the binary conversion. Please tell me any way my code can be either, more efficient, or if ther...

0
Q: there is error in this code

ibeerabeerpublic static void main(String[] args) { // TODO code application logic here double hypotenuseLength, hypotenuseArea; Scanner input = new Scanner(System.in); System.out.print("Enter length of hypotenuse: "); hypotenuseLength = input.nextDouble(); hypotenuseArea =...

And these tests do need to pass code to the parser.
@CaptainObvious sorry to hear
Your end-to-end tests that verify refactoring results shouldn't change because of an internal restructuring though
and those are the ones that matter the most
so even when you refactor everything, those pesky tests will still give you the confidence that you didn't break any functionality
Zak
Zak
Greetings from the Office. At 6pm. On a Saturday.
18:34
Hey @Zak
@Mat'sMug That sounds like tests are a bad thing...
@Mast nah, Jeroen is right (duh!) - I don't think the parser will need to change again after 2.0
Instead of returning parse results directly to the caller, I'm maintaining a parser state that sends message to interested parties when the code is parsed/resolved & ready to process
Anyway, gotta go now. Laters CRitters!
I don't want to claim the wifi connection is slower than a turtle but my git clone is working at 6KB/s
7
My internet is FUBAR
My wife is trying to play a game and she keeps losing connection. It's so bad I even lose the chat every couple of minutes.
Lucky you. You get the chat every few minutes!
18:56
@Mat'sMug there needs to be more Brainfuck code on the web!
@SimonForsberg We talked about Battleship in Brainfuck a while back, feeling up for the task?
@Mast after my Sudoku Solver, sure ;)
You guys are crazy.
6
What else is new?
I'm planning on learning MASM this winter between classes.
And I have earned 700 points in my database class and haven't lost a single point.
19:06
I was considering learning some more Haskell this weekend.
I don't even known what MASM is. Although I guess assembler.
Assembly.
MASM is what my system runs on.
At the moment, I don't even know how to run an assembly program. Is it just F5 like the rest of them?
@Hosch250 Alt+F4 will run some assembly program?
Will it? I seriously don't know.
I need to finish writing a cover letter and two discussion posts now.
19:24
@Hosch250 Is there a difference between assembler and assembly? (I guess the first one is not a language, but a tool for assembling code, right?
I seriously have no idea.
IIRC, that is right.
whoa, since when could you make only part of a word with markdown?
Feature or bug?
probably feature
can't possibly be a bug
Hopefully bug, lol.
19:29
A*weso*me
Eh, lol
It renders differently every time you look at it?
Or was it just editing going weird
I've 55% convinced myself to go to some couchsurfing bar meetup
My brain is in an infinite loop trying to go over all possible scenarios and how I should react to them
I hate meeting new people
I do too.
I'd rather have a chat with someone I know, or do nothing, than meet new people.
Why don't you stay home and work on your thesis?
Saturday is the only night I can go out because that's when the trams drive 24/7
It's been a month since I last went out. I'll regret it later if I spent my time in BCN with one or two parties at the most
I'd take a walk in a park, seeing as I don't like parties, but since you do, then go for it.
I'll put a PDF on my phone to read for my thesis. Then I can do both at once
Perfect solution!
19:46
Maybe you can pick up some girls with your thesis?
3
I don't think table of contents are what gets the girls
though I think it's a really sexy table of contents
I would hardly call it that, but it is interesting. More interesting than girls, I'd say.
Zak
Zak
@JeroenVannevel I don't mind meeting a person. But groups of people / parties / environments which don't allow conversation are just torture for my mind.
There are certain advantages to both.
Zak
Zak
Thought I heard gunshots, then remembered a) this is the UK and b) it's firework season.
Anyway, my calculations have been re-done
Back to speedrunning :)
19:51
Your crooks are like Sir Brian and just blip people on the head. Over here, we get shot (and we shoot back).
Well now that we're on the subject: feel free to give me feedback on the table of contents
Any feedback on Online Bachelor's of Computer Science programs? What are the better (online) schools for this Price Vs. Education style?
@Hosch250 I've been wanting this feature for a while.
@Malachi The degrees they produce are virtually worthless so you might as well use the excellent free online courses by things like stanford
@JeroenVannevel Looks nice.
@Malachi I'm taking one, only ITM.
The ones from the U of MN have a reputation of being harder than the on-campus classes.
19:54
@JeroenVannevel Go! Live your life! One day you'll be old!
stanford?
ITM?
Information Technology Management.
And Stanford is an Ivy League college that has free online courses (checkout their webpage or Coursera).
Zak
Zak
That happens in America, I give 70/1 odds that guy is dead before it's over.
And serve him right.
Look at those cops run!
Zak
Zak
@Hosch250 IIRC he's mentally handicapped
19:57
Oh.
@Hosch250 I didn't see any free courses on Stanford's site relating to online courses. looked like they were tuition bases
I've seen them, but they are a bit buried.
Check Coursera.
I followed one partly a few years ago through Coursera: Data Structures
Maybe I should take a Java Course and then mess with the Java people on the site here....
let's see what coursera is all about...
20:05
Zombie Bash: Vote to close: Broken code codereview.stackexchange.com/q/109500/507
doesn't look like these courses are all free....
I think they're all (most?) free but some require a payment if you want a certificate from it
looks like I need to apply for financial aid if I can't afford the fees. it would be nice to have the certificates so I can use them as reference on my Resume
20:23
@LokiAstari Please add a comment on the question about what makes it broken.
@SimonForsberg Well, for one it appears to be missing the closing > for the first line.
20:44
@Mast that's actually not needed. And actually often recommended to don't use.
it's perfectly legal to have <?php but no ?>
@SimonForsberg Done. The braces don't match so it can't work.
21:37
@LokiAstari missing end } ? Could be a copy-paste error.
Afternoon
I'd gladly close it as unclear, but I can't really agree with your current argument for broken.
0
Q: Caesar Encryption-Decryption Tool

Mahmoud NaguibI'm a beginner in Python.I wrote this code which encrypts and decrypts text using Caesar chipher.I wrote it in many days and optimized it manytimes.But how it can be improved more? Notes: *I've used lists because they are flexible and they serve my algorithm. *I'm sorry for any typos! but Eng...

21:58
0
Q: C# .NET MSSQL Wrapper - can this be improved?

LatheesanBack in late 2012, I wrote the following C# .NET MSSQL Wrapper, which offered the following operations: ExecuteScalar (for selecting single field from a row) ExecuteReader (for selecting one or more row) ExecuteNonQuery (for usual CRUD ops - uses transaction) This wrapper was used in a Deskto...

0
A: Checking for duplicate values in database with Python

CaridorcIn python checking membership of an item in a set is extremely fast. I suggest you use sets.

@SimonForsberg If a copy-paste error breaks it, I'd say closing for broken code is valid. It's not up to us to guess what parts of the code are missing.
Currently has 4 OT votes on it.
Zak
Zak
I need to get my head on straight. That's the second run I've abandoned in the last half hour
Sounds like my dad has shingles; bet I get chicken pox just in time for finals.
0
Q: Improving a list filter in Python

ArengornI'm trying to filter a list composed of multiple dictionaries for useless entries and non-ideal fields. An entry is useless if Mem['visibility'] == "redacted" and then should be removed from the list. An entry is non-ideal when any of the fields are empty, and these should be filled with a 0 inst...

Zak
Zak
22:43
@Hosch250 I hope you and your dad get/stay better
Thanks.
Zak
Zak
My speedrun is being irritating tonight
abandoned 3 runs in an hour
Evidently, takes a while to get my head in the zone
@Zak Speed runs take a lot of practice and a bit of luck.
The more you try, the easier it will go.
Zak
Zak
Aye
There's just so many things that need to get setup in the beginning
And if I forget any of them for any noticeable amount of time it's going to block things up further down the road
Even with my spreadsheet on the 2nd Monitor, there's always something that gets forgotten / delayed
Yup, the easy things can be a pain to get right when doing things like that over and over manually. Easy to forget things.
Zak
Zak
22:48
Anyway, 4th times the charm :)
0
Q: Is there a better way to write this load function?

user89041My function opens up a file I saved, (the data structure I'm using is a linked list) and it reads the first variable, which records how many nodes are in the file. From there, it creates that many empty nodes and fills them with the data in the file, is there a better way to do this? (This is pra...

Zak
Zak
23:04
Nope
ooh, I haven't done a pun in ages :)
that was fun
I think, time for a meal break
let my head clear a bit
Zak
Zak
23:33
Right. Let's see if attempt #5 can get past the half-hour mark
1
Q: Basic binary tree manipulation in Rust

WCharginThe goal here is to implement a basic binary tree with values only on leaves, with depth, mirror, and in_order (traversal) operations. I have not used Rust before. Some particular questions I have: In a few places, I'm defining methods by passing self by reference and then matching on its der...

0
Q: Meet Results Displayer

BarryI decided to dive into the world of of JS/JQuery by trying to build a simple web app to display all of my various meet results in an easy-to-view manner. For this stage of the review, all it does is generate a table of all the meets and log some stuff to the console when you click on it. The ap...


« first day (917 days earlier)      last day (3398 days later) »