« first day (550 days earlier)      last day (3764 days later) » 
00:00 - 16:0016:00 - 00:00

00:01
Does this Playing "craps" for the win seem like the user is just milking one question for rep? I don't meant to be biased, but it's 3 versions of the question in one single afternoon...
@mjolka Good question.... I've been lazy, and distracted, it seems.
00:30
On Craps not to mention... no accepted answer so far on either question...
Right, @mjolka / @all. I have edited the results in to the question. I like all the top-3 ads (and most of the others too). There are some decisions to make though.... like how far do we push them, and which ones go where.
32
Q: Let's make More Community Ads!

rolflBack in April we got together and put together a shortlist of community ads that can be posted to other graduated sites. That was a very successful campaign with probably a thousand or two "click throughs" to Code Review. Let's reboot the process and roll the ads out again! Results The followi...

@rolfl thanks for the quick response!
Frankly, I am uncertain as to how to best proceed from here.... we can't throw all of them on all the sites....
and I can't pick which one goes where, just on a whim.
Other sites have routinely posted more than one ad to target sites....
@rolfl PostTo(sites[random.Next(sites.Length)])
but, three is perhaps too many, not sure.
@Mat'sMug - your help, please ;-)
(I see you in VBA there....).
00:42
@rolfl not sure i understand the problem. is there a limit on ads per site? total sites? or you just want to be selective with where to post?
I want to be selective, or rather, I don't want to be abusive.
We are about to change how we deploy firewall rules to our load balancers. If you see any crazy, please shout!
Programmers currenly has 24 ads in the queue.
ah, was not aware of the queue
Not so much a queue.... but a 'feed'.
now, it currently has a Code Review ad in there from April still.
We can add more, but, how many?
Code Golf has 2 in the system for Programmers.
00:46
Gimme 5-10 mins
No problem.
@mjolka - Mat's went through the hard work the first time around... he's the expert, as things go.
Robotics has 2 as well.
A bunch of them don't score the required 6 upvotes to feature.
Then, there's the question of the other sites we've never featured on....
@rolfl ads get reset in about 40 days anyway
my gut says game dev and webmasters would get us lots of good questions (and hopefully some dedicated answerers)
^^ yup
Could you please accept an answer before asking for an iterative review ? You can accept an answer by clicking the tick mark near the answer that was most helpful to you. — JaDogg 1 min ago
00:49
7
Q: Community Promotion Ads - 2014

Grace NoteIt's the time of the year again, namely it is December 2013, and so we shall now refresh our Community Promotion Ads for the new year. What are Community Promotion Ads? Community Promotion Ads are community-vetted advertisements that will show up on the main site, in the right sidebar. The purp...

TheoreticalCompSci has multiple Code Golf ads too.
We should post on all computet/code related SE
All of them on all of them?
yes :p
0
Q: Auto-update server

SchilcoteYesterday and today I've been working on an auto-update system for a game project. I've just pushed the server-side script to the server, and it seems to work great. Since this is public-facing code, though, I certainly wouldn't mind a few more eyes on it before I actually deploy it and changes g...

As much as I like the Jon Skeet one, I don't think it would get much traction on less code-intense sites. Programmers, probably good. I initially thought SO was included...
00:53
SO is special, and off-limits.
it's possible to get special consideration, and I'll look in to it, but it's not likely going to happen.
Our ad on there at the moment is.... under the radar, but will not get the wink-wink- treatment again.
Understandable
OK, so ads reset in 40 days..... is that all sites, @Mat's ?
does anyone know why this doesnt work "http://stack2rss.quickmediasolutions.com/2.2/users/99734/answers?site=coderevie‌​w" ? It should create an rss for rolfls reviews
Interesting.... hmmm ಠ_ಠ
Seems like a number of available websites for ads are not really dealing with code... those that (I think) do mostly: Game devs, DBA, Programmers, Webmasters.
01:02
whats with the playing-craps questions ?
Experiments on Programmers Community ads. Now it's time for my dinner.
@JaDogg Guy got decent rep from the first one, and he's learning stuff still, I see it as being OK. He was pointed to the iterative review post, and is working the system.
It would be useful if you could add to your description the most significant changes you have made, and why they make a difference. Also, identify if there are things you specifically did not do, and why you did not do them. This will help people in the iterative review process to identify what is important, and not feel like it's doing the same thing again, and again.... — rolfl ♦ 12 secs ago
@rolfl AFAIK, yes
except SO, which resets twice a year
0
A: Too little in common to use superclass?

nhgrifThe short answer is, no, this is not too little code to "extract" into a super class. If you intend for this bit of code to always be the same throughout every use of this class and its subclasses, then it's absolutely appropriate to put the code in the superclass. The primary point is, here, i...

I'm torn. I'm somewhat tempted to VTC this question
1
Q: Bats Challenge from CodeEval.com

YanI am going through coding challenges and I would like to get feedback on one of them. I am not sure if i can post the link to the challenge but here it is. CodeEval Challenge Outside of your window, there's a wire between two buildings. Bats love to hang there but you notice they never ha...

I haven't run it... but for now, I'll assume it worked if I copy&paste and run it.
The problem is, he hard-coded one of the sample inputs and then coded it assuming every input would match the sample input. It depends on a string in a particular format (three numbers with a space between each)
Yet some of the given sample inputs have 4 numbers with a space between each, for which if we changed nothing but the hard-coded input, he'd produce an incorrect result.
Nevermind, reread problem statement... I think the other inputs might work.
01:33
still no answer on this one:
10
Q: Is there a formal process for submitting Community Ads?

retailcoderI like community-ads. They have the word community in them, and I find it's a great way of making the "bigger brother" graduated sites give some visibility to beta sites. On graduated sites, anyone with an account can post any ad on the community-ads meta post, and if/when they get 6 votes, they...

01:55
0
A: Bats Challenge from CodeEval.com

nhgrifYou posted this question with the objective-c tag, and made this comment: I had to convert the method to C to get it passed through the automated system. As such, I'm going to assume you're perhaps more interested in a review of the Objective-C stuff, so that's what this'll be. (Essential...

0
Q: Calculator using python for school

SammyTheBEASTI am trying to use this program for a project for school. I try this code and it gives me a Traceback (most recent call last): File "python", line 6, in <module> TypeError: 'str' object is not callable print "Welcome to my calculator!" Sym = raw_input("1 = addition 2 = subtraction 3 = multiply...

02:12
0
Q: getline(cin, s1) in a IF statement

user3089453The getline(cin, s1) function is not prompting me to input a string. it appears as if it is being skipped over even when the if condition is being met. any help? code is below. the problem is in the first if statement. //Exercise 3.2 #include "stdafx.h" #include <iostream> #include <string> us...

02:43
0
Q: Using both setInterval and setTimeout for simple image carousel

apaul34208I have a really basic image carousel that I just wrote. Basically I'm trying to keep it as small and light weight as possible, but I get the feeling that I've gotten way off the beaten path of how these things normally work. function hide(element, index, array) { if (index > 0) { sli...

02:55
0
A: If a space ship crashes on a planet, is it realistic that things from that space ship could be rescued afterwards?

nhgrifMost of the current answers assume that you're very set on the characteristics of the planet and offer suggestions on what sort of ship and what sort of scenario would be necessary to recover what bits. But you state: The planet has only a very thin atmosphere, so one can assume that the spa...

03:19
0
Q: Should "Are there any bugs in this code?" be migrated to Code Review?

Joshua TaylorI came across once-only lisp macro, yet another implementation today, in which the OP is following up on a previous question whereby OP had improved some code, presumably fixing it. I tried implementing my own macro for the same purpose earlier, but it had a bug, as pointed out at once-only l...

 
2 hours later…
04:50
0
Q: Does RunLengthEncoding class provide abstraction and encapsulation?

overexchangeThis review is in continuation with Part I mentioned in query. As part of the assignment given in Part II from this link, here is the solution: Ocean /* Ocean.java */ package Project1; /** * The Ocean class defines an object that models an ocean full of sharks and * fish. * @author mohet0...

05:32
0
Q: nodejs readers/writers concurrency

a.dorostyHere's some simple code that demonstrates what I'm trying to do myVar = 1 reader = () -> getDataFromServer1().then -> # reads myVar and does stuff according to its value # returns promise writer = () -> getDataFromServer2().then -> # changes the value of myVar ...

05:52
monking @all
vnp
vnp
monking
chimpanzeevening
Monking @all
06:24
0
Q: Data Access Layer and Business Objects

bumperboxThis is my first cut at separating the data access layer out of my very old spaghetti codebase. I have tried to keep this a simple as possible , it is for a small project, so I am not really interested in learning spring or hibernate or other framework, and I don't mind writing a bit of sql. I...

 
1 hour later…
07:25
-3
Q: Is Code R.e.v.i.e.w a must?

jparkcoolThe team in my new company does NOT have code review process but I came from companies with code review as a must culture. So, I don't even feel comfortable committing my code without having it reviewed by someone. I'm a firm believer who thinks code review is a way to improve quality and a way t...

To late @CaptainObvious
0
Q: Random Quote in java

rick112358Problem Statement: Create a class diagram and Java code for the following system and scenario, taking into account the possibility of future extensions. "The system is a command line utility that prints a short 'quote of the day' on the user's terminal when run. To begin with the quot...

08:07
yaaay 7k
Congrats @Vogel612
~bows
Maybe I get the 5K today ;-)
08:41
0
Q: Noob implemtation of TicTacToe in Haskell

greoleI want to learn Haskell and figured the best way to do it is to write a simple TicTacToe implementation. However the result feels very unelegant and I think it might be the best playground for your rants and give me an opportunity to learn some lessons. Here it is {-| TODO: -filter symmetric st...

> Reverted to OP's code -- don't see a way to do that than another edit
should I rollback over 2 revisions??
@Vogel612 where?
08:57
-1
Q: how to only allow 3 values in a "if" and "while" statement to allow the loop to exit

kuthedkI'm just stuck on some logic statements. specifically the ones that are in the function char GetInteger() so how would I only allow 3 values to cause the loop to exit. basically I only want the variables 0-2 to allow the program to exit the looping char GetInteger() function. char GetInteger( /*...

No, don't edit it anymore and vote to delete
"How to make it work syntactically" questions will never be on topic
and how does the overzealous editor read my comment then?
downvote and roombaing ;)
0
Q: I'm copying fields to the partner on saving an order in Odoo, is there a nicer way than what I'm doing?

Kit SundeCurrently I'm overriding create and write to copy the fields onto the partner, is there a cleaner way of updating the partner on save? @api.multi def create(self, vals): if vals.get('allergy_ids'): self.add_partner_allergies(vals.get('allergy_ids')[0][2], ...

I don't know. But that's irrelevant
It will either happen again, at which point you will have another opportunity
Or it will not happen again, in which case you won't have to do anything
@CaptainObvious smells of python..
@Pimgd there's no need to del-vote that post..
the cleanup script will pick that one up
09:09
And that makes it wrong?
just unnecessary
nothing near wrong
btw @Unihedron I think I found some synonymizable tags for you
0
Q: implement Dijkstra in C++ to find shortest path for every vertex of a directed graph

snow2462I am trying to implement the Dijkstra algorithm in c++ code that find the shortest for the graph from a text file. The text file contain a matrix that represent a directed graph. Dijkstra algorithm find the shortest path from the source vertex to every other vertices. What i am trying to do in th...

But you're opposing my decision to delete it based on you wanting to get a message to someone who already fixed his mistake
no I am just not following your decision, based on wanting to get a message to someone who made a mistake and fixed it the wrong way.
09:12
yep..
erm...
"formerly known as"?
both tags exist....
and that's not helping..
~lesson
10:14
0
Q: benefits, disadvantages and performance when calling static functions alot

Oisian2i am using an MVC frame work however i have also in alot of cases just made a function static and opted to call it directly from the View instead of going through the controller For example <select name="Athing"> <?php foreach (Classs::Function($Variable) as $a) { ...

Monking
Morn'
heya
10:30
hiya
Monking
how do I make the C compiler shout "YOUR MAKEFILE IS STUPID" if a certain DEFINE is not 1?
> The directive ` #error ' causes the preprocessor to report a fatal error.
hmmm I'll try that
if said macro is not 1, #error "YOUR MAKEFILE IS STUPID"
10:39
welp
my makefile is retarded
and it keeps being retarded
after deleting a .h file it works
... how do I make it prioritize one header file location over another...? hmm...
0
Q: Better way to apply chain responsability in C++?

sopI have an interface IFilter and more types of filters: Filter1, Filter2, Filter3; that I want to call one after the other and the result of one is empty, then I want to stop the process. For this I have thought of: class FiltersSequence { private: std::vector< IFilter > m_filters; public: ...

awww yeah
I had to use #import <interface_config.h>
instead of #import "interface_config.h"
I finally know the difference between #import <x> and #import "x" now too
cause with <> makes it search and with "" just tries to access the filepath from the current directory and THEN searches
@Pimgd Shouldn't you drop the .h in that case?
Or is that only the case with (standard) library headers
well surely it still needs the filename?
@skiwi that was decided in the standard
since C++98
10:54
@AlexM. Ah okay
It has to build on C89 so yeaaah
the joys of /*comments like this only*/
I wish Java had something equal to C++'s const
@skiwi It was suggested, but discussions had went opposing as it will lead to identifier pollution.
Considering Java depends a lot on the libraries, this would require fields and methods to be labeled const everywhere due to dependencies.
Most likely, but now methods may influence caller arguments if a mistake is made somewhere
> device.zip contains an executable file. For security reasons, gmail does not allow you to send this type of file.
Files contained: .c, .cpp, .h, .ncf, .lib, .txt, .hs, directories
11:10
@Pimgd I think it's the .txt file
suuure
@skiwi Do you know any open source twain scanning api using java ?
@Heslacher What is twain scanning? Not familiar with that term
found it
pic18_crypto_lib.X.lib is an executable, says google
Scanning using a document scanner (hardware) using the twain specification
11:17
> You can't send or receive the following file types:

.ade, .adp, .bat, .chm, .cmd, .com, .cpl, .exe, .hta, .ins, .isp, .jse, .lib, .lnk, .mde, .msc, .msp, .mst, .pif, .scr, .sct, .shb, .sys, .vb, .vbe, .vbs, .vxd, .wsc, .wsf, .wsh
@Heslacher Don't know anything about Twain there
To bad
grrr
If only I could just install my source control client on linux!
Oh wait, that's too hard for them atlassian devs
sourcetree?
yep
11:26
SourceTree is pretty.
Hey guys....
> Kieran Senior [Atlassian]Apr 16, 2013
We don't want to run SourceTree to only be on Windows. SourceTree is for both the Mac and Windows (and for the last few years has been a Mac-only application). The Mac and Windows development streams are different. The Mac version is written in Objective-C and the Windows version in C#. We targeted the platforms specifically for the best possible experience by leveraging the platform-specific features.

We don't have any immediate plans for Linux, but that could change, just as it did for Windows. Right now we're focussing on making the Mac and Window
@Pimgd Why does it look so much like the Stack Exchange model?
perhaps, someday...
11:27
@TheKittyKat Hello :)
SourceTree is great but depending on the tools you use, there might be alternatives
I don't miss SourceTree on Linux because Eclipse's EGit plugin is good enough
I hate configuration issues, and finding alternative tools tends to lead to more of them
tbh, working with git from within the IDE is even more comfy than using an external tool like ST
sourcetree sucks for rebasing...
especially for the interactive kind.
It's not too bad if you get used to it.
11:29
tbh I always just swap for the terminal when I do a rebase..
it's ... faster.
I try not to move my folders
=)
Oh huh, you use SourceTree as well, never knew that :)
appends to Notebook Of Stalking Vogel: * uses SourceTree
@Unihedron you did see the large discussion I had with fge in the java room???
@Vogel612 fge made me focus on the vid :(
aaahh right..
11:32
I should catch up, brb
while we're at the vid.
what were the first two possiblities again?
<-- takes his "teaching" seriously
MethodHandle, and... ... Inner class!
Yeah, I was able to find that part.
oh okay...
that said I got a little feedback today..
11:34
Oh?
@Unihedron MH's? Where do you need them for
@skiwi Oh, I was brought to watch a video about the implementation of LAMBDA EXPRESSIONs in java 8
@Unihedron Ah... try to understand the Lambda Metafactory!
I tried to look at it once, but... nope
Ya, indy magic..
If you're interested in such kind of stuff, it might be worth to read through: mail.openjdk.java.net/pipermail/valhalla-dev
11:37
:O
It's about implementation of value types, generics over primitives (and value types), etc.
yea, that's skiwi's pet peeve..
just like the metafactory is fge's
11:55
~lesson -> afk
12:21
0
Q: Javascript Slider library

bingo14I have completed working on my own pure JavaScript Slider library and would like to get some input from other developers. I would like to know how you would improve the code in any way. JSFiddle here: http://jsfiddle.net/stayko88/knxt31vx/1/ Thanks

Wants to be closed
0
Q: Javascript Slider library

bingo14I have completed working on my own pure JavaScript Slider library and would like to get some input from other developers. I would like to know how you would improve the code in any way. ( function( window, undefined ) { function Slider(el, opts) { /************** GLOBAL VARS ***************/...

0
Q: Locking a remote file using java

NingLeeI using a java to modify remote files in different machine by ssh. At the same time, only one thread is allowed to modify the file in one machine. I implement the logic like this: public boolean executeCmd(String ip, String command, String file) throws Exception { final String file = ip +...

0
Q: Binding controls to properties in ASP.Net WebForms

mrmillsyIn my application, we have a number of pages which provide an advanced search capability, with a large number of potential search options (some pages have as few as 3, some as many as 150). The HTML for the page is generated with a standard .aspx page, and the search criteria themselves are stor...

12:42
shut down firefox
reopen firefox
no such thing as reopening firefox happens
yet there you are, typing to the 2nd ....
in chrome, yes.
I'mma just keep clicking the fricking icon until it opens
hi @rolfl
Hey @Unihedron
Drat, someone found a JDOM bug.... of sorts.
couldn't parse the file that didn't change, lol!
akfdl;fjasdk;fljsadflkjsdaf
12:51
@rolfl Bring in the pitchforks!
Greetings, Programs.
Greetings, Critters.
riiight
apparently "plugin outdated" error codes are too hard to implement
0
Q: Improving Java code for simulations and game code

Ayodele AjayiI will like to improve my codes in Java like creating simulations and games, will need all the help I can get and textbooks to help, will appreciate every suggestion in code improvement. This is a problem solving code so far in interest and percentage calculations. import javax.swing.JOptionPane...

JVM time...
0
Q: Can a non-changing enum method be optimized by the JVM at runtime?

skiwiCan the JVM perform runtime optimization in the following scenario? We've got the following situation, we have this interface: public interface ECSResource { default int getFor(final Entity entity) { return ResourceRetriever.forResource(this).getFor(entity); } } And a concrete...

13:03
firefox needs to die
Now I hope that I've asked the question clear enough and that my readers will be able to understand it
it keeps spamming me with an "open application" message box since I have an url on my clipboard
that starts with a custom protocol
and then I had a segmentation fault
I rather feel like Firefox needs an official 64-bits version.
my day sucks
0
Q: Function that groups rows returned from SQL DB

JosephI have a data set returned from an SQL database contained below, as you can see all data remains the same apart from one property, "name_alt". [{ "language_id": "tly", "language_name": "Talysh", "speakers_native": 800000, "total_speakers": 912000, "name_alt": "Taleshi", ...

13:14
I need more coffee.
gives you more coffee.
4
0
Q: NodeJS ReadableStream _read implementation, ArticleReader with changing dates

user3995789I have a NodeJS stream.Readable, ArticleReader. It's job is to read articles, Meantime I have to give it a date to signify the date of the articles, say the default date is today, now I start reading with .on('data') event, and the stream ends. Later I want to change the date and start reading ye...

@Unihedron Thanks, I love you *-*
Oh, I think that how I should design my gray_code class just got clearer in my head.
13:30
Monking
If cup.IsEmpty?
    cup.Fill(coffee)
Revision
If cup.IsEmpty?
    cup.Fill(bourbon)
@RubberDuck throws ArgumentNullException
It depends on the kind of slow death your like the most.
@RubberDuck Mushrooms don't fit well into a cup anyway.
13:35
Very true. =)
13:59
-1
Q: Break my code! (two SPOJ-like problems, need help finding tricky cases where my solutions fail)

zencodismThese problems are part of technical interview I was not officially asked to solve, just wanted to polish and test my skills. Upon submit, I am receiving automated responses stating that answer is wrong on second/third set of testing data. I did test it myself and by now I'm out of ideas for tric...

14:13
0
Q: Boolean value of function parameters

Enes UnalIs it good to have this: if(someReally.long().functionCall().equals(something.else())) { some_button.setEnabled(true); } else { some_button.setEnabled(false); } or this: some_button.setEnabled(someReally.long().functionCall().equals(something.else()));

Answered first javascript. Feeling weird.
3
@Heslacher why?
@skiwi you could try to inspect the bytecode
Not my language of choice @Gemtastic
@Vogel612 Not possible, runtime optimizations cannot be seen in the bytecode
14:22
facepalm whoops
@skiwi JIT hotspot runtime optimizations?
I figured out how I am going to do the if exists thing. I am going to fill a dataset from a query and if it is empty then the boolean will be false. I don't know what I was thinking yesterday....
They can be done in bytecode during inlining, or possibly in native code during (runtime) compilation
@Unihedron Yep
it should be possible to have the compiler desugar and inline this though...
bongiorno
14:23
You can inspect some simple stuff with javap though. If the bytecodes are similar, you virtually don't have to worry.
@Vogel612 Correct, that's also always still a possibility
and another Necromancer badge! Thank you Santa!
It would be interesting to compare these two code-snippets you provided as bytecode
but... I have no idea how I'd find the methods in there..
Hand me the code, I'll tell you which one is optimal.
4
Q: Can a non-changing enum method be optimized by the JVM at runtime?

skiwiCan the JVM perform runtime optimization in the following scenario? We've got the following situation, we have this interface: public interface ECSResource { default int getFor(final Entity entity) { return ResourceRetriever.forResource(this).getFor(entity); } } And a concrete...

14:24
I'm no master at bytecode reading, but at least there's 50% of chance I'd be correct.
2
That's the question @Unihedron
you'd need to do the compiling and reading yourself..
As far as I know though the compiler that generates bytecode is not trying to be very smart
And the Hotspot JVM is very smart and it knows more properties about the code which it can then inline or compile to native code
I would be positive, but I don't think it really matters; Even if it doesn't, the performance wouldn't be too bad. After a hit or two from Map.get(), it lands on the fastpath.
The static mapping there is an "ugly alternative" though, you'd much rather only provide the enum
14:29
@Heslacher Ah I see
53
A: Why this code throws 'Collection was modified' and when I iterate something before it, it doesn't?

Jon SkeetThe problem is that the way that List<T> detects modifications is by keeping a version field, of type int, incrementing it on each modification. Therefore, if you've made exactly some multiple of 232 modifications to the list between iterations, it will render those modifications invisible as far...

geez
talk about a cornercase
2
@JeroenVannevel wow, indeed
Great exam tomorrow... We need to model something that is practically only done with a PC, on paper.
0
Q: php logic function with two arguments

user57538I write a function called 'wrap' that takes two arguments, $string and $length. The function should return the string, but with new lines ("\n") added to ensure that no line is longer than $length characters. Always wrap at word boundaries if possible, only break a word if it is longer than $len...

1
Q: Enhance csv file database import

speedyI'm using the script below to import a large csv file to my database. If the table is empty the process takes about 5 minutes to finish on a local machine. If I'm using the file to update existing values on the same table it takes more than 15 minutes to finish. My csv file contains about 35,0...

14:56
ok guys, I have some code that I want to do in LINQ, post it on SO?
I think that's a fair bet.
VOTE FOR ME!
Nice answer, @AlexM. .... I worry about the asker of that interest question though.... he's going to need some hand-holding....
@Malachi Well where is it?! Where is my potential rep?!
5
@JeroenVannevel hold on a second I Have to write it.....lol
@Phrancis Done
Merci
(Also: Hello, World!)
Ce n'est rien. (at least I think that's correct, my Francais is tres rusty).
It would be n'est but close enough
I have a feeling I am missing some using reference to something about Entity or something like that....
15:06
Duh. Perhaps I need more caffeine too.
2
Aaaaaah, you used « avoir » instead of « être » ç____ç
@Donald.McLean gives you coffee
De rien would be most commonly used, I think
^^ that
that didn't help...posting question....
15:07
Colloquially, at least
@Unihedron Blech. I don't drink that stuff. Tea or Mountain Dew (Throwback)
@Donald.McLean I read that as Bleach. I don't drink that stuff. LOL
@rolfl that's a valid point, I hope he doesn't come back asking me how to write down a new function
0
Q: How do I turn this into LINQ-To-SQL?

MalachiI tried to turn this into LINQ but I am so Noobish when it comes to anything LINQ and could not figure it out. string BarQuery = "SELECT BarNum FROM Justice.dbo.Atty WHERE BarNum = @SuggestedBarNumber"; using (SqlConnection conn1 = new SqlConnection(ConfigurationManager.AppSettings["AttorneyEve...

15:09
I managed to reimplement a pseudo-code gray code addition algorithm in C++ but it does not aways work. Now I will have to check whether the fault comes from my code or from the original algorithm -_____-
and I am timing you @JeroenVannevel
@Morwenn Just pretend it always works
@skiwi When 9 + 14 == 23 yields false, there is a big problem.
@Phrancis Interesting. So I have googled de rien and am now slightly less ignorant than I used to be.
@Morwenn Ban usage of those numbers!
> This function works for all numbers, except 9 and 14.
15:11
At this rate, I'll be an accomplished French speaker in another 2000-3000 years.
2
@Malachi dbContext.Table<Atties>().Where(x => x.BarNum == user.Comment);?
@skiwi The problem is that I will have to write many test cases to find the problem.
@Morwenn In all seriousness, it does sound like a pain
@Donald.McLean The more "proper" way is Bienvenue (which means "Welcome"), De rien means literally, "Was nothing"
@JeroenVannevel what is that user talking about?
15:13
@Malachi your linq query, I assume. But I'm not sure if you need to use = or == in linq in expression form
I prefer the fluent API myself, much more.. fluent
it doesn't like .Table
60
Q: Proper Linq where clauses

A.R.I write a fair amount of linq in my day to day life, but mostly simple statements. I have noticed that when using where clauses, there are many ways to write them and each have the same results as far as I can tell. For example; from x in Collection where x.Age == 10 where x.Name == "Fido"...

@Phrancis Which is not mentioned on the page I read: french.about.com/od/vocabulary/a/de-rien.htm
they all have == so that's a syntactic mistake in your code
the where clause isn't where I hit an error.
15:15
what's the exact error - with the where clause fixed?
0
Q: cluster date time values tsql sql server 2008

csetzkornI came up with this tsql: DECLARE @TimeWindowInSeconds INT SET @TimeWindowInSeconds = 10 IF OBJECT_ID('tempdb..#Temp') IS NOT NULL DROP TABLE #Temp CREATE TABLE #Temp ( Class INT, DT DateTime ) INSERT INTO #Temp (Class, DT) SELECT 1, '2014-11-05 10:55:00' UNION ALL...

@Donald.McLean Ah I did not realize that "Bienvenue" was mostly a Canada thing, but indeed I have heard most of those forms used in varying degrees of formality, except for c'est moi qui vous remercie (or just c'est moi) - no, thank you (literally, "it is I who thanks you") that one seems pretty uncommon
hold on VS just froze on me
> Could not find an implementation of the query pattern for source type 'System.Data.Linq.DataContext'. 'Where' not found.
and your compact query gives me this
> The type or namespace name 'Atty' could not be found (are you missing a using directive or an assembly reference?)
which is my Table
what References do I need to make this work?
@Phrancis I talked to multiple Frenchies at a party and none of them would have said Je vous en prie instead of De rien. I don't trust whoever wrote that article
In Flemish we also say Da's niets (That's nothing) and the Spanish have their De nada
Flemish and Spanish are closer to French than English is, after all.
@Malachi: I'm not familiar with DataContext in particular. Perhaps it's GetTable<>() as this sample indicates?
@JeroenVannevel it doesn't like that either. I think I am missing a using directive or something... I have System.Linq and System.Data.Linq
15:25
That is true @JeroenVannevel I did not think about that.
@Malachi Eh.. Doesn't ReSharper handle this stuff? Is it the first or the second error you showed?
0
Q: How would you simplify this factorial function?

kalindef factorial(t,n): if n == 1 : return t else: x = (t * (n-1)) n = n-1 return factorial(x,n) print factorial(6,6) I cant seem to figure out a way to just stick to requiring one parameter input while keeping the program small.. Also I want the function to remain recursive (...

0
Q: How can my code be more pythonic/"djangonic"

Ibrahim ApachiI wrote an application which runs correctly, but I just want to have some feedback on it. Is there something unnecessary, or could there be something more pythonic or did I write some code which django could cover in particular cases ? This is my views.py from program.models import contract, ce...

The Second Error is on the query you wrote in chat
the first is on the query that wrote
Yeah
Subclass DataContext with your own implementation
And instantiate that instead
I don't know DataContext exactly but this is how DbContext (EF) works:
please hold
You subclass it and expose the tables you want. And you create specific mapping rules in OnModelCreating, separate EntityTypeConfiguration<T> subclasses or by using annotations
I am totally lost now....hold on a second...
15:34
Follow that guide
Either you use DataContext.GetTable<Tralala>() or you subclass DataContext with public Table<Tralala> properties
now that looks like it will make sense, I couldn't figure out why it didn't like my table.
you have to do that for every table in the Database before you can use LINQ on it?
mhhhhm
Not with Entity Framework. It will automatically generate them but they might not be as pretty
and you should do the composite tables yourself
But I don't know what happens when you use a naked DataContext
sounds like more work than what I am doing to begin with, I thought it was going to be easier to use, but it seems like I need to create all sorts of stuff to make it work, and do way more work.
EF is an ORM framework -- these are specifically meant to translate objects from code to database, including querying
@JeroenVannevel nothing apparently
15:39
Meh, it might look a little daunting but once you added a reference to Entity Framework and subclassed DbContext, entered 2 commands for Migrations, you've already got your entire database structure setup
It really is worth the time to use EF and configure it properly.
Unless you have a simple ToDo app of course. But as soon as you're looking towards a few tables and a few interweaved models, I'd think about EF
what is this crap?
> Delete this answered question?

We do not recommend deleting questions with answers because doing so deprives future readers of this knowledge.

Repeated deletion of answered questions can result in your account being blocked from asking. Are you sure you wish to delete?
Don't worry about it
You'll need to delete a lot for it to affect you as a 1.7k user
ps: The important part is subclassing DataContext, not the partial part
I think I need to find a book on EF after I finish reading through my C# book again, and then read through ASP.NET 3.5 (because that is what I have) and then find myself a ASP.NET MVC book
This is the one I read
Very good and extensive
Hmmm... grumpy munky today.... Must be the weather.
Maybe it was this:
> I didn't find this very helpful as I've made it clear this is for an assignment which dictates the numerical method to use and you appear to have used a different method.
00:00 - 16:0016:00 - 00:00

« first day (550 days earlier)      last day (3764 days later) »