« first day (1655 days earlier)      last day (3310 days later) » 

1:00 PM
around here, it's "newer leans", and it means pizza
 
Pizza? Why?
 
Is there anyone who knows xamarin?
 
I know of Xamarin
 
Ohhhhh that's awesome haha
 
1:01 PM
could you take a look at my question?
0
Q: How can I set an ActionBar button enabled=true, from a ListView_ItemClick?

Rui Emanuel QuaresmaI have this code: public override bool OnCreateOptionsMenu(IMenu menu) { MenuInflater.Inflate(Resource.Drawable.actionbar_produtos, menu); menu.FindItem (Resource.Id.edita).SetEnabled (false); menu.FindItem (Resource.Id.apaga).SetEnabled (false); ...

 
@JLott not really
 
I have to go train a client and apparently every time we go to bill them they start talking about the affects of Hurricane Katrina sooo this should be fun
 
> we so poor we get rekt by hurikene we cant pay
 
? could you set up a trigger so that when a table is updated, the trigger checks to a user table to verify the user could make that change
 
At least I look like 15 so people have a hard time being mean to me lol
 
1:04 PM
lol
 
its bad design prob to do that but - production code can't block users from changing the table value
 
dont mess with the jailbait
 
Bait ftw.
 
'bate ftw
 
I was waiting for you to say that
 
1:07 PM
@JLott could you look
 
@RuiEmanuelQuaresma Looking
 
I tried already. Not a Xamarin guy, and there's almost no relevant information to go by there.
 
What is the problem with this code? MenuInflater.Inflate(Resource.Drawable.actionbar_produtos, menu);
menu.FindItem (Resource.Id.edita).SetEnabled (false);
menu.FindItem (Resource.Id.apaga).SetEnabled (false);
return base.OnCreateOptionsMenu(menu);
Are these in different classes?
 
Shouldn't the OnCreate call be made before trying to find items?
 
1:13 PM
these are all inside of the same class
I have added an image to the question
@Roel yes and it is before
 
I have a string coming in to method, its a domain user:
user
"DOMAIN\user"
when i enter it to DB, it eats the backslash. Trying to get over it:
user.Contains('\\')
false
user.Contains(@"\")
false
user.Contains(@"\\")
false
user.Contains("\\")
false
user.Contains('\\')
false

what am I doing wrong?
 
I again don't know much about what you are doing, but will it not let you set that menu as a overall global IMenu object when it is created?
 
@RuiEmanuelQuaresma In your code its not
 
@Roel in here: MenuInflater.Inflate(Resource.Drawable.actionbar_produtos, menu);
menu.FindItem (Resource.Id.edita).SetEnabled (false);
menu.FindItem (Resource.Id.apaga).SetEnabled (false);
return base.OnCreateOptionsMenu(menu);
?
 
Yeah and where is the base call? Oh yeah, at the end of the method.
I have no clue what the base does, but I can imagine your code will fail if it relies on something that base method should be setting up.
 
1:18 PM
but in that method it works
my question is, how can I do that inside of the ListView_ItemClick
 
Make the menu a global variable in your class
 
@ErkiM. what is the actual string? if you put a backslash in a normal string literal, it won't make a backslash in the actual string
 
Here is a thing
 
tried to use a global bu it doesnt work
 
Only 15 errors remaining...
 
1:23 PM
@RuiEmanuelQuaresma this is basic OO programming. Just adding a line or two of code somewhere won't work. You need to figure out how to get the right objects scoped in the right places, then work with that.
 
Yep yep
 
@RoelvanUden I'm betting 112 errors within 30 minutes
 
@Squiggle Hah. Probably. :/
 
@KendallFrey "DOMAIN\user" <- coming from razor view, using JS: var user = '@Context.User.Identity.Name';
 
@Squi the problam is how
 
1:26 PM
@ErkiM. Domain\\User to espace the \
 
@RuiEmanuelQuaresma if you share the entire class via Gist or something we might be able to help you, but we have almost no context for the code you've provided.
Having said that, I can't believe it's difficult to do - which leaves me to suspect that you need to brush up on OO programming in general, and then tackle it again yourself.
 
@RuiEmanuelQuaresma Have you tried making the menu items in a more global scope?
MenuItem item = new MenuItem(); then in your OnCreate() do item = menu.FindItem (Resource.Id.edita)
The in your ListView_CLick do
item.Enabled*
 
ill try that
 
@RoelvanUden I am not setting it, it comes from a view '@Context.User.Identity.Name' . The question is how to replace single backslash with double?
 
@ErkiM. .Replace(@"\", @"\\")
 
1:33 PM
Replace("\\", "\\\\")
Or that.
 
(\_Y_/)
^bra
 
user.Contains('\\')
false
user.Contains(@"\")
false
user.Contains(@"\\")
false
user.Contains("\\")
false
 
<- bored
 
@KendallFrey I don't see more than in screenshot. I would love to provide more. But there is nothing more. Just this single error message in screenshot. "stackoverflow at line 20"
 
@ErkiM. if it doesn't contain a backspace, it doesn't contain a backspace. What is the actual string as you see in the debugger?
 
1:35 PM
@JLott it doesnt work
in ListView_ItemClick the item. it doesnt recognize the method setEnabled();
 
@KendallFrey
user
"EUROPE\v-objil"
 
Pretty sure that doesn't contain a backslash
\v is a vertical tab
 
@RuiEmanuelQuaresma what's your background with programming?
 
I'm in the third year of secundary course of Informatic
I have had c#
 
I fear for the quality of your educational facility.
 
1:38 PM
I havent had formation on Android
all i've learned is from the web
 
It's okay if you're a beginner, but any CS major should know about OOP principles like classes references methods etc.
 
and a smattering of design patterns
 
it has already worked
@JLott, instead of that, I should put IMenuItem item;
 
@Squiggle (Sometimes I feel like we're trying to educate brick walls)
 
decllarating it as global
 
1:41 PM
@RoelvanUden (don't you mean BRIC walls? lol developing nations joke)
lol "developing" nations lol
 
haha :D
 
oh shut up @squiggle
 
@KendallFrey huh, did not know about it. Anyway, I have all kinds of this coming in, like \v , \a etc, anything in the alphabet, can I universally handle it?
 
woo! 90% of development complete on this feature. Only another 50% more to go!
3
 
Only 8 errors remaining!
@Squiggle I love the 80% done 80% remaining treshold, too!
 
1:43 PM
@ErkiM. Wait, be clear. are they coming in as the literal strings \v etc. or are they coming in as special characters represented by escape codes?
 
Is kendall the only who tries to help?
 
@KendallFrey yep, string literal.

public string SaveDeprecatedResource(string resource, string newResource, string description, string user, string ticket)
{

and user is something like "DOMAIN\v-bll" or "DOMAIN\aabab" etc
 
I'm not sure what you mean
 
me neither
 
do the strings contain backslashes, or are the backslashes part of escape codes?
 
1:47 PM
@RuiEmanuelQuaresma Yeah sorry, I was doing shorthand
 
@JLott are you 105?
 
Shit. If you have a code-first POCO in EF, how do you get the equivalent of the old CreateSourceQuery? Essentially, access related entities with a query and not GET EVERYTHING!?
 
@RoelvanUden you mean an eager-loaded .Include(e => e.Blah); etc?
 
@JLott thanks a lot! Really helped me out
 
@Squiggle Say you have Team.People where People is ICollection<Person>. This team so happens to have 10.000 people in it, and I just want the ones with an age of 13 or less (because that's how I roll bro). If I do team.People.Where(x => x.Age < 13) all 10k Person entities will be materialized into C#-land, THEN enumerated. Which sucks.
In EF4 Model-First I could do team.People.CreateSourceQuery().Where(x => x.Age < 13) and fire the query that matches the people on the team AND age less than 13
 
1:55 PM
@KendallFrey Yes.
Alright heading to "Norlins" - TTYL
 
good morning ZZZzzzzzz
 
2:20 PM
This dude is a jerk.
 
@RoelvanUden if you expose your DbSet as IQueryable<T> it should translate it all perfectly and evaluate it in SQL
I'm not sure what's happening in your scenario. That sort of thing works fine for me.
@Greg yeah.
...which dude?
 
@Squiggle Huh. So you can do a public virtual IQueryable<Person> People {get;set;} then?
Instead of ICollection?
 
-1
Q: How can i get a pointer to an array of unknown type?

Eugen1344So if i have code like this: public static void GetPointer(int[] array) { fixed(void* pointer = array) { } } I can take a pointer of unknown type of an int array very easy. But what if i want to take a pointer of an array of unknown type? How can i do it? public static void GetPo...

 
Well, no that is stupid btw. You can't add to it then
 
@RoelvanUden oh. Wait, what?
Team is an EF model with a navigation property ICollection<Person> People, right?
lazy loaded?
 
2:27 PM
@Squiggle Yes and yes.
 
Then yes, all 10,000 team members will be materialized
 
And that is what I want to avoid.
 
hmm.
Those sort of queries should hit the repository/context instead of hitting lazy-loaded properties
EF isn't that smart, IME
define your aggregate roots and all that
science
 
Funny how the older EntityCollection<Person> would allow that
Because it only starts to load once you access the contents I suppose
 
perhaps there is a way
personally I avoid lazy loading entirely :)
 
2:33 PM
@Squiggle Revolutionary new method of launching rockets
 
@RoelvanUden what if you use IQueryable rather than ICollection?
EF might be smart enough to figure that out
 
@ton.yeung let's be fair, this guy is a jerk though. should we just flag the question so it doesn't pollute our eyes?
but yes, telling him the fact doesn't really help the case
 
@ton.yeung Because he was being an arrogant jerk. People were asking for more context, he basically said "I know best". So I said, when your asking for help you should be humble not so arrogant.
 
@Greg relax man, you can't fix every jerk on internet. if someone is a jerk, just leave him alone
 
@Squiggle Maybe, but you can't Add to an IQueryable
 
2:39 PM
!!xkcd duty calls
 
@ton.yeung I don't like bullies.
@KendallFrey That is good!
 
@Greg we have professional ppl dealing with them, you just don't pull out your .38 and fight by your own
 
@ton.yeung That is true, I'm sure I did some across as a jerk. I called it how I saw it, someone who is fixated on a solution that doesn't exist and rather than provide usable context he belittles the community. I don't agree with people treating people that way. I figured someone should say something, or nobody would. I do see what you mean though, I'll try to be more tact in the future.
@ton.yeung Yeah, I'm still confused on why he is using unmanaged code. Even though it is a third party .dll there has to be a better way.
 
@Greg well, maybe he's just trying to finish some weird homework assignment, but don't want to tell that
@KendallFrey is the production ksp adding any interesting stuff? didn't get a chance to try, internet here sucks, steam just won't download anything
 
2:51 PM
The only reason I would think to use a pointer like that in c# would be some sort of memory mapping
never seen void* used though
@ton.yeung - I don't think like a dumb dev :P
 
@tweray is it, lol
it's full of new stuff
 
@KendallFrey - What purpose would a void* serve if any?
 
@TravisJ generic memory address
 
@KendallFrey - ur tho smart
 
remember malloc returns void*
 
2:55 PM
I haven't malloced for soooo long
 
because it doesn't deal with types, only memory addresses
 
Not since using plain C
 
@KendallFrey is it possible ?
 
@TravisJ me neither lol
@codebrain ?
 
will malloc return void ? o_O
 
2:56 PM
Perhaps.
The plot thickens.
 
@codebrain no
 
yes, thought you found something. lol
 
void != void*
 
ik, just missed the pointer
 
missed*
@ton.yeung - Was it not deprecated when he first used it?
Perhaps it is just legacy now
 
2:58 PM
^^
@ton.yeung it's been replaced with something else?
that would be why
Caprica was born less than 2 months after that date, incidentally
google command came later though
Then why are you asking me?
@ton.yeung You seem very averse to asking Zirak himself
I think Cap's getting ported to node real soon (?)
 
Hey, are you having problems asking on the website as well? I'm getting some javascript-error when selecting tags ^^
 
tags are borked
it is reported on meta.se
9
Q: Can not edit/select tags from web interface(can not ask questions)

izomorphiusI am posting this from the mobile app as I am not able to post any questions or edit tags from the web interface. After writing the question I am not able to select a tag. Writing the text bug also does not help. When I hit post I get the message You should select at least one tag. I get the sa...

 
@rlemon - borked?
 
!!urban borked
 
@rlemon borked To have totally fucked something up. Usually by doing something stupid. Specifically used to describe technology that is broken.
 
3:05 PM
funny. I can't even ask on meta ;(
 
@rlemon - I know what it means!! I meant why are they borked
 
a less version of fubar
@TravisJ someone wrote some code and it broke it
@ton.yeung yes
 
I has interwebs info in my head
 
okay thanks ^^
 
Nah, it's a bug, someone removed a placeholder attribute and it caused a jQuery setter to become a getter which returns undefined instead of what was expected. — Tim Stone 11 mins ago
@rlemon - fixed
Too much jQuery
 
3:08 PM
what is this, open source project?
 
ah cool
open source with the possibility to add code for common users?
rep 10k+ -> modify website? ^^
 
3:33 PM
Yo
 
Can you call PropertyUpdate on sub elements? And how does it work in this instance:

I bind a value to "SomeClass.SomeVariable".

What if i PropertyUpdate("SomeClass") does it propegate to all variables? Or dO I need to call PropertyUpdate("SomeClass.SomeVariable")? Or would I need a function, to Invoke property update, inside of SomeClass?
 
user862319
goddamnit.
 
user862319
"Oh crap i forgot my outlook password. I guess I'll phone up the senior application architect. I bet he can fix it."
 
user862319
small company problems.
 
user862319
@Asheh what namespace does PropertyUpdate live in?
 
3:40 PM
SomeVariable
Is there soem documentation somewhere on what properties are re-evaluated when we call PropertyChanged?
 
user862319
Ahhh you are using componentmodel
 
user862319
"A PropertyChanged event is raised when a property is changed on a component. A PropertyChangedEventArgs object specifies the name of the property that changed.
PropertyChangedEventArgs provides the PropertyName property to get the name of the property that changed."
 
@Asheh any controls binding or event handlers hooked to the changed event handles the prop changed...
 
So SomeClass.SubClass.SomeVar
PropertyUpdate("SubClass")
does somevar get re-eval?
what about PropertyUpdate("SomeClass")
 
user862319
wat
 
user862319
3:45 PM
SubClass?
 
user862319
Are you referring to a property that is an instance of a class defined within another class?
 
user862319
Code example plx
 
yep ^
 
user862319
@Asheh Have you implemented INotifyPropertyChanged on the subclass?
 
user862319
What you are going to have to do I think is implement that interface on the subclass, subscribe to the event handler of the subclass in the superclass and then handle the event there or re-emit it to the next level.
 
3:48 PM
Ofcourse
So what if im bound to
MyClass.SubClass.Variable
 
user862319
You are going to have to daisy-chain this stuff and be careful with your eventargs to discriminate between parent and subclass
 
and then code behind Modifies Variable
Ahh
Ok
I have to call the SPECIFIC Property
I cant call parent properties and the rest updates
 
user862319
I am sure there is a way...
 
Surely the binding engine takes care of it
going to have to write a sample to see what happens
 
user862319
Nothing says you have to use their tools the way the docs say...
 
user862319
3:51 PM
Might need some custom helpers
 
why not set datacontexts properly and all that jazz?
@Bob i would agree with this. I would not expect SomeVar show new value when you call PU("SomeClass")
 
user862319
It is really hard for me to wrap my head around without a concrete example.
 
well I don't think chaining is recommended in the first place. set datacontexts and compose controls in a way they can be read.
that's not advice for you Bob... that's for readers
 
user862319
Fair enough
 

« first day (1655 days earlier)      last day (3310 days later) »