« first day (571 days earlier)      last day (3447 days later) » 

12:30 AM
0
Q: encrypting with python

Jeremiah32def decrypt(key, br): decoded = ' ' for i, c in enumerate(br): key_c = ord(key[i % len(key)]) br_c = ord(c) decoded +=(chr((br_c - key_c) % 127)) return decoded def encrypt(key, ar): encoded = '' for i in range(len(ar)): key_c = ord(key[i % len(key)]) ar_c = o...

 
12:54 AM
0
Q: Create array from SQL queries - Very Inefficient, needs streamlining

fightstarr20I have been working on this for a while and have finally made things work how I want them to work. I realise that my code is super inefficient and this is showing by the really long time it takes to load the data :( I am using SQL queries to create an array as follows... function table_data() ...

 
1:08 AM
0
Q: understanding code snippets for encryption

Jackiedef decrypt(key, br): decoded = ' ' for i, c in enumerate(br): key_c = ord(key[i % len(key)]) br_c = ord(c) decoded +=(chr((br_c - key_c) % 127)) return decoded def encrypt(key, ar): encoded = '' for i in range(len(ar)): key_c = ord(key[i % len(key)]) ar_c = o...

 
1:25 AM
0
Q: Parse a csv file and create a dictionary of partial results

MarkI have a bunch of csv files which I have to read and look for data. The csv file is of the format: A row of data I will ignore State,County,City WA,king,seattle WA,pierce,tacoma In every csv file, the order of columns is not consistent. For example in csv1 the order can be State,County,City, i...

 
1
Q: Snippets Manager

JaDoggWhat it does is basically manage a set of snippets, save and load it. snippets.cpp #include "Features/snippets.h" #include <iostream> Snippets::Snippets(QObject* parent) : QObject(parent) , m_Snippets(nullptr) { bool success; LoadSnippets(success); } void Snippets::LoadSnippet...

 
damn it I missed a day now my consecutive days are one again. Nooooooooooo
Glad I got fanatic before that
 
Sorry about that @JaDogg
 
@JaDogg I don't know Qt. :-/
 
1:37 AM
Doesn't look too bad, does it?
 
2:02 AM
Shiny.
 
Good.
Also, hi @jmblack :)
 
Hello @Phrancis! Is that site for a sample project or a real project?
 
2:39 AM
Ahhh neat.
Trying to parse database schemas currently. Not quite as shiny as that screenshot by a bit.
 
I'm pretty good with SQL, if you need any help @jmblack
 
Thanks, but I'm actually writing a .Net library that either parses the DDL from a SQL schema on file, or retrieves schema information via DbConnection.GetSchema() requests in order to store information about the entities and their relationships. So there's not too much SQL other than parsing some of it.
 
Ok, I hope you get the help you need @jmblack
 
Thanks!
I just like idling here sometimes. I don't interject too much.
Kind of quiet in the hours I'm on too ...
 
2:54 AM
There's always someone lurking here...
 
Also I'm not sure how many .NET folk are in here. Not that it -really- matters when you're talking patterns and design ...
 
I think there are plenty of .NET folks in here!
Could probably name 5 right from memory
How bad is this code?
<span>
  <ul>
    <li><a href="https://github.com/Cardshifter/Cardshifter" target="_blank">Java repository</a>
      <ul>
        <li><a href="https://github.com/Cardshifter/Cardshifter/issues" target="_blank">Issues</a></li>
        <li><a href="https://github.com/Cardshifter/Cardshifter/wiki" target="_blank">Wiki</a></li>
        <li><a href="https://github.com/Cardshifter/cardshifter.github.io/graphs/contributors" target="_blank">Graphs</a></li>
      </ul>
    </li>
    <li><a href="https://github.com/Cardshifter/cardshifter.github.io" target="_blank">Website repository</a>
 
missing a </ul> there
 
Good catch
 
i'd remove the target="_blank", people can open in a new tab if they want
 
3:08 AM
Is it bad to want to force it?
 
i think so
 
Main reason I'm asking is that all external links are vastly more popular, so I'd like to let the user keep a source page open
 
1
Q: C++ Prime Factorization

soktinpkI just picked up C++ today and I wonder if this is c++-like. I have a bit of experience with Java. This is a program that takes a number as input and outputs its prime factorization in no particular order. Specific questions: Am I using std::vector correctly? With all the insert, maybe there ...

 
then they can right click, ctrl click, whatever
it makes sense in chat here to force it, since you'd keep leaving the chat room by following links. but i think those sort of cases are the exception
 
So your thought is to get rid of that mechanic completely?
 
3:11 AM
I often like the new tabs when it's an external site, but if all of your links are external then eh?
 
that would be my choice yeah. i'm trying to think of a site that opens new tabs all the time
 
StackExchange :)
 
Or if leaving the site would lose you a bunch of useful state.
Hmm, what on SE auto opens new tabs?
 
woohoo!
 
Anything from chat, anything from notification bar... I think that's it
@mjolka Very nice :D
 
3:14 AM
thanks :)
 
    <div class="col-sm-3 col-md-2 sidebar csh-nav-background csh-nav-padding">
      <ul class="nav nav-sidebar">
        <h4><a class="csh-nav-link" href="index.html">Home</a></h4>
        <h4><a class="csh-nav-link" href="play-cardshifter.html">Play Cardshifter!</a></h4>
        <h4><a class="csh-nav-link" href="news.html">News</a></h4>
        <h5><a class="csh-nav-link" href="https://github.com/Cardshifter/Cardshifter/releases" target="_blank">Latest Release</a></h5>
        <h5><a class="csh-nav-link" href="https://github.com/Cardshifter/Cardshifter/issues" target="_blank">New Git issu
^^ This is my left-hand menu. The only links that target="_blank" are to external sites
I guess it comes down to whether I choose to annoy the power-user with unnecessary windows/tabs, or to annoy the average-user with having to back out to the main site... :|
 
debugging async programs omg i miss stack traces
 
@mjolka Yeeeep.
@Phrancis It's probably not worth fussing over more. Change it later if people complain.
 
@jmblack Sounds like words of wisdom right there
 
I try!
 
3:28 AM
@jmblack you're not australian by any chance?
 
@mjolka Nope, east coast US
 
3:54 AM
0
Q: Python: Factory Design Pattern

PhoenixThere is a lot of explanation on Factory Design Pattern in CodeReview. However I cannot find example in python. So here is sample code which I want to use in my project (Names of class is changed). #!/usr/bin/env python from abc import A...

 
4:15 AM
0
Q: A circular buffer of size N

pertpoertMy task: Implement a circular buffer of size N. Allow the caller to append, remove and list the contents of the buffer. Implement the buffer to achieve maximum performance for each of the operations. The new items are appended to the end and the order is retained i.e elements are p...

0
Q: Smoothness of jQuery animate width

dccI'm developing a site with a similar structure as this basic demo I put together; whereas, clicking any of the columns, collapses the others, and moves the clicked element to the left, revealing the page content, loaded via ajax. When I first started, I began with this for the animation: jQuery...

 
5:13 AM
0
Q: Python Beginner writing a leap year calculator

reydrianCreating a program to determine whether or not a given year is a leap year (I know...It's been done). Just wanted to get anyone's feedback on it. Also, I am aware of the calendar module in Python. Just wanted to try it from scratch. Code is : year=int(raw_input("Input year:")) if (year%4==0 and...

 
5:48 AM
0
Q: Read a Tab Separated File and Assign Each Column to a Separate Variable

BahraniThe following python code reads a tab separated file which contains multiple columns. I have store each column in a separate variable then tried to store the column into a dictionary and print out the the values of the dictionary. import csv dic1={} dic2={} with open("Table.tsv") as samplefile: ...

0
Q: TopCoder problem "Lottery" - SRM 144 (Division I Level Two)

PrakharThe problem statement My accepted working code is as follows. How can I make this more simple and efficient? //package topcoder.srm.srm1_div1; import java.math.BigDecimal; import java.math.BigInteger; import java.math.RoundingMode; import java.util.ArrayList; public class Lottery { public St...

 
Monking @all
 
6:22 AM
HAI
 
6:39 AM
0
Q: NodeJS the right way to do validation

DeepsyI'm building a NodeJS application, but I'm not sure what will be the best way to structure my code. So I have the following model: /** * Module loading */ var mongoose = require('mongoose'); var Schema = mongoose.Schema; var ShortId = require('mongoose-minid'); var async = require('async'); ...

 
Hey
 
0
Q: The right place to place angular modal

DeepsyIn my app I have a BaseCtrl, which is attached to the body element and is available everywhere. In the mentioned controller I have the following code for opening modal: $scope.addFolder = function($event) { $event.preventDefault(); // Opens an add folder modal var mo...

 
 
2 hours later…
9:10 AM
0
Q: Redundant VBA Code Simplification Request

AileenQI wrote a super redundant VBA code and it works and solve my problem. I am trying to simplify it but don't know where to start due to my limited knowledge in VBA. Appreciated if anyone could give a helping hand. Thanks in advance. Basically, this code works as vlookup function and return all req...

 
9:20 AM
4
Q: Snippets Manager

JaDoggThis basically manages a set of snippets, saving and loading it. snippets.cpp #include "Features/snippets.h" #include <iostream> Snippets::Snippets(QObject* parent) : QObject(parent) , m_Snippets(nullptr) { bool success; LoadSnippets(success); } void Snippets::LoadSnippets(bool&...

 
9:36 AM
0
Q: Guestbook (JSF, JPA)

ultranoiseSimple guestbook made with Java EE 7 (JSF, JPA). Implements MVC pattern. Does the code follows the standard best practices? Is there a possibility for improvement? Guestbook entry entity package learning.guestbook2; import java.io.Serializable; import java.time.OffsetDateTime; import java...

1
Q: Clicking menu li's

JuliaI'm a beginner in jQuery and am wondering how I could write the following code shorter, since I'm repeating a lot. $('#overlay-menu').bind("click", function() { $(".overlay").addClass('overlay-open'); $("#overlay-menu").fadeOut(800); }); $(".overlay-close").bind("click", function() { ...

0
Q: Point2D.Double wrapper

Dimitris KI have made a Point2D.Double wrapper so I can add my own functionality (like a dominate method) and alter some (like toString) and control some (like not having public access to x and y). Point class: public class Point implements Serializable { private final Point2D.Double point2D; p...

0
Q: Adding Javascript/Jquery to php mysql

Dustin LawrenceOk, first time asking for help. I've been teaching myself php / mysql / and javascript/jquery the last 4 months so I think I'm on the right track. I've just hit a speed bump though. I have a php script that is included in my html which is tested and working. I'm trying to add javascript function...

 
10:36 AM
Ok, got it. I wanted to make "+1" but my reputation is not allowing me. — Prakhar 4 hours ago
 
@200_success no more now...
 
10:54 AM
does any one of you uses atlassian bamboo ?
 
11:48 AM
0
Q: How Can I Restructure These Associations?

PedrI have the following set of Models / Associations: Whilst this makes sense from on object oriented point of view, it introduces a huge distance between, for example; a NewsItem and the Photo.image that represents it in the UI. An obvious improvement would be to dispense with MediaItem and mak...

0
Q: how to fix date format when converting text files into excel file with macro

user3333321i use amacro to convert txt files into xls but i have the problem that the fields with dates are not converting in the right format. for example i have the date 4/11/2014 (dd/mm/yyyy) and when the file is converted into xls, i have the date shown like this :11/4/2014. how can i fix it? Thank y...

 
12:05 PM
I consider this comment a statement of anti-german hatred and have taken according measures. — Vogel612 11 secs ago
WTF?
 
Seen, and deleted.... will monitor.
 
thank you
 
@Vogel612 - FYI, there's no reason to add an additional comment after flagging things. Just move on.
 
@rolfl I'll keep it in mind for next time ;)
 
@rolfl @Vogel612 can take this a little personal to, he is german ;)
 
12:18 PM
@chillworld which is somewhat exactly the point ....
Either that person guessed well from Vogel->German, or they even stalked my profile for this
anyways not my problem anymore, question is on my blacklist..
 
I finally found the motivation to write my CV once again.
 
@Morwenn you have some spare so I can wrap up this documentation?
 
@Morwenn Can I get some??
 
@Vogel612 Some spare CV or some spare documentation? :p
 
@Morwenn motivation..
I could really use that right now..
 
12:22 PM
I'm actually at work working though
Had an interesting course of actions..
 
@Vogel612 Yeah, I have some spare, but I intend to use it to contact my dentist.
 
Told my parents that class was cancelled, then the girl I was supposed to meet up with cancelled it yesterday evening... So I decided I better not waste my time and go to work.
 
xD
 
(Classes usually don't uncancel themselves)
 
0
Q: Resizing image but keeping aspect ratio

John DemetriouI wrote some code that resizes an image to fit in a given box. I think that some parts of the code are not needed (for example if it's a box image). Is there a more efficient way to do this? Is there something wrong with me code? (from the results it looks ok) Is there a "shorter" version to do t...

 
12:32 PM
@skiwi You can make a class call its own uncancel method.
 
class.uncancel(); ?
 
CamelCase! ... unCancel()
 
@rolfl But it doesn't feel right if you do it like that!
uncancel() and UnCancel() feel acceptable, unCancel() for some reason doesn't
 
0
Q: Converting Graph to Line Graph in C++

emre boyrazI have problem converting graph to line graph. The steps are to converting graph; 1- a) get incident matrix of a graph. b-) get transpose of the incident matrix c-)multiply incident matrix and its transpose (incident matrix * its transpose) d) create 2*Identity matrix . e) ...

0
Q: Using an action array vs switch case

John DemetriouI have an occasion of code in which I will draw a different set of buttons in a screen (depending on the number of the buttons). One thought (and my current implementation) is to use an action array and call a different action Action[] array = new Action[9]; array[0] = one; ...

0
Q: What's wrong with the code? Getting NullPointerException sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

MSatiCode: import java.util.*; import java.io.*; public class LinkedList{ private Node first = null; private class Node{ int data; Node next; } public void insert(int x){ if(first==null){ Node first = new Node(); first.data = x; first.next = null; } else{ ...

0
Q: Constructing levels by tiles, good idea or disaster waiting to happen?

VolearixFirst off, I'm sorry if this is the wrong forum, I'll happily delete and post elsewhere if so, but what I have done is created five or six different sets of 2x2 2x1 floor tiles and 2x1 2x2 2x3 & 2x4 wall tiles with and without door openings in the Blender modeling software for use in my Unity3D g...

 
1:05 PM
Is there any rationale for not downvoting questions that are obviously off-topic?
 
On the contrary, there's a good reason to downvote them.
downvoted questions that are closed are deleted automatically by the system.
(after a few days).
 
0
Q: Is my implementations meets OOP and SOLID requirements?

PulkownikI am creating a zoo. In my zoo i want to have 3 types of animal: Mammal, Bird and Fish. I want to keep them in cages. So my implementation of animals is (classes for Mammal and Fish looks almost the same as Bird only TypeEnum is different): public class Bird implements Animal { priva...

 
> The system will automatically delete closed (not as a duplicate), unlocked questions with zero or negative score having no upvoted or accepted answers or pending reopen votes, that were closed 9 or more days ago and haven't been edited in the past 9 days.
 
I always downvote them if there's no obvious mistake made, but seems like nobody follows me in that
 
People don't like downvoting.... it's a psychological thing.
It does apply to your daily 40-vote limit....
so, downvoting already-downvoted stuff would be unnecessary
 
1:12 PM
Ah, I see
Maybe I should vote more!
Like... the upvote kind of thing
 
> In my zoo i want to have 3 types of animal: Mammal, Bird and Fish. I want to keep them in cages.
The fish will die.
3
 
@Heslacher Maybe cages filled with water?
 
It needs to be very unfluent water, maybe ice ? No, won't help the fish.
Lungfish (also known as salamanderfish) are freshwater fish belonging to the subclass Dipnoi. Lungfish are best known for retaining characteristics primitive within the Osteichthyes, including the ability to breathe air, and structures primitive within Sarcopterygii, including the presence of lobed fins with a well-developed internal skeleton. Today, lungfish live only in Africa, South America and Australia. While vicariance would suggest this represents an ancient distribution limited to the Mesozoic supercontinent Gondwana, the fossil record suggests advanced lungfish had a widespread freshwater...
 
0
Q: IFFT algorithm in C to be implemented in TI DSP

Abhinav VishakI have written a IFFT code based on the cooley tukey algorithm in the C langauge in codeblocks IDE. While the code runs fine and results are numerically correct, I am concerned about the dangling pointers created by malloc() in recursive function calls. How do I free pointers even and odd created...

 
@Heslacher Who said a cage cannot have walls?
 
1:26 PM
Me ;-) For me a cage has lattice at least at one side. Otherwise it would be a box.
 
Fair enough ;)
 
@Heslacher I agree, but the cage can be filled with water, just not for long ;-) Alternatively, the cages can be in the water ;-)
 
@rolfl But then the mammal and bird will die!
 
@skiwi Exactly
 
penguins and dolphins?
 
1:33 PM
hmm how about we just call this thing.. Container?
 
penguins won't live long under water
 
or... Enclosure?
 
Or habitat?
 
ohh that one's nice..
 
2:04 PM
How would you put a database under version control when developing?
Assume you have a develop branch and two features branches that modify the database in their own way
And the database has both a structure and actual test data
 
then you're probably quite borked...
you should separate data from structure first.
it might be interesting to create some test-data and put them into a complete "backup".. aka. Inserts of doom
that can be versioned..
 
But how does it work out in practice?
Wouldn't you simply want to checkout a branch and have a modified structure and data?
 
you want the data changed? then do so manually ...
alternatively... version the binary representation of the databases storage..
but alas, that's slightly counterproductive from a storage PoV...
 
Exactly
 
well then you could use a git hook to run a full update for the database on checkout
 
2:23 PM
hiya
 
Heya
 
0
Q: batch file to zip logs date wise

Vaibhav VeralkarThis is the batch file i have created which zips the particular month logs and the delete those logs from the source folder after zipping get successful. If it does not found the zip file then it again starts to zip the logs. Please suggest any changes to be done. Thank you. This is my code: @e...

 
 
1 hour later…
3:43 PM
Slow today.
 
I'm guessing many are traveling or making preparations for Thanksgiving tomorrow (those in the USA anyways)
 
Some are working ;-)
2
 
0
Q: howto compute fast (x+yCx)%mod

bilboI want to compute fast ((x+y)!/x!y!)%mod with x,y<=1e6 and a prime mod=1e9+7 My approach is too slow: I actually compute Prod(y+1,y+x)%mod *InverseMod((factMod(x))%mod) with this implementation: static inline ll powmod(unsigned a, unsigned b){ register ll x=1,y=a; while(b){ if(b&1){...

 
Heya folks.
Any ideas how to name a function instead of fermat_witness_liar_count?
I takes a possible prime number and returns the count of its fermat witnesses and liars if any.
 
@kleinfreund What's wrong with that name?
 
3:56 PM
That actually sounds like a pretty good name...
 
Hm, alright. Thought it's a bit long.
But it serves the purpose.
 
For what language is it?
 
Python
not Java, no, no CamelCase.
 
I don't know the concensus there ;)
 
It's there. Seperating words in functions with underscores.
Also the names should be lowercase or may be CamelCase as well.
 
3:59 PM
i_like_snake_case_:)
 
@kleinfreund thats PacalCase ;-)
 
Oh, wow.
That's the difference?
 
Literally, the only difference between PascalCase and camelCase, is the first letter ;)
 
0
Q: Validation datetime for appointment form

A.razaliI'd like to ensure that the client are unable to book the same date/time for the same services that the company caters to. The codes are as follow for the fields: <div class="row"> <div class="label">Appointment Type:</div><!-- end .label--> <div class="input"> <select input type="t...

 
@CaptainObvious
 
4:13 PM
0
Q: Tic-Tac-Toe game in C++11 - follow-up

MORTALIs there any way to improve this code. i have fixed hard-coding. Is there any thing that's i need to do it. In favor of game style and C++11 in general. #include <iostream> #include <cctype> #include <algorithm> #include <functional> #include <array> enum struct Player : char { none = '...

 
4:37 PM
@Phrancis Literally? s/Pascal/camel/
 
monking!
 
Monking!
Did anyone notice Jamal's badge in my lurkingness?
Ahh, here:
Nov 20 at 1:20, by Jamal
> You've earned the "Constable" badge (Served as a pro-tem moderator for at least 1 year or through site graduation).
Congrats, @Jamal.
 
4:52 PM
Question: How do you display HTML text on a web page? (without the browser thinking it's an actual HTML tag)
I've tried wrapping it in <code> or <pre> with no success :\
 
@Phrancis ... htmlspecialchars()
 
Is there a non-PHP way to do it? JS?
 
do what htmlspecialchars does :D
 
A-ha! &lt;!DOCTYPE html&gt;
 
@anyone ever had a database with an Addresses table? How does one make a natural key out of such records?
 
5:17 PM
One more vote for a new user please:
 
@200_success she's got 4score + accept...
and question's info says: 23 rep
chat is just being slow, probably.
 
0
Q: Manipulate JSON data from the client with JavaScript

railgunI am making an application in which the user has the ability to add, remove, and edit JSON data through DOM interaction. I have created a working JavaScript-only prototype that accepts certain variables to manipulate certain elements of the JSON data, although it is rather messy and seems rather ...

0
Q: First Linked List in Java

CarcigenicateI just started learning Java, and wrote up a linked list. I'm coming from just having learned Haskell, so I've been out of the mindset of stateful computations for awhile. I'd like to know how it could be improved in any way. Please be critical. Mainly though, I'd like suggestions on readability...

 
5:46 PM
@CaptainObvious NPE's of doomness..
well... shoved in an answer anyways..
Toodles!
 
0
Q: URL selection function that is designed to randomly assign users to different surveys until full.

DeependI'm trying to condense some of my code to make it more maintainable and to learn a few new tricks. Below is a Python 2.7 / Django 1.6 function which is designed to assign users to one of three surveys in my application. I require a total of 30 responses in total, 10 each. Each user is to be assi...

0
Q: form a loop with previous and next

clankill3rI have a class Edge which looks something like this: class Edge { Edge previous; Edge Next; } I have edges in an ArrayList. They have to form a loop, as in the last one is connected to the first one. This is what I have: Edge previous, current, next; previous = edges.get(ed...

 
6:28 PM
0
Q: Sort 4 Numbers using only JavaScript If Staments

DallasI had to create a script that would sort 3 numbers using only if statements in JavaScript. I then needed to make that script sort 4 numbers. By brain can not figure this one out! This is my script to sort three: <script type="text/javascript"> var num1 = parseInt(prompt("Enter your...

 
@Donald.McLean You We Everybody are being watched!!
 
Been very distracted, but coming up to the end of season 3 soon.
 
@rolfl nice! Just watched s04e09.
 
Here's the Unicorn with some IBM compute power.
 
Before you know it, you'll have caught up with all the episodes and then you'll have to wait for a new episode each week, just like the rest of us.
@rolfl Watson 2.0 ?
 
@rolfl awesome
 
7:05 PM
0
Q: A `get_context_data` method for selecting and updating images displayed to a user over a multi page form

DeependBelow are the get_context_data method and the done method of a SesionWizardView. A SessionWizardView is designed to split a form over multiple pages. The get_context_data method is used to provide updated 'context' data to the individual form pages, in this case images selected from a list at ran...

 
So, I joined a local group of iOS/OSX developers. They meet once a month.
Apparently, they pretty regularly have meetings in Tyson headquarters.
Tyson Foods, Inc. (NYSE: TSN) is an American multinational corporation based in Springdale, Arkansas, that operates in the food industry. The company is the world's second largest processor and marketer of chicken, beef, and pork only behind Brazilian JBS S.A., and annually exports the largest percentage of beef out of the United States. With 2011 sales of US$32 billion, Tyson Foods is the second-largest food production company in the Fortune 500, the largest meat producer in the world, and according to Forbes one of the 100 largest companies in the United States. == Profile == The company was...
 
Sounds yummy
 
 
2 hours later…
8:45 PM
@SimonAndréForsberg Who would use such a short hashcode as their title for an episode?
Huh... this is interesting
How on earth did I connect to my local database, if my database server wasn't even running?!
 
9:10 PM
0
Q: TrackDAO: what can be improved?

ScavenceIn this specific situation there is a table with trackdata and a form to add rows. For the sake of clarity I won't include the view-related code here. The added rows are added to a LinkedList when appropriate. public class TrackDAO { private List<Track> tracks; private Connection con; public T...

 
Afternoon
 
Hey @xDaevax
 
0
Q: Map one entity to another

sethI've got a lot of entities that come from the web service and I want to map them to my local entities. For that purpose I've created such interface: public interface IMapper<in TIn, out TOut> { TOut Map(TIn value); } But my mates told me that it's not the best solution because we can map an...

 
@skiwi s04e09 = season 4, episode 9
 
@SimonAndréForsberg Oh..
 
9:19 PM
For those not in the U.S. (please pardon my limited and perhaps ethnocentric view of the world), is the U.S. holiday of Thanksgiving just another day for you?
 
lol yes
 
That, is unfortunate (in terms of having another day off that is). Why we celebrate it (in actuality) is a mystery I'll never quite understand, but I don't mind having two paid days off.
 
Sorry @xDaevax, no turkeys here
 
It's just a specific occasion to remind my american friends that they're celebrating the near-extinguish of a people
which is always fun
 
On an unrelated note, anyone ever configure Ninject with WebAPI successfully and not set their computer ablaze in the process?
 
9:22 PM
Can't say I've ever had problems with Ninject or Unity combined with Web API
But maybe my usage wasn't very advanced
I just inject repos in controllers
 
That's all I want to do (mostly)
 
I'm creating a corporate intranet, and I would like to create a "Base" Web API project that has default bindings, return types, and useful functionality.
 
That's all there was to it
(code from 2 years ago of a school project)
 
Then create separate API's related to specific problem domains as needed all that inherit from this one.
But, Ninject requires a static class where the bindings happen (which is of course not overridable).
 
9:24 PM
Ooooh
 
@JeroenVannevel That is more or less the code I have now, but it doesn't scale
 
interesting problem, can't really think of a solution immediately
 
If i want a default binding of ICacheProvider to RuntimeCacheProvider (both of which are home-grown), but for Api X, I want to use a SQLCacheProvider (implementing the same interface).
This is not possible given the required setup (on MVC, this is a non-issue)
I'm thinking about asking an SO question, as I cannot find anybody who has done this (which leads me to believe that I am crazy).
Thanks for the link BTW
 
0
Q: Highschool C#: Help Me Error Check and Condense

̩̩̩̩̩̩̩̩̩̩̩̩I have a program which is supposed to convert standard time to traditional time. (e.g: 15:24:31 = 3:25PM [rounded seconds]) I would like for someone to error check my code for me as well as give me ideas on how to condense it. I'm not sure if I'm allowed to post a program here because of safety...

 
9:47 PM
@200_success I know. I had a hunch he really meant nodes. Anyway, to play it safe I dropped that point
 
1
Q: How can I tell what model iDevice is plugged into my USB via Terminal?

nhgrifThis website has a useful list of the various iDevice models. And the "identifier" column is helpful for any iOS developers, as this is the string you can fetch in your application to determine what kind of device your program is running on. However, for reasons, I am interested in determining ...

 
10:32 PM
0
Q: Exeprions handling

GurmanProc. and cons of this kind error handling? def err_report(): if sys.exc_info() != (None,None,None) : last_type, last_value, last_traceback = sys.exc_info() else : last_type, last_value, last_traceback = sys.last_type, sys.last_value, sys.last_traceback tb, descript = last_traceback...

 
Anyone here read Code Complete? I'm wondering if it's worth the $30.
 
Although that doesn't inherently make the question off-topic.
 
@nhgrif seems we're not as clear as we hope when we say "does the code work". a lot of people seem to think we're asking "does the code compile/run"
 
10:47 PM
0
Q: Iteritems on a slice of a python list

NevilleDNZiteritems on a dict can useful. Occasionally iteritems is useful for a slice of a list and this effect can be (crudely) implemented as follows: import itertools class List(list): def iteritems(self, slice=None): if slice is None: return enumerate(self) else: return itertools.izip(ran...

0
Q: Output splitter to handle output

GurmanThis class is helping to manipulate by output streams stderr, stdout, file Any cons and errors in this code? class OutSplitter(object): """ splitter """ def __init__(self, out_splitter): self.__pipes=None if isinstance(out_splitter, OutSplitter): self.__pipes = Set(out_spli...

 
Yeah. A lot of people seem confused about that @mjolka. I've thought about it a lot and I'm not sure what else we can do.
 
yeah :/ maybe something like "are there any cases where your code does not give the right answer?"
 
I'm not saying code that fails in a certain few cases is inherently off-topic. But in his question, he stated he wanted potential reviewers to error check your code.
 
I think the "as expected" is important
 
If you're asking for error checking, your question is most likely off-topic I feel.
 
10:53 PM
@nhgrif i think i agree with you
 
Is not error checking something that would happen before a code review?
 
It sort of implies that you didn't finish error-checking your code before posting it here.
 
or at least if they ask for error checking, provide test cases that do pass to show they've done some work themselves
 
Exactly, Phrancis.
 
that is one crazy username, btw
 
11:03 PM
@mjolka Mainly I was pinging 200 for this:
@nhgrif I don't see any reason to suspect that it's broken. — 200_success ♦ 57 mins ago
 
11:48 PM
I've done my first edit (or partial edit since I can't even work well with the title bar) on my first smartphone (iPhone 5). But I won't be making any more edits on my phone.
 
@Jamal, are you on a Mac, or other OS?
 
On the phone or my laptop?
 
laptop
 
Windows 7
 
Oh, darn. I don't know how to do what I'm looking for you to do on Windows exactly.
Is your phone a 5 or 5s?
 
11:55 PM
5c
 
Ah, even better... except I still don't know how to pull the version via Windows.
Maybe you can see it in device manager.
 
You access that via Control Panel.
 
Yea, but I'm looking for the hardware version of the device. I'm trying to map the iDevices to the hardware version they report via USB.
The 5c phones should be something like 5.3, 5.4, 5.03, or 5.04
My 5s is 6.01
 

« first day (571 days earlier)      last day (3447 days later) »