« first day (1554 days earlier)      last day (2595 days later) » 

 
1 hour later…
7:24 AM
Morning guys
 
morning
 
8:12 AM
morning
 
8:25 AM
hey
 
how's it going?
 
~ok
I have two assignments due to sunday to complete cryptography 1 on coursera
not sure if I can make it
 
why that?
 
it takes time to understand
how are you doing ?
 
8:45 AM
@franssu the course from standford?
 
@franssu sick :(
though it's weird, I usually get well in 1-2 days
 
9:03 AM
@Proxy yes
did you see the doctor @FoggyFinder ?
 
@JohanLarsson In my program, opening a directory with 6000 files takes like 30 seconds and blocks the entire GUI :/
 
@franssu no, I don't think it makes sense. The common cold, I think
 
I'd say I have a good idea where are the bottlenecks, which I could fix, but I'd like to figure it out from the profiler outputs
if only for my own learning experience
 
9:51 AM
i have a directional question
how should i approach a problem when i need to download a video from a site lets say youtube
i should first go study http protocol?
 
do you want to accomplish this in reasonable time? if so, then you try to find a library for that or similiar
 
nah i would like to do it myself
 
youtube-dl is a command line tool for that, and they need updates every month or so because the old versions keep breaking thanks to updates on the Google's side
 
"from scratch"
but i do not know how should i even approach studying the problem
i guess there is always a stream open where the video is coming through
 
how "scratch" do we mean by "from scratch"? do you also want to implement HTTP protocol? sockets?
or you mean "everything what's available in .NET Framework, and we can build on that"
 
9:57 AM
for start i would use what comes with net framework
i think it would take a lot of time if i would implement even my own http protocol
 
I don't really know how youtube-dl does this, but I'm guessing they download the webpage, parse it, and try to find the relevant parts. afterwards they try doing the rest, that is, downloading the video
 
you have any good starting tips?
 
I'd say visit a youtube video with your browser, and examine the HTML source code
 
i did that :P
its downloading giles at chunks (as expected)
but i do not know how to approach this from the programming side
guess http protocol should be examined first
 
you can use a sniffer, like Wireshark, to follow HTTP conversation between your browser and YouTube
 
10:07 AM
yeah http study 1
i wonder if i will be able to make anything at the end
 
 
2 hours later…
12:05 PM
Morning
 
morning
I got the slack invite from you right? but you aren't in the team?
 
I should be
otherwise I couldn't have invited you :) I saw bill welcoming you when you accepted :)
@Proxy I'm not gonna get into the conversation's detail of youtube & .net -- but it feels like you're hearing what you want to hear instead of listening to peoples' advice with an open mind (and I do hope this comment doesn't land in same category!)
there's no need for http study in what you're asking for - millennium spoke of the "conversation" - he's suggesting you to analyse the flow of communication.. not analyse the individual packets and see how they're wrapped up
 
Ahaa there you were... I only saw like 9 persons or so... maybe the latest active or so...
 
in the same vein: use Fiddler for higher level sniffing of http(s) traffic than wireshark.. wireshark is too low level for the purpose
yea I'm not talkative in there generally
or any other slack channel for that matter
 
that sounded like a statement of some kind?
 
12:18 PM
umm me not being talkative in slack?
 
12:29 PM
yes
like its specifically slack you don't talk in
 
12:41 PM
ah no I don't really talk much outside #WPF and F# these days
why these two: #wpf is my baby so I can't abandon it..f# -- people help me so its my responsibility to give back by helping where I can :)
Slack f# could have the same thing.. I guess that's why I only passively learn from their chats and don't ask questions.. otherwise I'd feel responsibility to give back there as well and I really don't have time to handle another channel.. especially as active as slack channels
 
Morning
 
1:23 PM
Morning
 
1:38 PM
Hi there. could anyone please help me with a problem? stackoverflow.com/questions/41752176/…
 
@Maverik maybe but i still need to grasp the basics of the protocol itself?
 
if you wish proxy
Hi Lynn/Alex
 
Hi Lynn, Maverik, Proxy
 
hi alex
 
@mykds Something like this: string myString = ((Excel.Range)xlws.Cells[2, 1]).Cells.Hyperlinks[1].Address;
 
1:49 PM
I wonder if the adodb provider is actually grabbing that data, and the OP is just referencing it wrong when pulling it out of the DataTable
 
Yeah, the link data should be there. It's just a little tricky to extract it from the cell
 
Today is so depressing.
 
Rain?
 
No... the thing going on 2 hours south of me.
 
?
 
1:50 PM
DC.
 
Hi Is there any native (built in) pdf export library in WPF
 
@MehmetÇopur Check out iSharpText iTextSharp nuget.org/packages/itextsharp
 
^ yeah, iTextSharp is the best for PDF
 
(oops)
It's crowded in here today <grin>
Two rows of icons! :)
 
Nice to have people here. We need to get some of the folding chairs out, make some coffee
 
1:55 PM
oooh coffee!
Brb
 
See what I did...
 
Much better.
 
Ahh, coffee -- the elixir of the gods
Tea is that for me
 
Queues up some moody blues
 
2:23 PM
@LynnCrumbling & @Alex:
That's what I actually thought aswell but I couldn't figure out how to do the reference to a Hyperlink. I'll it with your hint and give you a shout later. Cheers
 
2:34 PM
@JohanLarsson Could you take a look at this? - what I'm trying to achieve is to present a fallback value while the original value is loaded asynchronously.
(it's string here, but in the original code I'm using ImageSource)
 
@mykds when adding tags to questions, please use the least number of tags that are directly related to your question - your question has nothing to do with wpf.. its a c# excel interop question
 
I guess I can't use FallbackValue with bindings, which is a shame, because IsAsync=True, FallbackValue=?? sounds pretty much what I'd like to do
 
2:58 PM
        public MainWindow()
        {
            InitializeComponent();
            DataContext = this;

            Task.Run(async () =>
            {
                await Task.Delay(5000);
                ImageSource = "http://www.stop-tobacco.ch/en/images/images_stop_tabac/Images%20aides/waiting-22.jpg";
                PropertyChanged?.Invoke(this, ImageSourceChanged);
            });

        }

        public string ImageSource { get; set; }

<Image Source="{Binding ImageSource, TargetNullValue=blogs.psychcentral.com/mindfulness/files/2015/10/…}" />
@milleniumbug does that work for you? ^
(in case its confusing, I've thrown INPC on top of MainWindow itself)
 
oh wait, I shouldn't do IsAsync=True, FallbackValue={Binding Fallback}, only IsAsync=True, FallbackValue=Fallback
 
For those of you that have R# Ultimate -- a nice blog post on DotTrace: blog.jetbrains.com/dotnet/2017/01/20/…
 
@Maverik sadly it won't, my ImageSource is a bitmap which is created with Imaging.CreateBitmapSourceFromHIcon
and the HIcon is created from a WinAPI function called with P/Invoke
 
umm don't think that matters? you could just change it to be that?
Source takes an ImageSource anyway
but I tend to use TargetNullValue as an explicit check point rather than FallbackValue which is automatic depending on Async's return
depends of course what you wanna do with this stuff.. if you had any sort of post processing, TargetNullValue sounds better to me
but i'm not too experienced in this stuff
 
honestly I'm in a bind since I'd normally do some updating in an async method, but it would mean it's called from a property, and we can't have async properties
can I bind to methods?
 
3:11 PM
you could
though i'm not sure it's going to be worth it
ObjectDataProvider can let you do it
 
also, now my SSCCE doesn't reproduce the problem
gotta make a new one
 
SSCCE :D I get what that is, but I've never seen that before
 
@Maverik Oh sorry about that. Will keep it in mind.
 
np mykds - I already edited out your tags :)
 
@Maverik is that a rarity in this channel? :D
 
3:14 PM
well isn't it everywhere? everybody wants quick answers and reading their minds is a pre-req
 
@Alex I updated my question. Have you got any idea how I could grab the link from my DataView?
 
your edited question makes no sense
 
no?
 
it sounds like you're Cargo-Culting the code
you mention DataView but I've no idea where that is
even if I did - this is an implementation question.. only you can really answer that unless we have access to the whole project
 
Oh yeah...that's right as I just implemented that code to check if I can read out the Hyperlink
 
3:17 PM
as it stands right now - your question is a wall of text with code here and there but nothing that's actually coherent
also: editing question to ask another question is generally considered a bad thing
 
Oh that's a bit harsh isn't it ;-)
My DataView is dv = new DataView(db.GetExcelContent());
As written in my post
 
since your question is already solved from the answer Alex linked you could either ask him to convert his comment to answer or you could answer it yourself - or simply delete the question
for the next question - well write a new question (you can always link to older question if you wanted to provide context)
 
@Maverik sure, it's also a problem in C++ channels, where we also get tons of questions asked by students several hours before their deadline
 
reason why you don't want to ask question within another question: if people choose to close your question as a duplicate / too broad / whatever other reason - now both your questions will get closed
 
my skill in mind reading is only intermediate :D
not an expert yet
 
3:22 PM
practice makes perfect bug :) <-- should have read that from my mind already but you'll get there!
@mykds you're throwing the result out in messagebox and you don't know how to make it work with DataView?
actually don't answer that - you're really not going to get much help on your problem because it's your lack of understanding of your code and not an actual technical issue anymore
so I'd suggest you try to really understand what is going on in the code you've copy pasted and how you can make it work towards your goal
 
@Maverik I know what it is doing. But that's not really what I want. As you can see in zGetExcelContent() I collect all data from the excel file and write it into a DataView.
My Question was: How can I get the Link of some cells afterwards.
 
you already have code for that - so its been answered
your next question is: now that I have the link - how do I integrate it back into DataView
well you edit the content like any other content
 
If I would just copy past Alex suggestion I would open the excel file again. And I would like to avoid that.
 
here's my suggestion which you don't really want to hear: learn WPF the right way
 
No that's not right...I might edit it as this is a missunderstanding
 
3:29 PM
none of your posts suggest that you have any real idea of how to work with WPF
you're trying to run it like WinForms - you're not going to get far with that - nevermind lots of pain along the way
learn MVVM - try to do something basic and get a proper grip of mvvm - then come back with a proper viewmodel and you stand better chance of getting help
 
That might be right, as I'm doing it just as a hobby ;-)
 
that's irrelevant really
trying to run a petrol car on diesel because you're a hobbyist driver isn't the way to drive the petrol car
 
:P
 
that may sound funny, but that's exactly what you're doing right now with wpf (judging from your existing posts)
people who have answered your wpf questions with their one line codes have done you a disservice by reinforcing you're ok doing what you're doing
there's a ton of mvvm tutorials on internet - just spend some time - its pretty basic pattern that only requires practice to be able to get a handle on it
this DataView issue wouldn't even be there if you had a proper binding in place
(I don't even know what that is!)
 
3:44 PM
@JohanLarsson Revised SSCCE
 
nice weekend
 
you too Markus :)
 
^^^ with the above neither a fallback nor the actual value load, Snoop shows no binding errors
 
will have a look
System.Windows.Data Error: 11 : Fallback value 'Fallback' (type 'String') cannot be converted for use in 'Source' (type 'ImageSource'). BindingExpression:Path=Main; DataItem='FileItem' (HashCode=36518691); target element is 'Image' (Name=''); target property is 'Source' (type 'ImageSource') NullReferenceException:'System.NullReferenceException: Object reference not set to an instance of an object.
   at System.Windows.Media.ImageSourceConverter.ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, Object value)
 
hmmm, how did you get that - it literally shows nothing when I select "Show only visuals with binding errors"
okay I think I know what's going on - I thought the previous example worked when it really didn't
and it just happened to be a string
and the fallback is a string
 
3:57 PM
did you enable WPF warnings? they're off by default
 
in snoop?
 
I set all of them to Warning the moment I install VS
 
oh, in VS
 
no this is from VS Debug session Output window
 
how do I turn them on?
                <Image>
                    <Image.Source>
                        <PriorityBinding>
                            <Binding IsAsync="True" Path="Main" />
                            <Binding IsAsync="False" Path="Fallback" />
                        </PriorityBinding>
                    </Image.Source>
                </Image>
^ half-success with that one - it displays an image for the fallback, but fails on the main one (displays nothing)
 
4:00 PM
^ that's what I just thinking as well
as for warnings - its in options :)
Tools -> Options -> Debugging -> Output Window
 
all of the settings in "WPF Trace Settings"?
hmmm, it works if I call image.Freeze(); in the Load() function
 
doubt that'll help though its good to have
and yea I set everything to warning - better to have extra useless warnings than to miss one that mattered
 
@milleniumbug does it need to be a dynamic image?
If not drawing an image in mspaint or gimp and using it as a resource is simpler
Awesome to experiment with creating it in code of course
 
4:15 PM
ah, creating it in code was me trying to make it reproducible without introducing the other code from my project
 
it seems IsAsync is our real culprit
 
if it solves a problem it is fine of course
there is one or more issues with async on bindings for images, don't remember what it was
think it caused bs when scrolling a big list
 
both bindings die if we set them both async -- despite red coming back sooner
 
tbh that approach didn't help much, doesn't seem to block the GUI, but it makes it choppy
 
well considering I can't see anything.. choppy is better :)
 
4:18 PM
there is some stuff for async/lazy loading of images here
I think, maybe I removed it, don't remember
visible if scrolling fast, perhaps a slow connection is needed for it to be visible
 
4:40 PM
bug: I think just drop the fallback method and use explicit null -> value mode of change -- even when fallback works, image refuses to display anything in IsAsync binding
(you could even bring the fallback value into viewmodel itself that way)
Source => mainValue ?? fallbackValue;
set Source to null while loading and set it to real value when you're done
 
By the way...OleDB can't read Hyperlinks from Excel sheets, which is why I couldn't grab the link in my DataView.
 
XAML doesn't need to know how the backend is dealing with this stuff
mykds, use VSTO
(you can use a hybrid approach - leave your existing stuff in oledb and just pull hyperlink from vsto)
working with excel is ugly all around from c# - how much ugliness you wish to have is the only choice you can make
 
Yeah I just figured out that it is ugly thanks ;-)
And if I tell you the other file type my application has to deal with, you'll give yourself a huge facepalm
 
I won't :)
after the years spent in this channel.. I've pretty much seen everything :)
 
Well ok...based on your answers before you'll give ME a huge facepalm :P
:D
 
5:01 PM
well no the answers are meant to help in the right direction
no face palming needed :)
 
^ what Maverik said
@mykds Don't kick yourself. There are no mistakes... it's all about learning and growing.
Give yourself the room to grow and develop naturally.
There are enough people putting us down; we don't need to help them through self-criticism.
 
Thanks for the encouragement :)
 
You're welcome
 
5:23 PM
Is it just me or is interop much slower than oledb?
 
I think that's true of interop
 
 
2 hours later…
7:41 PM
Takes about 1min to import my excel with .value2. :(
 
Isn't there a OpenXML way to write for excel ?
Working with XML is waaaay quicker than Interop or Oledb for sure
 
I'm sure you can find Nuget stuff to help you build things with OpenXML
But remember that the amount of pain increases with more Microsoft products you use in a single project lol
Sometimes I hate just for the lulz :(
 
My problem is that there are some cells which include Hyperlinks and I need to get the HyperLink.NavigateUrl
 
6
Q: How to add hyperlinks into Word docx using open XML?

Antun TunI am having a trouble adding hyperlinks to my word document. I don't know how to do it. I would like to make a link in a word document from my C# code using open xml. Is ther a different solution using only href or sth similar? There is a HyperLink class on the net from Open XML but how to use it?

:D
 
7:49 PM
Trust me...if I could avoid this shity excel file I would happyly do that :/
 
I know that feeling man... I know that feeling
Worked for accounting for almost 3 years
I still have chills when I say Excel out loud
 
:D
 
We've been using spreadsheetlight.com for a while
works quite well
 
Hmm. Maybe that's why I still hate Excel to this day. Did some VBA and even used it as a data source for an ASP.NET app years ago
 
VBA was so weird to work with, but never did anything for Excel with VBA, only for Access thankfully
Even though it isn't much better
 
7:53 PM
Yeah, Access too. VBA is a kind of VB Script. The syntax is strange
 
Opening up Access to work with VBA is almost like opening a time capsule....
 
i open access every day to look at databases :(
have you ever seen an access database linked into SQL server?
 
Ouch, Julien!
 
no? good.
 
Unfortunately, I have
 
7:58 PM
hahahha
 
Oo What? Why would you link Access wit hSQL ?
 
Access is the "frontend" of the app
 
That should be punishable by law...
 
;)
The court at the Hague should hear cases pretty soon
 
@ReedCopsey Thanks for your link. Looks interesting and I'll give it a try :)
 
8:30 PM
Waaaah...I think I just tell the owner of the Excel file to get rid of these bloody Hyperlinks and just add a column with the plain link...... :-/
 

« first day (1554 days earlier)      last day (2595 days later) »