« first day (1038 days earlier)      last day (2983 days later) » 
00:00 - 18:0018:00 - 00:00

12:00 AM
RELOAD! There are 1926 unanswered questions (94.0041% answered)
 
12:43 AM
@PinCrash You know, the most obvious way to fix the database is to delete the two extra columns in students_x_classes, but to me, the thing I want to do... is make the database a lot more complicated.
 
@nhgrif it can always be more complicated, sure. For the sake of what they are doing though it may be overkill
 
The reason I say that in particular is because a student should be registered in not a class, but rather a course
A "class" should have columns like.. class ID, description, department... a "course" should have a course ID, a class ID, teacher ID, room ID, credit hours, and some columns to describe when the course is scheduled, etc
and then the StudentRegistration table is two columns, student_id, course_id
 
1:50 AM
possible answer invalidation by Rassisland on question by Rassisland: codereview.stackexchange.com/posts/122072/revisions
 
0
Q: Custom C++ iterator

Jack WilsdonSo I have written a custom iterator for std::map that allows access to just the keys of the map and I was wondering if it is the "correct" way to implement std::iterator. Here is the implementation I have written: template<typename K, typename V> class MapValueIterator : public std::iterator<st...

 
2:16 AM
0
Q: Milking a COM type library: "fun" with COM reflection

Mat's MugOnce upon a time, there was a duck that wanted to know where and how user code was calling into the VBA standard library and Excel object model. To match the rest of its API, the poor little duck had to dig through pages and pages and pages of MSDN documentation, and instantiate a Declaration obj...

 
2:59 AM
@Hosch250 look at how prominent your pen is facebook.com/jeroen.vannevel/posts/10207298642836649
Yes, feel free to enjoy the music while you're at it
 
 
1 hour later…
4:00 AM
You may get better results to this question on (codereview.stackexchange.com). — cokeman19 12 secs ago
 
0
Q: Implementation of Dijkstra's Algorithm in JavaScript that returns both shortestDist/shortestPaths

WinchenzoMagnificoI decided to try to understand the basic idea behind Dijkstra's algorithm better so I implemented it in JavaScript (the only language I am proficient in as of now) so I could really see what was happening in the Chrome debugger. I chose not to use a priority queue or a heap in my implementation,...

0
Q: Interactive command line YouTube downloader with option to burn subtitles into video

SpencerThis is only used on Mac machines. I know that there is a Python implementation of youtube-dl and several for ffmpeg, however I chose to use subprocess so that I can see the real-time stdout/stderr of them while videos are downloading/encoding. The goal Using youtube-dl and ffmpeg Easy to use...

 
4:43 AM
0
Q: A simple log that tracks hours worked and and a python script that calculates wages

Palermo PenanoI wrote a simple python script that will calculate income for a given month and hourly wage by parsing the contents of a log file. The instructions for how to use it is in my GitHub account here: https://github.com/palpen/wage_calculator It's very simple and I was wondering if there was a way t...

 
5:11 AM
A small doubt:

In this script, I'm using the `swap` function for swapping operations in the sort algorithms, here: (https://github.com/Dawny33/Algorithms.jl/blob/master/src/Sorting.jl)

However, I can always do `x[a], x[b] = x[b], x[a]`

So, which is a faster implementation? If both are the same, then which implementation is a good one to opt for?
 
Morning
 
5:45 AM
Better place for your question is codereview.stackexchange.comPravar Jawalekar 6 secs ago
@PravarJawalekar Coming from someone who has also said that before, code review is only for code that works. — James Root 10 secs ago
 
6:03 AM
@JeroenVannevel Cool.
What were you doing, dancing to the music?
 
6:59 AM
0
Q: LockBox TwoFish string encryption and decryption - Can this code be improved?

Steve FI'm using TurboPower LockBox for the first time, and using the TwoFish algorithm to first encrypt a password, and later retrieve the password by decrypting the generated hash. I would like to know if the approach that I'm using is good, and if there are any pitfalls to avoid. Its a simple use c...

 
7:25 AM
If your code works correctly and you just want to improve it, this question may better fit to CodeReview@StackExchange. As a first hint: if you don't want your operation to block your UI thread, try to make it asychronous (using for example async/await and Tasks or a BackgroundWorker if you're pre C#4) For the performance itself: the bottleneck is most likely the I/O and network system, you can hardly improve that by code. — René Vogt 45 secs ago
 
0
Q: CountingPrimes Less than n

LiamThe following code was written to be a submission to this challenge on PPCG. It uses this algorithm, the Meissal-Lehmer method. I follow the wikipedia entry pretty naively. I am looking for ways to improve speed. Most improvements I believe will come from optimizing the phi function, which is...

 
Welcome to StackOverflow! Please read (again) how to ask. Your questions sounds more appropriate for StackExchange's CodeReview site. And without any code it's hard for us to help you. — René Vogt 59 secs ago
 
Monking
 
7:46 AM
0
Q: Java web scraping robots

imotebI am developing application that goes through 2 websites and gets all the articles, but my code is identical in most parts, is there a way to optimize this code actually :/ (TL and DN are the naming conventions of the news papers) public class Main { public static void main(String[] args) ...

1
Q: Java Singly Linked List Implementation

j.castilloI've implemented a singly linked list in Java as a practice exercise and would appreciate a review. LinkedList.java public class LinkedList { private Node head; private int size; public LinkedList() { } public void addToEnd(char data) { addAtIndex(data, size); ...

 
monking @all
 
8:10 AM
By the way, your first question is better suited for Code Review. — Zeta 31 secs ago
 
9:00 AM
Ripe zombie; open question with answers, at least one answer having score 0, no answer having score > 0: Getting employee details according to the role
 
9:28 AM
monking
room's been slow lately
 
9:45 AM
today is going to be a very busy day
 
9:56 AM
0
Q: Proper class user.php

MarcoI'm learning to program with PHP, so I ask your help to check if my class user.php is ok. include('password.php'); class User extends Password{ private $_db; function __construct($db){ parent::__construct(); $this->_db = $db; } private function get_user_hash($us...

 
10:12 AM
This question looks like belonging to CodeReview SE. — Aycan Yaşıt 14 secs ago
This may be on-topic for Code Review, if A the code works, and B it's not hypothetical or incomplete in any way. If you do decide to post, please read the help center before posting. — Quill 29 secs ago
 
0
Q: Characters set permutations with repetitions

kharandziukThe code bellow generates all the permutation(with repetitions) for given character set. Is there any better(simpler, more performant) way to do that? var assert = require('chai').assert var _ = require('underscore') var multStr = function(left, rigth) { return _.chain(left).map(function(el) ...

 
10:29 AM
Technical debt sucks
 
#good_enough :)
 
"A full-stack developer is one who can add technical debt to any layer of the application" -My coworker
4
 
10:54 AM
@SimonForsberg I am now :P
 
possible answer invalidation by José on question by José: codereview.stackexchange.com/posts/122075/revisions
 
@JNat WHERE'S MY SWAG?
(Or do you want an e-mail?)
 
@SimonForsberg Which swag?
CR?
 
@JNat CR graduation swag. (Should I get anything else?)
 
@SimonForsberg I don't know. I don't take note of which names are getting what. I mean, all the names are written down somewhere, but I don't know 'em off the top of my head
But you meant CR
 
11:02 AM
Yes, I meant CR.
 
So... it hasn't arrived yet?
I'll try to check
 
Nope
I am not at home that often these days as I am working in another city and living with my cousin there, but I checked the mail on February 24th and then I checked the mail on March 4th, nothing!
 
@SimonForsberg You see, I've been handling a lot of top user/graduation swag that had been in a backlog. I've also been receiving a ridiculous amount of pings/comments/e-mails about the MSE/MSO 10M/share your story swag
Hence my "which swag"
 
Totally understand. Sorry :)
 
@SimonForsberg I'll check with our vendor. I'll be in touch via e-mail
 
11:04 AM
Okay, thanks.
@JNat Can you confirm that I did fill in the form, so that that's not the missing piece? I think I filled it in.
 
@SimonForsberg Ah... the plot thickens :P
@SimonForsberg You did
 
Phew :)
@JNat I am home sick today so I will also check the mail today, but I don't have big hopes. Otherwise I'm normally checking my mail every Friday evening.
 
@SimonForsberg Cool. Just shot an e-mail to our vendor. Will probably update you later today.
 
Okay, thanks.
 
11:20 AM
0
Q: "Remember me" automatic login

user3040456I've implemented a "remember me" automatic login if no session has been set, but a remember me cookie is on their computer. I'm concerned about security and I'm not the best. I'm relatively new to OOP (just started a learning a week ago). $database = new db; if (isset($_SESSION['info'])){ $to...

 
11:36 AM
0
Q: Read multiple input files and write to multiple output files Python

N S LinaI am able to read all xml files in a directory but I have trouble in outputting the result into each txt files. Eg, I want to output 1.xml to 1.txt. How can I do so? I am new to python and text processing. import os, glob, re from xml.dom import minidom #path = ('C:/nltk_data/tutorial/*.xml') #...

 
hey there @morwenn
 
Hey :)
 
12:16 PM
If the code is working this seems more on topic on codereview.stackexchange.comTheLethalCoder 17 secs ago
 
12:28 PM
0
Q: php/html template for checkout

pankijsBasically I am in argument with my colegue, I say this template (view) has to be fully refactored and all instances of duplicate code has to be removed. He disagrees and don't want me to touch it. Can you please do a code review as 3rd party opinion? This is magento phtml template file for checko...

 
12:59 PM
Pimping this answer because it's better than mine
 
Users come to Stack Overflow to get answers to programming questions, not for code reviews. Checkout codereview.stackexchange.com If you really can't resist, just post a comment on the question :) — BalusC 31 secs ago
 
Greetings, Programs.
 
Greetings, @Donald.McLean
 
1:15 PM
@Hosch250 of course
 
possible answer invalidation by Peter9192 on question by Peter9192: codereview.stackexchange.com/posts/121901/revisions
 
Does anyone one of a cloud service (similar to AWS) that doens't require a credit card and is free up to a certain point?
 
I know of one that does require a CC.... but is still free up to a certain point.
 
That's BlueMix?
 
Uh huh.... yep
 
1:23 PM
Right now I only plan to host static content though
I just don't feel comfortable putting it on my own host as I have no clue how many visitors there will be
 
amazon s3 is your best bet if you want to host static content..
it's not free but honestly static content is so damn cheap it doesn'tm atter
we're talking 1c per 10k GET requests
 
I may want to add a backend at a later point, not sure yet
 
@skiwi - you set your limits with Bluemix and they are not based on traffic... as far as I recall.
 
Anything that requires a credit card is no option though :/
 
you can have a DO box that lets you fund your account with paypal
but any virtual machine is going to be much more expensive than something like amazon s3
 
1:25 PM
Ahhh.... no.
Bluemix will offer a free VM.... still need to register with a card, though
 
The downside of living in the Netherlands :(
 
You're probably not going to find many places that won't let you use a CC
Why are you so averse to it?
 
Does not have one ;-)
 
It doesn't have to be a CC, a debit card works just fine too
 
There's no reason to have a credit card for most purposes here
 
1:26 PM
debit card != credit card
do you not have a debit card?
 
@Duga handled
 
(standard bank card, given with literally every single bank account in the UK)
 
@DanPantry One that works in my country yes, not sure about international
 
@skiwi is it Visa? Electron? Mastercard? etc
 
Nope, I don't think it's any of those, just a local one (does work in whole EU as far as I'm aware)
 
1:27 PM
My debit card is Visa. I can use it like a credit card. It doesn't have a credit line (if you don't count my over draft protection).
 
+1 same here @nhgrif
 
You should either look into a credit cart with a low limit or find a bank that will issue a debit card similar to what I just described.
 
You should definitely look at getting a credit card.
 
How do you buy stuff online?
 
Lenders judge how much to lend on you based on your credit worthiness.
Credit cards are the easiest way to raise your credit
...used correctly and responsibly.
 
1:29 PM
@nhgrif Locally we have iDeal, international I use Paypal for that (Paypal directly linked to bank, I am definitely not putting any money on my Paypal account itself)
@DanPantry Not over here though
 
And also, that... how do you build credit in the Netherlands? Because surely you need credit for things like car, house, etc.
 
so you can just be given a house in the netherlands?
or rather a mortgage
 
@nhgrif I believe it's directly related to your monthly income and savings, and that's it
 
0
Q: Optimize performance of flatten function in python

IgleI have to flatten a large number (>300k) dicts to write them to a csv file. Example: dict = { a: b, c: [ { d:e }, { f:g } ] } becomes: a, c.0.d, c.1.f b, e, g The dicts can be really big with a lot of dicts as values. My func...

 
And well, you do need to have proof of you having a contract etc. obviously
 
1:30 PM
Oh boy
That sounds like a recipe for disaster
@skiwi Yeah, ideal doesnt' look it is very... ideal.. for international payments
 
I'd be kind of surprised. How old are you, skiwi? Are you young enough that it's possible that you simply haven't had a need for credit yet and possibly don't fully understand it.
 
Unless you get a file host within the netherlands it is unlikely you will be able to actually rent a server online through ideal
 
@nhgrif I'm 22, living with my parents, haven't bought a house or car or anything big yet, so I have no personal experience with it
 
@skiwi I haven't bought anything like that either :-)
But you need credit to rent, have utility bills, get a phone contract....
 
I just bought a car Friday.
 
1:32 PM
I just don't see the point of getting a credit card if I'm only going to use it for one thing
 
Basically anything that requires adulting to some degree
 
@DanPantry Not over here apparently... Didn't know it was a big thing outside the Netherlands
 
You don't need credit to rent, have utility bills, or get a phone contract. Although, if you have bad credit, doing any of those things might become difficult or impossible.
 
@nhgrif In this country you do
 
I guess companies just expect you do pay? Maybe it works pretty well over here :P
 
1:32 PM
You will get credit checked every single time you do any of those things or open any kind of account like that
if you do not have good credit, you will be refused.
And no credit history (no credit accounts) = bad credit history.
 
When we rented this apartment, they checked our credit history.
 
Which is why in my first rental, despite having no bad remarks, I had to get a guarantor..
 
And we won't even talk about what it takes to get a mortgage.
 
@skiwi Unless you want to live in the Netherlands for the rest of your life I would strongly recommend you get some kind of bank card
 
@skiwi Credit cards typically offer far better fraud protection than other things. I have 0% fraud liability with Capital One.
 
1:34 PM
Unless you can buy something completely outright in cash then you will need something like that
 
You don't have a credit card? How do you get by?
 
Apparently netherlands has it's own payment gateway
 
What do you do at a restaurant? What about buying online? What about shopping?
Belgium doesn't have that credit thing either though. I thought that was just the US
 
Also appears that it is not very easy to integrate with iDEAL which might explain why I havent' seen many projects using it
 
@skiwi If I were you, I'd get a Visa card with a low limit, good fraud protection, and good cash back.
 
1:36 PM
@JeroenVannevel Use a debit card? Only iDeal and Paypal as I said is most common
 
@skiwi you can use debit cards online.....
 
We do have 1 cent checks with iDeal (seems like that is one of the main uses of requesting a credit card for companies? - to check validity)
 
I only use my debit card when I'm getting money from an ATM. I thought that was how they were supposed to be used
 
@DanPantry The problem is, his debit card can't be used as a credit card.
 
@nhgrif I now see the issue.
AWS only supports Visa/Mastercard cards
 
1:37 PM
Even if his debit card could be used as a credit card, banks usually don't offer nearly the same fraud protection on debit cards as they do on credit cards.
 
True, though I personally use my debit card for everything (because my credit card limit is so god damn low)
 
How long have you had the card?
 
...6 years
Well, not that specific card. I manage to wash mine every few months
so I have to get a new one
Yes I'm serious
 
But same account?
 
same account, yes.
 
1:40 PM
If I were you, I'd try to open a second credit card account. You could ask for a limit raise on this one, but it's good to keep a card with a low limit, I think.
 
Sorry, I was talking about my debit card account
My CC I've had only since early november. The provider does let you raise it after 4 months, so I should be able to raise it now.
 
Ah, gotcha.
 
The low credit limit really negatively affects my credit score, though, which sucks
To give you an idea of just how low it is, I only use it for day to day expenses, and once I almost went over the credit limit because Amazon Prime charged me on there mistakenly.
 
so like $100?
 
A bit more than that, but yeah
 
1:42 PM
dang
I'd use that just for gas and pay it off immediately.
 
That ^
 
I pay it off monthly but my provider were assholes the other week
 
I guess I'll just put it on a normal web hosting for now, I just thought that the cloud would be nice to try and it also scales pretty well as far as I'm aware
 
I have two with $3000 limits. I also have a retail store card with a $3000 limit and another with a $700 limit.
 
So here's what happened. Amazon overcharged me in January, so I paid it off immediately on the 14th Jan. My credit card provider forgot to mention that the card would not take a direct debit payment as usual on the end of the month, so when it came to February 18th, when I had expected it to be paid off... it wasn't.
So they hit me with an overdrawn fee, even though they had not mentioned it would not be paid...
Besides the point, @skiwi, I would seriously recommend getting a bank card that's usable internationally either way
 
1:45 PM
@DanPantry I think upgrading to MasterCard or VISA should be pretty straight-forward, but I don't want to do it just for a cloud service at this moment
 
Hey @nhgrif question for you. I'm drawing a blank.
Let's say I've got a byte array of length 512. I have a doc detailing which records begin at which index.
But some of them span several bytes.
I'd like to create a struct for this, but I need to reverse the byte order for the ones that span positions in the byte array.
How would you tackle that?
 
@skiwi the earlier you get it the better... part of your credit score is the age of your oldest account
@RubberDuck a struct for all 512 bytes...?
strings, I guess?
 
No. No strings. Just integer data packets.
 
@nhgrif +1. accounts under 33 months will negatively affect your score, at least on Experian.
 
Most of them are actually bytes, but the ints are messing my groove.
 
1:49 PM
Gotcha. Well, @RubberDuck are you just trying to write the code for your particular system, or write some docs on how to do it?
Because this comes down to endianness.
 
This is what I'm doing now.
    ushort ain = record[index + 1];     // Little endian, so read the right most byte first.
    ain <<= 8;                          // Shift it into the left byte of the 16 bit int.
    ain |= record[index];               // Fill in the right hand byte. This is the analog input in counts.
I'd kind of like some kind of data structure for my code to use.
I get that code, but no one else here is going to.
 
ushort ain = record[index] | (record[index+1] << 8);
I get it...
But what might be useful...
 
s/here/at my office
 
oh
well of course not
You don't work with a bunch of smart folks like I do.
OH SNAP
jobs@metova.com
 
@skiwi - It is worth signing up to something like AWS or bluemix, or anything, just to have a transaction history on your CC ;-)
 
1:51 PM
Just not as smart. =;)-
 
;)
Let me think about it while I walk step-son to school.
I have a couple of ideas though.
 
Np. ttyiab
 
0
Q: Python algorithm for identification of low-level jets 2 (meteorology)

Peter9192I'm looking for suggestions to improve my algorithm for the identification of low-level jets in wind data. I have wind measurements at several heights, and I want to identify jets according to the following description: the lowest maximum of the wind speed profile in the lowest 500 m of the a...

 
2:05 PM
0
Q: Circular Shifting in an array (optimisation)

TimWe had to write a program that would perform circular shifting of elements in an array. The array size was entered by user, so it had to be in a sense, dynamic. On Circular Shifting Initial Array: 1 3 7 4 8 6 5 2 9 Shift by: 4 Final Array: 6 5 2 9 1 3 7 4 8 Notice, in circular shifting, ...

 
This would be straight C, correct?
 
@nhgrif I'm actually in C#. I thought about using the explicit layout attribute, but not sure how to make that work with a byte array.
 
How easy/efficient is it to snip out a subarray?
Because my though is... a handful of helper functions that return the various types from a correctly sized array
and then you just pass in the appropriate subarray into these helper functions
 
It would be easy enough.
I'm thinking I should profile it before/after though.
 
even if the lines of code are the same, wrapping it under an appropriately named (and well tested) helper function helps the overall readability so that no clowns dive in and say "Hey, what are these arrows here?"
 
2:13 PM
For code reviews you should better go to codereview.stackexchange.comvanje just now
It seems that your code currently works, and you are looking to improve it. Generally these questions are too opinionated for this site, but you might find better luck at CodeReview.SE. Remember to read their requirements as they are a bit more strict than this site. — JonasCz 1 min ago
 
@Duga I don't know anything about search trees, so I won't respond other than by saying here it looks (to me) as there not being much context
@Duga @SimonForsberg is that supposed to happen? (SO link to question that is the parent of the comment just above it)
 
I'm voting to close this question as off-topic because it should be in CodeReview. — OldCurmudgeon 7 secs ago
possible answer invalidation by Tim on question by Tim: codereview.stackexchange.com/posts/122146/revisions
 
@PinCrash Comment deleted, so yes.
 
0
Q: Logic for shuffling sliding puzzle

Gaztai'm working on a sliding puzzle, one little project as a hobbie, and yesterday i thought that instead of working on an algorithm to figure out a solved puzzle, it would be easier to make an algorithm that "shuffles" the tiles from a solved position, i came up with this and it works, but i don't k...

 
Okay, this feels pretty good to me. The Jr. said he grokked it best.
            // Little endian, so we take the last of the 4 bytes, and shift it into the furthest left hand byte.
            // Then we OR it with the next byte to "pack" it into an integer.

            // We are essentially flipping the order from which we received them.

            int position = (record[index + 3] << 24)
                         | (record[index + 2] << 16)
                         | (record[index + 1] << 8)
                         | (record[index]);
 
2:27 PM
well...
I think that's ugly. And doubly so because that wouldn't compile in Swift. The expression is too complex.
 
@PinCrash it is only a piece of the whole tree creation...but I think there might be enough there to review. I would have to write my own or create some unit tests on it....hey I have an idea!
 
for(int offset = 0; offset < yourDataTypeByteCount; ++ offset) {
    yourReturnVariable |= yourArray[startingIndex + offset] << (8 * offset);
}
@RubberDuck And with some effort, you might be able to write a generic function for that.
 
0
Q: is my add method in binary search tree correct

user99570I want to implement code for inserting a new Node in a binary search tree in java so please check if my code is correct ,,, Here is my method : public class BinarySearchTree { … public boolean add(int value) { if (root == null) { root = new BSTNode(val...

 
@Malachi What's your idea?
 
2:42 PM
@nhgrif I'm likely to extract one.
 
right, so for the code I just wrote, it'll work for any data type as long as you can figure out the size in bytes of the data type and the starting index in the array
I'd replace the 8 with BITS_IN_BYTE or something
and then I'd overload that same function with one that can extract a string.
(basically, you're just building a C# String from a c-string)
 
@PinCrash write an application for binary tree, so I can better understand it. I am going through trees right now for my Math class, and some of the material is really hard to understand
 
@Malachi That's something I'd like to learn about as well, at some point!
 
2:59 PM
"How would you rewrite it?" is a very broad question. What is the articulable problem you have with this specific piece of code that can be solved in a few paragraphs or less? more actionably: How is this specific implementation causing things to 'spiral out of control'? What is the problem you're attempting to solve? How is this code causing you to not be able to solve that problem? If you're simply looking for someone to rewrite your code a la a code review, we don't do that, but codereview.stackexchange.com does. Read their guidelines before asking a question there, though. — George Stocker ♦ 12 secs ago
 
0
Q: Create Xml to string serializer

ivan_petrushenkoclass Program { static void Main(string[] args) { var s = Serialize(new BackgroundJobInfo {Text = "toto", BackgroundJob = new BackgroundJob { Password = "pass"}}); var myJob = Deserialize(s); } public static string Serialize(BackgroundJobInfo info) { u...

0
Q: How to eloquently write a Processor that would process an Object (say a message you received)?

DenisSorry for being a little abstract but I have attempted to concoct something simple but it seems to spiral out of control. So I was thinking maybe I am taking the wrong approach. Here's what I am trying to do: When I get a message it gets de-serialized into its own class. I would like to use...

 
How to use Entity Framework
1. Try to set up an association in the .edmx file
2. Save .edmx file
 
that's so .net 3.5
 
3. Get loads of compiler errors
 
monking!
 
3:07 PM
4. ???
2
5. Profit!
Hello @Mat'sMug
 
how to use Entity Framework
1. Create your entity types
2. Map your entities
3. Create your dbContext
4. ...
5. Profit!
 
associations are a PITA though
Created an association, hit save. Suddenly now I have corrupted fragment errors on the OTHER side of the application.
 
...you got db-first huh?
 
Woah
15
Q: Software to generate class diagram from Java source, not dependent on Eclipse

skiwiIs there a program around that can generate (UML) class diagrams from Java source code? There is a reason I am not using Eclipse, regardless of whether the reason makes sense, therefore I do not want to rely on an Eclipse plugin for generating the diagram. I'd actually want it for usage on Java...

 
pray for me @Mat'sMug.
 
3:09 PM
This got 10K views
 
@DanPantry my deepest sympathies
 
@CaptainObvious posted over from SO, see last @Duga comment
 
@nhgrif it seems the kind folks at Microsoft are way ahead of us.
        var position = BitConverter.ToInt32(record, index);
 
0
Q: I want to get to the source code converting video formats clearer vb.net

Geared SilentlyFunction startConversion() Control.CheckForIllegalCrossThreadCalls = False Dim input As String = Me.dlgOpen.FileName 'the input file Dim output As String = Me.dlgSave.FileName 'the output file 'ffmpeg location Dim exepath As String = Application.StartupPath + ...

 
This should be on CodeReview StackExchange — John K 10 secs ago
 
3:27 PM
@CaptainObvious language barrier possibly - I think the title intended to be something like "Converting video formats"
i.e. "I want to get [this code that converts video formats] clearer"
 
@Mat'sMug I think so as well
 
still, it's a code-dump question. we can fix bad English, but we can't write it for the OP.
 
Now the op has deleted all of the code
 
wtf
and removed the tags from the previous edit
 
OP is editing more, so maybe we will need to wait a little bit longer
 
3:32 PM
yeah
 
just needed to get that out of my system, sorry
 
@CaptainObvious seems to be ready for reopening
 
0
Q: Linq expression in F# and ElasticSearch

Martin BodockyI have rewritten some my C# code to F# and run into F# Expression linq madness, I believe I'm doing something wrong. member x.PerformTermQuery = _client.Search<Post>( fun (s: SearchDescriptor<Post>) -> s.Query(fun (j:QueryContainerDescriptor<Post>) -> j...

 
@CaptainObvious I don't do F# but that is painful to look at.
 
> I believe I'm doing something wrong.
if it feels wrong, it probably is
Oops, we lost the code! Thanks for editing - that screenshot helps a lot with telling us what purpose your code serves; now all that's missing is, well, the code to be reviewed! Put it back in, and we'll promptly reopen your post =) — Mat's Mug ♦ 7 secs ago
 
3:41 PM
> I want to get Source code
quite literally,
(I know it's a translation issue)
 
0
Q: A two-method program for running background jobs

max pleanerI wanted to make a program for running background jobs (ruby scripts). The goal was to continuously run a background script on an interval of N seconds until a kill command was issued. See below for my implementation: class Backgrounder attr_accessor :process_name, :interval, :script_content...

 
4:16 PM
David Haney on March 7, 2016
Are Developers Good Negotiators?
 
I'm not sure if this question is answerable in its current state. You haven't provided example input and output - or if you have it's behind one of those links, and they themselves are hard to read. If you do provide example input and output it sounds like your question would be "please review the code I've written and comment on whether the algorithm is a good choice". If that is your question, it would be better fitted for codereview.stackexchange.com ... But even then it needs cleaning up to meet that sites standards. — perfectionist 24 secs ago
@SeanLange I plan to submit this to code review to ask for advice. I need the exact same trigger on several other tables also, so not sure how to achieve that without repeating the same trigger code for each table. — Latheesan 50 secs ago
 
we have reached a new low guys
npmjs.com. where we get a lot of packages for our project, has been blocked by the work proxy
 
I agree. It's an incentive to be lazy. Get off your butt and write everything yourself
 
sounds like my ex-manager's reason for not letting me on SO
 
4:35 PM
@DanPantry ...wat
Time to ready your CV because next month your company won't exist anymore?
2
 
Zak
IIRC, Dan's company is some huge insurance corporation. Can't imagine them going anywhere anytime soon.
 
I guess, but I don't reckon it's a good idea to forbid your developers to develop
 
@Zak not quite
I mean, my company is on my SO profile
But we're definitely not going anywhere any time soon
 
Oh I see... If your code works and you think it's a messy way of doing it, you should head over to CodeReview.SE and post this there. They may know a different way of achieving the same result. — Savlon 43 secs ago
This question probably belongs on codereview.stackexchange.comTed Hopp 18 secs ago
 
0
Q: Webrequest for logging into IG

sylitx Uri uri = new Uri("https://www.instagram.com/"); CookieContainer _cookieJar = new CookieContainer(); public string Cracker(string username, string password) { try { HttpWebRequest request1 = (HttpWebRequest)WebRequest.Create("https://www.instagram.com/"); ...

 
4:46 PM
> Empties deleted items in Outlook... 30 seconds later, 100+ more in there... *GROAN*
 
bahahaha
 
I don't know why you're still even opening Outlook in these conditions ..
 
There were almost 8K in there just now lol.
 
@Mat'sMug So I am very close to giving up on this db-first assocation (though I have to do it that way) any ideas? It should not be hard, I just need a join table that links A to B based on foreign keys... :(
 
@DanPantry Sounds reasonably simple, no?
 
4:48 PM
I can't really believe this. Rubberduck's tuned-up identifier reference resolver code completes in milliseconds - even with this in memory:
> VBA declarations added in 116ms
Excel declarations added in 719ms
stdole declarations added in 6ms
Office declarations added in 318ms
MSForms declarations added in 53ms
52981 built-in declarations added.
 
@PinCrash Because it is reasonably simple. Except, when I run it, I get fragment A doesn't work because Y reason..
and of course, the error doesn't actually tell me what is wrong, for all I know it is a magic spell.. and googling it doesn't reveal much either.
 
@DanPantry can't you generate the entities and the whole model off the database? like, code-first-but-I-got-the-database-first?
 
@Mat'sMug Maybe it's not doing anything? Heard about that one optimization that some person made where he optimized his code away and was benchmarking nothing in the end?
 
@skiwi oh but it is
I mean, all tests still pass
 
@Mat'sMug Well, i did do that originally.. though I forgot to add FK constraints in the DB, woops
 
4:49 PM
Then it's good I guess ;)
 
For some reason, updating the model from the DB takes an age
Like, my facial hair grows a visible length-age
 
wipe it and re-create it. don't update it. ever.
 
Sounds like a bad idea given that I work in a team :b
 
@skiwi I'm really not good with O(n) notation, but I think the resolver code went from O(n*k) to somewhere around O(n), where n is the number of identifier references in the user's code, and k is the number of declarations in memory
long live IDictionary and O(1) key lookups
 
@Mat'sMug That's quite some speedup then, not sure how fast it was before though?
 
4:53 PM
basically it's now down to a walk in the park walking down the parse tree, all lookups are O(1)
before? it was the "hey it works" solution
i.e. everytime an identifier reference is encountered, I'd iterate every single declaration ....*at least* once.
a user gave me their Excel workbook / VBA project for testing; I had like 2K user declarations, resolver completed in 20 minutes. I said "we have a problem". then fixed it :)
 
^^ Nice
 
that's a very good accomplishment for a coffee mug :D
 
very. and with the parser going keyhook-triggered, the biggest performance bottleneck will be running the code inspections
 
@Mat'sMug you reminding me to add the FK constraint fixed it when generating from sql
i need a rubber duck..
6
 
like, parsing is now fast enough that I don't even need to bother making a UI to show status
 
4:58 PM
So that's why @Mat'sMug can work on Rubberduck that easily, because he has a rubber duck!
 
also sql looks much better when lower case i will fight anyone on this.
 
@DanPantry I'm so completely totally with you on this!
 
@Mat'sMug I read that in Zoidberg's voice
 
Are DBAs unfriendly because their SQL shouts at them all the time?
4
 
5:15 PM
lol
 
SHOUTCASE is supposed to help you distinguish between keywords and everything else, that was the point of, or at least what I was told or .... idk who said that. I like it personally, without it, it looks like other languages.
 
> without it it looks like other languages
key point ^^
other languages tend to be readable ;-)
 
@DanPantry Seconded
 
@Malachi problem is that SHOUTCASE is used not only for keywords, but also for built-in functions. so you get SELECT Field1, SUM(ISNULL(Field2,0)) FROM dbo.Table1 GROUP BY Field1 and a headache
I wouldn't really mind SHOUTCASE if it was only ever applied to actual keywords
2
 
I can agree with that
 
5:34 PM
Hello, everyone! :D
 
Hi everyone. SE decided to make a log-in popup for chat, I see.
 
@Malachi I did not address your questions
@Hosch250 I tried avoiding clicking it for over an hour :)
for no reason
 
@JohanLarsson lol. I haven't had a chance to work on that code again either. you raised very good points
 
Why?
I think by using the chat you implicitly agreed anyway.
 
@Shortstuff81000 hi! long time no see!
 
5:45 PM
@PinCrash Sounds like you need to add perma-delete to your VBA script.
 
Hi, @Mat'sMug! Anyone here a jQuery expert? :D I have been working on a choose your own adventure game that uses an XML database. The DB has been accessed, jQuery UI buttons have been created with characters' names. The next step is to create a jQuery UI dialog with a short bio about the selected character, but all my XML data is being retrieved in the OnSuccess function.
 
Y U XML? wouldn't json be more jQuery-friendly?
that said, I've no idea :-/
 
Lots of new user terms to sign today. My U changed their terms.
@DanPantry Do you know jQuery?
International change-your-ToS day
 
@Mat'sMug I have no idea. I guess it's because I've always been a little curious about XML databases and I wanted to create one and see how it works. And I know nothing about JSON.
 
if you're into jQuery/JavaScript, you're probably missing out if you don't know json. I do desktop / C#, so for me XML is the easier/better choice, but for anything web I'd probably go with json format. less bulky, more to-the-point.
 
5:54 PM
Yeah, JSON is cool.
@Mat'sMug Talking about JSON, C# has a JSON parser, if you want to try it out.
 
I know
 
Cool. I'll have to check it out. :) I'm not worried about creating the dialog; I know how to do that. I'm just worried about keeping it databound outside the OnSuccess() function. I've tried creating the buttonset in the OnSuccess() function, but it didn't work. I was thinking about storing data in arrays, but then what's the point of having the database?
 
that's a question that's a little too specific to your code to be answered here I think
 
@Mat'sMug Darn. Thanks. :D
 
00:00 - 18:0018:00 - 00:00

« first day (1038 days earlier)      last day (2983 days later) »