« first day (1224 days earlier)      last day (3950 days later) » 

15:01
here too, gusting up to 50mph
Max
Max
Anyonw
Anyone who knows any way of getting selected text in IE using win32, without having your own instance of it (AKA, getting it from the explorer window being in focus)? Any resource/class I can use? Is it even possible?
What are you asking?
Max
Max
Well, basically, is it possible to retrieve the selected text from an internet explorer-window that's not handled by the program
*?
It's a pretty complex question, I know. But I'm not receiving answers elsewhere, so I figured that it's worth a try :P
You want to get the highlighted text in IE from YourApp.exe?
Max
Max
exactly
15:07
Why?
Smells like XY
Max
Max
Well, because I want to make it more compatible. I'm using UI Automations, but that doesn't cover it up for IE
Max
Max
So far I've made it send "^c" through SendWait to copy whatever's marked, but it's not that solid unfortunately
I have no idea what you want
Max
Max
Well, as you stated yourself; if someone marks text in an IE-browser, I want my program to be able to get that to a string
I assumed that I had to use mshtml.dll as a resource in some way, but I really can't get it working...
But now I'm not even sure if that's possible, hence why I turned here
15:11
But why???
That can't be a requirement by itself
Max
Max
Huh?
It's a program made for personal use. It's basically something running in the background
356
Q: What is the XY problem?

GnomeWhat is the XY problem? When asking questions, how do I recognize when I'm falling into it? How do I avoid it? Return to FAQ index

Max
Max
interesting
oh, that's what you meant by XY?
Okay, let me back up a bit then
Well, I think this explains it pretty well:
"I'm making a program that's supposed to translate easy phrases (actually, I use a service for this) when they're marked in a web browser, and a certain key sequence is pressed. The problem is that I can't use UI automations (ways of retrieiving the selected text by standard) with internet explorer, so therefore I somehow need to get the selected text in the currently selected (AKA, highlighted/in-focus-ed) window. How can I do this? Is it even possible?"
Am I still in the XY-phase? If so, I'll go a head and read through the entire thing in the F.A.Q. you linked me
Seems like a browser plugin would be better
Max
Max
Oh, like an extension?
15:19
"a certain key sequence" could be Ctrl+C :)
Max
Max
yeah, but after that, a popup window is brought up (at least for now) with the translated string
so if I'd use Ctrl+C, I'd get it even when just copying normally
If I would make it a browser plugin, would I have to change some major parts of the code? Can you even do that in C#?
yeah, well, looks like you're on the right track
unless you want to go to a plugin instead
I have no idea if you can write IE extensions in C#
I don't work with IE
Max
Max
Hmm, okay. I haven't either.
I'd prefer not to make it a plugin, but I guess it's the only option if there aren't any other ways
I have no idea if there are other ways, but a browser plugin is the logical solution to add functionality to a browser.
Max
Max
I suppose. I was hoping that API:s could save me in some way
I tried using mshtml.dll, but it doesn't seem possible with that :P
Hmmm... I should've thought about this way earlier. Now I'll have to change a bunch of things if I decide to switch
Or re-program...
Oh well, thanks for your help anyways :)
15:28
hi everybody
I need to have a sort of backup copy of an object, to allow user to recover it in case he wants to cancel modifications
This is what I've done
public static IntermediatePosition deepCopy(IntermediatePosition original)
{
return (IntermediatePosition)original.MemberwiseClone();

}
Use the Unit of Work pattern
@Steve ;) ^
but the copy does not work as expected, infact it is updated when original is updated
read the documentation for memberwise clone
ok... the original object and its clone refer to the same object.
15:33
so how can I have two different objects?
clone them
@KendallFrey haha, i think i've got it down!
I think you're just approaching this wrong. The normal way to allow a user to undo changes isn't to make a backup copy of the object
You just save the changes they made, and allow them to undo them
So what can be the right approach? how to undo modifications in an object?
When a property is changed, save an object that stored the property that was changed, and the old value
15:39
So Kendall I need to create a local object that stores the property that was changed?
@FrancescoDS yeah, probably
ok i will try
this guy is probably a smidge better than me
<----hater
KEndall but how do I initialize the local object?
That is, how to initialize it with values of the original property
Hey everyone.
15:45
@FrancescoDS Before you set the property, set the old value to the other object
@ton.yeung Not much, just trying to keep building my first official enterprise application.
this can be done in the property setter
@Greg whats up man!
Not much.
I don't understand what is going on - I parse a template of a document (a DockPanel) using XamlReader.Parse, but then when I add data to the DataGrid, it fails when I ask it to create a custom control
> Cannot create unknown type '{clr-namespace:Bookie_Buddy.DataModel}Horse'
15:53
@Skullomania I'm working on a DotNetNuke Dashboard. The application installs to a server with a Web Interface. It will track the automated system, allow you to choose multiple template sites, it will allow you to create and remove sites. But since it will all be automated it should make it easy for companies to "demo" their services. Plus I'm going to make this an official application that cost some money.
Having a debate about this at work, which method do you prefer? gist.github.com/carbonrobot/069a0731f45ae0e81af3
@Greg I remember you telling me about this before! How is it going?
It seems like it should take alot of the guess work out of installation, especially for those who are not too tech savy
@ton.yeung did you read the article I posted?
That guy salary is insane!
@Skullomania Well, I actually finished the services a single template with modules. It actually automatically creates a full site. It even makes it so the user isn't an Administrator, but has all the abilities required to modify the site to their liking.
Solved it! :) I added assembly=Bookie_Buddy and it worked
@CharlieBrown I like Option 2, it seems more flexible.
@Skullomania Do you have Git?
15:59
@ton.yeung typo
@Greg no...one sec i will look into it
i think op2 is easier to read, but opt1 seems more flexible
any other alternatives? Say you have a method that can return 4 possible scenarios
@Greg I am reading up on Git...but still do not understand its full purpose...but then again I have not ever used any version control systems. I do however understand why you would use or why VCS's are necessary
Git: Protection from fucking oneself over
2
@CharlieBrown lol
16:07
@Skullomania You can create private repositories, that are stored on the Cloud.
or locally
So when you corrupt a flash drive or delete your project you got a backup for your application.
Plus you can share code between users quite easily.
You can test out large changes to code and if you dont like the result, revert it almost instantly
Question for all of you: If someone is exiting a doorway and someone is entering at the same time who has the right of way?
16:09
or stash it somewhere for later
exit @SpencerRuport
@SpencerRuport I'd say the person leaving.
@SpencerRuport dont think it matters, honestly
The GIS SO has really been letting me down
@Steve - Why not?
@JLott Why Jess?
16:11
@SpencerRuport i dont think its something you can plan out, it just happens
and i dont think the other person would care either
@Greg They haven't been answering even simple questions I have unless I set a bounty
@SpencerRuport iz xy poblem.
I am almost out of rep at this point haha
haha
@JLott Link some, I'll answer. I've been a slacker.
16:12
I feel like the person leaving the smaller space should have the right of way
I feel like your question is really pointless, TBH
Just be polite and give the other person right of way
@SpencerRuport my take has always been, in an emergency people may need to exit the elevator or stairway or burning building
@SpencerRuport Regardless of entering or leaving, I have the right way.
if i had to choose, i'd say leaving, because you can see out of the glass on the door easier than the other person can see in, they probably wouldn't even know you were coming out
@Greg They are more ESRI based
but ok
16:14
Best solution: Most X chromosomes has right of way.
I say that and then it looked like someone answered lol
that solution even has some special cases, like if a really fat guy meets a woman, he might have more X's, and deserve right of way
@ton.yeung but only half as many
I have lots of exes.
16:16
@KendallFrey ..what
So I'll just bowl through everybody.
fat people -> right of way
@SpencerRuport executables?
But the particular instance I was asking about was for a bathroom so the girl/guy thing doesn't really apply.
16:16
give the least fortunate person the best chances
@SpencerRuport oh, but it might
was it Steve that has a relevant story?
I was trying to leave and this guy kept trying to get in
I KNOW I KNOW
Maybe. I was the one who asked the question.
rotating doors
Not intentionally
16:18
huehuehuehue
satsatsat
lumlumlum
jajajaja
XAXAXAXAXA
now it doesn't make sense
That is laughing in greek
or russian idk
So the latest stable version of Azure Storage dll is not compatible with the latest stable version of the Azure emulator dev tools.
R.I.P. 2 hours of my coworker's time.
16:26
I downloaded the node.js tools for VS and they were already outdated
how do i find out the type of element that is an array, typeof(arr[i]) is what i tried
but it hates me
@Steve arr[i].GetType() is maybe what you want
ah, lemme give that a shot
yeppers that did it
ty
typeof is a compile-time thing, IIRC
but aren't arrays compile time collections?
16:29
you were passing in an instance of something, which is invalid for the typeof operator
ah gotcha
TIL. Thanks chat
@Steve Assuming that you know the type of the array, just not the object?
Hmm. Wonder what happens if I call Add on an array
I've got money on exception
Hello. when program uses more than 1GB of memory
16:34
bingo
NotSupportedException: Collection was of a fixed size.
then its GUI response is kinda of slow :/ is there anything to fix it
@user2511798 Use less memory
Or buy more RAM
i have 8GB RAM and total system is using only 3GB(including my program) and its 64 bit system
5GB is free
is it a 64-bit app?
if the program uses less than 1GB then the responsiveness is good and no problem.. yes it is
16:37
Is there a very distinct difference in performance between 999MB and 1001MB?
as soon as the memory uses by the program dropped below 1 GB is gui is fine.. if it exceeds 1GB its kinda of laging
@JLott I've never worked with GIS.
haven't seen for close interval.. but i can say as soon as it exceeds 1GB gui is responding very slowly.. but below 1GB is perfectly fine
The only thing I can think of is the UI not having enough resources
It could be that memory is unrelated to the issue too
UI not having enough resources can you please be clear about this?
16:42
as in, there aren't enough resources to go around
idk
posted on February 21, 2014 by Eric Lippert

The nice people at DevProConnections asked me to write a beginner-level article for them about the perils of arithmetic in C#; of course these same perils apply to C, C++, Java and many, many other languages. Check it out!

@KendallFrey I've tried but it does not work
I've followed the sample in MSDN about MemberWiseClone, using a constructor with parameters to copy the object
but it does not work
both objects are updated when do changes on one
@FrancescoDS what are you trying to achieve?
object has a bool, a String, a list of doubles and an enum
I've tried to change all values but it does not work with the list of doubles
that's because list is reference type
so it just copies the reference to list instance
you could use this one: cloneextensions.codeplex.com
16:56
In the deepcopy method, after the MemberWiseClone method I 've added an instruction to copy the list
how does the instruction look like?
newlist = originalList
so you're just copying the reference
use newlist = new List<double>(originalList)
but maybe I need to do a foreach with values
@FrancescoDS Can you give a SSCCE?
17:00
Kendall I think I've solved now
You should read about deep copying, because that's not what MemberwiseClone does
@FrancescoDS new List<double>(oldList) will take care of copying the values for you
Hey who has experience with bootstrap? I have something like <div class="panel"><div class="container">...</div></div> which allows the inputs to flow past the panel. If I change it to container-fluid they don't flow past the panel but then there's no padding.
Am I supposed to add the padding manually or am I doing something else wrong?
Go Canada Go
suck it canada
17:12
@SpencerRuport which inputs? on a form? is panel floated?
<container><row><col-sm-12><form><form-group><label><input>
good job guys problem solved
thank you all
@SpencerRuport or if your doing horizontal its:
<container><form-horizontal><form-group><label><input>
I have no idea.
I don't know anything about bootstrap but I was told to use it. :P
I thought I was using bootstrap 3.
@ton.yeung yes, it does
nah, its still there
My understanding is that container has a fixed width.
Which won't work in my case.
I have a nav bar on the left and then this panel
so it can only be as wide as the nav allows.
why does row have a negative padding?
oh I'm only supposed to use row under container. not container fluid.
so... am i supposed to manually add padding for container fluid?
I don't see how else to do it.
My controls are sitting right on the edge.
17:34
row is under container-fluid as well, but your missing column
row has a negative padding b/c columns have gutter margins on both sides, so row has padding on the edges to counteract so your fluid grid will extend to the edge of the screen even though there is a gutter there
@SpencerRuport
17:57
I just installed VS2013 and suddenly my mouse drivers don't work, wtf
GOOOOOOOOOAL
18:10
www.nobodycares.com/aboutcanada
;)
you do realize that i didn't literally mean that nobody cares about canada? pretty sure every canadian does...
my point is you don't need be argumentative just to argue, its obvious what my intentions were
well there ya have it
hi! can you please help me with a little problem. I have datagridview and i would like that all selections (including selection when data is loaded) cause an event. how to do that? thank you!
@ton.yeung I don't think so... I have binded method to CellEnter, but this doesn't include auto selection (selection made by program itself)...
18:27
@user1257255 Which DataGridView are you using?
Or: msdn.microsoft.com/en-us/library/… if it's the Windows Forms DataGridView class ;)
@ReedCopsey yes, this one is right but there's a problem because I don't have current index property
maybe it's defined directly in widget's properties
Just look at the SelectedColumns and SelectedRows properties at that point
or use CurrentCellChanged if you just need the cell itself
only CellEnter has e.RowIndex...
you can just look at the dataGridView.SelectedRows property though
instead of using the args
how to get only one index out from selectedrows (i have disabled multiple rows selected)... visual studio underlined me that code
18:40
use the first one
ie: int selectedRow = dgv.SelectedRows[0];
it's still underlined: Cannot implicitly convert type 'DataGridViewRow' to 'int' <- SelectedRows[0].Index is solution
oh, use: int selectedRow = dgv.SelectedRows[0].Index;
Is there any kind of auto-refresh setting for the Watch window?
It thinks my expression has side effects
@ReedCopsey thank you, that solved my problem! :)
19:04
My hands are freaking shaky...
1-0 with a couple minutes left
CANADA!!!!!!!!!!!!!!!!!!!
1-0 FINAL
US lost the qualifier for the gold medal game
boo
canada sucks
Hey Kyle
congrats on the loss
came here just to say that
@ton.yeung Yeah, but they didn't make it to the semis
they're usually one of the top 4
putin doesn't care about hockey, but ovie looked pretty pissed.
19:22
It's not over yet is is Kendall? Thought it was the 3rd period?
@ton.yeung - the US beat Russia
it's been over for 15 minutes
@TravisJ in the quarterfinals?
man, who arranged this thing
@KendallFrey - Yup
it should be CAN USA RUS SWE in the semis
19:29
instead USvFIN and u guys
Who do you think will take gold?
Rather see CAN than SWE
Seems like Canada has an upper and in the match
I don't think Finland has a very good team at the moment so they probably wont beat the US
I would definitely pick US for bronze
I would guess Canada for gold, but I haven't seen Sweden play
19:46
Wonder why he describes web servers as localhost software
No clue. The whole thing was kind of poor quality. But still, kind of all happened very quickly. 5 minutes, closed it, deleted an answer, and then deleted the question.
And you're wondering if deleting was overkill?
no way, not IMO
There are a few words to describe that question, none of them fit for primetime TV

« first day (1224 days earlier)      last day (3950 days later) »