« first day (978 days earlier)      last day (3043 days later) » 

12:00 AM
RELOAD! There are 1643 unanswered questions (94.5573% answered)
 
{tag:this is a tag}
no?
 
square brackets
 
[tag:this is a tag]
 
@Gustavo6046 No, [tag:tag]
 
This is really good article:
What Is Functional Programming? - Kris Jenkins' Blog http://buff.ly/1RbjUVn
 
12:04 AM
Guys take it to Sandbox if you're testing stuff
 
6 messages moved to Sandbox
 
in The Nineteenth Byte, 36 secs ago, by Alex A.
@Hosch250 Mat's Mug?
in The Nineteenth Byte, 25 secs ago, by Alex A.
I like that guy. :)
@Mat'sMug you got a friend ^ :-)
 
@Quill me tooooooo :D
 
@Quill Because I filter "Cialis" to my junk. Client Support Specialist.
 
12:12 AM
@Phrancis I was thinking getting okays from, say, at least 2 users with over X rep from answers in the specified language. Then it'd solve the problem of obscure languages (since no user would satisfy the rep requirement)
 
@EBrown yeah he said that
 
Getting the reviewers to actually agree might be the hard part though :P
 
@Quill Ah, only skimmed the chatroom.
 
@Sp3000 wat
 
How to do flawless code?
 
12:14 AM
practice, lots of it
 
^ That. And, there is also always room for improvement.
 
the code is almost never flawless? Ok... I guess
 
There is no flawless code. In fact, most code is horrible.
 
I am flawless.
 
@Gustavo6046 Post lots of questions and struggle through lots of answers.
@EBrown So is @JeroenVannevel.
 
12:15 AM
thnx bae
 
@Hosch250 He and I get along together just fine, haven't you seen?
I <3 @JeroenVannevel.
 
some serious C# love going around
 
C# is a very loving language.
 
I won't say I'm perfect, yet.
 
Also, @JeroenVannevel @Hosch250 I have a quick design-ish question.
 
12:16 AM
Sure.
 
Because I have no friggin clue where to put this swathe of code.
 
Utils.Utilities.Utls.Helpers.Helper.MyHelper.cs
trust me
 
@JeroenVannevel Why didn't I think of that?
 
don't forget to make all the methods static too
 
Should it not be: Utils.Utilities.Utls.Helpers.Helper.Extensions.Extension.MyHelper.MyExtension.c‌​s?
 
12:18 AM
OK, really, what does it do?
 
utilities should by definition be static
get in the game, @Quill
 
    public static Dictionary<char, char> NumberToLetterMap { get; } = new Dictionary<char, char>() { { '1', 'i' }, { '3', 'e' }, { '4', 'a' }, { '5', 's' }, { '7', 't' }, { '8', 'b' }, { '0', 'o' } };
    public static Dictionary<char, char> LetterToNumberMap { get; } = new Dictionary<char, char>() { { 'i', '1' }, { 'e', '3' }, { 'a', '4' }, { 's', '5' }, { 't', '7' }, { 'b', '8' }, { 'o', '0' } };
    private static char NumberToLetter(char c) => NumberToLetterMap.ContainsKey(c) ? NumberToLetterMap[c] : (char)0x00;
I Have all that, where's an appropriate place to put it?
 
im not ninja enough @jeroen lemme just go git Seppuku -commit
 
I feel like there must be a better data structure for that
 
in the bin, lol
 
12:19 AM
I asked a couple months ago, no one came up with any.
 
Which project?
 
Private one.
 
OK. Why not create a class just for that?
 
I mean, probably because sometimes I do dumb stuff.
 
do you use it in more than 1 class?
 
12:21 AM
I don't really know. A static class wouldn't be too bad, I don't think.
 
 
Not yet.
@Quill >.>
 
then it goes in the class you're using it
 
Otherwise, just leave it in the one class you use it in.
 
Something about that just feels wrong.
 
12:22 AM
Not really, unless you know you will need it in other places later.
 
I think I might need it elsewhere.
The problem is I want to eventually support multiple replacements.
I.e. 1 can be either i or l.
I'm trying to follow SRP.
And I'm very bad at it.
Oh snap
I just had an idea.
And I think I may need LINQ.
 
LINQ is love. LINQ is life.
VSD is probably 50% LINQ.
 
@EBrown instead of two dictionaries, have a std::pair<std::Dictionary>.
 
@Gustavo6046 This isn't C++, and the two dictionary method is super fast.
But, I just had an idea.
Let me make it reality and test it.
 
12:28 AM
It's what then? Java?
 
I think you should write your own wrapper around KeyValuePair<char, char>
Get some custom goodness
 
looks a lot with
I guess
 
@Gustavo6046 Not really.
 
@JeroenVannevel Well, I just had an idea (which will also support multiple replacements per symbol): I'm going to make a class that parses a string into all possible forms of that string, and returns a List<string> with all of them.
 
12:30 AM
Too broad for me to understand the context
 
Should I make a dictionary class in C++?
 
@Hosch250 sing: all you need is LINQ! all you need is LINQ! LINQ is all you need
 
Well, consider: st4rt 1n h3r3 would parse to: start 1n h3r3, st4rt in h3r3, st4rt ln h3r3, etc.
Eventually it would boil down to start in here.
 
EBrown's Unleetifier works! Hurr Hooray!
 
The idea being to translate text that spammers may garble into something ungarbled.
 
12:34 AM
I want the executable, please! I have everyday a spammer that spams me on another forums and the mods there are too lazy :v
I want to know the messages he really sends me via PM
 
wat
 
nevermind, just give me the code's exe, I can't compile c# in code blocks
 
Gah, I think I need a StringBuilder...and I hate StringBuilder.
 
What's wrong with a StringBuilder?
 
Well, I don't think it'll do what I want.
 
12:39 AM
Do you want to build a string?
 
I think what I need to do is make a new string, and just do single-character replacements on it.
 
Well it.. builds.. a string
 
I don't think I need to build strings, though.
 
I know! You need a Regex!
 
Problem: a string of length n could become up to n strings of length n.
@Mat'sMug I use that for email parsing.
 
12:43 AM
I can show a good ungarbling dictionary in ubuntu paste if you want @EBrown
 
The thing you want to do is inherently expensive: you'll create n^n new strings for every string
 
@JeroenVannevel Well that's not guaranteed.
 
where n is the amount of characters that have been swapped
 
I'll only create m strings (where 1 < m < n) and m is the number of replacement characters in the string. (I.e. characters which have a possible alternative.)
 
then you don't have h4h4. Only h4ha and hah4
if you also want h4h4, you have n^n
 
12:46 AM
Well no, given h4h4 I would come up with hah4, h4ha, and haha.
Right now what I do is create two strings: one which is the original, and one which is all numbers replaced with letters where appropriate.
 
ergo: n^n. h4h4, hah4, h4ha and haha. 2^2.
 
I guess everyone saw my dict. @EBrown , will you use it?
 
@Gustavo6046 Nah, I already have what I need.
 
@JeroenVannevel What was the name of that tool that you put in chat not too long ago that had something to do with being easily able to quickly execute some C#/LINQ code?
 
@JeroenVannevel Ah, you were talking n = number of replacement characters.
 
12:48 AM
2 mins ago, by Jeroen Vannevel
where n is the amount of characters that have been swapped
@SirPython LINQPad
 
@JeroenVannevel Yeah, I'm bad at reading atm.
 
thanks
 
Far too much alcohol in my veins to be doing this hard stuff.
 
It’s that time of year again - we keep growing! Just ordered new Intel P3608 4TB PCIe NVMe SSDs for the Stack Overflow SQL boxes.
 
7 messages moved to Sandbox
 
12:53 AM
What's an effective way to store and limit status messages within a forms box?
 
In case anyone was curious, I wrote this query^^
 
@JeroenVannevel @Hosch250 Can you help me with some LINQ-to-XML stuff?
 
I can try.
I've only done this once.
 
I can pretend to know something about it
 
I gtg now, bath time.
Bye! :)
 
12:55 AM
@Hosch250 That's what...nevermind.
Alright, so my little brother sent me this thing.
 
I've got my code on on GitHub, if you want to take a look.
 
Basically, it's a bunch of little XML documents all merged together.
<?xml version="1.0" encoding="UTF-8"?>
<SMS>
<X-VZW-SMS-FROM-TO-ADDR>###</X-VZW-SMS-FROM-TO-ADDR>
<X-VZW-SMS-CALLBACK-NUMBER></X-VZW-SMS-CALLBACK-NUMBER>
<X-VZW-SMS-RCVD-DATE-TIME>###</X-VZW-SMS-RCVD-DATE-TIME>
<X-VZW-SMS-PRIORITY>Normal</X-VZW-SMS-PRIORITY>
<X-VZW-SMS-READ-FLAG>read</X-VZW-SMS-READ-FLAG>
<X-VZW-SMS-MSG-TAG>###</X-VZW-SMS-MSG-TAG>
<X-VZW-SMS-MESSAGE-TYPE>SMS</X-VZW-SMS-MESSAGE-TYPE>
<X-VZW-SMS-MESSAGE-ENCODE-TYPE>ascii</X-VZW-SMS-MESSAGE-ENCODE-TYPE>
<X-VZW-SMS-MESSAGE-BODY>Text</X-VZW-SMS-MESSAGE-BODY>
That's what they look like.
 
OK.
So what do you need?
 
I want to pull all this stuff in and then parse it to objects.
Problem is that they are all individual XML files that look like that.
So, let me see what I can try here first before I come running for help.
 
That reads from/saves to the file.
 
1:00 AM
@EBrown xsd.exe
 
@Mat'sMug Wut
 
It's part of .net. IIRC it takes any .xml and generates classes
 
Bah, no time for that.
 
lol, it's a time saver
 
I'm gonna use Regex.
 
1:04 AM
to parse xml
 
Yes.
 
virtual whack
 
But not HTML.
So Zalgo will not come.
Actually, I'll just use substrings.
 
Isn't HTML just a specific form/specification of XML?
 
^yes
 
1:06 AM
^^^
 
@SirPython Not really.
 
It is now, anyways. I'm not sure it always was
 
HTML is a bit different. XHTML, on the other hand, is more like that.
 
XHTML is anyway. And the Zalgo answer is about XHTML
 
Noob to CR and I wanted to comment on an answer. Not enough rep. What are my options?
 
1:07 AM
Get some rep! Post some working code up for review :-)
 
@Mat'sMug My question from this morning still needs an answer. ;)
 
@SirPython xml came after html
@EBrown kids need a story and a song, bbl
 
Well they obviously come first. :)
 
Will do.
 
@sfanjoy great! Welcome to CR BTW! :-)
 
1:14 AM
Nevermind, got LINQ-to-XML to work.
Sorta.
 
codereview.stackexchange.com is a good place to go to get feedback/suggested improvements on code. Definitely recommend it. — br3nt 39 secs ago
 
Couldn't an XML parser parse HTML visa-versa?
 
To an extent.
Though that's a bit like saying a C++ parser could parse C# code.
To an extent, yes that is true.
So that XDocument stuff wasn't so hard.
 
1:32 AM
public string Status { get; set { SendStatus(value); } }
 
@Quill Invalid.
 
How does one effectively use "side-effects" in setters
and yes, VS tells me so
 
You have to specify the getter as well.
public string Status { get { return string.Empty; } set { SendStatus(value); } }
And define "effectively."
 
wouldn't that make status return empty
 
Yes, but what exactly are you trying to accomplish?
private string _status;
public string Status { get { return _status; } set { _status = value; } }
private string _status;
public string Status { get { return _status; } set { _status = value; } }
 
1:35 AM
Trying to call a printer method when the Status is set
 
Then add SendStatus(_status_); at the end of the set method on the property.
That will not only keep Status persistent, but also call SendStatus when it changes.
(You can only do this with a backing field, at least for now.)
Anyone else getting odd issues with the chat?
 
Flag issues?
 
Yeah, flag issues
 
What flag issues?
My chat just crashed, twice.
 
Somebody in The Nineteenth Byte spammed an emoji face like 4 messages worth of 20 characters
Like 9 or 10 flags
 
1:38 AM
Can we flag flags?
 
Oh, I see.
 
@Quill that sounds very much like a violation of POLS
 
POLS?
I'll just use a helper method ;-;
 
Principle Of Least Surprise
Properties are data; methods are actions
 
Everything is everything.
 
1:42 AM
        public void PrintAndSetStatus(string message)
        {
            SendStatusToLogBox(message);
            Status = message;
        }

        public string Status { get; set; }
 
0
Q: Multithreaded entropy calculation and the Additive property

j.jerrod.taylorI'm trying to write a fast entropy calculation program. I already wrote a program that works which you can see below private double log(double num, int base){ return Math.log(num)/Math.log(base); } public double entropy(List<String> data){ double entropy = 0.0; double prob = 0.0; ...

 
@Quill What does SendStatus do? Would it make more sense as an event?
 
that might be a better name for the method
 
Why would the setter be public then? FooAndBar sounds like a violation of SRP ;-)
 
@Mat'sMug SRP? JFCTA
 
1:45 AM
@Quill Single Responsibility Principle
 
Single Responsibility Principle ;-)
 
@EBrown oh right, I think I got up to there in Clean Code
in The Nineteenth Byte, 50 secs ago, by Quill
Note, we don't have bot issues on CR, but that's because we don't golf our code :P
@Mat'sMug so if I re-named the PrintAndSetStatus method to HandleStatus, would that be SRP okay?
 
No
It has more than one responsibility.
You should use an event.
 
0
Q: Golang: executing periodic tasks

TanmayThakurI am writing a code in Golang to execute a periodic function (every 2 second). According to documentation and an example I have written two programs. Can anybody tell which one is better. Also, is there another better solution? Code-1: package main import ( "fmt" "time" ) func periodi...

 
Depends what the method actually does - I'd say get whatever you're trying to do working, and put it up on for review :-)
We'll shred it accordingly
 
1:56 AM
@Mat'sMug alright, then
 
@MirosÅ‚awZalewski: I think you are correct that Code Review would have been a better choice. I actually wasn't aware of that sister site. — Kenny 25 secs ago
 
2:10 AM
codereiew is a forum to invite feedback on how to improve working code. — Traktor53 11 secs ago
possible answer invalidation by Jamal on question by guitar_freak: codereview.stackexchange.com/posts/30922/revisions
 
0
Q: Prim's MST implementation

Ankit MishraThis is my full working code. I am a bit confused about how I was able to use the structure MinHeapNode's variable in my Graph.cpp file. I used it's v and key variables in PrimMST() function. I need suggestions regarding definition of MinHeapNode as a class. And how safe it is to use this struc...

 
I didn't know @flambino was into rockets. Nice read here:
3
A: Engineering difficulties towards near-perfect rockets?

FlambinoJust another analogy to maybe help explain why #EverythingIsTrickyNotJustRockets (in addition to the great answers already here). Take Formula 1 racing. It's a sport with some extremely complex machines, built to the very edge of engineering and manufacturing capabilities to give as much perform...

 
I'm voting to close this question as off-topic because questions about working code, seeking advice for improvement are better suited for codereview.stackexchange.com. — Jonathon Reinhart just now
I'm voting to close this question as off-topic because it belongs to codereview.stackexchange.comPaul 49 secs ago
 
5 messages deleted
oops
 
2:22 AM
Thanks Mug, good move there with the delete hammer
 
DELETED
WHAT IS GOING ON WITH THIS CENSORSHIP
 
I was going to delete the whole bunch
 
Ah, sorry. You can delete from The Nth right?
 
yeah, but then, I need to go to the Nth
 
Well, they'll all be in one block, shouldn't take but a few seconds ;p
Today's been exhausting here, TBH.
 
2:24 AM
(removed)
 
I need a nap, man.
 
Can we please go back to talking about code and starring lol?
 
@Mat'sMug ^ is that enough for a review or would it be 'missing code'
 
we've seen worse code actually fly. does it work?
 
Well, I'm having major problems with the MEF framework implementation this runs in
So I can't necessarily run the entire solution, but yes, it works
 
2:36 AM
MEF?
 
Woot! I love rapid dev.
 
Effectively you just build plugins that are dropped into the bigger solution
it's good for this scraper solution because I can build a plugin for each site and have the bigger scraper functions as external classes
 if (string.IsNullOrWhiteSpace(url) || string.IsNullOrEmpty(url)){ return; }
nope totally returned after the first failure -__-
 
the 2nd one encompasses the 1st one
 
Ah, I wasn't sure, thanks
 
2:55 AM
Found a quotable...
> Side-effects close the door to black box testing, because you can't get to the inputs & outputs without cracking the box open and learning what's inside.
 
Wow, one 595 LoC class.
That completely violates SRP.
 
LOL
2
 
I can't VTD anymore or I would have done that.
 
boom gone
 
Tyvm.
Yeah, I might need you to give this class a once over at some point, @Mat'sMug.
Which, I think about 400 of these LoC are XML comments.
 
3:05 AM
file Rubberduck.Parsing.Symbols.IdentifierReferenceResolver.cs is 1,014 lines, that's why I lol'd
 
@Phrancis Quick caveat to my suggestion, you may still want to give the question the responsibility of telling the player if they were wrong or not if you want each question to have a customised response. But whatever you do the important bit is that the questions don't decide what happens next, their manager/controller does. — Pharap 21 mins ago
 
all it does is figure out which declaration a given identifier reference points to
 
This person^ is a helpful person
 
One of these methods has a maintainability index of 19.
That's a sign that a method does too much.
A grand total of 263 LoC and it works completely as expected.
 
IdentifierReferenceResolver has a maintainability index of 60
 
3:08 AM
@EBrown That doesn't sound too bad, all things considered
 
It needs some help, though.
I need to extract a few methods out.
 
one of the ResolveInternal overloads has a cyclomatic complexity of ....23
 
All unit tests checking in good from that 263 LOC?
 
@Phrancis No unit tests.
 
Oh right, test in production :)
@EBrown @TODO make unit tests
 
3:11 AM
Yep. :)
 
I got the bigger sumbrero ;-)
(cowboy hat is too small)
I'm such a "do as I say, not as I do" dude
 
well my code works finally ;-;
 
Cardshifter has some unit tests (Groovy makes it quite delightful) but I assume the vast majority of programmers hate writing tests
 
(removed)
 
TTGTB, 'night @all.
 
3:17 AM
night
 
'night!
 
from clearState test 'spellcards' using {
    def spell = to you zone 'Hand' create 'Destroy Spell'
    def targetCreature = to opponent zone 'Battlefield' create {
        creature 'Mech'
        attack 1
        health 4
    }

    uses 'End Turn' ok
    uses 'End Turn' ok
    uses 'Use' on spell withTarget targetCreature ok
    assert targetCreature.removed
    assert spell.removed
}
It's using our DSL, and Groovy (which I think implements JUnit)
(note, there are 5 unit tests in there, I think)
(or maybe it's 1 unit test with 5 clauses)
 
3:55 AM
possible answer invalidation by Edward on question by Jonathan Smit: codereview.stackexchange.com/posts/115976/revisions
 
@Duga all good
 
4:09 AM
0
Q: C++ Template for one to many Registration (pre Gang of Four)

sfanjoyI use this template to lookup clients registered for data. The data is associated by name(key) and clients are shared pointers (value) to a class which will consume the data. //////////////////////////////////////////////////////////////////// // // Registrar Template to help manage Key to Value...

 
4:44 AM
It looks like you're asking for a code review - please look at the help center of codereview.stackexchange.com to see if your question is on-topic there. On StackOverflow, you're question is too broad/asking for opinions. — Erwin Bolwidt 51 secs ago
Voted to close as too broad, and flagged for migration to Code Review - feel free to edit the title to concisely say what the code is doing and that post will do great on CR =) — Mat's Mug 24 secs ago
 
Zak
4:59 AM
Monking @all
 
hi!
 
@Phrancis Writing tests with RoslynTester isn't bad at all.
Hi, all.
 
hey @Hosch250
 
error day today ;-;
 
you have no idea
WS : [ \t]+ ('_' '\r'? '\n')*; // why doesn't this pick up indented continued lines?
 
5:04 AM
I don't think I've had a working build all day
 
5:24 AM
WS : ([ \t]+ ('_' NEWLINE)*)+; // yay!
 
0
Q: Reusable REST service class for Angular2 in TypeScript

AstrOneI am creating an Angular 2 web application using TypeScript. This application performs REST requests to a REST "service". For each REST resource in my service I create a separate "Service" class in Angular2/typescript (e.g., class ServiceA for resource A, class ServiceB for resource B, and so on....

 
I googled your title (well the three most relevant words) and found (codereview.stackexchange.com/questions/84697/…). Should maybe do the trick. — Cheers and hth. - Alf 42 secs ago
 
@Duga hey that's a zombie!
 
Zak
5:51 AM
Had to go buy some actual shirts yesterday. The directors from a company we're looking to acquire are coming in today to have a look around so we've all been told to dress smart(er)
 
public string GetFacebookPicture(string url) {
    // does operations here
    return String.Empty;
}
and I thought my code was bad
well it is, but...
what kind of Get named method returns string.Empty? wtf
 
that should be throwing a NotImplementedException instead of returning a wtf value
 
it calls an upload method, using the url
 
TTGTB
 
6:06 AM
Me too. Talk to you all later.
 
see you guys later. I might interrogate you guys later about some C# stuff if that's okay
 
0
Q: SQL Inserting up to 10'000 records from a table to a secondary table

Byren HigginI'm relatively new to asp.net and working with larger data sets as a fresh graduate, and I am currently maintaining/developing for an ASP webform and T-SQL system at the moment where we have a database table with ~4000 records, BUT there is potential for multiple key differences leading up to 10'...

0
Q: Best way to unittest apiController MVC 5 .NET. using visualstudio test

TotodileSo i new with api controller and i just found a few diference from normal controllers, so wich is the best method to cover unittestin of apicontrollers that are the basic crud ?

 
6:27 AM
This qustion belongs to the another site http://codereview.stackexchange.comFabio 57 secs ago
@Fabio This question is too hypothetical for Code Review, it would be closed. — Quill 57 secs ago
@Fabio, It does not meet Stack Overflow's requirements, however that doesn't automatically make it acceptable for Code Review. — Quill 22 secs ago
 
^ Honestly, Code Review is not a broad-stroke Close Reason for SO
 
0
Q: When to user interface or abstract class?

DeveloperI have some doubts when to use abstract class and if I need to always code interface? An Example : Student Registrations System Model Class : namespace SampleOops.Model { public abstract class Person { public int ID { get; set; } public string FirstName { get; set; } ...

 
are you serious
 
6:42 AM
@Mat'sMug What's the bug?
@Mat'sMug Alone with what?
 
HTML escaping on Duga's message
 
I blame Stack Exchange API
 
In the second username field the apostrophe wasn't turned back and was printed as the escaped character set
Unfortunately, Hypothetical code is strictly off-topic on Code Review. — Quill 4 mins ago
 
0
Q: Image Scrolling in UITableView with Parse

user3904534I'm trying to create an app that is scalable. One of the main features of the app is to view images from a database to a UITableView. Here is my code: import UIKit class HomePageTableViewController : UITableViewController { private var imageObjects: [ImageParseObject] = [] private var skipNum...

0
Q: dynarray implementation with iterator

DeiDeiSo here is an implementation of a dynarray. Many people might not know about it, so here is a reference: http://en.cppreference.com/w/cpp/container/dynarray Note that I am not trying to write a 100% standard conforming implementation. Also, this is for a library, so resist the urge to scold me ...

 
Zak
7:02 AM
I need to get up now. But it's cold :(
 
-1
Q: How to avoid duplicate values

johni have two tables table1,table2. table1 data: idcolumn namecolumn 1 john 2 wick table2 data: idcolumn namecolumn 3 will 4 smith my query is : select distinct table1.id,table2.id from table1,table2 data output is: table1.id table2...

 
7:30 AM
0
Q: Login system with session using CodeIgniter

noushid pI implemented a login system, with session, using CodeIgniter. If the session doesn't exist, redirect to login page. Please review, and let me know what can be done to make it better. view (login.php) <body> <?php echo form_open(base_url('verify'),['id' => 'loginForm', 'name' => 'loginForm', 'm...

 
 
1 hour later…
8:31 AM
monking @all
 
monking
 
8:43 AM
Comments can be made; however, I think you question is more apt for Stack Overflow's Code Review forum. Can anyone move this to code Review? — Paul Ogilvie 58 secs ago
@PaulOgilvie The question seems better suited for Stack Overflow. Code Review requires complete, working code examples. — Lundin 20 secs ago
 
0
Q: Two over-complicated UART interrupt handlers for SIM900 GSM module

LShaverUARTIntHandler0 interfaces through the MCU to the USB UART for debugging. UARTIntHandler1 interfaces to the SIM900 GSM module. The purpose of UARTIntHandler0 is very simple - grab an incoming character and push it to UART1 (the GSM module). UARTIntHandler1 is more complicated. In "talk mode,"...

0
Q: What's wrong in my models.py in django project?

Vassiliy VorobyovThere is a draft of my models.py. What can I do for code quality and readability increase? from datetime import timedelta from django.contrib.auth.models import User from django.db import models from django.utils import timezone class Rule(models.Model): start_date = models.DateField() ...

0
Q: Using GetTempFileName api function to check write access to a directory

Mehrdad MomenyOn windows, to find out if I have write access to a directory, I found that it is easiest to just create a file in that directory. In order to do so, I found GetTempFileName() API function to get an almost(?) unique file name in the desired directory, then I was going to create a file with that ...

 
Asking for refactoring a working code? -> codereview.stackexchange.comAndreas 15 secs ago
 
8:58 AM
Monking friends :-)
We've got a lot of pinned messages, can we unpin chat.stackexchange.com/transcript/message/26391522#26391522?
 

« first day (978 days earlier)      last day (3043 days later) »