« first day (837 days earlier)      last day (3478 days later) » 

00:00
RELOAD!
There are 1471 unanswered questions (94.3992% answered)
@EBrown wish I would have found that link before!
got everything set up to work on my Game again!
now I just need an installer project for VS2013E
00:24
0
Q: What the better pattern to monkey patch data in dictionary

user3675188the chart data stored in an nested dictionary struct @line_charts, And I need to convert the prices to target currency with the function exchange_datasets_currency. Finally return the @chart in the end of method. Is there any way to improve my pattern. def sample_a @line_charts = [get_lin...

@Malachi what are you installing? You've got 2 choices really.
Click Once or Installshield LE.
Click Once is built in for WPF apps.
I like it well enough.
It's okay. Easy enough if you're willing to totally relinquish control.
Makes pushing updates a breeze. That's for sure.
Usually, you don't need to have control like you do on RD.
It is mostly editing the registry that causes the problems, isn't it?
True, but it's nice having control. Preserving user settings is a PITA with click once too.
Yeah. Click once can't do that. It has to be a per user/admin less install.
00:29
Yeah. Unless you write them to a different directory.
Writing them to a specific file in a specific folder in AppData probably wouldn't be a problem (although I haven't tried).
> Steward review 99 more
I've rolled my own. A lot like I did for RD
What have you published with Click Once?
I've just done my Resx Editor.
Some winforms apps at work.
The autoupdate is convenient.
Publishing is a breeze.
Unless you need to publish to a test environment too... I need to get some build scripts written b
00:33
@RubberDuck its my game. I want to make an installer for you guys.
Anyway. If you need admin rights for any reason, you need to build an msi with something like InstallShieldLE. Otherwise, go with ClickOnce.
#InstallersAreHard, but ClickOnce is easy peazy
any of that included in express?
I use the old style one at work, but can't remember how I acquired it
I think so. Not sure. I know they're both available with Community.
What kind of app is it?
XNA game
00:44
That's why I use Unity3D. It's a simple Build > Select Platform > Build Game, and you've got a game executable.
01:05
can I port my XNA Game to Unity3D? can you build for XboX?
I am working on getting the installer to work right now along with fixing some bugs... I am sure there are going to be several. this is a game that I was building while I was in school.
@Malachi Yes, I'm pretty sure that Unity3D has an XboX option. I'm not sure about the port though.
what language is Unity3D? can I write in C# using Visual studios or do I have to get a new IDE?
@EthanBierlein I think you can too, but I think you need a license from/for Xbox.
I don't think I need a license with XNA..... you need a developers license I think
01:10
I think it's only for XboX360 though...
I have to get kids to bed, be back in a bit
I think I need to sleep. my eyes hurt!
Night.
01:33
0
Q: Given a sentence, return true if the sentence is a palindrome

jstunndef palindrome?(sentence) array_stripped_sentence = sentence.reverse.downcase.delete('').split('') array_stripped_sentence == sentence.downcase.delete(' ').split('') end puts palindrome?("Never odd or even") Is there a better way of doing this?

0
Q: c# style for setting field or property

TimI have problem deciding whether to use private field to set in a method call or should i use the property? I have listed 2 options below, may I know what is a good practice in C#? the good and bad of each option? private string _name; public string Name { set { _name = value;...

0
Q: MySQL JOIN to JSON array

SuperScriptI'm building a HTTP API and this part should return a JSON list of posts and their attached photos, like this: [ { "id": "788", "content": "Foo bar! Foo foo, bar bar.", "photos": [181, 282, 182] }, ... ] And this is my PHP code handling the request: // get ...

01:56
unity looks more graphical than I may be comfortable with....
@Malachi Is there too much GUI?
I don't know...lol
Well, if you decide to try it, I can help.
Not an expert though.
I am sure that one day it will come to me using Unity
I need to learn more coding, and get some games and applications under my belt
@Malachi Have you tried libGDX?
02:04
is that not a hypothetical "what's the best practice regarding X?" question? codereview.stackexchange.com/q/101333/23788
@SirPython no, I haven't done anything since I last worked on this game.
I still have to book that I used to get started, so I am going to read through the chapters that I read before and see if I can't remember the stuff I did
and make it better
because I see a lot of stuff in my code that I want to change, badly
I have closed this question as hypothetical code, but please note questions asking "what's the best practice regarding X?" are off-topic on this site. — Mat's Mug ♦ 2 mins ago
02:27
sorry @Mat'sMug I was working on getting my Highscores manager back into working condition.
@Mat'sMug but I agree with you on that one
eh, it's fine, I'm working on getting my TestEngine to work with a WPF TestExplorerViewModel
nice
yeah... this shit isn't nice right now ;-)
I should set up some Tests on this game so I am not playing it so much while I am trying to test
02:31
sorry to hear that....is it your open source project?
yeah
that code hasn't changed since it was ported from VBA
I think I might just rewrite the whole damn thing
we are talking about RubberDuck right?
Rubberduck
RubberDuck is a CR user :)
lol
how do I install that? do I need to actually install it through office or something?
you have Office installed?
02:42
no. but I was going to see if it plays nicely with openoffice....lol
I don't think it does
I am thinking about getting office 365 and ......
I will figure it out later. I need to sleep. my brain is starting to lag....
night
later, have fun.
 
1 hour later…
03:57
0
Q: Kosaraju in Scala

BaconI started coding in Scala some time ago, and also learning some fundamental algorithm in CS. Here's a terribly slow implementation of Kosaraju algorithm to find strongly connected components in a graph. I'm looking for two things: Learning how to use Scala data structures Learning earn how to...

04:16
This should be moved to codereview.stackexchange.com — Tushar 14 secs ago
Whoops, I did a cross-join by accident. No wonder my result set returned 70K records instead of two.
It is always fun debugging a bug you can't see.
No exceptions or anything...
Schrödinger's Bug?
Something.
1
Q: Mutually Exclusive RadioButtons

catlovespurpleHere is a small code snippet I wrote. I feel like it's pretty naive. I copied the code directly from my project and renamed some id/class names. I wonder how you (advanced JS coders) could help to improve/refactor the code. radiobox1 and radiobox2 form a pair, and radiobox3 and radiobox4 form ano...

04:23
If those damn table names were better, it'd make avoid bad joins far easier. I just spotted it, does anyone see the cross-join? :)
left join  [$(ServerName)].[$(DatabaseName)].[dbo].[physicians]
    as "Physician" on "Order".o_phid = "Physician".ph_id
left join  [$(ServerName)].[$(DatabaseName)].[dbo].[physicians]
    as "SigningPhysician" on "Order".o_primarysignedphid = "Physician".ph_id
The Heisenbug.
@Phrancis The two "Physician" strings?
Random guess, I don't know much SQL. That'll change this fall, though.
I used the wrong table alias on my 2nd on foo = bar
> as "SigningPhysician" on "Order".o_primarysignedphid = "Physician".ph_id
That "Physician", right?
Yep.
That's the one I meant.
I didn't see the middle one at first.
04:26
Clearly a copy-pasta mistake on my part
But yeah, every single table (or most of them, which is worse) use this goofy naming scheme
vendor.v_id becomes vendor_client_orders.vci_vid, and vendor_client_order_status.vcos_id becomes vendor_client_order.vco_vcosid, etc.
Very confusing
Especially when you see inconsistencies like vco_epiid you look for a table with the acronym "E.P.I." but the field you really need is episodes.epi_id :|
Hungarian notation gone completely bonkers
You're the employee. Can't you change it?
Depends how quickly I want to be back on the job market...
You mean they might fire you?
I attempt to compensate by using good aliases, but... most don't lol
@Hosch250 Well, it would only crash all their live applications and cause the DBAs there to have to restore entire servers from backups, so yes, definitely. :)
Oh, lol.
04:41
But in other people's queries I see things like from client_orders o inner join vendor_client_orders vco on o.o_id = vco.vco_oid inner join vendor_client_order_status vcos on vco.vco_vcosid = vcos.vcos_id -- etc.
shouldn't it be O.o_id?
Should be Orders.Id ;)
O.o looked right ;-)
o.o looks a bit like glasses.
o^o does too.
04:43
^o-o^
vco_oid looks like a little guy that really doesn't know what it's doing there
You should ask them if they've got such bad eye problems they need to program themselves digital glasses.
I need to get ready for bed now. See you.
night!
@Mat'sMug does a value like this 572DBBD2-7731-4CA9-8955-2CBF706820E3 look like a hashed value represented as a string in SQL Server?
looks like a GUID
04:46
If your code is working fine with no issues, you should visit codereview.stackexchange.comNishant 43 secs ago
WTF
How do you get a GUID? Salting an ID and then hashing it?
the server generates it
if the server isn't generating it, it's technically not guaranteed to be as unique as it's supposed to be
Are those used for authentication or something?
I've seen them used for many things, including ...sorting.
could be
think of a GUID as a very, very, very, very large number
it's identifying something, hopefully uniquely
Rubberduck uses a GUID to register all its COM-visible types into the Windows registry
@Mat'sMug Such as... a hash? ;)
04:53
@Phrancis a .net hashcode would be stored in an Int32 - a GUID is much larger than that
Makes sense though, in a way I guess
Sooooooooooooooooo now I have an idea what my issue stems from!
what issue?
That^
04:57
the type is a varchar I guess?
beautiful
uniqueidentifier would have been too good
Hey, at least most of the IDs are ints
Just this one in particular is not, perhaps by design to allow something like this to annoy a customer come up as an exception instead of erroring a query out
update [dat_table] set VendorOrderId = 'foobar' where HchbO = 745462;
It's pretty convoluted, those fields are obtained from a SP that drops some of those values as an XML on a file server, which is then grabbed again by SQL and updates that record. It's as if in some cases perhaps one of the XML fields is missing (or one too many) and makes it to where the GUID gets shoved in the wrong column
05:01
you know TSQL works very well with X-Query huh?
oh, nm
you're grabbing the XML from SQL
I guess the file is needed by some other process
I think the file server part is needed too, it moves the load onto a different application or server or something
Yeah. If I'm not mistaken, that might actually be how those orders come in in the first place from the vendor's interface
EDI
lovely
EDI?
Electronic Data Interchange
vendor FTP's a file, and you handle it
no?
Ah, yes, that sounds about right
Well knowing the problem is half the battle I guess, now I know where to look for the solution
(or at least the ad hoc fix)
I really do think GUIDs are probably generated by hashing, though
05:08
@Phrancis that'd be weird
All SQL would need to do really is keep a running tally of up to 2^128 ints, hash the newest one, cast the varbinary to a string, do a quick if not exists-type check and add the hyphens
(sort of, anyways)
and how do you store 2^128 in a 64-bit integer?
(trick question)
select
hashbytes('MD5', '1'), -- 0xC4CA4238A0B923820DCC509A6F75849B
hashbytes('SHA1', '1') -- 0x356A192B7913B04C54574D18C28D46E6395428AB
-- drop 0x, add hyphens...
--GUID: 572DBBD2-7731-4CA9-8955-2CBF706820E3 <-- real thing
--MD5:  C4CA4238-A0B9-2382-0DCC-509A6F75849B
--SHA1: 356A192B-7913-B04C-5457-4D18C28D46E6395428AB
so you store strings then
GUIDs are stored in a varchar() right?
05:17
SQL Server has a uniqueidentifier type for it
Ah. Well that might have some unique properties, but I think it's just a MD5 hash converted to string
@Mat'sMug Good question, how?
206
A: Is a GUID unique 100% of the time?

Adam Davis While each generated GUID is not guaranteed to be unique, the total number of unique keys (2^128 or 3.4×10^38) is so large that the probability of the same number being generated twice is very small. For example, consider the observable universe, which contains about 5×10^22 star...

> consider the observable universe, which contains about 5×10^22 stars; every star could then have 6.8×10^15 universally unique GUIDs.
MD5 is also 2^128 ... SHA1 even more, but that'd be tragic overkill
If you're like me, then you'll want to know that 2^128 written out is approximately: 34,028,236,692,093,846,346,337,460,743,177,000,000. Statistically, if you calculated 1000 GUIDs every second, it would still take trillions of years to get a duplicate. — Entity Jul 24 '12 at 4:01
isn't that older than the age of the universe?
By orders of magnitude, yes
The universe is roughly 1.6% of one trillion years old (16 billion)
05:24
so, we could calculate a million GUIDs per second, and hope to get a dupe before Earth gets hit by another massive asteroid
The sun would probably run out of fuel before we got done
well that's easy: put the computers on Io
when the Sun turns into a Giant Red, Io will be at about the same distance as Earth from current Sun
except the Sun will be much cooler then
(Io is one of Jupiter's moons)
I wonder how long it would take for a computer to even just count to 2^128 (one by one in a loop)
Let alone hash each number
let alone compute fizzbuzz for each value
Apart from the off-topic code review aspect of this question, the function requirements seem a duplicate of many other questions. Please search before posting, Mary. — Tony D 17 secs ago
05:32
The one thing I'm not sure how I would do in SQL is to convert/cast the human-readable varbinary value to a string type of the human readable version (rather than the raw binary version)
select
hashbytes('MD5', '1'), -- 0xC4CA4238A0B923820DCC509A6F75849B
hashbytes('SHA1', '1'), -- 0x356A192B7913B04C54574D18C28D46E6395428AB
cast(hashbytes('MD5', '1') as varchar(max)),  -- ÄÊB8 ¹#‚ÌPšou„›
cast(hashbytes('SHA1', '1') as varchar(max))  -- 5j+y°LTWMFæ9T(«
interesting
not sure either
Guess that's what happen when you shove 128 bit binary into a human character set
nvarchar yields totally different results
unicode might be better actually
select
                       hashbytes('MD5', '1'),  -- 0xC4CA4238A0B923820DCC509A6F75849B
cast(hashbytes('MD5', '1') as varchar(max)),   -- ÄÊB8 ¹#‚ÌPšou„›
cast(hashbytes('MD5', '1') as nvarchar(max)),  -- 쫄㡂릠舣찍驐畯鮄
                      hashbytes('SHA1', '1'),  -- 0x356A192B7913B04C54574D18C28D46E6395428AB
cast(hashbytes('SHA1', '1') as varchar(max)),  -- 5j+y°LTWMFæ9T(«
cast(hashbytes('SHA1', '1') as nvarchar(max))  -- 樵⬙፹䲰坔ᡍ跂吹ꬨ
lol
maybe not
05:37
ikr
32
A: SQL Server converting varbinary to string

András OttóTry: DECLARE @varbinaryField varbinary(max); SET @varbinaryField = 0x21232F297A57A5A743894A0E4A801FC3; SELECT CONVERT(varchar(max),@varbinaryField,2), @varbinaryField UPDATED: For SQL Server 2008

Enough SQL for tonight. TTGTB!
me too!
06:06
Donna Choi on August 25, 2015
Learn why Stack Overflow is a good workplace for women with this post written by designer Donna Choi
06:26
Hello Tim! Thank you for your detailed answer. That is something simliar what we already do if someone do the code review. We do it with the download plugin in the new screen. But - back to the developer we spoke about... — ChangeRequest 19 secs ago
Monking
Hello Tim! Thank you for your detailed answer. That is something simliar what we already do if someone do the code review. We do it with the download plugin in the new screen. But - back to the developer we spoke about... He has already his history in his local branch and is (let`s say) 4 commits ahead. That means changes on previous commits change cause changes in the tree. We have additional commits on top of commit with the SHA 1234. Some of them are already pushed to gerrit and the last maybe not. — ChangeRequest 59 secs ago
monking @all
06:41
hey @chillworld
06:54
looks calmer now, saw yesterday a big discussion here in chat
What is the issue exactly? If you just want to someone to comment on your code you'd be better off at codereview.stackexchange.com. — user657267 54 secs ago
Are you having a problem with the code not working? If you want a review of your code or suggestions for improvements, you should post this in CodeReview instead of here. — Sebastian 14 secs ago
07:23
0
Q: How to condense code : know the limits of an image after rotation

ManimalisIm a beginner in Java. I have an image which I know the number of rows and the number of columns. I would like to calculate the limits of the new image after a rotation. This is my code : BufferedImage myImage = ImageIO.read( new File( "D:\\Users...jpg" ) ); xmaxOrigine = myImage.getWidt...

monkernoon
07:57
Monking
Mönking
Greetings
08:24
jippie connection back
jippie connection back
Monking
Greetings
monking @all missed ones :)
If this is working code, you may be better off in codereview.stackexchange.com — Trengot 17 secs ago
0
Q: Static Method To Create Intents

jiduvahI had the idea to have a static method on an activity which creates intents that it can use. For example if I have an activity with a webview that can load html from a resource or a URL I would have 2 methods in the activity like so. public static Intent createURLIntent(Context context, int titl...

@CaptainObvious Looks good to me
09:01
0
Q: Binary Search Implementation

user81527I was just wondering is there a better way to implement a binary search than I am in my code? My function is taking 2 two lists - first_booth_voters and second_booth_voters with second_booth_voters being sorted and first_booth_voters not sorted. I feel like I am making an unnecessary amount of co...

0
Q: A generic plotting wrapper (around matplotlib) in Python

Bas JansenI am experimenting with making my own re-usable libraries. Therefore, I decided to start with some of the plots that I generally use during development/debugging to check what is actually inside my data. My questions therefore are: Would this be the correct way of writing a library? Are there ...

This question is about improving working code. It would be more fit to Code Review. — Frédéric Hamidi 16 secs ago
Can users see why their edit was rejected?
I think so
^ You have rep
09:15
Yup
I've rejected the same edit as you
I recognize the reason why for the edit, but this kind is better to be left as a comment
Changing code, even whitespace, is BAD
aside from the fact that the code currently doesn't work..
This will change the reviewers' answers and, in case of Python, may even change the scope of the code
because python is dumb and relies on whitespace for scpoing..
Exactly
But I like it
that said there was an approve on the edit..
09:18
Yes
That user who is usually screwing up on his questions
lol ..
It's true
12 - 0 doesn't sound reasonable for CR edits...
Is that his rejection rate?
nope the accept rate.
12 accepts 0 rejects
yours is 14 - 5 and Quill has 22 - 5
09:21
Actually, I have 9 edits, 1 rejected
Or am I in the wrong tab?
it's about the review actions
Oh
Yeach, I see
You refer to the posts that I've accepted edits and others that I've rejected
That's accurate
Your font looks better than mine
But yes, I see what you mean
I think a dictionary of dictionaries would be your best bet here. If you're posting to CodeReview I could write up what I'm thinking as an answer over there. — SuperBiasedMan 54 secs ago
The original developer has some further commits. So the tree has a dependency to sha1234. But he has to change sha1234 in order to apply the code review results. The commit that have sha1234 as the parent has to be rebased. Of course that has also impact of all the following commits he already have and result in some conflicts... The initial question was: Is the proposed way (the steps above) to solve that situation wrong? — ChangeRequest 35 secs ago
09:38
Wow, at some point you hink you have finally won against your language designing GUIs, and then it decides that "transparent" is "black"
That would look cool:
A form with see-though text
0
Q: Unit Converter in Python

user81530I am new to programming and I am trying to make a simple unit converter in python. I want to convert units within the metric system and metric to imperial and vice-versa. I have started with this code and I found this method is slow and in-efficient, How can I code this more efficiently? import ...

Yet another edit
1
Q: Binary Search Implementation

user81527I was just wondering is there a better way to implement a binary search than I am in my code? My function is taking 2 two lists - first_booth_voters and second_booth_voters with second_booth_voters being sorted and first_booth_voters not sorted. I feel like I am making an unnecessary amount of co...

^ Lock it down for edits? 2 users already edited whitespace in it
I will keep an eye on it
You seem to be using CCM with a default tag size of 16 bytes instead of the 8 bytes for CCM_8. The plaintext also seems to include the MAC. The MAC is not included in the plaintext for authenticated ciphers. That's why the ciphertext is of a different size. But this is really a question for codereview - if that - SO is not suitable for online debugging sessions. — Maarten Bodewes 53 secs ago
-1
Q: Java Script Codes

Rehab SayedPlease I need urgent your assistance 1) How to change the text on the Java Script error alert window. "attached No.1" It says JavaScript Alert: the following error(s) required. Can we change the text (Java Script error alert). 2) How to make check box form required to submit form. I have re...

0
Q: Integrating depth images into an SDF

ErikI want to improve the following peace of code as much as possible, both regarding to speed and other aspects I may not know about, since I have learned C++ myself, there are probably many things to learn and to improve. To point it out, I want to improve the code with just one core in mind, I kn...

09:50
@CaptainObvious Cross-post: stackoverflow.com/questions/32090100/…
@CaptainObvious Off-topic: no code and broken code if it had any
10:04
@CaptainObvious Please nuke. Blatantly off-topic.
Monking
Greetings
The O.P. of that post left a comment saying "Javascript code:"
But he deleted it
@CaptainObvious @IsmaelMiguel you shouldn't mention other sites in comments on crap posts
2
because then the OP copy-pastas to over there, and now there's two crap posts
The comment says: "If you attach the code"
But next time, I won't refer to any website
10:23
people have a remarkable ability to only see what they want to see.
I have to agree
Here, in Portugal, we have a saying that's somewhat like this:
"The biggest blind is the one that doesn't want to see."
But the question is still off-topic
@CaptainObvious just became on-hold
Thank you!
@Quill lucky the "broken" reason got through.
@Vogel612 4:1 for broken
10:29
At the time I've voted, it had no code
Hence that ratio
Now I know what they mean when they say JavaScript can be ugly @CaptainObvious
It isn't ugly: it's awful
function MM_validateForm() { //v4.0
  if (document.getElementById){
Really?
Mind you.. mine isn't much prettier atm.. gist.github.com/danpantry/2031e169e9000a5126fe
Version 4.0 -> checks if there's a document.getElementById, which must always exist
That's not bad
The number of import is a bit scary
10:34
Could be worst
10:52
-1
A: Karatsuba C++ implementation

AVRA much better implementation can be found in https://hackerstheory.wordpress.com/2015/08/19/karatsuba-algorithm/

no thanks
0
Q: Output lines with substrings in DataGrid

Yura BarabakhI have a viewModel that contains the property: public ObservableCollection<ObladnanModel> Collection { get; set; } That property bind to datagrid: <DataGrid HorizontalAlignment="Left" Height="133" Margin="34,52,0,0" VerticalAlignment="Top" ItemsSource="{Binding Collection, Mode=...

@Malachi Worng. You can call any extension method like a normal static method. So passing `nothing` is perfectly legal. Like

Dim i(10) As String
Dim resultPassingNothing As Boolean = IsAllocated(i)
Dim resultUsingAsExtension As Boolean = i.IsAllocated()
Dim i(10) As String
Dim resultPassingNothing As Boolean = IsAllocated(i)
Dim resultUsingAsExtension As Boolean = i.IsAllocated()
here, just remove it from the original now
Can mods see whether someone clicked « No Action Needed », « I'm Done » or « Skip » on a First Posts review?
@Morwenn EVERYONE can see that..
10:58
@Vogel612 Oh, good to know.
@Vogel612 even skips?
not sure about skips..
that said, I think this first post is spam

« first day (837 days earlier)      last day (3478 days later) »