« first day (789 days earlier)      last day (4154 days later) » 

8:00 PM
Their little goat was kicked to pieces x2
 
> Number of goats vandalised includes goats thrown in the river.
Yeah, I bet.
 
survival rate 45%
make that 42 now
 
8:14 PM
@KendallFrey You got some experience with ActionScript?
 
woot, bug report investigation sent. 6 pages long :P
Oh, I have experience with ActionScript! T~T
 
Want to help me with a concept I'm failing at? haha
 
Sure, but I only have 15 minutes before I have to leave for class.
challenge accepted
 
ok let me shoot this up on pastebin and i'll make perfect sense out of it for you :p
It is probably very ugly and that's cuz I'm learning, don't judge me! :p
 
idk if I can get to pastebin on my work pc
oh, I can!
hurry, before they block it
 
8:16 PM
wow, the tabbing is horrific..
ok and that one
 
@jhartzell Not worth mentioning.
 
alright so basically my problem here that I'm trying to resolve;
I have a Tree view that I'm working with, inside my Intialize function I'm creating instances of all 3 of my classes so that I can call functions from them
refer to the second link for the above statement
then what I do is call EditMessageClass.PopulateCategories()
 
That's... ActionScript?
 
thats actionscript and mxml, yes
 
No idea what MXML is.
 
8:19 PM
MXML: Great idea, wrong language. It's cleaner than JSP, by far.
 
and I create a ArrayCollection to bind to my tree at the bottom of the (second file) and I'm calling EditMessageClass.jsonResults to bind the Tree to
 
Oh, it's essentially an XML-based UI construction language, like HTML, except for Flash UI components.
it supports inline scriptlets in Actionscript, as well.
and template bindings via runtime expressions.
 
but the problem is, since I'm initializing my EditMessageClass in my initialize function, when my PopulateCategories "Finish" event handler fires it never updates my public variable because it is initialized at the begining of the app..
if that makes any sense, its pretty damn convoluted but I'm trying to figure out what I'm doing wrong heh..
 
btw, this is essentially how all of Flash/AS3 is. Super convoluted.
 
yea for real
 
8:22 PM
Does anybody know how to restart a ClickOnce app, properly?
 
I know how to avoid ClickOnce, if you're interested.
 
Do you even follow my problem at all or are you just confused? haha
 
I'm rather confused.
So, the problem is that the tree isn't binding properly?
 
correct
 
@KendallFrey Thanks... but that won't help my predicament. lol. What is your suggestion?
 
8:26 PM
You might have to manually bind the object in the Initialize() function on the page, rather than using MXML binding arguments.
then force a refresh of the Tree object.
btw, MXML's initialization order is pants-on-head retarded.
 
well the problem is this;
protected function Initialize(event:FlexEvent):void
{
this.MainApplication = new Main(this);
this.LoginClass = new Login(this);
this.EditMessageClass = new EditMessage(this);
}
that loads on app load
 
Understood.
 
and inside my EditMessageClass
I have this
public var jsonResults:Object;
ok so then I have a button on my MXML
 
posted on December 13, 2012 by Scott Hanselman

I've talked before in presentations that the ASP.NET and Web Tools team has been slowly externalizing pieces of ASP.NET. You've seen it in many pieces of the ASP.NET runtime moving into NuGet while also being open sourced, and you've seen it as we've moved big chunks of the "tooling" (that means the menus and dialogs you interact with in ASP.NET) into external installers. Why are

 
this is a click event, when this button is clicked, this is what happens:

protected function loadLibraries(event:MouseEvent):void
{
EditMessageClass.PopulateLibraries();

treeData = EditMessageClass.jsonResults;
currentState = 'EditMessage';
}
 
8:30 PM
Well, do a null-check on EditMessageClass in loadLibraries(). Done.
 
see thats the thing
Its not null there
my call back
private function onLibrariesLoaded(response:ResultEvent):void
{
var Result:String = response.result.toString() as String;
var jsonParsed:Object = JSON.parse(Result);

this.jsonResults = jsonParsed;
}
 
That is because ajax is asynchronous. You need to wait before you try to collect the results.
 
jsonResults = null inside my Main Class
 
I have to go, sorry.
 
jsonResults isn't populated when you check it yet.
It is still fetching when you look for it.
 
8:31 PM
adios, gl
 
ty shotgun
well is that the problem or is it because I'm initializing the class on app load
which would mean jsonResult would always be null?
 
The problem is that you need to wait for the results to come back before you check for them.
can you somehow wait until this
private function onLibrariesLoaded(response:ResultEvent):void
notifies you?
 
yes
 
I would suggest trying that
 
and it is always populated inside itself
 
8:32 PM
Am I the only one that finds the fact that Colors.NavajoWhite has a hex color of "FFFFDEAD" kinda amusing?
 
but inside my class Main it is never populated, its always null
 
So do this:
EditMessageClass.PopulateLibraries();

and then wait for this to complete:
 onLibrariesLoaded(response:ResultEvent):void

and then try:
treeData = EditMessageClass.jsonResults;
if you can manage that
 
onLibrariesLoaded is the event handler of PopulateLibraries tho and it's inside EditMEssageClass
public function PopulateLibraries():void {
var params:Object = new Object;

// get companyId of logged in user from our "flex cookie"
var clientData:SharedObject = SharedObject.getLocal("customerData");

params.companyId = clientData.data.companyId;

httpService.method = 'POST';
httpService.url = 'http://services.works24.com/record24api/content/GetClientCategories';
httpService.contentType = "application/json";

httpService.addEventListener(ResultEvent.RESULT, onLibrariesLoaded);
httpService.addEventListener(FaultEvent.FAULT, onLibraryLoadError);
and "this.jsonResults" is a public bindable var inside that same class
 
@SPFiredrake lol
 
@KendallFrey Oh thank god, I'm not the only one :P
 
8:36 PM
I know where they are, that is why I was surprised you said that it would be ok for it to happen
I am not sure what mechanisms are available to you, but treeData = EditMessageClass.jsonResults; is happening before this.jsonResults = jsonParsed; is and that is why it is always null.
 
Anyone know of a good replacement to click once for version control besides building one from scratch
 
ahhh yes.. didn't think of that actually
 
Colors.DimGray ;)
 
however whenever "loadLibraries" is called and EditMessageClass.PopulateLibraries() is fired off EditMessageClass.jsonResults shouldn't be null at that point.
 
Your code in loadLibraries runs synchronously at the nanosecond level. Fractions of a millisecond inbetween each instruction. Ajax runs asynchronously at the millisecond level.
Try seeding it with something. It should always be that.
 
8:40 PM
What do you mean? I'm sorry this is very new to me :p
I understand the async, sync comments but the other I do not.
 
Set your json to be some default "{ 'name':'val' }" type of thing.
 
I rarely ask for coding help but do you think you could hop on join.me with me and give me an idea? I hate asking but I am just so confused right now I need some serious clarification lol
 
I don't know anything about that syntax :( I haven't code in actionscript before.
All I know is that your ajax request is taking longer to complete than the time it takes for you to check for an answer.
 
ah alright, np :p
I'm just now getting into it and I have to say, it is the most convoluted language I have ever played with
 
If I were to try something it would probably be an ugly hack :P
 
8:43 PM
This shit is worse than c++ imo.
 
@jhartzell You should try Malbolge.
 
That doesn't even sound like fun lol
 
I get to change a field in the database, yay </sarcasm>
 
Or <shamelessplug>REBEL ;)</shamelessplug>.
 
psh, nice timing @Kendall
 
8:45 PM
@jhartzell Put it this way. If you write a loop in Malbolge, you're pretty much famous.
 
lol
 
that sounds awesome, I think I should give it a go ;)
 
dafuq. is that a regex language?
 
REBEL is much, much cooler.
@TravisJ Malbolge? no.
 
is it ASM based?
jumps and nops
 
8:46 PM
No.
It is based on ternary, BTW.
 
Is it fast?
 
Nobody knows, but probably not very.
It's interpreted.
Or something like that.
 
Is Malbolge the language that doesn't implement GOTO but does implement COMEFROM?
 
oh...might be brainfuck
that sounds too conventional for Malbolge
 
8:56 PM
I think brainfuck is pretty straightforward
 
No, brainfuck doesn't have comefrom.
 
it's just very ugly
 
In computer programming, COMEFROM (or COME FROM) is an obscure control flow structure used in some programming languages, originally as a joke. COMEFROM is roughly the opposite of GOTO in that it can take the execution state from any arbitrary point in code to a COMEFROM statement. The point in code where the state transfer happens is usually given as a parameter to COMEFROM. Whether the transfer happens before or after the instruction at the specified transfer point depends on the language used. Depending on the language used, multiple COMEFROMs referencing the same departure point may be...
It seems even FORTRAN implemented it.
 
aah, it's INTERCAL I'm thinking of
 
REBEL has no control flow at all.
 
8:58 PM
which IMHO is a much cleverer pastiche of programmer culture than either of the aforementioned
 
It's all declarative.
And awesome.
 
phew, db altered
 
9:31 PM
UX question. I have a list of items, where each item consists of two strings. At any given time, one of these items will be highlighted. How should I present them?
 
@KendallFrey what's wrong with a table?
is the highlight an XOR? One or the other, but not both?
 
Right now, I have each string on one line, but there is no separation between adjacent items, and so everything sort of runs together.
 
@KendallFrey just use a table. something like this:
 
I thought of: extra spacing between items, a line between items, indenting, tables
 
string1   |    derp    |     herp   |
____________________________
string2   |    herp??  |     derpy  |
 
9:33 PM
But none of those seem very good-looking.
@Pheonixblade9 A table seems too cluttered for this simple data.
 
a table is exactly the opposite of cluttered, it's a great way to organize data
I think you're overthinking it. If you're talking about UX, use patterns people are used to, unless you have a compelling reason not to.
 
By cluttered, I mean that there are a large number of non-essential things (specifically, lines between cells) distracting the user.
 
@KendallFrey why do you need lines between cells? just use a couple pixels as padding.
table != EXCEL
 
Whitespace? Eh, sounds sketchy.
I have enough as it is, being it's in a monospace font.
 
:P ok, don't listen to the guy that works as an Android UX consultant
well, give me a screenshot
that's always helpful :)
 
9:38 PM
 
u no like my pretty code?
 
I said a screenshot, you fool!
 
Where did you think I got that?
 
Wow, dead room much
 
9:50 PM
Ugly code, animated gifs, and you say it's a dead room.
 
@LewsTherin im watching got
 
I thought you hated it?
 
@LewsTherin but I trust you
it is ok
 
:P I think it is pretty good. What ep?
 
season 2:9 i think
 
9:52 PM
Oh so you have an idea for yourself whether you like it or not.
 
its kinda slow and a little too much soft prn, but looks expensive
 
Looks expensive? It actually isn't slow.. what it is extremely short! P(
 
but it's very dark when something eventually happens
 
Yeah, that's part of the reason it is awesome.
 
guess they save a couple of $ on sfx by making it happen at night
 
9:55 PM
Although the author comes off as a misogynist
 
Walking Dead has soft porn? o_O ?
 
@Pheonixblade9 GoT... where did you see Walking Dead? :P
 
Oh, ok
maybe from Dead room?
idk
 
How can I use modern for my website?
 
@LewsTherin you mean modernizr?
 
9:57 PM
Let me check..
Does it look like Win 8 Metro?
I want it to look like Gmail and Youtube UI or specifically like Win 8 UI
 
oh, idk
one of our engineers did some crazy thing for a code-a-thon that made our site look like a windows 8 tablet
 
I will research it then.. could be modernizer
 
Does have a suggestion to generate a semi-unqiue integer for a string? It dosen't need to be perfect, I just to complete this condition: stackoverflow.com/questions/13796740/… I feel like it should be easy with some sort of simple computation. Easy 50 points!
 
10:16 PM
I need this shirt for my son:
 
lol
 
of course the top comment on imgur is: "Shhhh, no one can know you're adopted..."
 
Hey, is anyone here familiar with the nuances of Invoking methods on controls?
I've got this weird error that I cannot make any sense of
 
What would you like, Benjamin?
 
well, basically I am invoking a method delegate and an error is being thrown.
here is the code
public void SetStatus(string value)
{
if (statusLabel.InvokeRequired)
{
statusLabel.BeginInvoke((MethodInvoker)delegate { SetStatus(value); });
}
else
{
statusLabel.Text = value;
}

}
 
10:28 PM
I am doing this, is there any way to speed it up?
public bool inDb(Expression<Func<TEntity, bool>> filter)
{
IQueryable<TEntity> query = dbSet;
return query.Any(filter);
}
used:
 
Going to a keg opening party with a cute girl tonight, woot
 
if (!gr.inDb(r => r.Description.ToUpper() == desc))
 
@TravisJ speed it up? raw reads, you mean?
 
@BenjaminDangerJohnson What's the error
 
I think .First is faster than .Any
 
10:29 PM
it seems InvokeRequired passes, but the code still moves into the else method and throws a cross thread access exception
 
@Pheonixblade9 - When it returns true it takes a little bit longer, false is super fast
 
so I can see there is some sort of race condition, but I've go no idea how it is being caused
 
when which returns true?
.Any you mean?
 
yes
 
ok well one thing you could do
instead of using .ToUpper
 
10:30 PM
@BenjaminDangerJohnson So this line NEVER gets called? statusLabel.BeginInvoke((MethodInvoker)delegate { SetStatus(value); });
 
use (hold on, I'll find it)
StringComparison.OrdinalIgnoreCase
 
will that match thiS with ThiS?
 
@BenjaminDangerJohnson It's possible that the label's handle has not yet been created.
Check this out:
4
Q: InvokeRequired of Form == false and InvokeRequired of contained control == true

Dmitry Lobanovhow is it possible? I have windows Form control, derived from System.Windows.Forms.Form with WebBrowser control contained in this form. Webbrowser object instance is created in constructor of form (in InitializeComponent() method). Then in background thread I manipulate with content of WebBrowser...

 
@TravisJ yes, but I think it is a very slight improvement
 
@C.Barlow maybe, I'm trying to see if I can get a debug line to print to the console
 
10:32 PM
@TravisJ yes, and I believe it's much faster than .ToUpper()
 
might need to use s1.Equals(s2,StringComparision.OrdinalIgnoreCase) syntax
 
So you'll want to use String.CompareOrdinal rather than String.Equals or String.Compare
 
@C.Barlow yes, usually when the error is thrown (and it's not always thrown) it never enters the true part of the coniditional
 
@JohanLarsson you need to use the CompareOrdinal, otherwise the performance gain is moot
 
@C.Barlow is there a way to wait for the handle to be initialized?
 
10:34 PM
@Pheonixblade9 ok, I'm gonna test it later, would be surprised to see a huge difference
 
don't I have to use tostring to use that?
this is linq for sql
 
@JohanLarsson the way I understand it, String.Equals() compares the entire object, String.CompareOrdinal compares each of the character's integer values within the string
 
@Travis can you use Func<TEntity, bool> instead of Expression<Func<TEntity, bool>> filter?
 
@Johan - If it works I can change it, what would the difference be?
 
@BenjaminDangerJohnson You can try forcing the handle's creation by accessing it
but really, you're trying to access something before it's really there... so maybe you just have a logic problem
 
10:37 PM
@Pheonixblade9 that might be truem but there is an overload to string equals that takes a comparision thing
@TravisJ the expression needs to be compiled before incvoked
compiled to a func
 
@BenjaminDangerJohnson you could use a Lazy<IEnumerable> if you really want to maintain a reference and access it later :)
 
@Johan - The compiler didn't complain
@Pheonixblade9 - what will String.CompareOrdinal return? it says int
 
@TravisJ then you have a performance boost, should even be noticeable I think
 
@C.Barlow yes, I suppose I do have a slight hiccup in my logic. I'm trying to kick off an action worker before the base ShowDialog function is called.
I mean background worker
 
@Johan - What would require the expression to be compiled?
 
10:40 PM
@BenjaminDangerJohnson Yeah - maybe before calling the method in question, you check the IsHandleCreated prop
if possible...
 
@C.Barlow just found a "Shown" event I can probably hook this up to
 
Or maybe you wait until you know that the form is loaded and shown before trying to change stuff on a background thread
yeah =)
 
@TravisJ I'm not really sure
 
yeah, I guess that solves it. Or at least I have not hit the issue immediately
thanks for the help
 
dammit, someone deleted an answer I downvoted
 
10:43 PM
@TravisJ An integer that indicates the lexical relationship between the two comparands.
 
now my rep isn't a round number anymore
 
Return Value
Type: System.Int32
An integer that indicates the lexical relationship between the two comparands.
Value
Condition
Less than zero
strA is less than strB.
Zero
strA and strB are equal.
Greater than zero
strA is greater than strB.
 
@TravisJ looks like Any wants an expression: msdn.microsoft.com/en-us/library/bb534338.aspx
 
I hate that. I demand my rep always be a multiple of 5
 
10:43 PM
@Pheonixblade9 - so which one indicates no match?
 
@TravisJ any number other than 0
 
so a match means the equality starts at 0?
 
think of it this way
 
is no match going to be -1?
 
nope
a mismatch can be any integer
 
10:44 PM
im back
 
so it will match partials?
 
hey everyone
 
a match === 0
@TravisJ no, it matches entire strings
"abc" compared with "abc" would return 0
 
and abc compared with acb?
 
that would not be 0
essentially what it's doing is a loop
 
10:45 PM
24
A: What is the fastest (built-in) comparison for string-types in C#

Jon SkeetI'm assuming you want a less-than/equal/greater-than comparison rather than just equality; equality is a slightly different topic, although the principles are basically the same. If you're actually only searching for presence in something like a SortedList, I'd consider using a Dictionary<stri...

 
seems inconsistent
 
@TravisJ no. It's comparing the characters in each position in the respective strings.
 
but you want equals
 
if you want to match letters as well, I'd split it into a Dictionary<char, int>
if you're just checking for equality, use the method I described above
 
"LINQ to Entities does not recognize the method 'Int32 CompareOrdinal(System.String, System.String)' method, and this method cannot be translated into a store expression."
 
10:50 PM
@TravisJ can you benchmark it?
 
@Johan - Benchmark what? It threw an exception
 
ok, sry
does this throw too:
 
@TravisJ full code, please
 
string.Equals(s1, s2, StringComparison.OrdinalIgnoreCase)
 
I tried this:
.Any( r => String.CompareOrdinal(r.Description,desc) == 0 )
 
10:55 PM
@TravisJ why not just use .Any()? it seems like this wrapper is useless (unless i'm missing some context)
 
@Kyle - I need to check the database for HeLLo if hellO is entered.
 
use .ToLower() on both the value from the db and the input value
 
ToSlower :P trying to speed it up
 
.ToUpper()?
 
well, that is what I started with
 
10:58 PM
@TravisJ if you're using LINQ directly (from SQL), then the StringComparison.OrdinalIgnoreCase doesn't matter. Let SQL do the work
String.Equals(row.Name, "test", StringComparison.OrdinalIgnoreCase)
 
this also threw an error Any(r => r.Description.IndexOf(desc, StringComparison.OrdinalIgnoreCase)
@Johan - I will try .equals
@Pheonixblade9 - Ill try that
 

« first day (789 days earlier)      last day (4154 days later) »